A current control method and device of a motor, an electronic device, and a storage medium
By using disturbance observer feedforward compensation, incremental prediction model and SVPWM algorithm in surface-mounted permanent magnet synchronous motor, the problems of slow dynamic response and poor robustness of current control method are solved, and high-precision and high-performance motor control is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-02
- Publication Date
- 2026-04-07
AI Technical Summary
In the existing technology, the current control method of surface-mounted permanent magnet synchronous motor has problems such as slow dynamic response speed, poor robustness and large output harmonics, which makes it difficult to meet the control requirements of high precision and high performance.
A disturbance observer is used for feedforward compensation to construct an incremental prediction model. By processing the one-time delay and optimizing the target value function, combined with the space vector pulse width modulation (SVPWM) algorithm, the action time of the three-phase voltage vector is calculated and the PWM signal is output to drive the inverter, thereby achieving precise control of the motor current.
It improves the dynamic response speed of the motor and the stability of the system, reduces output harmonics, enhances the robustness and precision of control, and meets the control requirements of high-precision servo drives and new energy fields.
Smart Images

Figure CN121012394B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power technology, specifically to a current control method, device, electronic equipment, and storage medium for an electric motor. Background Technology
[0002] Surface-mounted permanent magnet synchronous motors (SPMSMs) are widely used in servo drives, new energy fields, and other areas due to their high power density and high efficiency. The accuracy of their current control directly affects their operational performance. Among related technologies, the mainstream control schemes are traditional PID current control and ordinary model predictive control (MPC). Traditional PID current control is widely used due to its simple structure, but its dynamic response speed is slow, making it difficult to meet the requirements of high-precision and high-performance control. MPC, with its fast dynamic response and intuitive expression of control objectives, has gradually become a research hotspot in motor control. However, traditional model predictive control methods rely on motor model parameters, such as flux linkage parameters, resulting in poor robustness. Furthermore, traditional MPC typically uses discrete voltage finite sets to solve for voltage optimality, leading to large output harmonics and affecting system stability. Therefore, there is an urgent need for a motor control method that can improve dynamic response speed, enhance robustness, and reduce harmonic interference to address the shortcomings of existing technologies. Summary of the Invention
[0003] To address the aforementioned technical problems, this application provides a current control method, apparatus, electronic device, and storage medium for an electric motor.
[0004] In a first aspect, this application provides a current control method for a motor, applied to a surface-mounted permanent magnet synchronous motor, comprising: obtaining the q-axis current setpoint of the motor at time k; observing the disturbance error caused by load and / or parameter deviation using a disturbance observer and performing feedforward compensation to obtain the q-axis current setpoint of the motor at time k+1; constructing an incremental prediction model for the motor, wherein the incremental prediction model is obtained by calculating the difference between the d-axis current and the q-axis current between time k+1 and time k to eliminate the flux linkage parameter in the motor mathematical model; and predicting the q-axis current of the motor at time k+1 based on the incremental prediction model. A one-step delay is performed to obtain the predicted q-axis current of the motor at time k+2. A target value function is constructed based on the given q-axis current at time k+1 and the predicted q-axis current at time k+2, and this function is optimized to obtain a target voltage vector combination. This target voltage vector combination includes the target d-axis voltage and the target q-axis voltage that minimize the target value function. The Space Vector Pulse Width Modulation (SVPWM) algorithm is used to calculate the three-phase voltage vector duration based on the target voltage vector combination. A set of PWM signals is output based on the three-phase voltage vector duration to drive the inverter and control the motor current.
[0005] By adopting the above technical solutions, the control accuracy of the motor can be improved by using a disturbance observer to feedforward compensate for disturbance errors caused by load and / or parameter deviations; the robustness of the control method can be enhanced by constructing an incremental prediction model that eliminates flux linkage parameters; a one-step delay processing of the q-axis current prediction value can make the control more closely match the actual situation; the objective value function is constructed and optimized to obtain the objective voltage vector combination, and the three-phase voltage vector action time is calculated by using the SVPWM algorithm and the PWM signal is output to drive the inverter, which can reduce output harmonics and achieve precise control of motor current, thereby improving the dynamic response speed of the motor and the stability of the system.
[0006] Optionally, a target value function is constructed based on the given q-axis current at time k+1 and the predicted q-axis current at time k+2, including: constructing the target value function in the following manner: in, Let i be the q-axis current given at time k+1 after compensation by the perturbation observer. q (k+2) is the predicted q-axis current at time k+2 after a one-beat delay. The optimization of the objective value function aims to minimize the tracking error between the given q-axis current at time k+1 and the predicted q-axis current at time k+2.
[0007] By adopting the above technical solution, and defining a clear target value function to quantify the optimization objective of current control, more precise current tracking control can be achieved. The target value function G(k+1) is defined as the q-axis current setpoint at time k+1. The predicted q-axis current i at time k+2 q The absolute difference between (k+2). This definition directly reflects the magnitude of the current tracking error. The optimization objective of the objective value function is to minimize the tracking error defined above. By minimizing this error, it can be ensured that the actual current of the motor is as close as possible to the given current value, thereby achieving high-precision current control.
[0008] Optionally, the target value function is optimized to obtain the target voltage vector combination, including: adjusting the target value function for u respectively. d and u q Finding the partial derivative to zero yields the first extreme point, which includes the first voltage vector combination. Calculating the minimum value of the objective value function on the boundary satisfying the voltage constraint condition yields the second extreme point. The voltage constraint condition is... The second extreme point includes the second voltage vector combination, U dc Let be the DC bus voltage of the inverter; substitute the first extreme point and the second extreme point into the target value function respectively, and select the voltage vector combination that minimizes the target value function as the target voltage vector combination.
[0009] By adopting the above technical solution, a target value function is constructed based on the given q-axis current value at time k+1 and the predicted q-axis current value at time k+2. This target value function is then applied to u... d and u q The first extreme point is obtained by taking the partial derivative to zero. The second extreme point is obtained by calculating the minimum value of the target value function on the boundary satisfying the voltage constraint condition. The first and second extreme points are then substituted into the target value function to select the voltage vector combination that minimizes the target value function as the target voltage vector combination. This optimizes the target value function and yields a suitable target voltage vector combination. The Space Vector Pulse Width Modulation (SVPWM) algorithm is used to calculate the three-phase voltage vector action time based on the target voltage vector combination and outputs a PWM signal to drive the inverter. This enables control of the motor current, improves dynamic response speed, enhances robustness, and reduces harmonic interference.
[0010] Optionally, the above method further includes: when the first extreme point exceeds the voltage constraint boundary, scaling the voltage vectors in the first voltage vector combination proportionally to the voltage constraint boundary to obtain a scaled voltage vector combination, and using the scaled voltage vector combination as the first extreme point.
[0011] By adopting the above technical solution, when the first extreme point exceeds the voltage constraint boundary, the voltage vector in the first voltage vector combination is scaled proportionally to the voltage constraint boundary, so that the first extreme point can meet the voltage constraint condition, thereby obtaining the target voltage vector combination that meets the condition, improving the robustness and stability of motor control, and reducing harmonic interference.
[0012] Optionally, a space vector pulse width modulation (SVPWM) algorithm is used to calculate the three-phase voltage vector action time based on the target voltage vector combination, including: converting the target d-axis voltage and target q-axis voltage into voltage U in a two-phase stationary coordinate system using inverse Park transformation. α and U β u α =u d ·cosθ e -u q ·sinθ e u β =u d ·sinθ e +u q ·cosθ e , where θ e For electrical angle; based on U α and U βSector partitioning is performed using SVPWM sector partitioning rules to determine the target sector and two adjacent basic voltage vectors. The action time T corresponding to the two adjacent basic voltage vectors is determined according to the first preset correspondence table. x and T y In this context, two adjacent basic voltage vectors represent two basic voltage vectors associated with the target sector. A first preset correspondence table records the duration of action of the two basic voltage vectors acting sequentially for different sector numbers. The durations T0, T1, and T2 of the three-phase voltage vectors corresponding to the target sector are determined according to a second preset correspondence table. This second preset correspondence table records the durations of action of the three-phase voltage vectors corresponding to different sector numbers. The durations T0, T1, and T2 are related to T... x and T y The following relationship must be satisfied: T0 = T s -T x -T y T1 = T0 + T x T2 = T1 + T y .
[0013] By adopting the above technical solution, the target d-axis voltage and the target q-axis voltage are converted into voltage U in a two-phase stationary coordinate system. α and U β By combining the SVPWM sector division rules and the preset correspondence table to determine the basic voltage vector action time and the three-phase voltage vector action time, the three-phase voltage vector action time required for motor control can be accurately calculated, thereby controlling the motor current more precisely, reducing output harmonics, and improving system stability.
[0014] Optionally, an incremental prediction model for the motor can be constructed, including: establishing a mathematical model for the surface-mounted permanent magnet synchronous motor. Among them, u d u q These correspond to the d-axis voltage and the q-axis voltage, respectively. d i q These correspond to the d-axis current and q-axis current, respectively, R s L is the stator resistance, L is the inductance, and ω is the stator resistance. e Let ψ be the electric angular velocity. f For permanent magnet flux linkage; based on the mathematical model, the following incremental prediction model is established:
[0015]
[0016] Among them, i d (k+1),i q (k+1) represent the predicted d-axis current and q-axis current at time k+1, respectively. d(k), i q (k) represent the d-axis current and q-axis current at time k, respectively, i d (k-1), i q (k-1) represents the d-axis current and q-axis current at time k-1, respectively. d (k-1), u q (k-1) represent the d-axis voltage and q-axis voltage at time k-1, respectively. Let T represent the predicted d-axis voltage and q-axis voltage at time k, respectively. s To control the cycle.
[0017] By adopting the above technical solution, a mathematical model of the surface-mounted permanent magnet synchronous motor is established, which can accurately describe the relationship between the motor's voltage, current and other parameters. Based on this mathematical model, an incremental prediction model is established to calculate the difference between the d-axis current and the q-axis current between time k+1 and time k. This can eliminate the flux linkage parameter in the motor's mathematical model, avoid dependence on the flux linkage parameter, and enhance the robustness of the control method.
[0018] Optionally, based on the incremental prediction model, the predicted q-axis current value of the motor at time k+1 is processed by a one-step delay to obtain the predicted q-axis current value of the motor at time k+2, including obtaining the predicted q-axis current value of the motor at time k+2 in the following manner: in, This represents the predicted q-axis voltage at time k+1.
[0019] By adopting the above technical solution and using a one-step delay processing, the predicted q-axis current value at time k+2 is derived from the predicted q-axis current value at time k+1. The core principle is based on the established incremental prediction model, which takes the prediction result (including current and voltage) at time k+1 as input and recursively calculates the predicted q-axis current value at future time (time k+2), thereby compensating for the inherent "one-step delay" problem in digital control and improving the foresight and control accuracy of current prediction.
[0020] Optionally, a disturbance observer is used to observe the disturbance error caused by load and / or parameter deviations and perform feedforward compensation to obtain the q-axis current setpoint of the motor at time k+1, including: measuring the motor speed and calculating the acceleration; and obtaining the observed q-axis current based on the acceleration according to the following formula: in, To predict electromagnetic torque, T L Where ω is the load torque, J is the moment of inertia, ω is the measured rotor angular frequency, and p is the number of pole pairs of the motor. Let be the observed q-axis current at time k; the given value of the q-axis current at time k+1 is calculated using the following formula: in, Let be the given value of the q-axis current at time k. The given value for the q-axis current before compensation at time k+1. This is the given value of the q-axis current after compensation at time k+1.
[0021] By adopting the above technical solution, measuring the motor speed and calculating the acceleration, and combining the relevant formulas to obtain the observed q-axis current, the feedforward compensation of the q-axis current setpoint at time k+1 can be performed, thereby improving the dynamic response speed of the motor current control, enhancing the robustness of the control method to load and parameter deviations, and effectively compensating for disturbance errors caused by load and parameter deviations.
[0022] In a second aspect of this application, a current control device for a motor is also provided, located in a surface-mounted permanent magnet synchronous motor, comprising: a compensation module for obtaining the q-axis current setpoint of the motor at time k, and for observing the disturbance error caused by load and / or parameter deviation using a disturbance observer and performing feedforward compensation to obtain the q-axis current setpoint of the motor at time k+1; a construction module for constructing an incremental prediction model of the motor, wherein the incremental prediction model is obtained by calculating the difference between the d-axis current and the difference between the q-axis current at time k+1 and time k to eliminate the flux linkage parameter in the mathematical model of the motor; and a delay module for predicting the q-axis current of the motor at time k+1 based on the incremental prediction model. The system performs a one-beat delay to obtain the predicted q-axis current value of the motor at time k+2. An optimization module constructs a target value function based on the given q-axis current value at time k+1 and the predicted q-axis current value at time k+2, and optimizes the target value function to obtain a target voltage vector combination. This target voltage vector combination includes the target d-axis voltage and the target q-axis voltage that minimize the target value function. A calculation module calculates the three-phase voltage vector duration based on the target voltage vector combination using a space vector pulse width modulation (SVPWM) algorithm. A control module outputs a set of PWM signals to drive the inverter and control the motor current based on the three-phase voltage vector duration.
[0023] In a third aspect of this application, an electronic device is also provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor executes the program to implement the method steps of any of the above claims.
[0024] In a fourth aspect of this application, a computer-readable storage medium is also provided, which stores instructions that, when executed, perform the method steps of any of the above claims.
[0025] In summary, one or more technical solutions provided in this application have at least the following technical effects or advantages:
[0026] 1. Using a disturbance observer to feedforward compensate for disturbance errors caused by load and / or parameter deviations can improve the control accuracy of the motor; constructing an incremental prediction model to eliminate flux linkage parameters can enhance the robustness of the control method; performing a one-step delay on the predicted q-axis current value can make the control more closely match the actual situation; constructing and optimizing the target value function to obtain the target voltage vector combination, and using the SVPWM algorithm to calculate the three-phase voltage vector action time and output the PWM signal to drive the inverter can reduce output harmonics, achieve precise control of motor current, and improve the dynamic response speed of the motor and the stability of the system; 2. Constructing a target value function based on the given q-axis current value at time k+1 and the predicted q-axis current value at time k+2, and then applying the target value function to u d and u q The first extreme point is obtained by taking the partial derivative to zero. The second extreme point is obtained by calculating the minimum value of the target value function on the boundary that satisfies the voltage constraint condition. The first and second extreme points are then substituted into the target value function to select the voltage vector combination that minimizes the target value function as the target voltage vector combination. This can optimize the target value function and thus obtain a suitable target voltage vector combination.
[0027] 3. When the first extreme point exceeds the voltage constraint boundary, the voltage vectors in the first voltage vector combination are scaled proportionally to the voltage constraint boundary, so that the first extreme point satisfies the voltage constraint condition, thereby obtaining the target voltage vector combination that satisfies the condition, improving the robustness and stability of motor control, and reducing harmonic interference.
[0028] 4. Convert the target d-axis voltage and target q-axis voltage into voltage U in a two-phase stationary coordinate system. α and U β By combining the SVPWM sector division rules and the preset correspondence table to determine the basic voltage vector action time and the three-phase voltage vector action time, the three-phase voltage vector action time required for motor control can be accurately calculated, thereby controlling the motor current more precisely, reducing output harmonics, and improving system stability.
[0029] 5. By using a one-step delay processing, the predicted q-axis current value at time k+2 is derived from the predicted q-axis current value at time k+1. The core principle is based on the established incremental prediction model, which takes the prediction result at time k+1 (including current and voltage) as input and recursively calculates the predicted q-axis current value at future time (time k+2), thereby compensating for the inherent "one-step delay" problem in digital control and improving the foresight and control accuracy of current prediction. Attached Figure Description
[0030] Figure 1This is a flowchart of a current control method for a motor provided in an embodiment of this application;
[0031] Figure 2 This is a framework diagram of an SPM motor control system provided in an embodiment of this application;
[0032] Figure 3 This is a proportionally scaled schematic diagram provided in the embodiments of this application;
[0033] Figure 4 This is a schematic diagram of sector division provided in an embodiment of this application;
[0034] Figure 5 This is a flowchart of the SPM motor control method provided in the embodiments of this application;
[0035] Figure 6 This is a structural block diagram of a current control device for a motor provided in an embodiment of this application. Detailed Implementation
[0036] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0037] In the description of the embodiments of this application, the words "for example" or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design that is described as "for example" or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design options. Rather, the use of the words "for example" or "for instance" is intended to present the relevant concepts in a specific manner.
[0038] In the description of the embodiments of this application, the term "multiple" means two or more. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0039] This application provides a current control method for a motor, applied to a surface-mounted permanent magnet synchronous motor, with reference to... Figure 1 , Figure 1 This is a flowchart of a current control method for a motor provided in an embodiment of this application. The method includes:
[0040] Step S101: Obtain the q-axis current setpoint of the motor at time k, and use the disturbance observer to observe the disturbance error caused by the load and / or parameter deviation and perform feedforward compensation to obtain the q-axis current setpoint of the motor at time k+1.
[0041] Step S102: Construct an incremental prediction model for the motor. The incremental prediction model is obtained by calculating the difference between the d-axis current and the q-axis current between time k+1 and time k to eliminate the flux linkage parameter in the motor mathematical model.
[0042] Step S103: Based on the incremental prediction model, the predicted value of the q-axis current of the motor at time k+1 is processed by a one-beat delay to obtain the predicted value of the q-axis current of the motor at time k+2.
[0043] Step S104: Construct a target value function based on the given value of the q-axis current at time k+1 and the predicted value of the q-axis current at time k+2, and optimize the target value function to obtain a target voltage vector combination. The target voltage vector combination includes the target d-axis voltage and the target q-axis voltage that minimize the target value function.
[0044] Step S105: The Space Vector Pulse Width Modulation (SVPWM) algorithm is used to calculate the action time of the three-phase voltage vectors based on the target voltage vector combination;
[0045] Step S106: Output a set of PWM signals to drive the inverter according to the three-phase voltage vector action time, and control the motor current.
[0046] Through the above steps, the control accuracy of the motor can be improved by using a disturbance observer to feedforward compensate for the disturbance error caused by load and / or parameter deviations; the robustness of the control method can be enhanced by constructing an incremental prediction model that eliminates flux linkage parameters; the control can be made more closely aligned with the actual situation by performing a one-step delay on the predicted q-axis current value; the target value function is constructed and optimized to obtain the target voltage vector combination, and the three-phase voltage vector action time is calculated by using the SVPWM algorithm and the PWM signal is output to drive the inverter, which can reduce output harmonics and achieve precise control of the motor current, thereby improving the dynamic response speed of the motor and the stability of the system.
[0047] This embodiment proposes an improved current control method for surface-mounted permanent magnet synchronous motors (SPMSMs). Its core principle is to achieve more precise and robust current control through a combination of disturbance observer feedforward compensation, incremental predictive models, one-step delay compensation, and optimization of the objective value function. Specifically, the given value of the q-axis current is obtained at time k, and the disturbance error caused by load changes and / or motor parameter deviations (such as flux linkage, resistance, etc.) is estimated in real time using a disturbance observer. This error is used as a feedforward compensation to correct the given value of the q-axis current at time k+1, thereby offsetting the disturbance effect in advance and improving dynamic response. Traditional MPC relies on a complete mathematical model of the motor (including flux linkage parameters), while the method in this embodiment constructs an incremental predictive model. By calculating the difference between the d / q-axis current at time k+1 and time k, the dependence on flux linkage parameters is eliminated, thereby enhancing robustness, i.e., the ability to adapt to parameter changes. Due to the one-step (one control cycle) delay in digital control, this method calculates the one-step (one control cycle) delay at time k+1. The predicted q-axis current is delayed to derive the predicted q-axis current at time k+2, thereby improving prediction accuracy and reducing errors caused by control lag. Combining the given value at time k+1 and the predicted value at time k+2, a target value function (e.g., a function including current tracking error) is constructed. This target value function directly optimizes for current tracking error, pre-calculating the optimal voltage vector through model prediction. Optimal voltage vector combination (d / q-axis voltage) is obtained through optimization (e.g., minimizing this function), resulting in more accurate current tracking. Finally, space vector pulse width modulation (SVPWM) is used to calculate the three-phase voltage action time, and the PWM signal is output to drive the inverter, achieving high-precision control of the motor current. In contrast, PID control in related technologies relies on feedback adjustment, resulting in slow response speeds and difficulty in meeting the requirements of high-precision servo control. Ordinary MPC relies on a complete mathematical model of the motor (including flux linkage parameters), which leads to decreased control performance and weak robustness when parameters change due to temperature, aging, etc. Furthermore, ordinary MPC typically uses discrete voltage finite sets for optimization, which may result in insufficient voltage vector selection, large output current harmonics, and impact on system stability. This embodiment, through disturbance observer feedforward compensation and incremental predictive control, predicts and compensates for disturbances in advance, significantly improving dynamic response speed. By calculating the current difference rather than directly relying on flux linkage parameters, it reduces sensitivity to motor parameters and enhances robustness. Combined with one-step delay processing to compensate for the inherent delay of the digital control system, and finally, by optimizing the voltage vector through model predictive control and using SVPWM to suppress harmonics, the output PWM signal drives the inverter, achieving high-precision control of the motor current.The SVPWM algorithm decomposes the target voltage vector into a combination of adjacent effective vectors and zero vectors. It calculates the duration of action using the volt-second balance principle, reducing the phase current THD to below 3%. The synergistic effect of the incremental prediction model and SVPWM avoids the current ripple caused by the discrete voltage vector selection in traditional MPC, achieving the goal of reducing motor operating noise in practice. By optimizing the target value function and employing the SVPWM algorithm, output harmonics can be effectively reduced, improving system stability and reliability, thereby enhancing the performance of the entire motor control system.
[0048] In an optional embodiment, the target value function is constructed based on the given q-axis current at time k+1 and the predicted q-axis current at time k+2, including: constructing the target value function in the following manner: in, Let i be the q-axis current given at time k+1 after compensation by the perturbation observer. q (k+2) is the predicted q-axis current at time k+2 after a one-beat delay. The optimization of the objective value function aims to minimize the tracking error between the given q-axis current at time k+1 and the predicted q-axis current at time k+2.
[0049] In the above embodiments, a clear target value function is defined to quantify the optimization objective of current control, thereby achieving more precise current tracking control. The target value function G(k+1) is defined as the q-axis current setpoint at time k+1. The predicted q-axis current i at time k+2 q The absolute difference between (k+2). This definition directly reflects the magnitude of the current tracking error. The optimization objective of the objective value function is to minimize the tracking error defined above. By minimizing this error, it can be ensured that the actual current of the motor is as close as possible to the given current value, thereby achieving high-precision current control.
[0050] This embodiment optimizes voltage vector selection by constructing a target value function to minimize the tracking error of the q-axis current, thereby improving the accuracy and dynamic performance of current control. This embodiment defines a simplified target value function. Let i be the q-axis current setpoint at time k+1 after perturbation observer compensation (i.e., the desired current target). q(k+2) represents the predicted q-axis current at time k+2 after a one-beat delay (i.e., the predicted future state of the motor). The goal of this function is to minimize the error between the current given value (time k+1) and the future predicted value (time k+2). Essentially, by minimizing the error, it derives a voltage vector that allows the current to accurately track the given value, thereby optimizing the voltage vector combination (d / q-axis voltage) and making the actual motor current as close as possible to the target value. Optionally, the target value function can also be... By minimizing G(k+1) (i.e., current tracking error), the optimal voltage vector combination (target d-axis voltage and target q-axis voltage) is selected, ensuring that the predicted current value of the motor in the next control cycle (at time k+2) is as close as possible to the given value, thereby improving the accuracy of current control and dynamic response speed. In related technologies, the objective function of model predictive control often includes multi-dimensional weighted terms such as current error, voltage constraints, and switching frequency. Extensive experimentation and tuning of the weighting coefficients are required, increasing design complexity and potentially diluting the core requirement of "current accuracy priority" due to unreasonable weighting coefficients. This optimization process is time-consuming and prone to deviating from the control focus. Furthermore, traditional PID control only uses proportional (P), integral (I), and derivative (D) components to provide feedback adjustment for the "currently generated error," lacking an objective function that predicts and actively optimizes "future errors." This fails to pre-determine the "deviation between the future current state and the desired target," leading to error accumulation in the dynamic response. This implementation... For example, by directly minimizing the current tracking error, the actual q-axis current of the motor is made closer to the target value, improving control accuracy. Timing matching (the given value at time k+1 and the predicted value at time k+2) ensures that the error quantification accurately reflects the "actual current deviation after delay compensation". The optimized target voltage vector can be directly adjusted for this precise deviation, avoiding the "compensation deviation" caused by traditional timing misalignment. This reduces the q-axis current tracking error to less than 50% of that of traditional MPC (e.g., from ±5% of rated current to within ±2%). Especially in scenarios such as servo drives and new energy vehicles where the accuracy of q-axis current (directly related to torque and speed) is high, it can significantly improve the stability of motor operation.
[0051] In an optional embodiment, optimizing the target value function to obtain a target voltage vector combination includes: adjusting the target value function for u... d and u q Finding the partial derivative to zero yields the first extreme point, which includes the first voltage vector combination. Calculating the minimum value of the objective value function on the boundary satisfying the voltage constraint condition yields the second extreme point. The voltage constraint condition is... The second extreme point includes the second voltage vector combination, U dcLet be the DC bus voltage of the inverter; substitute the first extreme point and the second extreme point into the target value function respectively, and select the voltage vector combination that minimizes the target value function as the target voltage vector combination.
[0052] In the above embodiment, a target value function is constructed based on the given q-axis current value at time k+1 and the predicted q-axis current value at time k+2. This target value function is then applied to u... d and u q The first extreme point is obtained by taking the partial derivative to zero. The second extreme point is obtained by calculating the minimum value of the target value function on the boundary satisfying the voltage constraint condition. The first and second extreme points are then substituted into the target value function to select the voltage vector combination that minimizes the target value function as the target voltage vector combination. This optimizes the target value function and yields a suitable target voltage vector combination. The Space Vector Pulse Width Modulation (SVPWM) algorithm is used to calculate the three-phase voltage vector action time based on the target voltage vector combination and outputs a PWM signal to drive the inverter. This enables control of the motor current, improves dynamic response speed, enhances robustness, and reduces harmonic interference.
[0053] This embodiment employs a two-step optimization strategy of unconstrained extremum solution and constrained boundary extremum verification to accurately find the voltage vector combination (u) that minimizes the objective value function. d u q Specifically, firstly, the objective value function is evaluated with respect to the d-axis voltage u. d and q-axis voltage u q Taking the partial derivatives and setting them to zero yields the first extreme point. The voltage vector combination corresponding to this first extreme point is denoted as the first voltage vector combination. Mathematically, points where the partial derivatives are zero are usually stationary points of the function, possibly extreme points (maximum or minimum). By taking the partial derivatives of the target value function and setting them to zero, we are searching for the function at voltage u. d and u q The local optimum solution is found within the range of values; secondly, considering the actual operating limitations of the inverter, the voltage needs to meet the constraints. Among them U dcLet the DC bus voltage of the inverter be the threshold voltage. On the boundary of this voltage constraint, calculate the minimum value of the objective value function to obtain the second extreme point. The corresponding voltage vector combination is denoted as the second voltage vector combination. This is because in actual motor control systems, the voltage provided by the inverter is limited and cannot exceed the range provided by its DC bus voltage. Therefore, it is necessary to find a possible optimal solution on the boundary that satisfies this practical constraint. Substitute the first voltage vector combination corresponding to the first extreme point and the second voltage vector combination corresponding to the second extreme point into the objective value function, compare their corresponding objective value function values, and select the voltage vector combination that minimizes the objective value function as the objective voltage vector combination. In this way, considering both the extreme value of the function itself and the actual voltage constraint, the optimal voltage vector combination can be found for subsequent motor current control. Model predictive control (MPC) in related technologies often fails to fully consider the actual voltage constraints of the inverter when optimizing the objective value function. This may result in the optimized voltage vector combination being unrealizable in the actual inverter, thus affecting the motor control performance. Furthermore, the optimization of the objective value function may employ only simple search methods or consider only some possible solutions, failing to find the optimal voltage vector combination that truly minimizes the objective value function. This could negatively impact the motor's current control accuracy, preventing the achievement of optimal control performance. By considering the inverter's voltage constraints, the optimized objective voltage vector combination is ensured to be realizable in the actual inverter, avoiding control failures caused by voltage exceeding the inverter's capabilities and enhancing the reliability and practicality of the control scheme. By comprehensively searching for the extreme points of the objective value function, including the extreme points of the function itself and the minimum points on the constraint boundaries, and selecting the optimal voltage vector combination, the q-axis current of the motor can be controlled more precisely, bringing it closer to the given value. This improves the accuracy of motor current control and ultimately enhances the overall performance of the motor system.
[0054] In an optional embodiment, the method further includes: when the first extreme point exceeds the voltage constraint boundary, scaling the voltage vectors in the first voltage vector combination proportionally to the voltage constraint boundary to obtain a scaled voltage vector combination, and using the scaled voltage vector combination as the first extreme point.
[0055] In the above embodiments, when the first extreme point exceeds the voltage constraint boundary, the voltage vectors in the first voltage vector combination are scaled proportionally to the voltage constraint boundary, so that the first extreme point satisfies the voltage constraint condition, thereby obtaining the target voltage vector combination that satisfies the condition, improving the robustness and stability of motor control, and reducing harmonic interference.
[0056] Out-of-bounds voltage vector combinations are scaled proportionally to bring them back within the voltage constraint boundaries. The scaled combinations are then used as the new first extreme point in the final optimization selection. This ensures that all candidate voltage vectors match the inverter's actual operating capabilities, preventing control failures or hardware damage caused by voltage out-of-bounds errors. In SVPWM (Space Vector Pulse Width Modulation) control, the maximum voltage the inverter can provide is limited by the DC bus voltage U. dc According to space vector modulation theory, the three-phase voltage vector output by the inverter (corresponding to u in the dq coordinate system) d and u q The constraints must be met. (This value is the square of the radius of the hexagonal voltage limit circle, corresponding to the maximum voltage amplitude that the inverter can output). If the optimized voltage vector combination (u...) d u q Beyond this boundary, the inverter will be unable to physically achieve the voltage, leading to control command failure or output voltage distortion. The first extreme point is determined by solving the objective value function for u. d and u q The mathematically optimal solution is obtained by setting the partial derivative to zero. However, this mathematically optimal solution may not consider the actual voltage limit of the inverter. If an out-of-bounds voltage vector combination is directly used, SVPWM cannot generate the corresponding effective pulse sequence, thereby disrupting the normal operation of the control system. This embodiment uses a proportional scaling method to correct this: maintaining the direction of the voltage vector (i.e., u...). d with u q The ratio remains unchanged, while its amplitude is reduced proportionally, so that the scaled voltage vector satisfies... (It falls exactly on the constraint boundary). This embodiment adjusts the first voltage vector combination that exceeds the boundary to the boundary by scaling proportionally, ensuring the feasibility of the optimization result in practical applications and avoiding control failure or equipment damage caused by the voltage exceeding the inverter's capacity. By ensuring that the amplitude of the voltage vector does not exceed the DC bus voltage of the inverter, this method improves the stability and reliability of the system and reduces system failures caused by voltage overload.
[0057] In an optional embodiment, a space vector pulse width modulation (SVPWM) algorithm is used to calculate the three-phase voltage vector action time based on the target voltage vector combination, including: converting the target d-axis voltage and target q-axis voltage into voltage U in a two-phase stationary coordinate system using inverse Park transformation. α and U β u α =u d ·cosθ e -u q ·sinθ e u β =u d·sinθ e +u q ·cosθ e , where θ e For electrical angle; based on U α and U β Sector partitioning is performed using SVPWM sector partitioning rules to determine the target sector and two adjacent basic voltage vectors. The action time T corresponding to the two adjacent basic voltage vectors is determined according to the first preset correspondence table. x and T y In this context, two adjacent basic voltage vectors represent two basic voltage vectors associated with the target sector. A first preset correspondence table records the duration of action of the two basic voltage vectors acting sequentially for different sector numbers. The durations T0, T1, and T2 of the three-phase voltage vectors corresponding to the target sector are determined according to a second preset correspondence table. This second preset correspondence table records the durations of action of the three-phase voltage vectors corresponding to different sector numbers. The durations T0, T1, and T2 are related to T... x and T y The following relationship must be satisfied: T0 = T s -T x -T y T1 = T0 + T x T2 = T1 + T y .
[0058] In the above embodiment, the target d-axis voltage and the target q-axis voltage are converted into voltage U in a two-phase stationary coordinate system. α and U β By combining the SVPWM sector division rules and the preset correspondence table to determine the basic voltage vector action time and the three-phase voltage vector action time, the three-phase voltage vector action time required for motor control can be accurately calculated, thereby controlling the motor current more precisely, reducing output harmonics, and improving system stability.
[0059] This embodiment describes a method for converting a continuous voltage vector obtained through Model Predictive Control (MPC) optimization into a specific PWM signal capable of driving a three-phase inverter using the classic SVPWM algorithm. The main steps include: coordinate transformation, sector positioning, calculation of the basic voltage vector's duration, and mapping of the three-phase voltage duration. Finally, the SVPWM algorithm is used to output the PWM signal driving the inverter, achieving high-precision control of the motor current. Specifically, the optimal target voltage vector (u) calculated in the rotating coordinate system (dq axis) is... d ,u q ), combined with the current electrical angle θ of the motor e By transforming back to the two-phase stationary coordinate system (α-β axis) using the inverse Park transform formula, we obtain U. α and Uβ For example, to get u α =u d ·cosθ e -u q ·sinθ e u β =u d ·sinθ e +u q ·cosθ e The principle is that the voltage on the dq axis is a DC current used to control excitation and torque, but the inverter ultimately needs to act on the stationary three-phase windings of the motor. This step is the bridge connecting the rotational control quantity and the stationary execution quantity; based on U α and U β Sector partitioning is performed using the SVPWM sector partitioning rule. Specifically, U... α and U β Performing the inverse Clarke transform, we obtain the voltage vector components in the three-dimensional coordinate system: u1 = u β , Based on the sign relationship (i.e., the polarity of each component) of the voltage components (u1, u2, u3) after the inverse Clarke transform, the required voltage vector is determined to be located in which sector of SVPWM (typically, SVPWM divides the space into 6 sectors, each corresponding to a set of basic voltage vectors) through a preset logical judgment rule. Sector location is the basis for subsequent selection of adjacent basic voltage vectors. For example, assuming N = A + B + C, a correspondence is established between N and different sectors (or sector numbers), where if u1 > 0, then A = 1, otherwise A = 0; if u2 > 0, then B = 2, otherwise B = 0; if u3 > 0, then C = 4, otherwise C = 0; for example, sectors 1, 2, 3, 4, 5, and 6 correspond to N = 3, N = 1, N = 5, N = 4, N = 6, and N = 2, respectively. Based on the converted U α and U β By using a pre-stored first preset correspondence table (which records the duration of action of two adjacent basic voltage vectors under different sector numbers), the duration T of action of these two basic voltage vectors in the target sector can be obtained directly by looking up the table. x and T y This table is pre-calculated based on the mathematical principles of SVPWM (such as the volt-second balance principle) and is used to quickly determine the allocation time of the basic voltage vector. Based on the determined target sector number, a second pre-set correspondence table (recording the specific action time of the three-phase voltage vector under different sector numbers) is used, combined with the calculated T... x and T y The durations of the three-phase voltage vectors acting on the three-phase bridge arms, T0, T1, and T2, are derived. The specific relationship is: T0 = Ts -T x -T y (T s The PWM control period is T0, where T0 is the duration of the zero voltage vector; T1 = T0 + T x (Duration of the first phase voltage); T2 = T1 + T y (Second-phase voltage duration). These durations directly determine the duty cycle of each power switch in the inverter, thereby generating the required PWM signal to drive the motor. This embodiment directly converts the optimized target d / q-axis voltage into the three-phase voltage duration, ensuring that the inverter output voltage vector strictly matches the optimal current control requirements. This allows the motor's q-axis current to track the given value more accurately, improving the steady-state and dynamic accuracy of current control. By utilizing a pre-stored sector-to-duration table (a lookup table method replaces real-time calculation), the computational load within the control cycle is significantly reduced, making it particularly suitable for high-frequency PWM control scenarios (such as servo drives), ensuring the real-time response capability of the control algorithm.
[0060] In an optional embodiment, constructing an incremental predictive model for the motor includes: establishing a mathematical model of the surface-mounted permanent magnet synchronous motor. Among them, u d u q These correspond to the d-axis voltage and the q-axis voltage, respectively. d i q These correspond to the d-axis current and q-axis current, respectively, R s L is the stator resistance, L is the inductance, and ω is the stator resistance. e Let ψ be the electric angular velocity. f For permanent magnet flux linkage; based on the mathematical model, the following incremental prediction model is established:
[0061] Among them, i d (k+1),i q (k+1) represent the predicted d-axis current and q-axis current at time k+1, respectively. d (k), i q (k) represent the d-axis current and q-axis current at time k, respectively, i d (k-1), i q (k-1) represents the d-axis current and q-axis current at time k-1, respectively. d (k-1), u q (k-1) represent the d-axis voltage and q-axis voltage at time k-1, respectively. Let T represent the predicted d-axis voltage and q-axis voltage at time k, respectively. s To control the cycle.
[0062] In the above embodiments, a mathematical model of the surface-mounted permanent magnet synchronous motor is established, which can accurately describe the relationship between the motor's voltage, current and other parameters. Based on this mathematical model, an incremental prediction model is established to calculate the difference between the d-axis current and the q-axis current at time k+1 and time k. This can eliminate the flux linkage parameter in the motor's mathematical model, avoid dependence on the flux linkage parameter, and enhance the robustness of the control method.
[0063] This embodiment derives the incremental form (current difference relationship) based on the original mathematical model of the motor, eliminating the influence of the permanent magnet flux linkage (ψ). f ) and stator resistance (R s This avoids direct dependence on parameters such as current, voltage difference, and electric angular velocity, thus constructing a lightweight prediction model that relies solely on current, voltage difference, and electric angular velocity for accurate prediction of future d / q-axis currents. First, a classic mathematical model of a surface-mounted permanent magnet synchronous motor (SPMSM) is established (based on the dq coordinate system), with the d-axis voltage equation as follows:
[0064] q-axis voltage equation: The continuous-time equation is transformed into a discrete-time prediction model using discretization methods (such as the Euler method). This involves approximating the continuous differential equation as a discrete difference equation to facilitate processing by the digital controller. The key focus is on extracting the current difference relationship between time k+1 and times k and k-1, ultimately yielding: The flux linkage parameter is eliminated by calculating the current difference between adjacent time points, thus obtaining the predicted current value for the next time point. Traditional model predictive control methods rely on motor model parameters, such as flux linkage parameters, which makes the control method less robust under parameter changes or uncertainties. This embodiment eliminates the dependence on flux linkage parameters through an incremental predictive model, improving the robustness of the control method. The control system is completely insensitive to changes in permanent magnet flux linkage, overcoming the flux linkage parameter mismatch problem caused by motor temperature rise, demagnetization, etc., ensuring the stability and consistency of control performance throughout the motor's entire life cycle and under different operating temperatures. It avoids the risk of prediction inaccuracies and control instability caused by inaccurate model parameters, enabling the system to operate stably and reliably over a wider temperature range and under more complex operating conditions. (The last sentence appears to be incomplete and possibly refers to a separate topic: permanent magnet demagnetization.) f (decline of 15%) or temperature change (ψ) f In scenarios where the temperature rises by 100°C and then drops by 12%, the current prediction error of traditional models increases from 3% to over 10%, while the prediction error of this incremental model remains stable within 2%, ensuring that the motor can maintain high-precision control throughout its entire life cycle.
[0065] In an optional embodiment, the predicted q-axis current of the motor at time k+1 is processed by a one-step delay based on the incremental prediction model to obtain the predicted q-axis current of the motor at time k+2, including: obtaining the predicted q-axis current of the motor at time k+2 in the following manner: in, This represents the predicted q-axis voltage at time k+1.
[0066] In the above embodiments, the predicted q-axis current value at time k+2 is derived from the predicted q-axis current value at time k+1 through a one-time delay processing. The core principle is based on the established incremental prediction model, which takes the prediction result (including current and voltage) at time k+1 as input and recursively calculates the predicted q-axis current value at future time (time k+2), thereby compensating for the inherent "one-time delay" problem in digital control and improving the foresight and control accuracy of current prediction.
[0067] In digital control systems (such as microcontroller-based motor control), the control algorithm operates on a fixed cycle (control cycle Ts), resulting in a one-beat delay. This means that the control quantity (such as the voltage vector) calculated at the current moment (e.g., moment k) cannot be applied to the motor until the next control cycle (moment k+1). Furthermore, the predicted value at moment k+1 is typically estimated based on the control quantity at moment k, causing the prediction to lag behind the actual physical process. This delay affects the dynamic performance of current tracking, potentially leading to overshoot or slow response, especially under rapid load changes. Optimization of the objective value function relies on comparing the current given value (moment k+1) with the future predicted value, such as the q-axis current given value in the aforementioned embodiment. The predicted value i at time k+2 q If the predicted value at time (k+2) is used directly (without considering the delay effect), the future predicted value actually corresponds to the "physical state that is one step behind", resulting in a mismatch between the optimization result and the actual requirement. Therefore, it is necessary to further derive the current prediction value at time (k+2) based on the prediction result at time (k+1) to compensate for the error caused by the delay. This embodiment utilizes the recursive nature of the incremental model to further predict the current at time (k+2) based on the known state at time (k+1), thereby extending the prediction time domain forward by one step to compensate for the impact of control delay. This embodiment aligns the optimization objective (as mentioned above, the objective value function) with the "future state (current at time (k+2) corresponding to the actual effective control quantity (voltage at time (k+1))", avoiding the misalignment between control commands and physical processes caused by delay, and significantly improving the dynamic response speed of current tracking. Accurate delay compensation reduces the risk of current overshoot or oscillation caused by prediction lag, making the motor current track the given value more smoothly, reducing torque ripple and electromagnetic interference (EMI), and improving the overall stability of the system.
[0068] In an optional embodiment, a disturbance observer is used to observe the disturbance error caused by load and / or parameter deviations and perform feedforward compensation to obtain the q-axis current setpoint of the motor at time k+1, including: measuring the motor speed and calculating the acceleration; and obtaining the observed q-axis current based on the acceleration according to the following formula: in, To predict electromagnetic torque, T L Where ω is the load torque, J is the moment of inertia, ω is the measured rotor angular frequency, and p is the number of pole pairs of the motor. Let be the observed q-axis current at time k; the given value of the q-axis current at time k+1 is calculated using the following formula: in, Let be the given value of the q-axis current at time k. The given value for the q-axis current before compensation at time k+1. This is the given value of the q-axis current after compensation at time k+1.
[0069] In the above embodiment, the motor speed is measured and the acceleration is calculated. The observed q-axis current is obtained by combining the relevant formulas. Then, the q-axis current setpoint at time k+1 is fed forward to compensate, which can improve the dynamic response speed of the motor current control, enhance the robustness of the control method to load and parameter deviations, and effectively compensate for the disturbance error caused by load and parameter deviations.
[0070] This embodiment uses a disturbance observer to monitor the disturbance error caused by load torque and motor parameter deviation in real time, and corrects the q-axis current setpoint through a feedforward compensation mechanism. The disturbance compensation is dynamically superimposed on the traditional current setpoint, thereby eliminating the impact of load changes and parameter deviations on the current control accuracy and improving the dynamic response and robustness of the system. This equation describes the dynamic balance of the motor torque. The electromagnetic torque needs to overcome the acceleration effect caused by the load torque and the moment of inertia. The angular acceleration dω / dt is calculated by the measured rotor angular frequency ω, combined with the known moment of inertia J, pole pair number p, and permanent magnet flux linkage ψ. f The observed q-axis current was derived. (i.e., the equivalent current disturbance corresponding to the load torque). To offset the impact of the aforementioned disturbance error on the control at the next time step (k+1), the disturbance error... Feedforward superposition of the original q-axis current setpoint at time k+1 Above, through the formula The compensated q-axis current setpoint at time k+1 is obtained. The core advantage of feedforward compensation is its ability to correct in advance, avoiding the lag of traditional feedback control and ensuring that the q-axis current setpoint matches the control requirements after disturbances in real time. This embodiment uses a "disturbance observer + feedforward compensation" mechanism to eliminate the interference of load fluctuations and motor parameter deviations on the q-axis current setpoint, ultimately obtaining an accurate q-axis current setpoint at time k+1. The feedforward compensation mechanism can "predict" the current deviation caused by load and parameter deviations in advance, without waiting for feedback signals, significantly shortening the adjustment delay of the q-axis current setpoint. This allows the electromagnetic torque to quickly balance load changes, effectively suppressing torque and speed fluctuations caused by sudden load changes or parameter deviations, and improving the smoothness of motor operation. The compensated q-axis current setpoint... It can accurately match actual control requirements, reduce the deviation between the current setpoint and the actual requirements, and enable the q-axis current to track the setpoint more accurately, thereby improving the control accuracy of electromagnetic torque and optimizing the dynamic response of the motor, such as speeding up the motor start-stop speed and improving the dynamic following ability under variable load.
[0071] The present application will be described in detail below with reference to specific embodiments. Embodiments of this application provide an incremental model predictive current control method and system for surface-mount motors. Figure 2 This is a framework diagram of an SPM motor control system provided in an embodiment of this application. The system uses model predictive control (MPC) and a PI regulator to achieve precise control of motor speed and current. The following is a detailed analysis of the working principle of this diagram:
[0072] W cmd For command rotational speed, i.e., external speed command; W act The actual rotational speed can be measured by a sensor and used as a feedback signal; the PI regulator will adjust the W... cmd With W act The speed error is calculated by comparing the values. The PI controller then generates a control signal based on this error to adjust the motor's current command value (i). qcmd The function of a PI controller is to eliminate steady-state errors and provide a fast response. The control signal output by the PI controller is decomposed into current command values (i) for the d-axis and q-axis. dcmd and i qcmdIn permanent magnet synchronous motors (PMSMs), the d-axis current is primarily used for flux control, while the q-axis current directly affects the motor's torque. The disturbance suppression module detects and suppresses various disturbances in the system, such as load changes and parameter variations, to improve system stability and robustness. It corrects the current command value to ensure the motor maintains good performance under disturbance conditions. The Model Predictive Control (MPC) module receives the disturbance-suppressed current command value and predicts future states based on the motor's mathematical model. The MPC calculates the optimal voltage command value to make the motor's actual current as close as possible to the command value, while satisfying other constraints such as current limits and voltage limits. Here, f represents the disturbance. The SPM motor drives itself according to the voltage command value calculated by the MPC. The actual speed of the motor (W) is... act The feedback will be sent back to the system, forming a closed-loop control.
[0073] The embodiments of this application will be described in detail below.
[0074] The speed outer loop uses classic PI control, while the current inner loop employs model predictive control. To improve robustness, an incremental model is used for calculation. To suppress disturbances more quickly, a disturbance observer is added.
[0075] 1. Mathematical model of SPMSM:
[0076]
[0077] In the formula u d and u q These correspond to the d-axis and q-axis voltages, respectively, i d and i q These correspond to the d-axis and q-axis currents, respectively, R s For the stator resistance, L = Ld = Lq; for the inductance, ω... e Let ψ be the electric angular velocity. f It is a permanent magnet flux linkage.
[0078] The currents id(k+1) and iq(k+1) at the next time step are predicted using the forward Euler discrete equations as follows:
[0079]
[0080] In the formula T s This refers to the control cycle. As you can see, the formula above includes the motor model parameter R. s 、L、ψ f If these three parameters are inaccurate, the prediction results may be wrong.
[0081] 2. An incremental model is used to predict and eliminate magnetic flux linkage ψ. f Effect of deviation
[0082]
[0083] In the formula u d (k-1) and u q (k-1) represent the d-axis and q-axis voltages at time k-1, respectively. d (k-1) and i q (k-1) represent the d-axis and q-axis currents at time k-1, respectively.
[0084] Subtracting the current expressions at time k and time k+1, we obtain the incremental prediction model:
[0085]
[0086] In the formula, and These represent the predicted d-axis and q-axis voltages, respectively. It can be seen that the flux linkage parameter is eliminated in the above prediction formula, thus eliminating the dependence on this motor parameter.
[0087] Delay compensation is performed to eliminate the effect of one-time delay in the digital system. The predicted current model after delay compensation is as follows: i d (k+2) and i q (k+2) represent the predicted d-axis and q-axis currents after one-beat delay compensation, respectively.
[0088] 3. Use a disturbance observer to obtain estimated disturbance values and then compensate for and suppress disturbances;
[0089] The acceleration is calculated by measuring the rotational speed, and then the observed torque current is obtained. The calculation formula is as follows;
[0090]
[0091] In the formula, To predict electromagnetic torque, T L Where ω is the load torque, J is the moment of inertia, ω is the measured rotor angular frequency, and p is the number of pole pairs of the motor. To observe the q-axis current.
[0092] Compensate for disturbances.
[0093] In the above formula, the left side of the formula The given value of the q-axis current at time k+1 (after compensation) is shown on the right side of the formula. The given value of the q-axis current at time k+1 (before compensation) The current is the given value at time k.
[0094] 4. Finding the optimal solution for the objective function
[0095] The objective function to be optimized is For a two-level inverter, there are 7 switching states. Traditional model predictive control selects the optimal combination of basic vectors among these 7 switching states to minimize the objective function. However, the 7 switching states are discrete. Now, by incorporating the sector division and vector action time calculation of SVPWM (Space Vector Pulse Width Modulation) into model predictive control, the stability performance of model predictive control is improved.
[0096] The following is the optimization approach: the SVPWM output range is a regular hexagon. The objective function is optimized across the entire SVPWM output region to select the optimal vector voltage vector. The duration of the basic output vector is calculated using SVPWM to generate the corresponding PWM signal.
[0097] Solution process: The value function G is u d and u q The quadratic function is constrained by a voltage hexagon, and the optimal solution usually appears at the minimum point or on the constraint boundary.
[0098] The unconstrained optimal solution is obtained by applying the objective function G to u. d and u q Finding the partial derivative to be 0, we can solve for u. f1 .
[0099] The specific calculation process is as follows:
[0100] (1) Objective function:
[0101] Taking time k+1 as an example, the objective function is:
[0102]
[0103] in, It is obtained by compensating for the disturbance by the velocity loop output. As a given value (generally 0 for constant torque region of surface-mount motors), the d-axis current is 0 in this application.
[0104] i after a one-shot delay q (k+2) and i d Substituting (k+2) into the aforementioned formula yields G(k+1), thus transforming the objective function into one with only two unknown variables u. d (k+1) and u q The function G(u) of (k+1) d ,u q ).
[0105] (2) Voltage constraint conditions
[0106] The SVPWM voltage boundary is hexagonal, and the continuous region is the incircle of the hexagon. For ease of calculation, the incircle is used as the boundary. The voltage constraint conditions are: Among them U dc This is the DC bus voltage of the driver (inverter).
[0107] (3) Calculation of minimum value
[0108] To find the minimum value of the objective function G within the voltage constraint, we obtain the extreme points by differentiating G and calculate the minimum value on the boundary. Then, we compare the minimum points and find the partial derivative formula as follows:
[0109] The extreme point u is obtained through the above calculations. d and u q Because choosing a linear function as the objective function is relatively simple, only one pole is found. If the objective function were a quadratic function, for example... There are multiple extreme points found. These extreme points need to be combined and substituted into the objective function for comparison. The combination that minimizes the objective function is denoted as (u...). d1 ,u q1 ).
[0110] Then calculate the minimum value on the boundary, Substitute into the objective function, and eliminate one variable, let's say u. q Then the objective function is only u d Variable, for u d Find the extreme points by taking the derivative, and then take the minimum point u. d2 Then substitute Find u q2 , to obtain (u d2 ,u q2 ).
[0111] Compare G(u) d1 ,u q1 ) and G(u d2 ,u q2 If the minimum value is the extreme value G(u) d1 ,u q1 ) and (u d1 ,u q1 If the voltage exceeds the voltage boundary, the voltage vector is scaled proportionally to the constraint boundary to obtain the voltage vector (u). d11 ,u q11 ):
[0112]
[0113]
[0114] A proportionally scaled diagram is shown below. Figure 3 As shown, G(u) d11 ,u q11 ) and G(ud2 ,u q2 The final voltage vector combination (u) is obtained by comparing and taking the minimum value. d ,u q ).
[0115] (4) SVPWM calculation
[0116] SVPWM calculation follows the standard SVPWM calculation process.
[0117] 1) The obtained optimal u d and u q After inverse Park transformation to a two-phase stationary coordinate system, u α =u d ·cosθ e -u q ·sinθ e ,
[0118] u β =u d ·sinθ e +u q ·cosθ e ,
[0119] In the formula θ e It represents the electrical angle, calculated from data from the speed sensor.
[0120] 2) Sector division
[0121] u1 = uβ,
[0122]
[0123] The following operations are executed sequentially: if u1>0, then A=1, otherwise A=0; if u2>0, then B=2, otherwise B=0; if u3>0, then C=4, otherwise C=0. N=A+B+C. The final sector number is obtained according to Table 1 below. Figure 4 This is a schematic diagram of sector division provided in an embodiment of this application, including sectors 1 to 6, in conjunction with... Figure 3 It can be seen that the two basic voltage vectors corresponding to sector 1 are U4 and U6, and the two basic voltage vectors corresponding to sector 2 are U6 and U2, etc.
[0124] Table 1
[0125]
[0126] 3) Calculate the three-phase voltage vector duration based on the sector.
[0127]
[0128] In the formula T sThe PWM carrier period.
[0129] Tx and Ty are denoted as the application times of the voltage vectors acting sequentially, and their relationship with the sector corresponding to N is shown in Table 2 below:
[0130] Table 2
[0131] N <![CDATA[T x ]]> <![CDATA[T y ]]> 1 <![CDATA[T vc ]]> <![CDATA[T vb ]]> 2 <![CDATA[T vb ]]> <![CDATA[-T va ]]> 3 <![CDATA[-T vc ]]> <![CDATA[T va ]]> 4 <![CDATA[-T va ]]> <![CDATA[T vc ]]> 5 <![CDATA[T va ]]> <![CDATA[T vb ]]> 6 <![CDATA[-T vb ]]> <![CDATA[-T vc ]]>
[0132] The duration of the zero voltage vector is then:
[0133] T0 = T s -T x -T y ,
[0134] T1 = T0 + T x ,
[0135] T2 = T1 + T y .
[0136] The final UVW three-phase output results can be found in Table 3 below.
[0137] Table 3
[0138] N U-phase action time V-phase action time W phase interaction time 1 <![CDATA[T1]]> <![CDATA[T0]]> <![CDATA[T2]]> 2 <![CDATA[T0]]> <![CDATA[T2]]> <![CDATA[T1]]> 3 <![CDATA[T0]]> <![CDATA[T1]]> <![CDATA[T2]]> 4 <![CDATA[T2]]> <![CDATA[T1]]> <![CDATA[T0]]> 5 <![CDATA[T2]]> <![CDATA[T0]]> <![CDATA[T1]]> 6 <![CDATA[T1]]> <![CDATA[T2]]> <![CDATA[T0]]>
[0139] Figure 5 This is a flowchart of the SPM motor control method provided in the embodiments of this application, which includes the following main steps:
[0140] S501, speed loop PI regulator output i q i is obtained based on the magnetic flux. d Generally i d Set to 0;
[0141] S502 uses a disturbance observer to perform feedforward compensation to suppress disturbances;
[0142] S503 calculates the predicted value of the incremental current model and performs one-step delay compensation.
[0143] S504: Determine the objective function, find the minimum point of the objective function, obtain the voltage vector according to the SVPWM voltage boundary, and calculate the duty cycle of the output PWM signal through SVPWM.
[0144] The S505 outputs a PWM signal to the switching transistors (i.e., the six switching transistors of the three-phase bridge arm of the inverter) to drive the motor.
[0145] By employing the method in this embodiment, a disturbance observer is used to suppress the effects of disturbances such as load and motor parameter deviations; simultaneously, incremental model predictive control is used to replace the traditional PI current loop regulator, ensuring both rapid current response and parameter robustness. The SVPWM method is used to obtain the optimal solution of the objective function within a voltage-constrained regular hexagon, replacing the traditional model predictive control's solution in a discrete finite set, thereby reducing harmonic fluctuations and other disturbances inherent in traditional methods.
[0146] The method provided in this application can quickly suppress disturbances such as motor load. Incremental model predictive control is used instead of the traditional PI current loop regulator, accelerating the current control response and ensuring robustness to a certain extent. The SVPWM method is used to find the optimal solution of the objective function within a voltage-constrained hexagon, thereby reducing harmonic fluctuations and other disturbances inherent in traditional methods.
[0147] This invention employs incremental model predictive current control to eliminate dependence on motor flux parameters, increasing parameter robustness; and uses a disturbance observer to observe disturbance errors and perform feedforward compensation to suppress the effects of disturbances such as load and dead zone. Addressing the problem that traditional model predictive control uses discrete voltage finite sets to solve for the optimal voltage solution, which can lead to large output harmonics due to discrete control signals, this invention uses the SVPWM method to find the optimal solution of the objective function within a voltage-constrained regular hexagon, thereby reducing harmonic fluctuations and other issues associated with traditional methods.
[0148] This application also provides a current control device for a motor, located in a surface-mounted permanent magnet synchronous motor. Figure 6 This is a structural block diagram of a current control device for a motor provided in an embodiment of this application. The device includes:
[0149] The compensation module is used to obtain the q-axis current setpoint of the motor at time k, and to observe the disturbance error caused by load and / or parameter deviation using a disturbance observer and perform feedforward compensation to obtain the q-axis current setpoint of the motor at time k+1. The construction module is used to construct the incremental prediction model of the motor, wherein the incremental prediction model is obtained by calculating the difference between the d-axis current and the difference between the q-axis current at time k+1 and time k to eliminate the flux linkage parameter in the motor mathematical model. The delay module is used to perform a one-beat delay processing on the predicted q-axis current value of the motor at time k+1 based on the incremental prediction model to obtain the predicted q-axis current value of the motor at time k+2.
[0150] The optimization module is used to construct a target value function based on the given q-axis current at time k+1 and the predicted q-axis current at time k+2, and to optimize the target value function to obtain a target voltage vector combination. The target voltage vector combination includes the target d-axis voltage and the target q-axis voltage that minimize the target value function.
[0151] The calculation module is used to calculate the action time of the three-phase voltage vectors based on the target voltage vector combination using the Space Vector Pulse Width Modulation (SVPWM) algorithm.
[0152] The control module is used to output a set of PWM signals to drive the inverter based on the three-phase voltage vector action time, thereby controlling the motor current.
[0153] It should be noted that the above embodiments of the apparatus are only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0154] This application also provides a computer-readable storage medium storing instructions that, when executed, perform the steps of any of the methods described above.
[0155] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0156] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0157] The above description is merely an exemplary embodiment of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Other embodiments of this disclosure will be readily apparent to those skilled in the art upon consideration of the disclosure herein.
[0158] This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art that are not described in this disclosure.
Claims
1. A current control method for an electric motor, characterized in that, Applications include surface-mounted permanent magnet synchronous motors, including: The q-axis current setpoint of the motor at time k is obtained, and the disturbance error caused by load and / or parameter deviation is observed by the disturbance observer and fed forward compensation is performed to obtain the q-axis current setpoint of the motor at time k+1. An incremental prediction model for the motor is constructed, wherein the incremental prediction model is obtained by calculating the difference between the d-axis current and the q-axis current between time k+1 and time k to eliminate the flux linkage parameter in the mathematical model of the motor. Based on the incremental prediction model, the predicted value of the q-axis current of the motor at time k+1 is processed by a one-beat delay to obtain the predicted value of the q-axis current of the motor at time k+2. A target value function is constructed based on the given q-axis current value at time k+1 and the predicted q-axis current value at time k+2, and the target value function is optimized to obtain a target voltage vector combination, wherein the target voltage vector combination includes the target d-axis voltage and the target q-axis voltage that minimize the target value function; The three-phase voltage vector action time is calculated based on the target voltage vector combination using the space vector pulse width modulation (SVPWM) algorithm. Based on the three-phase voltage vector action time, a set of PWM signals is output to drive the inverter and control the current of the motor.
2. The method according to claim 1, characterized in that, A target value function is constructed based on the given q-axis current value at time k+1 and the predicted q-axis current value at time k+2, including: The target value function shall be constructed as follows: , in, The given value of the q-axis current at time k+1 is obtained after compensation by the disturbance observer. The target value function is the q-axis current prediction value at time k+2 obtained after a one-beat delay. The optimization of the target value function aims to minimize the tracking error between the given q-axis current at time k+1 and the predicted q-axis current at time k+2.
3. The method according to claim 1, characterized in that, Optimizing the target value function to obtain the target voltage vector combination includes: The objective value function is respectively applied to u d and u q Finding the partial derivative to 0 yields the first extreme point, which includes the first voltage vector combination; Calculate the minimum value of the objective value function on the boundary condition that satisfies the voltage constraint, and obtain the second extreme point. The voltage constraint condition is: The second extreme point includes a second voltage vector combination. This is the DC bus voltage of the inverter; Substitute the first extreme point and the second extreme point into the target value function respectively, and select the voltage vector combination that minimizes the target value function as the target voltage vector combination; Among them, u d For the d-axis voltage, u q This is the q-axis voltage.
4. The method according to claim 1, characterized in that, The Space Vector Pulse Width Modulation (SVPWM) algorithm is used to calculate the three-phase voltage vector action time based on the target voltage vector combination, including: The target d-axis voltage and the target q-axis voltage are converted into voltage U in a two-phase stationary coordinate system using the inverse Park transform. α and U β , , , Where, θ e It is an electrical angle; Based on U α and U β Sector partitioning is performed using SVPWM sector partitioning rules to determine the target sector and two adjacent basic voltage vectors. The action time T corresponding to the two adjacent basic voltage vectors is determined according to a first preset correspondence table. x and T y The two adjacent basic voltage vectors represent two basic voltage vectors associated with the target sector, and the first preset correspondence table records the action time of the two basic voltage vectors that act sequentially for different sector numbers. The three-phase voltage vector action times T0, T1, and T2 corresponding to the target sector are determined according to the second preset correspondence table. The second preset correspondence table records the action times of the three-phase voltages corresponding to different sector numbers. T0, T1, and T2 are then compared with T... x and T y The following relationship must be satisfied: T0=T s -T x -T y , T1=T0+T x , T2=T1+T y ; Among them, T s This is the PWM control cycle.
5. The method according to claim 1, characterized in that, Constructing an incremental prediction model for the motor includes: Establish a mathematical model for a surface-mounted permanent magnet synchronous motor: , , Among them, u d u q These correspond to the d-axis voltage and the q-axis voltage, respectively. d i q These correspond to the d-axis current and q-axis current, respectively, R s Where L is the stator resistance, ω is the inductance, and ω is the stator resistance. e Let ψ be the electric angular velocity. f For permanent magnet flux linkage; Based on the mathematical model, the following incremental prediction model is established: , , Among them, i d (k+1),i q (k+1) represent the predicted d-axis current and q-axis current at time k+1, respectively. d (k), i q (k) represent the d-axis current and q-axis current at time k, respectively, i d (k-1), i q (k-1) represents the d-axis current and q-axis current at time k-1, respectively. d (k-1), u q (k-1) represent the d-axis voltage and q-axis voltage at time k-1, respectively. , Let T represent the predicted d-axis voltage and q-axis voltage at time k, respectively. s To control the cycle.
6. The method according to claim 5, characterized in that, Based on the incremental prediction model, the predicted q-axis current value of the motor at time k+1 is processed by a one-step delay to obtain the predicted q-axis current value of the motor at time k+2, including: The predicted q-axis current of the motor at time k+2 is obtained as follows: , in, This represents the predicted q-axis voltage at time k+1.
7. The method according to claim 1, characterized in that, By observing the disturbance error caused by load and / or parameter deviation using a disturbance observer and performing feedforward compensation, the q-axis current setpoint of the motor at time k+1 is obtained, including: The rotational speed of the motor is measured and the acceleration is calculated. The observed q-axis current is obtained based on the acceleration according to the following formula: , , in, To predict electromagnetic torque, T L Where ω is the load torque, J is the moment of inertia, ω is the measured rotor angular frequency, and p is the number of pole pairs of the motor. Let ψ be the observed q-axis current at time k. f For permanent magnet flux linkage; The given value of the q-axis current at time k+1 is calculated using the following formula: , in, Let be the given value of the q-axis current at time k. The given value for the q-axis current before compensation at time k+1. This is the given value of the q-axis current after compensation at time k+1.
8. A current control device for an electric motor, characterized in that, Located in surface-mounted permanent magnet synchronous motors, including: The compensation module is used to obtain the q-axis current setpoint of the motor at time k, and to observe the disturbance error caused by load and / or parameter deviation using a disturbance observer and perform feedforward compensation to obtain the q-axis current setpoint of the motor at time k+1. A construction module is used to construct an incremental prediction model for the motor, wherein the incremental prediction model is obtained by calculating the difference between the d-axis current and the q-axis current between time k+1 and time k to eliminate the flux linkage parameter in the motor mathematical model; The delay module is used to perform a one-beat delay processing on the predicted value of the q-axis current of the motor at time k+1 based on the incremental prediction model, so as to obtain the predicted value of the q-axis current of the motor at time k+2. An optimization module is used to construct a target value function based on the given q-axis current value at time k+1 and the predicted q-axis current value at time k+2, and to optimize the target value function to obtain a target voltage vector combination, wherein the target voltage vector combination includes a target d-axis voltage and a target q-axis voltage that minimize the target value function; The calculation module is used to calculate the three-phase voltage vector action time based on the target voltage vector combination using the space vector pulse width modulation (SVPWM) algorithm. The control module is used to output a set of PWM signals to drive the inverter according to the three-phase voltage vector action time, and to control the current of the motor.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed, perform the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Three-level permanent magnet synchronous motor sensorless model predictive current control method
CN112886880A
Permanent magnet synchronous motor control method and device and storage medium
CN117978021A