Motor sampling current bias error compensation method and motor control method and system
By acquiring the current bias error of the permanent magnet synchronous motor in open-loop mode and compensating it with a PI regulator, the problem of motor sampling current bias error in the steer-by-wire system is solved, improving control accuracy and driving experience while reducing hardware resource consumption.
Patent Information
- Application Number
- CN202511851814.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-10
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2045-12-10
AI Technical Summary
Existing technologies cannot effectively solve the sampling current bias error problem of permanent magnet synchronous motors in steer-by-wire systems, resulting in low motor control accuracy and affecting driving experience and system stability.
The current bias error of the permanent magnet synchronous motor is obtained in open-loop condition. The current measurement values of the α-axis and β-axis are compensated by a PI-type regulator. Combined with dual-resistance sampling technology, the current measurement values are further compensated by a pre-designed PI-type regulator to eliminate the inherent sampling error of the system.
It improves motor control precision, reduces motor noise, enhances driver road feel feedback, and lowers hardware resource costs, making it suitable for steer-by-wire systems and special vehicle steering systems.
Smart Images

Figure CN121283296A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of motor control technology, and in particular to a method for compensating for motor sampling current bias error, a motor control method, and a system. Background Technology
[0002] Steer-by-Wire (SBW) is an advanced steering technology that completely eliminates the mechanical coupling between the steering wheel and steering wheels in traditional steering systems. It achieves closed-loop control of the "human-machine interface - domain controller - steering actuator motor" entirely through electrical signals, thus giving unprecedented freedom in vehicle layout, driving style customization, passive safety, and functional safety.
[0003] The SBW system has the following advantages: (1) Greater design freedom: the steering wheel and steering actuator can be flexibly arranged to adapt to the needs of different vehicle models (such as autonomous vehicles, skateboard chassis, etc.); (2) Better driving experience: the steering ratio and road feel feedback can be dynamically adjusted to improve the handling comfort; (3) Enhanced safety: it supports redundant design to avoid steering failure caused by mechanical failure.
[0004] However, the core of the SBW system relies on high-precision motor control, and the accuracy of current sampling directly affects the torque output of the steering motor and the system stability. Current bias error compensation is a necessary step in the control of permanent magnet synchronous motors (PMSMs). Its main purpose is to reduce torque fluctuations within an electrical angle cycle, thereby reducing speed fluctuations and improving control smoothness. For example, in new energy vehicle steer-by-wire systems, it reduces the gritty feeling of slow steering wheel turns. In CNC machine tools, servo systems achieve smoother rotation and more precise stroke control.
[0005] In a steer-by-wire system, the motor current sampling stage directly determines the torque control accuracy, noise level, and road feel transparency, making it one of the key control factors. For example, under low-speed, light-load, and steady-state conditions, a motor sampling current error manifests as a DC bias in the dq-axis current, introducing a bias torque. This torque, amplified by the reducer, generates an additional force at the steering wheel, causing issues such as zero-position drift, stickiness, and high-frequency vibration. Error compensation for the motor's sampling current is typically required to ensure accurate motor control.
[0006] Existing technologies have conducted extensive research on the compensation design of motor sampling current. For example, Chinese patent application CN114268261A inputs the q-axis feedback current into a preset DC bias error extraction module to obtain the DC bias error, and uses this DC bias error to compensate the output signal of the resolver. This technical solution only considers the DC bias error and cannot compensate for the proportional error. Chinese patent application CN118889913A, based on Chinese patent application CN114268261A, establishes a model between the scaling error and the reference current, and uses this model to simultaneously compensate for the bias error and proportional error in closed-loop control.
[0007] Currently, the error compensation methods for the sampling current of the steering-by-wire motor are generally as described in the aforementioned patent application. In closed-loop control, a low-pass filter or a lead-lag compensator is used to compensate for the current measurement error in order to minimize the hand torque fluctuations perceived by the user on the steering wheel caused by the fluctuations in the motor output current. Therefore, the existing current measurement error compensation methods cannot solve the problem of bias error in the sampling current of the motor from the root of the system.
[0008] The above background information is provided only to assist in understanding the inventive concept and technical solution of this invention. It does not necessarily belong to the prior art of this application, nor does it necessarily provide technical teaching. In the absence of clear evidence that the above information was disclosed before the filing date of this application, the above background information should not be used to evaluate the novelty and inventiveness of this application. Summary of the Invention
[0009] The purpose of this invention is to provide a method for compensating for the sampling current bias error of a motor, a motor control method, and a system. This invention can eliminate the inherent sampling current bias error of the system, achieve high-precision compensation for the sampling current bias error of a permanent magnet synchronous motor at a lower cost, and thus improve the control accuracy of the permanent magnet synchronous motor.
[0010] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A method for compensating for bias error in motor sampling current includes the following steps: The control system of the permanent magnet synchronous motor (hereinafter referred to as the motor) is pre-configured to an open-loop state to obtain the first current bias error of the permanent magnet synchronous motor, wherein the first current bias error includes at least the current bias error of phase A. i Aoffset Current bias error of phase C i Coffset ; In the closed-loop state of the control system, the permanent magnet synchronous motor is obtained. α shaft and βThe current measurement value of the shaft, and using the first current bias error to determine the... α shaft and β The shaft current measurement value is compensated to obtain the compensated value. α Shaft current measurement value i αmeasure and β Shaft current measurement value i βmeasure ; Using a pre-designed PI controller α Shaft current measurement value i αmeasure and β Shaft current measurement value i βmeasure Perform error compensation.
[0011] Furthermore, following any one or a combination of the aforementioned technical solutions, a pre-designed PI-type regulator is used to control the... α Shaft current measurement value i αmeasure and β Shaft current measurement value i βmeasure Perform error compensation: ;
[0012] in, i αmeasure yes α The current measurement value of the shaft. i βmeasure yes β The current measurement value of the shaft. yes α Estimated current value of the shaft. yes β Estimated current value of the shaft. yes α The estimated current bias error value of the shaft. yes β The estimated current bias error value of the shaft. To estimate the resistance of the motor, K p It is proportional gain. K i It is integral gain. S It is a complex variable.
[0013] Furthermore, based on any one or a combination of the aforementioned technical solutions, and The relationship between them is expressed as follows:
[0014] in, yes α The estimated voltage of the shaft. yes β The estimated voltage of the shaft. yes α The feedback flux linkage value of the shaft, yes β The feedback flux linkage value of the shaft, To estimate the inductance of the motor, This is for estimating the resistance of the motor.
[0015] Furthermore, based on any one or a combination of the aforementioned technical solutions, the proportional gain... K p With integral gain K i The selection is as follows: ;
[0016] in, To estimate the inductance of the motor, To estimate the resistance of the motor, ωc This refers to the bandwidth of the PI controller.
[0017] Furthermore, following any one or a combination of the aforementioned technical solutions, in the open-loop state of the control system, the first current bias error of the permanent magnet synchronous motor is obtained based on dual-resistor sampling using the following formula: ; in, i Ameasure This is the measured value of phase A current in open-loop condition. i Cmeasure This is the measured value of phase C current in open-loop condition. i Aoffset This refers to the current bias error of phase A in the open-loop state. i Coffset This represents the current bias error of phase C in the open-loop state.
[0018] Furthermore, following any one or a combination of the aforementioned technical solutions, in the closed-loop state of the control system, based on dual-resistance sampling, the measured values of the A and C phase currents are compensated using the following formula to obtain the compensated measured values of the A and C phase currents. i Ameasure and i Cmeasure : i Ameasure = i A_measure - i Aoffset ,i Ameasure = i A_measure - i Aoffset ,in, i A_measure The measured current value of phase A before compensation. i C_measure The measured current value of phase C before compensation; Based on the compensated A and C phase current measurements i Ameasure and i Cmeasure After determining compensation α Shaft current measurement value i αmeasure and β Shaft current measurement value i βmeasure .
[0019] Furthermore, following any one or a combination of the aforementioned technical solutions, the method further includes the following steps: The first current bias error is acquired and stored in advance; During the closed-loop control process, the first current bias error is acquired in real time, and the current measurement value is compensated using the first current bias error to obtain the compensated current measurement value.
[0020] Furthermore, by adopting any one or a combination of the aforementioned technical solutions, the first current bias error of the permanent magnet synchronous motor is obtained, including the following steps: The control system of the permanent magnet synchronous motor is configured in an open-loop state, and the current measurement value of the permanent magnet synchronous motor is collected. The real-time acquired current measurement values are filtered to obtain the current filtered value; The average value of the current filter value within a preset time period after the control system is configured to open-loop state is taken as the first current bias error.
[0021] Furthermore, following any or a combination of the aforementioned technical solutions, the current of the control system is sampled using dual-resistance sampling, and the A-phase current measurement value and the C-phase current measurement value are collected after the control system of the permanent magnet synchronous motor is configured in an open-loop state. The real-time acquired current measurement values of phase A and phase C are filtered to obtain the current filtered values of phase A and phase C. The current filter value of phase A within a preset time period after the control system is configured into open-loop state is taken as the current bias error of phase A. i Aoffset ; The current filter value of phase C within a preset time period after the control system is configured into open-loop state is taken as the current bias error of phase C. i Coffset .
[0022] Furthermore, following any one or a combination of the aforementioned technical solutions, the permanent magnet synchronous motor is configured as a steerable-by-wire motor; and / or, The preset time period is 1.5s to 2s after the control system is configured to open-loop state.
[0023] According to another aspect of the present invention, the present invention provides a control method for a permanent magnet synchronous motor, which controls the operating state of the permanent magnet synchronous motor based on the motor sampling current bias error compensation method described in any one or a combination of the above technical solutions.
[0024] According to another aspect of the present invention, the present invention provides a permanent magnet synchronous motor control system, which controls the working state of the permanent magnet synchronous motor based on the control method of the permanent magnet synchronous motor described in any one or a combination of the above technical solutions.
[0025] The beneficial effects of the technical solution provided by this invention are as follows: a. This invention obtains the first current bias error of the permanent magnet synchronous motor by coarsely scaling the control system of the permanent magnet synchronous motor in the open-loop state. In the closed-loop control of the control system, the first current bias error is first used to compensate the current measurement value of the motor obtained by real-time sampling. Then, a pre-designed PI type regulator is used to further compensate the compensated current measurement value, thereby improving the compensation accuracy of the sampling current bias error of the motor and improving the control accuracy of the motor. b. The motor sampling current bias error compensation method provided by the present invention uses a PI type regulator to adjust the sampling current bias error of the closed-loop control of the permanent magnet synchronous motor. The PI type regulator does not occupy hardware resources, has low cost, strong adjustability, and is also convenient for platform porting. c. The motor sampling current bias error compensation method provided by the present invention is based on two-phase resistance sampling, which can not only achieve high-precision compensation for the sampling current bias error of permanent magnet synchronous motor at low cost, but is also particularly suitable for improving the control performance of steering systems for steer-by-wire systems and steering systems of special vehicles such as unmanned logistics vehicles, reducing motor noise and improving the driver's road feel feedback. d. The present invention determines the first current bias error by using the current filter value within a preset time period after the control system is set to open-loop state, which can improve the accuracy of determining the fixed bias error of the system sampling current. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 A schematic diagram of a control system for a permanent magnet synchronous motor provided as an exemplary embodiment of the present invention; Figure 2 A flowchart of a motor sampling current bias error compensation method provided as an exemplary embodiment of the present invention; Figure 3 A schematic diagram of a PI filter type current measurement bias error compensation controller provided as an exemplary embodiment of the present invention; Figure 4 A flowchart of sampling current bias error compensation for open-loop mode of a steer-by-wire motor is provided as an exemplary embodiment of the present invention. Figure 5 A schematic diagram of a Simulink model of a PI filter-type current bias error compensation regulator provided as an exemplary embodiment of the present invention; Figure 6 A comparison diagram of the A-phase current of the steer-by-wire motor before and after compensation, provided as an exemplary embodiment of the present invention; Figure 7 A comparison diagram of the B-phase current of the steer-by-wire motor before and after compensation, provided as an exemplary embodiment of the present invention; Figure 8 A comparison diagram of the C-phase current of the steer-by-wire motor before and after compensation, provided as an exemplary embodiment of the present invention; Figure 9 A schematic diagram of the electrical angle and torque pulsation of the front steering motor provided as an exemplary embodiment of the present invention; Figure 10 A schematic diagram of the electrical angle and torque pulsation of a compensated steer-by-wire motor provided as an exemplary embodiment of the present invention. Detailed Implementation
[0028] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0029] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, apparatus, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0030] like Figure 1 As shown, in FOC control, the outer loop is the angle / speed loop, and the innermost loop is the current loop. The current loop is the most crucial component of the entire closed-loop control, affecting the stability and responsiveness of the entire motor system. The performance of the current loop depends not only on the algorithm used but also on the basic current sampling accuracy and angle sampling accuracy. With technological advancements, some applications of permanent magnet synchronous motors (PMSMs) employ positionless control, making current sampling accuracy paramount in these scenarios.
[0031] Currently, mainstream motor current sampling methods are divided into high-side sampling and low-side sampling. High-side sampling places the current sensor directly on the three-phase bridge arm, and the software does not need to perform current reconstruction, directly acquiring the phase current. The advantage of high-side sampling is its simplicity of use, but its cost is higher.
[0032] Low-end sampling is the preferred solution for most motor controls, and it is generally divided into single-resistor sampling, dual-resistor sampling, and three-resistor sampling. Single-resistor sampling, also known as bus current sampling, is easily affected by the inverter switching state, and may fail to obtain valid values under certain duty cycles. Therefore, it is necessary to sample at least twice within one cycle for current reconstruction. The advantage of low-end sampling is its low cost, but its algorithm implementation is complex.
[0033] The principle of dual-resistor sampling is the same as that of three-resistor sampling. A sampling resistor is placed in the lower bridge arm, and sampling is performed at the moment the lower transistor is turned on. Furthermore, dual-resistor sampling is less expensive than three-resistor sampling, and the algorithm is simpler to implement. Dual-resistor sampling simply follows the principle that the sum of the three-phase currents must be zero.
[0034] Taking dual-resistor sampling as an example, in ADC hardware amplification devices with an output voltage range of 0~5V, a zero-current bias error exists. Under normal circumstances, an output voltage of 2.5V corresponds to zero current, greater than 2.5V corresponds to a positive phase current, and less than 2.5V corresponds to a negative phase current. The output of the ADC hardware amplification device corresponds to 2...12 A 0-4096 bit ADC value represents zero current, with 2048 being the zero current value. However, hardware layout, thermal drift, and other factors mean that zero current cannot be the ideal 2048, resulting in bias errors. This causes the converted phase current to not fluctuate around zero but instead have an initial value, leading to a persistent first harmonic in the d / q current. Attempting to suppress this harmonic in the current loop using harmonic compensation only makes the feedback current appear to disappear; it is actually always present in the data, affecting the accuracy of motor control and the motor's performance.
[0035] Based on the above shortcomings, this application proposes a method for compensating for motor sampling current bias error, see [link to relevant documentation]. Figure 1 and Figure 2 The method includes the following steps: The control system of the permanent magnet synchronous motor is pre-configured to an open-loop state to obtain the first current bias error of the permanent magnet synchronous motor. The first current bias error includes at least the current bias error of phase A. i Aoffset Current bias error of phase C i Coffset ; In the closed-loop state of the control system, the permanent magnet synchronous motor is obtained. α shaft and β The current measurement value of the shaft, and using the first current bias error to determine the... α shaft and β The shaft current measurement value is compensated to obtain the compensated value. α Shaft current measurement value i αmeasure and β Shaft current measurement value i βmeasure ; Using a pre-designed PI controller α Shaft current measurement value i αmeasure and β Shaft current measurement value i βmeasure Perform error compensation.
[0036] In this embodiment, coarse calibration is first performed in the open-loop state of the PMSM control system, based on the measured values of the A and C phase currents of the motor control system. i Ameasure , i Cmeasure A and C phase current bias error i Aoffset , i Coffset Actual values of phase A and phase C currents i Aactual ,i Cactual Satisfy the following formula: .
[0037] Acquire A / C two-phase current measurement values i Ameasure , i Cmeasure When the commanded D / Q voltage is 0, i Aactual and i Cactual The value is 0, but there is actually a current bias error. i Aoffset , i Coffset Therefore, the first current bias error in the open-loop state can be obtained based on the current measurement value, as shown in the following formula.
[0038] ;
[0039] in, i Ameasure This is the measured value of phase A current in open-loop condition. i Cmeasure This is the measured value of phase C current in open-loop condition. i Aoffset This refers to the current bias error of phase A in the open-loop state. i Coffset This represents the C-phase current bias error in the open-loop state.
[0040] In one embodiment of the present invention, the current measurement value in the open-loop state of the system is... i Ameasure , i Cmeasure Filter the current to obtain a smoothed value. Then assign this current value as a storage value to... i Aoffset , i Coffset This is used to remove the current bias error introduced by system sampling. The first current bias error obtained in the open-loop state is a fixed value, which can be used to compensate for the fixed sampling error of the system, but cannot compensate for the error at each speed range.
[0041] In this embodiment, a compensation algorithm is further used in the closed-loop control of the motor's output current to adjust the current in the rotating coordinate system. α / β The shaft current is compensated to make the three-phase current smooth. The closed-loop control principle of the PMSM control system is as follows.
[0042] If there is a current measurement error, the obtained A / C current will contain an offset value, which will be converted to...α / β Shaft current measurement value, three-phase current to α axis, β The formula for converting shaft current is as follows:
[0043] in, i α yes α shaft current, i β yes β shaft current, i A , i B , i C It is a three-phase current. i A + i B + i C =0.
[0044] In closed-loop control, the first current bias error obtained during the open-loop process is used. i Aoffset , i Coffset In the closed-loop state of the motor control system, based on dual-resistor sampling, the measured values of phase A and phase C currents are compensated using the following formula to obtain the compensated measured values of phase A and phase C currents. i Ameasure and i Cmeasure : i Ameasure = i A_measure - i Aoffset , i Ameasure = i A_measure - i Aoffset ,in, i A_measure The measured current value of phase A before compensation. i C_measure The current measurement value of phase C before compensation is the current measurement value of phase A and phase C of the permanent magnet synchronous motor, which is collected in real time during the closed-loop control process. Based on the current measurement values of phase A and phase C after compensation... i Ameasure and i Cmeasure After determining compensation α Shaft current measurement value iαmeasure and β Shaft current measurement value i βmeasure Existing methods for compensating for motor current bias error typically involve directly compensating the acquired current measurement value. This application, however, first performs fixed bias error compensation on the real-time acquired current measurement value, and then further compensates the compensated current measurement value. This not only eliminates the inherent current sampling error of the system but also improves the accuracy of subsequent closed-loop compensation. It should be noted that the measured values in the closed-loop control refer to the measured values after eliminating the inherent sampling error of the system.
[0045] Based on the above three-phase current to α axis, β The formula for converting shaft current is obtained using the compensated current measurements of phases A and C. α shaft and β The expression for the shaft current measurement value is as follows: ;
[0046] in, i αmeasure , i βmeasure yes α shaft and β The current measurement value of the shaft. i Ameasure , i Bmeasure and i Cmeasure These are the current measurements of phases A, B, and C after compensation.
[0047] Furthermore, the following relationship exists between the compensated current measurements and actual current values of phases A and C under closed-loop conditions: ;
[0048] in, i αmeasure , i βmeasure yes α shaft and β The shaft current measurement value (obtained based on the compensated current measurement values of phases A and C). i α_actual and i β_actual yes α shaft and β The actual current value of the shaft, i αoffset and i βoffset yes α shaft and βShaft current bias error value, i A_offset It is the A-phase current bias error in the closed-loop state. i C_offset It is the A-phase current bias error in the closed-loop state. i A_offset and i C_offset It is configured as the second current bias error.
[0049] The AC quantity is converted to d / q axis current, and the transformation relationship is as follows:
[0050] in, i dmeasure , i qmeasure yes d shaft and q The current measurement value of the shaft. i d_actual and i q_actual yes d shaft and q The actual current value of the shaft, i d_offset and i q_offset yes d shaft and q Shaft current bias error value, k yes d shaft and q The amplitude of the shaft current bias error. r ω is the phase value of the current bias error, and ω is the electrical angular velocity of the permanent magnet synchronous motor. t This indicates time. It is clearly visible that there will always be a first harmonic current within an electrical angle in the current quantity.
[0051] In current automotive steering motor control, existing technologies for filtering first-order harmonic currents caused by sampling bias errors all employ multiple zero-current samplings. This compensation method places high demands on chip resources, and even in actual closed-loop control, a certain amount of fluctuation still exists, which the driver can still perceive. To address this deficiency, this application proposes pre-obtaining a fixed sampling current bias error (i.e., the first current bias error) of the control system in the open-loop state; in closed-loop control, the first current bias error is applied to compensate the real-time sampled current value to obtain a compensated current measurement value. The compensated current measurement value is then further compensated.
[0052] like Figure 3As shown, this invention designs a PI filter-type current measurement bias error compensation controller (hereinafter referred to as PI regulator) to reduce torque ripple in permanent magnet synchronous motors.
[0053] ;
[0054] in, i αmeasure yes α The current measurement value of the shaft. i βmeasure yes β The current measurement value of the shaft. yes α Estimated current value of the shaft. yes β Estimated current value of the shaft. yes α The estimated current bias error value of the shaft. yes β The estimated current bias error value of the shaft. K p It is proportional gain. K i It is integral gain. To estimate the resistance of the motor, S It is a complex variable.
[0055] and The following relationship exists:
[0056] in, yes α The estimated voltage of the shaft. yes β The estimated voltage of the shaft. yes α The estimated current of the shaft. yes β The estimated current of the shaft. yes α The feedback flux linkage value of the shaft, yes β The feedback flux linkage value of the shaft, To estimate the inductance of the motor, To estimate the resistance of the motor, S It is a complex variable.
[0057] proportional gain K p With integral gain K i The selection is as follows: ;
[0058] in, To estimate the inductance of the motor, To estimate the resistance of the motor, ωc The bandwidth of the PI controller can be calibrated according to the actual system.
[0059] Based on the aforementioned open-loop coarse calibration and closed-loop compensation of the measured current value, and then using a PI filter-type current bias error compensation regulator to compensate for the sampling current bias error of the permanent magnet synchronous motor, the sampling current bias error of the motor can be better eliminated, thus improving the control accuracy of the permanent magnet synchronous motor. Furthermore, this application proposes a PI-type regulator for closed-loop control of the permanent magnet synchronous motor. Compared to the commonly used PID controllers in the prior art, the PI-type regulator proposed in this application does not occupy hardware resources, has low cost, strong adjustability, and is also convenient for platform porting.
[0060] The core objective of this method is to improve the accuracy of current sampling. Applying this method to the sampling current bias error compensation of steer-by-wire motors can optimize the control performance of electric power steering (EPS), steer-by-wire (SBW) systems, and steering systems of special vehicles such as unmanned logistics vehicles at a lower cost, reduce motor noise, and improve the driver's road feel feedback.
[0061] Furthermore, the method proposed in this application is not only applicable to the traditional automotive industry, but also has broad application potential in fields such as autonomous driving, construction machinery, and special equipment. Its core value lies in improving the safety, comfort, and reliability of steering systems through high-precision current control. It can also be applied to control surface systems for drones or electric aircraft, high-precision servo motor drives, and robot joint control.
[0062] In one embodiment of the present invention, a control method for a permanent magnet synchronous motor is provided, which controls the working state of the permanent magnet synchronous motor based on the motor sampling current bias error compensation method described in any of the above embodiments.
[0063] The control system of the permanent magnet synchronous motor is pre-configured to an open-loop state, and the current measurement value of the permanent magnet synchronous motor is collected. The real-time collected current measurement value is filtered to obtain a current filter value. Preferably, the average value of the current filter value within a preset time period after the control system is configured to an open-loop state is taken as the first current bias error. The preset time period is preferably 1.5s to 2s after the control system is configured to an open-loop state.
[0064] During closed-loop control, the first current bias error is acquired in real time, and the current measurement value is compensated using the first current bias error to obtain a compensated current measurement value. During closed-loop control, the compensated current measurement value is further compensated based on a PI controller and applied to the closed-loop control of the motor.
[0065] Taking the steer-by-wire motor as an example, firstly, the host computer sends a current error compensation command to the ECU controller via buses such as CAN / EtherCAT to set it to 1. The ECU controller then switches the control system of the steer-by-wire motor to open-loop mode, that is, it only performs SVPWM space vector modulation, the commands for Vd and Vq are 0, and the angle is the actual acquisition by the sensor.
[0066] The acquired three-phase current ADC values are filtered to obtain a smoother DC value. This value is then written into the chip's Dflash, and the power is turned off. Next, the ECU controller is powered on, and the bias current ADC value stored in the NVM is used in the actual closed-loop control. In a specific embodiment, see... Figure 4 First, send 1003, 2701, and 2702 to enable the flag and start timing. At the same time, the motor control system switches to open-loop mode. At 80ms, the three-phase current is filtered. The actual offset value = 2048 - the filtered ADC value. To ensure data smoothness, the data with small fluctuations is selected. Within 1.5s and 2s, the offset values of the three-phase current are written into the chip's Dflash area. At the same time, the offset ADC values of the three phases need to be limited (±30). Then, the controller is powered down to store the data and the enable position is set to 0.
[0067] Switch the control system of the steer-by-wire motor to closed-loop mode. In the calculation of converting the three-phase current to the D / Q axis current, add a PI filter-type current bias error compensation regulator and build a Simulink model as follows: Figure 5 As shown.
[0068] The inputs to the Simulink model are the command voltage values for the d / q axes, the electrical angles of the motor, the electrical angular velocities of the motor, the currents for the α / β axes, and the proportional gain. K p Integral gain K i Verification will be performed. See [link / reference] Figures 6 to 8 The three-phase current of the front and rear drive steering motors was reduced from approximately ±1A to about ±0.2A after compensation, verifying the feasibility of this design.
[0069] See Figure 9 and Figure 10 , Figure 9 and Figure 10 The thin lines in the diagram represent the electrical angles of the motor. Figure 9 and Figure 10The thick lines in the diagram represent current fluctuations that reflect torque pulsation. (Through...) Figure 9 and Figure 10 As can be seen from the comparison, the electrical angle and torque pulsation of the steer-by-wire motor after compensation are significantly improved compared to before compensation. The jitter of electrical angle and torque pulsation is significantly reduced, indicating that the control of the motor is more stable and smooth.
[0070] In one embodiment of the present invention, a permanent magnet synchronous motor control system is provided, which controls the working state of the permanent magnet synchronous motor based on the control method of the permanent magnet synchronous motor described above.
[0071] It should be noted that the above-mentioned control method and control system embodiments for permanent magnet synchronous motors and the embodiment for motor sampling current bias error compensation method belong to the same inventive concept. The entire contents of the embodiment for motor sampling current bias error compensation method are incorporated into the control method and control system embodiments for permanent magnet synchronous motors by reference.
[0072] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0073] The above description is only a specific embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for motor sampling current bias error compensation, characterized in that, The method comprises the following steps: The control system of the permanent magnet synchronous motor is configured as an open loop state in advance, and a first current bias error of the permanent magnet synchronous motor is obtained, the first current bias error at least including current bias errors of phase A, phase B and phase C i Aoffset and phase C i Coffset ; In a closed loop state of the control system, the current measurement values of the permanent magnet synchronous motor are obtained α and the first current bias error is used to compensate the current measurement values of the β and the first current bias error is used to compensate the current measurement values of the α and the first current bias error is used to compensate the current measurement values of the β and the first current bias error is used to compensate the current measurement values of the α and the first current bias error is used to compensate the current measurement values of the i αmeasure and the first current bias error is used to compensate the current measurement values of the β and the first current bias error is used to compensate the current measurement values of the i βmeasure ; The current measurement values of the axes are used to control the current of the axes by means of a pre-designed PI-type regulator α The current measurement values of the axes are used to control the current of the axes by means of a pre-designed PI-type regulator i αmeasure The current measurement values of the axes are used to control the current of the axes by means of a pre-designed PI-type regulator β The current measurement values of the axes are used to control the current of the axes by means of a pre-designed PI-type regulator i βmeasure The current measurement values of the 2. The motor sampling current bias error compensation method of claim 1, wherein, The pre-designed PI type regulator is utilized in the following way to α current measurement of the shaft i αmeasure and β current measurement of the shaft i βmeasure error compensation is performed: ; wherein i αmeasure is α a current measurement of the shaft, i βmeasure is β a current measurement of the shaft, is α an estimated current value of the shaft, is β an estimated current value of the shaft, is α an estimated current bias error value of the shaft, is β an estimated current bias error value of the shaft, is an estimated resistance of the motor, K p is a proportional gain, K i is an integral gain, S is a complex variable.
3. The motor sampling current bias error compensation method of claim 2, wherein, and The relationship between the two is expressed as follows: ; wherein is α a voltage estimate of the axis, is β a voltage estimate of the axis, is α a feedback flux linkage value of the axis, is β a feedback flux linkage value of the axis, is an estimated inductance of the electric machine, is an estimated resistance of the electric machine.
4. The motor sampling current bias error compensation method of claim 2, wherein, proportional gain K p and integral gain K i are chosen as follows: ; wherein, Lestis an estimated inductance of the electric machine, Restis an estimated resistance of the electric machine, ωc BPIis a bandwidth of the PI-type regulator.
5. The motor sampling current bias error compensation method of claim 1, wherein, In the open loop state of the control system, the first current bias error of the permanent magnet synchronous motor is obtained based on double resistance sampling through the following formula: ; wherein, i Ameasure Ia is a measured value of the A-phase current in the open-loop state, i Cmeasure Ic is a measured value of the C-phase current in the open-loop state, i Aoffset Iaoff is a current offset error of the A-phase in the open-loop state, i Coffset Icoff is a current offset error of the C-phase in the open-loop state.
6. The motor sampling current bias error compensation method of claim 5, wherein, In the closed-loop state of the control system, based on double-resistance sampling, the A-phase and C-phase current measurement values are compensated by the following formula to obtain compensated A-phase and C-phase current measurement values i Ameasure and i Cmeasure : i Ameasure = i A_measure - i Aoffset , i Ameasure = i A_measure - i Aoffset , wherein i A_measure is the A-phase current measurement value before compensation, i C_measure is the C-phase current measurement value before compensation; According to the compensated A, C phase current measurement values i Ameasure and i Cmeasure determining the compensated α current measurement values of the axes i αmeasure and β current measurement values of the axes i βmeasure .
7. The motor sampling current bias error compensation method of claim 1, wherein, The method further comprises the following steps: The first current bias error is obtained and stored in advance; In the closed loop control process, the first current bias error is obtained in real time, and the current measurement value is compensated by using the first current bias error to obtain a compensated current measurement value.
8. The motor sampling current bias error compensation method of claim 1, wherein, The first current bias error of the permanent magnet synchronous motor is obtained, comprising the following steps: The control system of the permanent magnet synchronous motor is configured to be in an open loop state, and a current measurement value of the permanent magnet synchronous motor is collected; The current measurement value is filtered to obtain a current filtered value; The average value of the current filtered value in a preset time period after the control system is configured to be in the open loop state is taken as the first current bias error.
9. The motor sampling current bias error compensation method of claim 8, wherein, The current of the control system is sampled based on double resistance, and the A-phase current measurement value and the C-phase current measurement value are collected after the control system of the permanent magnet synchronous motor is configured to be in the open loop state; The A-phase current measurement value and the C-phase current measurement value collected in real time are filtered to obtain the A-phase current filtered value and the C-phase current filtered value; the control system is configured to filter the current of the A phase in a preset time period after the control system is configured in the open loop state as the current bias error of the A phase i Aoffset ; The control system is configured to filter the current of the C phase in a preset time period after the control system is configured in the open loop state as the current bias error of the C phase i Coffset .
10. The motor sampling current bias error compensation method of claim 8, wherein, The permanent magnet synchronous motor is configured as a steer-by-wire motor; and / or, The preset time period is 1.5s to 2s after the control system is configured to be in the open loop state.
11. A control method of a permanent magnet synchronous motor, characterized by, The working state of the permanent magnet synchronous motor is controlled based on the motor sampling current bias error compensation method according to any one of claims 1-10.
12. A permanent magnet synchronous motor control system, characterized by, The working state of the permanent magnet synchronous motor is controlled based on the control method of the permanent magnet synchronous motor according to claim 11.
Citation Information
Patent Citations
Method for compensating direct current bias error of output signal of rotary transformer
CN114268261A
Permanent magnet synchronous motor stator current measurement error compensation method
CN118889913A
Device for carrying out on-line test on protection characteristics of circuit breaker
CN111239598A
Signal determination method and device, storage medium and electronic device
CN112051535A
Current measurement offset error compensation method in permanent magnet synchronous motor vector control system
CN113965129A