TWI742635B - Method of triggering and counteracting for teaching position and posture - Google Patents

Method of triggering and counteracting for teaching position and posture Download PDF

Info

Publication number
TWI742635B
TWI742635B TW109114075A TW109114075A TWI742635B TW I742635 B TWI742635 B TW I742635B TW 109114075 A TW109114075 A TW 109114075A TW 109114075 A TW109114075 A TW 109114075A TW I742635 B TWI742635 B TW I742635B
Authority
TW
Taiwan
Prior art keywords
posture
motor
command
force
teaching
Prior art date
Application number
TW109114075A
Other languages
Chinese (zh)
Other versions
TW202140223A (en
Inventor
袁偉翔
楊尊富
Original Assignee
創博股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 創博股份有限公司 filed Critical 創博股份有限公司
Priority to TW109114075A priority Critical patent/TWI742635B/en
Application granted granted Critical
Publication of TWI742635B publication Critical patent/TWI742635B/en
Publication of TW202140223A publication Critical patent/TW202140223A/en

Links

Images

Abstract

A method of triggering and counteracting for teaching posture and position is provided. In posture maintenance mode, an automation mechanical system computes and execute the new posture maintenance command every cycle for make a machine apparatus stay in a first posture, determines that the machine apparatus receives an external force and a direction of the external force, and switches to a force maintenance mode when there is torque difference between the new posture maintenance commands and a reference command of the first posture. In the force maintenance mode, the automation mechanical system determines and executes a power maintenance command based on a counteraction force and the current power of each motor for reducing a resistance of adjusting the machine apparatus manually toward the direction of the external force to be a second posture.

Description

教導位置與姿態的觸發與補償方法 Trigger and compensation method of teaching position and posture

本發明係與有關機械設備的姿態教導,特別有關於教導位置與姿態的觸發與補償方法。 The present invention relates to the posture teaching of related mechanical equipment, and particularly relates to the triggering and compensation method of teaching position and posture.

於現有技術中,當要對機械設備(如多軸機構或機械手臂)的位置與姿態進行教導時,通常是由用戶操作具有多個操作按鈕的教導盒,前述多個操作按鈕分別用來控制機械設備的多個馬達來轉動,以使機械設備到達用戶期望的位置與姿態。 In the prior art, when teaching the position and posture of a mechanical device (such as a multi-axis mechanism or a robotic arm), the user usually operates a teaching box with multiple operation buttons, and the aforementioned multiple operation buttons are used to control the The multiple motors of the mechanical equipment rotate to make the mechanical equipment reach the position and posture desired by the user.

上述教導技術中,用戶必須將期望的位置與姿態自空間座標系(即XYZ軸座標系)轉換至機械設備的運動座標系(由多個馬達位置組成多維度座標系)才能進行操作,進而順利使機械設備到達用戶期望的位置與姿態。上述教導技術不僅費時亦不夠直覺。 In the above teaching technology, the user must convert the desired position and posture from the space coordinate system (that is, the XYZ axis coordinate system) to the motion coordinate system of the mechanical equipment (a multi-dimensional coordinate system composed of multiple motor positions) to operate, and then smoothly Make the mechanical equipment reach the user's desired position and posture. The above teaching techniques are not only time-consuming but also not intuitive.

為解決上述問題,目前另有一種位置與姿態教導技術被提出,前述位置與姿態教導技術是由用戶先操作機械設備進入力矩模式,再以人力調整機械設備的姿態,藉以直覺地使機械設備到達期望的位置與姿態。 In order to solve the above problems, another position and posture teaching technology has been proposed. The aforementioned position and posture teaching technology is that the user first operates the mechanical equipment to enter the torque mode, and then manually adjusts the posture of the mechanical equipment, so as to intuitively make the mechanical equipment reach The desired position and posture.

然而,用戶每次要進行位置與姿態教導時,都必須先手動操作機械設備切換至力矩模式,因而相當不便。 However, every time the user wants to teach the position and posture, he must first manually operate the mechanical equipment to switch to the torque mode, which is quite inconvenient.

此外,於力矩模式下,機械設備的各馬達是輸出固定的力矩以於未受額外的外力的情況下維持固定姿態,當用戶以人力調整機械設備的姿態時,必須克服機械設備的摩擦力與前述力矩,才能改變機械設備的姿態,而相當費力。 In addition, in the torque mode, each motor of the mechanical equipment outputs a fixed torque to maintain a fixed posture without additional external force. When the user adjusts the posture of the mechanical equipment manually, the friction and friction of the mechanical equipment must be overcome. The aforementioned torque can change the posture of the mechanical equipment, which is quite laborious.

是以,現有姿態教導技術存在上述問題,而亟待更有效的方案被提出。 Therefore, the existing posture teaching technology has the above-mentioned problems, and a more effective solution is urgently needed.

本發明之主要目的,係在於提供一種教導位置與姿態的觸發與補償方法,可自動偵測用戶是否開始執行姿態教導。 The main purpose of the present invention is to provide a method for triggering and compensating the teaching position and posture, which can automatically detect whether the user starts to perform posture teaching.

為達上述目的,本發明係提供一種教導位置與姿態的觸發與補償方法,用於包含控制器、馬達驅動器及機械設備的自動化機械系統,機械設備包括用以變換位置與姿態的多個馬達,教導位置與姿態的觸發與補償方法包括以下步驟:於位置與姿態維持模式下,控制器每隔一週期計算並執行新的位置與姿態維持命令以使機械設備維持在第一位置與姿態,其中位置與姿態維持命令包括各馬達的馬達控制命令;於新的該姿態維持命令的輸出力矩與該第一姿態所對應的一參考姿態命令的輸出力矩之間具有差異時,判定該機械設備接受一外力,決定該外力的方向並切換至一動力維持模式;於動力維持模式下,決定機械設備的各馬達的當前動力;依據外力的方向決定補償力;及,依據補償力及各馬達的當前動力計算動力維持命令並經由馬達驅動器執行動力維持命令 以減輕朝外力方向調整機械設備為第二姿態的阻力,其中動力維持命令包括各馬達的馬達控制命令。 To achieve the above objective, the present invention provides a method for triggering and compensating teaching position and posture, which is used in an automated mechanical system including a controller, a motor driver, and mechanical equipment. The mechanical equipment includes a plurality of motors for changing positions and postures. The method for triggering and compensating the teaching position and posture includes the following steps: In the position and posture maintenance mode, the controller calculates and executes a new position and posture maintenance command every other cycle to maintain the mechanical device in the first position and posture, wherein The position and attitude maintenance commands include the motor control commands of each motor; when there is a difference between the output torque of the new attitude maintenance command and the output torque of a reference attitude command corresponding to the first attitude, it is determined that the mechanical device accepts a The external force determines the direction of the external force and switches to a power maintenance mode; in the power maintenance mode, determines the current power of each motor of the mechanical equipment; determines the compensation force according to the direction of the external force; and, according to the compensation force and the current power of each motor Calculate the power maintenance command and execute the power maintenance command via the motor driver Adjusting the mechanical equipment in the direction of the external force to reduce the resistance of the second posture, wherein the power maintenance command includes the motor control command of each motor.

本發明可供用戶以便捷且省力的方式來對機械設備的姿態進行教導。 The invention allows users to teach the posture of mechanical equipment in a convenient and labor-saving way.

1:機械設備 1: Mechanical equipment

11:馬達 11: Motor

12:傳動機構 12: Transmission mechanism

2:馬達驅動器 2: Motor driver

3:控制器 3: Controller

31:機構重力補償模組 31: Mechanism gravity compensation module

32:摩擦力補償模組 32: Friction compensation module

33:安全模組 33: Security Module

40:教導狀態 40: Teaching status

400:姿態維持模式 400: Attitude maintenance mode

401:動力維持模式 401: Power Maintenance Mode

41:工作狀態 41: working status

410:姿態維持模式 410: Attitude Maintenance Mode

D1:轉向資訊 D1: Turn to information

F1、F2、F2’、F3:力 F1, F2, F2’, F3: Force

M1、M2:力矩 M1, M2: Moment

P1:位置資訊 P1: Location information

V1:轉速資訊 V1: Speed information

S10-S18:第一觸發與補償步驟 S10-S18: The first trigger and compensation step

S20-S22:姿態維持步驟 S20-S22: Posture maintenance steps

S30-S32:補償步驟 S30-S32: Compensation steps

S400-S410:摩擦力補償步驟 S400-S410: Friction compensation steps

S500-S515:第二觸發與補償步驟 S500-S515: Second trigger and compensation step

圖1為本發明一實施態樣的自動化機械系統的架構圖。 FIG. 1 is a structural diagram of an automated mechanical system according to an embodiment of the present invention.

圖2為本發明一實施態樣的教導狀態與工作狀態的示意圖。 Fig. 2 is a schematic diagram of the teaching state and the working state of an embodiment of the present invention.

圖3為本發明一實施態樣的計算補償力的示意圖。 FIG. 3 is a schematic diagram of calculating compensation force according to an embodiment of the present invention.

圖4A為本發明一實施態樣的姿態教導的第一示意圖。 4A is a first schematic diagram of posture teaching of an embodiment of the present invention.

圖4B為本發明一實施態樣的姿態教導的第二示意圖。 4B is a second schematic diagram of posture teaching of an embodiment of the present invention.

圖4C為本發明一實施態樣的姿態教導的第三示意圖。 4C is a third schematic diagram of posture teaching of an embodiment of the present invention.

圖5為本發明的第一實施例的教導位置與姿態的觸發與補償方法的流程圖。 Fig. 5 is a flowchart of a method for triggering and compensating teaching position and posture according to the first embodiment of the present invention.

圖6為本發明的第二實施例的教導位置與姿態的觸發與補償方法的部分流程圖。 Fig. 6 is a partial flowchart of a method for triggering and compensating teaching position and posture according to the second embodiment of the present invention.

圖7為本發明的第三實施例的教導位置與姿態的觸發與補償方法的部分流程圖。 FIG. 7 is a partial flowchart of a method for triggering and compensating teaching position and posture according to the third embodiment of the present invention.

圖8為本發明的第四實施例的教導位置與姿態的觸發與補償方法的部分流程圖。 Fig. 8 is a partial flow chart of the triggering and compensation method of teaching position and posture according to the fourth embodiment of the present invention.

圖9為本發明的第五實施例的教導位置與姿態的觸發與補償方法的第一部分流程圖。 9 is a first part of a flowchart of the triggering and compensation method of teaching position and posture according to the fifth embodiment of the present invention.

圖10為本發明的第五實施例的教導位置與姿態的觸發與補償方法的第二部分流程圖。 FIG. 10 is the second part of the flowchart of the triggering and compensation method of teaching position and posture according to the fifth embodiment of the present invention.

茲就本發明之一較佳實施例,配合圖式,詳細說明如後。 With regard to a preferred embodiment of the present invention, the detailed description is given below in conjunction with the drawings.

首請參閱圖1,為本發明一實施態樣的自動化機械系統的架構圖。本發明揭露一種教導位置與姿態的觸發與補償方法(下面簡稱為該方法),該方法主要運用於如圖1及圖2所示的自動化機械系統。 First, please refer to FIG. 1, which is an architecture diagram of an automated mechanical system of an embodiment of the present invention. The present invention discloses a method for triggering and compensating teaching position and posture (hereinafter referred to as the method for short), and the method is mainly applied to the automated mechanical system as shown in FIG. 1 and FIG. 2.

如圖1所示,自動化機械系統包括機械設備1、馬達驅動器2及控制器3。 As shown in Figure 1, the automated mechanical system includes a mechanical device 1, a motor driver 2, and a controller 3.

機械設備1(如機械手臂或其他多軸移動裝置)包括用以變換位置與姿態的多個馬達11及分別與該多個馬達11連接的多個傳動機構12(如機械肢體)。各馬達11分別連接馬達驅動器2,以接受馬達驅動器2的控制而轉動,並帶動對應的各傳動機構12進行運動。 The mechanical device 1 (such as a robotic arm or other multi-axis moving device) includes a plurality of motors 11 for changing positions and attitudes, and a plurality of transmission mechanisms 12 (such as mechanical limbs) connected to the plurality of motors 11 respectively. Each motor 11 is respectively connected to the motor driver 2 to receive the control of the motor driver 2 to rotate, and drive the corresponding transmission mechanism 12 to move.

馬達驅動器2用以對各馬達11進行控制,並可依據各馬達11的狀態取得各軸馬達11的位置資訊並回饋至控制器3。 The motor driver 2 is used to control each motor 11 and can obtain position information of each axis motor 11 according to the state of each motor 11 and feed it back to the controller 3.

控制器3用以計算各馬達的馬達控制命令,並經由馬達驅動器2來執行馬達控制命令。 The controller 3 is used to calculate the motor control commands of each motor, and execute the motor control commands via the motor driver 2.

於一實施例中,控制器3係依據各馬達11的位置資訊判斷其轉動方向及轉動速度,藉以計算進行移動或維持姿態所需的力矩(或者自設置於各馬達11的力矩感測器讀取力矩值),並輸出至馬達驅動器2。馬達驅動器2依據力矩值對各馬達11進行對應的控制以移動機械設備1或使其維持姿態。 In one embodiment, the controller 3 determines the rotation direction and rotation speed of each motor 11 based on the position information of each motor 11, thereby calculating the torque required to move or maintain the posture (or read from the torque sensor installed in each motor 11). Take the torque value) and output to the motor driver 2. The motor driver 2 controls each motor 11 corresponding to the torque value to move the mechanical equipment 1 or maintain the posture.

於一實施例中,於機械設備1接受用戶的姿態教導時,控制器3可適時經由馬達驅動器2來控制各馬達11提供補償力,以降低用戶扳動機械設備1所遭受的阻力。 In one embodiment, when the mechanical device 1 receives the user's posture instruction, the controller 3 can control the motors 11 through the motor driver 2 to provide compensating force in time, so as to reduce the resistance of the user to pull the mechanical device 1.

具體而言,控制器3包括用以補償重力的機構重力補償模組31、用以補償摩擦力的摩擦力補償模組32及用以避免補償過度的安全模組33,其詳細運作方式容後詳述。 Specifically, the controller 3 includes a gravity compensation module 31 for compensating gravity, a friction compensation module 32 for compensating friction, and a safety module 33 for avoiding excessive compensation. The detailed operation mode will be described later. Detailed.

請一併參閱圖2,圖2為本發明一實施態樣的教導狀態與工作狀態的示意圖。本發明的自動化機械系統可於兩種狀態間進行運作,分別為教導狀態40與工作狀態41。 Please refer to FIG. 2 together. FIG. 2 is a schematic diagram of the teaching state and the working state of an embodiment of the present invention. The automated mechanical system of the present invention can operate between two states, namely the teaching state 40 and the working state 41.

當自動化機械系統處於教導狀態40下,用戶可對機械設備1的姿態進行調整,並且,自動化機械系統可對調整後的姿態進行記錄。教導狀態40包括兩種模式,姿態維持模式400與動力維持模式401。 When the automated mechanical system is in the teaching state 40, the user can adjust the posture of the mechanical device 1, and the automated mechanical system can record the adjusted posture. The teaching state 40 includes two modes, the posture maintenance mode 400 and the power maintenance mode 401.

具體而言,當自動化機械系統處於姿態維持模式400下,是持續控制機械設備1擺出指定姿態,即各馬達11會持續保持在相同位置或維持相同的移動速度,並且,當機械設備1遭受外力時,各馬達會受控制來增加或減少輸出力矩,以使機械設備1維持在指定姿態或維持相同的移動速度。 Specifically, when the automated mechanical system is in the posture maintenance mode 400, it continuously controls the mechanical device 1 to assume a specified posture, that is, the motors 11 will continue to maintain the same position or the same moving speed, and when the mechanical device 1 suffers When an external force is applied, each motor is controlled to increase or decrease the output torque, so that the mechanical device 1 can maintain a specified posture or maintain the same moving speed.

當自動化機械系統處於動力維持模式401下,是持續控制各馬達11輸出相同的動力(如相同力矩),即未遭受外力時,機械設備1可以維持對應的姿態;遭受足以克服阻力(如摩擦力或輸出動力)的外力時,機械設備1會朝往外力的方向移動來擺出新的姿態。藉此,用戶可調整機械設備1的姿態。 When the automated mechanical system is in the power maintenance mode 401, it continuously controls the motors 11 to output the same power (such as the same torque), that is, when no external force is encountered, the mechanical device 1 can maintain the corresponding posture; suffer enough to overcome the resistance (such as friction) Or output power), the mechanical device 1 will move in the direction of the external force to assume a new posture. In this way, the user can adjust the posture of the mechanical device 1.

更進一步地,本發明的自動化機械系統是被設定來於進入教導狀態40直接切換至姿態維持模式400以等待用戶開始進行姿態教導。當偵測到外力介入時(如用戶意圖移動機械設備1),自動切換至動力維持模式401以使用戶可對機械設備1的姿態進行調整。 Furthermore, the automated mechanical system of the present invention is set to switch directly to the posture maintenance mode 400 after entering the teaching state 40 to wait for the user to start posture teaching. When an external force is detected (for example, the user intends to move the mechanical device 1), it automatically switches to the power maintenance mode 401 so that the user can adjust the posture of the mechanical device 1.

更進一步地,於動力維持模式401下,自動化機械系統可於偵測到用戶停止變換機械設備1的姿態或是用戶手動執行模式切換操作時,切換回姿態維持模式400以維持指定姿態(如調整後的姿態)或指定的移動速度。 Furthermore, in the power maintaining mode 401, the automated mechanical system can switch back to the posture maintaining mode 400 to maintain the specified posture (such as adjusting Posture) or the specified movement speed.

當自動化機械系統處於工作狀態41下(如經由自動偵測或用戶手動操作),自動化機械系統可進入姿態維持模式400,並依據用戶設定的控制指令或排程來控制機械設備1擺出指定姿態,連續擺出不同姿態(如教導狀態下所學習的姿態)或以指定速度變換位置及/或姿態,藉以達成自動化控制(如自動組裝、自動檢測或自動拾取等等)。 When the automated mechanical system is in working state 41 (such as through automatic detection or manual operation by the user), the automated mechanical system can enter the posture maintenance mode 400 and control the mechanical equipment 1 to assume a specified posture according to the control command or schedule set by the user , Continuously assume different postures (such as the posture learned in the teaching state) or change the position and/or posture at a specified speed to achieve automatic control (such as automatic assembly, automatic detection or automatic picking, etc.).

教導狀態40的姿態維持模式400與工作狀態41的姿態維持模式410可為相同或相似的運作方式,但不加以限定。 The posture maintenance mode 400 of the teaching state 40 and the posture maintenance mode 410 of the working state 41 may be the same or similar operation modes, but are not limited.

於一實施例中,自動化機械系統在教導狀態40的姿態維持模式400下移動機械設備1的速度(即姿態變換速度)是小於在工作狀態41的姿態維持模式400下移動機械設備1的速度。 In one embodiment, the speed of the automated mechanical system moving the mechanical device 1 in the posture maintenance mode 400 of the teaching state 40 (ie, the posture transformation speed) is less than the speed of moving the mechanical device 1 in the posture maintenance mode 400 of the working state 41.

具體而言,教導狀態40通常是由用戶協助,當進行姿態變化時,為避免以過快的姿態變換速度誤碰撞用戶或周圍物件所帶來的損害,而刻意降低姿態維持模式400中的姿態變換速度。工作狀態41通常是機械設備1獨立運作,周圍沒有用戶或無關物件時,故姿態維持模式410可採用較快的姿態變換速度進行運作,以提升自動化處理的效率。 Specifically, the teaching state 40 is usually assisted by the user. When performing a posture change, in order to avoid damage caused by accidentally colliding with the user or surrounding objects at an excessively fast posture change speed, the posture in the posture maintenance mode 400 is deliberately reduced. Change speed. The working state 41 is usually when the mechanical device 1 operates independently, and there are no users or irrelevant objects around, the attitude maintaining mode 410 can be operated at a faster attitude change speed to improve the efficiency of automated processing.

於一實施例中,控制器3可包括儲存模組(圖未標示),前述儲存模組可包括非暫態電腦可讀取媒體,並儲存有電腦程式(如機械設備1的控制程式),電腦程式記錄有電腦可讀取的程式碼。控制器3可執行電腦程式來經由馬達驅動器2控制各馬達11來實現本發明各實施例的該方法的各步驟。 In one embodiment, the controller 3 may include a storage module (not shown in the figure), and the aforementioned storage module may include a non-transitory computer-readable medium and store a computer program (such as a control program for the mechanical device 1). The computer program is recorded with a computer readable program code. The controller 3 can execute a computer program to control the motors 11 via the motor driver 2 to implement the steps of the method of the embodiments of the present invention.

請一併參閱圖5,為本發明的第一實施例的教導位置與姿態的觸發與補償方法的流程圖。該方法主要包括以下步驟。 Please also refer to FIG. 5, which is a flowchart of the triggering and compensation method of teaching position and posture according to the first embodiment of the present invention. The method mainly includes the following steps.

步驟S10:控制器3進入姿態維持模式400。 Step S10: the controller 3 enters the posture maintenance mode 400.

步驟S11:於姿態維持模式400下,控制器3每隔一週期(如0.1毫秒、0.5毫秒、1秒或5秒)計算新的姿態維持命令,並執行新的姿態維持命令。 Step S11: In the attitude maintenance mode 400, the controller 3 calculates a new attitude maintenance command every other period (such as 0.1 millisecond, 0.5 millisecond, 1 second, or 5 seconds), and executes the new attitude maintenance command.

於一實施例中,姿態維持命令包括各馬達11的馬達控制命令。控制器3每隔一週期取得當前姿態(可包括當前位置),並比較當前姿態是否與所指定的姿態(第一姿態)的姿態(可包括位置,如移動完成後的位置,可為空間座標系的位置或機器人座標系的位置)相符。若姿態相符,則控制器3可繼續輸出相同參數的姿態維持命令,即使各馬達11維持當前的動力輸出(如發出相同的馬達控制命令);若姿態(或位置)不符,則控制器3可計算當前姿態與指定姿態之間的差異及/或當前位置與指定位置之間的差異,並依據此差異計算新的姿態維持命令(如重新計算各馬達11的移動方向、移動距離及/或輸出力矩做為新的馬達控制命令,而使該機械設備1於各馬達11移動後可擺出指定姿態)及/或移動至指定位置,將新的姿態維持命令發送至馬達驅動器2,以對各馬達11逐一進行控制調整,而使機械設備的當前姿態修正為指定姿態。藉此,機械設備1可適應所施加的外力,而持續維持在指定姿態(第一姿態)。 In an embodiment, the posture maintenance command includes a motor control command of each motor 11. The controller 3 obtains the current posture (which may include the current position) every other cycle, and compares whether the current posture is with the specified posture (the first posture). The position of the system or the position of the robot coordinate system) match. If the postures match, the controller 3 can continue to output posture maintenance commands with the same parameters, even if each motor 11 maintains the current power output (such as issuing the same motor control commands); if the postures (or positions) do not match, the controller 3 can Calculate the difference between the current posture and the specified posture and/or the difference between the current position and the specified position, and calculate a new posture maintenance command based on this difference (such as recalculating the moving direction, moving distance and/or output of each motor 11) The torque is used as a new motor control command, so that the mechanical device 1 can assume a specified posture after each motor 11 moves) and/or move to a specified position, and send the new posture maintenance command to the motor driver 2 to respond to each motor 11 The motors 11 are controlled and adjusted one by one, so that the current posture of the mechanical equipment is corrected to the designated posture. In this way, the mechanical device 1 can adapt to the applied external force and continuously maintain the designated posture (first posture).

換句話說,前述新的姿態維持命令是用以控制各馬達11改變轉動方式(如改變輸出力矩)以抵消機械設備1所受外力。 In other words, the aforementioned new posture maintenance command is used to control each motor 11 to change the rotation mode (such as changing the output torque) to offset the external force received by the mechanical device 1.

步驟S12:控制器3對新的姿態維持命令(如最新一個週期執行的姿態維持命令)與用以擺出第一姿態的參考姿態命令進行比較(如對姿態維持命令所提供的輸出力矩與參考姿態命令所提供的輸出力矩進行比較),以偵測姿態維持命令是否發生變化(如輸出力矩是否改變),即判斷機械設備1是否受到外力(即用戶為了進行姿態教導而對機械設備1施力),而使控制器3為了使機械設備1維持在指定姿態而產生用以抵消外力的新的姿態維持命令。 Step S12: The controller 3 compares the new posture maintenance command (such as the latest posture maintenance command executed in the latest cycle) with the reference posture command used to assume the first posture (such as the output torque provided by the posture maintenance command and the reference The output torque provided by the posture command is compared) to detect whether the posture maintenance command has changed (such as whether the output torque changes), that is, to determine whether the mechanical device 1 is subjected to external force (that is, the user applies force to the mechanical device 1 for posture teaching ), so that the controller 3 generates a new posture maintenance command to offset the external force in order to maintain the mechanical device 1 in the specified posture.

前述參考姿態命令是用以控制各馬達11的轉動方式以使機械設備1於未受外力下擺出指定的姿態(如第一姿態)。 The aforementioned reference posture command is used to control the rotation mode of each motor 11 so that the mechanical device 1 assumes a specified posture (such as the first posture) without external force.

步驟S13:控制器3判斷新的姿態維持命令與參考姿態命令之間是否具有差異(如新的姿態維持命令所提供的輸出力矩與參考姿態命令所提供的輸出力矩之間具有差異)。 Step S13: The controller 3 judges whether there is a difference between the new posture maintaining command and the reference posture command (for example, there is a difference between the output torque provided by the new posture maintaining command and the output torque provided by the reference posture command).

若控制器3判斷新的姿態維持命令與參考姿態命令之間具有差異,則可決定外力的方向,並執行步驟S14。若控制器3判斷新的姿態維持命令與參考姿態命令之間沒有差異,則表示機械設備1未受到外力,並跳至步驟S11執行。 If the controller 3 determines that there is a difference between the new posture maintaining command and the reference posture command, it can determine the direction of the external force and execute step S14. If the controller 3 determines that there is no difference between the new posture maintenance command and the reference posture command, it means that the mechanical device 1 is not subjected to external force, and skips to step S11 for execution.

於一實施例中,各姿態維持命令是分別用以提供一組輸出力矩。控制器3是於新的姿態維持命令所對應的新的輸出力矩與參考姿態命令的輸出力矩之間的力矩差異符合預設的力矩臨界值時,判定新的姿態維持命令與參考姿態命令之間具有差異,並依據力矩變化決定外力的方向。 In one embodiment, each posture maintaining command is used to provide a set of output torques. The controller 3 judges the difference between the new output torque corresponding to the new attitude maintenance command and the output torque of the reference attitude command when the torque difference between the new attitude maintenance command and the reference attitude command meets the preset torque threshold. There are differences, and the direction of the external force is determined according to the torque change.

藉此,本發明可經由姿態命令的變化有效偵測用戶是否意圖進行姿態教導,且不需額外設置感測裝置。 In this way, the present invention can effectively detect whether the user intends to perform gesture teaching through the change of the gesture command, and no additional sensing device is required.

步驟S14:於判定用戶意圖進行姿態教導時,控制器3切換至動力維持模式。 Step S14: When it is determined that the user intends to perform posture teaching, the controller 3 switches to the power maintenance mode.

步驟S15:控制器3決定機械設備1的各馬達的當前動力,如當前的力矩、轉速及/或轉動方向。 Step S15: The controller 3 determines the current power of each motor of the mechanical device 1, such as the current torque, rotation speed and/or rotation direction.

步驟S16:控制器3依據外力的方向決定補償力。於一實施例中,補償力的方向是與外力相同,即補償力是用來抵銷移動機械設備1的阻力,但不以此為限。 Step S16: The controller 3 determines the compensation force according to the direction of the external force. In one embodiment, the direction of the compensation force is the same as the external force, that is, the compensation force is used to offset the resistance of the mobile mechanical device 1, but it is not limited to this.

步驟S17:控制器3依據補償力及各馬達的當前動力計算一組動力維持命令,並經由馬達驅動器2執行所計算的動力維持命令。前述動力維持命令 包括各馬達11的馬達控制命令,當各馬達11依據對應的馬達控制命令運作時,可減輕朝外力的方向調整機械設備為另一姿態(第二姿態,即用戶所期望的姿態)的阻力。 Step S17: The controller 3 calculates a group of power maintenance commands according to the compensation force and the current power of each motor, and executes the calculated power maintenance commands via the motor driver 2. The aforementioned power maintenance order Including the motor control commands of each motor 11, when each motor 11 operates according to the corresponding motor control command, the resistance to adjust the mechanical device to another posture (the second posture, that is, the posture desired by the user) in the direction of the external force can be reduced.

舉例來說,補償力的大小可等於(或接近)機械設備1的摩擦力(如最大靜摩擦力或動摩擦力)的大小,但方向相反(即與外力相同方向)。由於補償了摩擦力,用戶僅需所施加少量外力(如小於摩擦力的外力),即可朝期望方向推動機械設備1。 For example, the magnitude of the compensation force may be equal to (or close to) the magnitude of the friction force (such as the maximum static friction force or the dynamic friction force) of the mechanical device 1, but the direction is opposite (that is, the same direction as the external force). Since the frictional force is compensated, the user only needs to apply a small amount of external force (for example, an external force smaller than the frictional force) to push the mechanical device 1 in a desired direction.

於另一例子中,補償力的大小是略大於機械設備1的摩擦力的大小,並與外力相同方向,而使得機械設備1於未施下外力的情況下會緩慢朝先前施加的外力方向移動。藉此,用戶可更為輕鬆地使機械設備1朝期望方向移動。值得一提的是,於此狀況下,當機械設備1移動至用戶期望的位置時(即擺出用戶期望的姿態),用戶僅需稍微施加阻力,即可使機械設備1停止移動,而維持用戶期望的姿態。 In another example, the magnitude of the compensation force is slightly larger than the magnitude of the frictional force of the mechanical device 1 and is in the same direction as the external force, so that the mechanical device 1 will slowly move in the direction of the previously applied external force when no external force is applied. . In this way, the user can more easily move the mechanical device 1 in a desired direction. It is worth mentioning that, in this situation, when the mechanical device 1 moves to the position desired by the user (ie assumes the posture desired by the user), the user only needs to apply a little resistance to stop the mechanical device 1 from moving and maintain The user's desired posture.

步驟S18:機械設備1接受用戶的姿態教導操作,而擺出用戶期望的姿態,接著,控制器3對最後的姿態(第二姿態)進行記錄,(如記錄各馬達11的位置)。 Step S18: The mechanical device 1 accepts the user's posture instruction operation, and assumes the posture desired by the user. Then, the controller 3 records the final posture (second posture), (for example, records the position of each motor 11).

本發明可供用戶以便捷方式來觸發姿態教導,並以省力方式來對機械設備的姿態進行教導,且不需額外設置感測器。 The present invention allows users to trigger posture teaching in a convenient manner, and teach the posture of mechanical equipment in a labor-saving manner, and no additional sensors are required.

續請一併參閱圖4A至圖4C,圖4A為本發明一實施態樣的姿態教導的第一示意圖,圖4B為本發明一實施態樣的姿態教導的第二示意圖,圖4C為本發明一實施態樣的姿態教導的第三示意圖。圖4A至圖4C用以示例性說明本發明如何觸發姿態教導,以及如何於姿態教導過程中進行力補償。 Please refer to FIGS. 4A to 4C together. FIG. 4A is the first schematic diagram of the posture teaching of an embodiment of the present invention, FIG. 4B is the second schematic diagram of the posture teaching of an embodiment of the present invention, and FIG. 4C is the present invention A third schematic diagram of posture teaching in an implementation aspect. 4A to 4C are used to illustrate how the present invention triggers the posture teaching and how to perform force compensation during the posture teaching process.

如圖4A所示,自動化機械系統於進入教導狀態40後切換至姿態維持模式400,並維持第一姿態(如執行第一姿態的姿態參考命令)且為靜止狀態。 當用戶欲執行姿態教導時,可直接對機械設備1的傳動機構12施加外力F1以改變機械設備1的第一姿態。於接受外力後,控制器3會依據外力F1計算新的姿態維持命令,並經由馬達驅動器2控制多個馬達11實現新的姿態維持命令(即增加了力矩M1來抵消外力F1),以維持第一姿態。 As shown in FIG. 4A, the automated mechanical system switches to the posture maintenance mode 400 after entering the teaching state 40, and maintains the first posture (such as executing the posture reference command of the first posture) and is in a static state. When the user wants to perform posture teaching, the external force F1 can be directly applied to the transmission mechanism 12 of the mechanical device 1 to change the first posture of the mechanical device 1. After receiving the external force, the controller 3 calculates a new attitude maintaining command based on the external force F1, and controls multiple motors 11 through the motor driver 2 to implement the new attitude maintaining command (that is, the torque M1 is added to offset the external force F1) to maintain the first One gesture.

接著,如圖4B所示,當控制器3偵測到第一姿態的姿態參考命令與新的姿態維持命令具有差異(即增加了力矩M1)時,判定用戶有姿態教導的意圖,切換至動力維持模式401,並根據力矩M1計算出外力F1的方向。 Then, as shown in FIG. 4B, when the controller 3 detects that the attitude reference command of the first attitude is different from the new attitude maintenance command (that is, the moment M1 is added), it determines that the user has the intention of attitude teaching and switches to power The mode 401 is maintained, and the direction of the external force F1 is calculated based on the moment M1.

於動力維持模式401下,控制器3依據外力F1的方向決定補償力矩M2(如設定為最大靜摩擦力)並產生對應的動力維持命令。於經由馬達驅動器2執行動力維持命令後,由於馬達11會朝外力F1的方向提供補償力矩M2,用戶可省力地移動傳動機構12來使機械設備1擺出期望的第二姿態(如圖4C所示)。 In the power maintenance mode 401, the controller 3 determines the compensation torque M2 (for example, the maximum static friction force) according to the direction of the external force F1 and generates a corresponding power maintenance command. After the power maintenance command is executed through the motor driver 2, since the motor 11 will provide the compensation torque M2 in the direction of the external force F1, the user can move the transmission mechanism 12 with less effort to make the mechanical device 1 assume the desired second posture (as shown in FIG. 4C). Show).

藉此,本發明可供用戶便捷地觸發姿態教導,且省力地進行姿態教導。 In this way, the present invention allows the user to trigger the posture teaching conveniently and perform posture teaching with less effort.

續請一併參閱圖5及圖6,圖6為本發明的第二實施例的教導位置與姿態的觸發與補償方法的部分流程圖。於本實施例中,各姿態是以機械設備11擺出此姿態時各馬達11的當時位置來做成記錄,即前述當前姿態包括各馬達11的當前位置,前述第一姿態包括各馬達11的第一位置,前述第二姿態包括各馬達11的第2位置。 Please refer to FIG. 5 and FIG. 6 together. FIG. 6 is a partial flowchart of the triggering and compensation method of teaching position and posture according to the second embodiment of the present invention. In this embodiment, each posture is recorded based on the current position of each motor 11 when the mechanical device 11 assumes this posture, that is, the aforementioned current posture includes the current position of each motor 11, and the aforementioned first posture includes the current position of each motor 11 The first position and the aforementioned second posture include the second position of each motor 11.

相較於圖5所示的該方法,本實施例的該方法的步驟S11更包括以下步驟。 Compared with the method shown in FIG. 5, step S11 of the method of this embodiment further includes the following steps.

步驟S20:於姿態維持模式400下,控制器3每隔一週期取得機械設備的當前姿態。 Step S20: In the posture maintaining mode 400, the controller 3 obtains the current posture of the mechanical device every other period.

步驟S21:控制器3依據當前姿態與第一姿態之間的差異計算新的姿態維持命令。 Step S21: The controller 3 calculates a new posture maintenance command according to the difference between the current posture and the first posture.

於一實施例中,控制器3可計算各馬達11的當前位置與第一位置之間的差異,並依據所算出的位置差異產生可使各馬達11從當前位置移回至第一位置的各馬達控制命令,以做為新的姿態維持命令。 In one embodiment, the controller 3 can calculate the difference between the current position of each motor 11 and the first position, and generate each motor 11 to move back from the current position to the first position based on the calculated position difference. The motor control command is used as a new posture maintenance command.

步驟S22:控制器3依據新的姿態維持命令的各馬達控制命令經由馬達驅動器2控制各馬達11轉動以使機械設備成為第一姿態。 Step S22: The controller 3 controls the rotation of each motor 11 via the motor driver 2 according to each motor control command of the new posture maintaining command so that the mechanical device becomes the first posture.

於一實施例中,前述各馬達控制命令包括轉動速度命令與轉動方向命令。 In one embodiment, each of the aforementioned motor control commands includes a rotation speed command and a rotation direction command.

藉此,經由不斷重複步驟S20-S22,本發明可是機械設備1於姿態維持模式下適應外力來維持指定的第一姿態。並且,因適應外力所改變的姿態維持命令的輸出可用來偵測是否用戶意圖(即偵測用戶是否開始姿態教導)。 Thereby, by repeating steps S20-S22 continuously, the present invention can adapt the external force to maintain the designated first posture by the mechanical device 1 in the posture maintaining mode. In addition, the output of the posture maintenance command changed by adapting to the external force can be used to detect whether the user intends (that is, to detect whether the user starts posture teaching).

續請一併參閱圖5及圖7,圖7為本發明的第三實施例的教導位置與姿態的觸發與補償方法的部分流程圖。相較於圖5的該方法,本實施例的該方法的步驟S16包括以下步驟。 Please refer to FIG. 5 and FIG. 7 together. FIG. 7 is a partial flowchart of the triggering and compensation method of teaching position and posture according to the third embodiment of the present invention. Compared with the method of FIG. 5, step S16 of the method of this embodiment includes the following steps.

步驟S30:控制器3計算摩擦力補償力,前述摩擦力補償力是用來抵消或減輕機械設備1朝外力的方向進行教導移動所生的摩擦力。 Step S30: The controller 3 calculates the friction force compensation force. The aforementioned friction force compensation force is used to offset or reduce the friction force generated by the mechanical device 1 teaching movement in the direction of the external force.

於一實施例中,若機械設備1為移動中狀態,摩擦力補償力的量值可接近或等於動摩擦力的量值,但方向相反;若機械設備1為靜止狀態,摩擦力補償力的量值可接近或等於最大靜摩擦力的量值,但方向相反。 In one embodiment, if the mechanical equipment 1 is in a moving state, the magnitude of the friction force compensation force can be close to or equal to the magnitude of the dynamic friction force, but in the opposite direction; if the mechanical equipment 1 is stationary, the magnitude of the friction force compensation force The value can be close to or equal to the magnitude of the maximum static friction, but in the opposite direction.

步驟S31:控制器3依據各馬達的當前動力計算重力補償力,前述重力補償力是用來抵消或減輕機械設備的重力。 Step S31: The controller 3 calculates the gravity compensation force according to the current power of each motor, and the aforementioned gravity compensation force is used to offset or reduce the gravity of the mechanical equipment.

具體而言,由於傳動機構12具有重量,於姿態教導過程中會因重力而垮掉或改變姿態,而導致用戶必須克服傳動機構12的重力才能移動機械設備1。故本發明針對機械設備1的重力進行補償,可進一步節省用戶進行姿態教導所需力量大小。 Specifically, since the transmission mechanism 12 has a weight, it will collapse or change the posture due to gravity during the posture teaching process, and the user must overcome the gravity of the transmission mechanism 12 to move the mechanical device 1. Therefore, the present invention compensates for the gravity of the mechanical device 1, which can further save the user's required force for posture teaching.

步驟S32:控制器3依據前述摩擦力補償力及前述重力補償力決定最終的補償力。 Step S32: The controller 3 determines the final compensation force according to the aforementioned friction compensation force and the aforementioned gravity compensation force.

於一實施例中,前述摩擦力補償力與前述重力補償力為力矩,控制器3計算前述摩擦力補償力與前述重力補償力的合力矩,作為最終的補償力。 In an embodiment, the aforementioned frictional force compensation force and the aforementioned gravity compensation force are moments, and the controller 3 calculates the resultant moment of the aforementioned frictional force compensation force and the aforementioned gravity compensation force as the final compensation force.

續請一併參閱圖3,為本發明一實施態樣的計算補償力的示意圖。圖3用以示例性說明本發明如何計算補償力。 Please also refer to FIG. 3, which is a schematic diagram of calculating the compensation force according to an embodiment of the present invention. Figure 3 is used to illustrate how the invention calculates the compensation force.

如圖所示,馬達驅動器2於每個通訊週期取得所受外力的力矩F1,回饋力矩F1至機構重力補償模組31及摩擦力補償模組32。 As shown in the figure, the motor driver 2 obtains the torque F1 of the external force received in each communication cycle, and feeds the torque F1 back to the mechanism gravity compensation module 31 and the friction compensation module 32.

具體而言,控制器3可由各馬達11的位置資訊P1、轉向資訊D1及/或轉速資訊V1來計算力矩F1,將位置資訊P1回饋至機構重力補償模組31,並將轉向資訊D1與轉速資訊V1回饋至摩擦力矩補償模組32。 Specifically, the controller 3 can calculate the torque F1 from the position information P1, the steering information D1, and/or the rotational speed information V1 of each motor 11, feed back the position information P1 to the mechanism gravity compensation module 31, and combine the steering information D1 with the rotational speed The information V1 is fed back to the friction torque compensation module 32.

機構重力補償模組31依據每個通訊週期的位置資訊P1可計算各馬達11為負擔機械設備1於當前姿態下的重力所需的重力補償力矩F3。摩擦力矩補償模組32可在每個通訊週期依據轉向資訊D1及轉速資訊V1計算各馬達11為消除上述摩擦力所需的摩擦力補償力矩F2。 The mechanism gravity compensation module 31 can calculate the gravity compensation torque F3 required by each motor 11 to bear the gravity of the mechanical device 1 in the current posture according to the position information P1 of each communication cycle. The friction torque compensation module 32 can calculate the friction compensation torque F2 required by each motor 11 to eliminate the aforementioned friction force according to the steering information D1 and the rotational speed information V1 in each communication cycle.

並且,為了避免摩擦力補償力矩F2過大而使機械設備1移動過快,摩擦力補償力矩F2會被回饋至安全模組33以進行調整並產生調整後的摩擦力補償力矩F2’。 In addition, in order to avoid excessive friction force compensation torque F2 causing the mechanical device 1 to move too fast, the friction force compensation torque F2 will be fed back to the safety module 33 for adjustment and generate adjusted friction force compensation torque F2'.

接著,控制器3綜合重力補償力矩F1及摩擦力補償力矩F2’,計算並輸出最終的控制力矩C1至馬達驅動器2,並且馬達驅動器2依據控制力矩C1對各馬達11進行控制。由於控制力矩C1中包含了重力補償力矩F3,因此當各馬達11依據控制力矩C1轉動時,可提供足夠的支撐力而令機械設備1在該馬達驅動器2的動力維持模式下維持穩定,不會因為支撐力不足而垮掉。再者,控制力矩C1中同時包含了調整後的摩擦力補償力矩F2’,當使用者直接施力於機械設備1 上且各馬達11依據控制力矩C1轉動時,各馬達11可藉由調整後的摩擦力補償力矩F2’消除產生的摩擦力,而使得使用者可輕易地且安全地推動、拉動各傳動機構12,進而以人力直接進行位置教導。 Then, the controller 3 integrates the gravity compensation torque F1 and the friction compensation torque F2', calculates and outputs the final control torque C1 to the motor driver 2, and the motor driver 2 controls each motor 11 according to the control torque C1. Since the control torque C1 includes the gravity compensation torque F3, when each motor 11 rotates according to the control torque C1, sufficient supporting force can be provided to keep the mechanical device 1 stable in the power maintenance mode of the motor driver 2 without It collapsed because of insufficient support. Furthermore, the control torque C1 also includes the adjusted friction compensation torque F2’. When the user directly applies force to the mechanical device 1 When each motor 11 rotates according to the control torque C1, each motor 11 can eliminate the friction force generated by the adjusted friction force compensation torque F2', so that the user can easily and safely push and pull each transmission mechanism 12 , And then use manpower to directly teach the position.

續請一併參閱圖5、圖7及圖8,圖8為本發明的第四實施例的教導位置與姿態的觸發與補償方法的部分流程圖。相較於圖5及圖7所示的該方法,圖8的實施例示對如何計算摩擦力補償力(即步驟S30)做更詳細的說明。本實施例的該方法是經由以下步驟來計算摩擦力補償力。 Please refer to FIG. 5, FIG. 7 and FIG. 8 together. FIG. 8 is a partial flowchart of the triggering and compensation method of teaching position and posture according to the fourth embodiment of the present invention. Compared with the method shown in FIG. 5 and FIG. 7, the embodiment of FIG. 8 illustrates how to calculate the friction force compensation force (ie, step S30) in more detail. The method of this embodiment uses the following steps to calculate the friction force compensation force.

步驟S400:控制器3判斷是否各馬達11受到外力而欲轉動。 Step S400: The controller 3 determines whether each motor 11 is about to rotate due to an external force.

若在姿態維持模式下任一馬達11未接受外力(例如此馬達11的輸出力矩未發生變化),則控制器3執行步驟S401:判定用戶沒有直接施力於傳動機構12上(即未開始進行姿態教導)或者雖施加外力,但外力沒有作用於馬達11,故此馬達11不需進行摩擦力補償,並設定馬達的摩擦力補償力為零。 If any motor 11 does not receive external force in the posture maintenance mode (for example, the output torque of the motor 11 has not changed), the controller 3 executes step S401: it is determined that the user has not directly applied force to the transmission mechanism 12 (that is, has not started to perform Posture teaching) or although the external force is applied, but the external force does not act on the motor 11, the motor 11 does not need to perform friction compensation, and the friction compensation force of the motor is set to zero.

若任一馬達11接受外力,控制器3切換至動力維持模式,並執行步驟S402:判斷各傳動機構12的移動速度是否零(即傳動機構12已克服最大靜摩擦力而開始移動)。 If any motor 11 receives an external force, the controller 3 switches to the power maintenance mode and executes step S402: determining whether the moving speed of each transmission mechanism 12 is zero (that is, the transmission mechanism 12 has overcome the maximum static friction force and starts to move).

若任一傳動機構12的移動速度為零,則控制器3判定馬達11未轉動,或是雖轉動,但提供動力未超過傳動機構12的最大靜摩擦力,而使傳動機構12維持靜止,並執行步驟S403:設定用以移動此傳動機構12的馬達的摩擦力補償力為起始摩擦力(如接近或等於最大靜摩擦力)。 If the moving speed of any transmission mechanism 12 is zero, the controller 3 determines that the motor 11 is not rotating, or although it is rotating, but the power provided does not exceed the maximum static friction force of the transmission mechanism 12, so that the transmission mechanism 12 remains stationary and executes Step S403: Set the friction compensation force of the motor used to move the transmission mechanism 12 as the initial friction force (for example, close to or equal to the maximum static friction force).

若任一傳動機構12的移動速度大於零,則控制器3判定馬達11所提供動力曾經超過傳動機構12的最大靜摩擦力,而使傳動機構12開始移動,並執行步驟S404:設定用以移動此傳動機構12的馬達的摩擦力補償力為動摩擦力。前述動摩擦力小於前述起始摩擦力 If the moving speed of any transmission mechanism 12 is greater than zero, the controller 3 determines that the power provided by the motor 11 has exceeded the maximum static friction force of the transmission mechanism 12, so that the transmission mechanism 12 starts to move, and executes step S404: setting to move this The friction compensation force of the motor of the transmission mechanism 12 is dynamic friction. The aforementioned dynamic friction is less than the aforementioned initial friction

於一實施例中,控制器3可依據各馬達11的當前轉動速度所對應的動摩擦係數與微動摩擦力計算前述動摩擦力。以力矩為例,可如下述式(一)計算:動摩擦力矩=微動摩擦力矩+動摩擦係數*目前轉動速度………式(一)。 In one embodiment, the controller 3 can calculate the aforementioned dynamic friction force according to the dynamic friction coefficient and the fretting friction force corresponding to the current rotation speed of each motor 11. Taking the torque as an example, it can be calculated as the following formula (1): dynamic friction torque = fretting friction torque + dynamic friction coefficient * current rotation speed... formula (1).

接著,控制器3執行步驟S405:判斷是否任一傳動機構12的移動速度大於安全速度。 Next, the controller 3 executes step S405: judging whether the moving speed of any transmission mechanism 12 is greater than the safe speed.

若傳動機構12的移動速度不大於安全速度,則控制器3不須執行安全功能,即執行步驟S406:直接輸出所計算的摩擦力補償力。 If the moving speed of the transmission mechanism 12 is not greater than the safe speed, the controller 3 does not need to perform the safety function, that is, execute step S406: directly output the calculated friction compensation force.

若任一傳動機構12的移動速度大於安全速度,則控制器3執行安全功能,即步驟S407:控制器3調降摩擦力補償力,以降低傳動機構12的移動速度。 If the moving speed of any transmission mechanism 12 is greater than the safe speed, the controller 3 executes the safety function, that is, step S407: the controller 3 reduces the friction compensation force to reduce the moving speed of the transmission mechanism 12.

藉此,本發明可依據機械設備1的當前移動狀態來調整摩擦力補償力,而提升用戶進行姿態教導時的用戶體驗。 In this way, the present invention can adjust the friction compensation force according to the current movement state of the mechanical device 1 so as to improve the user experience when the user performs posture teaching.

續請一併參閱圖9及圖10,圖9為本發明的第五實施例的教導位置與姿態的觸發與補償方法的第一部分流程圖,圖10為本發明的第五實施例的教導位置與姿態的觸發與補償方法的第二部分流程圖。本實施例的該方法包括以下步驟。 Please refer to FIGS. 9 and 10 together. FIG. 9 is a flowchart of the first part of the triggering and compensation method of teaching position and posture according to the fifth embodiment of the present invention, and FIG. 10 is the teaching position of the fifth embodiment of the present invention. The second part of the flow chart of the trigger and compensation method with attitude. The method of this embodiment includes the following steps.

步驟S500:自動化機械系統接受操作(如經由人機介面接受進入教導狀態操作),並受控制器3控制來切換至教導狀態40。 Step S500: the automated mechanical system accepts an operation (for example, accepts an operation to enter the teaching state via a human-machine interface), and is controlled by the controller 3 to switch to the teaching state 40.

接著,控制器3執行步驟S501-S508以於姿態維持模式下偵測用戶是否開始執行姿態教導,並於偵測到用戶的開始意圖時自動切換至動力維持模 式來提供補償力並接受姿態教導。圖9的步驟S501-S508是與圖5的步驟S10-S17相同或相似,其執行細節不再重複敘述。 Then, the controller 3 executes steps S501-S508 to detect whether the user starts to perform the posture teaching in the posture maintenance mode, and automatically switches to the power maintenance mode when the user’s starting intention is detected. Formula to provide compensation and accept posture teaching. Steps S501-S508 in FIG. 9 are the same as or similar to steps S10-S17 in FIG. 5, and the details of their execution will not be repeated.

接著,控制器3執行步驟S509:於動力維持模式下偵測到機械設備1是否停止變換位置與姿態,如經由各馬達11的當前位置是否繼續發生變化來偵測用戶是否完成位置與姿態教導。 Then, the controller 3 executes step S509: in the power maintenance mode, it is detected whether the mechanical device 1 stops changing position and posture, for example, whether the current position of each motor 11 continues to change to detect whether the user has completed the position and posture teaching.

若機械設備1未停止變換位置與姿態,則控制器3再次執行步驟S509以持續偵測。 If the mechanical device 1 does not stop changing the position and posture, the controller 3 executes step S509 again to continue the detection.

若機械設備1停止變換位置與姿態,則控制器3執行步驟S510:記錄當前姿態(第二姿態),如記錄各馬達11的當前位置,並作為第二姿態的位置。 If the mechanical device 1 stops changing the position and the posture, the controller 3 executes step S510: recording the current posture (second posture), such as recording the current position of each motor 11 as the position of the second posture.

接著,控制器3執行步驟S511:控制器3判斷是否離開教導狀態40,如用戶操作人機介面來控制自動化機械系統離開教導狀態40,或是自動化機械系統於完成姿態教導後自動離開教導狀態40。 Then, the controller 3 executes step S511: the controller 3 determines whether to leave the teaching state 40, such as the user operating the human-machine interface to control the automated mechanical system to leave the teaching state 40, or the automated mechanical system automatically leaves the teaching state 40 after completing the posture teaching .

若未離開教導狀態40,則控制器3控制自動化機械系統套至步驟S501,即切換回姿態維持模式400以對新的教導意圖進行偵測。 If it does not leave the teaching state 40, the controller 3 controls the automated mechanical system to go to step S501, which is to switch back to the posture maintenance mode 400 to detect the new teaching intention.

若離開教導狀態40,則控制器3執行步驟S512:控制自動化機械系統切換至工作狀態,並進入姿態維持模式410。 If leaving the teaching state 40, the controller 3 executes step S512: controlling the automated mechanical system to switch to the working state, and enter the posture maintenance mode 410.

於一實施例中,用戶可操作人機介面來控制自動化機械系統進入工作狀態41,或是自動化機械系統於完成姿態教導後自動進入工作狀態41。 In one embodiment, the user can operate the human-machine interface to control the automated mechanical system to enter the working state 41, or the automated mechanical system automatically enters the working state 41 after completing the posture teaching.

接著,控制器3執行步驟S513:控制器3判斷是否收到任一工作控制命令。 Next, the controller 3 executes step S513: the controller 3 determines whether any work control command is received.

於一實施例中,前述工作控制命令可包括各馬達11的馬達控制命令(如位置命令、轉向命令及/或轉速命令)。 In an embodiment, the aforementioned work control command may include a motor control command of each motor 11 (such as a position command, a steering command and/or a rotation speed command).

接著,控制器3執行步驟S514:執行工作控制命令以控制各馬達11轉動至工作控制命令所指定的位置,並擺出工作控制命令所對應的姿態。 Then, the controller 3 executes step S514: execute the work control command to control each motor 11 to rotate to the position specified by the work control command, and assume the posture corresponding to the work control command.

於一實施例中,工作控制命令的其中之一可以是要求機械設備1擺出第二姿態(即透過前述姿態教導所學習的姿態)的命令,而於步驟S514中控制器3是控制各馬達11轉動至於教導狀態40所記錄的第二姿態的位置。 In an embodiment, one of the work control commands may be a command that requires the mechanical device 1 to assume the second posture (that is, the posture learned through the aforementioned posture teaching). In step S514, the controller 3 controls the motors. 11 Rotate to the position of the second posture recorded in the teaching state 40.

步驟S515:控制器3判斷是否結束工作,如用戶可操作人機介面來控制自動化機械系統離開工作狀態41,或是自動化機械系統於完成工作後自動離開工作狀態41。 Step S515: The controller 3 determines whether to end the work. For example, the user can operate the human-machine interface to control the automated mechanical system to leave the working state 41, or the automated mechanical system automatically leaves the working state 41 after completing the work.

若判定結束工作,則控制器3結束該方法的執行。若判定未結束工作,則控制器3再次執行步驟S513。 If it is determined to end the work, the controller 3 ends the execution of the method. If it is determined that the work is not finished, the controller 3 executes step S513 again.

藉此,本發明可將教導狀態40下所學習的姿態用於工作狀態41。 In this way, the present invention can use the posture learned in the teaching state 40 for the working state 41.

以上所述僅為本發明之較佳具體實例,非因此即侷限本發明之專利範圍,故舉凡運用本發明內容所為之等效變化,均同理皆包含於本發明之範圍內,合予陳明。 The above are only preferred specific examples of the present invention, and are not limited to the scope of the patent of the present invention. Therefore, all equivalent changes made by using the content of the present invention are included in the scope of the present invention in the same way. bright.

S10-S18:第一觸發與補償步驟 S10-S18: The first trigger and compensation step

Claims (9)

一種教導位置與姿態的觸發與補償方法,用於包含一控制器、一馬達驅動器及一機械設備的一自動化機械系統,該機械設備包括用以變換位置與姿態的多個馬達,該教導位置與姿態的觸發與補償方法包括以下步驟:a)於一姿態維持模式下,該控制器每隔一週期計算並執行新的姿態維持命令以使該機械設備維持在一第一姿態,其中該姿態維持命令包括各該馬達的一馬達控制命令,其中該多個姿態維持命令是分別用以提供多個輸出力矩;b)計算新的該姿態維持命令所提供的該輸出力矩及該第一姿態所對應的一參考姿態命令所提供的該輸出力矩之間的一力矩差異,於該力矩差異大於一力矩臨界值時,判定該機械設備接受一外力,依據該力矩差異決定該外力的方向並切換至一動力維持模式;c)於該動力維持模式下,決定該機械設備的各該馬達的當前動力;d)依據該外力的方向決定一補償力;及e)依據該補償力及各該馬達的該當前動力計算一動力維持命令並經由該馬達驅動器執行該動力維持命令以減輕朝該外力方向調整該機械設備為一第二姿態的阻力,其中該動力維持命令包括各該馬達的該馬達控制命令。 A method for triggering and compensating teaching position and posture is used in an automated mechanical system including a controller, a motor driver, and a mechanical device. The mechanical device includes a plurality of motors for changing positions and postures. The teaching position and The posture triggering and compensation method includes the following steps: a) In a posture maintenance mode, the controller calculates and executes a new posture maintenance command every other period to maintain the mechanical device in a first posture, wherein the posture maintains The command includes a motor control command for each of the motors, wherein the plurality of attitude maintenance commands are respectively used to provide a plurality of output torques; b) calculating the output torque provided by the new attitude maintenance command and the corresponding first attitude A torque difference between the output torque provided by a reference attitude command. When the torque difference is greater than a torque critical value, it is determined that the mechanical device receives an external force, and the direction of the external force is determined according to the torque difference and switched to a Power maintenance mode; c) In the power maintenance mode, determine the current power of each motor of the mechanical equipment; d) Determine a compensation force according to the direction of the external force; and e) According to the compensation force and the motor’s The current power calculates a power maintenance command and executes the power maintenance command via the motor driver to reduce the resistance of adjusting the mechanical device to a second posture in the direction of the external force, wherein the power maintenance command includes the motor control command of each motor. 如請求項1所述的教導位置與姿態的觸發與補償方法,其中該步驟a)包括以下步驟:a1)於該姿態維持模式下,該控制器每隔該週期取得該機械設備的一當前姿態;a2)依據該當前姿態與該第一姿態之間的一差異計算新的該姿態維持命令;及 a3)依據新的該姿態維持命令的各該馬達控制命令控制各該馬達轉動以使該機械設備為該第一姿態,其中各該馬達控制命令包括一轉動速度命令與一轉動方向命令。 The method for triggering and compensating the teaching position and posture according to claim 1, wherein the step a) includes the following steps: a1) In the posture maintenance mode, the controller obtains a current posture of the mechanical device every this period A2) Calculate the new posture maintenance command based on a difference between the current posture and the first posture; and a3) Each of the motor control commands of the new posture maintaining command controls the rotation of each motor so that the mechanical device is in the first posture, wherein each of the motor control commands includes a rotation speed command and a rotation direction command. 如請求項2所述的教導位置與姿態的觸發與補償方法,其中該當前姿態包括各該馬達的當前位置,該第一姿態包括各該馬達的一第一位置;該步驟a2)是計算各該馬達的該當前位置與該第一位置之間的該差異,並依據該差異產生使各該馬達從該當前位置移回至該第一位置的各該馬達控制命令,以做為新的該姿態維持命令。 The method for triggering and compensating teaching position and posture according to claim 2, wherein the current posture includes the current position of each motor, and the first posture includes a first position of each motor; the step a2) is to calculate each motor The difference between the current position of the motor and the first position, and each of the motor control commands for moving each of the motors from the current position to the first position is generated according to the difference as the new Posture maintenance command. 如請求項1所述的教導位置與姿態的觸發與補償方法,其中於該姿態維持模式下,新的該姿態維持命令是用以控制各該馬達改變轉動方式以抵消該機械設備所受該外力,該參考姿態命令是用以控制各該馬達轉動方式以使該機械設備於未受外力下擺出該第一姿態。 The method for triggering and compensating the teaching position and posture according to claim 1, wherein in the posture maintaining mode, the new posture maintaining command is used to control the motors to change the rotation mode to offset the external force on the mechanical equipment The reference posture command is used to control the rotation mode of each motor so that the mechanical device assumes the first posture without external force. 如請求項1所述的教導位置與姿態的觸發與補償方法,其中該步驟d)包括一步驟d1)計算為了抵消或減輕該機械設備朝該外力的方向進行教導移動所生的摩擦力所需的一摩擦力補償力。 The method for triggering and compensating the teaching position and posture according to claim 1, wherein the step d) includes a step d1) calculating the friction force required to offset or reduce the mechanical device's teaching movement in the direction of the external force A friction compensation force. 如請求項6所述的教導位置與姿態的觸發與補償方法,其中該多個馬達分別用以帶動多個傳動機構移動以變換該機械設備的姿態,該步驟c)是取得各該傳動機構的一移動速度;該步驟d1)包括以下步驟:d11)於該馬達未受外力時,設定該馬達的該摩擦力補償力為零;d12)於任一該傳動機構的該移動速度為零時,設定對應的該馬達的該摩擦力補償力為一起始摩擦力;d13)於任一該傳動機構的該移動速度大於零時,設定對應的該馬達的該摩擦力補償力為一動摩擦力;及 d14)於任一該傳動機構的該移動速度大於一安全速度時,調降該摩擦力補償力。 The method for triggering and compensating the teaching position and posture according to claim 6, wherein the multiple motors are used to drive multiple transmission mechanisms to move to change the posture of the mechanical equipment, and the step c) is to obtain the information of each transmission mechanism. A moving speed; the step d1) includes the following steps: d11) when the motor is not subjected to external force, setting the friction compensation force of the motor to zero; d12) when the moving speed of any of the transmission mechanisms is zero, Set the friction compensation force of the corresponding motor as an initial friction force; d13) when the moving speed of any of the transmission mechanisms is greater than zero, set the friction compensation force of the corresponding motor as a dynamic friction force; and d14) When the moving speed of any of the transmission mechanisms is greater than a safe speed, reduce the friction compensation force. 如請求項5所述的教導位置與姿態的觸發與補償方法,其中該步驟d)包括以下步驟:d2)依據各該馬達的該當前動力計算為了抵消或減輕該機械設備的重力所需的一重力補償力;及d3)依據該摩擦力補償力及該重力補償力決定最終的該補償力。 The method for triggering and compensating the teaching position and posture according to claim 5, wherein the step d) includes the following steps: d2) calculating a required amount of gravity for offsetting or reducing the gravity of the mechanical device based on the current power of each motor Gravity compensation force; and d3) determine the final compensation force based on the friction compensation force and the gravity compensation force. 如請求項1所述的教導位置與姿態的觸發與補償方法,更包括以下步驟:f)於該動力維持模式下偵測到該機械設備停止變換位置與姿態時,記錄各該馬達的一當前位置,並作為該第二姿態的位置;及g)切換至該姿態維持模式。 The method for triggering and compensating the teaching position and posture as described in claim 1, further includes the following steps: f) When detecting that the mechanical equipment stops changing the position and posture in the power maintenance mode, record a current of each motor The position is used as the position of the second posture; and g) switching to the posture maintenance mode. 如請求項8所述的教導位置與姿態的觸發與補償方法,更包括以下步驟:h)於該自動化機械系統被操作來切換至一教導狀態時,重複執行該步驟a)至該步驟g);及i)於該自動化機械系統被操作來切換至一工作狀態且收到要求該機械設備擺出該第二姿態的一工作控制命令時,控制各該馬達轉動至於該教導狀態所記錄的該第二姿態的位置。 The method for triggering and compensating the teaching position and posture as described in claim 8, further includes the following steps: h) when the automated mechanical system is operated to switch to a teaching state, repeat the steps a) to g) ; And i) when the automated mechanical system is operated to switch to a working state and a working control command that requires the mechanical equipment to assume the second posture is received, control each of the motors to rotate to the recorded state in the teaching state The position of the second posture.
TW109114075A 2020-04-27 2020-04-27 Method of triggering and counteracting for teaching position and posture TWI742635B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW109114075A TWI742635B (en) 2020-04-27 2020-04-27 Method of triggering and counteracting for teaching position and posture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW109114075A TWI742635B (en) 2020-04-27 2020-04-27 Method of triggering and counteracting for teaching position and posture

Publications (2)

Publication Number Publication Date
TWI742635B true TWI742635B (en) 2021-10-11
TW202140223A TW202140223A (en) 2021-11-01

Family

ID=80782449

Family Applications (1)

Application Number Title Priority Date Filing Date
TW109114075A TWI742635B (en) 2020-04-27 2020-04-27 Method of triggering and counteracting for teaching position and posture

Country Status (1)

Country Link
TW (1) TWI742635B (en)

Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1802240A (en) * 2003-06-11 2006-07-12 Abb公司 A method for calibrating and programming of a robot application
CN101031236A (en) * 2003-07-16 2007-09-05 Z-凯特公司 Guidance system and method for surgical procedures with improved feedback
CN101799660A (en) * 2009-02-02 2010-08-11 卡库机器人有限公司 The opertaing device and the method that are used for executor
CN102717381A (en) * 2012-06-06 2012-10-10 北京理工大学 Method and device for compensating body posture angle errors of humanoid robot
CN103403637A (en) * 2011-01-21 2013-11-20 Abb股份公司 System for teaching a robot movement
CN103753533A (en) * 2012-09-10 2014-04-30 发纳科机器人美国公司 Method of controlling a redundant robot arm
CN105101903A (en) * 2013-02-04 2015-11-25 儿童国家医疗中心 Hybrid control surgical robotic system
TW201628806A (en) * 2015-02-04 2016-08-16 Kawasaki Heavy Ind Ltd Automatic robot deviation adjustment device and automatic robot deviation adjustment method
TW201634198A (en) * 2014-11-10 2016-10-01 布魯克斯自動機械公司 Tool auto-teach method and apparatus
CN107205697A (en) * 2015-01-26 2017-09-26 库卡罗伯特有限公司 The training system supported with robot
CN108198219A (en) * 2017-11-21 2018-06-22 合肥工业大学 Error compensation method for camera calibration parameters for photogrammetry
TW201822971A (en) * 2016-12-29 2018-07-01 新代科技股份有限公司 Robotic Arm Teaching System
CN108451643A (en) * 2013-03-15 2018-08-28 史赛克公司 Surgical Manipulator Capable of Controlling a Surgical Instrument in Multiple Modes
WO2018213896A1 (en) * 2017-05-26 2018-11-29 The University Of Melbourne Electromechanical robotic manipulandum device
US10155310B2 (en) * 2013-03-15 2018-12-18 Brain Corporation Adaptive predictor apparatus and methods
CN110248775A (en) * 2017-06-12 2019-09-17 西门子工业软件有限公司 For instructing robot to reach to the method and system to set the goal in robot building
CN110385720A (en) * 2019-07-26 2019-10-29 南京航空航天大学 A kind of robot localization error compensating method based on deep neural network
WO2019239553A1 (en) * 2018-06-14 2019-12-19 三菱電機株式会社 Machine learning device, correction parameter adjustment device and machine learning method

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1802240A (en) * 2003-06-11 2006-07-12 Abb公司 A method for calibrating and programming of a robot application
CN101031236A (en) * 2003-07-16 2007-09-05 Z-凯特公司 Guidance system and method for surgical procedures with improved feedback
CN101799660A (en) * 2009-02-02 2010-08-11 卡库机器人有限公司 The opertaing device and the method that are used for executor
CN103403637A (en) * 2011-01-21 2013-11-20 Abb股份公司 System for teaching a robot movement
CN102717381A (en) * 2012-06-06 2012-10-10 北京理工大学 Method and device for compensating body posture angle errors of humanoid robot
CN103753533A (en) * 2012-09-10 2014-04-30 发纳科机器人美国公司 Method of controlling a redundant robot arm
CN105101903A (en) * 2013-02-04 2015-11-25 儿童国家医疗中心 Hybrid control surgical robotic system
CN108451643A (en) * 2013-03-15 2018-08-28 史赛克公司 Surgical Manipulator Capable of Controlling a Surgical Instrument in Multiple Modes
US10155310B2 (en) * 2013-03-15 2018-12-18 Brain Corporation Adaptive predictor apparatus and methods
TW201634198A (en) * 2014-11-10 2016-10-01 布魯克斯自動機械公司 Tool auto-teach method and apparatus
CN107205697A (en) * 2015-01-26 2017-09-26 库卡罗伯特有限公司 The training system supported with robot
TW201628806A (en) * 2015-02-04 2016-08-16 Kawasaki Heavy Ind Ltd Automatic robot deviation adjustment device and automatic robot deviation adjustment method
TW201822971A (en) * 2016-12-29 2018-07-01 新代科技股份有限公司 Robotic Arm Teaching System
WO2018213896A1 (en) * 2017-05-26 2018-11-29 The University Of Melbourne Electromechanical robotic manipulandum device
CN110248775A (en) * 2017-06-12 2019-09-17 西门子工业软件有限公司 For instructing robot to reach to the method and system to set the goal in robot building
CN108198219A (en) * 2017-11-21 2018-06-22 合肥工业大学 Error compensation method for camera calibration parameters for photogrammetry
WO2019239553A1 (en) * 2018-06-14 2019-12-19 三菱電機株式会社 Machine learning device, correction parameter adjustment device and machine learning method
CN110385720A (en) * 2019-07-26 2019-10-29 南京航空航天大学 A kind of robot localization error compensating method based on deep neural network

Also Published As

Publication number Publication date
TW202140223A (en) 2021-11-01

Similar Documents

Publication Publication Date Title
CN108381529B (en) Human-computer cooperation teaching method for industrial mechanical arm
US9393687B2 (en) Method for programming an industrial robot and industrial robot
JP5768828B2 (en) Robot system and control method of robot system
JP5774223B2 (en) Robot control apparatus and robot control method
KR101661810B1 (en) Method for manually guided displacement of the pose of a manupulator arm of an industrial robot and related industrial robot
US9821459B2 (en) Multi-joint robot having function for repositioning arm
US10618164B2 (en) Robot system having learning control function and learning control method
US20190275678A1 (en) Robot control device, robot, robot system, and robot control method
JP6472214B2 (en) Robot apparatus control method and robot apparatus
JP5910491B2 (en) Robot arm teaching system and robot arm teaching method
JP6055014B2 (en) Robot control device having function of detecting contact with object or person
WO2010088959A1 (en) Method for programming an industrial robot by lead-through
US10252418B2 (en) Load parameter setting method and load parameter setting device
JP2018069410A (en) Robot control device having learning control function
JP2016168650A5 (en)
JP2016168650A (en) Robot device, robot control method, program, and storage medium
TWI742635B (en) Method of triggering and counteracting for teaching position and posture
CN107000209B (en) Method and device for controlling a drive assembly for moving a tool, in particular a robot-guided tool
US20220032448A1 (en) Teaching method and robot system
CN113664815B (en) Triggering and compensating method for teaching position and posture
US11660742B2 (en) Teaching method and robot system
JP2019104091A (en) Robot apparatus and control method for robot apparatus
JP6238110B2 (en) Robot hand control method and control device
CN105983966B (en) Control device and method for robot arm
JP2020104178A (en) Robot device, control method of robot device, manufacturing method for article using robot device, control program and recording medium