A method for compensating stator current measurement error of permanent magnet synchronous motor
By establishing a software solution that models the scaling error and the reference current, the self-calibration of the stator current measurement error of the permanent magnet synchronous motor is realized. This solves the problem that existing technologies can only compensate for bias errors, and achieves simple and efficient compensation under all operating conditions, thereby improving the reliability and practicality of the system.
Patent Information
- Application Number
- CN202411389226.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2044-10-08
AI Technical Summary
Existing methods for compensating for stator current measurement errors in permanent magnet synchronous motors can only compensate for bias errors, or require accurate motor parameters and stable motor operation to compensate for proportional errors. Moreover, these methods are complex and costly.
By establishing a model between the scaling error and the reference current, a software solution is used to achieve self-calibration of the current measurement error, including steps such as calculating the bias error and proportional error, and performing error compensation through low-pass filtering and integration.
It effectively compensates for bias error and proportional error simultaneously under all operating conditions of the motor, reducing system complexity and cost, improving reliability and practicality, and does not rely on additional hardware support.
Smart Images

Figure CN118889913B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of motor control, and in particular relates to a method for compensating stator current measurement errors of a permanent magnet synchronous motor. Background Art
[0002] Permanent magnet synchronous motor vector control systems are widely used in various fields of production and life. In high-performance permanent magnet synchronous motor vector control systems, accurate measurement of stator current is crucial. However, due to the presence of nonlinear elements in the current measurement circuit, unbalanced current sensor power supply, and thermal drift during operation, current measurement errors are inevitable in permanent magnet synchronous motor drives. Current measurement errors are divided into offset errors and proportional errors, which will cause torque and speed pulsations at one and two times the current frequency. Speed pulsations will have a negative impact on the performance of the motor drive, and in severe cases may cause damage or fatigue to mechanical components. Therefore, in high-performance motor control systems, solving the current measurement error problem is crucial.
[0003] Existing current measurement error compensation methods generally establish a system model, extract the speed or current harmonics caused by the current measurement error, observe the compensation amount of the current measurement error through simulation traversal or with the help of an observer, and then compensate the compensation amount into the current of the two-phase stationary coordinate system or the two-phase rotating coordinate system. Because the bias error and proportional error act on the measured current in different ways, the bias error is equivalent to introducing an independent external disturbance, and the proportional error is equivalent to a distortion on the basis of the original current. Therefore, existing methods can usually only compensate for the bias error, or rely on accurate motor parameters and the stable operation state of the motor to compensate for the proportional error at the same time. In addition, the compensation method is complex to implement and requires high computing power of the control system, which increases the difficulty of deployment and the cost of high-performance hardware. The patent application with publication number CN114268261A provides a method for compensating the DC bias error of the output signal of a rotary transformer, wherein the rotary transformer is connected to a built-in permanent magnet synchronous motor, and the method comprises the following steps: a current acquisition step: acquiring the three-phase current of the built-in permanent magnet synchronous motor, performing a 3 / 2 conversion on the three-phase current, and obtaining the q-axis feedback current; a DC bias error extraction step: inputting the q-axis feedback current into a preset DC bias error extraction module to obtain the DC bias error; an error compensation step: compensating the output signal of the rotary transformer using the DC bias error; a DC bias error extraction module, extracting the DC bias error according to the amplitude of the sine-cosine ripple term in the q-axis feedback current whose frequency is the motor electrical frequency. This patent application can only extract the DC bias error, and cannot compensate for the proportional error, and has the same drawbacks as the prior art.
[0004] Therefore, how to provide a permanent magnet synchronous motor stator current measurement error compensation method that is simple in calculation, low in cost, and can simultaneously compensate for bias error and proportional error is an urgent problem to be solved by personnel in this technical field. Summary of the invention
[0005] In view of the deficiencies in the prior art, the purpose of the present invention is to provide a method for compensating the stator current measurement error of a permanent magnet synchronous motor, so as to solve the problem that the current error compensation method in the prior art can only compensate for the bias error, or needs to rely on accurate motor parameters and the stable operation state of the motor to compensate for the proportional error at the same time, and the calculation is complex and the cost is high.
[0006] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0007] The present invention provides a method for compensating a stator current measurement error of a permanent magnet synchronous motor, comprising the following steps:
[0008] S10, obtaining a measurement current in a two-phase rotating coordinate system according to the received two-phase stator measurement current;
[0009] S20, calculating a second current value according to the d-axis reference current and the measured current in the motor;
[0010] S30, calculating an error current according to the second current value, and extracting a bias error current according to the error current;
[0011] S40, calculating a bias error according to the bias error current;
[0012] S50, performing low-pass filtering operation;
[0013] S60, calculating a bias compensation value according to the bias error;
[0014] S70, extracting a scaling error current according to the error current, and calculating a scaling error compensation value according to the scaling error current and a q-axis reference current in the motor;
[0015] S80, compensate the motor stator measurement current.
[0016] Furthermore, the specific steps of step S10 are as follows:
[0017] S101, according to the received two-phase stator measurement current, add and take the negative to calculate the three-phase stator measurement current;
[0018] S102, multiplying the three-phase stator measurement current by the Park transformation matrix to obtain the two-phase stationary coordinate system current;
[0019] S103. Multiply the two-phase stationary coordinate system current by the Clarke transformation matrix to obtain the two-phase rotating coordinate system current.
[0020] Furthermore, the specific steps of step S20 are as follows:
[0021] S201, according to the preset closed-loop model bandwidth Sum operation cycle , calculate the model denominator coefficient, current state coefficient, historical input state coefficient, and historical output state coefficient;
[0022] S202, calculating a first current value according to a calculation model denominator coefficient, a current state coefficient, a historical input state coefficient, a historical output state coefficient, a d-axis reference current, a historical input, and a historical output;
[0023] S203, subtracting the first current value from the d-axis measured current to obtain a second current value;
[0024] S204 , updating the historical state, assigning the current first current value to the historical output, and assigning the d-axis reference current to the historical input.
[0025] Furthermore, the specific steps of step S30 are as follows:
[0026] S301, integrating the second current value according to a preset closed-loop model bandwidth to obtain a third current value;
[0027] S302, calculating an error current according to the third current value and the second current value;
[0028] S303, according to the input filter center frequency Sum operation cycle , filter cutoff frequency , calculate the denominator coefficient of the filter;
[0029] S304, according to the input filter center frequency and preset filter gains , filter cutoff frequency , Operation cycle And the denominator coefficient, calculate the historical state coefficient and the current state coefficient;
[0030] S305, calculating the output value bias error current of the filter according to the historical state coefficient and the historical state, as well as the current state coefficient and the input error current;
[0031] S306: Update the historical state of the filter, and assign the current filter output value and input value to the historical state value.
[0032] Furthermore, the specific steps of step S40 are as follows:
[0033] S401, multiplying the bias error current by the first bias trigonometric function coefficient obtaining a first bias current;
[0034] S402, executing step S50 with the first bias current as input, and outputting a phase A bias error;
[0035] S403, multiplying the bias error current by the second bias trigonometric function coefficient obtaining a second bias current;
[0036] S404, executing step S50 with the second bias current as input, and outputting a B-phase bias error.
[0037] Furthermore, the specific steps of step S50 are as follows:
[0038] S501, according to the preset low-pass filter coefficient Sum operation cycle , calculate the low-pass filter denominator coefficient, current state filter coefficient, historical input filter coefficient, and historical output filter coefficient;
[0039] S502, calculating the current output according to the low-pass filter denominator coefficient, the current state filter coefficient, the historical input filter coefficient, the historical output filter coefficient, the current input, the historical input, and the historical output;
[0040] S503: Update the historical state of the filter, assign the current output to the historical output, and assign the current input to the historical input.
[0041] Furthermore, the specific steps of step S60 are as follows:
[0042] S601, integrating the A-phase bias error according to a preset integral coefficient to obtain an A-phase bias compensation value;
[0043] S602 : Integrate the B-phase offset error according to a preset integral coefficient to obtain a B-phase offset compensation value.
[0044] Furthermore, the specific steps of step S70 are as follows:
[0045] S701, based on twice the input filter center frequency Sum operation cycle , filter cutoff frequency , calculate the denominator coefficient of the filter;
[0046] S702, based on twice the input filter center frequency and preset filter gains , filter cutoff frequency , operation cycle time and denominator coefficient, and the calculated historical state coefficient and current state coefficient;
[0047] S703, calculating the filter output value scaling error current according to the historical state coefficient and the historical state, as well as the current state coefficient and the input error current;
[0048] S704: Update the historical state of the filter, and assign the current filter output value and input value to the historical state value.
[0049] Furthermore, the specific steps of step S70 also include:
[0050] S705, scaling error current multiplied by scaling trigonometric function coefficient obtaining a first scaled current;
[0051] S706, executing step S50 with the first scaled current as input to obtain a second scaled current;
[0052] S707, dividing the second scaled current by the q-axis reference current to obtain a third scaled current;
[0053] S708 , the third scaling current is negative, and the third scaling current is integrated according to a preset integral coefficient to obtain a scaling error compensation value.
[0054] Furthermore, the specific steps of step S80 also include:
[0055] S801, subtracting the A-phase offset compensation value from the A-phase stator measurement current to obtain a first compensation current, and subtracting the B-phase offset compensation value from the B-phase stator measurement current to obtain a second compensation current;
[0056] S802, multiplying the A-phase stator measurement current by the scaling error compensation value to obtain a third compensation current, and multiplying the B-phase stator measurement current by the scaling error compensation value to obtain a fourth compensation current;
[0057] S803, the first current compensation value is added to the third current compensation value to obtain the compensated A-phase measurement current, and the second compensation current is subtracted from the fourth compensation current to obtain the compensated B-phase measurement current.
[0058] Compared with the prior art, the permanent magnet synchronous motor stator current measurement error compensation method provided by the present invention has at least the following beneficial effects:
[0059] Existing methods can usually only compensate for bias errors, or rely on accurate motor parameters and stable motor operation to compensate for proportional errors at the same time, and the compensation method is complex to implement, and requires high computing power for the control system, which increases the difficulty of deployment and the cost of high-performance hardware. The present invention establishes a model between the scaling error and the reference current, and solves the influence of the current control closed loop, so that the bias error and the proportional error can be effectively compensated at the same time under all working conditions of the motor operation; the error calculation process of the present invention does not require additional hardware circuit support, and the current measurement error self-calibration is realized through the software technical solution, so the method has the advantages of simple and efficient implementation, no dependence on motor parameters, and good robustness; the error compensation process of the present invention is realized by the convergence of the negative feedback structure integrator, so the compensation process is stable, does not affect the dynamic performance of the motor, and does not require the motor to be in a specific stable operation state; the entire invention does not rely on motor parameters, and can effectively compensate for bias errors and proportional errors at the same time under all working conditions of the motor operation, and the calculation is simple, which reduces the system complexity and cost, and improves the reliability and practicality of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the scheme of the present invention, a brief introduction is given below to the figures required for use in the description of the embodiments. Obviously, the figures described below are some embodiments of the present invention. For ordinary technicians in this field, other figures can be obtained based on these figures without paying any creative work.
[0061] Figure 1 A flow chart of a method for compensating stator current measurement errors of a permanent magnet synchronous motor provided by an embodiment of the present invention;
[0062] Figure 2 A schematic diagram of a permanent magnet synchronous motor control system for a permanent magnet synchronous motor stator current measurement error compensation method provided by an embodiment of the present invention;
[0063] Figure 3 A block diagram of a current measurement error compensation scheme of a permanent magnet synchronous motor stator current measurement error compensation method provided by an embodiment of the present invention;
[0064] Figure 4 This is the result of the experiment without compensation;
[0065] Figure 5 A compensation experiment result diagram of a permanent magnet synchronous motor stator current measurement error compensation method provided by an embodiment of the present invention;
[0066] Figure 6 A speed waveform diagram before and after compensation of a permanent magnet synchronous motor stator current measurement error compensation method provided by an embodiment of the present invention;
[0067] Figure 7 A q-axis current waveform diagram before and after compensation of a permanent magnet synchronous motor stator current measurement error compensation method provided by an embodiment of the present invention;
[0068] Figure 8 A d-axis current waveform diagram before and after compensation of a permanent magnet synchronous motor stator current measurement error compensation method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0069] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. The preferred embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive.
[0070] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0071] The present invention provides a permanent magnet synchronous motor stator current measurement error compensation method, which is applied to the measurement process of the stator current in a permanent magnet synchronous motor vector control system. The permanent magnet synchronous motor stator current measurement error compensation method comprises the following steps:
[0072] S10, obtaining a measurement current in a two-phase rotating coordinate system according to the received two-phase stator measurement current;
[0073] S20, calculating a second current value according to the d-axis reference current and the measured current in the motor;
[0074] S30, calculating an error current according to the second current value, and extracting a bias error current according to the error current;
[0075] S40, calculating a bias error according to the bias error current;
[0076] S50, performing low-pass filtering operation;
[0077] S60, calculating a bias compensation value according to the bias error;
[0078] S70, extracting a scaling error current according to the error current, and calculating a scaling error compensation value according to the scaling error current and a q-axis reference current in the motor;
[0079] S80, compensate the motor stator measurement current.
[0080] The present invention can effectively and simultaneously compensate for the bias error and the proportional error under all operating conditions of the motor, thereby reducing system complexity and cost and improving system reliability and practicability.
[0081] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings.
[0082] The present invention provides a permanent magnet synchronous motor stator current measurement error compensation method, which is applied to the stator current measurement process in the permanent magnet synchronous motor vector control system. Figures 1 to 8 In this embodiment, the permanent magnet synchronous motor stator current measurement error compensation method includes the following steps:
[0083] S10, obtaining a measurement current in a two-phase rotating coordinate system according to the received two-phase stator measurement current;
[0084] Specifically, in this embodiment, the specific steps of step S10 are as follows:
[0085] S101, calculating the third-phase stator current by adding the two-phase stator measurement currents received and taking the negative thereof;
[0086] S102, multiplying the three-phase stator measurement current by the Park transformation matrix to obtain the two-phase stationary coordinate system current;
[0087] S103. Multiply the two-phase stationary coordinate system current by the Clarke transformation matrix to obtain the two-phase rotating coordinate system current.
[0088] S20, calculating a second current value according to the d-axis reference current and the measured current in the motor;
[0089] Specifically, in this embodiment, the specific steps of step S220 are as follows:
[0090] S201, according to the preset closed-loop model bandwidth Sum operation cycle , calculate the model denominator coefficient, current state coefficient, historical input state coefficient, and historical output state coefficient;
[0091] S202, calculating a first current value according to a calculation model denominator coefficient, a current state coefficient, a historical input state coefficient, a historical output state coefficient, a d-axis reference current, a historical input, and a historical output;
[0092] S203, subtracting the first current value from the d-axis measured current to obtain a second current value;
[0093] S204 , updating the historical state, assigning the current first current value to the historical output, and assigning the d-axis reference current to the historical input.
[0094] Furthermore, in this embodiment, the second current value is calculated by the following formula:
[0095]
[0096] in, is the second current value, is the first current value, i d_s is the d-axis measurement current, s is the operation cycle time, is the d-axis reference current, is a discrete sequence of symbols.
[0097] S30, calculating an error current according to the second current value, and extracting a bias error current according to the error current;
[0098] Specifically, in this embodiment, the specific steps of step S30 are as follows:
[0099] S301, integrating the second current value according to a preset closed-loop model bandwidth to obtain a third current value;
[0100] S302, calculating an error current according to the third current value and the second current value;
[0101] Specifically, the calculation formula is as follows:
[0102]
[0103] Among them, out3 is the third current value, △i d is the error current.
[0104] S303, according to the input filter center frequency Sum operation cycle , filter cutoff frequency , calculate the denominator coefficient of the filter;
[0105] S304: According to the input filter center frequency and the preset filter gain , filter cutoff frequency , operation cycle time and denominator coefficient, and the calculated historical state coefficient and current state coefficient;
[0106] S305, calculating the output value bias error current of the filter according to the historical state coefficient and the historical state, as well as the current state coefficient and the input error current;
[0107] S306, updating the historical state of the filter, assigning the current filter output value and input value to the historical state value;
[0108] Specifically, the bias error current is calculated by:
[0109]
[0110] in is the bias error current, ω e is the denominator coefficient.
[0111] S40, calculating a bias error according to the bias error current;
[0112] Specifically, in this embodiment, the specific steps of step S40 are as follows:
[0113] S401, multiplying the bias error current by the first bias trigonometric function coefficient obtaining a first bias current;
[0114] S402, executing step S50 with the first bias current as input, and outputting a phase A bias error;
[0115] S403, multiplying the bias error current by the second bias trigonometric function coefficient obtaining a second bias current;
[0116] S404, executing step S50 with the second bias current as input, and outputting a B-phase bias error.
[0117] S50, performing low-pass filtering operation;
[0118] Specifically, in this embodiment, the specific steps of step S50 are as follows:
[0119] S501, according to the preset low-pass filter coefficient Sum operation cycle , calculate the low-pass filter denominator coefficient, current state filter coefficient, historical input filter coefficient, and historical output filter coefficient;
[0120] S502, calculating the current output according to the low-pass filter denominator coefficient, the current state filter coefficient, the historical input filter coefficient, the historical output filter coefficient and the current input, the historical input, and the historical output;
[0121] S503, updating the historical state of the filter, assigning the current output to the historical output, and assigning the current input to the historical input;
[0122] Specifically, it is calculated as follows:
[0123]
[0124] Among them, out is the current output and in is the current input.
[0125] S60, calculating a bias compensation value according to the bias error;
[0126] Specifically, in this embodiment, the specific steps of step S60 are as follows:
[0127] S601, integrating the A-phase bias error according to a preset integral coefficient to obtain an A-phase bias compensation value;
[0128] S602 : Integrate the B-phase offset error according to a preset integral coefficient to obtain a B-phase offset compensation value.
[0129] S70, extracting a scaling error current according to the error current, and calculating a scaling error compensation value according to the scaling error current and a q-axis reference current in the motor;
[0130] Specifically, in this embodiment, the specific steps of step S70 are as follows:
[0131] S701, based on twice the input filter center frequency Sum operation cycle , filter cutoff frequency , calculate the denominator coefficient of the filter;
[0132] S702, based on twice the input filter center frequency and preset filter gains , filter cutoff frequency , operation cycle time and denominator coefficient, and the calculated historical state coefficient and current state coefficient;
[0133] S703, calculating the output value scaling error current of the filter according to the historical state coefficient and the historical state, as well as the current state coefficient and the input error current;
[0134] S704: Update the historical state of the filter, and assign the current filter output value and input value to the historical state value;
[0135] Specifically, the scaled error current is calculated by:
[0136]
[0137] in is the scaled error current;
[0138] S705, scaling error current multiplied by scaling trigonometric function coefficient obtaining a first scaled current;
[0139] S706, executing step S50 with the first scaled current as input to obtain a second scaled current;
[0140] S707, dividing the second scaled current by the q-axis reference current to obtain a third scaled current;
[0141] S708. Negate the third scaling current and integrate it according to a preset integral coefficient to obtain a scaling error compensation value.
[0142] S80, compensate the motor stator measurement current.
[0143] Specifically, in this embodiment, the specific steps of step S80 are as follows:
[0144] S801, subtracting the A-phase offset compensation value from the A-phase stator measurement current to obtain a first compensation current, and subtracting the B-phase offset compensation value from the B-phase stator measurement current to obtain a second compensation current;
[0145] S802, multiplying the A-phase stator measurement current by the scaling error compensation value to obtain a third compensation current, and multiplying the B-phase stator measurement current by the scaling error compensation value to obtain a fourth compensation current;
[0146] S803, add the third current compensation value to the first current compensation value to obtain the compensated A-phase measurement current, and subtract the fourth compensation current from the second compensation current to obtain the compensated B-phase measurement current;
[0147] Specifically, it is calculated by the following formula:
[0148]
[0149] in is the compensated A-phase measured current, is the compensated B-phase measured current, is the first compensation current, is the second compensation current, is the third compensation current, is the fourth compensation current, is the measured current of phase A, is the B phase measured current, is the A phase offset compensation value, is the B phase bias compensation value, is the scaling compensation value.
[0150] The permanent magnet synchronous motor stator current measurement error compensation method provided by the embodiment of the present invention is tested on a permanent magnet synchronous motor drive platform based on TI TMS320F28335 DSP. The motor parameters are shown in Table 1:
[0151] Table 1
[0152] parameter Rated Power 0.42kW Rated voltage 14V Rated current 30A Stator resistance 0.017Ω Stator inductance 0.015mH Permanent magnet flux 0.0072Wb Pole pairs 5
[0153] The control scheme of the permanent magnet synchronous motor drive system is as follows Figure 2As shown in the figure, the control system adopts double closed-loop control of speed outer loop and current inner loop. The d-axis current is considered as a given constant, the orientation angle is given by the encoder, and the speed is obtained by the encoder angle calculation. The SVPWM modulation method is adopted. The current measurement link of the current measurement error compensation scheme uses two Hall sensors to measure the current of phase A and phase B. The current measurement error is artificially injected into the simulation experiment. The block diagram of the current measurement error compensation scheme is shown in the figure. Figure 3 As shown; Figure 4 and Figure 5 The following are the comparison diagrams of the current waveforms of phase A and phase B without compensation and with compensation using this solution. It can be found that the current imbalance caused by the current measurement error is effectively eliminated after compensation. Figure 6 The waveform diagram of the rotation speed before and after compensation; Figure 7 and Figure 8 For the waveform diagram of the q-axis and d-axis currents before and after compensation, it can be found that the speed and current ripple caused by the current measurement error are effectively eliminated under various working conditions.
[0154] The permanent magnet synchronous motor stator current measurement error compensation method described in the above embodiment, compared with the prior art, the existing method can usually only compensate for the bias error, or it is necessary to rely on accurate motor parameters and the stable operation state of the motor to compensate for the proportional error at the same time, and the compensation method is complex to implement, and the control system computing power is high, which increases the deployment difficulty and the cost of high-performance hardware. The present invention establishes a model between the scaling error and the reference current, and solves the influence of the current control closed loop, so the bias error and the proportional error can be effectively compensated at the same time under the full working conditions of the motor operation; the error calculation process of the present invention does not require additional hardware circuit support, and the current measurement error self-calibration is realized through the software technical solution, so the method has the advantages of simple and efficient implementation, no dependence on motor parameters, and good robustness; the error compensation process of the present invention is realized by the convergence of the negative feedback structure integrator, so the compensation process is stable, does not affect the dynamic performance of the motor, and does not require the motor to be in a specific stable operation state; the whole invention does not rely on the motor parameters, and can effectively compensate for the bias error and the proportional error at the same time under the full working conditions of the motor operation, and the calculation is simple, which reduces the system complexity and cost, and improves the reliability and practicality of the system.
[0155] Obviously, the embodiments described above are only preferred embodiments of the present invention, rather than all embodiments. The preferred embodiments of the present invention are shown in the accompanying drawings, but they do not limit the patent scope of the present invention. The present invention can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive. Although the present invention has been described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific embodiments, or to perform equivalent replacements for some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of the present invention, directly or indirectly used in other related technical fields, is also within the scope of patent protection of the present invention.
Claims
1. A method for compensating stator current measurement error of a permanent magnet synchronous motor, characterized in that: The following steps are involved: S10, obtaining a measurement current in a two-phase rotating coordinate system according to the received two-phase stator measurement current; S20, calculating a second current value according to the d-axis reference current and the measured current in the motor; The specific steps of step S20 are as follows: S201, according to the preset closed-loop model bandwidth Sum operation cycle , calculate the model denominator coefficient, current state coefficient, historical input state coefficient, and historical output state coefficient; S202, calculating a first current value according to a calculation model denominator coefficient, a current state coefficient, a historical input state coefficient, a historical output state coefficient, a d-axis reference current, a historical input, and a historical output; S203, subtracting the first current value from the d-axis measured current to obtain a second current value; S204, updating the history state, assigning the current first current value to the history output, and assigning the d-axis reference current to the history input; The second current value is calculated by the following formula: ; in, is the second current value, is the first current value, i d_s is the d-axis measurement current, s is the operation cycle time, is the d-axis reference current, is a discrete sequence symbol; S30, calculating an error current according to the second current value, and extracting a bias error current according to the error current; The specific steps of step S30 are as follows: S301, integrating the second current value according to a preset closed-loop model bandwidth to obtain a third current value; S302, calculating an error current according to the third current value and the second current value; The calculation formula is as follows: ; Among them, out3 is the third current value, △i d is the error current; S303, according to the input filter center frequency Sum operation cycle , filter cutoff frequency , calculate the denominator coefficient of the filter; S304, according to the input filter center frequency and preset filter gains , filter cutoff frequency , Operation cycle And the denominator coefficient, calculate the historical state coefficient and the current state coefficient; S305, calculating the output value bias error current of the filter according to the historical state coefficient and the historical state, as well as the current state coefficient and the input error current; S306, updating the historical state of the filter, assigning the current filter output value and input value to the historical state value; The bias error current is calculated by the following formula: ; in is the bias error current, ω e is the denominator coefficient; S40, calculating a bias error according to the bias error current; The specific steps of step S40 are as follows: S401, multiply the bias error current by the first bias trigonometric function coefficient obtaining a first bias current; S402, executing step S50 with the first bias current as input, and outputting a phase A bias error; S403, multiplying the bias error current by the second bias trigonometric function coefficient obtaining a second bias current; S404, executing step S50 with the second bias current as input, and outputting a B-phase bias error; S50, performing low-pass filtering operation; S60, calculating a bias compensation value according to the bias error; The specific steps of step S60 are as follows: S601, integrating the A-phase bias error according to a preset integral coefficient to obtain an A-phase bias compensation value; S602, integrating the B-phase bias error according to a preset integral coefficient to obtain a B-phase bias compensation value; S70, extracting a scaling error current according to the error current, and calculating a scaling error compensation value according to the scaling error current and a q-axis reference current in the motor; The specific steps of step S70 are as follows: S701, based on twice the input filter center frequency Sum operation cycle , filter cutoff frequency , calculate the denominator coefficient of the filter; S702, based on twice the input filter center frequency and preset filter gains , filter cutoff frequency , operation cycle time and denominator coefficient, and the calculated historical state coefficient and current state coefficient; S703, calculating the filter output value scaling error current according to the historical state coefficient and the historical state, as well as the current state coefficient and the input error current; S704, updating the historical state of the filter, assigning the current filter output value and input value to the historical state value; The scaled error current is calculated by the following equation: ; in is the scaled error current; S705, scaling error current multiplied by scaling trigonometric function coefficient obtaining a first scaled current; S706, executing step S50 with the first scaled current as input to obtain a second scaled current; S707, dividing the second scaled current by the q-axis reference current to obtain a third scaled current; S708, the third scaling current is negative, and the third scaling current is integrated according to a preset integral coefficient to obtain a scaling error compensation value; S80, compensating the motor stator measurement current; The specific steps of step S80 also include: S801, subtracting the A-phase offset compensation value from the A-phase stator measurement current to obtain a first compensation current, and subtracting the B-phase offset compensation value from the B-phase stator measurement current to obtain a second compensation current; S802, multiplying the A-phase stator measurement current by the scaling error compensation value to obtain a third compensation current, and multiplying the B-phase stator measurement current by the scaling error compensation value to obtain a fourth compensation current; S803, the first current compensation value is added to the third current compensation value to obtain the compensated A-phase measurement current, and the second compensation current is subtracted from the fourth compensation current to obtain the compensated B-phase measurement current; Calculated by the following formula: ; in is the compensated A-phase measured current, is the compensated B-phase measured current, is the first compensation current, is the second compensation current, is the third compensation current, is the fourth compensation current, is the measured current of phase A, is the B phase measured current, is the A phase bias compensation value, is the B phase bias compensation value, is the scaling compensation value.
2. A permanent magnet synchronous motor stator current measurement error compensation method according to claim 1, characterized in that: The specific steps of step S10 are as follows: S101, according to the received two-phase stator measurement current, add and take the negative to calculate the three-phase stator measurement current; S102, multiplying the three-phase stator measurement current by the Park transformation matrix to obtain the two-phase stationary coordinate system current; S103. Multiply the two-phase stationary coordinate system current by the Clarke transformation matrix to obtain the two-phase rotating coordinate system current.
3. A permanent magnet synchronous motor stator current measurement error compensation method according to claim 1, characterized in that: The specific steps of step S50 are as follows: S501, according to the preset low-pass filter coefficient Sum operation cycle , calculate the low-pass filter denominator coefficient, current state filter coefficient, historical input filter coefficient, and historical output filter coefficient; S502, calculating the current output according to the low-pass filter denominator coefficient, the current state filter coefficient, the historical input filter coefficient, the historical output filter coefficient, the current input, the historical input, and the historical output; S503, updating the historical state of the filter, assigning the current output to the historical output, and assigning the current input to the historical input; Calculated as follows: ; Among them, out is the current output and in is the current input.
Citation Information
Patent Citations
Method for compensating direct current bias error of output signal of rotary transformer
CN114268261A
Permanent magnet synchronous motor system based on measurement error compensator and compensation method
CN109560741A
Permanent magnet synchronous motor vector control method and device and storage medium
CN112271970A