Motor dead zone compensation method and device, vehicle and storage medium
By selecting the target command current and compensation duty ratio according to the actual phase current and speed in the motor control, the phase voltage command is directly compensated, which solves the problem of torque output instability caused by dead time in the motor control, and improves the stability of torque output and control stability.
Patent Information
- Application Number
- CN202411372767.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-03
AI Technical Summary
In motor control, due to artificial insertion dead time, the motor's torque output is unstable, especially under low-speed and high-torque operating conditions, which significantly fluctuates, affecting the stability of the control and user experience.
By obtaining the actual phase current and command current, selecting the target command current according to its size, and determining the compensation duty ratio based on the current speed and target command current, directly compensate the phase voltage command, avoiding the current harmonic caused by redundant transformation, and achieving accurate Dead-zone compensation.
It improves the motor's torque output stability and control stability, reduces torque fluctuations, and improves user experience, especially in low-speed and high-torque conditions, which can still maintain a good dead-band compensation function.
Smart Images

Figure CN119254062A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of motor control technology, and in particular to a motor dead zone compensation method, device, vehicle and storage medium. Background Art
[0002] The permanent magnet synchronous motor is driven by a three-phase bridge. MOSFET is the main component of the three-phase bridge. At the same time, there is a certain switching delay in the MOSFET control switch. In order to avoid the short circuit caused by the direct conduction of the upper and lower bridge MOSFETs on the same bridge arm of the motor drive, it is necessary to artificially insert a dead time in the control MOSFET switch signal to avoid this situation. However, the artificially inserted dead time will cause a voltage drop between the target voltage of the motor control and the actual output voltage to the three phases of the motor. This voltage drop will affect the smoothness of the torque output of the entire motor and the stability of control to a certain extent. This is especially obvious when the motor works at low speed and high torque.
[0003] Due to the artificial insertion of dead time in motor control, there will be a certain gap between the motor voltage command calculated by the software and the voltage command output by the three-phase bridge inverter to the motor. This gap will cause a large distortion when the phase current passes through zero. The zero-crossing distortion of the phase current will cause the 5th and 7th harmonics of the phase current, which will eventually be reflected in the motor output torque and cause a large 6th torque fluctuation. This torque fluctuation is particularly obvious under low-speed conditions. Summary of the invention
[0004] In view of this, the present invention provides a motor dead zone compensation method, device, vehicle and storage medium to solve the problem in the related art that the smoothness of the torque output and the stability of the control of the entire motor are affected by artificially inserting dead time in motor control.
[0005] In a first aspect, the present invention provides a motor dead zone compensation method, the method comprising:
[0006] Obtain the actual phase current and the corresponding command current of each phase of the target motor;
[0007] Based on the magnitude relationship between the actual phase current of each phase and the preset phase current selection threshold, each corresponding target command current is selected from the actual phase current of each phase and the corresponding command current;
[0008] Determine a compensation duty cycle value of each phase based on the current speed of the target motor and each corresponding target command current;
[0009] The current phase voltage command of the corresponding phase of the target motor is compensated based on each corresponding target command current and compensation duty cycle value.
[0010] The present invention judges the current zero-crossing moment by reasonably selecting the target command current according to the size of the actual phase current, so that the dead zone compensation moment is more accurate and efficient, so as to avoid the delay of using the command current to judge the zero-crossing point when the command current suddenly changes, and determines the compensation duty cycle value according to the current motor speed and the target command current, directly compensates the duty cycle value, avoids current harmonics caused by redundant transformation, and realizes an accurate dead zone compensation, so that the motor controller can still perform a good dead zone compensation function under the working conditions of low speed and high torque, improves phase current distortion, reduces torque fluctuation, improves the smoothness of the torque output of the whole motor and the stability of control, and enhances the user experience.
[0011] In an optional implementation, the selecting each corresponding target command current from the actual phase current of each phase and the corresponding command current based on the magnitude relationship between the actual phase current of each phase and the preset phase current selection threshold value includes:
[0012] Determine whether the current corresponding actual phase current is less than the preset phase current selection threshold;
[0013] When the current corresponding actual phase current is less than the preset phase current selection threshold, the current corresponding command current is determined as the current corresponding target command current.
[0014] The present invention compares the actual phase current of each phase with a preset phase current selection threshold value. When the actual phase current is less than the preset phase current selection threshold value, the command current of the corresponding phase is used as the target command current to judge the current zero-crossing moment, thereby realizing the individual selection of the target command current of each phase, making the dead zone compensation moment more accurate and efficient, and avoiding the delay in using the command current for zero-crossing judgment in the case of a sudden change in the command current.
[0015] In an optional embodiment, the method further includes:
[0016] When the current corresponding actual phase current is not less than the preset phase current selection threshold, the current corresponding actual phase current is determined as the current corresponding target command current.
[0017] The present invention compares the actual phase current of each phase with a preset phase current selection threshold. When the actual phase current is not less than the preset phase current selection threshold, the actual phase current is directly used as the target command current to judge the current zero-crossing moment, thereby realizing the individual selection of the target command current of each phase, making the dead zone compensation moment more accurate and efficient, and avoiding the delay in using the command current for zero-crossing judgment when the command current changes suddenly.
[0018] In an optional implementation manner, determining the compensation duty cycle value of each phase based on the current speed of the target motor and each corresponding target command current includes:
[0019] Determine whether the current corresponding target command current is less than a preset phase current threshold;
[0020] When the current corresponding target command current is less than the preset phase current threshold, the compensation duty cycle value of the current phase is determined from a preset query table based on the current corresponding target command current and the current speed. The preset query table is a mapping relationship table of different phase currents, different speeds and compensation duty cycles.
[0021] The present invention determines whether the compensation conditions are met by setting a preset phase current threshold. When the compensation conditions are met, a reasonable compensation duty cycle is obtained through a pre-calibrated preset query table to directly compensate for the duty cycle value, avoid current harmonics caused by redundant conversion, achieve accurate dead zone compensation, improve phase current distortion, and reduce torque fluctuations.
[0022] In an optional embodiment, the method further includes:
[0023] When the current corresponding target command current is not less than the preset phase current threshold, the compensation duty cycle value of the current phase is determined to be zero.
[0024] The present invention determines whether the compensation condition is met by setting a preset phase current threshold, and when the current corresponding target instruction current is not less than the preset phase current threshold, it is determined that the compensation condition is not met, and the corresponding compensation duty cycle is set to zero, and no compensation is required.
[0025] In an optional implementation, the compensating the current phase voltage command of the corresponding phase of the target motor based on each corresponding target command current and compensation duty cycle value respectively includes:
[0026] Determine a compensation coefficient of a current corresponding compensation duty cycle value based on the positive or negative value of the current corresponding target command current;
[0027] The current duty cycle in the current phase voltage command of the current phase of the target motor is compensated based on the current corresponding compensation duty cycle value and the compensation coefficient.
[0028] The present invention determines the compensation coefficient of each phase compensation duty cycle value by making a polarity judgment based on the positive or negative value of each target command current, and then uses the compensation duty cycle value of each phase and the corresponding compensation coefficient to compensate the current duty cycle in each phase voltage command respectively, thereby further improving the accuracy of the dead zone compensation moment.
[0029] In an optional implementation manner, the determining of the compensation coefficient of the current corresponding compensation duty cycle value based on the positive or negative value of the current corresponding target command current includes:
[0030] When the current corresponding target command current is a positive number, the compensation coefficient of the current corresponding compensation duty cycle value is determined to be 1;
[0031] When the current corresponding target command current is a negative number, the compensation coefficient of the current corresponding compensation duty cycle value is determined to be -1;
[0032] When the current corresponding target command current is zero, the compensation coefficient of the current corresponding compensation duty cycle value is determined to be zero.
[0033] The present invention sets the compensation coefficient to 1 to increase the duty cycle when the target command current is a positive number, sets the compensation coefficient to -1 to reduce the duty cycle when the target command current is a negative number, and sets the compensation coefficient to 0 to not perform duty cycle compensation when the target command current is zero, thereby achieving accurate compensation of the duty cycle under different polarities by making a polarity judgment based on the positive or negative of the target command current.
[0034] In an optional implementation, compensating the current duty cycle in the current phase voltage command of the current phase of the target motor based on the current corresponding compensation duty cycle value and the compensation coefficient includes:
[0035] The product of the current phase compensation duty cycle value and the compensation coefficient is summed with the current duty cycle to obtain the current phase voltage command of the current phase after compensation.
[0036] The present invention realizes accurate compensation of the phase voltage instruction by summing the product of the current corresponding compensation duty cycle value and the compensation coefficient with the current duty cycle.
[0037] In an optional embodiment, the method further includes:
[0038] Based on the current phase voltage command after compensation of each phase of the target motor, the target motor is controlled to operate, and the step of obtaining the actual phase current and the corresponding command current of each phase of the target motor is returned.
[0039] The present invention controls the operation of the target motor by utilizing the current phase voltage command after compensation of each phase, thereby improving the phase current distortion of the target motor, reducing torque fluctuations, improving the smoothness of the torque output and the stability of control of the entire motor, and enhancing the user experience.
[0040] In an optional implementation, the preset query table is determined in the following manner:
[0041] The test motor is tested by inputting different preset compensation duty cycles under test conditions of different motor speeds and different phase currents;
[0042] Determining the optimal compensation duty ratio corresponding to each test condition based on the sinusoidality of the phase current waveform of the test motor under different preset compensation duty ratios;
[0043] The preset query table is generated based on different test conditions and the optimal compensation duty ratios corresponding to the different test conditions.
[0044] The present invention calibrates the optimal compensation duty cycle corresponding to each test condition by performing compensation duty cycle tests under different test conditions, and generates a corresponding preset query table to provide an accurate data basis for the subsequent precise compensation of the duty cycle.
[0045] In a second aspect, the present invention provides a motor dead zone compensation device, the device comprising:
[0046] An acquisition module, used to acquire the actual phase current and the corresponding command current of each phase of the target motor;
[0047] A first processing module, configured to select each corresponding target command current from the actual phase current of each phase and the corresponding command current based on a magnitude relationship between the actual phase current of each phase and a preset phase current selection threshold;
[0048] A second processing module, for determining a compensation duty cycle value of each phase based on a current speed of the target motor and each corresponding target command current;
[0049] The third processing module is used to compensate the current phase voltage command of the corresponding phase of the target motor based on each corresponding target command current and compensation duty cycle value.
[0050] In a third aspect, the present invention provides a vehicle, comprising: a motor and a motor controller, wherein the motor controller comprises: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the method described in the first aspect and any one of its optional embodiments by executing the computer instructions.
[0051] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method provided in the first aspect or any corresponding embodiment thereof.
[0052] Beneficial effects of the present invention:
[0053] The present invention judges the current zero-crossing moment by reasonably selecting the target command current according to the size of the actual phase current, so that the dead zone compensation moment is more accurate and efficient, so as to avoid the delay of using the command current to judge the zero-crossing point when the command current suddenly changes, and determines the compensation duty cycle value according to the current motor speed and the target command current, directly compensates the duty cycle value, avoids current harmonics caused by redundant transformation, and realizes an accurate dead zone compensation, so that the motor controller can still perform a good dead zone compensation function under the working conditions of low speed and high torque, improves phase current distortion, reduces torque fluctuation, improves the smoothness of the torque output of the whole motor and the stability of control, and enhances the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0055] Figure 1 is a flow chart of a motor dead zone compensation method according to an embodiment of the present invention;
[0056] Figure 2 is a flow chart of another motor dead zone compensation method according to an embodiment of the present invention;
[0057] Figure 3 is a general scheme block diagram of a motor dead zone compensation method according to an embodiment of the present invention;
[0058] Figure 4 is a flowchart of dead zone compensation duty cycle value calibration according to an embodiment of the present invention;
[0059] Figure 5 This is a schematic diagram of the three-phase current waveform simulated by Simulink without dead zone compensation;
[0060] Figure 6 It is a schematic diagram of three-phase current waveforms after dead zone compensation is performed using the method of an embodiment of the present invention through Simulink modeling;
[0061] Figure 7 is a structural schematic diagram of a motor dead zone compensation device according to an embodiment of the present invention;
[0062] Figure 8 4 is a schematic diagram of the structure of a motor controller of a vehicle according to an embodiment of the present invention. DETAILED DESCRIPTION
[0063] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0064] The permanent magnet synchronous motor is driven by a three-phase bridge. MOSFET is the main component of the three-phase bridge. At the same time, there is a certain switching delay in the MOSFET control switch. In order to avoid the short circuit caused by the direct conduction of the upper and lower bridge MOSFETs on the same bridge arm of the motor drive, it is necessary to artificially insert a dead time in the control MOSFET switch signal to avoid this situation. However, the artificially inserted dead time will cause a voltage drop between the target voltage of the motor control and the actual output voltage to the three phases of the motor. This voltage drop will affect the smoothness of the torque output of the entire motor and the stability of control to a certain extent. This is especially obvious when the motor works at low speed and high torque.
[0065] Due to the artificial insertion of dead time in motor control, there will be a certain gap between the motor voltage command calculated by the software and the voltage command output by the three-phase bridge inverter to the motor. This gap will cause a large distortion when the phase current passes through zero. The zero-crossing distortion of the phase current will cause the 5th and 7th harmonics of the phase current, which will eventually be reflected in the motor output torque and cause a large 6th torque fluctuation. This torque fluctuation is particularly obvious under low-speed conditions.
[0066] Based on the above problems, in view of the dead zone effect existing in motor control, an embodiment of the present invention provides a motor dead zone compensation scheme, taking into account the inaccuracy of the dead zone compensation zero point judgment due to current fluctuations, so as to make a judgment based on the actual phase current, and switch to the target command current for zero point judgment at the position about to reach the zero point. This method solves the delay of using the original command current for zero point judgment in the case of sudden change of the command current, and at the same time, the table is looked up and the compensation duty cycle value is output according to the current motor speed and the target command current. This method reasonably selects the phase current to judge the phase current zero point moment, and then calibrates the compensation duty cycle value according to the motor speed and the target command current, so that the motor controller can still perform a good dead zone compensation function under the working conditions of low speed and high torque, the phase current distortion is significantly improved, and the torque fluctuation is significantly reduced. It can be applied to projects such as wire control steering. This scheme enables the electric power steering system to obtain a better low-speed feel and improve product competitiveness by providing a simple compensation time duty cycle scheme.
[0067] According to an embodiment of the present invention, an embodiment of a motor dead zone compensation method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0068] In this embodiment, a motor dead zone compensation method is provided, which is applied to a motor controller of a vehicle such as a single-chip microcomputer MCU, etc. Figure 1 is a flow chart of motor dead zone compensation according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0069] Step S101, obtaining the actual phase current and the corresponding command current of each phase of the target motor.
[0070] Specifically, the command current of each phase in the ABC stationary coordinate system can be obtained according to the motor DQ axis current command and the motor electrical angle in the DQ rotating coordinate system through inverse Park and inverse Clarke transformation. The specific implementation process is the existing technology and can be implemented with reference to the relevant description in the existing technology, which will not be repeated here.
[0071] Step S102 : selecting each corresponding target command current from the actual phase current of each phase and the corresponding command current based on the magnitude relationship between the actual phase current of each phase and the preset phase current selection threshold.
[0072] Among them, the preset phase current selection threshold needs to be set according to the motor controller type and rated current. In practical applications, the preset phase current selection threshold is usually around 1-2A of the physical value. It is necessary to consider the problems caused by the sudden change of the motor current command. Since the impact is greater when the sudden current is greater than 1-2A, 1-2A is selected.
[0073] Specifically, if the actual phase current of the current phase is less than the preset phase current selection threshold, it means that there is no obvious mutation in the current command of the motor. Therefore, the command current obtained by transforming the DQ axis current command in the above step S101 can be used as the target command current. Conversely, if the actual phase current of the current phase is not less than the preset phase current selection threshold, it means that there is an obvious mutation in the current command of the motor. At this time, the actual phase current of the current phase is directly used as the target command current, making the dead zone compensation moment more accurate and efficient.
[0074] Step S103 , determining a compensation duty cycle value of each phase based on the current speed of the target motor and each corresponding target command current.
[0075] Specifically, the higher the motor speed is within the motor control unit cycle, the greater the duty cycle is, the smaller the proportion of artificially inserted dead time is, and the less obvious the corresponding phase current distortion is. Therefore, it is necessary to consider the influence of the speed on the compensation duty cycle. In addition, due to the presence of inductive loads, the current conversion rate will affect the voltage drop caused by the dead zone. Therefore, it can be characterized that under the same speed conditions, the size of the command current will affect the size of the dead zone compensation duty cycle value. Therefore, the target command current variable needs to be considered when determining the compensation duty cycle value. In this way, the compensation duty cycle value can be accurately determined under different motor speeds and different target command current conditions.
[0076] Step S104 , compensating the current phase voltage command of the corresponding phase of the target motor based on each corresponding target command current and compensation duty cycle value.
[0077] Specifically, by accurately compensating the duty cycle of each phase of the phase voltage command, accurate compensation of the phase voltage command can be achieved to improve phase current distortion and reduce torque fluctuation.
[0078] The embodiment of the present invention judges the current zero-crossing moment by reasonably selecting the target command current according to the size of the actual phase current, so that the dead zone compensation moment is more accurate and efficient, so as to avoid the delay of using the command current to judge the zero-crossing point when the command current suddenly changes, and determines the compensation duty cycle value according to the current motor speed and the target command current, directly compensates the duty cycle value, avoids current harmonics caused by redundant transformation, and realizes an accurate dead zone compensation, so that the motor controller can still perform a better dead zone compensation function under the working conditions of low speed and high torque, improves phase current distortion, reduces torque fluctuation, improves the smoothness of the torque output of the whole motor and the stability of control, and enhances the user experience.
[0079] In this embodiment, a motor dead zone compensation method is also provided, which is applied to a motor controller of a vehicle such as a single-chip microcomputer MCU, etc. Figure 2 is a flow chart of motor dead zone compensation according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0080] Step S201, obtain the actual phase current and the corresponding command current of each phase of the target motor. Figure 1 The relevant description of step S101 is not repeated here.
[0081] Step S202 , based on the magnitude relationship between the actual phase current of each phase and a preset phase current selection threshold, each corresponding target command current is selected from the actual phase current of each phase and the corresponding command current.
[0082] Specifically, the above step S202 includes:
[0083] Step S2021, determine whether the currently corresponding actual phase current is less than a preset phase current selection threshold.
[0084] Step S2022, when the currently corresponding actual phase current is less than the preset phase current selection threshold, determine the currently corresponding command current as the currently corresponding target command current.
[0085] Step S2023, when the currently corresponding actual phase current is not less than the preset phase current selection threshold, determine the currently corresponding actual phase current as the currently corresponding target command current.
[0086] Exemplarily, assume that the preset phase current selection threshold is P. Taking phase A as an example, when the actual phase current of phase A |Ia Feb |<P, the target command current of phase A, that is, the phase current Ia, uses the command current Ia of phase A Ref as the condition judgment for the zero-crossing point; when the actual phase current of phase A |Ia Feb |≥P, the target command current of phase A, that is, the phase current Ia, uses the actual phase current Ia of phase A Feb as the condition judgment for the zero-crossing point. The same applies to the BC phase currents and will not be elaborated here.
[0087] In the embodiment of the present invention, by comparing the actual phase current of each phase with the preset phase current selection threshold, when the actual phase current is less than the preset phase current selection threshold, the command current of the corresponding phase is used as the target command current to judge the current zero-crossing moment. When the actual phase current is not less than the preset phase current selection threshold, the actual phase current is directly used as the target command current to judge the current zero-crossing moment, realizing the separate selection of the target command current of each phase, making the dead-time compensation moment more accurate and efficient, and avoiding the delay situation of using the command current for zero-crossing judgment in the case of sudden change of the command current.
[0088] Step S203, based on the current speed of the target motor and the target command current corresponding to each phase, determine the compensation duty ratio of each phase.
[0089] Specifically, the above step S203 includes:
[0090] Step S2031, determine whether the currently corresponding current target command current is less than the preset phase current threshold.
[0091] Wherein, the preset phase current threshold is about 2-3 times the minimum unit value obtained by converting the current sampling ADC value into a physical value. Exemplarily, assume that the preset phase current threshold is U. Taking the phase current of phase A as an example, when |Ia|<U, the compensation duty ratio is 0; when |Ia|≥U, the duty ratio is compensated under the corresponding conditions.
[0092] Step S2032, when the current corresponding current target command current is less than the preset phase current threshold, the compensation duty cycle value of the current phase is determined from a preset query table based on the current corresponding current target command current and the current speed.
[0093] The preset query table is a mapping relationship table of different phase currents, different rotation speeds and compensation duty cycles.
[0094] Specifically, the preset query table is determined in the following manner:
[0095] Step a1, testing the test motor by inputting different preset compensation duty cycles under test conditions of different motor speeds and different phase currents.
[0096] Step a2, determining the optimal compensation duty cycle corresponding to each test condition based on the sinusoidality of the phase current waveform of the test motor under different preset compensation duty cycles;
[0097] Step a3, generating a preset query table based on different test conditions and the optimal compensation duty ratios corresponding to the different test conditions.
[0098] The embodiment of the present invention calibrates the optimal compensation duty cycle corresponding to each test condition by performing compensation duty cycle tests under different test conditions, and generates a corresponding preset query table to provide an accurate data basis for the subsequent implementation of precise compensation of the duty cycle.
[0099] Step S2033, when the current corresponding target command current is not less than the preset phase current threshold, determining that the compensation duty cycle value of the current phase is zero.
[0100] The embodiment of the present invention determines whether the compensation conditions are met by setting a preset phase current threshold. When the compensation conditions are met, a reasonable compensation duty cycle is obtained through a pre-calibrated preset query table to directly compensate the duty cycle value, thereby avoiding current harmonics caused by redundant transformations, achieving accurate dead zone compensation, improving phase current distortion, and reducing torque fluctuations. When the current corresponding target command current is not less than the preset phase current threshold, it is determined that the compensation conditions are not met, and the corresponding compensation duty cycle is set to zero, without the need for compensation.
[0101] Step S204 , compensating the current phase voltage command of the corresponding phase of the target motor based on each corresponding target command current and compensation duty cycle value.
[0102] Specifically, the above step S204 includes:
[0103] Step S2041, determining a compensation coefficient of a current corresponding compensation duty cycle value based on the positive or negative value of the current corresponding target command current.
[0104] Specifically, when the current corresponding target instruction current is a positive number, the compensation coefficient of the current corresponding compensation duty cycle value is determined to be 1; when the current corresponding target instruction current is a negative number, the compensation coefficient of the current corresponding compensation duty cycle value is determined to be -1; when the current corresponding target instruction current is zero, the compensation coefficient of the current corresponding compensation duty cycle value is determined to be 0.
[0105] In the embodiment of the present invention, when the target command current is positive, the compensation coefficient is set to 1 to increase the duty cycle, when it is negative, the compensation coefficient is set to -1 to reduce the duty cycle, and when the target command current is zero, the compensation coefficient is set to 0 and no duty cycle compensation is performed, thereby achieving accurate compensation of the duty cycle under different polarities by performing polarity judgment based on the positive or negative of the target command current.
[0106] Step S2042, compensating the current duty cycle in the current phase voltage command of the current phase of the target motor based on the current corresponding compensation duty cycle value and the compensation coefficient.
[0107] Specifically, the product of the current corresponding compensation duty cycle value and the compensation coefficient is summed with the current duty cycle to obtain the current phase voltage command of the compensated current phase. The embodiment of the present invention realizes accurate compensation of the phase voltage command by summing the product of the current corresponding compensation duty cycle value and the compensation coefficient with the current duty cycle.
[0108] The embodiment of the present invention determines the compensation coefficient of each phase compensation duty cycle value by making a polarity judgment based on the positive or negative value of each target command current, and then uses the compensation duty cycle value of each phase and the corresponding compensation coefficient to compensate the current duty cycle in each phase voltage command respectively, thereby further improving the accuracy of the dead zone compensation moment.
[0109] Step S205 , based on the current phase voltage command after compensation of each phase of the target motor, the target motor is controlled to operate, and the process returns to step S201 .
[0110] Specifically, the duty cycle information and the compensated duty cycle value calculated by the SVPWM module are added together and then saturated to obtain the three-phase duty cycle value that actually acts on the motor and output it to the motor drive chip to control the operation of the motor.
[0111] The embodiment of the present invention controls the operation of the target motor by utilizing the current phase voltage command after compensation of each phase, thereby improving the phase current distortion of the target motor, reducing torque fluctuations, improving the smoothness of the torque output and the stability of control of the entire motor, and enhancing the user experience.
[0112] The working principle and working process of the motor dead zone compensation solution provided by the embodiment of the present invention will be described in detail below in conjunction with specific application examples.
[0113] In view of the defect that the prior art cannot accurately judge the zero-crossing time, the present invention provides a control scheme for motor dead zone compensation, comprising the following steps:
[0114] like Figure 3 As shown, the three-phase command current in the ABC stationary coordinate system is obtained by reverse Park and reverse Clark transformation according to the motor DQ current command in the DQ rotating coordinate system, namely CurD_Rdf and CurD_Rdf, wherein the three-phase command current includes the command current of each phase. Then, the actual three-phase current of the permanent magnet synchronous motor PMSM is obtained according to the motor controller, and the actual three-phase current includes the actual phase current of each phase. The conditional judgment is performed, that is, only when the absolute value of the actual three-phase current fed back is less than the set current threshold, the ABC three-phase current obtained by the three-phase command current transformation is used to judge the zero-crossing moment of the subsequent compensation condition. This measure can effectively prevent a misjudgment of the compensation time caused by the sudden change of the command current. The dead zone compensation module judges the compensation condition according to the selected phase current. The compensation duty cycle value is obtained according to the motor speed and the selected phase current. Finally, the duty cycle information obtained by SVPWM modulation calculation and the compensation duty cycle value are added and saturated to obtain the three-phase duty cycle value that actually acts on the motor and output to the motor drive chip, namely the pulse generation chip, to control the operation of the permanent magnet synchronous motor PMSM.
[0115] Specifically, the control scheme for motor dead zone compensation can be specifically applied to the wire-controlled chassis, and more specifically to the control of the road sense simulation motor (SBW) in the wire-controlled steering. The wire-controlled steering is an advanced automobile steering system that eliminates the intermediate mechanical connection mechanism of the traditional steering mechanism, and the upper road sense simulator and the lower steering actuator work together to realize the steering of the automobile. By reasonably selecting the phase current to judge the current zero-crossing moment, the dead zone compensation moment is made more accurate and efficient. The motor speed and phase current are calibrated to obtain a reasonable compensation duty cycle value, directly compensate the duty cycle value, avoid the current harmonics caused by redundant transformation, achieve an accurate dead zone compensation, improve the phase current distortion, and reduce the torque fluctuation. At the same time, in engineering practice, there is also a dead zone compensation control strategy that directly judges the dead zone compensation moment through the feedback current and obtains the compensation voltage or current value according to the observer. It should be noted that both the compensation voltage and the compensation current ultimately need to be converted into the compensation duty cycle value through coordinate transformation and SVPWM modulation.
[0116] Further, the steps for determining the duty cycle compensation moment include Step1, Step2, and Step3. The compensation moment is determined by selecting the three-phase command current and the actual three-phase current under different current conditions. That is, when the actual three-phase current is less than the set threshold, the three-phase command current is used to determine the compensation moment; when it is greater than the set threshold, the actual three-phase current is still used to determine the compensation moment to avoid fluctuations caused by sudden changes in the command current.
[0117] Step1: According to the current electrical angle of the motor and the current commands of the DQ axes in the rotating coordinate system, the three-phase command current is obtained through coordinate transformation.
[0118] Step2: Obtain the actual phase current of the motor, and then select the phase current for dead zone compensation switch condition judgment according to the actual phase current value. That is, define a phase current selection threshold P, which is usually about 1 - 2A. The setting must be greater than the threshold U in Step3, and at the same time, the problem caused by sudden changes in the current command of the motor needs to be considered. When the sudden change in current is greater than 1 - 2A, the impact is relatively large, so it is selected as 1 - 2A. Specifically, it also needs to be set according to the type of motor controller and the rated current. As shown in the following formula, when the actual phase current of phase A |Ia Feb |<P, the phase current Ia of phase A uses the phase A command current Ia in the three-phase command current Ref for the condition judgment of the zero crossing point; when the actual phase current of phase A |Ia Feb |≥P, the phase current Ia of phase A uses the actual phase current Ia of phase A Feb for the condition judgment of the zero crossing point. The same applies to the BC phase currents and will not be elaborated here.
[0119]
[0120] Step3: Use the phase current of each phase selected in Step2 to select the compensation condition, that is, the compensation polarity. Set a phase current threshold U. In practical applications, it is about 2 - 3 times the minimum unit value obtained by converting the ADC value of the current sampling into a physical value. When the selected phase current is less than the set threshold U, no compensation is performed. Taking the phase current of phase A as an example, when |Ia|<U, the compensation duty cycle ratio is 0; when |Ia|≥U, the compensation duty cycle ratio is compensated under the corresponding conditions.
[0121] Step4: Query the compensation duty cycle ratio through the motor speed and the phase current selected for each phase in Step2. The reason for looking up the motor speed in the table is that the higher the motor speed within the motor control unit cycle, the larger the duty cycle, the smaller the proportion of the artificially inserted dead time, and the less obvious the distortion of the phase current. Therefore, it is necessary to calibrate the compensation duty cycle according to the speed. In addition, according to the voltage equation of the motor in the DQ rotating coordinate system:
[0122]
[0123] Due to the presence of inductive load, the current conversion rate will affect the voltage drop caused by the dead zone. Therefore, it can be characterized that under the same speed conditions, the size of the command current will affect the size of the dead zone compensation duty cycle value. Therefore, when calibrating the compensation duty cycle value, it is necessary to introduce the variable of the phase current selected for each phase.
[0124] Step 5: Determine the polarity based on the positive or negative phase current and compensate the corresponding duty cycle value. Figure 4 As shown, the compensation duty cycle value is obtained by calibration, that is, under different motor speeds and currents, the compensation duty cycle value is manually input, and the sinusoidal degree of the phase current waveform is checked by the oscilloscope. The positive limit is better, which is the compensation duty cycle value W under the current conditions. The W values obtained under different conditions are sorted to obtain a two-dimensional table with the horizontal and vertical axes of the motor speed and the command current, respectively, which is integrated into the algorithm. When the motor is working normally, the duty cycle value that needs to be compensated in the current state is obtained by looking up the table. Assuming that the compensation duty cycle value is W according to the speed and current, that is, TaCmp=TbCmp=TcCmp=W, the final output duty cycle value is:
[0125]
[0126] Among them, Tat, Tbt, and Tct are the duty cycle values of A, B, and C after compensation, respectively. Ta, Tb, and Tc are the duty cycle values of A, B, and C before compensation, respectively. They can be obtained through the common SVPWM modulation technology of motor control. Sign is the sign function, and the calculation formula is as follows:
[0127]
[0128] Step 6: Perform duty cycle saturation processing, that is, add the three-phase duty cycle and compensation duty cycle calculated by the SVPWM module to limit the maximum and minimum values of the total duty cycle output. The duty cycle is 0-1, that is, 0%-100%, so the minimum value of the duty cycle TatMin is 0 and the maximum value TatMax is 1.
[0129]
[0130] Step 7: Add the duty cycle information calculated by the SVPWM module and the compensated duty cycle value, and then perform saturation processing to obtain the three-phase duty cycle value that actually acts on the motor and output it to the motor driver chip to control the operation of the motor.
[0131] For example, Figure 5 This is a schematic diagram of the three-phase current waveform without dead zone compensation when simulating through Simulink. Figure 6 The three-phase current waveform after dead zone compensation is performed by Simulink modeling using the method of the embodiment of the present invention. Figure 5 and Figure 6 It can be seen from the waveform diagram that by using the motor dead zone compensation solution provided by the embodiment of the present invention, the phase current distortion of the motor is significantly improved and the 6-order torque fluctuation is significantly reduced.
[0132] In this embodiment, a motor dead zone compensation device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0133] The embodiment of the present invention provides a motor dead zone compensation device, such as Figure 7 As shown, the device comprises:
[0134] An acquisition module 701 is used to acquire the actual phase current and the corresponding command current of each phase of the target motor;
[0135] A first processing module 702 is used to select each corresponding target command current from the actual phase current of each phase and the corresponding command current based on the magnitude relationship between the actual phase current of each phase and a preset phase current selection threshold;
[0136] The second processing module 703 is used to determine the compensation duty cycle value of each phase based on the current speed of the target motor and each corresponding target command current;
[0137] The third processing module 704 is used to compensate the current phase voltage command of the corresponding phase of the target motor based on each corresponding target command current and compensation duty cycle value.
[0138] In some optional implementations, the first processing module 702 includes:
[0139] A first judgment unit, used to judge whether the current corresponding actual phase current is less than a preset phase current selection threshold;
[0140] The first processing unit is used to determine the current corresponding command current as the current corresponding target command current when the current corresponding actual phase current is less than a preset phase current selection threshold.
[0141] In some optional implementations, the first processing module 702 further includes:
[0142] The second processing unit is used to determine the current corresponding actual phase current as the current corresponding target command current when the current corresponding actual phase current is not less than a preset phase current selection threshold.
[0143] In some optional implementations, the second processing module 703 includes:
[0144] A second judgment unit is used to judge whether the current corresponding target command current is less than a preset phase current threshold;
[0145] The third processing unit is used to determine the compensation duty cycle value of the current phase from a preset query table based on the current corresponding current target command current and the current speed when the current corresponding current target command current is less than the preset phase current threshold. The preset query table is a mapping relationship table of different phase currents, different speeds and compensation duty cycles.
[0146] In some optional implementations, the second processing module 703 further includes:
[0147] The fourth processing unit is used to determine that the compensation duty cycle value of the current phase is zero when the current corresponding target command current is not less than a preset phase current threshold.
[0148] In some optional implementations, the third processing module 704 further includes:
[0149] a fifth processing unit, configured to determine a compensation coefficient of a current corresponding compensation duty cycle value based on the positive or negative value of the current corresponding target command current;
[0150] The sixth processing unit is used to compensate the current duty cycle in the current phase voltage instruction of the current phase of the target motor based on the current corresponding compensation duty cycle value and the compensation coefficient.
[0151] In some optional implementations, the fifth processing unit includes:
[0152] The first processing subunit is used to determine that the compensation coefficient of the current corresponding compensation duty cycle value is 1 when the current corresponding target command current is a positive number;
[0153] The second processing sub-unit is used to determine the compensation coefficient of the current corresponding compensation duty cycle value to be -1 when the current corresponding target command current is a negative number;
[0154] The third processing subunit is used to determine that the compensation coefficient of the current corresponding compensation duty cycle value is 0 when the current corresponding target command current is zero.
[0155] In some optional implementations, the sixth processing unit includes:
[0156] The fourth processing subunit is used to sum the product of the current duty cycle value corresponding to the current phase and the compensation coefficient to obtain the current phase voltage instruction of the current phase after compensation.
[0157] In some optional implementations, the motor dead zone compensation device further includes:
[0158] The fourth processing module is used to control the operation of the target motor based on the current phase voltage command after compensation of each phase of the target motor, and return to the step of obtaining the actual phase current and the corresponding command current of each phase of the target motor.
[0159] In some optional implementations, the motor dead zone compensation device further includes:
[0160] A fifth processing module, used for testing the test motor by inputting different preset compensation duty cycles under test conditions of different motor speeds and different phase currents;
[0161] A sixth processing module, configured to determine an optimal compensation duty cycle corresponding to each test condition based on the sinusoidality of the phase current waveform of the test motor under different preset compensation duty cycles;
[0162] The seventh processing module is used to generate a preset query table based on different test conditions and the optimal compensation duty ratios corresponding to the different test conditions.
[0163] The motor dead zone compensation device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0164] The further functional description of each of the above modules and units is the same as that of the above corresponding method embodiments and will not be repeated here.
[0165] The embodiment of the present invention further provides a vehicle, the vehicle comprising: a motor and a motor controller, wherein Figure 8As shown, the motor controller includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 8 A processor 10 is taken as an example.
[0166] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0167] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0168] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the use of a computer device based on the presentation of a small program landing page, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0169] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0170] The motor controller further comprises a communication interface 30 for the control unit to communicate with other devices or a communication network.
[0171] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0172] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A motor dead zone compensation method, characterized in that: The method comprises: Obtain the actual phase current and the corresponding command current of each phase of the target motor; Based on the magnitude relationship between the actual phase current of each phase and the preset phase current selection threshold, each corresponding target command current is selected from the actual phase current of each phase and the corresponding command current; Determine a compensation duty cycle value for each phase based on the current speed of the target motor and each corresponding target command current; The current phase voltage command of the corresponding phase of the target motor is compensated based on each corresponding target command current and compensation duty cycle value.
2. The method according to claim 1, characterized in that The selecting each corresponding target command current from the actual phase current of each phase and the corresponding command current based on the magnitude relationship between the actual phase current of each phase and the preset phase current selection threshold value comprises: Determine whether the current corresponding actual phase current is less than the preset phase current selection threshold; When the current corresponding actual phase current is less than the preset phase current selection threshold, the current corresponding command current is determined as the current corresponding target command current.
3. The method according to claim 2, characterized in that The method further comprises: When the current corresponding actual phase current is not less than the preset phase current selection threshold, the current corresponding actual phase current is determined as the current corresponding target command current.
4. The method according to claim 1, characterized in that The step of determining the compensation duty cycle value of each phase based on the current speed of the target motor and each corresponding target command current includes: Determine whether the current corresponding target command current is less than a preset phase current threshold; When the current corresponding target command current is less than the preset phase current threshold, the compensation duty cycle value of the current phase is determined from a preset query table based on the current corresponding target command current and the current speed. The preset query table is a mapping relationship table of different phase currents, different speeds and compensation duty cycles.
5. The method according to claim 4, characterized in that The method further comprises: When the current corresponding target command current is not less than the preset phase current threshold, the compensation duty cycle value of the current phase is determined to be zero.
6. The method according to claim 1, characterized in that The method of compensating the current phase voltage command of the corresponding phase of the target motor based on each corresponding target command current and compensation duty cycle value comprises: Determine a compensation coefficient of a current corresponding compensation duty cycle value based on the positive or negative value of the current corresponding target command current; The current duty cycle in the current phase voltage command of the current phase of the target motor is compensated based on the current phase corresponding compensation duty cycle value and the compensation coefficient.
7. The method according to claim 6, characterized in that The method of determining the compensation coefficient of the current corresponding compensation duty cycle value based on the positive or negative value of the current corresponding target command current includes: When the current corresponding target command current is a positive number, the compensation coefficient of the current corresponding compensation duty cycle value is determined to be 1; When the current corresponding target command current is a negative number, the compensation coefficient of the current corresponding compensation duty cycle value is determined to be -1; When the current corresponding target command current is zero, the compensation coefficient of the current corresponding compensation duty cycle value is determined to be zero.
8. The method according to claim 6, characterized in that The compensating the current duty cycle in the current phase voltage command of the current phase of the target motor based on the current corresponding compensation duty cycle value and the compensation coefficient includes: The product of the current phase compensation duty cycle value and the compensation coefficient is summed with the current duty cycle to obtain the current phase voltage command of the current phase after compensation.
9. The method according to claim 1, characterized in that: The method further comprises: Based on the current phase voltage command after compensation of each phase of the target motor, the target motor is controlled to operate, and the step of obtaining the actual phase current and the corresponding command current of each phase of the target motor is returned.
10. The method according to claim 4, characterized in that The preset query table is determined in the following manner: The test motor is tested by inputting different preset compensation duty cycles under test conditions of different motor speeds and different phase currents; Determining the optimal compensation duty ratio corresponding to each test condition based on the sinusoidality of the phase current waveform of the test motor under different preset compensation duty ratios; The preset query table is generated based on different test conditions and the optimal compensation duty ratios corresponding to the different test conditions.
11. A motor dead zone compensation device, characterized in that: The device comprises: An acquisition module, used to acquire the actual phase current and the corresponding command current of each phase of the target motor; A first processing module, configured to select each corresponding target command current from the actual phase current of each phase and the corresponding command current based on the magnitude relationship between the actual three-phase current of each phase and a preset phase current selection threshold; A second processing module, for determining a compensation duty cycle value of each phase based on a current speed of the target motor and each corresponding target command current; The third processing module is used to compensate the current phase voltage command of the corresponding phase of the target motor based on each corresponding target command current and compensation duty cycle value.
12. A vehicle, characterized in that: The vehicle comprises: a motor and a motor controller, wherein the motor controller comprises: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method according to any one of claims 1 to 10 by executing the computer instructions.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 10.
Citation Information
Cited By
Compressor and current harmonic adjusting system and method thereof
CN121566978A
A compressor and a current harmonic regulation system, regulation method thereof
CN121566978B
