Voltage compensation method and system of brushless motor and electronic equipment
By treating the switching behavior of a brushless motor as a continuous disturbance voltage source, higher-precision voltage compensation is achieved, solving the problem of low voltage compensation accuracy in brushless motors and improving the smoothness of motor operation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 苏州无界妙控科技有限公司
- Filing Date
- 2026-02-28
- Publication Date
- 2026-05-15
AI Technical Summary
In the voltage compensation methods for brushless motors, existing technologies suffer from low compensation accuracy.
An adaptive dead-time compensation method based on voltage error injection is adopted, which equates the complex nonlinear and discrete switching behavior to a continuous disturbance voltage source, and performs voltage compensation by determining the disturbance voltage.
The accuracy of voltage compensation has been improved, solving the problem of low compensation accuracy and ensuring smoother operation of the motor at low speeds.
Smart Images

Figure CN122052629A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of brushless motor drives, and more specifically, to a voltage compensation method, system, and electronic device for a brushless motor. Background Technology
[0002] In a three-phase voltage source inverter for a brushless motor, each phase includes two switching devices: an upper and a lower one. Ideally, for each phase's two switching devices, one should be completely off when the other is on. However, due to the turn-off delay of the switching devices, if the upper turn-off command and the lower turn-on command are issued simultaneously, both devices may turn on within a very short time, causing a short circuit and burning out the devices. Therefore, a dead time needs to be inserted between control signals to ensure "turn-off first, then turn-on".
[0003] Dead-time compensation in related technologies is based on fixed-time compensation according to the current direction. Based on the detected motor phase current direction, a fixed dead-time is added to or subtracted from the corresponding conduction time within each Pulse Width Modulation (PWM) cycle. However, the compensation accuracy of this dead-time compensation method is low. Therefore, it is evident that the voltage compensation methods for brushless motors in related technologies suffer from the technical problem of low compensation accuracy. Summary of the Invention
[0004] This application provides a voltage compensation method, system, and electronic device for a brushless motor, to at least solve the technical problem of low compensation accuracy in related brushless motor voltage compensation methods.
[0005] According to one aspect of the embodiments of this application, a voltage compensation method for a brushless motor is provided, comprising: determining a reference actual terminal voltage of the brushless motor based on a reference actual terminal current of the brushless motor, wherein the reference actual terminal current is the actual terminal current of the brushless motor in a reference switching cycle, and the reference switching cycle is no later than the current switching cycle; predicting a reference desired terminal current of the brushless motor based on reference motor parameters of the brushless motor, and determining a reference desired terminal voltage of the brushless motor based on the reference desired terminal current, wherein the reference motor parameters are target motor parameters of the brushless motor in the reference switching cycle; determining the voltage difference between the reference actual terminal voltage and the reference desired terminal voltage as a target disturbance voltage, and performing voltage compensation on a target voltage command based on the target disturbance voltage, wherein the target voltage command is a voltage command output by a controller to an inverter corresponding to the next switching cycle of the current switching cycle, and the inverter is used to control the operation of the brushless motor.
[0006] According to another aspect of the embodiments of this application, a voltage compensation system for a brushless motor is also provided, comprising: a controller, an inverter, and a feedforward compensation unit, wherein the controller is electrically connected to the inverter, the inverter is electrically connected to the brushless motor, and the feedforward compensation unit is electrically connected to both the controller and the brushless motor; wherein the controller is configured to output a voltage command to the inverter; the inverter is configured to control the operation of the brushless motor in response to the voltage command from the controller; and the feedforward compensation unit is configured to determine a reference actual terminal voltage of the brushless motor based on a reference actual terminal current of the brushless motor, wherein the reference actual terminal current is the voltage of the brushless motor during a reference switching cycle. The actual terminal current of the brushless motor is determined, and the reference switching cycle is no later than the current switching cycle. Based on the reference motor parameters of the brushless motor, the reference expected terminal current of the brushless motor is predicted, and based on the reference expected terminal current, the reference expected terminal voltage of the brushless motor is determined, wherein the reference motor parameters are the target motor parameters of the brushless motor in the reference switching cycle. The voltage difference between the reference actual terminal voltage and the reference expected terminal voltage is determined as the target disturbance voltage, and voltage compensation is performed on the target voltage command based on the target disturbance voltage, wherein the target voltage command is a voltage command output by the controller to the inverter corresponding to the next switching cycle of the current switching cycle.
[0007] In some exemplary embodiments, the feedforward compensation unit is further configured to extract the steady-state component of the target disturbance voltage to obtain a target compensation voltage when the current amplitude of the actual terminal current of the brushless motor in the current switching cycle is greater than or equal to the target current threshold; and to use the target compensation voltage as the compensation voltage for the next switching cycle to perform voltage compensation on the target voltage command.
[0008] In some exemplary embodiments, the feedforward compensation unit includes: a control module and a proportional-integral (PI) regulator, wherein the PI regulator is used to perform discretized PI integral processing on the input voltage of the PI regulator to extract the steady-state component of the input voltage of the PI regulator; wherein the control module is used to input the target disturbance voltage to the PI regulator; the PI regulator is used to perform discretized PI integral processing on the target disturbance voltage to obtain the target compensation voltage, and output the target compensation voltage.
[0009] In some exemplary embodiments, the feedforward compensation unit is further configured to transmit the target compensation voltage to the controller; the controller is further configured to use the target compensation voltage as the compensation voltage for the next switching cycle, and correct the voltage indicated by the target voltage command to obtain an updated target voltage command.
[0010] In some exemplary embodiments, the feedforward compensation unit is further configured to transmit the compensation voltage of the current switching cycle to the controller when the current amplitude of the actual terminal current of the brushless motor in the current switching cycle is less than the target current threshold; the controller is further configured to use the compensation voltage of the current switching cycle as the compensation voltage of the next switching cycle to perform voltage compensation on the target voltage command.
[0011] In some exemplary embodiments, the feedforward compensation unit is further configured to, before determining the reference actual terminal voltage of the brushless motor based on the reference actual terminal current of the brushless motor, read the reference three-phase line current of the brushless motor in the previous switching cycle of the current switching cycle, and convert the reference three-phase line current into the reference direct-axis current and the reference quadrature-axis current of the brushless motor, wherein the reference switching cycle is the previous switching cycle of the current switching cycle, and the reference actual terminal current includes the reference direct-axis current and the reference quadrature-axis current.
[0012] In some exemplary embodiments, the feedforward compensation unit is further configured to input the reference actual terminal current into the motor drive model to obtain the reference actual terminal voltage output by the motor drive model; input the reference desired terminal current into the motor drive model to obtain the reference desired terminal voltage output by the motor drive model; wherein, the motor drive model is configured to determine the resistance voltage drop, the inductance voltage drop, and the rotational back electromotive force of the brushless motor based on the input terminal current of the motor drive model, and output a terminal voltage determined by the resistance voltage drop, the inductance voltage drop, and the rotational back electromotive force of the brushless motor.
[0013] In some exemplary embodiments, the feedforward compensation unit is further configured to predict the reference desired terminal current based on the reference motor speed and the reference motor torque of the brushless motor, wherein the reference motor speed is the target speed of the brushless motor in the reference switching cycle, the reference motor torque is the target torque of the brushless motor in the reference switching cycle, and the reference motor parameters include the reference motor speed and the reference motor torque.
[0014] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed by a processor.
[0015] According to another aspect of the embodiments of this application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform the steps in any of the method embodiments described above.
[0016] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to perform the steps of any of the above method embodiments through the computer program.
[0017] The embodiments provided in this application employ an adaptive dead-zone compensation method based on voltage error injection, which equates complex nonlinear and discrete switching behavior to a continuous disturbance voltage source acting on the motor terminals. The disturbance voltage of the disturbance voltage source is the voltage difference between the actual terminal voltage applied to the brushless motor and the ideal terminal voltage of the brushless motor, thereby enabling voltage compensation based on a determined disturbance voltage. The process of determining the disturbance voltage is as follows: Based on the reference actual terminal current of the brushless motor, the reference actual terminal voltage of the brushless motor is determined. The reference actual terminal current is the actual terminal current of the brushless motor in the reference switching cycle. Based on the reference motor parameters of the brushless motor, the reference expected terminal current of the brushless motor is predicted, and based on the reference expected terminal current, the reference expected terminal voltage of the brushless motor is determined. The reference motor parameters are the target motor parameters of the brushless motor in the reference switching cycle. The voltage difference between the reference actual terminal voltage and the reference expected terminal voltage is determined as the target disturbance voltage. The determined target disturbance voltage can be used to compensate for the voltage command of the next switching cycle, which can improve the technical effect of compensation accuracy and thus solve the technical problem of low compensation accuracy in the voltage compensation method of brushless motors in related technologies. Attached Figure Description
[0018] The accompanying drawings, which form part of this application, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings:
[0019] Figure 1 This is a schematic diagram illustrating an application scenario of a voltage compensation method for a brushless motor according to an embodiment of this application.
[0020] Figure 2 This is a schematic flowchart of an optional voltage compensation method for a brushless motor according to an embodiment of this application.
[0021] Figure 3This is a schematic diagram of an optional voltage compensation based on zero-crossing freezing according to an embodiment of this application.
[0022] Figure 4 This is a schematic flowchart of another optional voltage compensation method for a brushless motor according to an embodiment of this application.
[0023] Figure 5 This is a schematic diagram of an optional voltage compensation system for a brushless motor according to an embodiment of this application.
[0024] Figure 6 This is a computer system architecture block diagram of an optional electronic device according to an embodiment of this application. Detailed Implementation
[0025] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application 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 this application 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 non-exclusive inclusion; for example, a process, method, system, product, or apparatus 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 apparatus.
[0027] According to one aspect of the embodiments of this application, a voltage compensation method for a brushless motor is provided. Optionally, in this embodiment, the above-described voltage compensation method for a brushless motor can be applied, but is not limited to, to applications such as... Figure 1 The hardware environment shown includes a controller 102, an inverter 104, and a brushless motor 106. The controller 102 is electrically connected to the inverter 104, and the inverter 104 is electrically connected to the brushless motor 106. The controller 102 controls the three-phase AC voltage waveform output by the inverter 104 to the brushless motor 106. The inverter 104 controls the operation of the brushless motor 106.
[0028] The controller 102 can be a digital signal processor, microcontroller, or other control device, and can be used to execute speed loop control algorithms, current loop control algorithms, etc. The output of the controller 102 can be a voltage command, which can be used to indicate the desired terminal voltage of the brushless motor 106, that is, the desired voltage in a two-phase coordinate system, namely the desired voltage on the direct axis (D-axis) and the desired voltage on the quadrature axis (Q-axis). The D-axis is always aligned with the axis of the rotor permanent magnet magnetic field (or excitation magnetic field), and the Q-axis always leads the D-axis by 90 electrical degrees.
[0029] Inverter 104, also known as a three-phase voltage source inverter, may include a three-phase half-bridge circuit. This circuit may include six switching devices, such as Insulated Gate Bipolar Transistors (IGBTs), Metal-Oxide-Semiconductor Field-Effect Transistors (MOSFETs), etc. Its input is the voltage command output from the controller. Internally, it may integrate a Space Vector Pulse Width Modulation (SVPWM) module. This module converts the voltage command output from controller 102 into a three-phase PWM duty cycle, and incorporates dead-time insertion, dead-time compensation preprocessing, and other logic to ultimately generate the control signals (three-phase AC voltage waveforms) to drive the power devices.
[0030] The brushless motor 106 can be a permanent magnet synchronous motor. Its stator winding receives the control signal output by the inverter 104, generates a rotating magnetic field, and drives the rotor to run according to the controller instructions.
[0031] In inverter 104, each phase includes two switching devices (e.g., MOSFETs). Ideally, for the two switching devices in the same phase, one switching device should be completely off when the other is on. However, due to the turn-off delay of the switching devices, if the upper turn-off command (e.g., upper MOSFET turn-off command) and the lower turn-on command (e.g., lower MOSFET turn-on command) are issued simultaneously, the upper and lower switching devices may turn on simultaneously within a very short time, causing a short circuit and burning out the devices. Therefore, a dead time needs to be inserted into the control signal to ensure "turn-off first, then turn-on".
[0032] In related technologies, dead-time compensation is typically achieved through fixed-time compensation based on current direction: according to the detected direction of the motor terminal current, a fixed dead time is added to or subtracted from the corresponding conduction time within each PWM cycle. This dead-time compensation method is simple in principle, easy to implement, and requires low computational resources, but its compensation accuracy is relatively low.
[0033] To at least partially address the aforementioned issues, this embodiment employs an adaptive dead-time compensation method based on voltage error injection. This method equates the complex, nonlinear, and discrete switching behavior to a continuous disturbance voltage source acting on the motor terminals. The disturbance voltage is the voltage difference between the actual terminal voltage applied to the brushless motor 106 and its ideal terminal voltage. This allows for voltage compensation based on a determined disturbance voltage. Since the disturbance voltage is determined based on the actual and ideal terminal voltages applied to the brushless motor 106, it can automatically and in real-time identify and compensate for voltage distortions caused by a combination of factors, such as dead time and switching transistor nonlinearity (i.e., voltage disturbance, where the disturbance voltage represents voltage distortion). This makes the motor operation smoother at low speeds and addresses the shortcomings of fixed-time compensation, such as the nonlinearity of switching devices, the unequal turn-on and turn-off delay times, the nonlinearity of transistor voltage drops, and the variations in IGBT saturation voltage drop and diode forward voltage drop with current. This improves compensation accuracy.
[0034] The voltage compensation method for the brushless motor in this embodiment can be executed by the controller 102, by other devices besides the controller 102, or by the controller 102 in combination with other devices. Taking the controller 102 executing the voltage compensation method for the brushless motor in this embodiment as an example... Figure 2 This is a schematic flowchart of an optional voltage compensation method for a brushless motor according to an embodiment of this application, as shown below. Figure 2 As shown, the process of this method may include the following steps:
[0035] Step S202: Determine the reference actual terminal voltage of the brushless motor based on the reference actual terminal current of the brushless motor, wherein the reference actual terminal current is the actual terminal current of the brushless motor in the reference switching cycle, and the reference switching cycle is no later than the current switching cycle.
[0036] Step S204: Based on the reference motor parameters of the brushless motor, predict the reference desired terminal current of the brushless motor, and based on the reference desired terminal current, determine the reference desired terminal voltage of the brushless motor, wherein the reference motor parameters are the target motor parameters of the brushless motor in the reference switching cycle.
[0037] Step S206: The voltage difference between the reference actual terminal voltage and the reference desired terminal voltage is determined as the target disturbance voltage, and voltage compensation is performed on the target voltage command based on the target disturbance voltage. The target voltage command is a voltage command output by the controller to the inverter that corresponds to the next switching cycle of the current switching cycle. The inverter is used to control the operation of the brushless motor.
[0038] In this embodiment, voltage compensation control can be performed on a switching cycle basis. At the end of the current switching cycle (which can be represented as the k-th cycle), or before the end of the current switching cycle, the reference actual terminal current of the brushless motor 106 can be obtained. The reference actual terminal current is the actual terminal current of the brushless motor 106 in the reference switching cycle. The brushless motor 106 can be sampled in real time by a current sensor (i.e., the actual phase current of the three-phase winding of the motor can be sampled in real time) to obtain the actual phase current of the brushless motor 106 in different switching cycles. The actual phase current can be converted into actual terminal current to obtain the actual terminal current of the brushless motor 106 in different switching cycles.
[0039] The current sensor can be of one or more types, including but not limited to at least one of the following: sampling resistor, Hall effect current sensor, fluxgate / closed-loop Hall sensor, etc. The current sensor can be installed between the DC bus of inverter 104 and the motor phase output terminal. For example, the current sensor can be a sampling resistor connected in series between the two-phase power switch transistors of the lower arm of inverter 104 and ground. Alternatively, the current sensor can be an isolated current sensor (e.g., a Hall current sensor) installed on the non-grounded side of the two-phase output branch (i.e., the connection line from the inverter 104 output terminal to the motor winding). Here, the third-phase current may not be directly sampled, but reconstructed according to Kirchhoff's current law.
[0040] The reference switching period can be no later than the current switching period. It can be the current switching period (the kth period) or the nth switching period before the current switching period (the knth period, where n is a positive integer greater than or equal to 1). In this embodiment, the reference switching period is not limited.
[0041] Based on the reference actual terminal current of the brushless motor 106, the reference actual terminal voltage of the brushless motor 106 can be determined. The reference actual terminal voltage can include the direct-axis voltage and quadrature-axis voltage of the brushless motor 106 during the reference switching cycle. The reference actual terminal voltage of the brushless motor 106 is related to its reference actual terminal current; therefore, the reference actual terminal voltage can be calculated using any method that calculates the actual terminal voltage of the brushless motor 106 based on its actual terminal current.
[0042] To determine the disturbance voltage corresponding to the reference switching cycle, the desired terminal voltage of the brushless motor 106 during the reference switching cycle can also be predicted. To this end, the desired reference terminal current of the brushless motor can first be predicted based on the reference motor parameters of the brushless motor 106; then, the desired reference terminal voltage of the brushless motor can be determined based on the desired reference terminal current. Here, the reference motor parameters are the target motor parameters of the brushless motor 106 during the reference switching cycle (the expected motor operation target of the brushless motor 106 during the reference switching cycle), the predicted desired reference terminal current is the desired terminal current (i.e., the ideal terminal current) of the brushless motor 106 during the reference switching cycle, and the determined desired reference terminal voltage is the desired terminal voltage (i.e., the ideal terminal voltage) of the brushless motor 106 during the reference switching cycle.
[0043] The reference motor parameters can be the set of motor parameters specified for the brushless motor 106 under ideal operating conditions without introducing nonlinear disturbances (such as dead time, switching delay, and tube voltage drop). The reference motor parameters may include one or more motor parameters related to the terminal current of the brushless motor 106, and may include, but are not limited to, motor speed, motor torque, etc., and may also include other motor parameters. In this embodiment, the reference motor parameters are not limited.
[0044] It should be noted that since the reference motor parameters are the target motor parameters of the brushless motor 106 in the reference switching cycle, which are the expected motor operation targets and are unrelated to the actual operation of the brushless motor 106, step S204 can be executed after step S202, before step S202, or before the reference switching cycle.
[0045] After obtaining the reference actual terminal voltage and the reference desired terminal voltage, the voltage difference (i.e., voltage error) between the reference actual terminal voltage and the reference desired terminal voltage can be calculated, and the calculated voltage difference can be determined as the target disturbance voltage.
[0046] For example, the actual terminal current of the brushless motor 106 includes id (actual D-axis current) and iq (actual Q-axis current), the actual terminal voltage includes Vd1 (actual D-axis voltage) and Vq1 (actual Q-axis voltage), the ideal terminal current includes i1 (ideal D-axis current) and i2 (ideal Q-axis current), and the ideal terminal voltage includes V1 (ideal D-axis voltage) and V2 (ideal Q-axis voltage). The voltage error of the brushless motor 106 is ΔV = ΔVd + ΔVq = Vd1 + Vq1 - V1 - V2, where ΔVd is the D-axis voltage error and ΔVq is the Q-axis voltage error.
[0047] It should be noted that the controller 104 exhibits nonlinearity, which leads to a difference between the actual terminal voltage applied to the motor and the ideal terminal voltage indicated by the voltage command calculated by the controller. The voltage difference between the actual and ideal terminal voltages mainly consists of two terms: the first is the actual disturbance voltage (generated by dead time, etc., which is the part we want to extract), and the second is an additional term caused by current tracking error (id+iq-i1-i2) and back EMF calculation error. When the current loop performs well (tracking error is small), the second term is very small, i.e., ΔV ≈ the actual disturbance voltage generated by the dead time. ΔV can be used as the voltage disturbance value, ΔVd as the D-axis voltage disturbance value, and ΔVq as the Q-axis voltage disturbance value. In this way, the actual terminal voltage applied to the motor can be modeled as the ideal terminal voltage plus the disturbance voltage (ΔVd / ΔVq), transforming discrete switching interference into a continuous disturbance voltage source, which facilitates calculation.
[0048] Based on the target disturbance voltage, voltage compensation can be performed on the target voltage command, which is the voltage command output by the controller 102 to the inverter 104 corresponding to the next switching cycle of the current switching cycle. As an optional implementation, the target disturbance voltage can be directly used to compensate for the target voltage command. Considering that the voltage difference (ΔV) contains high-frequency noise and transient components of the dynamic process, as another optional implementation, the steady-state (low-frequency) component of the target disturbance voltage can be extracted, and the extracted steady-state component can be used to compensate for the target voltage command. Furthermore, other compensation conditions can also be combined to compensate for the target voltage command, as long as the voltage compensation accuracy and the safety and reliability of the brushless motor 106 operation are guaranteed.
[0049] The embodiments provided in this application determine the reference actual terminal voltage of the brushless motor 106 based on the reference actual terminal current of the brushless motor 106, wherein the reference actual terminal current is the actual terminal current of the brushless motor 106 in a reference switching cycle, and the reference switching cycle is no later than the current switching cycle; the reference expected terminal current of the brushless motor 106 is predicted based on the reference motor parameters of the brushless motor 106, and the reference expected terminal voltage of the brushless motor 106 is determined based on the reference expected terminal current, wherein the reference motor parameters are the target motor parameters of the brushless motor 106 in the reference switching cycle; the voltage difference between the reference actual terminal voltage and the reference expected terminal voltage is determined as the target disturbance voltage, and voltage compensation is performed on the target voltage command based on the target disturbance voltage, wherein the target voltage command is a voltage command output by the controller 102 to the inverter 104 corresponding to the next switching cycle of the current switching cycle, and the inverter 104 is used to control the operation of the brushless motor 106. This can solve the technical problem of low compensation accuracy in the voltage compensation method of brushless motors in related technologies and improve the compensation accuracy.
[0050] In some exemplary embodiments, the digital control system has an inherent delay Td (approximately 1.5 PWM cycles). The PWM duty cycle update for the current switching cycle is not reflected in the sampled current until the next cycle or even later. If the desired terminal voltage is calculated using the desired terminal current of the current switching cycle, the actual terminal voltage compared to it is used to correct errors based on the old current value. The two are misaligned in time, leading to a deviation in the calculation of the disturbance voltage. To address this, data pairing calculations can be performed using a one-cycle delay; that is, the reference switching cycle is the previous switching cycle of the current switching cycle. This avoids the calculation deviation caused by time misalignment. For example, vd1(k-1), vq1(k-1) can be compared with v1(k-1) and v2(k-1) calculated based on i1(k-1) and i2(k-1).
[0051] Optionally, in this embodiment, before determining the reference actual terminal voltage of the brushless motor based on the reference actual terminal current of the brushless motor, the reference actual terminal current can be determined first. To determine the reference actual terminal current, the reference three-phase line current of the brushless motor during the reference switching cycle can be read first; then, the reference three-phase line current is converted into the reference direct-axis current and the reference quadrature-axis current of the brushless motor, wherein the reference actual terminal current includes the reference direct-axis current and the reference quadrature-axis current.
[0052] The reference three-phase line current can be the sensor data from the aforementioned current sensor, or it can be information obtained by processing the sensor data read by the aforementioned current sensor. By converting the reference three-phase line current into current in the direct-axis coordinate system and the quadrature-axis coordinate system, the reference actual terminal current can be obtained.
[0053] In this embodiment, using data delayed by one beat for pairing calculations can avoid calculation deviations caused by time misalignment and improve the accuracy of disturbance voltage calculation.
[0054] In some exemplary embodiments, an ideal (undisturbed) motor drive model can be established to determine the applied terminal voltages (vd and vq) required to maintain the motor terminal currents (id and iq) and operate at an angular velocity (ωe), which are the drive voltages (a variable value) of the brushless motor 106 under normal operating conditions. The motor drive model can be used to determine the resistive voltage drop, inductive voltage drop, and rotational back electromotive force of the brushless motor based on the input terminal currents of the motor drive model, and output the terminal voltage determined by the resistive voltage drop, inductive voltage drop, and rotational back electromotive force of the brushless motor.
[0055] In the motor drive model, an ideal equation for the motor drive can be defined. The left side of the ideal equation is the motor terminal voltage, and the right side is divided into three parts: the voltage drop across the resistor, the voltage drop across the inductor, and the rotating back electromotive force. The ideal equation can be shown in formulas (1) and (2):
[0056] Vd=R×id+Ld×d(id) / dt-ωe×Lq×iq (1)
[0057] Vq=R×iq+Lq×d(iq) / dt+ωe×Ld×id+ωeψf (2)
[0058] Where R is the phase resistance, id is the D-axis current, iq is the Q-axis current, Ld is the D-axis inductance, Lq is the Q-axis inductance, ωe is the electrical angle, and ωeψf is the actual back electromotive force. The actual back electromotive force can be calculated using a sliding mode observer, or it can be obtained through terminal voltage measurement and calculation, or other methods.
[0059] Correspondingly, determining the reference actual terminal voltage of the brushless motor based on its reference actual terminal current includes: inputting the reference actual terminal current into the motor drive model to obtain the reference actual terminal voltage output by the motor drive model. The terminal voltage output by the motor drive model after inputting the reference actual terminal current is the reference actual terminal voltage.
[0060] Correspondingly, determining the reference expected terminal voltage of the brushless motor based on the reference expected terminal current includes: inputting the reference expected terminal current into the motor drive model to obtain the reference expected terminal voltage output by the motor drive model. The terminal voltage output by the motor drive model after inputting the reference expected terminal current is the reference expected terminal voltage.
[0061] For example, a disturbance term can be introduced to model all nonlinear effects (such as dead time, switching delay, and tube voltage drop) as an equivalent error voltage vector (ΔVd and ΔVq) added to the ideal equation. This transforms the complex nonlinear and discrete switching behavior into a continuous disturbance voltage source acting on the motor terminals, which can greatly simplify the analysis and compensation design.
[0062] The reference currents (i1 and i2) of the controller can be calculated from the motor parameters under ideal current (no interference). Substituting these parameters into the aforementioned motor drive model, V1 and V2 can be calculated, which are the ideal voltage values. The voltage error ΔV = Vd1 + Vq1 - V1 - V2, when substituted into the motor drive model, yields formula (3):
[0063] ΔV≈ΔVd+ΔVq+[R×(id+iq-i1-i2)+Ld×d(id-i1) / dt+Lq×d(iq-i2) / dt+A](3)
[0064] Where A = ωe × Ld × (id - i1) + ωeψf - ωe × Lq × (iq - i2) - ωeψf1, and ωeψf1 is the theoretical back electromotive force. The theoretical back electromotive force can be calculated from the motor parameters.
[0065] In this embodiment, by establishing a motor drive model and using the motor drive model to calculate the terminal voltage based on the input terminal current, the reliability of motor drive modeling can be improved, thereby improving the accuracy of terminal voltage determination.
[0066] In some exemplary embodiments, predicting the reference desired terminal current of the brushless motor 106 based on the reference motor parameters of the brushless motor 106 includes: predicting the reference desired terminal current based on the reference motor speed and the reference motor torque of the brushless motor 106.
[0067] In this embodiment, the reference motor speed and reference motor torque of the brushless motor 106 can be used as reference motor parameters for predicting the desired terminal current. The reference motor speed is the target speed of the brushless motor 106 during the reference switching cycle, and the reference motor torque is the target torque of the brushless motor 106 during the reference switching cycle. The reference motor speed and reference motor torque are specified operating parameters of the brushless motor 106, and these two motor parameters can be obtained by reading stored configuration information or extracting configuration information from received configuration commands.
[0068] After obtaining the reference motor speed and reference motor torque, the terminal current can be predicted based on the reference motor speed and reference motor torque. The predicted terminal current is the reference expected terminal current. Any method for predicting the reference expected terminal current based on the reference motor speed and reference motor torque can be used; this embodiment does not limit this method, as long as the reference expected terminal current can be predicted.
[0069] For example, the current motor speed and torque can be read and converted into ideal terminal currents in the D-axis and Q-axis coordinate systems.
[0070] This embodiment simplifies the ideal terminal current prediction process and improves the convenience of ideal terminal current prediction by using motor speed and motor torque for ideal terminal current prediction.
[0071] In some exemplary embodiments, voltage compensation may fail near the current zero-crossing point due to inaccurate current direction determination or oscillations, thus introducing new distortions. This is because the current amplitude is small near the current zero-crossing point, and sampling noise and quantization errors can severely distort the direction determination. Therefore, the reliability of the disturbance voltage calculated near the current zero-crossing point is low. To avoid introducing new distortions, current amplitude determination can be performed before voltage compensation. Voltage compensation is only performed based on the calculated disturbance voltage when the current amplitude is greater than or equal to a set current threshold (i.e., the target current threshold).
[0072] Correspondingly, voltage compensation is performed on the target voltage command based on the target disturbance voltage, including: when the current amplitude of the actual terminal current of the brushless motor 106 in the current switching cycle is greater than or equal to the target current threshold, extracting the steady-state component of the target disturbance voltage to obtain the target compensation voltage; and using the target compensation voltage as the compensation voltage for the next switching cycle to perform voltage compensation on the target voltage command.
[0073] In this embodiment, if the current amplitude of the actual terminal current of the brushless motor 106 in the current switching cycle is greater than or equal to the target current threshold, it can be considered that the current is not near the zero-crossing point, and voltage compensation can be performed on the target voltage command based on the target disturbance voltage.
[0074] Considering that the target disturbance voltage contains high-frequency noise and transient components of the dynamic process, in order to improve the accuracy and reliability of voltage compensation, the steady-state component of the target disturbance voltage can be extracted first to obtain the target compensation voltage. The target compensation voltage is then used as the compensation voltage for the next switching cycle to compensate the target voltage command. There can be one or more methods for extracting the steady-state component of the target disturbance voltage, including but not limited to low-pass filters, proportional-integral (PI) regulators, or similar devices with low-pass filtering functions.
[0075] In this embodiment, by performing current zero-crossing detection and voltage compensation based on the determined disturbance voltage near non-current zero-crossing points, the possibility of voltage distortion can be reduced; by using the steady-state component of the disturbance voltage for voltage compensation, the accuracy and reliability of voltage compensation can be improved.
[0076] In some exemplary embodiments, a PI controller can be used to extract the steady-state component of the disturbance voltage. The PI controller can be used to perform discretized PI integration on the input voltage of the PI controller to extract the steady-state component of the input voltage. Correspondingly, extracting the steady-state component of the target disturbance voltage to obtain the target compensation voltage includes: inputting the target disturbance voltage to a proportional-integral PI controller to obtain the target compensation voltage output by the PI controller.
[0077] A PI controller can include proportional and integral parameters. The process of PI control can be represented by formula (4):
[0078] ΔV1(s)=K(ΔV(s)-ΔV1(s) / S (4)
[0079] Where K is the gain coefficient, s is the frequency domain in the Laplace transform, S is the same as s, and ΔV1(s) is the disturbance estimate of the compensation voltage in the frequency domain after the Laplace transform.
[0080] The discretized integral equivalent to the above PI control process can be expressed as shown in equation (5):
[0081] ΔV1(k)=ΔV1(k-1)+a[ΔV(k)-ΔV1(k-1)] (5)
[0082] Where k is the time of the kth sampling process, and a is a gain coefficient. Formula (5) can be equivalent in the frequency domain to a low-pass filter whose cutoff frequency is determined by a. This low-pass filter only allows the low-frequency components (steady-state components) in ΔV to pass through and filters out high-frequency noise.
[0083] The convergence process of adaptive voltage compensation is a negative feedback system, as shown in equation (6):
[0084] ΔV1=aΔV / [1-(1-a)z -1 (6)
[0085] Where z represents the z-transform.
[0086] Initially, ΔV1 = 0, and the error ΔV - 0 is relatively large, causing the integrator to begin accumulating. During the dynamic process, as ΔV1 increases, the difference between ΔV1 and ΔV decreases, slowing down the integration speed. For steady-state convergence, when ΔV1 reaches its steady-state value equal to ΔV, the error input becomes zero, integration stops, and ΔV1 remains constant. At this point, the system reaches equilibrium, and the compensation voltage precisely cancels out the actual disturbance voltage.
[0087] The gain coefficient 'a' value can be determined based on the actual system and requirements. A large value of 'a' results in a fast learning speed, enabling rapid tracking of disturbance changes (e.g., changes in tube voltage drop due to temperature rise), but it also makes the system more sensitive to noise, and system fluctuations may occur. A small value of 'a' results in good filtering performance and a smooth and stable output, but a slow learning speed and lag in dynamic response.
[0088] In this embodiment, a PI regulator is used to extract the steady-state component of the disturbance voltage. As a hybrid disturbance observer, the PI regulator combines the robustness and smoothness of sliding mode to achieve dynamic adaptive compensation of the software dead time. It can identify and cancel voltage distortion caused by a combination of factors such as dead time and switching nonlinearity in real time, making the motor run more smoothly at low speeds.
[0089] In some exemplary embodiments, using the target compensation voltage as the compensation voltage for the next switching cycle to perform voltage compensation on the target voltage command includes: using the target compensation voltage as the compensation voltage for the next switching cycle to correct the voltage indicated by the target voltage command, thereby obtaining an updated target voltage command.
[0090] In this embodiment, when performing voltage compensation on the target voltage command, the target compensation voltage can be used as the compensation voltage for the next switching cycle to correct the voltage indicated by the target voltage command, thereby updating the target voltage command. The updated target voltage command can be sent to the inverter 104, which controls the operation of the brushless motor 106 based on the updated target voltage command.
[0091] There are several ways to correct the voltage indicated by the target voltage command. For example, the target compensation voltage can be superimposed on the terminal voltage indicated by the target voltage command, or the target compensation voltage can be multiplied by a weighting factor and then superimposed on the terminal voltage indicated by the target voltage command. Other correction methods can also be used, as long as they can reduce voltage disturbances.
[0092] This embodiment uses a compensation voltage to correct the voltage indicated by the voltage command, which simplifies the voltage compensation process and improves the convenience and efficiency of voltage compensation.
[0093] In some exemplary embodiments, zero-crossing freezing can be performed when the current amplitude is less than a set current threshold (i.e., the target current threshold). In this case, the previous reliable compensation voltage can be used to avoid learning incorrect information in sensitive areas, thereby preventing voltage distortion.
[0094] Correspondingly, voltage compensation for the target voltage command based on the target disturbance voltage also includes: when the current amplitude of the actual terminal current of the brushless motor 106 in the current switching cycle is less than the target current threshold, the compensation voltage of the current switching cycle is used as the compensation voltage of the next switching cycle to compensate the target voltage command.
[0095] The compensation voltage for the current switching cycle refers to the compensation voltage used to compensate the voltage command corresponding to the current switching cycle. It can be the steady-state component extracted from the previously determined disturbance voltage (the current switching cycle changes over time, and the determination of the disturbance voltage is a dynamic process), or it can be the compensation voltage from the previous switching cycle that is used in the current switching cycle.
[0096] Using the compensation voltage of the current switching cycle as the compensation voltage of the next switching cycle, the voltage compensation for the target voltage command can be performed as follows: The compensation voltage of the current switching cycle is used as the compensation voltage of the next switching cycle to correct the voltage indicated by the target voltage command, thus obtaining an updated target voltage command. The method of correcting the voltage indicated by the target voltage command is the same as or similar to that in the previous embodiments, and will not be elaborated here.
[0097] For example, such as Figure 3 As shown, after determining the voltage error ΔV, a zero-crossing detection can be performed to determine whether the current point is a zero-crossing point. If it is a zero-crossing point, the PI regulator is frozen, ΔV1 is stopped from being updated, and the previous reliable value is used. If it is not a zero-crossing point, the PI regulator is used to update ΔV1, and ΔV1 is used for voltage compensation.
[0098] In this embodiment, by performing current zero-crossing detection and using a reliable compensation voltage near the current zero-crossing point, it is possible to avoid learning incorrect information in sensitive areas, thereby preventing voltage distortion.
[0099] The voltage compensation method for the brushless motor 106 in this application embodiment will be explained below with reference to optional examples. This optional example provides an adaptive dead-zone compensation algorithm based on voltage error injection. It uses the tracking error of the motor current loop to calculate the equivalent voltage error caused by factors such as dead zone, and injects it into the system as a feedforward compensation amount.
[0100] Combination Figure 4 The voltage compensation method for the brushless motor 106 in this optional example may include the following steps:
[0101] Step S402: Read the three-phase line currents of the brushless motor 106A, B, C (the three-phase line currents of the (k-1)th cycle) and convert them into real-time terminal currents (i.e., actual terminal currents) on the D-axis and Q-axis coordinate systems.
[0102] Step S404: Read the speed and torque of the brushless motor 106 (speed and torque of the (k-1)th cycle) and convert them into ideal terminal currents on the D-axis and Q-axis coordinate systems;
[0103] Step S406: Substitute the real-time terminal current and the ideal terminal current into the ideal equation of the motor drive for calculation and subtract the results to obtain the voltage error value;
[0104] Step S408: Substitute the voltage error value into the PI regulator to calculate its steady-state component, which is the compensation value.
[0105] Step S410: Feedback the compensation value to the controller 102 to execute the output.
[0106] The controller 102 may include a feedforward compensator. The inputs of the feedforward compensator include a set reference voltage and a compensation value obtained by an adaptive dead-zone compensation algorithm. Based on the input reference voltage and compensation value, the feedforward compensator outputs a voltage command to the inverter 104, thereby controlling the inverter 104 to generate a PWM signal. The inverter 104 then controls the operation of the brushless motor 106 based on the generated PWM signal.
[0107] This optional example demonstrates how adaptive voltage error injection can dynamically compensate for voltage distortion caused by factors such as dead zone and switching delay, resulting in smoother low-speed motor operation. It can solve the problems of low compensation accuracy, zero-crossing failure, and inability to adapt to the nonlinearity of switching transistors (e.g., transistor voltage drop / delay changes with current and temperature) in fixed-time dead zone compensation.
[0108] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0109] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the related technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / random access memory (RAM), magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0110] According to another aspect of the embodiments of this application, a voltage compensation system for a brushless motor is also provided. This brushless motor voltage compensation system can be used to implement the brushless motor voltage compensation method provided in the above embodiments, and will not be repeated as already described. As used below, the terms "unit" and "module" are equivalent to a combination of software and / or hardware that can perform a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0111] Figure 5 This is a system schematic diagram of an optional brushless motor voltage compensation system according to an embodiment of this application, as shown below. Figure 5 As shown, the voltage compensation system for the brushless motor includes a controller 102, an inverter 104, and a feedforward compensation unit 502, and may also include the brushless motor 106. The feedforward compensation unit 502 may be a separate device, or it may be part of the controller 102, or it may include a portion of the controller 102 and other devices outside the controller 102.
[0112] The controller 102 is used to output voltage commands to the inverter 104;
[0113] The inverter 104 is used to control the operation of the brushless motor 106 in response to the voltage command of the controller 102;
[0114] The feedforward compensation unit 502 is used to determine the reference actual terminal voltage of the brushless motor 106 based on the reference actual terminal current of the brushless motor 106, wherein the reference actual terminal current is the actual terminal current of the brushless motor 106 in a reference switching cycle, and the reference switching cycle is no later than the current switching cycle; predict the reference desired terminal current of the brushless motor 106 based on the reference motor parameters of the brushless motor 106, and determine the reference desired terminal voltage of the brushless motor 106 based on the reference desired terminal current, wherein the reference motor parameters are the target motor parameters of the brushless motor 106 in the reference switching cycle; determine the voltage difference between the reference actual terminal voltage and the reference desired terminal voltage as the target disturbance voltage, and perform voltage compensation on the target voltage command based on the target disturbance voltage, wherein the target voltage command is the voltage command output by the controller 102 to the inverter 104 corresponding to the next switching cycle of the current switching cycle.
[0115] It should be noted that the feedforward compensation unit 502 in this embodiment can be used to execute steps S202, S204 and S206 in the above embodiments.
[0116] The embodiments provided in this application determine the reference actual terminal voltage of the brushless motor 106 based on the reference actual terminal current of the brushless motor 106, wherein the reference actual terminal current is the actual terminal current of the brushless motor 106 in a reference switching cycle, and the reference switching cycle is no later than the current switching cycle; the reference expected terminal current of the brushless motor 106 is predicted based on the reference motor parameters of the brushless motor 106, and the reference expected terminal voltage of the brushless motor 106 is determined based on the reference expected terminal current, wherein the reference motor parameters are the target motor parameters of the brushless motor 106 in the reference switching cycle; the voltage difference between the reference actual terminal voltage and the reference expected terminal voltage is determined as the target disturbance voltage, and voltage compensation is performed on the target voltage command based on the target disturbance voltage, wherein the target voltage command is a voltage command output by the controller 102 to the inverter 104 corresponding to the next switching cycle of the current switching cycle, and the inverter 104 is used to control the operation of the brushless motor 106. This can solve the technical problem of low compensation accuracy in the voltage compensation method of brushless motors in related technologies and improve the compensation accuracy.
[0117] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0118] According to another aspect of the embodiments of this application, a computer-readable storage medium is provided, the computer-readable storage medium including a stored program, wherein the program executes the steps in any of the above method embodiments when it is run.
[0119] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, ROMs, RAMs, portable hard drives, magnetic disks, or optical disks.
[0120] According to another aspect of the embodiments of this application, an electronic device is provided, which may have a brushless motor. The electronic device may be, but is not limited to, one of the following: a two-wheeled electric vehicle, a medical device, a collaborative robot, an electric power steering system, or other equipment. In this embodiment, the type of electronic device is not limited.
[0121] In this embodiment, the electronic device may include a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor is configured to perform the steps in any of the above method embodiments via the computer program. In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0122] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0123] According to another aspect of the embodiments of this application, a computer program product is also provided, comprising a computer program / instructions containing program code for performing the methods shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via communication section 609, and / or installed from removable medium 611. When the computer program is executed by central processing unit 601, it performs various functions provided in the embodiments of this application. The sequence numbers of the embodiments of this application above are merely descriptive and do not represent the superiority or inferiority of the embodiments.
[0124] Figure 6 A schematic block diagram of a computer system architecture for implementing embodiments of the present application is shown. Figure 6 As shown, the computer system 600 includes a Central Processing Unit (CPU) 601, which performs various appropriate actions and processes based on programs stored in ROM 602 or loaded into RAM 603 from storage section 608. Random access memory 603 also stores various programs and data required for system operation. The CPU 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0125] The following components are connected to I / O interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), and speakers, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card, such as a local area network card or modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to I / O interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 610 as needed so that computer programs read from it can be installed into storage section 608 as needed.
[0126] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 609, and / or installed from removable medium 611. When the computer program is executed by central processing unit 601, it performs various functions defined in the system of this application.
[0127] It should be noted that, Figure 6 The computer system 600 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0128] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0129] The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.
Claims
1. A voltage compensation method for a brushless motor, characterized in that, include: Based on the reference actual terminal current of the brushless motor, the reference actual terminal voltage of the brushless motor is determined, wherein the reference actual terminal current is the actual terminal current of the brushless motor in a reference switching cycle, and the reference switching cycle is no later than the current switching cycle. Based on the reference motor parameters of the brushless motor, the reference desired terminal current of the brushless motor is predicted, and based on the reference desired terminal current, the reference desired terminal voltage of the brushless motor is determined, wherein the reference motor parameters are the target motor parameters of the brushless motor in the reference switching cycle. The voltage difference between the reference actual terminal voltage and the reference desired terminal voltage is determined as the target disturbance voltage. Based on the target disturbance voltage, voltage compensation is performed on the target voltage command. The target voltage command is a voltage command output by the controller to the inverter that corresponds to the next switching cycle of the current switching cycle. The inverter is used to control the operation of the brushless motor.
2. The method according to claim 1, characterized in that, The step of compensating the target voltage command based on the target disturbance voltage includes: When the amplitude of the actual terminal current of the brushless motor in the current switching cycle is greater than or equal to the target current threshold, the steady-state component of the target disturbance voltage is extracted to obtain the target compensation voltage. The target compensation voltage is used as the compensation voltage for the next switching cycle to compensate the target voltage command.
3. The method according to claim 2, characterized in that, The step of extracting the steady-state component of the target disturbance voltage to obtain the target compensation voltage includes: The target disturbance voltage is input to a proportional-integral (PI) regulator to obtain the target compensation voltage output by the PI regulator. The PI regulator is used to perform discretized PI integration processing on the input voltage of the PI regulator to extract the steady-state component of the input voltage of the PI regulator.
4. The method according to claim 2, characterized in that, The step of using the target compensation voltage as the compensation voltage for the next switching cycle to perform voltage compensation on the target voltage command includes: The target compensation voltage is used as the compensation voltage for the next switching cycle, and the voltage indicated by the target voltage command is corrected to obtain an updated target voltage command.
5. The method according to claim 2, characterized in that, The step of performing voltage compensation on the target voltage command based on the target disturbance voltage further includes: If the amplitude of the actual terminal current of the brushless motor in the current switching cycle is less than the target current threshold, the compensation voltage of the current switching cycle is used as the compensation voltage of the next switching cycle to compensate for the target voltage command.
6. The method according to claim 1, characterized in that, Before determining the reference actual terminal voltage of the brushless motor based on the reference actual terminal current of the brushless motor, the method further includes: The reference three-phase line current of the brushless motor in the previous switching cycle of the current switching cycle is read, and the reference three-phase line current is converted into the reference direct-axis current and the reference quadrature-axis current of the brushless motor. The reference switching cycle is the previous switching cycle of the current switching cycle, and the reference actual terminal current includes the reference direct-axis current and the reference quadrature-axis current.
7. The method according to claim 1, characterized in that, The step of determining the reference actual terminal voltage of the brushless motor based on the reference actual terminal current of the brushless motor includes: inputting the reference actual terminal current into the motor drive model to obtain the reference actual terminal voltage output by the motor drive model; The step of determining the reference expected terminal voltage of the brushless motor based on the reference expected terminal current includes: inputting the reference expected terminal current into the motor drive model to obtain the reference expected terminal voltage output by the motor drive model; The motor drive model is used to determine the resistance voltage drop, the inductance voltage drop, and the rotational back electromotive force of the brushless motor based on the input current of the motor drive model, and outputs the terminal voltage determined by the resistance voltage drop, the inductance voltage drop, and the rotational back electromotive force of the brushless motor.
8. The method according to any one of claims 1 to 7, characterized in that, The prediction of the reference desired terminal current of the brushless motor based on the reference motor parameters of the brushless motor includes: Based on the reference motor speed and reference motor torque of the brushless motor, the reference desired terminal current is predicted, wherein the reference motor speed is the target speed of the brushless motor in the reference switching cycle, and the reference motor torque is the target torque of the brushless motor in the reference switching cycle, and the reference motor parameters include the reference motor speed and the reference motor torque.
9. A voltage compensation system for a brushless motor, characterized in that, include: The system comprises a controller, an inverter, and a feedforward compensation unit, wherein the controller is electrically connected to the inverter, the inverter is electrically connected to the brushless motor, and the feedforward compensation unit is electrically connected to both the controller and the brushless motor. The controller is used to output voltage commands to the inverter; The inverter is used to control the operation of the brushless motor in response to the voltage command of the controller; The feedforward compensation unit is used to determine the reference actual terminal voltage of the brushless motor based on the reference actual terminal current of the brushless motor, wherein the reference actual terminal current is the actual terminal current of the brushless motor in a reference switching cycle, and the reference switching cycle is no later than the current switching cycle; predict the reference desired terminal current of the brushless motor based on the reference motor parameters of the brushless motor, and determine the reference desired terminal voltage of the brushless motor based on the reference desired terminal current, wherein the reference motor parameters are the target motor parameters of the brushless motor in the reference switching cycle; determine the voltage difference between the reference actual terminal voltage and the reference desired terminal voltage as the target disturbance voltage, and perform voltage compensation on the target voltage command based on the target disturbance voltage, wherein the target voltage command is a voltage command output by the controller to the inverter corresponding to the next switching cycle of the current switching cycle.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.