A speed control method, device, equipment and medium for a self-recovery permanent magnet synchronous motor
Patent Information
- Application Number
- CN202611498146.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-24
- Publication Date
- 2026-10-30
AI Technical Summary
这些参数通常需要通过大量实验进行整定,难以兼顾所有工况
1.本发明通过构造综合驱动能量并对其进行归一化处理,将速度误差的幅值信息与其持续时间信息融合为一个统一的能量指标,以此作为生成恢复电流的依据。该机制使得控制器能够根据扰动的严重程度进行分级、连续的精准补偿:对于轻微的速度波动,系统通过连续恢复因子提供线性、平滑的小幅补偿;对于严重的负载突变,系统通过超限恢复因子提供非线性的强力补偿。两种模式叠加协同,既保证了小幅扰动下的运行平稳性,又确保了大幅扰动下的快速恢复能力,从根本上克服了传统PI控制器固定参数无法兼顾不同强度扰动的局限。同时,由于引入了能量约束上限,恢复电流的输出被限制在安全范围内,有效避免了过补偿导致的系统失稳问题。
Smart Images

Figure CN123019549A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of permanent magnet synchronous motor control technology, and in particular to a self-resetting method, device, equipment and medium for speed control of permanent magnet synchronous motors. Background Technology
[0002] Permanent magnet synchronous motors (PMSMs) have been widely used in industrial servo drives, electric vehicles, robots, and high-end manufacturing equipment due to their significant advantages such as high power density, high efficiency, and fast dynamic response.
[0003] In existing high-performance control strategies for permanent magnet synchronous motors, a dual-closed-loop vector control structure based on field-oriented control (FOC) is typically employed. This structure consists of an outer speed loop and an inner current loop. The speed loop, as the dominant loop, is responsible for calculating the required q-axis current command (i.e., torque current) based on the error between the given and actual speed using a proportional-integral (PI) controller, thereby achieving precise control of the motor speed. The current loop is responsible for quickly and accurately tracking this current command, thereby generating the corresponding electromagnetic torque.
[0004] Although PI controllers based on fixed parameters are simple in structure and easy to implement, their control performance is significantly limited when faced with complex and changing operating conditions. To improve the dynamic response and disturbance rejection capability of the system, various improvement schemes have emerged in the existing technology, which can be mainly divided into the following categories: 1. Parameter adaptive methods: such as fuzzy adaptive PI control and neural network PI control. These methods monitor the speed error and its rate of change online, and adjust the proportional and integral gains of the PI controller in real time to achieve better control performance at different operating points.
[0005] 2. Structural switching methods: such as variable structure control (sliding mode control), staged control, etc. These methods pre-define different operating regions or control stages (such as startup stage, steady-state stage), and configure different control parameters or control laws for each stage, switching when specific conditions are met.
[0006] 3. Disturbance compensation methods: such as those based on disturbance observers (DOB) or active disturbance rejection control (ADRC). These methods construct an observer to estimate the total disturbances inside and outside the system (such as load changes and parameter perturbations) in real time, and feed the estimated values forward to compensate the control input to counteract the effects of the disturbances.
[0007] However, the aforementioned existing technologies still have the following shortcomings when dealing with load disturbances, especially sudden loads of unknown intensity: 1. High dependence on preset operating conditions: The performance of parameter adaptive and structure switching methods is highly dependent on preset rules, functions, or switching thresholds. These parameters usually require extensive experimentation to tune, making it difficult to accommodate all operating conditions. When the load disturbance exceeds the preset range, the controller may fail to respond promptly and appropriately, resulting in excessive speed drops or prolonged recovery times.
[0008] 2. Unsmooth disturbance recovery process: When switching between different control modes, structural switching methods can easily cause abrupt changes in control variables if not handled properly, leading to torque pulsation and mechanical shock. While disturbance compensation methods can effectively suppress disturbances, their performance is limited by the accuracy and bandwidth of the observer, and they introduce additional computational burden and parameter tuning complexity.
[0009] 3. Lack of comprehensive consideration of error persistence: Most traditional methods adjust control action based primarily on the current velocity error or its rate of change, ignoring the accumulated "energy" or "severity" of persistent errors. This makes it difficult for the controller to distinguish between "instantaneous small fluctuations" and "persistent large deviations," and it cannot achieve graded, continuous, and precise compensation based on the severity of disturbances.
[0010] 4. Poor coordination between startup and steady-state processes: The motor startup phase inherently contains large errors. If the anti-disturbance enhancement circuit is directly activated, this large error is easily misjudged as a severe load disturbance, resulting in excessive compensation current and severe speed overshoot. In existing technologies, the transition between the startup process and the steady-state anti-disturbance process is often not smooth enough, making it difficult to simultaneously meet the performance requirements of rapid startup, no overshoot, and strong anti-disturbance. Summary of the Invention
[0011] In view of this, the purpose of the present invention is to provide a self-resetting permanent magnet synchronous motor speed control method, apparatus, equipment and medium to improve the above-mentioned problems.
[0012] This invention provides a self-resetting speed control method for a permanent magnet synchronous motor, comprising: S1, Error Calculation and Normalization. The controller reads the given speed. and actual speed The normalized velocity error is calculated using the following formula:
[0013] In the formula, For the first Normalized velocity error per control cycle, dimensionless; Given the mechanical rotational speed, in rpm; This refers to the actual mechanical speed, expressed in rpm. This is the reference speed, in rpm.
[0014] S2, execute basic control during the startup phase and perform steady-state identification. This step only applies to the steady-state identification flag. This means that the controller executes the action when it determines that the motor has not yet reached a steady state and is still in the startup phase; when the steady state identification flag is active... When the value is 1, it indicates that the motor has met the steady-state identification conditions, and this step will not be executed again. When the motor is in the startup phase, only the startup PI controller is activated. The q-axis current setpoint during the startup phase is calculated according to the following formula:
[0015] In the formula, The unlimited q-axis current calculated to start the PI controller, in amperes (A); and These are the proportional gain and integral gain for starting the PI controller, respectively. The integral state of the PI controller at the start of the previous control cycle is updated according to the following formula:
[0016] In the formula, For the first The integral state of the PI controller at the start of each control cycle; To control the cycle; The speed error that participated in the integral update in the previous control cycle; The anti-saturation coefficient is calculated in reverse during the startup phase; The given value is the actual output q-axis current after limiting in the previous control cycle; A saturation function indicates that the variable Limited to the range Inside; This represents the maximum permissible absolute value for initiating the integral state of the PI controller; the meanings of the other symbols are the same as described above.
[0017]
[0018] In the formula, The current given to the inner loop of the q-axis current during the startup phase, in A; This represents the maximum permissible amplitude of the q-axis current. Self-recovery enhancement is disabled during startup to prevent large errors caused by a step change in a given speed from being mistaken for external load disturbances.
[0019] The controller simultaneously determines whether the motor has reached a steady state based on the normalized speed error obtained in step S1. When the normalized speed error is continuously less than the preset steady-state identification error threshold and continues to reach the preset steady-state holding time, the controller determines that the motor has reached a steady state and switches the steady-state identification flag from the start state to the steady-state state. The preset steady-state holding time can avoid misjudgment due to the speed briefly entering the error range.
[0020] The controller maintains the steady-state identification flag when the error has not continuously met the steady-state identification condition. The PI controller will be activated to calculate the result. The output is sent to the q-axis current inner loop, and the speed is reread from step S1 in the next control cycle. Steps S3 to S8 are not executed at this time. When the error continuously meets the steady-state identification condition, the steady-state identification flag is set. The value is set from 0 to 1, and the process proceeds to step S3. This occurs when the controller has already satisfied the steady-state identification flag at the start of a certain control cycle. If the value is 1, this step will no longer be executed.
[0021] S3, performs a seamless transition from the startup phase to the self-recovering steady-state phase. This step only occurs when the steady-state identification flag is displayed. Executes once on the rising edge of the change from 0 to 1. When the steady-state identification flag... When the value changes from 0 to 1, based on the actual output q-axis current given in the previous control cycle, the matched integral state of the steady-state PI controller is calculated according to the following formula:
[0022] In the formula, This refers to the matched integral state when switching to self-recovering steady-state control. The q-axis current is given as the actual output of the controller in the previous control cycle. and These are the proportional gain and integral gain of the steady-state PI controller, respectively. This is the recovery current during switching. Since the recovery current is disabled during startup, there is typically a current during switching. =0.
[0023]
[0024] The above formula represents the sum of the proportional current, integral current, and recovery current after the switch, which is equal to the actual q-axis current command of the previous cycle before the switch. Therefore, when the PI controller exits and the self-recovering steady-state control is engaged, the total q-axis current command remains continuous, reducing current jumps and torque spikes. After completing the bumpless switch, the controller proceeds to step S4, where the steady-state identification flag is displayed. The value remains at 1 in subsequent control cycles. Thereafter, the controller no longer recalculates the matched integral state, but instead proceeds directly to step S4 after completing step S1 in each control cycle.
[0025] S4, Construct the integrated driving energy. This step is only performed on the steady-state identification flag. Execute at time 1. Steady-state identification flag. In the initial control cycle where the value changes from 0 to 1, step S3 is executed. In subsequent steady-state control cycles, after the controller completes the speed error calculation in step S1, steps S2 and S3 are skipped, and this step is directly entered. First, the error dead zone is set, and the effective error is calculated using the following formula:
[0026] In the formula, The effective error after deducting the error dead zone; This is the error dead zone; Indicates taking and The larger value in This represents the absolute value. If the speed error is less than the dead zone, then... =0, in order to reduce the frequent changes in q-axis recovery current caused by small fluctuations in steady-state speed and measurement noise, thereby reducing control current fluctuations.
[0027] Then, the instantaneous error energy is calculated according to the following formula:
[0028] In the formula, This is the instantaneous error energy, used to reflect the magnitude of the error in the current control cycle. The squaring operation converts both positive and negative velocity errors into non-negative error intensities.
[0029] Then calculate the cumulative error energy with forgetting factor according to the following formula:
[0030] In the formula, This represents the cumulative error energy during the current control cycle. This represents the accumulated error energy from the previous control cycle. Forgetting factor; To control the cycle. If the error persists, the accumulated error energy gradually increases; after the error disappears, the historical accumulated amount gradually decreases.
[0031] Finally, the instantaneous error energy and the cumulative error energy are combined to obtain the comprehensive driving energy:
[0032] In the formula, The comprehensive driving energy is the unified input for calculating the recovery factor in step S5; This is the cumulative error energy weight.
[0033] S5 generates continuous recovery factor and over-limit recovery factor based on the comprehensive driving energy. Continuous recovery factor Calculate according to the following formula:
[0034] In the formula, It is a continuous recovery factor, with a value ranging from 0 to 1; This is the scaling factor; For the error energy envelope; A tiny positive number set to prevent the denominator from being zero. With the overall driving energy increasing smoothly, it is mainly used for small and medium disturbances.
[0035] Excess recovery factor Calculate according to the following formula:
[0036] In the formula, The excess recovery factor; Its maximum allowed value. When ≤ hour, =0; when the total driving energy exceeds the envelope. As the degree of exceeding the limit increases, it is mainly used for larger load disturbances.
[0037] S6, based on the recovery factor obtained in step S5 and the velocity error direction obtained in step S1, generate an additional q-axis recovery current. First, calculate the uniform energy gain:
[0038] In the formula, To unify energy gain; and These are the gains corresponding to the continuous recovery factor and the over-limit recovery factor, respectively.
[0039] Then, generate the additional q-axis recovery current according to the following formula:
[0040] In the formula, This is the additional q-axis recovery current, in amperes (A). This refers to the error sensitivity parameter; It is the hyperbolic tangent function; This represents the maximum amplitude of the recovery current. Since the hyperbolic tangent function has the same sign as the velocity error, the direction of the recovery current is always consistent with the direction of the electromagnetic torque required to correct the velocity error.
[0041] S7 performs a state transition during the decay of the recovery current and increases the integration speed in the tail end of a small error. Firstly, when the sign of the recovery current remains unchanged between two consecutive cycles, the current recovery current amplitude is less than that of the previous cycle, the recovery direction is still consistent with the current speed error, and the total output is not close to the current limit, the recovery current transfer amount is calculated:
[0042] In the formula, and These are the normalized speed error thresholds for when the recovery current transfer ratio begins to change and when it completes to change, respectively. The normalized transfer variable, obtained based on the error magnitude, is used to smoothly adjust the transfer ratio of the recovery current to the integral state of the steady-state PI controller.
[0043]
[0044] In the formula, This is a smooth transition function used to avoid sudden changes in the transfer ratio.
[0045]
[0046] In the formula, This represents the effective transfer ratio of the current control cycle; and These are the minimum and maximum values of the transfer ratio, respectively.
[0047]
[0048] In the formula, The equivalent current quantity transferred from the recovery current to the integral state of the steady-state PI controller, in amperes (A); This represents the recovery current from the previous cycle. The difference in parentheses only indicates the amount of recovery current withdrawal when the recovery current is decaying in the same direction.
[0049]
[0050] In the formula, This refers to the integral state of the steady-state PI controller after the state transition. This represents the integration state of the previous cycle; This is for limiting the integral state. This formula increases the integral current of the steady-state PI controller by approximately... This allows it to take over the recovery current that is being withdrawn, reducing the risk of secondary drops.
[0051] Secondly, low-pass filtering is applied to the absolute value of the error, and a tail-end enhancement window is constructed:
[0052] In the formula, These are the low-pass filter coefficients; This is the filtering time constant.
[0053]
[0054] In the formula, This represents the absolute value of the speed error after filtering during the current control cycle. This is the absolute value of the speed error after filtering in the previous control cycle. It is used to reduce the impact of small speed fluctuations on the end-stage integral enhancement coefficient and to avoid frequent fluctuations in the control current near the steady state.
[0055]
[0056] In the formula, Enable variables for small errors; and This is the error threshold for the smooth transition of tail enhancement from the off state to the on state; as the filtering error enters the tail enhancement range, its value gradually increases to 1.
[0057]
[0058] In the formula, This is a small error activation coefficient used to enhance and smooth the tail section input.
[0059]
[0060] In the formula, Turn off variables for large errors; and This is the error threshold for the tail segment enhancement to smoothly transition from the open state to the closed state; when the error is too large, its value gradually increases to 1.
[0061]
[0062] In the formula, This is the large error shut-off coefficient, used to gradually shut off the tail-end enhancement during the large disturbance phase.
[0063]
[0064] In the formula, This is the final tail enhancement coefficient. This coefficient is only close to 1 when the error is within the preset small error range; it is turned off when the error is too small, too large, the sign changes, or the output approaches the limit.
[0065]
[0066] In the formula, This is the integral acceleration factor; , and These represent the weights of continuous recovery, over-limit recovery, and tail-end enhancement on the integral velocity, respectively. Its upper limit.
[0067] S8 combines the steady-state PI controller output with the additional recovery current to form the final q-axis current setpoint, and updates the integral state of the steady-state PI controller. The steady-state PI controller output is calculated according to the following formula:
[0068] In the formula, This refers to the q-axis current output by the steady-state PI controller, in amperes (A). This is the integral state after step S7.
[0069]
[0070] In the formula, This is the setpoint for the unlimited total q-axis current. The steady-state PI controller section is responsible for normal speed tracking and steady-state load current, while the recovery current section is responsible for rapid recovery from initial load disturbances.
[0071]
[0072] In the formula, The final current setpoint is provided for the inner loop of the q-axis current; the uniform limit is used to prevent the sum of the steady-state PI controller current and the recovery current from exceeding the allowable current of the motor or inverter.
[0073]
[0074] In the formula, This represents the integral state of the steady-state PI controller after the current cycle update. To calculate the anti-saturation coefficient; This represents the difference in current before and after current limiting. When the total current is limited, the inverse calculation term adjusts the integral state towards reducing saturation. The output of step S8 is... The q-axis current inner loop acts on the permanent magnet synchronous motor. The next control cycle returns to step S1, re-reads the actual speed, and calculates the normalized speed error. Then, the steady-state identification flag is re-evaluated. State: If steady-state identification flag =0, proceed to step S2 to execute start control; if the steady-state identification flag is ... =1, then skip starting PI controller control; where, only the steady-state identification flag is used. When a rising edge is generated, step S3 is executed once. In other steady-state control cycles, the process directly proceeds to step S4 and continues to execute steps S4 to S8.
[0075] The present invention also provides a self-resetting permanent magnet synchronous motor speed control device, comprising: The error calculation unit is used to read the given mechanical speed and actual mechanical speed of the permanent magnet synchronous motor and calculate the normalized speed error. The steady-state identification unit is used to perform basic control during the startup phase and perform steady-state identification based on the normalized velocity error. When the normalized velocity error is greater than or equal to a preset steady-state identification error threshold, it is determined that the startup phase is in progress, and only the startup PI controller is activated for control. The unit then returns to the error calculation unit in the next control cycle. When the normalized velocity error is less than the preset steady-state identification error threshold, it is determined that the steady state has been reached. The bumpless switching unit is used to calculate the matching integral state of the steady-state PI controller when the steady state is determined, so that the sum of the proportional current, integral current and recovery current after switching is equal to the actual output q-axis current given in the previous control cycle, thus completing the bumpless switching. The integrated driving energy construction unit is used to set the error dead zone and calculate the effective error. Based on the effective error, it calculates the instantaneous error energy and the cumulative error energy with a forgetting factor. The instantaneous error energy and the cumulative error energy are combined to obtain the integrated driving energy. A recovery factor generation unit is used to generate a continuous recovery factor and an over-limit recovery factor based on the comprehensive driving energy. The recovery current generation unit is used to add the continuous recovery factor and the overlimit recovery factor to obtain a unified energy gain, and to obtain an additional q-axis recovery current based on the unified energy gain; The tail-end enhancement unit is used to calculate the additional q-axis recovery current transfer amount and update the integral state of the steady-state PI controller when the additional q-axis recovery current decays; to perform low-pass filtering on the absolute value of the speed error, and to construct the tail-end enhancement coefficient based on the filtering result to enhance the integral state of the steady-state PI controller. The current output unit is used to combine the q-axis current output by the steady-state PI controller with the additional q-axis recovery current to form the final q-axis current setpoint, update the integral state of the steady-state PI controller, and directly enter the integrated drive energy construction unit after returning to the error calculation unit in the next control cycle.
[0076] The present invention also provides a self-resetting permanent magnet synchronous motor speed control device, including a memory and a processor. The memory stores a computer program, which can be executed by the processor to realize the self-resetting permanent magnet synchronous motor speed control method as described above.
[0077] The present invention also provides a computer-readable storage medium storing a computer program that can be executed by a processor of the device in which the computer-readable storage medium is located, so as to implement the self-recovering permanent magnet synchronous motor speed control method described above.
[0078] Compared with the prior art, the present invention has at least the following advantages: 1. This invention constructs and normalizes a comprehensive driving energy, fusing the amplitude and duration information of speed error into a unified energy index, which serves as the basis for generating the recovery current. This mechanism enables the controller to perform graded, continuous, and precise compensation based on the severity of the disturbance: for minor speed fluctuations, the system provides linear, smooth, small-amplitude compensation through a continuous recovery factor; for severe load changes, the system provides nonlinear, powerful compensation through an over-limit recovery factor. The combined effect of these two modes ensures both operational stability under small disturbances and rapid recovery capability under large disturbances, fundamentally overcoming the limitation of traditional PI controllers with fixed parameters that cannot accommodate disturbances of varying intensities. Simultaneously, the introduction of an energy constraint upper limit restricts the output of the recovery current within a safe range, effectively avoiding system instability caused by overcompensation.
[0079] 2. This invention effectively solves the problem of malfunction in the anti-disturbance enhancement stage during startup by setting an intelligent locking mechanism and a disturbance-free switching strategy during the startup phase. During motor startup, the system automatically locks the self-recovery enhancement function, relying solely on the startup PI controller to complete the acceleration process, avoiding speed overshoot caused by overcompensation due to inherent large startup errors. Once the motor enters steady-state operation, the system calculates the integral compensation at the moment of switching to achieve a smooth handover between the startup PI controller and the steady-state PI controller, ensuring that the current command does not change abruptly during the switching process, thus balancing the multiple performance requirements of rapid startup, no overshoot, and strong disturbance rejection.
[0080] 3. This invention introduces a seamless handover mechanism for the integral term and a tail-end integral enhancement strategy during the recovery current decay stage. As the additional recovery current gradually withdraws, the system synchronously adjusts the integral term of the steady-state PI controller to fill the compensation gap, ensuring a continuous transition of the total control quantity. This fundamentally eliminates the secondary speed drop caused by the sudden removal of compensation force in traditional methods. Simultaneously, in the tail end of the speed range approaching the target value, the system automatically enhances the integral action, accelerating the elimination of residual errors and further shortening the settling time. Furthermore, the integrated drive energy, after normalization, falls within a unified numerical range, making the same set of control parameters applicable to permanent magnet synchronous motors of different power levels and specifications, significantly improving the algorithm's versatility and engineering portability. Attached Figure Description
[0081] To more clearly illustrate the technical solution of the present invention, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0082] Figure 1 This is a schematic diagram of the self-recovering permanent magnet synchronous motor speed control method of the present invention; Figure 2 This is a schematic diagram illustrating the isolation, steady-state identification, and disturbance-free switching states of the present invention. Figure 3 This is a schematic diagram of the internal logic of the error energy-constrained self-recovery controller of the present invention; Figure 4 This is a comparison diagram of the speed response between the method of the present invention and the conventional PI control method in this embodiment. Detailed Implementation
[0083] 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 embodiments of the present invention, and not all embodiments. 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.
[0084] Example 1 This embodiment provides a self-resetting speed control method for permanent magnet synchronous motors, such as... Figure 1 As shown, the following detailed description of S1 to S8, based on the actual operating sequence of the motor, will be provided. For ease of explanation of the embodiments, it should be noted that S2 is only applied to... The startup phase with =0 executes cyclically, and S3 only executes in the cyclic phase. The process is executed once when the value changes from 0 to 1. After the smooth transition is completed, the controller will execute S1, S4 and S8 in subsequent cycles, without repeating the start of PI controller control and integral state matching.
[0085] This embodiment uses a three-phase salient-pole permanent magnet synchronous motor with a stator resistance of [value missing]. The d-axis inductance is The q-axis inductance is The permanent magnet flux is The moment of inertia is The motor has 4 pole pairs and a DC bus voltage of 311V. It employs a dual closed-loop vector control system consisting of an outer speed loop and an inner d / q axis current loop. The speed setpoint is... The reference speed is The sampling period is controlled as follows: The q-axis current given limit is .
[0086] This embodiment first describes the motor start-up, steady-state identification, and disturbance-free switching process; after the switching is completed and the operation is stable, a 12 N·m load is suddenly applied at 0.1 s, and then the error energy self-recovery control process is described according to S4 to S8, and the entire process of the speed gradually recovering from the maximum drop to the point of stabilization is continuously described.
[0087] S1. Calculate the normalized velocity error.
[0088] When the motor starts and approaches the given speed, the actual speed of a certain control cycle is taken as... =999rpm, substituting the given speed, actual speed, and reference speed into the normalized speed error calculation formula, we get:
[0089] In the formula, A value of 0.001 is positive, indicating that the actual speed is still 1 rpm lower than the given speed. This error is initially used for the start-up PI controller control and steady-state identification in S2. The controller continues to update according to the same formula in each subsequent control cycle. .
[0090] S2. Perform basic control during the startup phase and identify steady state.
[0091] Its state relationships for initiating isolation, steady-state identification, and disturbance-free handover are as follows: Figure 2 As shown, the controller operation state of this invention includes four parts: startup state, steady-state confirmation state, disturbance-free switching event, and self-recovering steady-state stage. In the startup state, the system forcibly shuts down the enhancement of the additional recovery current, relying solely on the startup PI controller for speed tracking. When the normalized speed error is less than a preset steady-state identification error threshold, the system enters the steady-state confirmation state and accumulates a holding time in this state. When the accumulated holding time reaches the preset steady-state holding time, a disturbance-free switching event is triggered. When a disturbance-free switching event occurs, the steady-state identification flag is set from 0 to 1, and the integral state of the steady-state PI controller is matched in real time. After the switching is completed, the system enters the self-recovering steady-state stage. In this state, the system enables the energy-driven recovery mechanism, performs integral state transition and tail-end enhancement control, thereby achieving smooth, disturbance-free self-recovery of motor speed under load disturbances. This embodiment uses the proportional gain of the startup PI controller. =220, Integral Gain =5000. Self-recovery enhancement is disabled during startup. Assume the integral state of the PI controller during startup of the previous control cycle is... =0.000656, then the PI controller will start with an unlimited output:
[0092] In the formula, the calculated result of 3.5A is less than the current limit of 25.7A, therefore the actual q-axis current setting is still [value missing]. =3.5A.
[0093] In this embodiment, a steady-state identification error threshold is used. =0.002, steady-state hold time =0.002s. Because =0.001<0.002, if this condition is maintained continuously for 0.002s, that is, continuously maintained for 0.002 / (1×10) -5 If 200 control cycles are involved, then... Set from 0 to 1.
[0094] S3. Perform a seamless transition from the startup phase to the steady-state self-recovery phase.
[0095] When set to 1, the actual q-axis current given in the previous control cycle is... =3.5A, normalized speed error during switching is =0.001, the steady-state PI controller proportional gain is =400, integral gain is =20000. Because the recovery current is disabled during startup, during switching... =0A, therefore the matching integral state is:
[0096] In the formula, the matching integral state is calculated in reverse based on the actual q-axis current given before the switch, and is not arbitrarily set.
[0097] Substituting this matched integral state into the switched steady-state controller, we have:
[0098] In the formula, the proportional current after switching is 0.4A, the integral current is 3.1A, and the recovery current is 0A, with the sum of the three remaining at 3.5A before switching. Therefore, when the PI controller is deactivated and the steady-state self-recovery control is activated, the q-axis current feed remains continuous. Only after this step is completed can the error energy self-recovery control be activated.
[0099] S4, constructing integrated driving energy.
[0100] The main control link for error energy calculation, recovery factor generation, and additional q-axis recovery current formation is as follows: Figure 3 As shown. After a smooth transition and stable operation, a sudden load of 12 N·m is applied. The maximum motor speed drops by 25 rpm, therefore the actual speed at the moment of maximum drop is... =975rpm. The controller continues to update the speed error according to formula S1:
[0101] In the formula, a positive speed error indicates that the actual speed is lower than the given speed after a sudden increase in load, and a positive recovery current should be generated subsequently.
[0102] This embodiment takes the error dead zone. =0.002, forgetting coefficient =80, Cumulative Error Energy Weight =80. The effective error is:
[0103] In the formula, only the portion exceeding the error dead zone participates in the error energy calculation.
[0104]
[0105] In the formula, It reflects the magnitude of the speed error within the current control cycle.
[0106] To illustrate the initial recursion, the accumulated error energy from the previous control cycle is taken. Control cycle but:
[0107] In the formula, as long as the error persists in subsequent cycles, the accumulated error energy will continue to increase.
[0108]
[0109] In the formula, It also includes information on the current error magnitude and error duration, and serves as input to S5.
[0110] S5. Generate continuous recovery factor and overlimit recovery factor based on comprehensive driving energy.
[0111] This embodiment takes the error energy envelope. Continuous recovery scaling factor Small positive numbers , Exceeding the upper limit of recovery factor Substituting the combined driving energy obtained from S4 into the equation, we obtain the continuous recovery factor:
[0112] This indicates that the continuous recovery effect is already at a high level.
[0113] The excess recovery factor is:
[0114] In the formula, the calculation result before the limit is greater than the set upper limit of 2, therefore the value after the limit is taken as... =2 indicates that the current error energy significantly exceeds the envelope, requiring the activation of a stronger recovery function.
[0115] S6. Generate an additional q-axis recovery current based on the recovery factor and the direction of velocity error.
[0116] This embodiment takes A. The unified energy gain is:
[0117] In the formula, The continuous recovery effect and the over-limit recovery effect are combined into a unified recovery intensity.
[0118] The unlimited recovery current is:
[0119] In the formula, This is the additional q-axis recovery current before the current control cycle is limited, in A; since the speed error is positive, the recovery current is also positive, used to increase the electromagnetic torque.
[0120] The final recovery current is:
[0121] In the formula, the unlimited recovery current exceeds the maximum allowable amplitude, so the final recovery current is limited to 4.5A.
[0122] S7. Perform state transition when the recovery current decays, and increase the integration speed in the small error tail section.
[0123] As the rotational speed recovers, assuming the normalized speed error in a subsequent cycle is... ,Pick , Then the normalized transfer variable is:
[0124] The smooth transition function is:
[0125] Take the minimum transfer ratio Maximum transfer ratio The current effective transfer ratio is:
[0126] Assuming the previous cycle recovery current was 4A and the current recovery current is 3A, both are in the same direction and the total output is not close to the limit, then the recovery current transfer amount is: A In the formula, the recovery current is reduced by 1A in this cycle, of which about 0.9A is transferred to the integral state of the steady-state PI controller.
[0127] If the steady-state integral state of the PI controller in the previous control cycle is The integral gain of the steady-state PI controller is Then the integral state after the state transition is:
[0128] As a result, the integral current of the steady-state PI controller increases by approximately 0.9A to smoothly replace the withdrawing additional recovery current and prevent a sudden decrease in the total q-axis current.
[0129] After further recovery into the small error tail segment, assuming that the absolute value of the current normalized velocity error and the absolute value of the error after filtering in the previous control cycle are both 0.006, that is: Take the filter time constant The low-pass filter coefficients are approximately:
[0130] Since the current error is the same as the filtering error of the previous cycle, the absolute value of the filtered error remains the same:
[0131] Small error threshold for tail segment enhancement
[0132] but:
[0133] therefore: .
[0134] Take the large error shutdown threshold as but:
[0135] therefore:
[0136] In the formula, the large error closure coefficient is not activated, so the final tail enhancement coefficient is 1.
[0137] If at this time , and take ,but: =1 + 2 × 0.1 + 2 × 0 + 2 × 1 = 3.2 In the formula, the current steady-state PI controller integral speed is 3.2 times the ordinary integral speed, which is used to accelerate the elimination of the remaining small error.
[0138] S8. Combine the steady-state PI controller output with the recovery current to output the final q-axis current and update the integral state.
[0139] Taking the moment of maximum speed drop as an example, the normalized speed error at this time is: Assume the integral state of the steady-state PI controller is The steady-state PI controller proportional gain is The integral gain is Then the output of the steady-state PI controller is: A In the formula, the proportional current is approximately 10A and the integral current is 5A.
[0140] Adding the steady-state PI controller output and the additional recovery current, we obtain the unlimited total q-axis current command:
[0141] In the formula, the unlimited total current is less than 25.7A, so current saturation does not occur in this cycle.
[0142]
[0143] In the formula, the final result will be The current is fed into the inner loop of the q-axis to generate the electromagnetic torque required to counteract sudden loads.
[0144] At the moment of maximum speed drop, take Due to the large error, tail-end enhancement was not implemented. The integral adjustment weights for continuous recovery, over-limit recovery, and tail-end enhancement are as follows: Then the integral acceleration factor is:
[0145] Since no current saturation occurred in this cycle, the anti-saturation term calculated in reverse is zero, and the integral state is updated as follows:
[0146] In the formula, the updated integral state is used for the steady-state PI controller calculation in the next control cycle.
[0147] In the next control cycle, the controller returns to S1 to read the actual speed and update the normalized speed error. Since the steady-state identification flag is already set to 1, the controller no longer performs PI controller start-up control and integral state matching, but directly enters S4 and continues to execute S4 through S8, thus forming a self-recovering control closed loop.
[0148] In subsequent closed-loop control cycles, the final q-axis current acts on the permanent magnet synchronous motor through the inner current loop, increasing the electromagnetic torque and causing the actual speed to begin to recover. As the normalized speed error gradually decreases, the instantaneous error energy, continuous recovery factor, and over-limit recovery factor decrease accordingly; the additional recovery current gradually withdraws, and its main reduction is transferred to the integral state of the steady-state PI controller according to S7, ensuring that the total q-axis current does not suddenly drop due to the withdrawal of the recovery current.
[0149] When the velocity error enters the error dead zone, both the effective error and instantaneous error energy become zero. Thereafter, the accumulated error energy decays periodically according to the following formula:
[0150] In the formula, after each control cycle, the cumulative error energy retains 99.92% of the value of the previous cycle.
[0151] Therefore, as the error disappears, , , and Gradually decrease; when ≤ At that time, the excess recovery factor The additional recovery current decreases to 0 and continues to decay smoothly until it eventually approaches 0. The motor speed enters and remains within ±1 rpm of the given speed. The large disturbance recovery phase has ended, and the controller enters the small error convergence and steady-state holding phase. After the speed is very close to the given value, the tail-end integral enhancement automatically exits. As the accumulated error energy continues to decay, and Approaching further to 0, the integral acceleration factor Gradually recovering to 1.
[0152] At this point, the additional recovery current has completed its rapid compensation task in the initial stage of the disturbance, and its withdrawal has been smoothly taken over by the integral state of the steady-state PI controller. Finally, the q-axis current command gradually converges from the large transient value in the initial stage of the disturbance to the steady-state current required to maintain the 12 N·m load and the motor's own losses. The motor speed stabilizes at around 1000 rpm, and the speed error no longer continues to increase, thus completing the complete control process of "load surge—speed drop—strong recovery—recovery current transfer—small error tail convergence—steady-state maintenance." The final effect is as follows... Figure 4 As shown.
[0153] Figure 4 This embodiment demonstrates a comparison of the speed response of a permanent magnet synchronous motor using the method of the present invention and a conventional PI control method. Figure 4 Part a presents the complete speed response process of the motor from startup and steady-state operation to the sudden application of a 12 N·m load at 0.1 s and recovery to steady state; Figure 4 Part b is a magnified view of a portion of the startup phase in Part a. Figure 4 Part c is a magnified view of the speed recovery phase after a sudden load increase in Part a.
[0154] Depend on Figure 4 As can be seen in Part b, during the startup phase, the maximum speed overshoot of conventional PI control is approximately 44.02 r / min, and the adjustment time to enter the range of ±1 r / min of the given speed is approximately 38.39 ms. After adopting the method of the present invention, there is basically no speed overshoot during the startup process, and the adjustment time to enter the range of ±1 r / min of the given speed is shortened to approximately 17.42 ms.
[0155] Depend on Figure 4 As can be seen in section c, after a sudden application of a 12 N·m load at 0.1 s, the maximum speed drop of conventional PI control is about 39.87 r / min, and the time required to recover to the given speed within ±1 r / min range is about 24.60 ms; after using the method of the present invention, the maximum speed drop is reduced to about 25 r / min, and the recovery time is shortened to about 3.71 ms.
[0156] Example 2 This embodiment provides a self-resetting permanent magnet synchronous motor speed control device, including: The error calculation unit is used to read the given mechanical speed and actual mechanical speed of the permanent magnet synchronous motor and calculate the normalized speed error. The steady-state identification unit is used to perform basic control during the startup phase and perform steady-state identification based on the normalized velocity error. When the normalized velocity error is greater than or equal to a preset steady-state identification error threshold, it is determined that the startup phase is in progress, and only the startup PI controller is activated for control. The unit then returns to the error calculation unit in the next control cycle. When the normalized velocity error is less than the preset steady-state identification error threshold, it is determined that the steady state has been reached. The bumpless switching unit is used to calculate the matching integral state of the steady-state PI controller when the steady state is determined, so that the sum of the proportional current, integral current and recovery current after switching is equal to the actual output q-axis current given in the previous control cycle, thus completing the bumpless switching. The integrated driving energy construction unit is used to set the error dead zone and calculate the effective error. Based on the effective error, it calculates the instantaneous error energy and the cumulative error energy with a forgetting factor. The instantaneous error energy and the cumulative error energy are combined to obtain the integrated driving energy. A recovery factor generation unit is used to generate a continuous recovery factor and an over-limit recovery factor based on the comprehensive driving energy. The recovery current generation unit is used to add the continuous recovery factor and the overlimit recovery factor to obtain a unified energy gain, and to obtain an additional q-axis recovery current based on the unified energy gain; The tail-end enhancement unit is used to calculate the additional q-axis recovery current transfer amount and update the integral state of the steady-state PI controller when the additional q-axis recovery current decays; to perform low-pass filtering on the absolute value of the speed error, and to construct the tail-end enhancement coefficient based on the filtering result to enhance the integral state of the steady-state PI controller. The current output unit is used to combine the q-axis current output by the steady-state PI controller with the additional q-axis recovery current to form the final q-axis current setpoint, update the integral state of the steady-state PI controller, and directly enter the integrated drive energy construction unit after returning to the error calculation unit in the next control cycle.
[0157] Example 3 This embodiment provides a self-resetting permanent magnet synchronous motor speed control device, including a memory and a processor. The memory stores a computer program, which can be executed by the processor to implement the self-resetting permanent magnet synchronous motor speed control method as described in Embodiment 1.
[0158] Example 4 This embodiment provides a computer-readable storage medium storing a computer program that can be executed by a processor of the device where the computer-readable storage medium is located, so as to implement the self-recovering permanent magnet synchronous motor speed control method as described in Embodiment 1.
[0159] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A speed control method for a self-restoring permanent magnet synchronous motor, characterized in that, include: S1. Error Calculation and Normalization: Read the given mechanical speed and actual mechanical speed of the permanent magnet synchronous motor, and calculate the normalized speed error; S2, Start-up Control and Steady-State Identification: Based on the normalized velocity error obtained in S1, basic control is performed in the start-up phase and steady-state identification is performed. When the normalized velocity error is greater than or equal to the preset steady-state identification error threshold, it is determined that the start-up phase is in progress. Only the start-up PI controller is activated for control, and the system returns to S1 in the next control cycle. When the normalized velocity error is less than the preset steady-state identification error threshold, it is determined that a steady state has been reached. S3. Seamless switching: When the steady state is reached, the matching integral state of the steady-state PI controller is calculated so that the sum of the proportional current, integral current and recovery current after switching is equal to the actual output q-axis current given in the previous control cycle, thus completing the seamless switching. S4. Constructing the comprehensive driving energy: Set the error dead zone and calculate the effective error. Based on the effective error, calculate the instantaneous error energy and the cumulative error energy with the forgetting factor. Combine the instantaneous error energy and the cumulative error energy to obtain the comprehensive driving energy. S5. Recovery Factor Generation: Continuous recovery factor and over-limit recovery factor are generated based on the comprehensive driving energy obtained in S4. S6. Recovery current generation: Add the continuous recovery factor obtained in S5 to the overlimit recovery factor to obtain a unified energy gain, and obtain the additional q-axis recovery current based on the unified energy gain; S7. State transition and tail enhancement: When the additional q-axis recovery current decays, calculate the amount of additional q-axis recovery current transfer and update the integral state of the steady-state PI controller; The absolute value of the speed error is low-pass filtered, and a tail enhancement coefficient is constructed based on the filtering result to enhance the integral state of the steady-state PI controller. S8. Current Synthesis and Output: The q-axis current output by the steady-state PI controller is synthesized with the additional q-axis recovery current obtained in S6 to form the final q-axis current setpoint. The integral state of the steady-state PI controller is updated, and after returning to S1 in the next control cycle, it directly enters S4.
2. The speed control method according to claim 1, characterized in that, In S1, the normalized speed error calculation method is as follows: the normalized speed error of the kth control cycle is equal to the speed setpoint of the kth control cycle minus the actual speed of the kth control cycle, divided by the reference speed.
3. The speed control method according to claim 1, characterized in that, In S3, the specific calculation method of the matching integral state is as follows: using the actual output q-axis current of the starting PI controller in the previous control cycle, subtract the product of the proportional gain and speed error of the steady-state PI controller, then subtract the q-axis recovery current, and finally divide the overall difference by the integral gain of the steady-state PI controller.
4. The speed control method according to claim 1, characterized in that, In S4, the effective error calculation method is as follows: the effective error of the kth control cycle is equal to the difference between the absolute value of the speed error and the error dead zone; if the difference is negative, it is taken as zero. The instantaneous error energy calculation method is as follows: the instantaneous error energy of the kth control cycle is equal to the square of the effective error of the kth control cycle; The method for calculating the cumulative error energy with forgetting factor is as follows: In the formula, This represents the cumulative error energy during the current control cycle. This represents the accumulated error energy from the previous control cycle. Forgetting factor; To control the cycle; This represents the instantaneous error energy.
5. The speed control method according to claim 4, characterized in that, In S5, the continuous recovery factor is calculated as follows: In the formula, It is a continuous recovery factor, with a value ranging from 0 to 1; This is the scaling factor; For the error energy envelope; A tiny positive number set to prevent the denominator from being zero; To drive energy comprehensively; The calculation method for the excess recovery factor is as follows: In the formula, Set its maximum allowed value.
6. The speed control method according to claim 5, characterized in that, In S7, the method for calculating the additional q-axis recovery current transfer is as follows: In the formula, and These are the normalized speed error thresholds for when the recovery current transfer ratio begins to change and when it completes the change, respectively. For the first Normalized speed error per control cycle; The specific method of low-pass filtering is as follows: In the formula, These are the low-pass filter coefficients; This is the filtering time constant.
7. The speed control method according to claim 6, characterized in that, In S8, the method for calculating the q-axis current output by the steady-state PI controller is as follows: In the formula, The integral state after step S7; and These are the proportional gain and integral gain of the steady-state PI controller, respectively.
8. A self-resetting permanent magnet synchronous motor speed control device, characterized in that, include: The error calculation unit is used to read the given mechanical speed and actual mechanical speed of the permanent magnet synchronous motor and calculate the normalized speed error. The steady-state identification unit is used to perform basic control during the startup phase and perform steady-state identification based on the normalized velocity error. When the normalized velocity error is greater than or equal to the preset steady-state identification error threshold, it is determined that the startup phase is in progress, and only the startup PI controller is enabled for control. The unit then returns to the error calculation unit in the next control cycle. When the normalized velocity error is less than the preset steady-state identification error threshold, it is determined that a steady state has been reached. The bumpless switching unit is used to calculate the matching integral state of the steady-state PI controller when the steady state is determined, so that the sum of the proportional current, integral current and recovery current after switching is equal to the actual output q-axis current given in the previous control cycle, thus completing the bumpless switching. The integrated driving energy construction unit is used to set the error dead zone and calculate the effective error. Based on the effective error, it calculates the instantaneous error energy and the cumulative error energy with a forgetting factor. The instantaneous error energy and the cumulative error energy are combined to obtain the integrated driving energy. A recovery factor generation unit is used to generate a continuous recovery factor and an over-limit recovery factor based on the comprehensive driving energy. The recovery current generation unit is used to add the continuous recovery factor and the overlimit recovery factor to obtain a unified energy gain, and to obtain an additional q-axis recovery current based on the unified energy gain; The tail section enhancement unit is used to calculate the additional q-axis recovery current transfer amount and update the integral state of the steady-state PI controller when the additional q-axis recovery current decays. The absolute value of the speed error is low-pass filtered, and a tail enhancement coefficient is constructed based on the filtering result to enhance the integral state of the steady-state PI controller. The current output unit is used to combine the q-axis current output by the steady-state PI controller with the additional q-axis recovery current to form the final q-axis current setpoint, update the integral state of the steady-state PI controller, and directly enter the integrated drive energy construction unit after returning to the error calculation unit in the next control cycle.
9. A self-restoring permanent magnet synchronous motor speed control device, characterized in that, The method includes a memory and a processor, wherein the memory stores a computer program that can be executed by the processor to implement the self-recovering permanent magnet synchronous motor speed control method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The device contains a computer program that can be executed by a processor of the device in which the computer-readable storage medium is located, to implement the self-recovering permanent magnet synchronous motor speed control method as described in any one of claims 1 to 7.
