Control System and Control Method of Servo Motor
Through the combination of edge computers and motion control cards, the problems of single motion control functions and slow data transmission of servo systems are solved, complex motion trajectory control and hardware platform transplantation are realized, and the motion accuracy and stability of the servo motor are improved.
Patent Information
- Application Number
- CN202410570673.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-09
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2044-05-09
AI Technical Summary
The existing servo system has a single motion control function, a slow data transmission rate, and the control method cannot be directly transplanted on different platforms, resulting in large control delays and errors.
Using a combination of edge computers and motion control cards, edge computers obtain the torque and speed information of the servo motor for torque compensation, and transmit it to the motion control card through EtherNET. The motion control card converts the torque compensation command into a control signal to drive the servo motor to realize complex motion trajectory control.
It improves the motion accuracy and stability of the servo motor, realizes system and code transplantation on different hardware platforms, and has good stability and efficient data transmission performance.
Smart Images

Figure CN118631098B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of automatic control, and particularly relates to a control system for a servo motor and a control method for a servo motor. Background Art
[0002] A servo system is an automatic control system that enables the output controlled variables such as the position, orientation, and state of an object to follow any change in the input target (or given value).
[0003] Currently, the servo control in a servo system mainly controls the servo motor by controlling the pulses sent to the servo driver through a PLC (Programmable Logic Controller). For example, it is agreed that the servo motor rotates one circle for every 10,000 pulses. If the PLC sends 10,000 pulses in one minute, then the servo motor will complete one circle at a speed of 1 r / min. If 10,000 pulses are sent in one second, then the servo motor will complete one circle at a speed of 60 r / min.
[0004] However, the above method has the following problems: The motion control function is relatively single, generally only capable of realizing the motion control of relatively simple trajectories; the data transmission rate is slow, resulting in relatively large control delay and error; the control method is targeted and cannot directly transplant the control code for different platforms. Summary of the Invention
[0005] To solve the above technical problems, the first object of the present invention is to propose a control system for a servo motor.
[0006] The second object of the present invention is to propose a control method for a servo motor.
[0007] The technical solution adopted by the present invention is as follows:
[0008] An embodiment of the first aspect of the present invention provides a control system for a servo motor. The servo motor includes a traversing X-axis front-wheel servo and a traversing X-axis rear-wheel servo. The traversing X-axis front-wheel servo is configured in a torque control mode, and the traversing X-axis rear-wheel servo is configured in a position control mode. The control system includes an edge computer and a motion control card. Among them, the edge computer is equipped with a Linux operating system. The edge computer is used to obtain the torque of the traversing X-axis front-wheel servo and the speed of the traversing X-axis rear-wheel servo, perform torque compensation on the torque of the traversing X-axis front-wheel servo according to the speed of the traversing X-axis rear-wheel servo, generate a torque compensation command, and transmit the torque compensation command to the motion control card. The motion control card is used to convert the torque compensation command into a control signal and send it to the servo driver of the servo motor, so that the servo driver drives the corresponding servo motor to move according to the control signal, and transmit the data of the servo motor fed back by the servo driver back to the edge computer.
[0009] The control system for the servo motor proposed above in the present invention may further have the following additional technical features:
[0010] According to an embodiment of the present invention, the edge computer is specifically used to: obtain the previous speed and the current speed of the traversing X-axis rear-wheel servo, obtain the operating mode of the servo motor according to the previous speed and the current speed. The operating mode includes: an acceleration operating mode, a deceleration operating mode, a constant-speed operating mode, and a stop operating mode. If the operating mode of the servo motor is the stop operating mode, the torque of the traversing X-axis front-wheel servo is set to 0. If the operating mode of the servo motor is the acceleration operating mode, the deceleration operating mode, or the constant-speed operating mode, torque compensation is performed according to the current speed, the target speed of the traversing X-axis rear-wheel servo, and the motion direction of the servo motor.
[0011] According to an embodiment of the present invention, the edge computer is specifically used to: when the operating mode of the servo motor is the acceleration operating mode, the deceleration operating mode, or the constant-speed operating mode, among them, if the current speed of the traversing X-axis rear-wheel servo is greater than 0 and less than the first speed, torque compensation is performed according to the following formula (1); if the current speed of the traversing X-axis rear-wheel servo is greater than or equal to the first speed and less than the second speed, torque compensation is performed according to the following formula (2), and the second speed is greater than the first speed; if the current speed of the traversing X-axis rear-wheel servo is greater than or equal to the second speed and less than the third speed, torque compensation is performed according to the following formula (3), and the third speed is greater than the second speed;
[0012] TargettDAC = (213.5+0.277*M1)*M2 (1)
[0013] TargettDAC = (236 + 0.318 * (M1 - 150)) * M2 (2)
[0014] TargettDAC = (286.58 + 0.103 * (M1 - 350)) * M2 (3)
[0015] Among them, TargettDAC is the compensated torque, M1 is the target speed of the rear-wheel servo of the traversing X-axis, M2 is the movement direction of the servo motor, and M2 includes -1 and 1.
[0016] According to an embodiment of the present invention, the edge computer transmits the torque compensation instruction to the motion control card through EtherNET (Ethernet).
[0017] According to an embodiment of the present invention, the motion control card transmits the control signal to the servo driver of the servo motor through EtherCAT (Ethernet Control Automation Technology), and transmits the data of the servo motor fed back by the servo driver back to the edge computer.
[0018] An embodiment of the second aspect of the present invention proposes a control method for a servo motor. The servo motor includes: a traversing X-axis front-wheel servo and a traversing X-axis rear-wheel servo. The traversing X-axis front-wheel servo is configured in a torque control mode, and the traversing X-axis rear-wheel servo is configured in a position control mode. The control method includes the following steps: The edge computer obtains the torque of the traversing X-axis front-wheel servo and the speed of the traversing X-axis rear-wheel servo, compensates the torque of the traversing X-axis front-wheel servo according to the speed of the traversing X-axis rear-wheel servo and generates a torque compensation instruction, and transmits the torque compensation instruction to the motion control card; The motion control card converts the torque compensation instruction into a control signal and sends it to the servo driver of the servo motor, so that the servo driver drives the corresponding servo motor to move according to the control signal.
[0019] The control method for the servo motor proposed above by the present invention may further have the following additional technical features:
[0020] According to an embodiment of the present invention, torque compensation is performed on the torque of the traveling X-axis front-wheel servo according to the speed of the traveling X-axis rear-wheel servo, and a torque compensation instruction is generated, which specifically includes: obtaining the previous speed and the current speed of the traveling X-axis rear-wheel servo, and obtaining the operating mode of the servo motor according to the previous speed and the current speed, where the operating mode includes: an acceleration operating mode, a deceleration operating mode, a constant-speed operating mode, and a stop operating mode; if the operating mode of the servo motor is the stop operating mode, the torque of the traveling X-axis front-wheel servo is set to 0; if the operating mode of the servo motor is the acceleration operating mode, the deceleration operating mode, or the constant-speed operating mode, torque compensation is performed according to the current speed, the target speed, and the movement direction of the servo motor of the traveling X-axis rear-wheel servo.
[0021] According to an embodiment of the present invention, if the operating mode of the servo motor is the acceleration operating mode, the deceleration operating mode, or the constant-speed operating mode, torque compensation is performed according to the current speed, the target speed, and the movement direction of the servo motor of the traveling X-axis rear-wheel servo, which specifically includes: when the operating mode of the servo motor is the constant-speed operating mode, where if the current speed of the traveling X-axis rear-wheel servo is greater than 0 and less than the first speed, torque compensation is performed according to the following formula (1); if the current speed of the traveling X-axis rear-wheel servo is greater than or equal to the first speed and less than the second speed, torque compensation is performed according to the following formula (2), where the second speed is greater than the first speed; if the current speed of the traveling X-axis rear-wheel servo is greater than or equal to the second speed and less than the third speed, torque compensation is performed according to the following formula (3), where the third speed is greater than the second speed;
[0022] TargettDAC = (213.5+0.277*M1)*M2 (1)
[0023] TargettDAC = (236+0.318*(M1 - 150))*M2 (2)
[0024] TargettDAC = (286.58+0.103*(M1 - 350))*M2 (3)
[0025] Wherein, TargettDAC is the compensated torque, M1 is the target speed of the traveling X-axis rear-wheel servo, and M2 is the movement direction of the servo motor, and M2 includes -1 and 1.
[0026] According to an embodiment of the present invention, the edge computer transmits the torque compensation instruction to the motion control card through EtherNET.
[0027] According to an embodiment of the present invention, the motion control card sends the control signal to the servo driver of the servo motor through EtherCAT, and transmits the data of the servo motor fed back by the servo driver back to the edge computer.
[0028] Advantages of the present invention:
[0029] The present invention controls the servo motor with an edge computer and a motion control card as the core, has good stability, high data transmission and processing performance, can transplant the system and code on different hardware platforms, can achieve more complex motion trajectory control through the motion control card, and can perform torque compensation on the servo motor in real time according to the servo motor parameters, thereby improving the motion accuracy and stability of the servo motor. Description of the drawings
[0030] Figure 1 is a block diagram of a control system of a servo motor according to an embodiment of the present invention;
[0031] Figure 2 is a schematic diagram of the control principle of a control system of a servo motor according to an embodiment of the present invention;
[0032] Figure 3 is a flowchart of a control method of a servo motor according to an embodiment of the present invention. Detailed implementation manners
[0033] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0034] Figure 1 is a block diagram of a control system of a servo motor according to an embodiment of the present invention, wherein, as Figure 1 shown, the servo motor includes: a walking X-axis front-wheel servo and a walking X-axis rear-wheel servo. The walking X-axis front-wheel servo is configured in a torque control mode, and the walking X-axis rear-wheel servo is configured in a position control mode.
[0035] As Figure 1As shown, the servo motor may further include: a telescopic Y-axis servo, a lifting Z-axis front-wheel servo, and a rotating R-axis front-wheel stepper. Each servo represents an axis. According to the naming rules of different interfaces of the motion control card, the walking X-axis front-wheel servo, the walking X-axis rear-wheel servo, the telescopic Y-axis servo, the lifting Z-axis front-wheel servo, and the rotating R-axis front-wheel stepper are respectively named: axis 8, axis 9, axis 10, axis 11, and axis 12. In the present invention, axis 8 is configured with a torque control mode, and the remaining 4 axes are configured with a position control mode.
[0036] The control system includes: an edge computer and a motion control card; wherein, the edge computer is equipped with a linux operating system. The edge computer is used to obtain the torque of the walking X-axis front-wheel servo and the speed of the walking X-axis rear-wheel servo, and perform torque compensation on the torque of the walking X-axis front-wheel servo according to the speed of the walking X-axis rear-wheel servo and generate a torque compensation instruction, and transmit the torque compensation instruction to the motion control card; the motion control card is used to convert the torque compensation instruction into a control signal and send it to the servo driver of the servo motor, so that the servo driver drives the corresponding servo motor to move according to the control signal, and transmit the data of the servo motor fed back by the servo driver back to the edge computer.
[0037] Specifically, the edge computer is equipped with a linux operating system, and the main processing unit of its processor has a main frequency as high as 1.4 GHz, with characteristics such as cross-platform hardware support, multi-user multi-tasking, reliable security, and good stability. The edge computer has rich interface configurations such as 2 gigabit network ports, 1 RS232 interface, 4 RS485 interfaces, and HDMI and IPS video interfaces. The edge computer can well solve the shortage of IO ports through an IO (input / output) expansion board, and can perform efficient and fast IO signal transmission with the edge computer by means of an axis card, and has good processor performance to support a large amount of data calculation.
[0038] The motion control card is a hardware device that is inserted into the expansion slot of the edge computer or connected to the external device of the edge computer through an interface. The motion control card is responsible for receiving the torque compensation instruction sent by the edge computer, converting it into a control signal for controlling the movement of the servo motor and sending it to the servo driver, and transmitting the data fed back by the servo driver back to the edge computer. Generally speaking, the motion control card is a hardware device used to control various electromechanical devices such as sensors, servo motors, and stepper motors. The motion control card has more advanced motion control functions and better cost performance.
[0039] Such as Figure 1As shown in the figure, the entire control system takes the edge computer and the axis card as the core, realizes the servo motor control of the entire device and the acquisition and triggering of various sensor signals, and completes the motion control of the entire device. The edge computer performs torque compensation on the torque of the front servo of the traveling X-axis according to the speed of the rear servo of the traveling X-axis received, and generates a torque compensation instruction. The torque compensation instruction is transmitted to the motion control card through Gigabit Ethernet. The motion control card runs a multi-threaded basic program, performs secondary processing on the received torque compensation instruction, converts it into a control signal that can be recognized by the servo driver, and sends it to the servo driver of the servo motor. The servo driver drives the motor to run. The entire system has good stability, high-efficiency data transmission and processing performance, can transplant the system and code on different hardware platforms, can realize more complex motion trajectory control through the motion control card, and can perform torque compensation on the servo motor in real time according to the servo motor parameters, thereby improving the motion accuracy and stability of the servo motor.
[0040] In a specific embodiment of the present invention, the edge computer transmits the torque compensation instruction to the motion control card through EtherNET. The motion control card sends the control signal to the servo driver of the servo motor through EtherCAT, and transmits the data of the servo motor fed back by the servo driver back to the edge computer. Thus, it has more efficient data transmission.
[0041] The following describes how the edge computer generates the torque compensation instruction in combination with specific embodiments.
[0042] According to an embodiment of the present invention, as Figure 2 shown, the edge computer is specifically used for:
[0043] S1, obtaining the previous speed and the current speed of the rear servo of the traveling X-axis, and obtaining the servo motor operation mode according to the previous speed and the current speed. The operation mode includes: acceleration operation mode, deceleration operation mode, constant speed operation mode, and stop operation mode.
[0044] S2, if the operation mode of the servo motor is the stop operation mode, the torque of the front servo of the traveling X-axis is set to 0.
[0045] S3, if the operation mode of the servo motor is the acceleration operation mode, the deceleration operation mode, or the constant speed operation mode, perform torque compensation according to the current speed, the target speed of the rear servo of the traveling X-axis, and the motion direction of the servo motor.
[0046] As Figure 2 shown, the edge computer is specifically used for: when the operation mode of the servo motor is the acceleration operation mode, the deceleration operation mode, or the constant speed operation mode, where
[0047] S31, if the current speed of the rear-wheel servo of the X-axis travel is greater than 0 and less than the first speed, then torque compensation is performed according to the following formula (1).
[0048] S32, if the current speed of the rear-wheel servo of the X-axis travel is greater than or equal to the first speed and less than the second speed, then torque compensation is performed according to the following formula (2), where the second speed is greater than the first speed.
[0049] S33, if the current speed of the rear-wheel servo of the X-axis travel is greater than or equal to the second speed and less than the third speed, then torque compensation is performed according to the following formula (3), where the third speed is greater than the second speed.
[0050] Formulas (1), (2) and (3) are specifically as follows:
[0051] TargettDAC = (213.5 + 0.277 * M1) * M2 (1)
[0052] TargettDAC = (236 + 0.318 * (M1 - 150)) * M2 (2)
[0053] TargettDAC = (286.58 + 0.103 * (M1 - 350)) * M2 (3)
[0054] Among them, TargettDAC is the compensated torque, M1 is the target speed of the rear-wheel servo of the X-axis travel, and M2 is the movement direction of the servo motor. M2 includes -1 and 1.
[0055] In the present invention, the first speed, the second speed and the third speed are set in advance. For example, the first speed is 150 units, 350 units and 3000 units, and the third speed is the maximum speed of the rear-wheel servo of the X-axis travel.
[0056] When the servo motor is in the acceleration operation mode, the deceleration operation mode or the constant speed operation mode, in addition to performing torque compensation using the above formulas (1)-(3), the torque of the servo motor can also be further compensated by the following method.
[0057] According to an embodiment of the present invention, if the operation mode of the servo motor is the acceleration operation mode, the deceleration operation mode or the constant speed operation mode, the target speed of the servo motor is obtained, and torque compensation is performed on the servo motor according to the target speed and the torque compensation table.
[0058] Among them, the torque compensation table is pre-stored in advance. The torque compensation table is obtained in the following specific way: control the servo motor to run at the target speed, obtain the torque current data of the rear servo of the traveling X-axis, and then obtain the feedback torque current curve of the rear servo of the traveling X-axis; perform a moving average process on the data of multiple rotors in the feedback torque current curve data, and determine whether the feedback torque current curve converges; if it converges, repeat the above steps at multiple pre-selected target speeds, and then obtain the torque compensation table at different target speeds; store the torque compensation tables at all target speeds.
[0059] Furthermore, the process of determining whether the feedback torque current curve converges includes: calculating the average value of the feedback torque currents at the same angle in multiple feedback torque current curves to obtain an initial average value feedback torque current curve. During the subsequent continuous rotation process, continue to update the average value feedback torque current curve with the new feedback torque current curve, and calculate the absolute value of the difference between the new feedback torque current curve and the average value feedback torque current curve at each same angle. Accumulate the absolute values of the differences obtained at each angle. Calculate the accumulated sum once for each cycle of feedback torque current curve collected. Determine whether the difference between the accumulated sum of this cycle and the accumulated sum of the previous cycle is less than K1 times the accumulated sum. If so, it is considered that the curve converges; if not, it is considered that the torque fluctuation is irregular or there is an external force influence, and it is considered that the curve does not converge, and the process of obtaining the torque compensation table is re-executed. K1 can be 15%-25%, for example, 20%.
[0060] In summary, according to the control system of the servo motor in the embodiments of the present invention, the servo motor is controlled with the edge computer and the motion control card as the core, which has good stability, high data transmission and processing performance, can transplant the system and code on different hardware platforms, can realize more complex motion trajectory control through the motion control card, and can perform torque compensation on the servo motor in real time according to the servo motor parameters, thereby improving the motion accuracy and stability of the servo motor.
[0061] Corresponding to the above control system of the servo motor, the present invention also proposes a control method for the servo motor. Since the method embodiments of the present invention correspond to the above system embodiments, for the details not disclosed in the method embodiments, reference can be made to the above method embodiments, and the present invention will not be elaborated herein.
[0062] In the embodiments of the present invention, the servo motor includes: a front servo of the traveling X-axis and a rear servo of the traveling X-axis. The front servo of the traveling X-axis is configured in a torque control mode, and the rear servo of the traveling X-axis is configured in a position control mode;
[0063] As Figure 3 shown, the control method includes the following steps:
[0064] S10, The edge computer obtains the torque of the front servo of the X-axis of the traversing mechanism and the speed of the rear servo of the X-axis of the traversing mechanism, compensates the torque of the front servo of the X-axis of the traversing mechanism according to the speed of the rear servo of the X-axis of the traversing mechanism and generates a torque compensation instruction, and transmits the torque compensation instruction to the motion control card.
[0065] S20, The motion control card converts the torque compensation instruction into a control signal and sends it to the servo driver of the servo motor, so that the servo driver drives the corresponding servo motor to move according to the control signal.
[0066] According to an embodiment of the present invention, compensating the torque of the front servo of the X-axis of the traversing mechanism according to the speed of the rear servo of the X-axis of the traversing mechanism and generating a torque compensation instruction specifically includes: obtaining the previous speed and the current speed of the rear servo of the X-axis of the traversing mechanism, and obtaining the operating mode of the servo motor according to the previous speed and the current speed. The operating modes include: acceleration operating mode, deceleration operating mode, constant speed operating mode, and stop operating mode; if the operating mode of the servo motor is the stop operating mode, the torque of the front servo of the X-axis of the traversing mechanism is set to 0; if the operating mode of the servo motor is the acceleration operating mode, deceleration operating mode, or constant speed operating mode, torque compensation is performed according to the current speed, target speed of the rear servo of the X-axis of the traversing mechanism, and the motion direction of the servo motor.
[0067] According to an embodiment of the present invention, if the operating mode of the servo motor is the acceleration operating mode, deceleration operating mode, or constant speed operating mode, torque compensation is performed according to the current speed, target speed of the rear servo of the X-axis of the traversing mechanism, and the motion direction of the servo motor. Among them, if the current speed of the rear servo of the X-axis of the traversing mechanism is greater than 0 and less than the first speed, torque compensation is performed according to the following formula (1); if the current speed of the rear servo of the X-axis of the traversing mechanism is greater than or equal to the first speed and less than the second speed, torque compensation is performed according to the following formula (2), and the second speed is greater than the first speed; if the current speed of the rear servo of the X-axis of the traversing mechanism is greater than or equal to the second speed and less than the third speed, torque compensation is performed according to the following formula (3), and the third speed is greater than the second speed;
[0068] TargettDAC = (213.5+0.277*M1)*M2 (1)
[0069] TargettDAC = (236+0.318*(M1 - 150))*M2 (2)
[0070] TargettDAC = (286.58+0.103*(M1 - 350))*M2 (3)
[0071] Among them, TargettDAC is the compensated torque, M1 is the target speed of the rear-wheel servo in the deformed X-axis, and M2 is the movement direction of the servo motor. M2 includes -1 and 1. According to an embodiment of the present invention, the edge computer transmits the torque compensation instruction to the motion control card through EtherNET.
[0072] According to an embodiment of the present invention, the motion control card sends the control signal to the servo driver of the servo motor through EtherCAT, and transmits the data of the servo motor fed back by the servo driver back to the edge computer.
[0073] In summary, the control method of the servo motor according to the embodiment of the present invention controls the servo motor with the edge computer and the motion control card as the core, has good stability, high data transmission and processing performance, can transplant the system and code on different hardware platforms, can realize more complex motion trajectory control through the motion control card, and compensates the torque of the servo motor in real time according to the servo motor parameters, thereby improving the motion accuracy and stability of the servo motor.
[0074] In the description of this specification, the description with reference to terms such as "an embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.
[0075] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, "a plurality" means at least two, such as two, three, etc., unless otherwise specifically defined.
[0076] Any process or method description represented in a flowchart or otherwise described herein can be understood to represent a module, segment, or portion of code including one or more executable instructions for implementing a customized logical function or process, and the scope of the preferred embodiments of the present invention includes additional implementations, where functions may be executed in a substantially simultaneous manner or in a reverse order according to the functions involved, rather than in the order shown or discussed, which should be understood by those skilled in the art to which the embodiments of the present invention pertain.
[0077] The logic and / or steps represented in a flowchart or otherwise described herein, for example, can be considered a sequenced list of executable instructions for implementing a logical function, and can be embodied specifically in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium include the following: an electrical connection having one or more wires (electronic device), a portable computer diskette (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable medium on which the program can be printed, as the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpretation, or otherwise appropriate processing if necessary, and then stored in a computer memory.
[0078] It should be understood that various parts of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), and the like.
[0079] Those of ordinary skill in the art can understand that all or part of the steps carried out in the methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiments.
[0080] In addition, each functional unit in various embodiments of the present invention can be integrated in a processing module, can exist physically alone for each unit, or two or more units can be integrated in a module. The above integrated module can be implemented in the form of hardware or in the form of a software functional module. When the above integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0081] The above-mentioned storage medium can be a read-only memory, a magnetic disk, an optical disk, etc. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.
Claims
1. A control system for a servo motor, characterized in that, The servo motor includes: a traveling X-axis front-wheel servo and a traveling X-axis rear-wheel servo. The traveling X-axis front-wheel servo is configured in a torque control mode, and the traveling X-axis rear-wheel servo is configured in a position control mode; The control system includes: an edge computer and a motion control card; wherein, the edge computer is equipped with a linux operating system. The edge computer is used to obtain the torque of the traveling X-axis front-wheel servo and the speed of the traveling X-axis rear-wheel servo, and perform torque compensation on the torque of the traveling X-axis front-wheel servo according to the speed of the traveling X-axis rear-wheel servo and generate a torque compensation instruction, and transmit the torque compensation instruction to the motion control card; The motion control card is used to convert the torque compensation instruction into a control signal and send it to the servo driver of the servo motor, so that the servo driver drives the corresponding servo motor to move according to the control signal, and transmit the data of the servo motor fed back by the servo driver back to the edge computer; Specifically, the edge computer is used to: obtain the previous speed and the current speed of the traveling X-axis rear-wheel servo, and obtain the operating mode of the servo motor according to the previous speed and the current speed. The operating mode includes: an acceleration operating mode, a deceleration operating mode, a constant-speed operating mode, and a stop operating mode; If the operating mode of the servo motor is the stop operating mode, the torque of the traveling X-axis front-wheel servo is set to 0; If the operating mode of the servo motor is the acceleration operating mode, the deceleration operating mode, or the constant-speed operating mode, torque compensation is performed according to the current speed, the target speed of the traveling X-axis rear-wheel servo, and the motion direction of the servo motor; When the operating mode of the servo motor is the acceleration operating mode, the deceleration operating mode, or the constant-speed operating mode: If the current speed of the traveling X-axis rear-wheel servo is greater than 0 and less than the first speed, torque compensation is performed according to the following formula (1); If the current speed of the traveling X-axis rear-wheel servo is greater than or equal to the first speed and less than the second speed, torque compensation is performed according to the following formula (2), and the second speed is greater than the first speed; If the current speed of the traveling X-axis rear-wheel servo is greater than or equal to the second speed and less than the third speed, torque compensation is performed according to the following formula (3), and the third speed is greater than the second speed; TargettDAC = (213.5+0.277*M1)*M2 (1) TargettDAC = (236+0.318*(M1 - 150))*M2 (2) TargettDAC = (286.58+0.103*(M1 - 350))*M2 (3) Wherein, TargettDAC is the compensated torque, M1 is the target speed of the traveling X-axis rear-wheel servo, and M2 is the motion direction of the servo motor. M2 includes -1 and 1.
2. The control system of the servo motor according to claim 1, characterized in that, The edge computer transmits the torque compensation instruction to the motion control card through EtherNET.
3. The control system of the servo motor according to claim 1, characterized in that, The motion control card sends the control signal to the servo driver of the servo motor through EtherCAT and transmits the data of the servo motor fed back by the servo driver back to the edge computer.
4. A control method for a servo motor, characterized in that, The servo motor includes a walking X-axis front-wheel servo and a walking X-axis rear-wheel servo. The walking X-axis front-wheel servo is configured in a torque control mode, and the walking X-axis rear-wheel servo is configured in a position control mode. The control method includes the following steps: The edge computer obtains the torque of the walking X-axis front-wheel servo and the speed of the walking X-axis rear-wheel servo, performs torque compensation on the torque of the walking X-axis front-wheel servo according to the speed of the walking X-axis rear-wheel servo and generates a torque compensation instruction, and transmits the torque compensation instruction to the motion control card; The motion control card converts the torque compensation instruction into a control signal and sends it to the servo driver of the servo motor, so that the servo driver drives the corresponding servo motor to move according to the control signal. Performing torque compensation on the torque of the walking X-axis front-wheel servo according to the speed of the walking X-axis rear-wheel servo and generating a torque compensation instruction specifically includes: obtaining the previous speed and the current speed of the walking X-axis rear-wheel servo, and obtaining the operation mode of the servo motor according to the previous speed and the current speed. The operation mode includes: an acceleration operation mode, a deceleration operation mode, a constant-speed operation mode, and a stop operation mode. If the operation mode of the servo motor is the stop operation mode, the torque of the walking X-axis front-wheel servo is set to 0. If the operation mode of the servo motor is the acceleration operation mode, the deceleration operation mode, or the constant-speed operation mode, torque compensation is performed according to the current speed, the target speed of the walking X-axis rear-wheel servo, and the motion direction of the servo motor. When the operation mode of the servo motor is the acceleration operation mode, the deceleration operation mode, or the constant-speed operation mode: If the current speed of the walking X-axis rear-wheel servo is greater than 0 and less than the first speed, torque compensation is performed according to the following formula (1). If the current speed of the walking X-axis rear-wheel servo is greater than or equal to the first speed and less than the second speed, torque compensation is performed according to the following formula (2), and the second speed is greater than the first speed. If the current speed of the walking X-axis rear-wheel servo is greater than or equal to the second speed and less than the third speed, torque compensation is performed according to the following formula (3), and the third speed is greater than the second speed. TargettDAC = (213.5 + 0.277 * M1) * M2 (1) TargettDAC = (236 + 0.318 * (M1 - 150)) * M2 (2) TargettDAC = (286.58 + 0.103 * (M1 - 350)) * M2 (3) Wherein, TargettDAC is the compensated torque, M1 is the target speed of the walking X-axis rear-wheel servo, and M2 is the motion direction of the servo motor. M2 includes -1 and 1.
5. The control method of the servo motor according to claim 4, characterized in that The edge computer transmits the torque compensation instruction to the motion control card through EtherNET.
6. The control method of the servo motor according to claim 4, wherein The motion control card sends the control signal to the servo driver of the servo motor through EtherCAT, and transmits the data of the servo motor fed back by the servo driver back to the edge computer.
Citation Information
Patent Citations
Motor vehicles and their control methods
CN102275580A
Control method for electric motor vehicle and control device for electric motor vehicle
WO2023032012A1