[go: up one dir, main page]

CN110365280A - Motor control system and method thereof - Google Patents

Motor control system and method thereof Download PDF

Info

Publication number
CN110365280A
CN110365280A CN201810288167.0A CN201810288167A CN110365280A CN 110365280 A CN110365280 A CN 110365280A CN 201810288167 A CN201810288167 A CN 201810288167A CN 110365280 A CN110365280 A CN 110365280A
Authority
CN
China
Prior art keywords
motion
unit
driving signal
control system
motor control
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201810288167.0A
Other languages
Chinese (zh)
Inventor
林逢杰
林家仁
许世昌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Teco Electric and Machinery Co Ltd
Original Assignee
Teco Electric and Machinery Co Ltd
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 Teco Electric and Machinery Co Ltd filed Critical Teco Electric and Machinery Co Ltd
Priority to CN201810288167.0A priority Critical patent/CN110365280A/en
Publication of CN110365280A publication Critical patent/CN110365280A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P29/00Arrangements for regulating or controlling electric motors, appropriate for both AC and DC motors

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Control Of Position Or Direction (AREA)

Abstract

A kind of motor control system and its method, motor control system is to transmit a driving signal a to driving device, to drive a motor, and includes an input module and a motion controller.Input module, to set multiple motion control parameters, and motion control parameter includes at least a target position and a target run duration.Motion controller, it is electrically connected input module, to receive motion control parameter, the unit motion amount for corresponding to the unit motion time is generated according to an at least operation rule, and the control command of a corresponding unit motion amount is generated according to an at least transformation rule, then generate the driving signal according to the control command.Wherein, the unit motion time is less than target run duration.

Description

马达控制系统及其方法Motor control system and method thereof

技术领域technical field

本发明涉及一种马达控制系统及其方法,尤其涉及一种利用一单位时间的一单位运动量驱动马达的马达控制系统及其方法。The present invention relates to a motor control system and its method, in particular to a motor control system and its method for driving a motor with a unit movement amount of a unit time.

背景技术Background technique

大多数的机械系统需要进行运动轨迹规划,如CNC工具机、机械手臂、钻孔机、雕刻机、绘图机等,上述机具基本上都是多轴运动控制,在控制多轴系统的情况下,多个马达的相互移动、运动路径的产生、移动速度及加减速的规划等都相当重要。因此,因应上述需求,运动控制器自然而然成为系统的核心控制单元。运动控制器主要是接收了使用者传来的运动信息,并将这些信息转换成马达驱动器的输入信号,进而控制马达以及机械系统的运动轨迹。Most mechanical systems require motion trajectory planning, such as CNC machine tools, robotic arms, drilling machines, engraving machines, plotters, etc. The above-mentioned machines are basically multi-axis motion control. In the case of controlling multi-axis systems, The mutual movement of multiple motors, the generation of motion paths, the planning of moving speed and acceleration and deceleration are all very important. Therefore, in response to the above requirements, the motion controller naturally becomes the core control unit of the system. The motion controller mainly receives the motion information from the user, and converts the information into the input signal of the motor driver, and then controls the motion trajectory of the motor and the mechanical system.

一般常见的运动控制器为数字差分分析器(Digital Differential Analyzer;DDA),数字差分分析器是接收一目标位置,并依据一目标时间,运算产生一脉冲驱动信号,用以驱动一马达。A commonly used motion controller is a digital differential analyzer (DDA). The digital differential analyzer receives a target position and calculates and generates a pulse driving signal according to a target time to drive a motor.

然而,现有技术使用数字差分分析器需要较长的运算时间来产生脉冲,而且若在运算时间内有新的目标位置,也需要等待前一次运算时间结束,并再等候一次运算时间依据新的目标位置进行运算,才能产生对应新的目标位置的脉冲驱动信号,容易导致命令切换时,产生的脉冲驱动信号会有所延迟或是误差。However, the prior art uses a digital differential analyzer that requires a long operation time to generate pulses, and if there is a new target position within the operation time, it is also necessary to wait for the end of the previous operation time and wait for another operation time based on the new target position. Only when the target position is calculated can the pulse driving signal corresponding to the new target position be generated, which may easily lead to delay or error in the generated pulse driving signal when the command is switched.

发明内容Contents of the invention

有鉴于在现有技术中,数字差分分析器需要较长的运算时间,容易导致命令切换时,造成脉冲驱动信号会有所延迟或误差。本发明的一主要目的是提供一种马达控制系统与马达控制方法,以解决现有技术所衍生出的问题。In view of the fact that in the prior art, the digital differential analyzer requires a relatively long operation time, it is easy to cause a delay or error in the pulse driving signal when the command is switched. A main purpose of the present invention is to provide a motor control system and a motor control method to solve the problems arising from the prior art.

本发明为解决现有技术的问题,所采用的必要技术手段为提供一种马达控制系统,用以传送一驱动信号至一驱动装置,用以驱动一马达,并包含一输入模块与一运动控制器。In order to solve the problems in the prior art, the necessary technical means adopted by the present invention is to provide a motor control system, which is used to transmit a drive signal to a drive device for driving a motor, and includes an input module and a motion control system device.

输入模块,用以设定多个运动控制参数,且运动控制参数至少包含一目标位置与一目标运动时间。The input module is used for setting a plurality of motion control parameters, and the motion control parameters at least include a target position and a target motion time.

运动控制器,电性连接上述输入模块,用以接收上述运动控制参数,依据至少一运算规则产生对应于一单位运动时间的一单位运动量,并依据至少一转换规则产生一对应单位运动量的控制命令,再依据控制命令产生上述驱动信号。The motion controller is electrically connected to the above-mentioned input module to receive the above-mentioned motion control parameters, generate a unit motion amount corresponding to a unit motion time according to at least one operation rule, and generate a control command corresponding to a unit motion amount according to at least one conversion rule , and then generate the driving signal according to the control command.

其中,上述单位运动时间小于上述目标运动时间。Wherein, the above-mentioned unit exercise time is less than the above-mentioned target exercise time.

在上述必要技术手段的基础上,本发明所衍生的一附属技术手段为使上述单位运动量,小于上述目标位置。On the basis of the above-mentioned necessary technical means, an auxiliary technical means derived from the present invention is to make the above-mentioned unit movement amount smaller than the above-mentioned target position.

在上述必要技术手段的基础上,本发明所衍生的一附属技术手段为使上述至少一运算规则,是一加加速度直线运动公式。On the basis of the above-mentioned necessary technical means, an auxiliary technical means derived from the present invention is to make the above-mentioned at least one calculation rule be a jerk linear motion formula.

在上述必要技术手段的基础上,本发明所衍生的一附属技术手段为使上述至少一转换规则,是一对照表,且对照表显示上述单位运动量与一脉冲边缘变化量的对应关系。On the basis of the above-mentioned necessary technical means, an auxiliary technical means derived from the present invention is to make the above-mentioned at least one conversion rule a comparison table, and the comparison table shows the corresponding relationship between the above-mentioned unit movement amount and a pulse edge change amount.

在上述必要技术手段的基础上,本发明所衍生的一附属技术手段为使上述运动控制器,依据上述单位运动量所对应的该脉冲边缘变化量,产生上述控制命令。On the basis of the above-mentioned necessary technical means, an auxiliary technical means derived from the present invention is to enable the motion controller to generate the above-mentioned control command according to the pulse edge change amount corresponding to the above-mentioned unit motion amount.

在上述必要技术手段的基础上,本发明所衍生的一附属技术手段为使马达控制系统,还包含:一转换模块,且转换模块电性连接上述输入模块与上述运动控制器,用以接收上述运动控制参数,并将上述运动控制参数转换成二进制格式。On the basis of the above-mentioned necessary technical means, an auxiliary technical means derived from the present invention is to make the motor control system further include: a conversion module, and the conversion module is electrically connected to the above-mentioned input module and the above-mentioned motion controller to receive the above-mentioned Motion control parameters, and convert the above motion control parameters into binary format.

在上述必要技术手段的基础上,本发明所衍生的一附属技术手段为使马达控制系统中的运动控制器,还包含:一存储模块,且存储模块用以储存上述运算规则与上述转换规则。On the basis of the above-mentioned necessary technical means, an auxiliary technical means derived from the present invention is that the motion controller in the motor control system further includes: a storage module, and the storage module is used to store the above-mentioned operation rules and the above-mentioned conversion rules.

在上述必要技术手段的基础上,本发明所衍生的一附属技术手段为使马达控制系统中的运动控制器,还包含:一脉冲输出模块,且脉冲输出模块用以依据上述控制命令产生上述驱动信号,且上述驱动信号是一脉冲驱动信号。On the basis of the above-mentioned necessary technical means, an auxiliary technical means derived from the present invention is to make the motion controller in the motor control system further include: a pulse output module, and the pulse output module is used to generate the above-mentioned drive according to the above-mentioned control command signal, and the above-mentioned driving signal is a pulse driving signal.

本发明还提供一种马达控制方法,使用一输入模块与一运动控制器,并包含以下步骤:(a)利用输入模块,设定多个运动控制参数,且运动控制参数至少包含一目标位置与一目标运动时间;(b)利用运动控制器,接收运动控制参数,并依据至少一运算规则,产生对应于一单位运动时间的一单位运动量;(c)利用运动控制器,依据至少一转换规则,产生一对应单位运动量的控制命令;(d)利用运动控制器,依据控制命令产生一驱动信号;以及(e)利用运动控制器,传送驱动信号至一驱动装置,用以驱动一马达。The present invention also provides a motor control method, which uses an input module and a motion controller, and includes the following steps: (a) using the input module to set a plurality of motion control parameters, and the motion control parameters include at least a target position and a motion control parameter. A target exercise time; (b) using the motion controller to receive motion control parameters, and according to at least one operation rule, generate a unit amount of motion corresponding to a unit of exercise time; (c) using the motion controller, according to at least one conversion rule , generating a control command corresponding to the unit movement amount; (d) using the motion controller to generate a driving signal according to the control command; and (e) using the motion controller to transmit the driving signal to a driving device for driving a motor.

在上述必要技术手段的基础上,本发明所衍生的一附属技术手段为使马达控制方法,还包含以下步骤:利用运动控制器判断驱动信号是一无变化量驱动信号,产生一基本速度驱动信号,并传送至驱动装置。On the basis of the above-mentioned necessary technical means, an auxiliary technical means derived from the present invention is a motor control method, which also includes the following steps: using the motion controller to judge that the driving signal is a driving signal with no variation, and generating a basic speed driving signal , and sent to the drive unit.

承上所述,本发明所提供的马达控制系统及其方法,利用运动控制器依据运算规则以及转换规则产生一对应单位运动时间与单位运动量的驱动信号,其中单位运动时间小于目标运动时间。因此,可以缩短所需的运算时间,若接收到新的目标位置,运动控制器可即时的进行新的目标位置的运算、转换并产生新的驱动信号,用以解决现有技术中,切换新的目标位置可能造成驱动信号的延迟或误差。Based on the above, the motor control system and method provided by the present invention use the motion controller to generate a driving signal corresponding to the unit motion time and the unit motion amount according to the operation rules and conversion rules, wherein the unit motion time is less than the target motion time. Therefore, the required calculation time can be shortened. If a new target position is received, the motion controller can immediately calculate, convert and generate a new drive signal to solve the problem of switching between new targets in the prior art. The target position may cause a delay or error in the drive signal.

附图说明Description of drawings

图1是本发明一实施例所提供的马达控制系统及其方法的系统方块图;FIG. 1 is a system block diagram of a motor control system and method thereof provided by an embodiment of the present invention;

图2是本发明一实施例所提供的马达控制系统及其方法的位置-时间图;FIG. 2 is a position-time diagram of a motor control system and method thereof provided by an embodiment of the present invention;

图3是本发明一实施例所提供的马达控制系统及其方法的方法流程图;FIG. 3 is a flow chart of a motor control system and its method provided by an embodiment of the present invention;

图4是本发明另一实施例所提供的马达控制系统及其方法的系统方块图;FIG. 4 is a system block diagram of a motor control system and its method provided by another embodiment of the present invention;

图5是本发明另一实施例所提供的马达控制系统及其方法的方法流程图;FIG. 5 is a flow chart of a motor control system and its method provided by another embodiment of the present invention;

图6A与图6B是本发明另一实施例所提供的马达控制系统及其方法的脉冲驱动信号示意图。6A and 6B are schematic diagrams of pulse driving signals of a motor control system and method thereof according to another embodiment of the present invention.

【符号说明】【Symbol Description】

1、1a:马达控制系统1, 1a: Motor control system

11:输入模块11: Input module

12、12a:运动控制器12, 12a: motion controller

121a:处理模块121a: Processing module

122a:存储模块122a: storage module

123a:脉冲输出模块123a: Pulse output module

13a:转换模块13a: Conversion module

2:驱动装置2: Drive device

3:马达3: Motor

S0:初始位置S0: initial position

S1:第一位置S1: first position

S2:第二位置S2: second position

Sn:目标位置Sn: target position

T0:初始时间T0: initial time

T1:第一时间T1: the first time

T2:第二时间T2: second time

Tn:目标运动时间Tn: target exercise time

ΔT:单位运动时间ΔT: unit movement time

ΔSi、ΔS1、ΔS2:单位运动量ΔS i , ΔS 1 , ΔS 2 : Unit motion

具体实施方式Detailed ways

请参阅图1至图3,其中,图1是本发明一实施例所提供的马达控制系统及其方法的系统方块图;图2是本发明一实施例所提供的马达控制系统及其方法的位置-时间图;以及,图3是本发明一实施例所提供的马达控制系统及其方法的方法流程图。如图所示,一种马达控制系统1用以传送一驱动信号至一驱动装置2,并通过驱动装置2驱动一马达3,且马达控制系统1并包含一输入模块11与一运动控制器12。Please refer to Fig. 1 to Fig. 3, wherein Fig. 1 is a system block diagram of a motor control system and its method provided by an embodiment of the present invention; Fig. 2 is a diagram of a motor control system and its method provided by an embodiment of the present invention position-time diagram; and, FIG. 3 is a flow chart of a motor control system and method thereof provided by an embodiment of the present invention. As shown in the figure, a motor control system 1 is used to transmit a drive signal to a drive device 2, and drive a motor 3 through the drive device 2, and the motor control system 1 also includes an input module 11 and a motion controller 12 .

输入模块11,用以设定多个运动控制参数,而运动控制参数中至少包含一目标位置Sn与一目标运动时间Tn。输入模块11可为一电脑、一手机、一键盘等可输入运动控制参数的装置。The input module 11 is used for setting a plurality of motion control parameters, and the motion control parameters at least include a target position S n and a target motion time T n . The input module 11 can be a computer, a mobile phone, a keyboard and other devices capable of inputting motion control parameters.

运动控制器12,电性连接输入模块11,用以接收运动控制参数,并依据至少一运算规则产生对应于一单位运动时间ΔT的一单位运动量ΔSi,i=1~n,对应至不同的运动时间点,ΔS1对应到一第一时间T1与一初始时间T0的单位运动时间ΔT,并且使马达3自一初始位置S0移动至一第一位置S1,ΔS2对应到一第二时间T2与第一时间T1的单位运动时间ΔT,并且使马达3自第一位置S1移动至一第二位置S2。在此需说明的是,实际上每一个单位运动时间ΔT所对应到的单位运动量不一定会相同,不同的单位运动时间ΔT所对应到的单位运动量以ΔS1、ΔS2…作为区别,如图2所示,单位运动量ΔSi则是作为一个统称,以利于理解本发明。The motion controller 12 is electrically connected to the input module 11 to receive motion control parameters, and generate a unit motion amount ΔS i corresponding to a unit motion time ΔT according to at least one operation rule, i=1~n, corresponding to different The movement time point, ΔS 1 corresponds to a unit movement time ΔT of a first time T 1 and an initial time T 0 , and makes the motor 3 move from an initial position S 0 to a first position S 1 , and ΔS 2 corresponds to a The second time T 2 is the unit movement time ΔT of the first time T 1 , and the motor 3 is moved from the first position S 1 to a second position S 2 . What needs to be explained here is that in fact, the unit exercise amount corresponding to each unit exercise time ΔT is not necessarily the same, and the unit exercise amount corresponding to different unit exercise time ΔT is distinguished by ΔS 1 , ΔS 2 ..., as shown in the figure 2, the unit motion amount ΔS i is used as a general term to facilitate understanding of the present invention.

运动控制器12依据至少一转换规则,产生一对应单位运动量ΔSi的控制命令,再依据控制命令产生驱动信号,并将驱动信号传送至驱动装置2以驱动马达3。因控制命令通常是一个数字信号,无法直接驱动马达。因此,本实施例依据控制命令转换成驱动装置2可解读的驱动信号传送至驱动装置2,以驱动马达3转动。就一实施例而言,驱动信号可为一脉冲驱动信号。The motion controller 12 generates a control command corresponding to the unit motion amount ΔS i according to at least one conversion rule, and then generates a driving signal according to the control command, and transmits the driving signal to the driving device 2 to drive the motor 3 . Because the control command is usually a digital signal, it cannot directly drive the motor. Therefore, in this embodiment, the control command is converted into a driving signal that the driving device 2 can interpret and transmits to the driving device 2 to drive the motor 3 to rotate. In one embodiment, the driving signal can be a pulse driving signal.

在第一实施例中,运动控制器12是一现场可编程门阵列(Field ProgrammableGate Array;FPGA)芯片,但不以此为限。在另一实施例中,运动控制器12可为一数字信号处理器(Digital Signal Processor;DSP)。前述运算规则与转换规则可以内建于运动控制器12内,也可储存于一存储单元。In the first embodiment, the motion controller 12 is a Field Programmable Gate Array (Field Programmable Gate Array; FPGA) chip, but not limited thereto. In another embodiment, the motion controller 12 may be a digital signal processor (Digital Signal Processor; DSP). The aforementioned operation rules and conversion rules can be built in the motion controller 12 or stored in a storage unit.

如图2所示,运动控制器12演算出的每一小段单位运动量ΔSi(即ΔS1、ΔS2…)全部相加,会使马达在目标运动时间Tn自一初始位置S0移动至目标位置Sn。由于本实施例运算单位运动量ΔSi所需的单位运动时间ΔT(可视为运动控制器12的内建运算时间)小于目标运动时间Tn,因此,若在目标运动时间Tn内,有新的目标位置或是接收到新的运动控制参数,本实施例的运动控制器12可即时地进行新的运算产生新的单位运动量ΔSi,以配合新的目标位置并在目标运动时间Tn到达新的目标位置。而不会像现有技术一样,需要先在目标运动时间Tn移动到目标位置Sn后,再去产生由目标位置Sn移动到新的目标位置的驱动信号。因此,本实施例有助于避免传统马达控制系统及其方法所造成的驱动信号的延迟甚至是误差等问题。As shown in FIG. 2 , the addition of each small unit movement amount ΔS i (ie ΔS 1 , ΔS 2 . . . ) calculated by the motion controller 12 will cause the motor to move from an initial position S 0 to Target position S n . Since the unit movement time ΔT (which can be regarded as the built-in calculation time of the motion controller 12) required for calculating the unit movement amount ΔS i in this embodiment is less than the target movement time T n , therefore, if within the target movement time T n , there is a new target position or receive new motion control parameters, the motion controller 12 of this embodiment can immediately perform new calculations to generate a new unit motion amount ΔS i to match the new target position and arrive at the target motion time T n new target location. Unlike the prior art, it is not necessary to generate a driving signal for moving from the target position S n to a new target position after the target movement time T n moves to the target position S n . Therefore, this embodiment helps to avoid problems such as delay or even error of the driving signal caused by the conventional motor control system and its method.

如图3所示,本发明的一实施例提供一种马达控制方法,此马达控制方法利用图1的马达控制系统1,此马达控制系统1包含一输入模块11与一运动控制器12。此马达控制方法包含以下步骤S101至S105。As shown in FIG. 3 , an embodiment of the present invention provides a motor control method. The motor control method uses the motor control system 1 shown in FIG. 1 . The motor control system 1 includes an input module 11 and a motion controller 12 . The motor control method includes the following steps S101 to S105.

步骤S101:利用输入模块11,设定多个运动控制参数,且该些运动控制参数至少包含一目标位置与一目标运动时间。Step S101: Use the input module 11 to set a plurality of motion control parameters, and the motion control parameters at least include a target position and a target motion time.

步骤S102:利用运动控制器12,接收该些运动控制参数,并依据至少一运算规则,产生对应于一单位运动时间的一单位运动量。Step S102: Utilize the motion controller 12 to receive the motion control parameters, and generate a unit amount of exercise corresponding to a unit exercise time according to at least one operation rule.

步骤S103:利用运动控制器12,依据至少一转换规则,产生一对应该单位运动量的控制命令。Step S103: Utilize the motion controller 12 to generate a control command corresponding to the unit motion according to at least one conversion rule.

步骤S104:利用运动控制器12,依据该控制命令产生一驱动信号。Step S104: Utilize the motion controller 12 to generate a driving signal according to the control command.

步骤S105:利用运动控制器12,传送该驱动信号至一驱动装置,用以驱动一马达。Step S105: Utilize the motion controller 12 to transmit the driving signal to a driving device for driving a motor.

步骤S101利用输入模块11设定多个运动控制参数,而运动控制参数至少包含一目标位置(如图2中的Sn)与一目标运动时间(如图2中的Tn)。Step S101 utilizes the input module 11 to set a plurality of motion control parameters, and the motion control parameters at least include a target position (Sn in FIG. 2 ) and a target motion time (Tn in FIG. 2 ).

步骤S102利用运动控制器12依据运算规则,运算出对应于一单位运动时间(如图2中的ΔT)的一单位运动量(如图2中的ΔSi、ΔS1、ΔS2…)。此运动控制器12可以是一FPGA芯片。又,就一较佳实施例而言,运动控制器12依据加加速度直线运动公式,将运动控制参数演算出单位运动量。Step S102 utilizes the motion controller 12 to calculate a unit movement amount (such as ΔS i , ΔS 1 , ΔS 2 . The motion controller 12 can be an FPGA chip. Furthermore, in a preferred embodiment, the motion controller 12 calculates the motion control parameters to calculate the unit motion amount according to the jerk linear motion formula.

步骤S103利用运动控制器12,依据转换规则,产生一对应该单位运动量的控制命令,转换规则可以内建于运动控制器12内,也可储存于一存储单元。Step S103 utilizes the motion controller 12 to generate a control command corresponding to the unit amount of motion according to the conversion rule. The conversion rule can be built in the motion controller 12 or stored in a storage unit.

步骤S104利用运动控制器12,依据控制命令产生驱动信号,因运动控制器12运算出来的单位运动量ΔSi与控制命令并无法直接驱动马达3,所以,运动控制器12需再将控制命令转换成一可与驱动装置2沟通的驱动信号。Step S104 utilizes the motion controller 12 to generate a drive signal according to the control command. Because the unit motion amount ΔSi calculated by the motion controller 12 and the control command cannot directly drive the motor 3, the motion controller 12 needs to convert the control command into a The driving signal communicated with the driving device 2.

最后,步骤S105利用运动控制器12传送驱动信号至驱动装置2,以驱动马达3,进而完成马达控制。Finally, in step S105 , the motion controller 12 transmits a driving signal to the driving device 2 to drive the motor 3 , thereby completing the motor control.

请参阅图4至图6B,其中,图4是本发明另一实施例所提供的马达控制系统及其方法的系统方块图;图5是本发明另一实施例所提供的马达控制系统及其方法的方法流程图;以及,图6A与图6B是本发明另一实施例所提供的马达控制系统及其方法的脉冲驱动信号示意图。如图所示,一种马达控制系统1a用以传送一驱动信号至如第一实施例中的驱动装置2,以驱动如第一实施例中的马达3,马达控制系统1a并包含一输入模块11、一运动控制器12a与一转换模块13a,其中,输入模块11与第一实施例中相同,故不多加赘述。Please refer to FIG. 4 to FIG. 6B, wherein, FIG. 4 is a system block diagram of a motor control system and its method provided by another embodiment of the present invention; FIG. 5 is a motor control system and its method provided by another embodiment of the present invention The method flow chart of the method; and, FIG. 6A and FIG. 6B are schematic diagrams of pulse driving signals of the motor control system and the method thereof provided by another embodiment of the present invention. As shown in the figure, a motor control system 1a is used to transmit a driving signal to the driving device 2 in the first embodiment to drive the motor 3 in the first embodiment, and the motor control system 1a also includes an input module 11. A motion controller 12a and a conversion module 13a, wherein the input module 11 is the same as that in the first embodiment, so it will not be repeated here.

转换模块13a电性连接输入模块11与运动控制器12a,用以将输入模块11设定的运动控制参数转换成二进制格式,以利运动控制器12a的运算。转换模块13a可内嵌于输入模块11,也可内嵌于运动控制器12a,也可如图4所示自成一个模块方块。The conversion module 13a is electrically connected to the input module 11 and the motion controller 12a, and is used for converting the motion control parameters set by the input module 11 into a binary format for operation of the motion controller 12a. The conversion module 13a can be embedded in the input module 11, can also be embedded in the motion controller 12a, and can also form a modular block as shown in FIG. 4 .

运动控制器12a还包含一处理模块121a、一存储模块122a与一脉冲输出模块123a。存储模块122a用以储存至少一运算规则与至少一转换规则,在本实施例中,运算规则是一加加速度直线运动公式,转换规则是一对照表显示单位运动量ΔSi与脉冲边缘变化量的对应关系。存储模块122a可为一存储芯片。The motion controller 12a further includes a processing module 121a, a storage module 122a and a pulse output module 123a. The storage module 122a is used to store at least one operation rule and at least one conversion rule. In this embodiment, the operation rule is a jerk linear motion formula, and the conversion rule is a comparison table showing the correspondence between the unit motion amount ΔS i and the pulse edge variation relation. The memory module 122a can be a memory chip.

处理模块121a接收经由转换模块13a转换后的运动控制参数,并依据存储模块122a中的运算规则,产生对应一单位运动时间ΔT(标示于图2)的一单位运动量ΔSi(标示于图2)。并依据转换规则,将单位运动量ΔSi转换成一数字信息,此数字信息具有一预设比特长度,随后再依据此数字信息产生一对应单位运动量ΔSi的控制命令,控制命令是此数字信息所对应到的脉冲边缘变化量。The processing module 121a receives the motion control parameters converted by the conversion module 13a, and generates a unit exercise amount ΔS i (indicated in FIG. 2 ) corresponding to a unit exercise time ΔT (indicated in FIG. 2 ) according to the operation rules in the storage module 122a. . And according to the conversion rule, the unit movement amount ΔS i is converted into a digital information, and the digital information has a preset bit length, and then a control command corresponding to the unit movement amount ΔS i is generated according to the digital information, and the control command is corresponding to the digital information to the amount of pulse edge variation.

最后,再利用脉冲输出模块123a,依据控制命令产生一驱动信号,此驱动信号与第一实施例不同的处在于是一脉冲驱动信号,并传送至驱动装置2,以驱动马达3。Finally, the pulse output module 123a is used to generate a driving signal according to the control command. The driving signal is different from the first embodiment in that it is a pulse driving signal, and is sent to the driving device 2 to drive the motor 3 .

如图5所示,本发明的另一实施例提供一种马达控制方法,此马达控制方法用于图4的马达控制系统1a,并包含以下步骤S201至S207。步骤S201与第一实施例的步骤S101相同,故不多加说明。As shown in FIG. 5 , another embodiment of the present invention provides a motor control method, which is used in the motor control system 1 a of FIG. 4 , and includes the following steps S201 to S207 . Step S201 is the same as step S101 of the first embodiment, so further description is omitted.

步骤S202利用转换模块13a,接收运动控制参数,并将运动控制参数转换成利于运动控制器12a进行运算的格式,例如:二进制格式。Step S202 utilizes the conversion module 13a to receive the motion control parameters, and converts the motion control parameters into a format that is convenient for the motion controller 12a to perform calculations, for example, a binary format.

步骤S203至步骤S205与第一实施例中的步骤S102与S103大致相同,差异在于自第一实施例中的运动控制器12改成由第二实施例中运动控制器12a内部的处理模块121a、存储模块122a执行步骤。Steps S203 to S205 are roughly the same as steps S102 and S103 in the first embodiment, the difference is that the motion controller 12 in the first embodiment is replaced by the processing module 121a inside the motion controller 12a in the second embodiment, The storage module 122a performs the steps.

步骤S206利用脉冲输出模块123a接收控制命令,并据以产生一驱动信号,此驱动信号与前述实施例中的差异在于,此驱动信号为一脉冲驱动信号。并传送驱动信号至驱动装置2以驱动马达3,完成步骤S207。In step S206, the pulse output module 123a is used to receive the control command and generate a driving signal accordingly. The difference between the driving signal and the previous embodiment is that the driving signal is a pulse driving signal. And transmit the driving signal to the driving device 2 to drive the motor 3, completing step S207.

接着,将以实际数值举例说明,设定多个运动控制参数包含加加速度=1、加速度=10、速度=100、目标位置=1000,初始加速度=0、初始速度=0、初始位置=0、单位运动时间=2、QX,Y格式=Q32,24与最多脉冲边缘变化量=3。QX,Y格式为一种二进制格式,用以决定单位运动量ΔSi转换成二进制格式后的比特数,其中X=32表示总比特数为32比特,Y=24表示代表小数的比特数有24比特。请一并参阅图2、图4至图6B。因我们对于十进制格式较为熟悉,但是马达控制系统实际上运算利用二进制格式,故以下说明会一并使用十进制格式与二进制格式,二进制格式是为了呈现马达控制系统的实际运算情况,十进制格式则是为了利于理解本发明。Next, the actual values will be used as examples to set multiple motion control parameters including jerk = 1, acceleration = 10, speed = 100, target position = 1000, initial acceleration = 0, initial speed = 0, initial position = 0, Unit motion time = 2, QX, Y format = Q32, 24 and maximum pulse edge variation = 3. The QX, Y format is a binary format, which is used to determine the number of bits after the unit motion ΔS i is converted into a binary format, where X=32 means that the total number of bits is 32 bits, and Y=24 means that the number of bits representing decimals has 24 bits . Please also refer to FIG. 2 , FIG. 4 to FIG. 6B . Because we are more familiar with the decimal format, but the motor control system actually uses the binary format for operations, so the following description will use both the decimal format and the binary format. The binary format is for presenting the actual operation of the motor control system, and the decimal format is for Facilitate understanding of the present invention.

转换模块13a将上述运动控制参数转换成二进制格式,除了QX,Y格式与最多脉冲边缘变化量,处理模块121a依据加加速度直线运动公式,将上述运动控制参数运算出一单位运动量ΔSi的十进制格式为221.333循环小数,在Q32,24格式下的值为01101001001010101010101010101011。The conversion module 13a converts the above-mentioned motion control parameters into a binary format. In addition to the QX, Y format and the maximum pulse edge variation, the processing module 121a calculates the above-mentioned motion control parameters according to the jerk linear motion formula. The decimal format of a unit motion amount ΔSi is as follows: 221.333 recurring decimals, the value in Q32,24 format is 01101001001010101010101010101011.

处理模块121a依据转换规则,转换规则如下:1.最多只能有(2n-1)个脉冲边缘变化量。2.QX,Y格式中,脉冲边缘变化的主导比特为第(Y-1)至(Y+(n-1))比特。3.如下表(一)。The processing module 121a is based on the conversion rule, which is as follows: 1. There can only be (2 n −1) pulse edge variations at most. 2. In the QX, Y format, the leading bits of pulse edge changes are the (Y-1) to (Y+(n-1))th bits. 3. The following table (1).

表(一)Table I)

表(一)是一单位运动量ΔSi主导比特的对应数值与脉冲边缘变化量的对照表。依据上述转换规则,可知因为最多脉冲边缘变化量=3,因此n=2,主导脉冲边缘变化的比特为第(24-1)至(24+(2-1))比特,即第23至25比特,单位运动量ΔSi在Q32,24格式中的第23至25比特(即主导比特)为101,对应到十进制格式的数值为5(即22+1),此数值对应的脉冲边缘变化量为-3,表示控制命令为控制马达3沿负方向转动3格,并依据控制命令产生脉冲驱动信号,使驱动装置2驱动马达3负方向转动3格,即为图6A所显示的脉冲驱动信号。脉冲边缘变化量表示脉冲的切换次数,如图所示,脉冲驱动信号依序自输出逻辑1切换至0、再从0切换至1、最后从1切换至0,共切换3次,表示脉冲边缘变化量为3,因为第一次切换自大(1)切换至小(0),故为负方向。而图6B显示正方向转动3格的脉冲驱动信号,因为第一次切换自小(0)切换至大(1),故为正方向。Table (1) is a comparison table between the corresponding value of the dominant bit of a unit movement amount ΔSi and the change amount of the pulse edge. According to the above conversion rules, it can be seen that because the maximum amount of pulse edge change=3, so n=2, the bits that dominate the pulse edge change are the (24-1) to (24+(2-1)) bits, that is, the 23rd to 25th Bit, the unit movement amount ΔS i in the Q32,24 format, the 23rd to 25th bits (that is, the dominant bit) is 101, corresponding to the value in decimal format is 5 (that is, 2 2 +1), the pulse edge change amount corresponding to this value If it is -3, it means that the control command is to control the motor 3 to rotate 3 grids in the negative direction, and generate a pulse driving signal according to the control command, so that the driving device 2 drives the motor 3 to rotate 3 grids in the negative direction, which is the pulse driving signal shown in Figure 6A . The amount of change in the pulse edge indicates the switching times of the pulse. As shown in the figure, the pulse driving signal switches from the output logic 1 to 0, then switches from 0 to 1, and finally switches from 1 to 0, switching 3 times in total, indicating the pulse edge The amount of change is 3, because the first switch is from large (1) to small (0), so it is in the negative direction. However, FIG. 6B shows the pulse driving signal of 3 divisions in the positive direction, because the first switching is from small (0) to large (1), so it is in the positive direction.

在此需特别说明的是,表(一)适用于n=2时,不过,本发明不限于此。基本上,表(一)可分成三个区间,第一个区间的单位运动量ΔSi主导比特的对应数值自0、1、2…递增至(2n-1),对应的脉冲边缘变化量自0、+1、+2…递增至+(2n-1)。第二个区间的单位运动量ΔSi主导比特的对应数值为2n,此时对应的脉冲边缘变化量为0。第三个区间的单位运动量ΔSi主导比特的对应数值自(2n+1)、(2n+2)…递增至(2n+2n-1),此时,对应的脉冲边缘变化量自-(2n-1)递增至-1。It should be noted here that Table (1) is applicable when n=2, however, the present invention is not limited thereto. Basically, Table (1) can be divided into three intervals. In the first interval, the corresponding value of the unit movement amount ΔS i dominant bit increases from 0, 1, 2... to (2 n -1), and the corresponding pulse edge variation from 0, +1, +2... increments to +(2 n -1). The unit movement amount ΔS i of the second interval corresponds to a dominant bit value of 2 n , and the corresponding pulse edge change amount is 0 at this time. The corresponding value of the unit movement amount ΔS i dominant bit in the third interval increases from (2 n +1), (2 n +2)... to (2 n +2 n -1), at this time, the corresponding pulse edge variation Increments from -(2 n -1) to -1.

针对第三个区间的对应关系做更详细的说明,当单位运动量ΔSi主导比特的对应数值是(2n+1)时,对应到的脉冲边缘变化量为-(2n-1),在此可将(2n+1)等同于(2n+1-2n+1),再等同于(2n+1-(2n-1))。因此,脉冲边缘变化量为-(2n-1)对应到单位运动量ΔSi主导比特的对应数值的后半部。其他单位运动量ΔSi与脉冲边缘变化量的对应关系依此类推。For a more detailed description of the corresponding relationship in the third interval, when the corresponding value of the dominant bit of the unit motion ΔS i is (2 n +1), the corresponding pulse edge change is -(2 n -1), in This equates (2 n +1) to (2 n+1 -2 n +1), which then equates to (2 n+1 -(2 n -1)). Therefore, the change amount of the pulse edge is -(2 n -1) corresponding to the second half of the value corresponding to the dominant bit of the unit motion amount ΔS i . The corresponding relationship between other unit motion amounts ΔS i and the pulse edge variation can be deduced by analogy.

再以实际数值举例说明,运动控制参数皆与上述数值相同,运算规则与转换规则也相同,唯一差异在于单位运动时间=1。依此单位运动时间运算出的单位运动量ΔSi主导比特为100,对应数值为4,对应表(一)脉冲边缘变化量为0,表示脉冲驱动信号不会使驱动装置2驱动马达3,当运动控制器12a判断脉冲变化量为0时,产生一基本速度驱动信号,使驱动装置2驱动马达3以一对应基本速度驱动信号的最低速度转动。Taking the actual numerical value as an example again, the motion control parameters are the same as the above numerical values, and the operation rules and conversion rules are also the same, the only difference is that the unit motion time=1. The unit motion amount ΔS i calculated based on this unit motion time is 100, the corresponding value is 4, and the corresponding table (1) pulse edge variation is 0, which means that the pulse drive signal will not make the drive device 2 drive the motor 3, when the motion When the controller 12a judges that the pulse variation is 0, it generates a basic speed driving signal, so that the driving device 2 drives the motor 3 to rotate at a minimum speed corresponding to the basic speed driving signal.

综上所述,本发明所提供的马达控制系统及其方法是利用输入模块设定运动控制参数,以及运动控制器依据运算规则与转换规则产生驱动信号,并将驱动信号传送至驱动装置,以驱动马达。In summary, the motor control system and method provided by the present invention use the input module to set motion control parameters, and the motion controller generates drive signals according to the operation rules and conversion rules, and transmits the drive signals to the drive device for drive motor.

相较于现有技术,本发明所提供的马达控制系统及其方法,不会因为运动控制参数的改变,而造成驱动信号的延迟或误差,取而代之的是利用单位运动时间小于目标运动时间的关系,而达到因应新的运动控制参数的即时运算,故不会造成驱动信号的延迟或误差。Compared with the prior art, the motor control system and method provided by the present invention will not cause the delay or error of the drive signal due to the change of the motion control parameters, and instead use the relationship that the unit motion time is less than the target motion time , so as to achieve the real-time operation corresponding to the new motion control parameters, so it will not cause the delay or error of the driving signal.

通过以上较佳具体实施例的详述,希望能更加清楚描述本发明的特征与精神,而并非以上述所揭示的较佳具体实施例来对本发明的范围加以限制。相反地,其目的是希望能涵盖各种改变及具相等性的安排于本发明权利要求的范围内。Through the detailed description of the preferred specific embodiments above, it is hoped that the characteristics and spirit of the present invention can be described more clearly, rather than the scope of the present invention is limited by the preferred specific embodiments disclosed above. On the contrary, the intention is to cover various modifications and equivalent arrangements within the scope of the appended claims.

Claims (10)

1.一种马达控制系统,其特征在于,用以传送驱动信号至驱动装置,用以驱动马达,并包含:1. A motor control system, characterized in that it is used to transmit a driving signal to a driving device for driving a motor, and includes: 输入模块,用以设定多个运动控制参数,所述多个运动控制参数至少包含目标位置与目标运动时间;以及The input module is used to set a plurality of motion control parameters, and the plurality of motion control parameters at least include a target position and a target motion time; and 运动控制器,电性连接所述输入模块,用以接收所述多个运动控制参数,依据至少一运算规则产生对应于单位运动时间的单位运动量,并依据至少一转换规则产生对应所述单位运动量的控制命令,再依据所述控制命令产生所述驱动信号;A motion controller, electrically connected to the input module, for receiving the plurality of motion control parameters, generating a unit motion amount corresponding to a unit motion time according to at least one operation rule, and generating a unit motion amount corresponding to the unit motion time according to at least one conversion rule the control command, and then generate the driving signal according to the control command; 其中,所述单位运动时间小于所述目标运动时间。Wherein, the unit exercise time is less than the target exercise time. 2.如权利要求1所述的马达控制系统,其中,所述单位运动量小于所述目标位置。2. The motor control system of claim 1, wherein the unit movement amount is smaller than the target position. 3.如权利要求1所述的马达控制系统,其中,所述至少一运算规则是加加速度直线运动公式。3. The motor control system according to claim 1, wherein the at least one algorithm is a jerk linear motion formula. 4.如权利要求1所述的马达控制系统,其中,所述至少一转换规则是对照表,且所述对照表显示所述单位运动量与脉冲边缘变化量的对应关系。4. The motor control system according to claim 1, wherein the at least one conversion rule is a look-up table, and the look-up table shows the corresponding relationship between the unit movement amount and the pulse edge change amount. 5.如权利要求4所述的马达控制系统,其中,所述运动控制器依据所述单位运动量所对应的所述脉冲边缘变化量,产生所述控制命令。5. The motor control system according to claim 4, wherein the motion controller generates the control command according to the pulse edge change amount corresponding to the unit motion amount. 6.如权利要求1所述的马达控制系统,还包含:转换模块,且所述转换模块电性连接所述输入模块与所述运动控制器,用以接收所述多个运动控制参数,并将所述多个运动控制参数转换成二进制格式。6. The motor control system according to claim 1, further comprising: a conversion module, and the conversion module is electrically connected to the input module and the motion controller to receive the plurality of motion control parameters, and Converting the plurality of motion control parameters to a binary format. 7.如权利要求1所述的马达控制系统,其中,所述运动控制器还包含:存储模块,且所述存储模块用以储存所述至少一运算规则与所述至少一转换规则。7. The motor control system according to claim 1, wherein the motion controller further comprises: a storage module, and the storage module is configured to store the at least one operation rule and the at least one conversion rule. 8.如权利要求1所述的马达控制系统,其中,所述运动控制器还包含:脉冲输出模块,所述脉冲输出模块用以依据所述控制命令产生所述驱动信号,且所述驱动信号是脉冲驱动信号。8. The motor control system according to claim 1, wherein the motion controller further comprises: a pulse output module, the pulse output module is used to generate the driving signal according to the control command, and the driving signal is the pulse drive signal. 9.一种马达控制方法,其特征在于,使用输入模块与运动控制器,并包含以下步骤:9. A motor control method, characterized in that, using an input module and a motion controller, and comprising the following steps: 利用所述输入模块,设定多个运动控制参数,且所述多个运动控制参数至少包含目标位置与目标运动时间;Using the input module to set a plurality of motion control parameters, and the plurality of motion control parameters include at least a target position and a target motion time; 利用所述运动控制器,接收所述多个运动控制参数,并依据至少一运算规则,产生对应于单位运动时间的单位运动量;Using the motion controller to receive the plurality of motion control parameters, and generate a unit motion amount corresponding to a unit motion time according to at least one operation rule; 利用所述运动控制器,依据至少一转换规则,产生对应所述单位运动量的控制命令,using the motion controller to generate a control command corresponding to the unit motion amount according to at least one conversion rule, 利用所述运动控制器,依据所述控制命令产生驱动信号;以及using the motion controller to generate a driving signal according to the control command; and 利用所述运动控制器,传送所述驱动信号至驱动装置,用以驱动马达。The motion controller is used to transmit the driving signal to the driving device for driving the motor. 10.如权利要求9所述的马达控制方法,还包含以下步骤:10. The motor control method as claimed in claim 9, further comprising the steps of: 利用所述运动控制器判断所述驱动信号是无变化量驱动信号,产生基本速度驱动信号,并传送至所述驱动装置。The motion controller is used to judge that the driving signal is a driving signal with no variation, and a basic speed driving signal is generated and sent to the driving device.
CN201810288167.0A 2018-04-03 2018-04-03 Motor control system and method thereof Pending CN110365280A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810288167.0A CN110365280A (en) 2018-04-03 2018-04-03 Motor control system and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810288167.0A CN110365280A (en) 2018-04-03 2018-04-03 Motor control system and method thereof

Publications (1)

Publication Number Publication Date
CN110365280A true CN110365280A (en) 2019-10-22

Family

ID=68213431

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810288167.0A Pending CN110365280A (en) 2018-04-03 2018-04-03 Motor control system and method thereof

Country Status (1)

Country Link
CN (1) CN110365280A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050093501A1 (en) * 2003-10-15 2005-05-05 International Rectifier Corporation Hardware based configurable motion control apparatus and method
CN101369131A (en) * 2002-01-07 2009-02-18 西门子能量及自动化公司 Pulse output function for programmable logic controllers
CN101939711A (en) * 2007-10-21 2011-01-05 通用电气智能平台有限公司 System and method for jerk limited trajectory planning for a path planner
CN106168790A (en) * 2016-02-29 2016-11-30 华南理工大学 A kind of online change target velocity and the S-shaped Acceleration-deceleration Control Method of position
CN107450480A (en) * 2017-08-06 2017-12-08 北京镁伽机器人科技有限公司 Control device, control method, medium and the system of moving component
CN107819413A (en) * 2017-10-24 2018-03-20 北京镁伽机器人科技有限公司 With the control parts of motion for stopping function, the deceleration method of shutting down of slowing down

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101369131A (en) * 2002-01-07 2009-02-18 西门子能量及自动化公司 Pulse output function for programmable logic controllers
US20050093501A1 (en) * 2003-10-15 2005-05-05 International Rectifier Corporation Hardware based configurable motion control apparatus and method
CN101939711A (en) * 2007-10-21 2011-01-05 通用电气智能平台有限公司 System and method for jerk limited trajectory planning for a path planner
CN106168790A (en) * 2016-02-29 2016-11-30 华南理工大学 A kind of online change target velocity and the S-shaped Acceleration-deceleration Control Method of position
CN107450480A (en) * 2017-08-06 2017-12-08 北京镁伽机器人科技有限公司 Control device, control method, medium and the system of moving component
CN107819413A (en) * 2017-10-24 2018-03-20 北京镁伽机器人科技有限公司 With the control parts of motion for stopping function, the deceleration method of shutting down of slowing down

Similar Documents

Publication Publication Date Title
WO2020151406A1 (en) Motion control method, apparatus and system, and storage medium
CN103713581B (en) The implementation method of kinetic control system S curve acceleration and deceleration
CN104135212B (en) Flexibility motion control IP (Intellectual Property) core and implementation method thereof
CN103713660B (en) Realize the control circuit of kinetic control system S curve acceleration and deceleration
CN101916098B (en) Multi-axis motion control card with absolute coded disk reading function
CN104283484A (en) Motor control device provided with feedforward control
CN102809945B (en) Movement planning method for numerical control processing, movement planner and application thereof
JP2014219911A (en) Simulation device and simulation program
CN112207829A (en) Robot control method and device and readable storage medium
Khanna et al. Low-cost production CNC system
CN116500977A (en) Servo control system, control data conversion method and computing device
CN110365280A (en) Motor control system and method thereof
CN112636660A (en) Servo drive control system and absolute position signal processing method, device and equipment
JP2007267480A (en) Servo control device and servo system using it
CN103907070B (en) Servocontrol device
TWI662781B (en) A motor controlling system and method thereof
CN102650862A (en) Electronic cam control system of programmable logic controller and electronic cam control method
CN103552072B (en) A kind of robot control method based on embedded controller and device
da Rocha et al. Prototype CNC machine design
CN107046382B (en) An Iterative Velocity Control Method Based on Trigonometric Functions
Jean et al. Efficient adaptive hybrid control strategies for robots in constrained manipulation
US9905264B2 (en) Servo control system having function of switching learning memory
JP4683325B2 (en) Multi-axis motor control system
KR100925274B1 (en) Multi-Axis Motion Control Circuits and Devices
CN104635625A (en) Movement control method and device based on IP core

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20191022

WD01 Invention patent application deemed withdrawn after publication