High-precision servo control method based on cooperation of encoder and arithmetic unit
By calculating the total execution delay time and dynamic calculation time window of the servo drive system, the predicted mechanical angle is obtained and converted into the predicted electrical angle, which solves the problems of control delay and encoder accuracy limitation in the servo drive system and improves the control accuracy and stability of the servo motor.
Patent Information
- Application Number
- CN202611125678.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-28
- Publication Date
- 2026-08-25
AI Technical Summary
In existing servo drive systems, the time delay of control commands and the limitations of encoder mechanical angle detection accuracy lead to reduced position control accuracy when the servo motor is running at high speed, and unstable motion state calculation results when running at low speed.
By acquiring the hardware parameters of the servo drive system, the spatial resolution parameters of the encoder, and the digital operation timing parameters, the total execution delay time is calculated, a dynamic calculation time window is constructed, the predicted mechanical angle is obtained and converted into the predicted electrical angle, coordinate transformation is performed to generate a pulse width modulation duty cycle signal, and the inverter bridge output drive voltage is controlled.
It improves the control accuracy and operational stability of the servo drive system, reduces calculation deviations caused by control delays and encoder resolution limitations, and enhances the position control accuracy of the servo motor.
Smart Images

Figure CN122639775A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of servo control technology. More specifically, this invention relates to a high-precision servo control method based on the collaboration of an encoder and an arithmetic unit. Background Technology
[0002] In industrial automation equipment, precision machining equipment, and robot actuators, servo drive systems typically control the operation of servo motors through servo drivers. The servo driver generates control signals based on the rotor position information fed back by the encoder, and drives the stator windings of the servo motor through an inverter bridge to generate a rotating magnetic field, thereby achieving control over the speed, position, and motion trajectory of the servo motor.
[0003] Existing servo drive systems use absolute encoders to obtain the mechanical angle of the servo motor rotor, and use digital signal processors to execute control algorithms. Based on the encoder feedback results, the voltage control quantity is calculated, and then the drive voltage is output through an inverter bridge.
[0004] In actual operation, the servo drive system needs to go through multiple stages, such as data processing, control program execution, and power device switching response, from the acquisition of mechanical angle data by the encoder to the output drive voltage of the inverter bridge. Therefore, there is a time difference between the electromagnetic action time corresponding to the control command and the encoder sampling time. This causes the drive voltage generated based on the current encoder mechanical angle to deviate from the actual rotor position of the servo motor, affecting the position control accuracy of the servo motor when running at high speed. At the same time, the mechanical angle data output by the absolute encoder is limited by its own resolution. When the servo motor is running at low speed or the mechanical angle change is small in adjacent sampling periods, the calculation of motion state parameters using adjacent sampling data is easily affected by insufficient angle change, resulting in reduced stability of the calculation results. Summary of the Invention
[0005] To address the technical problems of position errors caused by control delays in the aforementioned servo drive systems and the tendency for motion state calculation results to fluctuate when encoder sampling data changes only slightly, this invention provides a high-precision servo control method based on encoder-arithmetic unit collaboration. The method includes: acquiring the hardware parameters of the servo drive system, the spatial resolution parameters of the encoder, and the digital computation timing parameters; collecting the encoder mechanical angles at various times and forming an encoder mechanical angle sequence; calculating the total execution delay time of the servo drive system based on the hardware parameters and digital computation timing parameters; obtaining the minimum mechanical angle that the encoder can resolve based on the spatial resolution parameters; and traversing the encoder mechanical angles at each historical time in the encoder mechanical angle sequence until… The absolute value of the difference between the encoder mechanical angle at the current moment and the current mechanical angle satisfies the physical constraint condition constructed based on the minimum mechanical angle that the encoder can resolve, thus determining the effective dynamic calculation step size. The effective dynamic calculation step size is then multiplied by the sampling period of the servo drive system included in the digital operation timing parameters to determine the dynamic calculation time window. Transient angular velocity, transient angular acceleration, and transient jerk are calculated based on the dynamic calculation time window, and the predicted mechanical angle is obtained by combining it with the total execution delay time. The predicted mechanical angle is converted into a predicted electrical angle, and a coordinate transformation is performed using the predicted electrical angle to generate a voltage command in a stationary two-phase coordinate system. This generates a pulse width modulation duty cycle signal to control the inverter bridge output drive voltage.
[0006] Compared to methods that rely solely on the current encoder's mechanical angle for control, this invention considers both the time delay during control command execution and the limitations of encoder mechanical angle detection accuracy. By determining a dynamic calculation time window to acquire motion state parameters, the encoder mechanical angle data used in the calculation can be selected based on actual angle changes, thereby reducing fluctuations in motion state parameters caused by small changes in adjacent sampling angles. Finally, by combining the acquired motion state parameters with the total execution delay of the servo drive system, the predicted mechanical and electrical angles are obtained, ensuring that the generated voltage command corresponds to the rotor's spatial position at the actual moment the drive voltage is applied. This solves the voltage offset problem caused by time delays in the control execution process, improving the control accuracy and operational stability of the servo drive system.
[0007] Preferably, calculating the total execution delay of the servo drive system based on the hardware parameters and digital operation timing parameters includes: the hardware parameters include the dead time of the inverter bridge and the turn-on delay of the power devices; the digital operation timing parameters include the clock frequency of the arithmetic unit, the number of execution instruction cycles of the control algorithm, and the sampling period of the servo drive system; calculating the ratio of the number of execution instruction cycles of the control algorithm to the clock frequency of the arithmetic unit to obtain the digital operation time, and then superimposing it with the dead time of the inverter bridge and the turn-on delay of the power devices to obtain the total execution delay of the servo drive system.
[0008] The total execution delay time of the servo drive system obtained by this invention can reflect the actual time impact of the digital calculation process, the inverter bridge operation process, and the power device response process, thereby accurately describing the time relationship between the generation of control commands and the formation of drive voltage, and providing a time basis that conforms to the actual operation process for subsequent prediction of mechanical aspects.
[0009] Preferably, obtaining the minimum mechanical angle that the encoder can resolve based on the spatial resolution parameter includes: the spatial resolution parameter of the encoder refers to the effective physical bit number of an absolute encoder. The smallest mechanical angle that the encoder can resolve. The calculation formula: .
[0010] This invention calculates the minimum mechanical angle that the encoder can distinguish, enabling the servo drive system to obtain the minimum range of change corresponding to the encoder output angle, and determines the dynamic calculation time window based on this range of change, providing a data selection basis for subsequent motion state parameter calculation.
[0011] Preferably, the physical constraint condition constructed based on the smallest mechanical angle that the encoder can resolve is: In the formula, The encoder's mechanical angle at the current moment; For the first The encoder's mechanical angle at a historical moment; An index for historical moments; It is the absolute value symbol; To distinguish the margin coefficient; This is the smallest mechanical angle that the encoder can resolve.
[0012] This invention determines the effective dynamic calculation step size by constructing physical constraints, so that there is a sufficient range of angle change between the mechanical angles of the two historical encoders involved in the motion state calculation, reducing the calculation error caused by the small change of adjacent angles and improving the stability of the motion state parameter calculation results.
[0013] Preferably, calculating the transient angular velocity, transient angular acceleration, and transient sag according to the dynamic calculation time window includes: ; ; In the formula, This refers to the transient angular velocity; This refers to transient angular acceleration; For transient jumps; The encoder's mechanical angle at the current moment; For dynamic calculation of time windows; For the first The encoder's mechanical angle at a historical moment; For the first The encoder's mechanical angle at a historical moment; For the first The encoder's mechanical angle at a historical moment; To effectively and dynamically calculate the step size.
[0014] Preferably, obtaining the predicted mechanical angle in conjunction with the total execution delay time includes: In the formula, To predict mechanical angles; The encoder's mechanical angle at the current moment; This refers to the transient angular velocity; This refers to transient angular acceleration; For transient jumps; This represents the total execution latency of the servo drive system.
[0015] The predicted mechanical angle obtained by this invention can simultaneously reflect the rotor's motion state at the current moment and the time offset during the execution of control commands, thus compensating for position changes generated by the internal execution links of the servo drive system in advance and improving the prediction accuracy of the position corresponding to the moment the control command is applied.
[0016] Preferably, converting the predicted mechanical angle into a predicted electrical angle includes: In the formula, To predict electrical angles; To predict mechanical angles; This represents the number of pole pairs of the servo motor. This is a modulo operation.
[0017] Preferably, the generation of voltage commands in a stationary two-phase coordinate system using the predicted electrical angles for coordinate transformation includes: acquiring the actual three-phase currents of the stator of the servo motor through a current sensor, and generating direct-axis and quadrature-axis voltage commands using a current loop proportional-integral regulator; constructing a coordinate transformation matrix based on the predicted electrical angles, and converting the direct-axis and quadrature-axis voltage commands into voltage commands in a stationary two-phase coordinate system. Shaft voltage command and Shaft voltage command; according to the Shaft voltage command and the The shaft voltage command generates a pulse width modulation duty cycle signal.
[0018] The beneficial effects of this invention are as follows: This invention calculates the total execution delay of the servo drive system by acquiring the hardware parameters, encoder spatial resolution parameters, and digital operation timing parameters. It then determines a dynamic calculation time window based on the encoder's mechanical angle sequence, adapting the motion state parameter calculation process to the encoder's output characteristics and reducing calculation deviations caused by encoder resolution limitations. Simultaneously, this invention obtains predicted mechanical angles based on motion state parameters and the total execution delay, and uses these predicted electrical angles for coordinate transformation. This ensures that the voltage vector direction corresponding to the inverter bridge's output drive voltage better matches the actual position of the servo motor rotor, thereby reducing the impact of control delay on servo control accuracy and improving the operational stability of the servo drive system. Attached Figure Description
[0019] Figure 1 This is a flowchart illustrating the high-precision servo control method based on the collaboration of encoder and arithmetic unit in this invention. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0022] This invention discloses a high-precision servo control method based on the collaboration of an encoder and an arithmetic unit. This method relies on a digital signal processor inside the frequency converter as the arithmetic unit, combined with an absolute encoder installed at the tail of the motor and an inverter bridge composed of insulated-gate bipolar transistors; see reference. Figure 1 This includes steps S1-S4: S1. Synchronously extract the hardware parameters of the servo drive system, the spatial resolution parameters of the encoder, and the timing parameters of digital computation.
[0023] Specifically, the arithmetic unit obtains the dead time of the inverter bridge and the turn-on delay of the power devices by reading the factory-calibrated configuration register in the non-volatile memory. It determines the effective physical number of bits of the absolute encoder by parsing the frame header check bits returned by the absolute encoder. It also synchronously extracts the clock frequency of the arithmetic unit, the number of execution instruction cycles of the control algorithm, and the sampling cycle of the servo drive system. The dead time of the inverter bridge is a protection waiting time set to avoid the power devices of the upper and lower arms of the inverter bridge from turning on simultaneously. The turn-on delay of the power devices refers to the response time required for the power devices to switch from the off state to the on state after the control signal is applied to them.
[0024] The hardware parameters include the dead time of the inverter bridge and the turn-on delay of the power devices. The spatial resolution parameter of the encoder refers to the effective physical number of bits of the absolute encoder. The digital operation timing parameters include the clock frequency of the arithmetic unit, the number of execution instruction cycles of the control algorithm, and the sampling period of the servo drive system.
[0025] Furthermore, the ratio of the maximum mechanical response time of the servo drive system to the sampling period of the servo drive system is calculated and rounded up. The rounded result is used as the depth parameter. A circular historical data buffer of size corresponding to the depth parameter is allocated in memory. At each sampling moment, the encoder mechanical angle at the current moment is sequentially written into the circular historical data buffer, while maintaining the previous values. The encoder mechanical angle sequence of each historical cycle.
[0026] The maximum mechanical response time is obtained through factory calibration. During the calibration process, a preset step torque command is applied to the servo drive system, and the speed change curve fed back by the encoder is collected. The time when the speed change reaches 63.2% of the final change is taken as the single mechanical response time, and the maximum value of the single mechanical response time under multiple typical load conditions is selected as the maximum mechanical response time.
[0027] S2. Calculate the total execution delay time of the servo drive system.
[0028] In the actual operation of a servo drive system, after the arithmetic unit calculates the control quantity based on the data fed back from the encoder, it needs to go through multiple stages, including control program execution, inverter bridge switching action, and power device response, before an actual driving voltage can be formed in the motor stator winding. Therefore, there is a time offset between the electromagnetic action time corresponding to the control command and the encoder sampling time. This time offset is composed of the digital calculation delay, hardware dead time delay, and device switching delay. In summary, this invention first calculates the ratio of the number of execution command cycles of the control algorithm to the clock frequency of the arithmetic unit to obtain the digital calculation time. Then, it adds this to the dead time of the inverter bridge and the conduction delay of the power device to obtain the total execution delay time of the servo drive system. The specific calculation formula is as follows:
[0029] In the formula, The total execution delay time of the servo drive system, measured in seconds, represents the total time interval from the start of control calculations by the arithmetic unit to the output of the actual drive voltage by the power device. The numerical computation time represents the time required for an arithmetic unit to complete one control loop. The number of instruction cycles used to control the algorithm's execution is dimensionless. The clock frequency of the arithmetic unit is measured in Hertz. The dead time of the inverter bridge is expressed in seconds. This is the turn-on delay of the power device, measured in seconds.
[0030] S3. Determine the dynamic calculation time window and calculate motion state parameters based on the spatial resolution capability of the absolute encoder.
[0031] The encoder mechanical angle data output by the absolute encoder is a discrete digital quantity. Its spatial resolution is limited by the effective number of physical bits of the absolute encoder. When the servo motor is running at low speed or the sampling time is short, the actual mechanical angle change between two adjacent sampling times may be less than the minimum mechanical angle that the absolute encoder can resolve. If the encoder mechanical angles of adjacent sampling times are directly used for differential calculation, the calculated motion state parameters such as angular velocity and angular acceleration will be affected by quantization error, causing fluctuations in the position prediction results.
[0032] Therefore, based on the spatial resolution capability of the absolute encoder, the present invention dynamically adjusts the historical data intervals involved in motion state calculation, so that the actual change between the mechanical angles of the two encoders involved in the calculation can exceed the resolution range of the absolute encoder, thereby improving the stability of the motion state calculation results.
[0033] Specifically, the continuous single-circle mechanical spatial angle is The maximum total number of discrete states that an absolute encoder can represent is 1. The continuous single-turn mechanical spatial angles are evenly distributed across the maximum total number of discrete states that can be represented by the effective physical bits of the absolute encoder, in order to calculate the minimum mechanical angle that the encoder can resolve. The specific calculation formula is as follows:
[0034] In the formula, The smallest mechanical angle that the encoder can distinguish, measured in degrees, represents the smallest angular change that an absolute encoder can distinguish. For a single-circle mechanical spatial angle, the dimension is degrees; The maximum number of discrete states is dimensionless. The effective physical number of bits for an absolute encoder is dimensionless; the smallest mechanical angle that the encoder can resolve is the smallest physical spatial span that can be resolved between two adjacent discrete scales.
[0035] To prevent the mechanical angle change output by the absolute encoder from approaching the quantization error range and causing instability in motion state calculation, this invention sets a resolution margin coefficient. The resolution margin coefficient is used to characterize the safety margin set beyond the minimum resolvable angle of the encoder. Its calibration method is as follows: by collecting the peak angle fluctuation of the absolute encoder when the servo motor is stationary, the peak angle fluctuation is compared with the minimum resolvable mechanical angle of the encoder. The resolution margin coefficient is obtained by dividing the quotient and rounding up, and is set to 1 in this embodiment. .
[0036] Furthermore, the arithmetic unit reads the encoder mechanical angle data from the annular historical data buffer, using the encoder mechanical angle at the current moment. Based on this, the index of historical moments is gradually added according to the direction of historical data storage to obtain the encoder mechanical angle at the corresponding historical moment. And determine the encoder mechanical angle at the current moment. Encoder mechanical angle at historical moments Do the absolute values of the differences between them satisfy the following physical constraints?
[0037] In the formula, The encoder's mechanical angle at the current moment is expressed in degrees. For the first The encoder mechanical angle at a historical moment, in degrees; An index for historical moments; It is the absolute value symbol; To distinguish the margin coefficient, dimensionless, The smallest mechanical angle that the encoder can resolve is in degrees.
[0038] The above judgment conditions are used to filter historical data intervals that meet the calculation requirements, when the absolute value of the difference in encoder mechanical angles... Less than or equal to When the absolute value of the difference in the encoder's mechanical angle is less than the amount of mechanical motion within the current historical data interval, it indicates that the amount of mechanical motion is insufficient to effectively exceed the resolution range of the absolute encoder. Therefore, the index of the historical time is increased to increase the dynamic calculation step size. Greater than When the current historical data interval is sufficient to reflect the actual motion state, the index of the current historical moment that satisfies the physical constraints is used as the effective dynamic calculation step size. And calculate the step size based on the determined effective dynamics. Establish a dynamic calculation time window The dynamic calculation time window represents the actual time span used to calculate the motion state parameters. This is the sampling period of the servo drive system.
[0039] It should be noted that when the maximum depth of the circular historical data buffer is still not satisfied with the above physical constraints, the servo motor is determined to be in a stationary state. At this time, the change in the encoder mechanical angle is insufficient to calculate the effective motion state parameters, and the arithmetic unit sets the transient angular velocity, transient angular acceleration and transient sag to 0.
[0040] Furthermore, in determining the dynamic calculation time window Then, a dynamic calculation time window is used to perform differential calculations on the encoder mechanical angle data at historical moments to obtain transient angular velocity, transient angular acceleration, and transient sag. This allows the encoder mechanical angle differences involved in the calculation to be adjusted according to changes in the servo motor's operating speed. The specific calculation formulas are as follows:
[0041]
[0042]
[0043] In the formula, The instantaneous angular velocity has the dimension of degrees per second; This is the transient angular acceleration, with dimensions of degrees per second squared. The instantaneous jump is measured in degrees per cubic second. The encoder's mechanical angle at the current moment is expressed in degrees. For the first The encoder mechanical angle at a historical moment, in degrees; The time window is used for dynamic calculation, and the unit is seconds. For the first The encoder mechanical angle at a historical moment, in degrees; For the first The encoder mechanical angle at a historical moment, in degrees; To effectively and dynamically calculate the step size.
[0044] S4. Perform coordinate transformation based on the predicted electrical angle and generate a pulse width modulation duty cycle signal.
[0045] The motion state parameters obtained after dynamic calculation of the time window can reflect the current motion trend of the servo motor rotor. At the same time, considering the existence of the total execution delay time, the rotor position corresponding to the current encoder acquisition time is not the rotor position corresponding to the actual output voltage of the power device. Therefore, this invention predicts the future position of the rotor based on the total execution delay time, and uses the predicted electrical angle corresponding to the predicted rotor position to perform voltage vector coordinate transformation, so that the voltage vector direction corresponding to the output drive voltage is closer to the rotor magnetic field direction at the actual moment of action, thereby reducing the voltage vector offset caused by control delay.
[0046] Specifically, based on the transient angular velocity, transient angular acceleration, transient sag, and total execution delay, the predicted mechanical angle corresponding to the actual moment the control command is applied is calculated. The specific calculation formula is as follows:
[0047] In the formula, To predict mechanical angles, the dimension is degrees. Characterizes the mechanical position that the rotor is expected to reach after the total execution delay time; The encoder's mechanical angle at the current moment is expressed in degrees. The instantaneous angular velocity has the dimension of degrees per second; The total execution delay of the servo drive system is expressed in seconds. This is the transient angular acceleration, with dimensions of degrees per second squared. It represents the transient jump, with the dimension being degrees per cubic second.
[0048] Furthermore, based on the number of pole pairs of the servo motor, the predicted mechanical angle is converted into a predicted electrical angle, and the specific calculation formula is as follows:
[0049] In the formula, To predict electrical angles, the dimension is degrees, which characterize the spatial position of the rotor magnetic field at the actual moment the control command is applied; To predict mechanical angles, the dimension is degrees; The number of pole pairs of the servo motor is dimensionless. For modulo operation; To perform a modulo operation that limits the angle range of a single rotation on the calculation results.
[0050] Obtain the predicted electrical angle Subsequently, the voltage control quantity in the rotating coordinate system needs to be transformed into the stationary coordinate system to generate a three-phase voltage control quantity that can be executed by the inverter bridge. In traditional servo control, the coordinate transformation usually uses the current encoder feedback angle. However, the time point corresponding to the current encoder feedback angle is earlier than the actual output voltage time point of the power device, thus causing voltage vector lag. This invention uses a predicted electrical angle. Replace the current encoder feedback angle, so that the coordinate transformation process includes the total execution delay time. Corresponding position compensation.
[0051] Specifically, the actual three-phase current of the servo motor stator is acquired by a current sensor installed in the servo drive system, and a direct-axis voltage command is generated by a current loop proportional-integral regulator installed in the servo drive system. With cross-axis voltage command Predicting electrical angles Convert to radians and based on the predicted electrical angle. Construct a coordinate transformation matrix to transform the direct-axis voltage command. With cross-axis voltage command Converted to a stationary two-phase coordinate system Shaft voltage command and Shaft voltage command The specific calculation formula is as follows:
[0052] In the formula, In a stationary two-phase coordinate system Shaft voltage command, in volts; In a stationary two-phase coordinate system Shaft voltage command, in volts; To predict electrical angles, the unit is degrees, which are converted to radians when substituting into trigonometric functions for calculation; This is a direct-axis voltage command, with the dimension of volts. This is a quadrature-axis voltage command, measured in volts. For cosine and trigonometric function operations; This is a sine trigonometric function calculation; the coordinate transformation formula utilizes predicted electrical angles. Direct-axis voltage command With cross-axis voltage command Perform a rotation mapping to obtain Shaft voltage command and Shaft voltage command Corresponding to the rotor spatial position at the actual moment the control command is applied, when the predicted electrical angle... When the coordinate transformation matrix changes, the sine and cosine values change synchronously, thereby adjusting the direction of the output voltage vector to follow the direction of the rotor magnetic field.
[0053] After completing the coordinate transformation, the arithmetic unit according to Shaft voltage command and Shaft voltage command The magnitude and phase angle of the reference voltage vector are calculated, and the spatial sector in which the reference voltage vector is located is determined based on the phase angle. Two adjacent basic voltage vectors and a zero-voltage vector are selected based on the spatial sector. The duration of action of the two adjacent basic voltage vectors and the zero-voltage vector are calculated according to the volt-second balance principle. The duration of action of each voltage vector is allocated according to the centrally symmetric modulation method to generate a pulse width modulation duty cycle signal. The pulse width modulation duty cycle signal represents the conduction ratio of the inverter bridge power device within one control cycle.
[0054] Furthermore, the inverter bridge adjusts the duty cycle signal according to the pulse width modulation. The power control devices are switched on and off, so that the power supply voltage is transformed by the inverter bridge to form a drive voltage, which is then applied to the stator windings of the servo motor, causing the stator to generate a rotating magnetic field. This rotating magnetic field is determined based on a predicted electrical angle. The corresponding spatial location is adjusted to compensate for the total execution delay. The resulting positional deviation.
[0055] It should be noted that this invention employs a predictive electrical angle. The current encoder feedback angle is replaced in the coordinate transformation, resulting in a pulse width modulation duty cycle signal. Corresponding to the rotor position after the total execution delay time, the voltage vector direction when the inverter bridge outputs the drive voltage is closer to the actual spatial position of the rotor, thereby reducing the position deviation caused by control delay and improving the stability and control accuracy of the servo system.
[0056] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A high-precision servo control method based on encoder and arithmetic unit collaboration, characterized in that, include: The hardware parameters of the servo drive system, the spatial resolution parameters of the encoder, and the digital operation timing parameters are obtained. The encoder mechanical angles at each moment are collected and a sequence of encoder mechanical angles is formed. The total execution delay of the servo drive system is calculated based on the hardware parameters and digital operation timing parameters, and the minimum mechanical angle that the encoder can resolve is obtained based on the spatial resolution parameters. The encoder mechanical angles at each historical moment in the encoder mechanical angle sequence are traversed until the absolute value of the difference between the encoder mechanical angle and the current moment satisfies the physical constraint condition constructed based on the minimum mechanical angle that the encoder can resolve. The effective dynamic calculation step size is then determined, and the product of the effective dynamic calculation step size and the sampling period of the servo drive system included in the digital operation timing parameters is determined as the dynamic calculation time window. The transient angular velocity, transient angular acceleration, and transient sag are calculated based on the dynamic calculation time window, and the predicted mechanical angle is obtained by combining the total execution delay time. The predicted mechanical angle is converted into a predicted electrical angle. The predicted electrical angle is then used to perform coordinate transformation to generate a voltage command in a stationary two-phase coordinate system. This generates a pulse width modulation duty cycle signal to control the inverter bridge output drive voltage.
2. The high-precision servo control method based on encoder and arithmetic unit collaboration according to claim 1, characterized in that, The total execution latency of the servo drive system is calculated based on the hardware parameters and digital operation timing parameters, including: The hardware parameters include the dead time of the inverter bridge and the turn-on delay of the power devices, and the digital operation timing parameters include the clock frequency of the arithmetic unit, the number of execution instruction cycles of the control algorithm, and the sampling period of the servo drive system. The ratio of the number of execution instruction cycles of the control algorithm to the clock frequency of the arithmetic unit is used to obtain the digital computation time. This time is then added to the dead time of the inverter bridge and the conduction delay of the power devices to obtain the total execution delay time of the servo drive system.
3. The high-precision servo control method based on encoder and arithmetic unit collaboration according to claim 1, characterized in that, The minimum mechanical angle that the encoder can resolve is obtained based on the spatial resolution parameters, including: The spatial resolution parameter of the encoder refers to the effective physical bit depth of the absolute encoder. The smallest mechanical angle that the encoder can resolve. The calculation formula: .
4. The high-precision servo control method based on encoder and arithmetic unit collaboration according to claim 1, characterized in that, The physical constraints based on the smallest mechanical angle that the encoder can resolve are as follows: ; In the formula, The encoder's mechanical angle at the current moment; For the first The encoder's mechanical angle at a historical moment; An index for historical moments; It is the absolute value symbol; To distinguish the margin coefficient; This is the smallest mechanical angle that the encoder can resolve.
5. The high-precision servo control method based on encoder and arithmetic unit collaboration according to claim 1, characterized in that, The transient angular velocity, transient angular acceleration, and transient sag are calculated based on the dynamic calculation time window, including: ; ; ; In the formula, This refers to the transient angular velocity; This refers to transient angular acceleration; For transient jumps; The encoder's mechanical angle at the current moment; For dynamic calculation of time windows; For the first The encoder's mechanical angle at a historical moment; For the first The encoder's mechanical angle at a historical moment; For the first The encoder's mechanical angle at a historical moment; To effectively and dynamically calculate the step size.
6. The high-precision servo control method based on encoder and arithmetic unit collaboration according to claim 1, characterized in that, The predicted mechanical angle is obtained by combining the total execution delay time, including: ; In the formula, To predict mechanical angles; The encoder's mechanical angle at the current moment; This refers to the transient angular velocity; This refers to transient angular acceleration; For transient jumps; This represents the total execution latency of the servo drive system.
7. The high-precision servo control method based on encoder and arithmetic unit collaboration according to claim 1, characterized in that, Converting the predicted mechanical angle into a predicted electrical angle includes: ; In the formula, To predict electrical angles; To predict mechanical angles; This represents the number of pole pairs of the servo motor. This is a modulo operation.
8. The high-precision servo control method based on encoder and arithmetic unit collaboration according to claim 1, characterized in that, Generating a voltage command in a stationary two-phase coordinate system by performing coordinate transformation using the predicted electrical angles includes: The actual three-phase current of the stator of the servo motor is collected by a current sensor, and the direct-axis voltage command and quadrature-axis voltage command are generated by the current loop proportional-integral regulator. A coordinate transformation matrix is constructed based on the predicted electrical angles, and the direct-axis voltage command and quadrature-axis voltage command are converted into stationary two-phase coordinates. Shaft voltage command and Shaft voltage command; According to the above Shaft voltage command and the The shaft voltage command generates a pulse width modulation duty cycle signal.