A current compensation method, system, computer, readable storage medium and motor vehicle
By combining Clarke transform, Park transform and adaptive quasi-resonant controller, the current sampling deviation of permanent magnet synchronous motor is quickly and accurately identified and compensated, solving the torque pulsation problem caused by current sensor error and improving the current control accuracy and stability of electric vehicles.
Patent Information
- Application Number
- CN202310343840.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-28
- Publication Date
- 2026-03-03
- Estimated Expiration
- 2043-03-28
AI Technical Summary
In the existing technology, the current sensor sampling current of permanent magnet synchronous motor has a DC bias error, which leads to torque pulsation and low-speed jitter. Existing calibration methods are not very accurate and have a large computational load, lacking universal applicability.
By combining Clarke transform and Park transform with an adaptive quasi-resonant controller, deviation identification and compensation are performed by acquiring three-phase current. The adaptive quasi-resonant controller is used to calculate the AC quantity of the current sampling deviation and output the corresponding current compensation quantity, without the need for additional hardware overhead and complex filters.
It achieves high-precision, low-computational-load-rate current sampling deviation identification and compensation, applicable to various motor speeds, and improves the current control accuracy and stability of electric vehicles.
Smart Images

Figure CN116317779B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of motor vehicle technology, and specifically to a current compensation method, system, computer, readable storage medium, and motor vehicle. Background Technology
[0002] Permanent magnet synchronous motors (PMSMs) are widely used in the electric drive systems of electric vehicles due to their high power density and efficiency. To achieve high-precision torque control of PMSMs, accurate phase current must be obtained in real time, which relies on high-precision current sensors. However, due to factors such as manufacturing inconsistencies, temperature drift, sensor aging, and sampling circuit issues, the sampled current obtained by the current sensor will inevitably contain DC bias errors. This is reflected in the closed-loop control of the current as torque pulsation in the motor. Especially at low speeds, this manifests as low-speed jitter, affecting the user experience of the electric vehicle.
[0003] To address this issue, it is typically necessary to calibrate the sampling output of the current sensor to identify and compensate for sampling deviations. However, existing technologies suffer from low accuracy in identifying current sampling deviations, high computational load, and lack of universal applicability. Summary of the Invention
[0004] This invention aims to address one of the technical problems in related technologies to a certain extent. To this end, this invention provides a current compensation method with advantages such as high identification accuracy, low calculation load rate, and high universal applicability.
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] A current compensation method for compensating for deviations in the sampled current of a permanent magnet synchronous motor includes the following steps:
[0007] Obtain three-phase current;
[0008] The Clarke transform is performed on the three-phase current to obtain the sampling deviation of the αβ axis current in the two-phase stationary coordinate system;
[0009] Park transformation is performed on the αβ axis current to obtain the sampling deviation of the dq axis current in the synchronous rotating coordinate system;
[0010] The d-axis voltage reference value and q-axis voltage reference value are obtained by the current regulator;
[0011] The AC quantity of the current sampling deviation is obtained and compensated by the current sampling deviation identification module.
[0012] Optionally, obtaining the three-phase current includes the following steps:
[0013] We can obtain the sampled currents of any two phases, assuming the sampled currents of the two phases are i.a_m and i b_m ;
[0014] The sampling current i of the third phase is calculated using the following formula. c_m:
[0015] i a_m =i a +i a_offset
[0016] i b_m =i b +i b_offset
[0017] i c_m =-(i a +i b )-(i a_offset +i b_offset )
[0018] Among them, i a i b and i c These are the actual three-phase currents, i a_offset i represents the sampling deviation of phase A current. b_offset This represents the sampling deviation of the B-phase current;
[0019] Performing the Clarke transformation on the three-phase current, we obtain:
[0020] i α_m =i a_m =i a +i a_offset
[0021]
[0022] i α_offset =i a_offset
[0023] Among them, i α_m Let i be the α-axis current. β_m For the β-axis current, i α_offset For the sampling deviation of the α-axis current, i β_offset This represents the sampling deviation of the β-axis current.
[0024] Performing the Park transformation on the three-phase current yields:
[0025] i d_m =i d +i d_offset
[0026] i q_m =i q +i q_offset
[0027]
[0028] Among them, i d_m Let i be the d-axis current. q_m Let i be the q-axis current. d_offset i represents the actual sampling deviation of the d-axis current. q_offset θ represents the sampling deviation of the q-axis current. e This indicates the rotor position of the motor.
[0029] Optionally, the current sampling deviation identification module includes an adaptive quasi-resonant controller, and the input of the current sampling deviation identification module is u. d * u q * and motor speed ω e , where u d * d-axis voltage u d Reference value, u q * The q-axis voltage u q The reference value; the adaptive quasi-resonant controller calculates and outputs the AC quantity of the current sampling deviation and its corresponding current compensation quantity;
[0030] The current sampling deviation of the d-axis current obtained by the current sampling deviation identification module; The current sampling deviation of the q-axis current obtained by the current sampling deviation identification module;
[0031] The corresponding current compensation amount is
[0032] Optionally, the transfer function of the adaptive quasi-resonant controller is:
[0033]
[0034] Where s is the Laplace operator, k is the resonant gain, and ω c ω is the cutoff frequency, and ω is the resonant frequency. The resonant frequency ω is equal to the motor speed ω. e .
[0035] Optionally, the adaptive quasi-resonant controller may be provided in one or two configurations.
[0036] The adaptive quasi-resonant controller is configured such that, when a time condition is met, it directly calculates the AC quantity of the dq-axis current sampling deviation from the d-axis voltage or the q-axis voltage and outputs the corresponding current compensation quantity.
[0037] The adaptive quasi-resonant controller has two states. It simultaneously calculates the AC quantity of the sampling deviation of the dq-axis current from the d-axis voltage and the q-axis voltage, and outputs the corresponding current compensation quantity.
[0038] Optionally, when the adaptive quasi-resonant controller is provided, the current sampling deviation identification module further includes a second-order generalized integrator, the input of which is the output of the adaptive quasi-resonant controller, and the output of which is the AC quantity of the current sampling deviation.
[0039] The technical solution provided by this invention requires no additional hardware overhead or the introduction of complex filters. It can quickly and accurately identify and compensate for the sampling deviation of the phase current using only an electronic control system. It has a low computational load rate, high identification accuracy, and universal applicability.
[0040] Meanwhile, the present invention also provides a current compensation system for compensating for deviations in the sampled current of a permanent magnet synchronous motor, wherein the current compensation system performs the current compensation method described in any one of the above-mentioned methods.
[0041] Furthermore, the present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the current compensation method described in any one of the above claims.
[0042] In addition, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the current compensation method described in any one of the above claims.
[0043] In addition, the present invention also provides a motor vehicle having a permanent magnet synchronous motor, wherein the permanent magnet synchronous motor is current compensated by the current compensation method described in any one of the above.
[0044] Alternatively, the motor vehicle may have the aforementioned current compensation system, which compensates the current of the permanent magnet synchronous motor.
[0045] Or the motor vehicle has the aforementioned computer equipment;
[0046] These features and advantages of the present invention will be disclosed in detail in the following specific embodiments and accompanying drawings. The preferred embodiments or means of the present invention will be shown in detail in conjunction with the accompanying drawings, but are not intended to limit the technical solutions of the present invention. In addition, each of these features, elements and components appearing in the following text and drawings is a plurality of, and different symbols or numbers are used for convenience of representation, but all represent parts with the same or similar construction or function. Attached Figure Description
[0047] The present invention will be further described below with reference to the accompanying drawings:
[0048] Figure 1 : A principle block diagram of Embodiment 1 of the present invention;
[0049] Figure 2 : A schematic diagram of the current sampling deviation identification module in Embodiment 1 of the present invention;
[0050] Figure 3 : A schematic diagram of the adaptive quasi-resonant controller in Embodiment 1 of the present invention;
[0051] Figure 4 : A schematic diagram of the current sampling deviation identification module in Embodiment 2 of the present invention. Detailed Implementation
[0052] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described are intended to explain the present invention and should not be construed as limiting the invention.
[0053] The terms "an embodiment," "example," or "trademark" used in this specification refer to a particular feature, structure, or characteristic described in connection with the embodiment itself that may be included in at least one embodiment disclosed in this patent. The phrase "in an embodiment" appearing in various places throughout the specification does not necessarily refer to the same embodiment.
[0054] Example 1:
[0055] This embodiment provides a current compensation method for compensating for deviations in the input current of a permanent magnet synchronous motor 1. The motor drive system consists of a power supply, a permanent magnet synchronous motor 1, an inverter 2, a current sensor, a position sensor 3, and a microcontroller. The three-phase windings of the permanent magnet synchronous motor 1 are connected to the output of the inverter 2.
[0056] like Figure 1 As shown, the current compensation method provided in this embodiment includes the following steps:
[0057] The three-phase current is obtained. In this embodiment, current sensors are installed on any two phase windings to obtain the measured phase current. The third phase current is calculated in the controller according to the following formula to obtain the final sampled current:
[0058] i a_m =i a +i a_offset
[0059] i b_m =i b +i b_offset
[0060] ic_m =-(i a +i b )-(i a_offset +i b_offset )
[0061] Among them, i a_m and i b_m To obtain any two-phase current, i c_m For the sampling current of the third phase, i a i b and i c These are the actual three-phase currents, i a_offset i represents the sampling deviation of phase A current. b_offset This represents the sampling deviation of the B-phase current.
[0062] The Clarke transform of the three-phase currents is performed according to the following formula to obtain the sampling deviation of the αβ-axis current in the two-phase stationary coordinate system:
[0063] i α_m =i a_m =i a +i a_offset
[0064]
[0065] i α_offset =i a_offset
[0066]
[0067] Among them, i α_m Let i be the α-axis current. β_m For the β-axis current, i α_offset For the sampling deviation of the α-axis current, i β_offset This represents the sampling deviation of the β-axis current.
[0068] The Parker transformation is performed on the three-phase currents to obtain the sampling deviation of the dq-axis current in the synchronous rotating coordinate system:
[0069] i d_m =i d +i d_offset
[0070] i q_m =i q +i q_offset
[0071]
[0072]
[0073] Among them, i d_mLet i be the d-axis current. q_m Let i be the q-axis current. d_offset i represents the sampling deviation of the d-axis current. q_offset θ represents the sampling deviation of the q-axis current. e The rotor position of the motor is determined by position sensor 3, which acquires the motor's position and speed. Position sensor 3 acquires the motor's rotor position θ. e After differentiation and passing through a low-pass filter, the motor speed ω can be obtained. e .
[0074] Based on the sampling deviations of the αβ-axis current and the dq-axis current, the voltage deviation is obtained according to the following formula:
[0075]
[0076]
[0077] Among them, u d_offset For the voltage deviation along the d-axis, u q_offset ω represents the voltage deviation along the q-axis. e L is the motor speed. d and L q These are the direct-axis inductance and quadrature-axis inductance of the permanent magnet synchronous motor, respectively, determined by the motor itself. According to u d_offset and u q_offset As can be seen from the expression, the frequency of the AC deviation signal of the dq axis changes with the rotational speed. Therefore, an adaptive quasi-resonant controller with high resonant gain is used to extract and amplify the AC deviation of the dq axis.
[0078] like Figure 2 As shown, the AC quantity of the current sampling deviation is obtained by a current sampling deviation identification module including an adaptive quasi-resonant controller. In this embodiment, two adaptive quasi-resonant controllers are provided, which simultaneously calculate the AC quantity of the current sampling deviation and the corresponding current compensation quantity for the d-axis voltage and the q-axis voltage.
[0079] like Figure 3 As shown, the transfer function of the adaptive quasi-resonant controller is:
[0080]
[0081] Where s is the Laplace operator, k is the resonant gain, and ω c ω is the cutoff frequency, and ω is the resonant frequency. The resonant frequency ω is equal to the motor speed ω. e .
[0082] Resonant gain k and cutoff frequency ω cAll parameters can be selected by those skilled in the art during calibration based on the actual parameters of the electric drive system. In this embodiment, k = 400 and ω are preferred. c = 10 rad / s.
[0083] The input to the current sampling deviation identification module is u d * u q * and motor speed ω e , where u d * d-axis voltage u d Reference value, u q * The q-axis voltage u q The reference value is calculated by the adaptive quasi-resonant controller, which calculates the AC quantity of the current sampling deviation and the corresponding current compensation quantity and outputs it. The current sampling deviation of the d-axis current obtained by the current sampling deviation identification module; This refers to the current sampling deviation of the q-axis current obtained by the current sampling deviation identification module. Since the deviation value of the dq-axis current is such that the q-axis current leads the d-axis current by 90°, the compensation amount should also satisfy the condition that the q-axis current compensation amount leads the d-axis current by 90°. Therefore, the q-axis compensation amount needs to be the negative of the extracted q-axis AC quantity. Thus, the corresponding current compensation amount is...
[0084] d-axis current compensation amount i dc q-axis current compensation amount i qc d-axis current i d_m q-axis current i q_m d-axis current preset value i d * q-axis current preset value i q *After being superimposed, the voltage is input to the current regulator PI, and the current regulator PI outputs the d-axis voltage u. d preset value u d * and q-axis voltage u q preset value u q * After undergoing Parker inverse conversion, the signal is transmitted to inverter 2 via space vector pulse width modulation, and then input to permanent magnet synchronous motor 1.
[0085] The technical solution provided in this embodiment requires no additional hardware overhead or the introduction of complex filters. It can quickly and accurately identify and compensate for the sampling deviation of the phase current using only the electronic control system. It has a low computational load rate, high identification accuracy, and universal applicability.
[0086] Meanwhile, this embodiment also provides a current compensation system for performing the aforementioned current compensation method to compensate for deviations in the input current of the permanent magnet synchronous motor. The motor drive system consists of a power supply, a permanent magnet synchronous motor, an inverter, a current sensor, a position sensor, and a microcontroller. The three-phase windings of the permanent magnet synchronous motor are connected to the inverter output. The current compensation system also includes:
[0087] Clarke transform module, Parker transform module, current sampling deviation identification module, and current regulator;
[0088] The current sensor is installed on any two phase windings to obtain the measured phase current:
[0089] The Clarke transform module is used to perform Clarke transform on three-phase currents to obtain the sampling deviation of the αβ-axis currents in a two-phase stationary coordinate system:
[0090] The Parker transformation module performs a Parker transformation on the three-phase current to obtain the sampling deviation of the dq-axis current in the synchronous rotating coordinate system:
[0091] The current sampling deviation identification module is used to acquire the AC quantity of the current sampling deviation. In this embodiment, the current sampling deviation identification module includes two adaptive quasi-resonant controllers, which simultaneously detect the d-axis voltage u. d and q-axis voltage u q Calculate the AC quantity of the current sampling deviation and its corresponding current compensation. The transfer function of the adaptive quasi-resonant controller is:
[0092]
[0093] Where s is the Laplace operator, k is the resonant gain, and ω c ω is the cutoff frequency, and ω is the resonant frequency. The resonant frequency ω is equal to the motor speed ω. e .
[0094] Resonant gain k and cutoff frequency ω c All parameters can be selected by those skilled in the art during calibration based on the actual parameters of the electric drive system.
[0095] The input to the current sampling deviation identification module is the d-axis voltage u. d preset value u d * q-axis voltage u q preset value u q * and motor speed ω e The calculated AC quantity of the current sampling deviation is and For i d_offset The default value, For i q_offset The preset value. Since the deviation of the d-q axis current is that the q-axis current leads the d-axis current by 90°, the compensation amount should also satisfy the condition that the q-axis current compensation amount leads the d-axis current by 90°. Therefore, the q-axis compensation amount needs to be the negative of the extracted q-axis AC quantity. Thus, the corresponding current compensation amount is...
[0096] The current regulator is used to perform current compensation based on feedback from the current sampling deviation identification module.
[0097] Meanwhile, this embodiment also provides a computer device, including a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, it causes the processor to perform the aforementioned current compensation steps. The current compensation steps here can be steps from the memory analysis methods of the various embodiments described above.
[0098] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. Accordingly, the computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can implement the methods of any of the above embodiments. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0099] This embodiment also provides a motor vehicle equipped with a permanent magnet synchronous motor. The permanent magnet synchronous motor undergoes current compensation using the aforementioned current compensation method.
[0100] Alternatively, the motor vehicle may have the aforementioned current compensation system, which compensates the current of the permanent magnet synchronous motor.
[0101] Or the motor vehicle has the aforementioned computer equipment;
[0102] Alternatively, the motor vehicle may have the aforementioned computer-readable storage medium, and the computer program, when executed by a processor, implements the current compensation method described in any of the preceding claims.
[0103] Example 2
[0104] The difference between this embodiment and the current compensation method provided in Embodiment 1 is that, Figure 4 As shown, in this embodiment, the current sampling deviation identification module further includes a second-order generalized integrator, and the adaptive quasi-resonant controller is configured to only detect the d-axis voltage u. d or q-axis voltage u q The AC quantity of the current sampling deviation and its corresponding current compensation are calculated and output. In this embodiment, the input of the second-order generalized integrator is the output of the adaptive quasi-resonant controller, and the output of the second-order generalized integrator is the AC quantity of the current sampling deviation and its corresponding current compensation. ξ is the damping coefficient of the second-order generalized integrator. Preferably, ξ = 1.
[0105] Correspondingly, in the current compensation system provided in this embodiment, the current sampling deviation identification module also includes a second-order generalized integrator, and the adaptive quasi-resonant controller is also provided.
[0106] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Those skilled in the art should understand that the present invention includes, but is not limited to, the contents described in the accompanying drawings and the specific embodiments above. Any modifications that do not depart from the functional and structural principles of the present invention will be included within the scope of the claims.
Claims
1. A current compensation method for compensating for deviations in the sampled current of a permanent magnet synchronous motor, characterized in that, The current compensation method includes the following steps: Obtain three-phase current; Perform a Clarke transform on the three-phase current to obtain the two-phase stationary coordinate system. Sampling deviation of shaft current; right The dq-axis current is subjected to Park transformation to obtain the sampling deviation of the dq-axis current in the synchronous rotating coordinate system; i d_offset = K dq_offset sin( θ e + φ ), i q_offset = K dq_offset cos( θ e + φ ), , , i d_offset This represents the actual sampling deviation of the d-axis current. i q_offset The sampling deviation of the q-axis current is... θ e This refers to the rotor position of the motor; The d-axis voltage reference value and q-axis voltage reference value are obtained by the current regulator; The AC quantity of the current sampling deviation is obtained and compensated by the current sampling deviation identification module; The current sampling deviation identification module includes an adaptive quasi-resonant controller. The inputs of the current sampling deviation identification module are ud*, uq*, and motor speed ωe, where ud* is the reference value of the d-axis voltage ud and uq* is the reference value of the q-axis voltage uq. The adaptive quasi-resonant controller calculates and outputs the AC quantity of the current sampling deviation and its corresponding current compensation quantity. The current sampling deviation of the d-axis current obtained by the current sampling deviation identification module; The current sampling deviation is the q-axis current obtained by the current sampling deviation identification module; the corresponding current compensation amount is... = , ; d-axis current compensation i dc q-axis current compensation i qc d-axis current i d_m q-axis current i q_m d-axis current preset value i d * q-axis current preset value i q *After being superimposed, the voltage is input to a PI current regulator, which then outputs the d-axis voltage. u d preset value u d * and q-axis voltage u q preset value u q * After undergoing Parker inverse transformation, the signal is transmitted to the inverter (2) via space vector pulse width modulation, and then input to the permanent magnet synchronous motor (1).
2. The current compensation method according to claim 1, characterized in that, Obtaining three-phase current involves the following steps: Obtain the sampled current of any two phases, assuming the sampled currents of the two phases are... i a_m and i b_m ; Calculate the sampling current of the third phase using the following formula. i c_m: i a_m =i a +i a_offset i b_m =i b +i b_offset i c_m = -( i a + i b )-( i a_offset + i b_offset ) in, i a , i b and i c These are the actual three-phase currents, i a_offset The sampling deviation of phase A current is... i b_offset This represents the sampling deviation of the B-phase current; Performing the Clarke transformation on the three-phase current, we obtain: i α_m = i a_m =i a +i a_offset i α_offset = i a_offset in, i α_m for α shaft current, i β_m for β shaft current, i α_offset for α Sampling deviation of shaft current, i β_offset for β Sampling deviation of shaft current; Performing the Park transformation on the three-phase current yields: i d_m = i d + i d_offset i q_m = i q + i q_offset in, i d_m For d-axis current, i q_m This is the q-axis current.
3. The current compensation method according to claim 1, characterized in that, The transfer function of the adaptive quasi-resonant controller is: in, s For the Laplace operator, k For resonant gain, ω c The cutoff frequency, ω The resonant frequency is the resonant frequency. ω Equal to motor speed ω e .
4. The current compensation method according to claim 1, characterized in that, The adaptive quasi-resonant controller is provided in one or two ways; The adaptive quasi-resonant controller is configured such that, when a time condition is met, it directly calculates the AC quantity of the dq-axis current sampling deviation from the d-axis voltage or the q-axis voltage and outputs the corresponding current compensation quantity. The adaptive quasi-resonant controller has two states. It simultaneously calculates the AC quantity of the sampling deviation of the dq-axis current from the d-axis voltage and the q-axis voltage, and outputs the corresponding current compensation quantity.
5. The current compensation method according to claim 1, characterized in that, The adaptive quasi-resonant controller has one time step, and the current sampling deviation identification module further includes a second-order generalized integrator. The input of the second-order generalized integrator is the output of the adaptive quasi-resonant controller, and the output of the second-order generalized integrator is the AC quantity of the current sampling deviation.
6. A current compensation system for compensating for deviations in the sampled current of a permanent magnet synchronous motor, characterized in that, The current compensation system performs the current compensation method according to any one of claims 1 to 5.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the current compensation method according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the current compensation method according to any one of claims 1 to 5.
9. A motor vehicle, characterized in that, The motor vehicle has a permanent magnet synchronous motor, and the permanent magnet synchronous motor is current compensated by the current compensation method according to any one of claims 1 to 5; Alternatively, the motor vehicle may have the current compensation system as described in claim 6, wherein the current compensation system performs current compensation on the permanent magnet synchronous motor; Or the motor vehicle may have the computer equipment as described in claim 7; Alternatively, the motor vehicle may have a computer-readable storage medium as described in claim 8, wherein the computer program, when executed by a processor, implements the current compensation method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Energy storage converter dead zone compensation method and device based on quasi-resonance controller
CN112736946A
Periodic error compensation method and device for permanent magnet synchronous motor
CN113131819A