Surface-mounted motor disturbance control method, controller, medium and product
By establishing a mathematical model of the surface-mount motor and using an adaptive gain switching method, the problems of slow response and jitter in the disturbance control of the surface-mount motor were solved, achieving fast response and stable control, and improving the stability and dynamic performance of the motor.
Patent Information
- Application Number
- CN202511112738.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-09
- Publication Date
- 2025-11-14
AI Technical Summary
Existing technologies for surface-mount motor disturbance control suffer from slow response, reliance on accurate models, and susceptibility to jitter, making it difficult to effectively handle complex operating conditions.
By establishing a mathematical model of the surface-mount motor, calculating the predicted values of electromagnetic torque and q-axis current, constructing a sliding surface function, introducing adaptive switching gain, and generating voltage compensation to directly compensate for disturbances, a fast response and stable control are achieved.
It significantly improves the stability and dynamic performance of surface-mount motors under load changes and parameter disturbances, and solves the problems of slow response and jitter in traditional methods.
Smart Images

Figure CN120956128A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of motor control, and in particular to a surface-mount motor disturbance control method, controller, medium, and product. Background Technology
[0002] With the rapid development of automation technology, surface-mount motors have been widely used in industrial production, new energy vehicles, and other fields due to their advantages such as simple structure and high power density. In actual operation, surface-mount motors often face complex conditions such as load changes and parameter disturbances, requiring controllers to accurately identify and suppress various disturbances to ensure the stable operation and dynamic performance of the surface-mount motors.
[0003] Currently, the following three methods are commonly used to address the disturbance problem of surface-mount motors: 1. Traditional PID algorithm; 2. Disturbance observer method; 3. Sliding diaphragm observer method.
[0004] However, the relevant technologies still have certain limitations: traditional PID algorithms respond slowly to complex disturbances and are difficult to suppress quickly; although the disturbance observer method can effectively identify disturbances, its performance is heavily dependent on the accuracy of the motor model parameters, which are usually not accurately obtained and may change under certain operating conditions; although the sliding window observer method has strong robustness, it is prone to large jitter due to the switching of the sliding window function during its control process, which affects the control effect. Summary of the Invention
[0005] This application provides a surface-mount motor disturbance control method, controller, medium, and product for achieving efficient suppression and stable control of surface-mount motor disturbances.
[0006] In a first aspect, this application provides a disturbance control method for a surface-mount motor, applied to a controller. The method includes: establishing a mathematical model of the surface-mount motor based on its operating parameters, including measured values of q-axis current, q-axis voltage, and q-axis inductance; calculating a predicted electromagnetic torque based on a preset motor mechanical motion equation, and substituting the predicted electromagnetic torque into the electromagnetic torque-q-axis current calculation formula to obtain the predicted q-axis current; constructing a sliding surface function based on the predicted and measured q-axis current to determine a sliding control rate function, which includes a switching gain variable; determining a predicted q-axis voltage based on the surface-mount motor mathematical model and the predicted q-axis current, and dividing the difference between the measured and predicted q-axis voltage by the q-axis inductance to obtain a disturbance estimate; inputting the disturbance estimate into the switching gain calculation formula to output an adaptive switching gain, replacing the switching gain variable in the sliding control rate function with the adaptive switching gain to obtain the sliding control rate; and determining a voltage compensation amount based on the product of the sliding control rate and the q-axis inductance to generate a voltage compensation command.
[0007] By adopting the above technical solution, firstly, the controller establishes a mathematical model of the surface-mount motor based on its operating parameters, providing a theoretical foundation that closely matches the actual characteristics of the surface-mount motor for subsequent disturbance prediction and control. Next, the controller calculates the predicted q-axis current value using preset motor mechanical motion equations and the electromagnetic torque-q-axis current calculation formula, and constructs a sliding surface function based on the measured q-axis current value, thus establishing a feedback adjustment framework for disturbance control. Then, the controller introduces the disturbance estimate (calculated based on the difference between the measured and predicted q-axis voltage values) and generates an adaptive switching gain using the switching gain calculation formula, replacing the fixed switching gain in traditional sliding surface control and effectively alleviating the jitter problem of traditional sliding surface control. Finally, the controller determines the voltage compensation amount by multiplying the sliding surface control law and the q-axis inductance, achieving direct compensation for disturbances. This method overcomes the shortcomings of traditional PID algorithms (slow response), disturbance observer methods (reliance on accurate models), and sliding surface observer methods (prone to jitter), enabling rapid response to complex operating conditions such as load changes and parameter disturbances, significantly improving the stability and dynamic performance of the surface-mount motor.
[0008] In conjunction with some embodiments of the first aspect, in some embodiments, the preset mechanical motion equation of the motor is: in, The electromagnetic torque prediction value is represented by J, the moment of inertia by ω, and the rotor angular frequency by T. The operating parameters include the rotor angular frequency. L This represents the load torque; the formula for calculating electromagnetic torque - q-axis current is: Among them, T e The electromagnetic torque is represented by p, the number of pole pairs of the motor is ψ. f Indicates the flux linkage of a permanent magnet, i q This represents the q-axis current.
[0009] By adopting the above technical solution, the pre-set mechanical motion equations of the motor and the electromagnetic torque-q-axis current calculation formula provide a precise and realistic mathematical basis for the disturbance control of surface-mount motors. The pre-set mechanical motion equations of the motor encompass parameters such as the predicted electromagnetic torque, moment of inertia, rotor angular frequency, and load torque, accurately describing the dynamic correlation between the electromagnetic torque, rotor motion state, and load during the motor's mechanical motion. This enables the controller to accurately calculate the predicted electromagnetic torque, providing a reliable mechanical characteristic basis for subsequent q-axis current prediction. The electromagnetic torque-q-axis current calculation formula correlates the electromagnetic torque with the number of motor pole pairs, permanent magnet flux linkage, and q-axis current, establishing a quantitative relationship between the electromagnetic torque and q-axis current, ensuring the accuracy of deriving the predicted q-axis current value from the predicted electromagnetic torque value. The preset mechanical motion equations of the motor and the electromagnetic torque-q-axis current calculation formula together construct a complete predictive logic chain of "mechanical motion state-electromagnetic torque-q-axis current", which provides a high-precision predictive benchmark for subsequent control steps such as sliding surface function construction and disturbance estimation. This effectively improves the controller's adaptability to the actual operating state of the motor, thereby enhancing the response accuracy to load changes, parameter disturbances and other operating conditions.
[0010] In conjunction with some embodiments of the first aspect, in some embodiments, a sliding surface function is constructed based on the predicted q-axis current value and the measured q-axis current value to determine the sliding control rate function. The sliding control rate function includes a switching gain variable, specifically including: subtracting the predicted q-axis current value from the measured q-axis current value to construct the sliding surface function; determining the sliding control sign function based on the sign of the sliding surface function; and multiplying the switching gain variable by the sliding control sign function to obtain the sliding control rate function.
[0011] By adopting the above technical solution, firstly, the controller constructs a sliding surface function based on the difference between the measured and predicted q-axis current values. The deviation between the actual and expected states of the q-axis current is used as the core of control, ensuring that the sliding surface accurately reflects the current control error and provides a clear direction for subsequent adjustments. Secondly, the controller determines the sliding control sign function based on the sign of the sliding surface function, defining the basis for determining the control direction and making the directionality of control adjustments clearer. Finally, the controller multiplies the switching gain variable with the sliding control sign function to obtain the sliding control rate function. This retains the strong disturbance suppression capability of the sliding control while introducing an adjustable switching gain variable, reserving flexibility for subsequent adaptive control combined with disturbance estimation. This method enables the sliding control loop to accurately capture current deviations to respond to disturbances and optimize control effects through variable adjustment, effectively improving the adaptability and controllability of the sliding control in disturbance suppression.
[0012] In conjunction with some embodiments of the first aspect, in some embodiments, the mathematical model of the surface-mount motor is as follows: Among them, iq R represents the q-axis current. s L represents the stator resistance. q Represents the q-axis inductance, ω e ψ represents electric angular velocity. f Indicates permanent magnet flux linkage, u q The q-axis voltage is represented by the mathematical model of the surface-mount motor and the predicted value of the q-axis current. Specifically, the predicted value of the q-axis voltage is determined by multiplying the mathematical model of the surface-mount motor by the q-axis inductance to obtain the expression for the q-axis voltage, and then substituting the predicted value of the q-axis current into the expression for the q-axis voltage to obtain the predicted value of the q-axis voltage.
[0013] By adopting the above technical solution, the surface-mount motor mathematical model integrates core electrical parameters such as q-axis current, stator resistance, q-axis inductance, electric angular velocity, permanent magnet flux linkage, and q-axis voltage. This allows it to comprehensively and accurately reflect the electrical characteristics of the surface-mount motor during operation, making the mathematical model's description of the motor's actual operating state more closely resemble real-world conditions. The controller multiplies the surface-mount motor mathematical model by the q-axis inductance to obtain the q-axis voltage expression, then substitutes it into the predicted q-axis current value for calculation. This ensures the accuracy of the q-axis voltage prediction calculation and provides a high-quality benchmark for subsequent disturbance estimation by dividing the difference between the measured and predicted q-axis voltage values by the q-axis inductance. This directly improves the accuracy of disturbance estimation and lays a crucial foundation for the controller to effectively identify and suppress disturbances in the surface-mount motor.
[0014] In conjunction with some embodiments of the first aspect, in some embodiments, the switching gain calculation formula is: K = K0 + η·|f|; where K represents the adaptive switching gain, K0 represents the constant gain, η represents the scaling factor, and f represents the disturbance estimate; the slicker control law function is: in, Let represent the synovial control rate, k represent the switching gain variable, sign(s) represent the synovial control sign function, and s represent the synovial surface function.
[0015] By adopting the above technical solution, the switching gain calculation formula correlates the constant gain, scaling factor, and disturbance estimate, allowing the adaptive switching gain to dynamically change with the disturbance estimate. When the disturbance is large, the switching gain increases accordingly, ensuring the ability to suppress large disturbances; when the disturbance is small, the switching gain remains within a reasonable range, avoiding over-adjustment or jitter that may result from a fixed switching gain. The sliding diaphragm control rate function clearly defines the control direction with a sign function. Combined with the adaptive switching gain, it retains the strong robustness of sliding diaphragm control against disturbances while resolving the contradiction between "disturbance resistance" and "jitter prevention" in traditional sliding diaphragm control through dynamic adaptation of the adaptive switching gain. This method enables the sliding diaphragm control rate to accurately adjust the control strength according to the actual disturbance situation, improving the stability and dynamic response performance of the controller under different disturbance conditions, and providing a reliable control basis for the accurate execution of subsequent voltage compensation.
[0016] In conjunction with some embodiments of the first aspect, in some embodiments, a voltage compensation amount is determined based on the product of the sliding control rate and the q-axis inductance to generate a voltage compensation command. Specifically, this includes: multiplying the sliding control rate by the q-axis inductance to obtain the voltage compensation amount; if the voltage compensation amount is greater than the saturation limit value, generating a voltage compensation command based on the saturation limit value; if the voltage compensation amount is less than the negative of the saturation limit value, generating a voltage compensation command based on the negative of the saturation limit value; and if the voltage compensation amount is between the negative of the saturation limit value and the saturation limit value, generating a voltage compensation command based on the voltage compensation amount.
[0017] By adopting the above technical solution, the controller determines the voltage compensation amount based on the product of the sliding diaphragm control rate and the q-axis inductance, enabling the compensation force to accurately match the disturbance suppression requirements. The controller sets a saturation limit value and performs segmented processing: when the voltage compensation amount exceeds the upper limit, a voltage compensation command is generated based on the saturation limit value; when the voltage compensation amount is below the lower limit, a voltage compensation command is generated based on the opposite of the saturation limit value; and when the voltage compensation amount is within the range, the calculated value is used directly. This effectively avoids the risk of impact or runaway from the surface-mount motor caused by excessive compensation. This method ensures the accuracy of compensation within a reasonable disturbance range and adds "safety protection" to the surface-mount motor through the limiting mechanism, allowing the voltage compensation command to effectively suppress disturbances while ensuring the stability and safety of the surface-mount motor operation, achieving a balance between control effect and operational safety.
[0018] In conjunction with some embodiments of the first aspect, in some embodiments, after determining the predicted value of the q-axis voltage based on the surface-mount motor mathematical model and the predicted value of the q-axis current, and dividing the difference between the measured value of the q-axis voltage and the predicted value of the q-axis voltage by the q-axis inductance to obtain the disturbance estimate, the method further includes: if the disturbance estimate is greater than the disturbance estimate limit, substituting the disturbance estimate limit into the switching gain calculation formula; if the disturbance estimate is less than the negative of the disturbance estimate limit, substituting the negative of the disturbance estimate limit into the switching gain calculation formula; if the disturbance estimate is between the negative of the disturbance estimate limit and the disturbance estimate limit, substituting the disturbance estimate into the switching gain calculation formula.
[0019] By adopting the above technical solution, the controller performs amplitude limiting processing on the disturbance estimate and clarifies the rules for substituting it into the switching gain calculation formula, thus ensuring the stable calculation of adaptive switching gain: when the disturbance estimate exceeds the positive disturbance estimate limit, it is replaced by the disturbance estimate limit; when it is lower than the negative disturbance estimate limit, it is replaced by the opposite of the disturbance estimate limit; and when it is within a reasonable range, it is used directly. This effectively avoids abnormal disturbance estimates (such as deviations caused by sensor errors or sudden extreme operating conditions) from being substituted into the switching gain calculation formula, which would lead to abnormal increases or fluctuations in the switching gain, and thus cause problems such as controller jitter and instability.
[0020] In a second aspect, embodiments of this application provide a controller comprising: one or more processors and a memory; the memory is coupled to the one or more processors and is used to store computer program code, the computer program code including computer instructions, wherein the one or more processors invoke the computer instructions to cause the controller to perform the method as described in the first aspect and any possible implementation thereof.
[0021] Thirdly, embodiments of this application provide a computer program product containing instructions that, when the computer program product is run on a controller, cause the controller to perform the method described in the first aspect and any possible implementation thereof.
[0022] Fourthly, embodiments of this application provide a computer-readable storage medium including instructions that, when executed on a controller, cause the controller to perform the method described in the first aspect and any possible implementation thereof.
[0023] Understandably, the controller provided in the second aspect, the computer program product provided in the third aspect, and the computer storage medium provided in the fourth aspect are all used to execute the methods provided in the embodiments of this application. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods, and will not be repeated here.
[0024] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: 1. By adopting the above technical solution, firstly, the controller establishes a mathematical model of the surface-mount motor based on its operating parameters, providing a theoretical foundation that closely matches the actual characteristics of the surface-mount motor for subsequent disturbance prediction and control. Next, the controller calculates the predicted value of the q-axis current using the preset motor mechanical motion equations and the electromagnetic torque-q-axis current calculation formula, and constructs a sliding surface function based on the measured q-axis current value, thus establishing a feedback adjustment framework for disturbance control. Then, the controller introduces the disturbance estimate (calculated based on the difference between the measured and predicted q-axis voltage values) and generates an adaptive switching gain using the switching gain calculation formula, replacing the fixed switching gain in traditional sliding surface control and effectively alleviating the jitter problem of traditional sliding surface control. Finally, the controller determines the voltage compensation amount by multiplying the sliding surface control law and the q-axis inductance, achieving direct compensation for disturbances. This method overcomes the shortcomings of traditional PID algorithms (slow response), disturbance observer methods (reliance on accurate models), and sliding surface observer methods (prone to jitter), enabling rapid response to complex operating conditions such as load changes and parameter disturbances, significantly improving the stability and dynamic performance of the surface-mount motor.
[0025] 2. By adopting the above technical solution, firstly, the controller constructs a sliding surface function based on the difference between the measured and predicted q-axis current values. The deviation between the actual and expected states of the q-axis current is used as the core of the control, ensuring that the sliding surface accurately reflects the current control error and providing a clear direction for subsequent adjustments. Then, the controller determines the sliding control sign function based on the sign of the sliding surface function, defining the basis for determining the control direction and making the directionality of control adjustments clearer. Finally, the controller multiplies the switching gain variable with the sliding control sign function to obtain the sliding control rate function. This retains the strong disturbance suppression capability of the sliding control while introducing an adjustable switching gain variable, reserving flexibility for subsequent adaptive control combined with disturbance estimation. This method enables the sliding control loop to accurately capture current deviations to respond to disturbances and optimize control effects through variable adjustment, effectively improving the adaptability and controllability of the sliding control in disturbance suppression.
[0026] 3. By adopting the above technical solution, the switching gain calculation formula correlates the constant gain, scaling factor, and disturbance estimate, allowing the adaptive switching gain to dynamically change with the disturbance estimate. When the disturbance is large, the switching gain increases accordingly, ensuring the ability to suppress large disturbances; when the disturbance is small, the switching gain remains within a reasonable range, avoiding over-adjustment or jitter that may result from a fixed switching gain. The sliding control rate function clearly defines the control direction with a sign function. Combined with the adaptive switching gain, it retains the strong robustness of sliding control against disturbances while resolving the contradiction between "disturbance resistance" and "jitter prevention" in traditional sliding control through dynamic adaptation of the adaptive switching gain. This method enables the sliding control rate to accurately adjust the control strength according to the actual disturbance situation, improving the stability and dynamic response performance of the controller under different disturbance conditions, and providing a reliable control basis for the accurate execution of subsequent voltage compensation. Attached Figure Description
[0027] Figure 1 This is a flowchart illustrating a surface-mount motor disturbance control method in an embodiment of this application. Figure 2 This is another schematic flowchart of the surface-mount motor disturbance control method in the embodiments of this application; Figure 3 This is a schematic diagram of the physical device structure of the controller in an embodiment of this application. Detailed Implementation
[0028] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification of this application, the singular expressions “a,” “an,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to any or all possible combinations including one or more of the listed items.
[0029] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0030] The following describes the process of the method provided in this implementation. Please refer to [link / reference]. Figure 1 This is a flowchart illustrating a surface-mount motor disturbance control method in an embodiment of this application.
[0031] S101. Based on the operating parameters of the surface-mount motor, establish a mathematical model of the surface-mount motor. The operating parameters include the measured values of the q-axis current, the measured values of the q-axis voltage, and the q-axis inductance. Among them, surface-mount motor refers to permanent magnet synchronous motor with permanent magnets attached to the rotor surface; operating parameters represent physical quantities that can be measured or calculated during the operation of surface-mount motor; measured q-axis current refers to the q-axis current value collected in real time by a current sensor; measured q-axis voltage refers to the q-axis voltage value collected in real time by a voltage sensor; q-axis inductance represents the inductance value of the stator winding in the q-axis direction; and the mathematical model of surface-mount motor refers to the set of mathematical equations describing the electromagnetic and mechanical characteristics of surface-mount motor.
[0032] Specifically, the controller collects the measured values of the q-axis current and q-axis voltage during the operation of the surface-mount motor through current and voltage sensors, and simultaneously obtains the q-axis inductance of the surface-mount motor. Based on these operating parameters, the controller establishes a mathematical model that includes parameters such as stator resistance and permanent magnet flux linkage. This mathematical model can accurately describe the dynamic and steady-state characteristics of the surface-mount motor under various operating conditions.
[0033] The mathematical model for a surface-mount motor is: Among them, i q R represents the q-axis current. s L represents the stator resistance. q Represents the q-axis inductance, ω e ψ represents electric angular velocity. f Indicates permanent magnet flux linkage, u q This represents the q-axis voltage.
[0034] S102. Based on the preset motor mechanical motion equation, calculate the electromagnetic torque prediction value, substitute the electromagnetic torque prediction value into the electromagnetic torque-q-axis current calculation formula, and obtain the q-axis current prediction value. Among them, the preset motor mechanical motion equation refers to the mathematical equation describing the mechanical motion law of the surface-mount motor rotor; the electromagnetic torque prediction value represents the electromagnetic torque at the next moment calculated based on the preset motor mechanical motion equation; the electromagnetic torque-q-axis current calculation formula refers to the mathematical expression describing the relationship between electromagnetic torque and q-axis current; and the q-axis current prediction value represents the q-axis current at the next moment calculated based on the electromagnetic torque prediction value.
[0035] Specifically, the controller calculates the predicted electromagnetic torque value for the next moment based on a preset motor mechanical motion equation that includes rotational inertia, rotor angular frequency, and load torque. Then, the controller substitutes this predicted electromagnetic torque value into the electromagnetic torque-q-axis current calculation formula, which considers the number of motor pole pairs and permanent magnet flux linkage, and obtains the predicted q-axis current value for the next moment through mathematical operations, laying the foundation for subsequent control calculations. The formula for calculating the predicted q-axis current value is:
[0036] The preset mechanical motion equations of the motor are: in, The electromagnetic torque prediction value is represented by J, the moment of inertia by ω, and the rotor angular frequency by T. The operating parameters include the rotor angular frequency. L This indicates the load torque.
[0037] The formula for calculating electromagnetic torque-q-axis current is: Among them, T e The electromagnetic torque is represented by p, the number of pole pairs of the motor is ψ. f Indicates the flux linkage of a permanent magnet, i q This represents the q-axis current.
[0038] S103. Construct a sliding surface function based on the predicted and measured values of the q-axis current to determine the sliding control rate function, which includes a switching gain variable. Among them, the sliding surface function is a mathematical function that describes the deviation of the system state; the sliding control law function is a mathematical expression used to generate the control quantity; and the switching gain variable is a variable parameter used to adjust the control strength.
[0039] Specifically, the controller constructs a sliding surface function based on the measured and predicted q-axis current values. The sliding surface function is designed as follows: Where s represents the synovial surface function, i q This represents the measured value of the q-axis current. This represents the predicted q-axis current, where p represents the number of motor pole pairs, and ψ... f This represents the permanent magnet's magnetic field. Since the sliding control rate uses the sign of this sliding surface function, the sliding surface function can be simplified to: The synovial control rate function is designed as follows: in, Let represent the slug control rate function, k represent the switching gain variable, and sign(s) represent the sign function of the slug control.
[0040] Optionally, in general, a sliding surface function is constructed based on the predicted and measured q-axis current values to determine the sliding control rate function. The sliding control rate function includes a switching gain variable, which can be achieved in the following ways, without limitation: subtract the predicted q-axis current value from the measured q-axis current value to construct the sliding surface function; determine the sliding control sign function based on the sign of the sliding surface function; and multiply the switching gain variable by the sliding control sign function to obtain the sliding control rate function.
[0041] The synovial control sign function is a discrete function determined by the sign of the synovial surface function. The synovial control rate function is: in, Let represent the synovial control rate, k represent the switching gain variable, sign(s) represent the synovial control sign function, and s represent the synovial surface function.
[0042] Specifically, the controller calculates the deviation between the measured and predicted q-axis current values and uses this deviation as a state variable to construct a sliding surface function. Then, based on the sign characteristics of the sliding surface function, the controller determines the sliding control sign function and introduces an adjustable switching gain variable. The sliding control rate function is constructed by multiplying the switching gain variable by the sliding control sign function. This sliding control rate function, by dynamically adjusting the magnitude of the switching gain variable, ensures both control robustness and avoids severe system oscillations.
[0043] S104. Based on the mathematical model of the surface-mounted motor and the predicted value of the q-axis current, determine the predicted value of the q-axis voltage. Divide the difference between the measured value of the q-axis voltage and the predicted value of the q-axis voltage by the q-axis inductance to obtain the disturbance estimate. Among them, the predicted q-axis voltage refers to the q-axis voltage at the next moment calculated based on the mathematical model of the surface-mounted motor; the difference represents the algebraic difference between the measured q-axis voltage and the predicted q-axis voltage; and the disturbance estimate refers to the comprehensive equivalent value of external disturbances and parameter perturbations experienced by the surface-mounted motor.
[0044] Specifically, the controller multiplies the surface-mount motor mathematical model by the q-axis inductance to establish a q-axis voltage expression that includes parameters such as stator resistance, electric angular velocity, and permanent magnet flux linkage. The q-axis voltage expression is: Then, the controller substitutes the calculated predicted q-axis current value into the q-axis voltage expression to obtain the predicted q-axis voltage value. Next, the controller subtracts the predicted q-axis voltage value from the real-time measured q-axis voltage value to obtain the voltage difference. Finally, the controller divides this voltage difference by the q-axis inductance to obtain a disturbance estimate reflecting the combined effects of load changes, parameter disturbances, etc., currently experienced by the surface-mount motor. The formula for calculating the disturbance estimate is:
[0045] S105. Input the disturbance estimate into the switching gain calculation formula, output the adaptive switching gain, replace the switching gain variable in the slurry control rate function with the adaptive switching gain, and obtain the slurry control rate. The switching gain calculation formula refers to the mathematical expression used to calculate the adaptive switching gain; the adaptive switching gain refers to the switching gain value that is dynamically adjusted according to the disturbance.
[0046] Specifically, the controller substitutes the disturbance estimate into the switching gain calculation formula, which includes a constant gain and a scaling factor, to calculate an adaptive switching gain value. This adaptive switching gain dynamically adjusts as the disturbance estimate changes; the larger the disturbance estimate, the larger the adaptive switching gain. Then, the controller replaces the switching gain variable in the previous sliding control law function with the calculated adaptive switching gain to obtain the final sliding control law, thus achieving adaptive adjustment of the control strength.
[0047] The formula for calculating the switching gain is: K = K0 + η·|f|; where K represents the adaptive switching gain, K0 represents the constant gain, η represents the scaling factor, and f represents the disturbance estimate.
[0048] S106. Determine the voltage compensation amount based on the product of the sliding control rate and the q-axis inductance to generate a voltage compensation command.
[0049] Among them, voltage compensation amount refers to the voltage value used to compensate for disturbances in surface-mounted motors, and is used to offset external interference such as load changes and parameter fluctuations; voltage compensation command refers to the compensation control signal sent by the controller to the motor driver.
[0050] Specifically, the controller multiplies the sliding control rate by the q-axis inductance to obtain the voltage compensation amount. Based on this voltage compensation amount, the controller generates a voltage compensation command to control the motor driver to adjust the amplitude and phase of the output voltage, thereby compensating for various disturbances during the operation of the surface-mount motor.
[0051] Optionally, under normal circumstances, the voltage compensation amount is determined based on the product of the sliding control rate and the q-axis inductance to generate a voltage compensation command. This can be achieved in the following ways, without limitation: multiply the sliding control rate by the q-axis inductance to obtain the voltage compensation amount; if the voltage compensation amount is greater than the saturation limit value, generate a voltage compensation command based on the saturation limit value; if the voltage compensation amount is less than the negative of the saturation limit value, generate a voltage compensation command based on the negative of the saturation limit value; if the voltage compensation amount is between the negative of the saturation limit value and the saturation limit value, generate a voltage compensation command based on the voltage compensation amount.
[0052] Among them, the saturation limit value refers to the maximum allowable value of voltage compensation.
[0053] Specifically, the controller multiplies the sliding control rate by the q-axis inductance to calculate the voltage compensation amount used to compensate for disturbances in the surface-mount motor. The controller then limits this voltage compensation amount: when the voltage compensation amount is greater than the saturation limit, the saturation limit is used to generate the voltage compensation command; when the voltage compensation amount is less than the negative of the saturation limit, the negative of the saturation limit is used to generate the voltage compensation command; when the voltage compensation amount is within the limit range, the calculated voltage compensation amount is used directly to generate the voltage compensation command. The controller then sends the generated voltage compensation command to the motor driver, achieving effective compensation for system disturbances.
[0054] By adopting the above technical solution, firstly, the controller establishes a mathematical model of the surface-mount motor based on its operating parameters, providing a theoretical foundation that closely matches the actual characteristics of the surface-mount motor for subsequent disturbance prediction and control. Next, the controller calculates the predicted q-axis current value using preset motor mechanical motion equations and the electromagnetic torque-q-axis current calculation formula, and constructs a sliding surface function based on the measured q-axis current value, thus establishing a feedback adjustment framework for disturbance control. Then, the controller introduces the disturbance estimate (calculated based on the difference between the measured and predicted q-axis voltage values) and generates an adaptive switching gain using the switching gain calculation formula, replacing the fixed switching gain in traditional sliding surface control and effectively alleviating the jitter problem of traditional sliding surface control. Finally, the controller determines the voltage compensation amount by multiplying the sliding surface control law and the q-axis inductance, achieving direct compensation for disturbances. This method overcomes the shortcomings of traditional PID algorithms (slow response), disturbance observer methods (reliance on accurate models), and sliding surface observer methods (prone to jitter), enabling rapid response to complex operating conditions such as load changes and parameter disturbances, significantly improving the stability and dynamic performance of the surface-mount motor.
[0055] The following provides a more detailed description of the process of the method provided in this implementation. Please refer to [link / reference]. Figure 2 This is another flowchart illustrating the surface-mount motor disturbance control method in this application embodiment.
[0056] The following steps may or may not be performed after step S104; this is not a limitation here: S201. If the disturbance estimate is greater than the disturbance estimate limit, substitute the disturbance estimate limit into the switching gain calculation formula.
[0057] Among them, the disturbance estimation limit value refers to the maximum allowable disturbance estimate value, which is used to prevent excessive disturbances from causing control instability; the switching gain calculation formula refers to the mathematical expression used to calculate the adaptive switching gain, which includes constant gain and scaling factor.
[0058] Specifically, the controller compares the real-time calculated disturbance estimate with the preset disturbance estimate limit. When the disturbance estimate is greater than the disturbance estimate limit, it indicates that the surface-mounted motor has been subjected to a large disturbance. In this case, the controller does not directly use the calculated disturbance estimate, but instead substitutes the disturbance estimate limit into the switching gain calculation formula to prevent the disturbance estimate from being too large, which would lead to excessive adaptive switching gain and cause severe system oscillation.
[0059] S202. If the disturbance estimate is less than the negative of the disturbance estimate limit, substitute the negative of the disturbance estimate limit into the switching gain calculation formula.
[0060] The negative of the disturbance estimation limit value refers to the negative value of the disturbance estimation limit value, which is used to limit the maximum allowable value of negative disturbances; negative disturbances refer to external disturbances that reduce the state variables of the surface-mounted motor.
[0061] Specifically, the controller compares the disturbance estimate with the negative of the disturbance estimate limit: when the disturbance estimate is less than the negative of the disturbance estimate limit, it indicates that the surface-mounted motor has been subjected to a large negative disturbance. At this time, the controller substitutes the negative of the disturbance estimate limit into the switching gain calculation formula to ensure that the switching gain under negative disturbance is not too large, thus avoiding severe negative oscillations in the system.
[0062] S203. If the disturbance estimate is between the negative of the disturbance estimate limit and the disturbance estimate limit, substitute the disturbance estimate into the switching gain calculation formula.
[0063] Specifically, when the disturbance estimate is greater than the negative of the disturbance estimate limit but less than the disturbance estimate limit, it indicates that the disturbance experienced by the surface-mount motor is within an acceptable range. In this case, the controller directly substitutes the calculated disturbance estimate into the switching gain calculation formula without performing any limiting processing. Under these circumstances, the adaptive switching gain will smoothly adjust with changes in the disturbance estimate, ensuring both the controller's rapid response to disturbances within the normal range and avoiding the control discontinuity caused by limiting processing.
[0064] The controller in the embodiments of this invention is described below from the perspective of hardware processing. Please refer to [link / reference]. Figure 3 This is a schematic diagram of the physical device structure of the controller in an embodiment of this application.
[0065] It should be noted that, Figure 3 The controller structure shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0066] like Figure 3As shown, the controller includes a CPU 301, which can perform various appropriate actions and processes based on a program stored in the read-only memory ROM 302 or a program loaded from the storage section 308 into the random access memory RAM 303, such as performing the methods described in the above embodiments. The RAM 303 also stores various programs and data required for system operation. The CPU 301, ROM 302, and RAM 303 are interconnected via a bus 304. An I / O interface 305 is also connected to the bus 304.
[0067] The following components are connected to I / O interface 305: input section 306 including audio input devices, push-button switches, etc.; output section 307 including a liquid crystal display (LCD) and audio output devices, indicator lights, etc.; storage section 308 including a hard disk, etc.; and communication section 309 including a network interface card such as a LAN (Local Area Network) card, modem, etc. Communication section 309 performs communication processing via a network such as the Internet. Drive 310 is also connected to I / O interface 305 as needed. Removable media 311, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 310 as needed so that computer programs read from them can be installed into storage section 308 as needed.
[0068] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing computer programs for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 309, and / or installed from removable medium 311. When the computer program is executed by CPU 301, it performs the various functions defined in the present invention.
[0069] It should be noted that specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0070] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. Each block in a flowchart or block diagram may represent a module, program segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those shown in the drawings.
[0071] Specifically, the controller in this embodiment includes a processor and a memory. The memory stores a computer program, and when the computer program is executed by the processor, it implements the surface-mount motor disturbance control method provided in the above embodiment.
[0072] In another aspect, the present invention also provides a computer-readable storage medium, which may be included in the controller described in the above embodiments; or it may exist independently and not assembled into the controller. The storage medium carries one or more computer programs that, when executed by a processor of the controller, cause the controller to implement the surface-mount motor disturbance control method provided in the above embodiments.
[0073] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application 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 scope of the technical solutions of the embodiments of this application.
[0074] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is interpreted as meaning "if determining...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".
[0075] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A method for controlling disturbances in a surface-mount motor, characterized in that, Applied to a controller, the method includes: A mathematical model of the surface-mount motor is established based on its operating parameters, including the measured values of q-axis current, q-axis voltage, and q-axis inductance. Based on the preset motor mechanical motion equation, the electromagnetic torque prediction value is calculated, and the electromagnetic torque prediction value is substituted into the electromagnetic torque-q-axis current calculation formula to obtain the q-axis current prediction value. Based on the predicted q-axis current and the measured q-axis current, a sliding surface function is constructed to determine the sliding control rate function, which includes a switching gain variable. Based on the surface-mount motor mathematical model and the predicted q-axis current, the predicted q-axis voltage is determined. The difference between the measured q-axis voltage and the predicted q-axis voltage is divided by the q-axis inductance to obtain the disturbance estimate. The disturbance estimate is input into the switching gain calculation formula, and the adaptive switching gain is output. The adaptive switching gain is used to replace the switching gain variable in the slug control rate function to obtain the slug control rate. The voltage compensation amount is determined based on the product of the sliding control rate and the q-axis inductance to generate a voltage compensation command.
2. The method according to claim 1, characterized in that, The preset motor mechanical motion equation is: in, The electromagnetic torque prediction value is represented by J, the moment of inertia by ω, and the rotor angular frequency by T. The operating parameters include the rotor angular frequency. L Indicates load torque; The formula for calculating the electromagnetic torque-q-axis current is as follows: Among them, T e ψ represents electromagnetic torque, p represents the number of pole pairs of the motor, and ψ f Indicates the flux linkage of a permanent magnet, i q This represents the q-axis current.
3. The method according to claim 1, characterized in that, The process involves constructing a sliding surface function based on the predicted and measured q-axis current values to determine the sliding control rate function. This sliding control rate function includes a switching gain variable, specifically: The sliding surface function is constructed by subtracting the predicted value of the q-axis current from the measured value of the q-axis current. Based on the sign of the synovial surface function, the synovial control sign function is determined; The switching gain variable is multiplied by the synovial control sign function to obtain the synovial control rate function.
4. The method according to claim 2, characterized in that, The mathematical model for the surface-mount motor is as follows: Among them, i q Represents the q-axis current, R s L represents the stator resistance. q ω represents the q-axis inductance. e ψ represents electric angular velocity. f The permanent magnet flux linkage, u q Represents the q-axis voltage; The step of determining the predicted q-axis voltage based on the surface-mount motor mathematical model and the predicted q-axis current specifically includes: multiplying the surface-mount motor mathematical model by the q-axis inductance to obtain the q-axis voltage expression, and substituting the predicted q-axis current into the q-axis voltage expression to obtain the predicted q-axis voltage.
5. The method according to claim 3, characterized in that, The switching gain calculation formula is: K = K0 + η·|f|; where K represents the adaptive switching gain, K0 represents the constant gain, η represents the scaling factor, and f represents the disturbance estimate. The synovial control rate function is: in, Let represent the synovial control rate, k represent the switching gain variable, sign(s) represent the synovial control sign function, and s represent the synovial surface function.
6. The method according to claim 1, characterized in that, The step of determining the voltage compensation amount based on the product of the sliding control rate and the q-axis inductance to generate a voltage compensation command specifically includes: Multiplying the sliding control rate by the q-axis inductance yields the voltage compensation amount; If the voltage compensation amount is greater than the saturation limit value, a voltage compensation command is generated based on the saturation limit value; If the voltage compensation amount is less than the negative number of the saturation limit value, a voltage compensation command is generated based on the negative number of the saturation limit value. If the voltage compensation amount is between the negative of the saturation limit value and the saturation limit value, a voltage compensation command is generated based on the voltage compensation amount.
7. The method according to claim 1, characterized in that, After the steps of determining the predicted q-axis voltage value based on the surface-mount motor mathematical model and the predicted q-axis current value, and dividing the difference between the measured q-axis voltage value and the predicted q-axis voltage value by the q-axis inductance to obtain the disturbance estimate, the method further includes: If the disturbance estimate is greater than the disturbance estimate limit, the disturbance estimate limit is substituted into the handover gain calculation formula; if the disturbance estimate is less than the negative of the disturbance estimate limit, the negative of the disturbance estimate limit is substituted into the handover gain calculation formula. If the disturbance estimate is between the negative of the disturbance estimate limit and the disturbance estimate limit, the disturbance estimate is substituted into the switching gain calculation formula.
8. A controller, characterized in that, The controller includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, and the one or more processors invoking the computer instructions to cause the controller to perform the method as described in any one of claims 1-7.
9. A computer-readable storage medium comprising instructions, characterized in that, When the instructions are executed on the controller, the controller causes the controller to perform the method as described in any one of claims 1-7.
10. A computer program product, characterized in that, When the computer program product is run on the controller, the controller performs the method as described in any one of claims 1-7.