Control method and system based on low-voltage servo drive board
In the low-voltage servo drive plate control method, the number of rotations required by the servo motor is analyzed and the current and voltage is adjusted according to the feedback value, and the control problem of the low-voltage servo motor under different load conditions is solved, and efficient power regulation and working efficiency improvement is achieved.
Patent Information
- Application Number
- CN202510004644.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-02
- Publication Date
- 2025-04-11
AI Technical Summary
In the control of low-voltage servo motors, it is difficult to effectively control the servo motor under different load conditions, resulting in a deviation from the user's control degree and affecting working efficiency.
A control method based on a low-voltage servo drive plate is proposed. By obtaining control instructions, the number of rotations required for the servo motor is analyzed and divided into the number of detection turns and the number of supplementary turns. According to the feedback value of the terminal device, the current and voltage are adjusted to update the input of the drive board, and the duty cycle of the PWM signal is adjusted through the PID controller to ensure effective control of the servo motor under different load conditions.
Power adjustment can be achieved without additional weight detection units under different load conditions, improving the practicality and working efficiency of low-voltage servo motors, ensuring that the servo motors can meet the needs of different loads.
Smart Images

Figure CN119813838A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robot control technology, and in particular to a control method and system based on a low-voltage servo drive board. Background Art
[0002] The driver board of the servo motor, as the core component of industrial automation control, bears the heavy responsibility of accurately converting the control signal into the servo motor action command. With the continuous progress of electronic technology and control theory, the servo driver board has undergone a significant transformation from traditional analog control to modern digital control. The core of the driver board lies in its integration of precise current control algorithms and speed and position feedback mechanisms. Through PWM (pulse width modulation) technology, the driver board can finely adjust the current of the servo motor winding to achieve precise control of the servo motor output torque. At the same time, the built-in encoder interface receives the position and speed feedback signals from the servo motor, and after comparing them with the set value, adjusts the output through the PID (proportional-integral-differential) control algorithm to ensure stable and accurate operation of the servo motor.
[0003] However, in the control of low-voltage servo motors, the power supply voltage of low-voltage servo motors is low, usually below 48V, which results in relatively small output power of the driver board and torque of the servo motor. When the terminal equipment equipped with this low-voltage servo motor is working under load, due to its insufficient power, the action completion of the terminal equipment deviates from the user's control, resulting in the terminal equipment being unable to automatically complete the corresponding work, requiring staff to constantly adjust and debug. Moreover, each time the weight of the load is different, staff are required to debug, which seriously affects the efficiency of the work. Summary of the invention
[0004] In view of the above-mentioned defects, the purpose of the present invention is to propose a control method and system based on a low-voltage servo driver board to solve the problem in the prior art that it is difficult to control the servo motor to meet the control requirements under different load conditions.
[0005] To achieve this purpose, the present invention adopts the following technical solution: a control method based on a low-voltage servo drive board, comprising the following steps:
[0006] Step S1: Obtain control instructions, parse the number of revolutions required for the servo motor based on the control instructions, and divide the number of revolutions into detection revolutions and supplementary revolutions;
[0007] Step S2: using the number of detected turns as an input of the first control circuit, obtaining a feedback value of the terminal device, and determining whether the feedback value is less than a preset value;
[0008] If it is less than the preset value, the current input is adjusted based on the current voltage, the current and voltage inputs of the driving board are updated based on the adjusted voltage and current, the phase difference number of turns is obtained according to the feedback value, the phase difference number of turns and the supplementary number of turns are added to obtain the final input number of turns, and the final input number of turns is used as the input of the second control circuit;
[0009] If it is equal to the preset value, the supplementary number of turns is used as the input of the first control circuit.
[0010] Preferably, in step S2, the step of adjusting the current input by the current voltage is as follows:
[0011] Step S21: determining whether the current voltage is within a preset range, and if not, adjusting the voltage through a buck circuit to obtain an adjusted voltage;
[0012] Step S22: Calculate the current value required for adjusting the power based on the voltage.
[0013] Preferably, the specific steps of step S22 are as follows:
[0014] Step S221: obtaining a current current value, and adding the current current value according to a preset current value to obtain a processed current value;
[0015] Step S222: using the processed current value and the adjusted voltage to input the current and voltage of the driving board to obtain a feedback angle;
[0016] Step S223: determine whether the feedback angle falls within the preset angle. If not, obtain the duty cycle of the pulse signal PWN of the feedback angle and execute step S224. If it falls within the preset angle, execute step S228.
[0017] Step S224: setting a desired current value based on the first duty cycle of the pulse signal;
[0018] Step S225: Taking the first difference between the expected current value and the processed current value as the input of the PID controller, wherein the PID controller is composed of three parts: the proportional term P(t) = K p ·e(t);
[0019] Integral Item
[0020] Differential term
[0021] Where K p , K i , K d are proportional gain, integral gain and differential gain respectively, and e(t) is the first error;
[0022] Output signal u(t)=P(t)+I(t)+D(t);
[0023] Step S226: Update the first duty cycle according to the output u(t) of the PID controller, wherein the updating formula is as follows: Duty(t)=max(0,min(1,Duty in +u(t)));
[0024] Duty in is the first duty cycle of the pulse signal;
[0025] Step S227: passing the updated duty cycle to the PWM generator to update the duty cycle of the PWM signal. After adjusting the duty cycle, detecting the current value of the driving board, using the current value as the processing current value, and executing step S222;
[0026] Step S228: output the processed current value at this time as the adjusted current value.
[0027] Preferably, in step S227, the updated duty cycle is transmitted to the PWM generator as follows:
[0028] Obtaining a second difference between the updated duty cycle and the first duty cycle;
[0029] Determine whether the second difference is greater than the duty cycle threshold. If so, directly pass the updated duty cycle to the PWM generator. If so, use 1 / 2 of the second difference plus the first duty cycle as the first adjusted duty cycle, and pass the first adjusted duty cycle to the PWM generator. After waiting for the threshold time, use 1 / 2 of the second difference plus the first adjusted duty cycle as the second adjusted duty cycle, and pass the second adjusted duty cycle to the PWM generator.
[0030] Preferably, the second control circuit includes a main control circuit, a power conversion circuit, a drive protection circuit, a braking circuit, a CAN communication circuit, a 485 communication circuit, an Ethernet communication circuit, an output end encoder, a terminal multi-turn encoder and an encoder battery;
[0031] The power conversion circuit is used to access the power supply and convert the power supply into a working voltage, and the power conversion circuit outputs the working voltage to the main control circuit;
[0032] The main control circuit is electrically connected to the drive protection circuit, the brake circuit, the CAN communication circuit, the 485 communication circuit and the Ethernet communication circuit respectively; the main control circuit is used to control the drive protection circuit to drive the servo motor to work; the main control circuit controls the brake circuit to realize the brake function of the servo motor; the CAN communication circuit, the 485 communication circuit and the Ethernet communication circuit are respectively used to perform data transmission;
[0033] The encoder battery is used to power the output end encoder and the terminal multi-turn encoder respectively; the output end encoder collects the rotation data of the output end of the servo motor, and the terminal multi-turn encoder is used to collect the rotation data of the terminal of the servo motor; the output end encoder and the terminal multi-turn encoder are respectively connected to the main control circuit; the main control circuit collects the rotation data of the output end encoder and the terminal multi-turn encoder and controls the operation of the brake circuit and the drive protection circuit to realize the drive control of the servo motor;
[0034] The power conversion circuit comprises a first power conversion unit, a second power conversion unit and a third power conversion unit which are electrically connected in sequence;
[0035] The first power conversion unit is used to connect the power supply, and the first power conversion unit is used to convert 48V into 12V; the second power conversion unit is used to convert 12V into 5V; the third power conversion unit is used to convert 5V into 3.3V;
[0036] The drive protection circuit comprises a pre-drive overcurrent detection circuit and a three-phase sampling circuit; the output end of the pre-drive overcurrent detection circuit is connected to the main control circuit, the output end of the pre-drive overcurrent detection circuit is connected to the output end of the three-phase sampling circuit, and the output end of the three-phase sampling circuit is connected to the servo motor;
[0037] The braking circuit includes a resistor R105, a resistor R107, a bidirectional TVS tube D23, a capacitor C115, a driver U9, a resistor R108, a resistor R106, a resistor R109, a capacitor C113, a MOS tube Q7, a capacitor C114, a resistor R110, a unidirectional diode D22, a unidirectional diode D20, an interface terminal J10, a unidirectional diode D21, a capacitor C112 and a unidirectional diode D19;
[0038] The first end of the resistor R105 is connected to the main control circuit, the second end of the resistor R105 is respectively connected to the first end of the bidirectional TVS tube D23 and the positive output end of the driver U9, the first end of the resistor R107 is grounded, the second end of the resistor R107 is respectively connected to the second end of the bidirectional TVS tube D23, the negative output end of the driver U9 and the first end of the resistor R106; the output end of the driver U9 is connected to the first end of the resistor R108, the second end of the resistor R108 is respectively connected to the first end of the resistor R109, the second end of the capacitor C113 and the gate of the MOS tube Q7; the second end of the resistor R106 is respectively connected to the second end of the resistor R109, the first end of the capacitor C113, the source of the MOS tube Q7 and the first end of the capacitor C114, the second end of the capacitor C114 is connected to the first end of the resistor R110, and the second end of the resistor R110 is connected to the drain of the MOS tube Q7;
[0039] A first end of the capacitor C115 is grounded, and a second end of the capacitor C115 is connected to the power conversion circuit, and the power conversion circuit is used to provide power for the driver U9;
[0040] The anode of the unidirectional diode D22 is connected to the anode of the unidirectional diode D20 and the drain of the MOS tube Q7 respectively, and the cathode of the unidirectional diode D22 is connected to BKV+ and BKV- to connect to the external power supply of the brake coil;
[0041] The cathode of the unidirectional diode D22 is respectively connected to the interface terminal J10, the cathode of the unidirectional diode D21, the second end of the capacitor C112 and the cathode of the unidirectional diode D19; the anode of the unidirectional diode D21 is connected to the servo motor; the first end of the capacitor C112 is grounded, and the anode of the unidirectional diode D19 is used to connect to the signal input VIN port.
[0042] A control system based on a low-voltage servo driver board, using the control method based on the low-voltage servo driver board, comprising a division module and a control module;
[0043] The division module is used to obtain the control instruction, parse the number of revolutions required by the servo motor based on the control instruction, and divide the number of revolutions into the detection number of revolutions and the supplementary number of revolutions;
[0044] The control module is used to use the number of detected turns as the input of the first control circuit, obtain the feedback value of the terminal device, and determine whether the feedback value is less than a preset value;
[0045] If it is less than the preset value, the current input is adjusted based on the current voltage, the current and voltage inputs of the driving board are updated based on the adjusted voltage and current, the phase difference number of turns is obtained according to the feedback value, the phase difference number of turns and the supplementary number of turns are added to obtain the final input number of turns, and the final input number of turns is used as the input of the second control circuit;
[0046] If it is equal to the preset value, the supplementary number of turns is used as the input of the first control circuit.
[0047] Preferably, the control module includes a voltage regulation module and a current regulation module;
[0048] The voltage regulation module is used to determine whether the current voltage is within a preset range. If not, the voltage is regulated by a buck circuit to obtain the regulated voltage.
[0049] The current regulating module is used to calculate the current value required for regulating power based on the voltage.
[0050] Preferably, the current regulating module includes a first unit, a second unit, a third unit, a fourth unit, a fifth unit, a sixth unit, a seventh unit and an eighth unit;
[0051] The first unit is used to obtain the current current value, and add the current current value according to the preset current value to obtain the processed current value;
[0052] The second unit is used to use the processed current value and the regulated voltage to the current and voltage input of the driving board to obtain the feedback angle;
[0053] The third unit is used to determine whether the feedback angle falls within the preset angle. If it does not fall within the preset angle, the duty cycle of the pulse signal PWN of the feedback angle is obtained, and the fourth unit is called. If it falls within the preset angle, the eighth unit is called;
[0054] The fourth unit is used to set the expected current value based on the first duty cycle of the pulse signal;
[0055] The fifth unit is used to use a first difference between the expected current value and the processed current value as an input of the PID controller;
[0056] The sixth unit is used for updating the first duty cycle according to the output u(t) of the PID controller;
[0057] The seventh unit is used to pass the updated duty cycle to the PWM generator to update the duty cycle of the PWM signal. After adjusting the duty cycle, the current value of the driver board is detected, and the current value is used as the processing current value to call the second unit;
[0058] The eighth unit outputs the processed current value at this time as the adjusted current value.
[0059] Preferably, the seventh unit includes a stabilizing subunit;
[0060] The stabilizing subunit is used to obtain a second difference between the updated duty cycle and the first duty cycle;
[0061] Determine whether the second difference is greater than the duty cycle threshold. If so, directly pass the updated duty cycle to the PWM generator. If so, use 1 / 2 of the second difference plus the first duty cycle as the first adjusted duty cycle, and pass the first adjusted duty cycle to the PWM generator. After waiting for the threshold time, use 1 / 2 of the second difference plus the first adjusted duty cycle as the second adjusted duty cycle, and pass the second adjusted duty cycle to the PWM generator.
[0062] One of the above technical solutions has the following advantages or beneficial effects: the present invention can instantly complete the power adjustment of different loads without adding an additional weight detection unit. Without increasing the additional expenditure of the equipment, the low-voltage servo motor can also meet the usage scenario requirements of different loads, thereby greatly improving the practicality of the low-voltage servo motor. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 is a flow chart of an embodiment of the method of the present invention.
[0064] Figure 2 It is a schematic diagram of the structure of an embodiment of the system of the present invention.
[0065] Figure 3 is a circuit diagram of a second circuit provided by an embodiment of the present invention;
[0066] Figure 4 yes Figure 3 A partial enlarged view of
[0067] Figure 5 is a circuit diagram of a first power conversion unit provided by an embodiment of the present invention;
[0068] Figure 6 is a circuit diagram of a second power conversion unit and a third power conversion unit provided by an embodiment of the present invention;
[0069] Figure 7 is a circuit diagram of a main control circuit provided by an embodiment of the present invention;
[0070] Figure 8 is a circuit diagram of a pre-drive overcurrent detection circuit provided by an embodiment of the present invention;
[0071] Fig. 9 is a circuit diagram of a three-phase sampling circuit provided by an embodiment of the present invention;
[0072] Fig.10 is a circuit diagram of a braking circuit provided by an embodiment of the present invention;
[0073] Fig.11 is a circuit diagram of a CAN communication circuit provided by an embodiment of the present invention;
[0074] Fig.12 is a circuit diagram of a 485 communication circuit provided by an embodiment of the present invention;
[0075] Fig.13 is a circuit diagram of an EtherCAT slave provided by an embodiment of the present invention;
[0076] Fig.14 The circuit diagram of the protection circuit of the Ethernet communication circuit provided by the embodiment of the present invention is
[0077] Fig.15 It is an interface circuit diagram of an Ethernet communication circuit provided by an embodiment of the present invention.
[0078] In the figure, 1. main control circuit, 2. power conversion circuit, 21. first power conversion unit, 22. second power conversion unit, 23. third power conversion unit, 3. drive protection circuit, 31. pre-drive overcurrent detection circuit, 32. three-phase sampling circuit, 4. braking circuit, 5. CAN communication circuit, 6. 485 communication circuit, 7. Ethernet communication circuit, 71. isolation transformer, 72. EtherCAT slave station, 73. parameter memory, 8. output end encoder, 9. terminal multi-turn encoder, 10. encoder battery. DETAILED DESCRIPTION
[0079] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions from beginning to end. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0080] In the description of the embodiments of the present invention, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0081] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, the meaning of "plurality" is two or more. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0082] like Figures 1 to 15 As shown, a control method based on a low-voltage servo driver board comprises the following steps:
[0083] Step S1: Obtain control instructions, parse the number of revolutions required for the servo motor based on the control instructions, and divide the number of revolutions into detection revolutions and supplementary revolutions;
[0084] Step S2: using the number of detected turns as an input of the first control circuit, obtaining a feedback value of the terminal device, and determining whether the feedback value is less than a preset value;
[0085] If it is less than the preset value, the current input is adjusted based on the current voltage, the current and voltage inputs of the driving board are updated based on the adjusted voltage and current, the phase difference number of turns is obtained according to the feedback value, the phase difference number of turns and the supplementary number of turns are added to obtain the final input number of turns, and the final input number of turns is used as the input of the second control circuit;
[0086] If it is equal to the preset value, the supplementary number of turns is used as the input of the first control circuit.
[0087] Since the existing terminal equipment may not be able to load weight sensing equipment, it is impossible to determine whether it is currently in a load state when executing an action. For this reason, in the present invention, after obtaining the control instruction, it will be parsed based on the control instruction to determine the number of turns the servo motor needs to rotate after the execution of the control instruction. At this time, the number of turns is the number of turns measured when no-load; then the number of turns is divided into the number of detection turns and the number of supplementary turns according to the ratio of 3:7. The number of detection turns is used as the input of the first control circuit, wherein the first control circuit is a control circuit of an ordinary low-voltage servo motor, wherein the number of turns rotated in the case of no-load is linearly related to time, and the number of detection turns as the input of the first control circuit is actually to control the power-on time of the first control circuit. If in the no-load state, after the number of detection turns is input, the feedback value of the terminal device is equal to the preset value. When in the load state, it is less than the preset value, wherein the preset value is the number of turns and the feedback value of the terminal device in the no-load state. For example, in a lifted terminal device, when in the no-load state, after the number of detection turns is input, it may be lifted by 1cm. , at this time 1cm is the preset value of the corresponding number of circles, and when it is in the load state, the input detection number of circles may rise by 0.5cm, which is less than the preset value. Therefore, the feedback value can be used to determine whether the current terminal device is in the load state.
[0088] If it is not in a load state, the first control circuit can be directly used to take the remaining supplementary turns as its input. After completing the work of supplementary turns and detection turns, the terminal device can meet the control requirements of the control instructions issued by the user. When it is in a load state, if the ordinary first control circuit is continued to be used, the power cannot be increased and the control requirements of the user cannot be met. For this reason, the second control circuit is replaced to control the terminal device at this time. The second control circuit is a circuit with a larger MOS tube, which can increase the power of the servo drive by increasing the current. Since the MOS tube needs to convert the high-level signal into a higher voltage (such as 12V or higher) before it can be fully started, the voltage needs to be adjusted to meet the MOS tube's start-up requirements. In addition, since the power is determined by voltage and current together. Therefore, the current needs to be recalculated based on the adjusted voltage.
[0089] Since the corresponding feedback value was not reached when the detection number of turns was used for detection, the number of turns rotated by the servo motor is insufficient. Therefore, it is necessary to obtain the phase difference number of turns based on the feedback value, which can be calculated based on the ratio of the feedback value to the number of turns. Again, no further explanation will be given. Then, the remaining number of turns (the final input number of turns) can be obtained by adding the phase difference number of turns to the supplementary number of turns. The final input number of turns is input to the second control circuit that adjusts the voltage and current, so that the terminal device can meet the needs of the user. The present invention can instantly complete the power adjustment of different loads without adding extra weight to the detection unit. Without increasing the additional expenditure of the equipment, the low-voltage servo motor can also meet the use scenario requirements of different loads, which greatly improves the practicality of the low-voltage servo motor.
[0090] Preferably, in step S2, the step of adjusting the current input by the current voltage is as follows:
[0091] Step S21: determining whether the current voltage is within a preset range, and if not, adjusting the voltage through a buck circuit to obtain an adjusted voltage;
[0092] Step S22: Calculate the current value required for adjusting the power based on the voltage.
[0093] Since it is in a load state at this time, the second control circuit needs to be called for control. The second control circuit is equipped with a MOS tube, which requires a higher voltage level to start. Therefore, it is necessary to determine whether the current voltage is within the range that the MOS tube can start. If not, the buck circuit needs to convert the large voltage (48V) into a low voltage (10-12V) to meet the start-up of the MOS tube. Then the current value required to adjust the power is calculated based on the voltage.
[0094] Preferably, the specific steps of step S22 are as follows:
[0095] Step S221: obtaining a current current value, and adding the current current value according to a preset current value to obtain a processed current value;
[0096] Step S222: using the processed current value and the adjusted voltage to input the current and voltage of the driving board to obtain a feedback angle;
[0097] Step S223: determine whether the feedback angle falls within the preset angle. If not, obtain the duty cycle of the pulse signal PWN of the feedback angle and execute step S224. If it falls within the preset angle, execute step S228.
[0098] Step S224: setting a desired current value based on the first duty cycle of the pulse signal;
[0099] Step S225: Taking the first difference between the expected current value and the processed current value as the input of the PID controller, wherein the PID controller is composed of three parts: the proportional term P(t) = K p ·e(t);
[0100] Integral Item
[0101] Differential term
[0102] Where K p , K i , K d are proportional gain, integral gain and differential gain respectively, and e(t) is the first error;
[0103] Output signal u(t)=P(t)+I(t)+D(t);
[0104] Step S226: Update the first duty cycle according to the output u(t) of the PID controller, wherein the updating formula is as follows: Duty(t)=max(0,min(1,Duty in +u(t)));
[0105] Duty in is the first duty cycle of the pulse signal;
[0106] Step S227: passing the updated duty cycle to the PWM generator to update the duty cycle of the PWM signal. After adjusting the duty cycle, detecting the current value of the driving board, using the current value as the processing current value, and executing step S222;
[0107] Step S228: output the processed current value at this time as the adjusted current value.
[0108] Since the voltage has changed at this time, the previous feedback value cannot be used for subsequent calculations. Therefore, in the present invention, the current current will be increased according to the preset current value to obtain the processed current value, and the processed current value will be used for detection and testing to obtain the feedback angle of the servo motor. The difference between the feedback angle and the preset angle can be used to determine whether the increased preset current value meets the driving requirements. If not, the duty cycle of the PWN of the pulse signal can be obtained based on the feedback angle obtained at this time due to the voltage stability. The essence of duty cycle regulation is to control the average current flowing through the load by changing the conduction time of the switch tube (such as MOSFET, IGBT, etc.). When the duty cycle increases, the conduction time of the switch tube becomes longer, and the average current flowing through the load also increases accordingly; when the duty cycle decreases, the conduction time of the switch tube becomes shorter, and the average current flowing through the load also decreases accordingly. In addition, duty cycle regulation can also realize the control of the dynamic response and stability of the circuit. The size of the first duty cycle of the pulse signal described in the present invention sets the expected current value. The expected current value at this time is the current value that can adjust the first duty cycle to meet the control of the terminal device, which can be carried out through the ratio between the duty cycle and the current value. At this time, the first difference between the expected current value and the processed current value can be obtained. Therefore, it is the key to solve the problem of the present invention to reasonably adjust the current according to the first difference. The present invention can adjust the duty cycle of the PWM signal according to the first difference between the actual current value and the expected current value through the PID controller feedback mechanism, so as to achieve accurate control and stable output of the current. Then after adjusting the duty cycle, the current value at this time will be detected again, and then step S222 will be re-executed for verification or adjustment. When the feedback angle falls into the preset angle, the processed current value at this time meets the control requirements, so the processed current value can be output. If it does not fall into the preset angle, the adjustment will continue until the feedback angle falls into the preset angle. In addition, the cyclic adjustment mechanism of the present invention ensures the accurate control of the current value, and also simplifies the acquisition process of the current value, because each adjustment is based on the actual measurement value of the last time, and its adjustment value is constantly reduced, and the accuracy will also increase accordingly.
[0109] Preferably, in step S227, the updated duty cycle is transmitted to the PWM generator as follows:
[0110] Obtaining a second difference between the updated duty cycle and the first duty cycle;
[0111] Determine whether the second difference is greater than the duty cycle threshold. If so, directly pass the updated duty cycle to the PWM generator. If so, use 1 / 2 of the second difference plus the first duty cycle as the first adjusted duty cycle, and pass the first adjusted duty cycle to the PWM generator. After waiting for the threshold time, use 1 / 2 of the second difference plus the first adjusted duty cycle as the second adjusted duty cycle, and pass the second adjusted duty cycle to the PWM generator.
[0112] If the duty cycle changes greatly in a short period of time, the driving board is likely to be unstable, thereby affecting the control of the device terminal, and the terminal device may jitter. For this reason, in the present invention, it is also necessary to detect whether the second difference between the updated duty cycle and the first duty cycle is greater than the duty cycle threshold. If it is greater, it means that the adjustment amplitude of the current duty cycle is too large, and directly adjusting the first duty cycle to the updated duty cycle will affect the control. Therefore, at this time, the first duty cycle will be adjusted by adding 1 / 2 of the second difference to the first duty cycle as the first adjustment duty cycle, and the first adjustment duty cycle will be passed to the PWM generator. After waiting for the threshold time, the second difference will be added to the first adjustment duty cycle as the second adjustment duty cycle, and the second adjustment duty cycle will be passed to the PWM generator, and the second difference will be divided into two parts and gradually increased. Of course, the user can also set the number of times the second difference is gradually added according to the needs of their own equipment to stabilize the control of the system.
[0113] Preferably, the second control circuit includes a main control circuit 1, a power conversion circuit 2, a drive protection circuit 3, a brake circuit 4, a CAN communication circuit 5, a 485 communication circuit 6, an Ethernet communication circuit 7, an output end encoder 8, a terminal multi-turn encoder 9 and an encoder battery 10;
[0114] The power conversion circuit 2 is used to access the power supply and convert the power supply into a working voltage, and the power conversion circuit 2 outputs the working voltage to the main control circuit 1. The IO voltage of the general MCU or DSP of the power conversion circuit 2 is usually 5V / 3.3V, and the current output capacity of the IO is below 20mA, while the low-voltage servo motor M usually requires a 10V voltage and a current of more than 30mA to be loaded on the gate to quickly turn on the MOS tube of the three-phase full-bridge circuit. The voltage and current of the IO of the MCU or DSP are not enough to directly drive the power MOSFET. The pre-drive circuit first performs a level conversion on the control signal output by the MCU or DSP (usually a low-level and high-level signal of 3.3V or 5V) to adapt to the gate drive voltage requirements of the MOS tube. This conversion process usually involves converting the low-level signal to 0V and converting the high-level signal to a higher voltage (such as 12V or higher) to ensure that the MOS tube can be fully turned on.
[0115] The main control circuit 1 is electrically connected to the drive protection circuit 3, the braking circuit 4, the CAN communication circuit 5, the 485 communication circuit 6 and the Ethernet communication circuit 7 respectively; the main control circuit 1 is used to control the drive protection circuit 3 to drive the servo motor M to work; the main control circuit 1 controls the braking circuit 4 to implement the braking function of the servo motor M; the CAN communication circuit 5, the 485 communication circuit 6 and the Ethernet communication circuit 7 are respectively used for data transmission.
[0116] The encoder battery 10 is used to power the output end encoder 8 and the end multi-turn encoder 9 respectively; the output end encoder 8 collects the rotation data of the output end of the servo motor M, and the end multi-turn encoder 9 is used to collect the rotation data of the end of the servo motor M; the output end encoder 8 and the end multi-turn encoder 9 are respectively connected to the main control circuit 1; the main control circuit 1 collects the rotation data of the output end encoder 8 and the end multi-turn encoder 9 and controls the operation of the braking circuit 4 and the drive protection circuit 3 to realize the drive control of the servo motor M.
[0117] In this embodiment, the power conversion circuit 2 includes a first power conversion unit 21, a second power conversion unit 22 and a third power conversion unit 23 which are electrically connected in sequence; the first power conversion unit 21 is used to connect the power supply, and the first power conversion unit 21 is used to convert 48V into 12V; the second power conversion unit 22 is used to convert 12V into 5V; the third power conversion unit 23 is used to convert 5V into 3.3V.
[0118] In this embodiment, the model of the first power conversion unit 21 is DCDC-SCT2A25;
[0119] The model of the second power conversion unit 22 is DCDC-TPS562201;
[0120] The model of the third power conversion unit 23 is LDO-1117-3.3.
[0121] In this embodiment, the drive protection circuit 3 includes a pre-drive overcurrent detection circuit 31 and a three-phase sampling circuit 32; the output end of the pre-drive overcurrent detection circuit 31 is connected to the main control circuit 1, the output end of the pre-drive overcurrent detection circuit 31 is connected to the output end of the three-phase sampling circuit 32, and the output end of the three-phase sampling circuit 32 is connected to the servo motor M.
[0122] The dead time in the three-phase sampling circuit 32 refers to a time interval set in the brushless servo motor M drive or the three-phase full-bridge circuit to prevent the MOS tubes of the upper and lower bridge arms (or high-side and low-side) from being turned on at the same time (i.e., short-circuited). During this time, the two adjacent MOS tubes are in a closed state to ensure the safe operation of the circuit.
[0123] Functions of dead time: (1) Prevent short circuit: The main function of dead time is to prevent the MOS tubes of the upper and lower bridge arms from being turned on at the same time, thereby avoiding short circuit and power loss. (2) Protect circuit: By setting the dead time, the MOS tube and circuit can be protected from damage, improving the reliability and stability of the circuit. (3) Reduce noise: Appropriate dead time can also reduce noise and electromagnetic interference in the circuit, improving the performance of the circuit.
[0124] At the same time, the phase current sampling circuit is used to collect the current signals in the two-phase or three-phase windings of the servo motor M. These signals will be used as current feedback signals to enable the servo drive system to achieve accurate current closed-loop control, thereby improving the performance and stability of the servo motor M. The sampling resistor is connected in series in the winding loop of the servo motor M. When the current passes through, a voltage drop will be generated across the sampling resistor. This voltage drop is proportional to the current, so the current can be indirectly measured by measuring the voltage across the sampling resistor. The operational amplifier is used to further amplify and condition the sampled signal to meet the input requirements of the subsequent A / D converter.
[0125] When DRV8353FS detects that the phase current is greater than the threshold (overcurrent) or the ambient temperature is higher than the threshold in the pre-drive overcurrent detection circuit 31, an error warning signal is issued. After receiving this signal, the MCU immediately starts the protection action to avoid burning of the circuit board.
[0126] In this embodiment, the braking circuit 4 includes a resistor R105, a resistor R107, a bidirectional TVS tube D23, a capacitor C115, a driver U9, a resistor R108, a resistor R106, a resistor R109, a capacitor C113, a MOS tube Q7, a capacitor C114, a resistor R110, a unidirectional diode D22, a unidirectional diode D20, an interface terminal J10, a unidirectional diode D21, a capacitor C112 and a unidirectional diode D19;
[0127] The first end of the resistor R105 is connected to the main control circuit 1, the second end of the resistor R105 is respectively connected to the first end of the bidirectional TVS tube D23 and the positive output end of the driver U9, the first end of the resistor R107 is grounded, the second end of the resistor R107 is respectively connected to the second end of the bidirectional TVS tube D23, the negative output end of the driver U9 and the first end of the resistor R106; the output end of the driver U9 is connected to the first end of the resistor R108, the second end of the resistor R108 is respectively connected to the first end of the resistor R109, the second end of the capacitor C113 and the gate of the MOS tube Q7; the second end of the resistor R106 is respectively connected to the second end of the resistor R109, the first end of the capacitor C113, the source of the MOS tube Q7 and the first end of the capacitor C114, the second end of the capacitor C114 is connected to the first end of the resistor R110, and the second end of the resistor R110 is connected to the drain of the MOS tube Q7;
[0128] The first end of the capacitor C115 is grounded, and the second end of the capacitor C115 is connected to the power conversion circuit 2, and the power conversion circuit 2 is used to provide power for the driver U9;
[0129] The anode of the unidirectional diode D22 is connected to the anode of the unidirectional diode D20 and the drain of the MOS tube Q7 respectively, and the cathode of the unidirectional diode D22 is connected to BKV+ and BKV- to connect to the external power supply M of the brake coil;
[0130] The cathode of the unidirectional diode D22 is respectively connected to the interface terminal J10, the cathode of the unidirectional diode D21, the second end of the capacitor C112 and the cathode of the unidirectional diode D19; the anode of the unidirectional diode D21 is connected to the servo motor M; the first end of the capacitor C112 is grounded, and the anode of the unidirectional diode D19 is used to connect to the signal input VIN port.
[0131] A control system based on a low-voltage servo driver board, using the control method based on the low-voltage servo driver board, comprising a division module and a control module;
[0132] The division module is used to obtain the control instruction, parse the number of revolutions required by the servo motor based on the control instruction, and divide the number of revolutions into the detection number of revolutions and the supplementary number of revolutions;
[0133] The control module is used to use the number of detected turns as the input of the first control circuit, obtain the feedback value of the terminal device, and determine whether the feedback value is less than a preset value;
[0134] If it is less than the preset value, the current input is adjusted based on the current voltage, the current and voltage inputs of the driving board are updated based on the adjusted voltage and current, the phase difference number of turns is obtained according to the feedback value, the phase difference number of turns and the supplementary number of turns are added to obtain the final input number of turns, and the final input number of turns is used as the input of the second control circuit;
[0135] If it is equal to the preset value, the supplementary number of turns is used as the input of the first control circuit.
[0136] Preferably, the control module includes a voltage regulation module and a current regulation module;
[0137] The voltage regulation module is used to determine whether the current voltage is within a preset range. If not, the voltage is regulated by a buck circuit to obtain the regulated voltage.
[0138] The current regulating module is used to calculate the current value required for regulating power based on the voltage.
[0139] Preferably, the current regulating module includes a first unit, a second unit, a third unit, a fourth unit, a fifth unit, a sixth unit, a seventh unit and an eighth unit;
[0140] The first unit is used to obtain the current current value, and add the current current value according to the preset current value to obtain the processed current value;
[0141] The second unit is used to use the processed current value and the regulated voltage to the current and voltage input of the driving board to obtain the feedback angle;
[0142] The third unit is used to determine whether the feedback angle falls within the preset angle. If it does not fall within the preset angle, the duty cycle of the pulse signal PWN of the feedback angle is obtained, and the fourth unit is called. If it falls within the preset angle, the eighth unit is called;
[0143] The fourth unit is used to set the expected current value based on the first duty cycle of the pulse signal;
[0144] The fifth unit is used to use a first difference between the expected current value and the processed current value as an input of the PID controller;
[0145] The sixth unit is used for updating the first duty cycle according to the output u(t) of the PID controller;
[0146] The seventh unit is used to pass the updated duty cycle to the PWM generator to update the duty cycle of the PWM signal. After adjusting the duty cycle, the current value of the driver board is detected, and the current value is used as the processing current value to call the second unit;
[0147] The eighth unit outputs the processed current value at this time as the adjusted current value.
[0148] Preferably, the seventh unit includes a stabilizing subunit;
[0149] The stabilizing subunit is used to obtain a second difference between the updated duty cycle and the first duty cycle;
[0150] Determine whether the second difference is greater than the duty cycle threshold. If so, directly pass the updated duty cycle to the PWM generator. If so, use 1 / 2 of the second difference plus the first duty cycle as the first adjusted duty cycle, and pass the first adjusted duty cycle to the PWM generator. After waiting for the threshold time, use 1 / 2 of the second difference plus the first adjusted duty cycle as the second adjusted duty cycle, and pass the second adjusted duty cycle to the PWM generator.
[0151] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0152] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
Claims
1. A control method based on a low voltage servo drive board, characterized in that: The steps include: Step S1: Obtain control instructions, parse the number of revolutions required for the servo motor based on the control instructions, and divide the number of revolutions into detection revolutions and supplementary revolutions; Step S2: using the number of detected turns as an input of the first control circuit, obtaining a feedback value of the terminal device, and determining whether the feedback value is less than a preset value; If it is less than the preset value, the current input is adjusted based on the current voltage, the current and voltage inputs of the driving board are updated based on the adjusted voltage and current, the phase difference number of turns is obtained according to the feedback value, the phase difference number of turns and the supplementary number of turns are added to obtain the final input number of turns, and the final input number of turns is used as the input of the second control circuit; If it is equal to the preset value, the supplementary number of turns is used as the input of the first control circuit.
2. A control method based on a low voltage servo drive board according to claim 1, characterized in that: In step S2, the steps of adjusting the current input by the current voltage are as follows: Step S21: determining whether the current voltage is within a preset range, and if not, adjusting the voltage through a buck circuit to obtain an adjusted voltage; Step S22: Calculate the current value required for adjusting the power based on the voltage.
3. A control method based on a low voltage servo drive board according to claim 2, characterized in that: The specific steps of step S22 are as follows: Step S221: obtaining a current current value, and adding the current current value according to a preset current value to obtain a processed current value; Step S222: using the processed current value and the adjusted voltage to input the current and voltage of the driving board to obtain a feedback angle; Step S223: determine whether the feedback angle falls within the preset angle. If not, obtain the duty cycle of the pulse signal PWN of the feedback angle and execute step S224. If it falls within the preset angle, execute step S228. Step S224: setting a desired current value based on the first duty cycle of the pulse signal; Step S225: Taking the first difference between the expected current value and the processed current value as the input of the PID controller, wherein the PID controller is composed of three parts: the proportional term P(t) = K p ·e(t); Integral term I(t) = K i ·∫e(t)dt; Differential term Where K p , K i , K d are proportional gain, integral gain and differential gain respectively, and e(t) is the first error; Output signal u(t)=P(t)+I(t)+D(t); Step S226: Update the first duty cycle according to the output u(t) of the PID controller, wherein the updating formula is as follows: Duty(t)=max(0,min(1,Duty in +u(t))); Duty in is the first duty cycle of the pulse signal; Step S227: passing the updated duty cycle to the PWM generator to update the duty cycle of the PWM signal. After adjusting the duty cycle, detecting the current value of the driving board, using the current value as the processing current value, and executing step S222; Step S228: output the processed current value at this time as the adjusted current value.
4. A control method based on a low voltage servo driver board according to claim 1, characterized in that: In step S227, the updated duty cycle is transmitted to the PWM generator as follows: Obtaining a second difference between the updated duty cycle and the first duty cycle; Determine whether the second difference is greater than the duty cycle threshold. If so, directly pass the updated duty cycle to the PWM generator. If so, use 1 / 2 of the second difference plus the first duty cycle as the first adjusted duty cycle, and pass the first adjusted duty cycle to the PWM generator. After waiting for the threshold time, use 1 / 2 of the second difference plus the first adjusted duty cycle as the second adjusted duty cycle, and pass the second adjusted duty cycle to the PWM generator.
5. The control method based on the low voltage servo drive board according to claim 1 is characterized in that: The second control circuit includes a main control circuit, a power conversion circuit, a drive protection circuit, a braking circuit, a CAN communication circuit, a 485 communication circuit, an Ethernet communication circuit, an output end encoder, a terminal multi-turn encoder and an encoder battery; The power conversion circuit is used to access the power supply and convert the power supply into a working voltage, and the power conversion circuit outputs the working voltage to the main control circuit; The main control circuit is electrically connected to the drive protection circuit, the brake circuit, the CAN communication circuit, the 485 communication circuit and the Ethernet communication circuit respectively; the main control circuit is used to control the drive protection circuit to drive the servo motor to work; the main control circuit controls the brake circuit to realize the brake function of the servo motor; the CAN communication circuit, the 485 communication circuit and the Ethernet communication circuit are respectively used to perform data transmission; The encoder battery is used to respectively power the output end encoder and the terminal multi-turn encoder; the output end encoder collects the rotation data of the output end of the servo motor, and the terminal multi-turn encoder is used to collect the rotation data of the terminal of the servo motor; The output end encoder and the terminal multi-turn encoder are respectively connected to the main control circuit; the main control circuit collects the rotation data of the output end encoder and the terminal multi-turn encoder and controls the operation of the braking circuit and the drive protection circuit to realize the drive control of the servo motor; The power conversion circuit comprises a first power conversion unit, a second power conversion unit and a third power conversion unit which are electrically connected in sequence; The first power conversion unit is used to connect the power supply, and the first power conversion unit is used to convert 48V into 12V; the second power conversion unit is used to convert 12V into 5V; the third power conversion unit is used to convert 5V into 3.3V; The drive protection circuit comprises a pre-drive overcurrent detection circuit and a three-phase sampling circuit; the output end of the pre-drive overcurrent detection circuit is connected to the main control circuit, the output end of the pre-drive overcurrent detection circuit is connected to the output end of the three-phase sampling circuit, and the input end of the three-phase sampling circuit is connected to the servo motor; The braking circuit includes a resistor R105, a resistor R107, a bidirectional TVS tube D23, a capacitor C115, a driver U9, a resistor R108, a resistor R106, a resistor R109, a capacitor C113, a MOS tube Q7, a capacitor C114, a resistor R110, a unidirectional diode D22, a unidirectional diode D20, an interface terminal J10, a unidirectional diode D21, a capacitor C112 and a unidirectional diode D19; The first end of the resistor R105 is connected to the main control circuit, the second end of the resistor R105 is respectively connected to the first end of the bidirectional TVS tube D23 and the positive output end of the driver U9, the first end of the resistor R107 is grounded, the second end of the resistor R107 is respectively connected to the second end of the bidirectional TVS tube D23, the negative output end of the driver U9 and the first end of the resistor R106; the output end of the driver U9 is connected to the first end of the resistor R108, the second end of the resistor R108 is respectively connected to the first end of the resistor R109, the second end of the capacitor C113 and the gate of the MOS tube Q7; the second end of the resistor R106 is respectively connected to the second end of the resistor R109, the first end of the capacitor C113, the source of the MOS tube Q7 and the first end of the capacitor C114, the second end of the capacitor C114 is connected to the first end of the resistor R110, and the second end of the resistor R110 is connected to the drain of the MOS tube Q7; A first end of the capacitor C115 is grounded, and a second end of the capacitor C115 is connected to the power conversion circuit, and the power conversion circuit is used to provide power for the driver U9; The anode of the unidirectional diode D22 is connected to the anode of the unidirectional diode D20 and the drain of the MOS tube Q7 respectively, and the cathode of the unidirectional diode D22 is connected to BKV+ and BKV- to connect to the external power supply of the brake coil; The cathode of the unidirectional diode D22 is respectively connected to the interface terminal J10, the cathode of the unidirectional diode D21, the second end of the capacitor C112 and the cathode of the unidirectional diode D19; the anode of the unidirectional diode D21 is connected to the servo motor; the first end of the capacitor C112 is grounded, and the anode of the unidirectional diode D19 is used to connect to the signal input VIN port.
6. A control system based on a low voltage servo drive board, characterized in that: A control method based on a low-voltage servo drive board according to any one of claims 1 to 5, comprising a division module and a control module; The division module is used to obtain the control instruction, parse the number of revolutions required by the servo motor based on the control instruction, and divide the number of revolutions into the detection number of revolutions and the supplementary number of revolutions; The control module is used to use the number of detected turns as the input of the first control circuit, obtain the feedback value of the terminal device, and determine whether the feedback value is less than a preset value; If it is less than the preset value, the current input is adjusted based on the current voltage, the current and voltage inputs of the driving board are updated based on the adjusted voltage and current, the phase difference number of turns is obtained according to the feedback value, the phase difference number of turns and the supplementary number of turns are added to obtain the final input number of turns, and the final input number of turns is used as the input of the second control circuit; If it is equal to the preset value, the supplementary number of turns is used as the input of the first control circuit.
7. A control system based on a low voltage servo drive board according to claim 6, characterized in that: The control module includes a voltage regulation module and a current regulation module; The voltage regulation module is used to determine whether the current voltage is within a preset range. If not, the voltage is regulated by a buck circuit to obtain the regulated voltage. The current regulating module is used to calculate the current value required for regulating power based on the voltage.
8. The control system based on the low voltage servo drive board according to claim 6 is characterized in that: The current regulating module includes a first unit, a second unit, a third unit, a fourth unit, a fifth unit, a sixth unit, a seventh unit and an eighth unit; The first unit is used to obtain the current current value, and add the current current value according to the preset current value to obtain the processed current value; The second unit is used to use the processed current value and the regulated voltage to the current and voltage input of the driving board to obtain the feedback angle; The third unit is used to determine whether the feedback angle falls within the preset angle. If it does not fall within the preset angle, the duty cycle of the pulse signal PWN of the feedback angle is obtained, and the fourth unit is called. If it falls within the preset angle, the eighth unit is called; The fourth unit is used to set the expected current value based on the first duty cycle of the pulse signal; The fifth unit is used to use a first difference between the expected current value and the processed current value as an input of the PID controller; The sixth unit is used for updating the first duty cycle according to the output u(t) of the PID controller; The seventh unit is used to pass the updated duty cycle to the PWM generator to update the duty cycle of the PWM signal. After adjusting the duty cycle, the current value of the driver board is detected, and the current value is used as the processing current value to call the second unit; The eighth unit outputs the processed current value at this time as the adjusted current value.
9. A control system based on a low voltage servo drive board according to claim 6, characterized in that: The seventh unit includes a stabilizing subunit; The stabilizing subunit is used to obtain a second difference between the updated duty cycle and the first duty cycle; Determine whether the second difference is greater than the duty cycle threshold. If so, directly pass the updated duty cycle to the PWM generator. If so, use 1 / 2 of the second difference plus the first duty cycle as the first adjusted duty cycle, and pass the first adjusted duty cycle to the PWM generator. After waiting for the threshold time, use 1 / 2 of the second difference plus the first adjusted duty cycle as the second adjusted duty cycle, and pass the second adjusted duty cycle to the PWM generator.