EPS brush motor control method based on single sampling point
By adopting the EPS brushed motor control method based on single sampling points in the electric power steering system, the complexity and accuracy of motor control in the prior art are solved, and the effects of simplifying control strategies, reducing hardware costs and improving control stability are achieved.
Patent Information
- Application Number
- CN202411910011.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-25
AI Technical Summary
The prior art is difficult to simplify the motor control method in electric power steering systems while ensuring control accuracy and stability.
The EPS brushed motor control method based on single sampling points is adopted, and motor control is realized through the H-bridge low-side single-resistance sampling circuit, including configuring the PWM mode as a bipolar mode, configuring the trigger source of the ADC as a PWM signal, collecting the motor zero drift value and op amp output value, calculating the actual current value of the motor, and calculating the required duty cycle instructions through the current loop.
It reduces hardware costs, simplifies control strategies, and ensures the stability and responsiveness of control, realizing bidirectional driving and accurate torque control of the motor.
Smart Images

Figure CN119891868A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a control method for a brushed motor, in particular to a control method for an EPS brushed motor based on a single sampling point, and belongs to the technical field of automobile control. Background Art
[0002] The electric power steering system is a new type of power steering device that has developed rapidly in recent years. Both brushed motors and brushless motors are widely used in it, which also poses a great challenge to the simplicity and stability of motor control. Therefore, simplifying the control method while ensuring control accuracy has become a major problem at present. Summary of the invention
[0003] The present invention provides an EPS brushed motor control method based on a single sampling point, which reduces hardware cost, simplifies control strategy, and ensures control stability and responsiveness.
[0004] In order to achieve the above objectives, the present invention provides an EPS brushed motor control method based on a single sampling point, selecting an H-bridge low-side single resistor sampling circuit to realize motor control, including:
[0005] S1: In the underlying hardware configuration, the PWM mode on the motor drive bridge arm is set to bipolar mode, so that the PWM signal switches between positive and negative poles to ensure that two sets of complementary PWM signals are generated to simultaneously control the four MOS tubes on the motor drive circuit, two high sides and two low sides, to achieve bidirectional drive of the motor;
[0006] S2: To ensure data collection within a complete PWM cycle and improve sampling accuracy and synchronization, the trigger source of the ADC is configured as a PWM signal, and the application layer controls the trigger time through software. According to application requirements, when the PWM signal reaches the zero drift sampling time T set by the application layer software, ZERO =0 or forward sampling time T1 = motor control cycle / 2 or reverse sampling time T2 = 0, trigger ADC to sample; the sampling method adopts PWM trigger form, and the sampling time interval is fixed to the motor task control cycle, so as to ensure the consistency of sampling and the stability of control;
[0007] S3: Turn on the four MOS tubes and send the zero drift sampling time T after the software initialization is completed. ZERO =0, trigger ADC sampling to collect the motor zero drift value AdcZero for subsequent current calculation and calibration;
[0008] S4: In order to determine the rotation direction of the motor so as to correctly calculate the current and perform torque control later, it is necessary to determine the rotation direction of the motor by reading the output of the duty cycle reconstruction algorithm or the relevant sensor signal before collecting the output of the operational amplifier;
[0009] S5: According to the motor rotation direction obtained in S4, the system sends different sampling moments, T1 when the motor rotates forward and T2 when the motor rotates reversely; select the corresponding sampling moment, trigger ADC sampling, and collect the output value of the motor's operational amplifier to ensure that the collected data can accurately reflect the state of the motor;
[0010] S6: Calculate the actual current value of the motor according to the motor rotation direction obtained in S5 and the motor zero drift value collected in S4;
[0011] S7: Compare the command current output by the torque sensor with the actual current value obtained in S6, and obtain the required duty cycle command dutyRef through the current loop calculation;
[0012] S8: The duty cycle command dutyRef calculated in S7 is used to obtain the PWM output command PhaADutyRef of the A-phase high-side MOS tube and the PWM output command PhaBDutyRef of the B-phase low-side MOS tube, as well as the forward and reverse state WorkState of the motor through the duty cycle reconstruction algorithm, and sent to the MCU to realize motor control.
[0013] Furthermore, in S1, PWM is configured as a bipolar mode, specifically as follows:
[0014] The PWM output is configured in bipolar control mode and center-aligned mode. At this time, the motor electrodes are alternating between positive and negative. The A-phase high-side and low-side MOS tubes and the B-phase high-side and low-side MOS tubes output complementary PWM waves respectively, and the PWM output waveform of the A-phase high-side MOS tube is consistent with the PWM output waveform of the B-phase low-side MOS tube. Therefore, it is only necessary to control the A-phase high-side MOS tube and the B-phase low-side MOS tube.
[0015] Furthermore, the low-end current sampling strategy is implemented. The low-end current sampling function uses a high-precision current sampling resistor connected in series near the low end of the motor drive bridge arm bus. When current passes through the motor drive bridge arm bus, the voltage difference between the two ends of the sampling resistor acquired by the ADC is calculated to obtain the current value in the bus. The specific process is as follows:
[0016] Motor zero drift value sampling: When all four MOS tubes are turned on, the voltage value on the low-side sampling resistor is called the motor zero drift value; the zero drift sampling time T is sent down ZERO Trigger ADC sampling to collect the motor zero drift value AdcZero;
[0017] Motor op amp output sampling: All four MOS tubes are closed, and the forward sampling time T1 or reverse sampling time T2 is sent to trigger ADC sampling, and the output value of the op amp is collected forward: AdcPhaA / reverse: AdcPhaB;
[0018] T ZERO =0; T1 = motor control cycle / 2; T2 = 0;
[0019] The ADC sampling is configured as a PWM trigger, and the sampling interval is one motor control task cycle.
[0020] Furthermore, in S6, in order to calibrate and convert the sampling result of the ADC to obtain an accurate motor current value, the zero drift value is subtracted from the operational amplifier output value of the motor and then multiplied by the gain coefficient K1 of the operational amplifier to obtain the actual current value of the motor;
[0021] The processing process is as follows:
[0022] If the motor status flag bit of the duty cycle reconstruction feedback is 0, it means that the motor is rotating forward. At this time:
[0023] I Motor =(AdcPhaA-AdcZero)*K1;
[0024] If the motor status flag bit of the duty cycle reconstruction feedback is 1, it means that the motor is rotating forward. At this time:
[0025] I Motor =(AdcZero-AdcPhaB)*K1;
[0026] At this time, the positive or negative current value obtained can indicate the direction of the motor current. If a positive current value is obtained, it means that the motor is rotating forward, and if a negative current value is obtained, it means that the motor is rotating reversely.
[0027] Furthermore, the current loop module in S7 includes:
[0028] The current loop calculation is the PI regulator, which includes P regulation and I regulation. The voltage vector synthesized by P regulation, I regulation and PI regulation is limited, and the current loop anti-integral saturation strategy is also added. The difference before and after the sum of the P and I regulation outputs, that is, the part that exceeds the P regulation, is subtracted in the I integral operation of the next cycle. The voltage vector output by PI regulation is calibrated to the H-bridge VBAT voltage and the amplitude is limited to the interval (-1, 1), which is the PWM duty cycle of the PI regulation output. The sign is the direction of the voltage vector, that is, the direction of motor rotation.
[0029] Furthermore, in S8, the PWM duty cycle instruction output by the current loop is reconstructed to obtain the A-phase high-side PWM output instruction and the B-phase low-side PWM output instruction, as well as the motor forward and reverse state flag. The algorithm is as follows:
[0030] If DutyRef is in the range of (0,1], the motor rotates forward, and the feedback motor working state flag bit WorkState=0.
[0031] PhaADutyRef = PWM wave period / 4 – DutyRef*(PWM wave period / 4);
[0032] PhaBDutyRef = PWM wave period / 4 – DutyRef*(PWM wave period / 4);
[0033] And the feedback sampling time is the forward sampling time T1;
[0034] If DutyRef is in the interval [-1,0), the motor reverses, and the feedback motor working state flag bit WorkState = 1, PhaADutyRef = PWM wave period / 4 – DutyRef*(PWM wave period / 4);
[0035] PhaBDutyRef = PWM wave period / 4 – DutyRef*(PWM wave period / 4);
[0036] And the feedback sampling time is the reverse sampling time T2;
[0037] If DutyRef=0;
[0038] PhaADutyRef = PWM wave period / 4;
[0039] PhaBDutyRef = PWM wave period / 4;
[0040] And the feedback sampling time is the forward sampling time T1.
[0041] Compared with the prior art, the patent of this invention has the following beneficial effects:
[0042] 1. The entire control logic is intuitive and efficient, and can use the bipolar PWM output mode to control the motor drive circuit, simplifying the complexity of control; 2. Through the low-end sampling strategy, it can simplify the difficulty of hardware design, reduce hardware costs, and distinguish the direction of motor rotation; 3. The duty cycle instruction in the current loop output range [-1,1] simplifies the difficulty of algorithm design; 4. It is easier to implement and has engineering application value. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 The figure is a flow chart of the single sampling point brushless motor control method of the present invention. DETAILED DESCRIPTION
[0044] In order to enable those skilled in the art to better understand the solutions of the embodiments of the present invention, the examples of the present invention are further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0045] In view of the problem of optimizing the control strategy of a brushless motor, the present invention provides an EPS brushless motor control method based on a single sampling point, which simplifies the control strategy, reduces the hardware cost, and ensures the control effect.
[0046] like Figure 1 As shown, a method for controlling an EPS brushless motor based on a single sampling point includes the following steps:
[0047] S1: Configure the PWM on the motor drive bridge arm through the basic software, set the PWM mode to bipolar control mode and center alignment, and use two sets of complementary PWM to control the four MOS tubes.
[0048] S2: To ensure data collection within a complete PWM cycle and improve sampling accuracy and synchronization, the trigger source of the ADC is configured as a PWM signal, and the application layer controls the trigger time through software. According to application requirements, when the PWM signal reaches the zero drift sampling time T set by the application layer software, ZERO =0 or the forward sampling time T1 = motor control period / 2 or the reverse sampling time T2 = 0, the ADC is triggered for sampling.
[0049] S3: Turn on the four MOS tubes and send the zero drift sampling time T after the software initialization is completed. ZERO =0, trigger ADC sampling to collect the motor zero drift value AdcZero for subsequent current calculation and calibration;
[0050] S4: In order to determine the rotation direction of the motor so as to correctly calculate the current and perform torque control later, it is necessary to determine the rotation direction of the motor by reading the output of the duty cycle reconstruction algorithm or the related sensor signal before collecting the output of the operational amplifier.
[0051] S5: According to the motor rotation direction, the sampling time is sent down, the sampling is triggered, and the output value of the operational amplifier is collected;
[0052] S6: According to the motor rotation direction, the motor operational amplifier output value and the zero drift value are subtracted, and then multiplied by the operational amplifier coefficient K1 to calculate the actual current of the motor;
[0053] S7: Obtain the motor command current output by the torque sensor, and calculate the duty cycle command dutyRef according to the current loop module operation.
[0054] S8: Execute the duty cycle reconstruction algorithm on the duty cycle instruction, feedback the motor rotation direction and sampling time, obtain the A-phase high-side MOSFET PWM output instruction and the B-phase low-side MOSFET PWM output instruction, and send them to the MCU to realize motor control.
[0055] Among them, as described in S1, the PWM output needs to be configured as a bipolar mode, because under the single sampling point control strategy, PWM is used to modulate the two-phase voltage of the motor. Only when there is voltage on the phase line, there is current between the phase lines, that is, when they are both at a high level, there is current.
[0056] In addition, to obtain the ADC sampling value of the low-end sampling resistor, it is necessary to obtain the current motor rotation direction and the corresponding sampling time. Because when the motor rotates forward, the current direction is from phase A to phase B. At this time, the output PWM of the high-side MOS tube of phase A and the low-side MOS tube of phase B is greater than 50%. When the corresponding output is high, the current rising trend is more stable and easier to collect. The current rises smoothly, and the sampling time can be set to the center time of the PWM cycle; when the motor reverses, the current direction is from phase B to phase A. At this time, the output PWM of the high-side MOS tube of phase A and the low-side MOS tube of phase B is less than 50%. At this time, when the corresponding output is low, the current rising trend is more stable and easier to collect, and the current drops smoothly. Therefore, time 0 is set as the reversal sampling point, which can ensure that stable and accurate sampling values can be obtained during both forward and reverse rotations.
[0057] When calculating the motor current, the specific calculation process is as follows:
[0058] If the motor status flag bit of the duty cycle reconstruction feedback is 0, it means that the motor is rotating forward. At this time:
[0059] I Motor =(AdcPhaA-AdcZero)*K 1;
[0060] If the motor status flag bit of the duty cycle reconstruction feedback is 1, it means that the motor is rotating forward. At this time:
[0061] I Motor =(AdcZero-AdcPhaB)*K 1;
[0062] At this time, the positive or negative value of the current obtained can indicate the direction of the motor current. A positive value indicates that the motor rotates forward, and a negative value indicates that the motor rotates reversely.
[0063] The current loop operation process is as follows:
[0064] CurDiff = MotCur – CurRef;
[0065] A=K p *CurDiff;
[0066] B=K i *CurDiff;
[0067] CurDiff represents the input of the current loop module.
[0068] Kp and Ki represent the proportion and integral of PI control respectively, and A and B represent the proportional part and integral part of PI control respectively.
[0069] After calculation by the PI regulator, the desired bus voltage value DclinkRef is obtained.
[0070] Get the actual bus voltage value DclinkFdb.
[0071] DutyRef=DclinkRef / DclinkFdb.
[0072] The obtained duty cycle instruction is run through the duty cycle reconstruction algorithm, the algorithm is as follows:
[0073] If DutyRef is in the range of (0,1], the motor rotates forward, and the feedback motor working state flag bit WorkState=0.
[0074] PhaADutyRef = PWM wave period / 4 – DutyRef*(PWM wave period / 4);
[0075] PhaBDutyRef = PWM wave period / 4 – DutyRef*(PWM wave period / 4);
[0076] And the feedback sampling time is the forward sampling time T1;
[0077] If DutyRef is in the interval [-1,0), the motor reverses, and the feedback motor working state flag bit WorkState = 1, PhaADutyRef = PWM wave period / 4 – DutyRef*(PWM wave period / 4);
[0078] PhaBDutyRef = PWM wave period / 4 – DutyRef*(PWM wave period / 4);
[0079] And the feedback sampling time is the reverse sampling time T2;
[0080] If DutyRef=0;
[0081] PhaADutyRef = PWM wave period / 4;
[0082] PhaBDutyRef = PWM wave period / 4;
[0083] And the feedback sampling time is the forward sampling time T1;
[0084] Finally, the calculated A-phase high-side MOSFET output PWM instruction and B-phase low-side MOSFET output PWM instruction are sent to the MCU to realize motor control.
[0085] The above describes in detail the structure, features and effects of the present invention based on the control logic diagram shown in the figure. The above is only a preferred embodiment of the present invention, but the present invention is not limited to the scope of implementation as shown in the drawings. Any changes made in accordance with the concept of the present invention, or modifications to equivalent embodiments with equivalent changes, which do not exceed the scope covered by the specification and the diagram, should be within the protection scope of the present invention.
Claims
1. A single sampling point based EPS brush motor control method, characterized in that: Select the H-bridge low-side single resistor sampling circuit to realize motor control, including: S1: In the underlying hardware configuration, the PWM mode is set to bipolar mode, so that the PWM signal switches between positive and negative poles, ensuring that two sets of complementary PWM signals are generated to simultaneously control the four MOS tubes on the motor drive circuit, two high-side and two low-side, to achieve bidirectional drive of the motor; S2: To ensure data collection within a complete PWM cycle and improve sampling accuracy and synchronization, the trigger source of the ADC is configured as a PWM signal, and the application layer controls the trigger time through software. According to application requirements, when the PWM signal reaches the zero drift sampling time T set by the application layer software, ZERO = 0 or forward sampling time T1 = motor control cycle / 2 or reverse sampling time T2 = 0, trigger ADC to sample; S3: Turn on the four MOS tubes and send the zero drift sampling time T after the software initialization is completed. ZERO = 0, trigger ADC sampling to collect the motor zero drift value AdcZero for subsequent current calculation and calibration; S4: In order to determine the rotation direction of the motor so as to correctly calculate the current and perform torque control later, it is necessary to determine the rotation direction of the motor by reading the output of the duty cycle reconstruction algorithm or the relevant sensor signal before collecting the output of the operational amplifier; S5: According to the motor rotation direction obtained in S4, the system sends different sampling moments, T1 when the motor rotates forward and T2 when the motor rotates reversely; select the corresponding sampling moment, trigger ADC sampling, and collect the output value of the motor's operational amplifier to ensure that the collected data can accurately reflect the state of the motor; S6: Calculate the actual current value of the motor according to the motor rotation direction obtained in S5 and the motor zero drift value collected in S4; S7: Compare the command current output by the torque sensor with the actual current value obtained in S6, and obtain the required duty cycle command dutyRef through the current loop calculation; S8: The duty cycle command dutyRef calculated in S7 is used to obtain the PWM output command PhaADutyRef of the A-phase high-side MOS tube and the PWM output command PhaBDutyRef of the B-phase low-side MOS tube, as well as the forward and reverse state WorkState of the motor through the duty cycle reconstruction algorithm, and sent to the MCU to realize motor control.
2. The EPS brushless motor control method based on a single sampling point according to claim 1, characterized in that: In S1, PWM is configured as bipolar mode, specifically as follows: The PWM output is configured in bipolar control mode and center-aligned mode. At this time, the motor electrodes are alternating between positive and negative. The A-phase high-side and low-side MOS tubes and the B-phase high-side and low-side MOS tubes output complementary PWM waves respectively, and the PWM output waveform of the A-phase high-side MOS tube is consistent with the PWM output waveform of the B-phase low-side MOS tube. Therefore, it is only necessary to control the A-phase high-side MOS tube and the B-phase low-side MOS tube.
3. The EPS brushless motor control method based on a single sampling point according to claim 1, characterized in that: The low-end current sampling function uses a high-precision current sampling resistor connected in series near the low end of the motor drive bridge arm bus. When current passes through the motor drive bridge arm bus, the voltage difference between the two ends of the sampling resistor acquired by the ADC is calculated to obtain the current value in the bus. The specific process is as follows: Motor zero drift value sampling: When all four MOS tubes are turned on, the zero drift sampling time T is sent down zero Trigger ADC sampling to collect the motor zero drift value AdcZero; Motor op amp output sampling: All four MOS tubes are closed, and the forward sampling time T1 or reverse sampling time T2 is sent to trigger ADC sampling, and the output value of the op amp is collected forward: AdcPhaA / reverse: AdcPhaB; T ZERO = 0; T1 = motor control period / 2; T2 = 0; The ADC sampling is configured as a PWM trigger, and the sampling interval is one motor control task cycle.
4. The single sampling point EPS brushed motor control method according to claim 1, characterized in that: In S6, in order to calibrate and convert the sampling result of the ADC to obtain an accurate motor current value, the motor's operational amplifier output value is subtracted from the zero drift value and then multiplied by the operational amplifier gain coefficient K1 to obtain the actual current value of the motor; The processing process is as follows: If the motor status flag bit of the duty cycle reconstruction feedback is 0, it means that the motor is rotating forward. At this time: I Motor = (AdcPhaA - AdcZero)* K1; If the motor status flag bit of the duty cycle reconstruction feedback is 1, it means that the motor is rotating forward. At this time: I Motor = (AdcZero - AdcPhaB)* K1; At this time, the positive or negative current value obtained can indicate the direction of the motor current. If a positive current value is obtained, it means that the motor is rotating forward, and if a negative current value is obtained, it means that the motor is rotating reversely.
5. The single sampling point EPS brushed motor control method according to claim 1, characterized in that: The current loop module in the S7 includes: The current loop calculation is the PI regulator, which includes P regulation and I regulation. The voltage vector synthesized by P regulation, I regulation and PI regulation is limited, and the current loop anti-integral saturation strategy is also added. The difference before and after the sum of the P and I regulation outputs, that is, the part that exceeds the P regulation, is subtracted in the I integral operation of the next cycle. The voltage vector output by PI regulation is calibrated to the H-bridge VBAT voltage and the amplitude is limited to the interval (-1, 1), which is the PWM duty cycle of the PI regulation output. The sign is the direction of the voltage vector, that is, the direction of motor rotation.
6. The single sampling point EPS brushed motor control method according to claim 1, characterized in that: In S8, the PWM duty cycle instruction output by the current loop is reconstructed to obtain the A-phase high-side PWM output instruction and the B-phase low-side PWM output instruction, as well as the motor forward and reverse state flag. The algorithm is as follows: If DutyRef is in the range of (0,1], the motor rotates forward, and the feedback motor working state flag bit WorkState=0. PhaADutyRef = PWM wave period / 4 – DutyRef*(PWM wave period / 4); PhaBDutyRef = PWM wave period / 4 – DutyRef*(PWM wave period / 4); And the feedback sampling time is the forward sampling time T1; If DutyRef is in the range [-1,0), the motor reverses, and the feedback motor working state flag bit WorkState=1. PhaADutyRef = PWM wave period / 4 – DutyRef*(PWM wave period / 4); PhaBDutyRef = PWM wave period / 4 – DutyRef*(PWM wave period / 4); And the feedback sampling time is the reverse sampling time T2; If DutyRef = 0; PhaADutyRef = PWM wave period / 4; PhaBDutyRef = PWM wave period / 4; And the feedback sampling time is the forward sampling time T1.