Motor control PI parameter setting method and motor control system

By adaptively adjusting the current loop and speed loop PI parameters of the permanent magnet synchronous motor, fine-tuning is performed according to the difference between the actual feedback current and the given current, solving the problem of poor performance of the PI parameters under actual operating conditions, and improving the dynamic response and stability of the motor control system.

CN120474402AActive Publication Date: 2025-08-12HEFEI GEYI INTEGRATED CIRCUIT CO LTD

Patent Information

Application Number
CN202410154426.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-02-02
Publication Date
2025-08-12
Estimated Expiration
2044-02-02

AI Technical Summary

Technical Problem

In the existing permanent magnet synchronous motor control system, it is difficult for PI parameters to meet the performance requirements of the current ring and speed ring under actual operating conditions, resulting in poor control performance.

Method used

By adaptively adjusting the PI parameters of the current loop and the speed loop according to the difference between the actual feedback current and the given current, the PI parameters are fine-tuned using the sinusoidal current injection and comparison results to ensure that the feedback current and the given current meet the predetermined conditions.

Benefits of technology

It improves the dynamic response and stability of the motor control system, enhances the performance of the current ring and speed ring, and improves the overall performance of the control system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120474402A_ABST
    Figure CN120474402A_ABST
Patent Text Reader

Abstract

The invention provides a motor control PI parameter setting method and a motor control system. The method comprises the following steps: calculating a theoretical current loop PI parameter value according to a parameter when a motor is static; actual motor control is carried out by using the theoretical current loop PI parameter value, a first given current is input to a q axis during the actual motor control so as to acquire a first feedback current, and the first given current is a sinusoidal current with a current loop expected bandwidth frequency; solving a first comparison result of the first feedback current and the first given current; and based on the first comparison result, adjusting the current loop PI parameter value until a new first comparison result obtained by performing actual motor control by using the adjusted current loop PI parameter value meets a first predetermined condition. Therefore, according to the motor control PI parameter setting scheme disclosed by the invention, the PI parameter obtained by theoretical calculation can be adaptively set according to the difference between the actual feedback current and the given current, and optionally according to the difference between the actual feedback speed and the given speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of motors, and in particular to a motor control PI parameter tuning method and a motor control system. Background Art

[0002] In the motor control process, in order to obtain the maximum torque output throughout the entire control cycle, FOC (Field-Oriented Control) is often used to control the motor. Existing permanent magnet synchronous motor control systems mainly use PI control.

[0003] Currently, permanent magnet synchronous motor control systems primarily employ a dual closed-loop control strategy: a speed loop and a current loop. The performance of these two loops is closely related to their PI parameters. Therefore, optimizing the PI parameters to improve the performance of these two loops has become a key challenge in this field. Summary of the Invention

[0004] In order to solve at least one of the above problems, the present disclosure proposes a motor control PI parameter tuning scheme, which adaptively tunes the PI parameters obtained by theoretical calculation according to the difference between the actual feedback current and the given current.

[0005] According to a first aspect of the present disclosure, a method for adjusting PI parameters of motor control is proposed, including: calculating theoretical current loop PI parameter values based on parameters when the motor is stationary; using the theoretical current loop PI parameter values to perform actual motor control, during which a first given current is input into the q-axis to obtain a first feedback current, wherein the first given current is a sinusoidal current with a first given frequency, and the first given frequency corresponds to a desired bandwidth frequency of the current loop; obtaining a first comparison result between the first feedback current and the first given current; and adjusting the current loop PI parameter value based on the first comparison result until a new first feedback current obtained by performing actual motor control using the adjusted current loop PI parameter value and a new first comparison result between the first given current and the first feedback current meet a first predetermined condition.

[0006] Optionally, the first comparison result includes a first amplitude comparison result and a first phase comparison result, and obtaining the first comparison result between the first feedback current and the first given current includes: obtaining the amplitude comparison result between the first feedback current and the first given current as the first amplitude comparison result; and obtaining the phase comparison result between the first feedback current and the first given current as the first phase comparison result.

[0007] Optionally, obtaining the amplitude comparison result between the first feedback current and the first given current as the first amplitude comparison result includes: obtaining the maximum value and the minimum value of the first feedback current; obtaining the amplitude of the first feedback current based on the difference between the maximum value and the minimum value; and determining the first amplitude comparison result based on the amplitude of the first feedback current and the amplitude of the first given current.

[0008] Optionally, obtaining the amplitude comparison result between the first feedback current and the first given current as the first amplitude comparison result includes: obtaining the maximum value and the minimum value of multiple cycles of the first feedback current; obtaining the amplitude of the first feedback current based on the average of the difference between the maximum value and the minimum value of multiple cycles; and determining the first amplitude comparison result based on the amplitude of the first feedback current and the amplitude of the first given current.

[0009] Optionally, obtaining a phase comparison result between the first feedback current and the first given current as the first phase comparison result includes: obtaining a phase value of a first zero-crossing point of the first feedback current; determining the first phase comparison result based on the phase value of the first zero-crossing point and the phase value of the second zero-crossing point of the first given current, wherein, when the first given current has no bias current, the first zero-crossing point and the second zero-crossing point correspond to the true zero-crossing point of the current, and when the first given current includes a bias current, the first zero-crossing point and the second zero-crossing point correspond to the position where the current passes through the bias current value.

[0010] Optionally, obtaining the first zero-crossing phase value of the first feedback current includes: collecting multiple data points around the zero-crossing point; performing curve fitting based on the multiple data points; and obtaining the phase value of the zero-crossing point of the fitting curve as the phase value of the first zero-crossing point.

[0011] Optionally, based on the first comparison result, adjusting the current loop PI parameter value until a new first feedback current obtained by using the adjusted current loop PI parameter value for actual motor control and a new first comparison result of the first given current meet a first predetermined condition, including: in response to the first amplitude comparison result being greater than a first theoretical amplitude change value and the first phase comparison result being less than a first theoretical phase change value, adjusting the value of the current loop PI parameter until the newly obtained first amplitude comparison result is no longer greater than the first theoretical amplitude change value and / or the first phase comparison result is no longer less than the theoretical phase change value.

[0012] Optionally, based on the first comparison result, adjusting the current loop PI parameter value until a new first feedback current obtained by using the adjusted current loop PI parameter value for actual motor control and a new first comparison result of the first given current meet a first predetermined condition, including: in response to the first amplitude comparison result being less than a first theoretical amplitude change value and / or the first phase comparison result being greater than a first theoretical phase change value, adjusting the value of the current loop PI parameter until the newly obtained first amplitude comparison result is no longer less than the first theoretical amplitude change value and the first phase comparison result is no longer greater than the theoretical phase change value.

[0013] Optionally, adjusting the current loop PI parameter value includes: reducing the value of the current loop proportional coefficient in response to the first comparison result being better than the theoretical change value; and increasing the value of the current loop proportional coefficient in response to the first comparison result being worse than the theoretical change value.

[0014] Optionally, the first given frequency does not differ from the current loop expected bandwidth frequency by more than a predetermined threshold, wherein the value of the current loop expected bandwidth frequency is determined based on the theoretical current loop PI parameter value.

[0015] Optionally, the method also includes: calculating a theoretical speed loop PI parameter value based on the parameters when the motor is stationary; and using the adjusted current loop PI parameter value to perform actual motor control to adjust the speed loop PI parameter value, wherein adjusting the speed loop PI parameter value further includes: using the adjusted current loop PI parameter value and the theoretical speed loop PI parameter value to perform actual motor control, during which a second given current is input into the q-axis to obtain a second feedback current, wherein the second given current is a sinusoidal current with a second given frequency, and the second given frequency corresponds to the expected bandwidth frequency of the speed loop; obtaining a second comparison result between the second feedback current and the second given current; and adjusting the speed loop PI parameter value based on the second comparison result until a new second feedback current obtained by using the adjusted speed loop PI parameter value to perform actual motor control and a new second comparison result between the second given current and the second feedback current meet a second predetermined condition.

[0016] Optionally, the method also includes: writing the adjusted current loop PI parameter value and the adjusted speed loop PI parameter value into the controller of the permanent magnet synchronous motor; and the controller performing magnetic oriented vector control during the operation of the permanent magnet synchronous motor based on the adjusted current loop PI parameter value and the adjusted speed loop PI parameter value.

[0017] According to the second aspect of the present disclosure, a motor control system is proposed, comprising: a motor; and a magnetic oriented vector control module for performing magnetic oriented vector control on the motor using adjusted PI parameters obtained based on the PI parameter tuning method described in the first aspect.

[0018] Therefore, the present disclosure proposes a scheme that uses theoretical current and velocity loop PI parameters calculated based on a continuous model to adaptively adjust the current loop PI parameters based on the phase and amplitude differences between the actual feedback current and the set current, and can further adjust the velocity loop PI parameters. Furthermore, the response signal amplitude can be calculated by finding the maximum and minimum values of the response curve multiple times and averaging the differences to improve the measurement accuracy of the response amplitude. The Lagrange quadratic interpolation method can also be used to calculate the phase difference, thereby improving the measurement accuracy of the phase lag. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The above and other objects, features and advantages of the present disclosure will become more apparent through a more detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings, wherein like reference numerals generally represent like components in the exemplary embodiments of the present disclosure.

[0020] Figure 1 The schematic diagram of FOC control for PMSM is shown.

[0021] Figure 2 Shows the structure diagram of the series PI control motor.

[0022] Figure 3 The double closed-loop control diagram of the continuous model motor is shown.

[0023] Figure 4 The simplified double closed-loop control diagram of the continuous model motor is shown.

[0024] Figure 5 The Bode diagram of the second-order system corresponding to equation (8) is shown.

[0025] Figure 6 It shows that when the corner frequency ω2 is fixed, the corner frequency ω1 and the cutoff frequency ω c_s The relationship diagram between .

[0026] Figure 7 A schematic flowchart of a motor control PI parameter tuning method according to an embodiment of the present disclosure is shown.

[0027] Figure 8 A block diagram of a current loop PI response simulation test is shown.

[0028] Figure 9 The figure shows the simulated response curve when the sinusoidal given frequency is 500 Hz.

[0029] Figure 10 An example of sampling three points around the zero-crossing point is shown.

[0030] Figure 11 The figure shows the simulated response curve when the sinusoidal given frequency is 1000 Hz.

[0031] Figure 12 The figure shows the simulated response curve when the sinusoidal given frequency is 1500 Hz.

[0032] Figure 13 The actual response curve is shown when the sinusoidal given frequency is 1000Hz.

[0033] Figure 14 The figure shows the actual response curve when the sinusoidal given frequency is 1000 Hz after the current loop PI parameters are adjusted.

[0034] Figure 15 The figure shows the actual response curve when the sinusoidal given frequency is 200Hz during speed loop tuning.

[0035] Figure 16 The figure shows the actual response curve when the sinusoidal given frequency is 200 Hz after the speed loop PI parameters are adjusted.

[0036] Figure 17 The response curve of the speed and current dual closed loop under the theoretical PI parameters is shown.

[0037] Figure 18 The response curve of the speed and current dual closed loop under the adjusted PI parameters is shown.

[0038] Figure 19 A schematic diagram showing the composition of a motor control system according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0039] The preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art. The terms "first," "second," and similar expressions herein are intended to distinguish between different objects of the same type, rather than to distinguish between their order or importance.

[0040] In the control process of permanent magnet synchronous motor (PMSM), in order to obtain the maximum torque output throughout the entire control cycle, FOC (magnetic oriented vector control) is often used to control the motor. Figure 1 The schematic diagram of FOC control for PMSM is shown.

[0041] like Figure 1 As shown, a position sensor such as a magnetic encoder obtains the rotor speed n and rotor position θ of the motor M (in a sensorless setting, they can also be obtained according to various methods. In a sensorless motor, the rotor speed n and rotor position θ of the motor M can be obtained by various types of observers, such as sliding mode observer, Lomborg observer, flux linkage observer, etc.). In practical applications, for example, based on the speed reference n obtained by user input ref The difference between the obtained rotor speed n and the speed loop PID is input to the PID1 module (i.e., the speed loop PID). The output of the speed loop PID is the q-axis reference current i qref When the field weakening control is not performed, the d-axis reference current i dref = 0. At this time, the reference current i of the q-axis and d-axis can be qref and i dref The q-axis and d-axis current i of the motor are actually fed back. q and i d The PID2 and PID3 modules are used to adjust the q-axis and d-axis voltages V respectively (the PI parameters of the two current loops are usually the same). d and V q , and then converted into α-axis and β-axis voltage V through Park inverse transformation α and V β , and then through SVPWM (space voltage vector modulation) to obtain the three-phase voltage V a 、V b 、V c , and then drives the motor M to rotate through the three-phase inverter bridge. In FOC control, the three-phase current i is obtained through the sampling resistor a 、i b 、i c , after Clarke transformation, we can get the α-axis and β-axis current i α and i β , and then get the feedback d-axis and q-axis current i through Park transformation d and i q , participate in the current loop control. It is worth noting that Figure 1 The PID1 and PID2 / PID3 modules shown represent PID control of the speed loop and the current loop respectively. In a specific embodiment of the present invention, both the speed loop and the current loop adopt PI control.

[0042] Currently, permanent magnet synchronous motor control systems primarily utilize a dual closed-loop control strategy: a speed loop and a current loop. The performance of the current and speed loops directly impacts control performance, so improving the dynamic response and stability of the speed and current loops is crucial. If the motor model parameters are accurate, the standard PI parameters for the speed and current loops can be derived based on the desired dual closed-loop response curves, completing the tuning of the PI parameters for permanent magnet synchronous motor control.

[0043] However, in actual measurements, motor electrical parameters (resistance R, inductance L) and mechanical parameters (moment of inertia J) are often affected by the measuring instruments, making accurate measurement difficult. Furthermore, the electrical and mechanical parameters measured when the motor is stationary often change during operation, resulting in significant differences between the actual operating characteristic curve and the theoretical one. Consequently, theoretically calculated PI parameters often fail to meet actual operating requirements.

[0044] In view of this, the present disclosure proposes a motor control PI parameter tuning scheme, which adaptively tunes the PI parameters obtained by theoretical calculation based on the difference between the actual feedback current and the given current, and can further based on the difference between the feedback speed and the given speed.

[0045] In order to facilitate the understanding of this solution, the calculation of the theoretical value of the motor control PI parameter is first described. It should be known that PID corresponds to proportional, integral, and differential (Proportion Integration Differentiation) control. In actual operation, the coefficients corresponding to the proportional, integral, and differential terms can usually be adjusted to achieve optimized control that is compatible with the current system. In the current loop and speed loop of the motor, since they usually only contain proportional terms and integral terms, the desired control can be performed by adjusting the proportional and integral coefficients. The present invention is not limited to this. In the embodiment where the current loop and the speed loop contain differential terms, the corresponding differential coefficients can also be adjusted in a similar manner according to the present invention. It is well known to those skilled in the art that the motor control PI parameter adjustment of the present invention can be considered as adjusting the motor control PID parameters, and can cover the adjustment of any one of the proportional, integral, and differential term coefficients or any combination thereof.

[0046] I. Calculation of theoretical values of PI parameters

[0047] The PI parameter tuning of permanent magnet synchronous motor control includes current loop and speed loop. The tuning process is to tune the current loop first and then the speed loop. To this end, the current loop tuning process is first analyzed and then the speed loop tuning process is analyzed.

[0048] 1.1. Current loop adjustment

[0049] During the current loop tuning process, the motor can be approximately considered as an electrical model with resistance R and inductance L. Figure 2 The diagram shows the structure of the series PI control motor. As shown in the figure, the proportional, integral and differential modules are connected in series. The coefficient of the proportional module is K p (corresponding to the current loop ratio K below p_c ), the coefficient of the integral module is K i (corresponding to the current loop integration factor K below i_c ), the coefficient of the differential module is 1 / s. Here, s refers to the Laplace transform domain. The output current is returned as feedback (corresponding to the measured current in the figure) to the system as input. It is then regulated by the series-connected proportional and integral modules before being output. At this point, the open-loop transfer function of the current loop is:

[0050]

[0051] Correspondingly, the closed-loop transfer function is:

[0052]

[0053] K p_c , K i_c Represents the current loop proportional factor and integral factor (also known as the current loop proportional coefficient and current loop integral coefficient, respectively), which are also the PI parameters that can be adjusted for the current loop.

[0054] As shown in Equation (2), the denominator of the closed-loop transfer function is a second-order expression of s, indicating that the function has two poles; the numerator is a first-order expression of s, indicating that the function has one zero. Equation (2) corresponds to a second-order system. After the velocity loop is added, its order will increase further. Therefore, in order to reduce the overall system order, the current loop can be simplified, that is, the denominator in Equation (2) can be expressed as:

[0055]

[0056] Thus, satisfying make At this time, in order to satisfy Therefore, formula (3) can be expressed as:

[0057]

[0058] As shown in formula (4), after simplification, a pole and a zero in the closed-loop transfer function of the motor current loop cancel each other out, so that there is only one real pole and no zero in the closed-loop transfer function, no peak frequency response or resonance, just a simple single-pole low-pass response, and its bandwidth frequency

[0059] 1.2. Speed loop tuning

[0060] Figure 3 The figure shows the double closed-loop control diagram of the continuous model motor. As shown in the figure, since the output of the speed loop is used as the input of the current loop, and the feedback of the speed loop needs to be based on the output of the current loop, the speed loop needs to be adjusted based on the current loop adjustment. p_s is the speed loop proportional coefficient, K i_s K is the speed loop integral coefficient, which is also the PI parameter that needs to be adjusted for the speed loop. p_c is the current loop proportional coefficient, K i_c is the current loop integral coefficient, R is the motor resistance, L is the motor inductance, P is the number of motor pole pairs, ψ f is the motor flux, T e is the electromagnetic torque, T d is the disturbance torque, n is the motor speed, and J is the motor moment of inertia.

[0061] For a permanent magnet synchronous motor, the q-axis current i q The relationship between it and the electromagnetic torque is:

[0062]

[0063] The relationship between torque and speed is:

[0064]

[0065] According to the continuous current loop tuning process described above, the current loop can be approximately simplified to Thus, we get Figure 4 The simplified double closed-loop control diagram of the continuous model motor is shown. Multiplying all equations on the forward path yields the following forward path open-loop transfer function:

[0066]

[0067] make Then formula (7) can be simplified as:

[0068]

[0069] Equation (8) corresponds to a second-order system. Therefore, the open-loop transfer function characteristics of the velocity loop of the continuous model are as follows:

[0070] The two poles are located at s = 0, so the low frequency attenuation is 40dB per decade.

[0071] The other extreme point is located at This point is the pole of the current controller (the bandwidth frequency of the current loop).

[0072] Another zero point is located at s = K i_sPlace.

[0073] In order to maintain the stable operation of the system, The frequency of the pole must be higher than s = K i_s The frequency at zero. At the same time, you can also adjust K p_s , K i_s There are countless combinations of different frequency responses, depending on whether higher bandwidth or higher stability is desired.

[0074] Analyzing Equation (8), its amplitude-frequency characteristic curve decreases at (-40dB / dec) in the low frequency band. When the frequency reaches the first turning frequency ω1=K i_s The slope increases by 20dB / dec, and when it reaches the second turning frequency The slope decreases by 20dB / dec, and the subsequent frequency bands all decrease at -40dB / dec. The frequency band with a frequency less than the first turning frequency ω1 is called the low frequency band; the frequency band with a frequency greater than the first turning frequency ω1 and less than the second turning frequency ω2 is called the mid frequency band; the frequency band with a frequency greater than both turning frequencies ω2 is called the high frequency band. Figure 5 The Bode diagram of the second-order system corresponding to equation (8) is shown.

[0075] In the control process, in order to ensure the system has higher stability and response speed, the cutoff frequency ω is generally set to c_s Between the first corner frequency ω1 and the second corner frequency ω2, that is, Figure 5 The slope of the mid-amplitude is the most gentle. And when the cutoff frequency ω c When it is just between the first turning frequency ω1 and the second turning frequency ω2, The system has the largest phase margin.

[0076] For ease of understanding, we can define σ as the damping factor and make Thus ω c_s =σω1, The greater the separation between the first turning frequency ω1 (zero frequency) and the second turning frequency ω2 (pole frequency), the greater the maximum phase margin γ that can be achieved between the two frequencies, but this stability is based on sacrificing the speed loop bandwidth. When σ = 1, the zero frequency ω1 and the pole frequency ω2 are equal, which can achieve zero-pole cancellation of the system and put the system in a critical stable state; when σ> 1, the maximum phase margin γ> 0, and the system is stable, but σ close to 1 will result in severe underdamping in performance. Combined with formula (8), it can be seen that ω1 = K i_s , To satisfy When σ=1, then ω1=ω2=ω c_s , When the system is stable, σ>1, then ω1<ω c_s <ω2=ω b_c In the double closed loop design process, the bandwidth of the current loop ω b_c Directly affects the cutoff frequency ω of the speed loop c_s , in order to stabilize the system, the bandwidth of the speed loop ω b_s Must be smaller than the bandwidth of the current loop ω b_c (Here, the speed loop open loop cutoff frequency ω can be used approximately c_s Replace the speed loop bandwidth frequency ω b_s ).

[0077] ω2 is the current loop bandwidth frequency. After the current loop is tuned, its value remains unchanged. Figure 6 It shows that when the corner frequency ω2 is fixed, the corner frequency ω1 and the cutoff frequency ω c_s As shown in the figure, when the second corner frequency ω2 = 1000rad / s, the smaller the damping factor σ is, the closer the first corner frequency ω1 is to the cutoff frequency ω c_s The larger the damping factor σ is, the smaller the first corner frequency ω1 and the cutoff frequency ω c_s The smaller it is (at this time, the slower the system response speed, the larger the maximum phase margin γ, and the higher the stability).

[0078] Next, determine another parameter K of the speed loop PI p_s , the open-loop transfer function of the system at the cutoff frequency ω c When crossing the 0dB line, it satisfies

[0079]

[0080] have to:

[0081] 1.3. Double closed-loop tuning

[0082] Therefore, for the continuous model, the double closed-loop tuning process can be implemented as:

[0083] First, adjust the current loop integral coefficient Realize zero-pole cancellation in the current loop transfer function and simplify the system model.

[0084] Then adjust the current loop proportional coefficient K p_c =ω b_c ×L, K p_c The bandwidth frequency of the current loop is ωω b When the current loop is expected to have higher stability and better filtering effect, a smaller bandwidth frequency ω can be selected.b_c When the current loop is expected to have a higher rapid response capability, a larger bandwidth frequency ω can be selected b_c .

[0085] When adjusting the speed loop, That is, the larger the damping factor σ is, the smaller the first turning frequency ω1 is, and K i_s The smaller it is, the smaller it is. At the same time, since ω2=ω b_c fixed, The smaller the bandwidth frequency ω b_s The smaller the damping factor σ, the larger the first turning frequency ω1, and the larger the K i_s The larger the value, the larger the value. At the same time, since ω2=ω b_c fixed, The larger the bandwidth frequency ω b_s The larger the value is), the smaller the system phase margin is, the lower the stability is, but the response speed is faster.

[0086] After completing K i_s After setting,

[0087] As above combined with the attached Figure 2-6 A method for obtaining theoretical PI parameter values for the current loop and the speed loop based on static motor parameters is described. It should be understood that in other implementations, methods other than those described above may also be used to calculate theoretical PI parameter values.

[0088] II. Adjustment of the theoretical value of PI parameters

[0089] 2.1. Adjustment of the theoretical values of the current loop PI parameters

[0090] In the prior art, FOC control is typically performed directly using calculated theoretical PI parameter values. However, in actual measurement, the motor's electrical parameters are difficult to accurately measure due to the influence of the measuring instrument. Furthermore, both electrical and mechanical parameters often change during motor operation, making it difficult for the theoretically calculated PI parameters to meet actual operating requirements. Therefore, this disclosure proposes a motor control PI parameter tuning solution. Figure 7 The schematic flow chart of the motor control PI parameter tuning method according to one embodiment of the present disclosure is shown. The method can fine-tune the PI parameters according to the comparison value between the actual feedback current and the given current. It should be understood that in actual operation, Figure 1 The current loops PI2 and PI3 shown have the same PI parameters and can therefore be adjusted as a whole.

[0091] In step S710, theoretical current loop PI parameter values can be calculated based on the motor's stationary parameters. For example, the theoretical current loop PI parameter values can be calculated based on a continuous current loop model as described in Section I above. Furthermore, a desired current loop bandwidth can be determined based on the theoretical current loop PI parameter values. This desired current loop bandwidth can be used in step S720.

[0092] In step S720, actual motor control is performed using the theoretical current loop PI parameter values. During this process, a first given current is input into the q-axis to obtain a first feedback current. The first given current is a sinusoidal current having a first given frequency. It can be considered that during the control process, a sinusoidal current having a determined frequency and amplitude is continuously injected into the q-axis for multiple cycles. Here, the "sinusoidal current" can be a "sinusoidal current" injected starting with any initial phase. In other words, the injected current can also be a cosine current or a sinusoidal current with another initial phase.

[0093] The motor control PI parameter tuning method disclosed in the present invention is intended to improve the actual operating performance of the motor, and the feedback current under the expected bandwidth of the current loop is more representative of the actual working conditions of the motor. Therefore, in one embodiment, the first given frequency is preferably the expected bandwidth value of the current loop (for example, 1000 Hz in the following example). It should be understood that if a frequency that is not far from the expected bandwidth of the current loop is used, for example, a frequency that does not differ from the expected bandwidth of the current loop by more than a predetermined threshold (for example, a frequency between 950 and 1050 Hz when the expected threshold is 5%), it can also be considered that the expected bandwidth value of the current loop is selected as the first given frequency.

[0094] Subsequently, in step S730, a first comparison result between the first feedback current and the first given current is obtained. As described below, the comparison between the first feedback current and the first given current can be an amplitude comparison or a phase comparison, preferably a comparison of both amplitude and phase. To this end, in one embodiment, the first comparison result includes a first amplitude comparison result and a first phase comparison result, and obtaining the first comparison result between the first feedback current and the first given current includes: obtaining the amplitude comparison result between the first feedback current and the first given current as the first amplitude comparison result; and obtaining the phase comparison result between the first feedback current and the first given current as the first phase comparison result.

[0095] Subsequently, in step S740, the current loop PI parameter values can be adjusted based on the first comparison result until a new first feedback current obtained by controlling the actual motor using the adjusted current loop PI parameter values and a new first comparison result with the first set current meet a first predetermined condition. Specifically, if the first comparison result indicates a discrepancy with the first predetermined adjustment, the current loop PI parameter values can be adjusted, and the actual motor control and q-axis first set current injection can be re-performed using the adjusted PI parameter values. The actual feedback current obtained under the adjusted current loop PI parameters can be obtained. This adjustment can be repeated until the new first comparison result with the first set current meets the first predetermined condition. It should be understood that during this repeated adjustment, the frequency and amplitude of the first set current preferably remain unchanged. In other embodiments, since the amplitude comparison value between the set current and the feedback current is obtained, the amplitude of the first set current can be changed. Furthermore, in one embodiment, the first predetermined condition can specify that the amplitude and phase of the actual feedback current must be compared with the amplitude and phase of the first set current.

[0096] Because actual motor parameters obtained through labeling or measurement deviate from their true values, and because motor parameters change during operation, directly using the theoretical motor control PI parameter values calculated based on labeling or measurement to control the motor often results in deviations between the actual response characteristics and the theoretical analysis. Therefore, the present disclosure fine-tunes the theoretically calculated current loop PI parameters based on the actual response characteristics, enabling motor control to better meet the needs of practical applications.

[0097] In practice, the actual feedback current amplitude and phase can be determined directly from the oscilloscope display or the acquired values. However, in some cases, due to insufficient acquisition accuracy or to reduce the influence of external noise, a more reliable method can be used to calculate the actual feedback current amplitude and phase.

[0098] In one embodiment, the amplitude of the first feedback current can be obtained by calculating the difference between the maximum and minimum values of the feedback current. To this end, obtaining the amplitude comparison result between the first feedback current and the first given current as the first amplitude comparison result includes: obtaining the maximum and minimum values of the first feedback current; calculating the amplitude of the first feedback current based on the difference between the maximum and minimum values (the difference between the maximum and minimum values should be twice the amplitude); and determining the first amplitude comparison result based on the amplitude of the first feedback current and the amplitude of the first given current.

[0099] Taking into account the influence of errors and noise in actual operation, the amplitude can be calculated as the average of the difference between the maximum and minimum values collected over multiple cycles. In this case, calculating the amplitude comparison result between the first feedback current and the first given current as the first amplitude comparison result may include: obtaining the maximum and minimum values of the first feedback current over multiple cycles; calculating the amplitude of the first feedback current based on the average of the difference between the maximum and minimum values over the multiple cycles; and determining the first amplitude comparison result based on the amplitude of the first feedback current and the amplitude of the first given current.

[0100] In one embodiment, the phase of the first feedback current can be characterized by a zero-crossing phase. In this case, obtaining a phase comparison result between the first feedback current and the first given current as the first phase comparison result includes: obtaining a phase value of a first zero-crossing point of the first feedback current; and determining the first phase comparison result based on the first zero-crossing phase value and a phase value of a second zero-crossing point of the first given current. When the first given current lacks a bias current, the first and second zero-crossing points correspond to true zero-crossing points of the current. When the first given current includes a bias current (e.g., corresponding to a q-axis given sinusoidal current (or cosine current) const+amp*sin(ωt) as described below), the first and second zero-crossing points correspond to locations where the current passes through a bias current value (e.g., a current value equal to const).

[0101] In actual operation, due to the limited control signal frequency (fPWM below), it is usually impossible to collect the feedback current exactly when the current crosses zero. Therefore, the zero-crossing point position can be determined by curve fitting of data points around the zero-crossing point, thereby obtaining a zero-crossing phase value. In this case, obtaining the first zero-crossing phase value of the first feedback current includes: collecting multiple data points around the zero-crossing point; performing curve fitting based on the multiple data points; and obtaining the zero-crossing phase value of the fitted curve as the first zero-crossing phase value.

[0102] It should be understood that the calculation operation for the amplitude and phase of the actual feedback current can also be performed for the amplitude and phase of the simulated feedback current and the actual feedback current. Similarly, the zero-crossing point of the first given current can also be obtained based on the above fitting operation.

[0103] The first predetermined condition typically requires that the new first comparison result be no worse than the theoretical change value. Here, "worse than" can mean that the amplitude and phase changes of the actual feedback current are generally worse than the theoretical change values; more specifically, the amplitude attenuation of the actual feedback current is greater than the theoretical amplitude attenuation (i.e., the amplitude change value of the actual feedback current after attenuation is less than the theoretical amplitude change value), and / or the phase change of the actual feedback current is greater than the theoretical phase change value (the phase lag of the actual feedback current relative to the given current is greater than the theoretical value). To this end, the first predetermined condition requires that both the new first amplitude comparison result and the first phase comparison result be no worse than their respective theoretical values.

[0104] In one embodiment, the first predetermined condition may be a requirement that the comparison result of the new first feedback current obtained under the regulated current loop PI parameters with the new first amplitude of the first given current is not less than the first theoretical amplitude change value, and the comparison result of the new first feedback current with the new first phase of the first given current is not greater than the first theoretical amplitude change value. In other words, the actual feedback amplitude is required to be no less than the amplitude of the simulated feedback current obtained by simulating the theoretical value, and the phase is required to not lag behind the phase of the simulated feedback current. For example, in the following combination Figure 11 In the example, when the first given current is the desired bandwidth of the current loop, the amplitude ratio of the simulated feedback current to the given current is 0.707 (i.e., the amplitude change value is 0.707), and the phase of the simulated feedback current lags behind the phase of the given current by 45°. In this case, the first theoretical amplitude change value can be 0.707, and the first theoretical amplitude change value can be 45°. In this case, the first predetermined adjustment can require that the new first amplitude comparison result is no less than 0.707 and the new first phase comparison result is no greater than 45°. In other words, the amplitude ratio of the new first feedback current to the first given current is required to be no less than 0.707, and the phase lag is required to be no more than 45°.

[0105] At this time, based on the first comparison result, adjusting the current loop PI parameter value until a new first feedback current obtained by using the adjusted current loop PI parameter value for actual motor control and a new first comparison result of the first given current meet a first predetermined condition, including: in response to the first amplitude comparison result being greater than the first theoretical amplitude change value and / or the first phase comparison result being less than the first theoretical phase change value, adjusting the value of the current loop PI parameter until the newly obtained first comparison result is no longer inferior to the theoretical change value, that is, the newly obtained first amplitude comparison result is not less than the first theoretical amplitude change value and the first phase comparison result is not greater than the theoretical phase change value.

[0106] In one embodiment, the current loop integral coefficient K can be adjusted i_c and the current loop proportional coefficient K p_cIn one embodiment, due to the increase of the current loop integral coefficient K i_c It is easy to cause the system to lose control, so only the current loop proportional coefficient K is adjusted. p_c By increasing the current loop proportional coefficient K p_c , in order to increase the actual bandwidth of the current loop, thereby improving the control performance of the motor.

[0107] Although increasing the actual bandwidth of the current loop can improve the response speed of the motor, it can also easily lead to system instability. Therefore, when the first feedback current performance obtained by the theoretical current loop PI parameters is better than the theoretical change value, the current loop proportional coefficient K can be reduced. p_c , reducing the actual bandwidth of the current loop so that it is ultimately the same as the expected bandwidth value, thereby improving system stability while meeting the theoretical control performance. Similarly, "better than" here can mean that the amplitude and phase changes of the actual feedback current are better than their respective corresponding theoretical change values; more specifically, the amplitude attenuation of the actual feedback current is less than the theoretical amplitude attenuation (that is, the amplitude change value of the actual feedback current after attenuation is greater than the theoretical amplitude change value), and the phase change of the actual feedback current is less than the theoretical phase change value (the phase lag of the actual feedback current relative to the given current is smaller than the theoretical value). To this end, as a supplement, the first predetermined condition also requires that both the new first amplitude comparison result and the first phase comparison result are not better than their respective theoretical values.

[0108] Therefore, in one embodiment, based on the first comparison result, adjusting the current loop PI parameter value until a new first feedback current obtained by using the adjusted current loop PI parameter value for actual motor control and a new first comparison result of the first given current meet a first predetermined condition, including: in response to the first amplitude comparison result being greater than the first theoretical amplitude change value and the first phase comparison result being less than the first theoretical phase change value, adjusting the value of the current loop PI parameter until the newly obtained first comparison result is no longer better than the theoretical change value, that is, the newly obtained first amplitude comparison result is no longer greater than the first theoretical amplitude change value and / or the first phase comparison result is no longer less than the theoretical phase change value.

[0109] In addition, it should be understood that the adjustment of the current loop PI parameter value of the present disclosure can be automatically performed based on the comparison result. For example, if the comparison result indicates that the current loop proportional coefficient needs to be increased, the current loop proportional coefficient can be adjusted according to a predetermined step length until the new comparison result satisfies the conditions. Similarly, if the comparison result indicates that the current loop proportional coefficient needs to be reduced, the current loop proportional coefficient can be adjusted according to a predetermined step length until the new comparison result satisfies the conditions. When the current loop proportional coefficient is near the preferred value, the current loop proportional coefficient can also be adjusted with a smaller step length.

[0110] For ease of understanding, the adjustment of the theoretical values of the current loop PI parameters will be further described below with reference to the accompanying drawings and examples.

[0111] 2.3. Current Loop PI Parameter Adjustment Example

[0112] Response test performed on a 24V motor: resistance R = 0.24Ω, inductance L = 0.00023H; mechanical parameters: moment of inertia J = 0.0000288 kg·m 2 First, the implementation process can be simulated and tested. During the test, the motor parameters and motor model are accurate. During the test, the current loop bandwidth ω is adjusted according to the response requirements. b_c Set to 6283rad / s, the corresponding frequency is f b_c =1000Hz. Speed loop damping factor σ=5, then speed loop bandwidth ω b_s ≈1256rad / s, corresponding to frequency f b_s =200Hz.

[0113] According to the above calculation process, the current loop PI parameters can be obtained K p_c =ω b_c ×L=1.382; speed loop PI parameters

[0114] First, perform a current loop frequency sweep test in the simulation. Figure 8 The block diagram of the current loop PI response simulation test is shown. When the current loop PI parameters are adjusted, the speed loop related operations are not included, so Figure 8 The test does not need to include Figure 1 In addition, since the PI parameters of the two current loops are the same, the following parameters are not used here. Figure 1 Differentiation of PI2 and PI3 is shown.

[0115] const+amp*sin(ωt) is the q-axis current reference. Here, const is a reference offset value corresponding to the offset of a given sinusoidal current (or cosine current, or other sinusoidal current with an initial phase), amp is the amplitude of the given sinusoidal current, sin(ωt) is the sinusoidal reference, and ω is the given signal frequency. In some control modes with a position sensor, where the rotor position θ can be correctly detected even when the motor is at zero speed or in a forward or reverse cycle, const can be set to 0. However, in some sensorless control modes, the rotor position θ can only be correctly detected when the motor is rotating. Therefore, an offset value can be selectively added based on the actual application (the rotor position θ participates in Park transform and inverse Park transform, which are essential in the current loop control process). This simulation model uses a sensorless model, so const is set to 1A. That is, when the motor is in normal rotation, the sensorless model is used to observe the rotor position θ, and Park transform and inverse Park transform are performed to realize current loop control. By changing the given current frequency, the ratio of the attenuated amplitude of the response current to the given current amplitude (i.e., the amplitude change value) and the phase lag value are obtained. The attenuated amplitude is obtained by calculating the maximum and minimum values of the response current multiple times and taking the difference, and the phase lag is obtained by the Lagrange quadratic interpolation method. In addition, although not shown in the figure, the given current can also have a non-zero initial phase. Since what needs to be obtained is the phase lag value between the feedback current and the given current, the introduction of the initial phase will not have any effect on this value.

[0116] Figure 9 The simulation response curve is shown when the sinusoidal given frequency is 500 Hz. As shown in the figure, the sinusoidal given frequency is set to ω = 3142 rad / s, corresponding to the frequency f = 500 Hz and amp = 0.5A.

[0117] When calculating the amplitude of the response current signal, first record the multiple maximum and minimum values of the response current, as shown in the figure, which are max1, max2, max3...max n , min1, min2, min3...min n The value of n can be selected according to the actual usage. The response signal amplitude change value is calculated as follows:

[0118]

[0119] Where max1 = 1.445, max2 = 1.447, max3 = 1.446; min1 = 0.554, min2 = 0.553, min3 = 0.555, amp is the given signal amplitude, and thus the amplitude change value (characterizing the value of the remaining amplitude after attenuation) amp respone =0.892.

[0120] When calculating phase lag, you need to calculate Figure 9 The phase difference between the given current and the feedback current is shown in Figure 1. Point A is the zero-crossing point of the given current (the amplitude changes from positive to negative), and its coordinates are (x A , 1), point B is the zero-crossing point of the feedback current (the amplitude changes from positive to negative), and its coordinates are (x B , 1), the zero-crossing point ordinate is 1 because a const = 1A DC bias is added. For a sinusoidal signal, its zero-crossing point is raised by 1A. Therefore, the phase lag value is:

[0121]

[0122] Where, f PWM To control the signal frequency, it is generally set to 16 kHz in motor control, where f is the given signal frequency. However, due to the discretization, points A and B cannot be accurately sampled. In most cases, surrounding points will be sampled. This is described using the feedback current as an example. Figure 10 An example of sampling three points around the zero-crossing point is shown. In three consecutive control cycles, the points around the zero-crossing point obtained by sampling are D(64, 1.118), E(65, 1.032), and F(66, 0.9441). In order to improve the accuracy of calculating the zero-crossing point, the Lagrange quadratic interpolation method can be used to fit the curve near the zero-crossing point to find the zero-crossing point. When calculating the zero-crossing point, in order to simplify the calculation, the signal offset is first removed to obtain D1(64, 0.118), E1(65, 0.032), and F1(66, -0.059). Among the three points, the amplitudes of the first two points are greater than 0, and the amplitude of the last point is less than or equal to 0. Then a quadratic function with respect to time t near the zero-crossing point is generated, which can be expressed as:

[0123] x=at 2 +bt+c (12)

[0124] Where t is time, according to the Lagrange interpolation formula, we can get:

[0125] a=0.5x(n-2)-x(n-1)+0.5x(n)

[0126] b=-0.5x(n-2)×(2n-1)+x(n-1)×(2n-2)-0.5x(n)×(2n-3)

[0127] c=0.5x(n-2)×(n-1)×nx(n-1)×(n-2)×n+0.5x(n)×(n-2)×(n-1)

[0128] Where n = 66, D1 corresponds to x(n-2) = 0.118; E1 corresponds to x(n-1) = 0.032; F1 corresponds to x(n) = -0.0559; Substituting the above into the solution, we get:

[0129] a=-0.000095, b=0.0365, c=1.670.

[0130] When the fitting curve passes through zero, at this time, 2 +bt+c=0, Determine the size of t1 and t2, and choose a value between n-2=64 and n=66, that is, t=t2=65.3666, that is, x B =65.3666.

[0131] The same method can be used to calculate the zero crossing point of the given signal, t = 63.0, that is, xA = 63.0, so The calculation here only describes the process of finding a zero-crossing point for the given current signal and the feedback current signal and calculating the phase lag based on the zero-crossing point. In actual implementation, to improve system stability, multiple sets of zero-crossing points can be obtained, the phase lag can be calculated separately, and the average phase lag value can be used as the final phase lag.

[0132] Using the same method, the amplitude change and phase lag values at different sinusoidal given frequencies can be calculated. Figure 11 The simulation response curve is shown when the sinusoidal given frequency is 1000Hz. At this time, the sinusoidal given frequency 1000Hz is equal to the current loop bandwidth frequency ω b_c =1000Hz. Using a similar method as above, the amplitude change value amp can be obtained respone =0.707105, the phase lag is 45°.

[0133] Figure 12 The simulation response curve is shown when the sinusoidal given frequency is 1500Hz. At this time, the sinusoidal given frequency is 1500Hz, which is greater than the current loop bandwidth frequency ω b_c =1000Hz, using a similar method as above, we can get the amplitude change value amp respone =0.554699, and the phase lag is 56.3°.

[0134] According to the above model response curve, the current loop is adjusted to the first-order inertia link, and the measured response curve characteristics of the adjusted PI parameters are consistent with the theoretical analysis. When the sinusoidal given frequency is within the current loop bandwidth frequency ω b_c =1000Hz, the amplitude change value amp respone =0.707, the phase lag is 45°, which is completely consistent with the theoretical analysis; when the sinusoidal given frequency is less than the bandwidth frequency ωb_c When the sine frequency is greater than the bandwidth frequency ω, the amplitude change value is small and the phase lag is also small. b_c When , the amplitude change value is large and the phase lag is also large.

[0135] The above analysis is based on a theoretical model. The parameters in the model are accurate, and therefore the results are also accurate. However, in actual implementation (using an MCU to control motor rotation), inaccurate motor parameter measurements and changes during operation can occur. Current sampling is inaccurate, with significant glitches. Dead zones in the drive output can also affect the control process, causing the theoretically tuned PI parameters to differ from the theoretical response characteristics in actual control. Therefore, the theoretically tuned PI parameters need to be fine-tuned based on the actual response characteristics to ensure they meet the actual application conditions. The following describes a method for automatically fine-tuning the PI parameters using an MCU based on the amplitude response and phase lag.

[0136] It is preferred to test the response at a given bandwidth frequency, such as a given current loop bandwidth ω b_c Set to 6283rad / s, the corresponding frequency is f b_c =1000Hz. You can set the given current signal bias const = 0.6A, the given current signal amplitude amp = 0.4A, and use the current loop theory PI parameters, K i_c =1091,K p_c =1.382, the current loop response is obtained. Figure 13 The actual response curve is shown when the sinusoidal given frequency is 1000Hz. At this time, the response signal amplitude change value amp respone =0.663, the phase lag is 89.1°. Figure 11 It can be seen that the amplitude change of the actual feedback is smaller than the theoretical change value of 0.707 at the bandwidth of the first-order inertia link (i.e., the amplitude attenuation of the actual feedback current is greater than that of the simulated feedback current), and the phase lag of 89.1° is greater than 45.0° at the bandwidth of the first-order inertia link (i.e., the phase lag is greater than that of the simulated feedback current).

[0137] It can be seen that the PI parameters obtained according to the theory usually need to be fine-tuned to meet the actual needs (corresponding to the first predetermined condition). During the adjustment process, the integral factor K is increased. i_c It is easy to cause the system to lose control, so it is preferred to adjust the proportional factor K p_c The method makes the bandwidth meet the actual demand. Here, the actual response bandwidth is smaller than the theoretical bandwidth. The automatic increase of K is adopted. p_c The method of expanding the bandwidth until the given theoretical bandwidth ω b_cThe amplitude change value at (the ratio of the attenuated amplitude of the actual feedback current to the given current amplitude) is greater than 0.707 and the phase lag is less than 45.0°.

[0138] K p_c It automatically increases until the amplitude change value is greater than 0.707 and the phase lag is less than 45.0°. p_c =4.01, the amplitude change value is 1.03, and the phase lag is 45.0°. Figure 14 The figure shows the actual response curve when the sinusoidal given frequency is 1000 Hz after the current loop PI parameters are adjusted.

[0139] Therefore, in a preferred embodiment, the complete current loop tuning steps are as follows:

[0140] First, calculate the current loop theoretical PI value K based on the motor parameters p_c , K i_c And bring the theoretical PI parameters into the MCU to control the motor operation.

[0141] The given current in the control process is const+amp*sin(ωt), and the frequency ω is the desired current loop bandwidth ω b_c , const is the DC bias to maintain the motor rotation, and amp is the sinusoidal amplitude of the given current.

[0142] The amplitude change value amp is obtained by taking the difference and averaging the maximum and minimum values of the feedback current at multiple points. respone , the phase lag phase is obtained by Lagrange quadratic interpolation method lag .

[0143] If both amp respone Greater than 0.707, phase lag Less than 45.0°, it proves that the actual bandwidth is greater than the expected current loop bandwidth ω b_c , the program automatically reduces K p_c , until the amplitude changes to amp respone and phase lag lag If one of the boundary conditions is satisfied first, it can be proved that the current loop bandwidth is the expected bandwidth ω b_c .

[0144] Other cases (amp respone Less than 0.707, phase lag Less than 45.0°; or amp respone Less than 0.707, phase lag Greater than 45.0°; or amp respone Greater than 0.707, phase laggreater than 45.0°), it proves that the actual bandwidth is less than the expected current loop bandwidth ω b_c , the program automatically increases K p_c , until the amplitude changes to amp respone and phase lag lag All satisfy the boundary conditions. For example, amp respone Less than 0.707, phase lag When the angle is less than 45.0°, increase K p_c , phase lag It will continue to decrease and it is always less than 45.0° (that is, the phase lag value always meets the condition). At this time, the judgment only needs to be based on the amplitude change value, that is, the condition is amp respone It is equal to 0.707. This proves that the current loop bandwidth is the expected bandwidth ω b_c .

[0145] 2.4. Speed loop PI parameter adjustment

[0146] In one embodiment, only the current loop PI parameter value may be adjusted. In this case, the adjusted current loop PI parameter value may be used to obtain the speed loop PI parameter value, and the obtained speed PI parameter value may be directly used to participate in actual motor control.

[0147] In another embodiment, after the current loop PI parameter value is fully adjusted, the speed loop PI parameter value can also be adjusted accordingly. In this case, the PI parameter value adjustment method disclosed herein also includes: calculating the theoretical speed loop PI parameter value based on the parameters when the motor is stationary; using the adjusted current loop PID parameter value to perform actual motor control to adjust the speed loop PID parameter value, wherein the adjustment of the speed loop PID parameter value further includes: using the adjusted current loop PI parameter value and the theoretical speed loop PI parameter value to perform actual motor control, during which a second given speed is input into the speed loop to obtain a second feedback speed, wherein the second given speed is a sinusoidal speed signal with a second given frequency; obtaining a second comparison result between the second feedback speed and the second given speed; and adjusting the speed loop PI parameter value based on the second comparison result until the new second feedback speed obtained by using the adjusted speed loop PI parameter value to perform actual motor control and the new second comparison result between the second given speed and the second given speed meet the second predetermined condition.

[0148] It should be understood that the theoretical speed loop PI parameter values can be calculated together with the theoretical current loop PI parameter values in step S710 based on the parameters when the motor is stationary. Furthermore, while the terms "second set speed" and "second feedback speed" are used herein, the "second" designation is intended to illustrate the operation of the speed loop and does not imply that a "first set speed" or a "first feedback speed" are required when setting the current loop PI parameter values.

[0149] Similar to the current loop PI parameter adjustment, when adjusting the speed loop PI parameters, the speed loop expected bandwidth can also be used as the frequency corresponding to the second given speed, and when making specific comparisons, the amplitude change value and phase lag value of the second feedback speed compared to the second given speed can be compared with the theoretical change value, and then corresponding adjustments can be made. It should be understood that if the adjustment of the current loop PI parameters makes the amplitude change value and phase lag value of the second feedback speed under the control of the speed loop PI parameters obtained thereby better than the theoretical change value (that is, the amplitude attenuation of the feedback speed is less than the theoretical amplitude attenuation (the second amplitude comparison result is greater than the corresponding theoretical value) and the phase lag value is less than the theoretical phase lag value), then the speed loop PI parameters do not need to be adjusted.

[0150] In a specific implementation example, after the current loop is calibrated, the calibrated current loop parameters (K p_c =4.01, K i_c =1091) into the theoretical speed loop PI parameter K i_s =251.3,K p_s =0.074 to tune the speed loop. When tuning the speed loop, the frequency of the given speed is the theoretical bandwidth of the speed loop ω b_s ≈1256rad / s, corresponding to frequency f b_s =200Hz.

[0151] Figure 15 The actual response curve of the speed loop when the sinusoidal given frequency is 200Hz is shown. The amplitude change value amp can be calculated using a similar method as above. respone =0.824, phase lag phase lag =56.2°. At this point, if the theoretical change values are still 0.707 and 45.0°, the phase lag does not meet the second predetermined condition, and the speed loop PI parameters need to be adaptively adjusted. At this point, the speed loop PI parameters can also be automatically adjusted using a method similar to the current loop. Figure 16 The figure shows the actual response curve when the sinusoidal given frequency is 200Hz after the speed loop PI parameters are adjusted. p_s =0.090, the amplitude change value amp respone =0.95, phase lag phase lag=45.0°. That is, the new actual amplitude change is greater than the theoretical amplitude change by 0.707, and the new phase lag is equal to the feedback phase lag of 45.0°. At this point, the velocity loop response curve meets the actual response requirements.

[0152] Figure 17 The upper part shows the speed loop response curve, and the lower part shows the current loop response curve.

[0153] It is obvious from the figure that the speed loop responds much slower than the current loop. While the speed loop is still adjusting, the current loop has stabilized and is fluctuating around the given current. When a step change occurs in the given speed, the time from the given speed step moment to the feedback speed reaching 0.707 times the given speed (the time from point A to point B) is approximately 10ms, which is similar to the speed loop bandwidth f b_s The reciprocal of 1 / 200 Hz = 5.0 ms is not much different; the time from the start of the set speed step to the time the feedback speed fluctuates around the actual speed (the time from points A to C) is approximately 35 ms. However, at the start of the speed step, although the feedback current is close to the set current, there is still a static error. This indicates that the current loop bandwidth is insufficient, resulting in slow response speed. In other words, the theoretical PI current loop response speed is slow.

[0154] Figure 18 The speed and current dual closed loop response curves under adjusted PI parameters are shown. Similarly, the upper part is the speed loop response curve, and the lower part is the current loop response curve.

[0155] Since the speed loop PI parameters didn't change much during the adjustment process, the speed loop response curve didn't differ much from the pre-adjustment curve. After the adjustment, the current loop bandwidth increased significantly. At the moment the given current suddenly changed, the feedback current immediately followed the change. The speed loop step response curve also demonstrates the accuracy of adjusting the speed loop bandwidth using the swept frequency characteristic.

[0156] The adjusted current loop PI parameter values obtained by the method described in this disclosure (when adjusting the speed loop parameters, the adjusted speed loop PI parameters are also written) can be written into the controller of the permanent magnet synchronous motor. The controller can then perform magnetic orientation vector control on the permanent magnet synchronous motor based on the adjusted current loop PI parameter values. In some application scenarios, the PI parameters can be adjusted again based on the current actual feedback current after the motor has been in actual use for a period of time.

[0157] In the motor whose PI parameters are adjusted using this method, if a sinusoidal signal (current loop, speed loop) is given, its feedback signal (current, speed) will also show sinusoidal changes, and its amplitude change value and phase lag value are better than those of the motor controlled based on theoretical PI parameters, so it is easy to identify.

[0158] Figure 19 FIG1 shows a schematic diagram of the composition of a motor control system according to an embodiment of the present invention. As shown in the figure, the motor control system includes not only a motor part but also a magnetic oriented vector control (FOC) module for controlling the motor. Figure 19 As shown in FIG. 1 , in one embodiment, the motor control system further includes a power supply, a microcontroller (MCU), a driver, an inverter, and a current sampling device, wherein the FOC module can be implemented by a processing unit in the MCU. In the present disclosure, the FOC module can use the PI parameter tuning method ( Figure 19 The motor is controlled by magnetic oriented vector control using the adjusted PI parameters obtained by the PID module shown in FIG.

[0159] This disclosure proposes a scheme that adaptively adjusts the current loop PI parameters and the speed loop PI parameters based on theoretical current and speed loop PI parameters calculated based on a continuous model. This scheme can also further adjust the speed loop PI parameters based on the phase and amplitude differences between the actual feedback current and a given current, as well as the actual feedback speed and a given speed. Furthermore, the response signal amplitude can be calculated by finding the maximum and minimum values of the response curve multiple times and averaging the differences to improve the response amplitude measurement accuracy. The Lagrange quadratic interpolation method can also be used to calculate the phase difference, improving the phase lag measurement accuracy.

[0160] While various embodiments of the present invention have been described above, the foregoing description is intended to be illustrative, non-exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, their practical applications, or improvements to existing technologies, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A motor control PI parameter tuning method, comprising: Calculate the theoretical current loop PI parameter values based on the motor's stationary parameters; Performing actual motor control using the theoretical current loop PI parameter values, during which a first given current is input into the q-axis to obtain a first feedback current, wherein the first given current is a sinusoidal current having a first given frequency, and the first given frequency corresponds to a desired bandwidth frequency of the current loop; Obtaining a first comparison result between the first feedback current and the first given current; and Based on the first comparison result, the current loop PI parameter value is adjusted until a new first comparison result between a new first feedback current obtained by using the adjusted current loop PI parameter value to perform actual motor control and the first given current meets a first predetermined condition.

2. The method according to claim 1, wherein The first comparison result includes a first amplitude comparison result and a first phase comparison result, and obtaining the first comparison result between the first feedback current and the first given current includes: obtaining a comparison result between the amplitudes of the first feedback current and the first given current as the first amplitude comparison result; and A phase comparison result between the first feedback current and the first given current is obtained as the first phase comparison result.

3. The method according to claim 2, wherein: Obtaining a comparison result between the amplitudes of the first feedback current and the first given current as the first amplitude comparison result includes: Obtaining a maximum value and a minimum value of the first feedback current; Obtaining a first feedback current amplitude based on the difference between the maximum value and the minimum value; and The first amplitude comparison result is determined based on the amplitude of the first feedback current and the amplitude of the first given current.

4. The method according to claim 2, wherein: Obtaining a comparison result between the amplitudes of the first feedback current and the first given current as the first amplitude comparison result includes: Obtaining maximum and minimum values of the first feedback current over multiple cycles; Obtaining a first feedback current amplitude based on an average of differences between maximum and minimum values of a plurality of cycles; and The first amplitude comparison result is determined based on the amplitude of the first feedback current and the amplitude of the first given current.

5. The method according to claim 2, wherein: Obtaining a phase comparison result between the first feedback current and the first given current as the first phase comparison result includes: acquiring a phase value of a first zero-crossing point of the first feedback current; and determining the first phase comparison result based on the first zero-crossing phase value and the second zero-crossing phase value of the first given current, Among them, when the first given current has no bias current, the first zero-crossing point and the second zero-crossing point correspond to the true zero-crossing point of the current, and when the first given current includes a bias current, the first zero-crossing point and the second zero-crossing point correspond to the position where the current passes through the bias current value.

6. The method according to claim 5, wherein: Obtaining a first zero-crossing phase value of the first feedback current includes: Collect multiple data points around the zero crossing point; performing curve fitting based on the plurality of data points; and The phase value of the zero-crossing point of the fitting curve is obtained as the phase value of the first zero-crossing point.

7. The method of claim 2, wherein: Adjusting the current loop PI parameter value based on the first comparison result until a new first feedback current obtained by using the adjusted current loop PI parameter value to perform actual motor control and a new first comparison result with the first given current satisfies a first predetermined condition includes: In response to the first amplitude comparison result being greater than a first theoretical amplitude change value and the first phase comparison result being less than a first theoretical phase change value, the value of the current loop PI parameter is adjusted until the newly obtained first amplitude comparison result is not greater than the first theoretical amplitude change value and / or the first phase comparison result is not less than the theoretical phase change value.

8. The method of claim 2, wherein: Adjusting the current loop PI parameter value based on the first comparison result until a new first feedback current obtained by using the adjusted current loop PI parameter value to perform actual motor control and a new first comparison result with the first given current satisfies a first predetermined condition includes: In response to the first amplitude comparison result being less than a first theoretical amplitude change value and / or the first phase comparison result being greater than a first theoretical phase change value, the value of the current loop PI parameter is adjusted until the newly obtained first amplitude comparison result is not less than the first theoretical amplitude change value and the first phase comparison result is not greater than the theoretical phase change value.

9. The method of claim 1, wherein: Adjusting the current loop PI parameter values includes: In response to the first comparison result being better than the theoretical change value, reducing the value of the current loop proportional coefficient; and In response to the first comparison result being inferior to the theoretical change value, the value of the current loop proportional coefficient is increased.

10. The method of claim 1, wherein: The difference between the first given frequency and the current loop expected bandwidth frequency does not exceed a predetermined threshold, wherein the value of the current loop expected bandwidth frequency is determined based on the theoretical current loop PI parameter value.

11. The method of claim 1 , further comprising: Calculate the theoretical speed loop PI parameter value based on the parameters when the motor is stationary; as well as Performing actual motor control using the adjusted current loop PI parameter value to adjust the speed loop PI parameter value, wherein adjusting the speed loop PI parameter value further includes: performing actual motor control using the adjusted current loop PI parameter value and the theoretical speed loop PI parameter value, during which a second given speed is input into the speed loop to obtain a second feedback speed, wherein the second given speed is a sinusoidal speed signal having a second given frequency, and the second given frequency corresponds to a desired bandwidth frequency of the speed loop; Obtaining a second comparison result between the second feedback speed and the second given speed; and Based on the second comparison result, the speed loop PI parameter value is adjusted until a new second comparison result between a new second feedback speed obtained by using the adjusted speed loop PI parameter value to perform actual motor control and the second given speed meets a second predetermined condition.

12. The method of claim 11, further comprising: Writing the adjusted current loop PI parameter value and the adjusted speed loop PI parameter value into a controller of the permanent magnet synchronous motor; as well as The controller performs magnetic orientation vector control during operation of the permanent magnet synchronous motor based on the adjusted current loop PI parameter value and the adjusted speed loop PI parameter value.

13. A motor control system comprising: Motor; as well as A magnetic oriented vector control module is configured to perform magnetic oriented vector control on the motor using the adjusted PI parameters obtained based on the PI parameter tuning method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Current loop realization method and realization system of switched reluctance motor controller

    CN102545771A

  • Method for improving electric current loop regulators of permanent magnet synchronous motor

    CN103516280A

  • Parameter setting method for double-closed-loop vector control PI regulator of permanent magnet synchronous motor

    CN109756166A

  • Rotation speed control method and device, motor speed regulation system, storage medium and processor

    CN111817630A

  • GUI big data analysis system and method using open source package

    KR1020240146118A

Cited By

  • Motor testing method and motor

    CN121763098A

  • Method for testing an electric machine and electric machine

    CN121763098B