control method of electric power steering gear

文档序号:1701792 发布日期:2019-12-13 浏览:11次 中文

阅读说明:本技术 一种电动助力转向器控制方法 (control method of electric power steering gear ) 是由 胡雪 何德龙 张建 余方宽 于 2019-10-09 设计创作,主要内容包括:本发明提出了一种电动助力转向器控制方法,包括以下步骤:S1:计算方向盘扭矩;S2:计算方向盘角度;S3:计算方向盘转速,MCU根据方向盘角度和时间计算得出;S4:采集车速信号;S5:计算基本助力扭矩;S6:计算阻尼扭矩;S7:计算齿条末端保护扭矩大小;S8:计算扭矩阻尼扭矩命令;S9:计算回正扭矩大小;S10:计算总助力扭矩大小,MCU将基本助力扭矩、补偿扭矩、齿条末端保护扭矩、阻尼扭矩、扭矩阻尼扭矩与回正扭矩求和,所得值为总助力扭矩大小;S11:控制电机。能够高效为汽车转向进行助力,安全稳定。(the invention provides a control method of an electric power steering gear, which comprises the following steps: s1: calculating the torque of the steering wheel; s2: calculating the angle of a steering wheel; s3: calculating the rotating speed of a steering wheel, and calculating by the MCU according to the angle of the steering wheel and time; s4: collecting a vehicle speed signal; s5: calculating a basic power-assisted torque; s6: calculating a damping torque; s7: calculating the protection torque of the tail end of the rack; s8: calculating a torque damping torque command; s9: calculating the magnitude of aligning torque; s10: calculating the total power-assisted torque, and summing the basic power-assisted torque, the compensation torque, the rack tail end protection torque, the damping torque, the torque damping torque and the aligning torque by the MCU to obtain a value of the total power-assisted torque; s11: and controlling the motor. Can carry out the helping hand for automobile steering high-efficiently, safety and stability.)

1. A control method of an electric power steering device is characterized in that: the method comprises the following steps:

s1: calculating the torque of the steering wheel;

s2: calculating the angle of a steering wheel;

s3: calculating the rotating speed of a steering wheel, and calculating by the MCU according to the angle of the steering wheel and time;

s4: collecting a vehicle speed signal;

s4-1: the MCU acquires a vehicle speed signal through the CAN bus and transmits the vehicle speed signal to the safety MCU through SPI communication;

s4-2: limiting the change of the vehicle speed, and if the vehicle speed change amount in unit time is greater than the maximum vehicle speed change value, outputting the current vehicle speed to the MCU by taking the initial speed plus the maximum vehicle speed change value;

S5: calculating a basic power-assisted torque;

s6: calculating a damping torque;

s7: calculating the protection torque of the tail end of the rack;

s8: calculating a torque damping torque command;

s9: calculating the magnitude of aligning torque;

s10: calculating the total power-assisted torque, and summing the basic power-assisted torque, the compensation torque, the rack tail end protection torque, the damping torque, the torque damping torque and the aligning torque by the MCU to obtain a value of the total power-assisted torque;

s11: and controlling the motor.

2. the control method according to claim 1, characterized in that: step S1 further includes:

s1-1: calculating the PWM duty ratio of the pulse signal of the first torque sensor, acquiring the pulse signal of the first torque sensor from a CC2 unit by the MCU, and calculating the duty ratio of the pulse signal of the first torque sensor by the MCU;

s1-2: checking a PWM duty ratio of a first torque sensor pulse signal;

s1-2-1: the MCU sends the PWM duty ratio of the first torque sensor pulse signal to the safety MCU through SPI communication, and the MCU and the safety MCU respectively and simultaneously check whether the PWM duty ratio of the first torque sensor pulse signal is in a normal range;

s1-2-2: if any one of the MCU and the safety MCU detects that the PWM duty ratio of the first torque sensor pulse signal is not in a normal range, the MCU or the safety MCU sends out a fault signal of 'the PWM duty ratio signal of the first torque sensor pulse signal is incorrect' to the pre-driver, and S1-7 is executed;

s1-3: calculating the PWM duty ratio of the pulse signal of the second torque sensor, acquiring the pulse signal of the first torque sensor from the CC2 unit by the MCU, and calculating the PWM duty ratio of the pulse signal of the second torque sensor by the MCU;

s1-4: checking the PWM duty ratio of the pulse signal of the second torque sensor;

s1-4-1: the MCU sends the PWM duty ratio of the pulse signal of the second torque sensor to the safety MCU through SPI communication, and the MCU and the safety MCU respectively and simultaneously check whether the PWM duty ratio of the pulse signal of the second torque sensor is in a normal range;

s1-4-2: if any one of the MCU and the safety MCU detects that the PWM duty ratio of the pulse signal of the second torque sensor is not in the normal range, the MCU or the safety MCU sends a fault signal of 'the PWM duty ratio signal of the pulse signal of the second torque sensor is incorrect' to the pre-driver, and S1-7 is executed;

s1-5: calculating, by the MCU, a sum of a PWM duty cycle of the first torque sensor pulse signal and a PWM duty cycle of the second torque sensor pulse signal;

s1-6: checking a sum of a PWM duty cycle of the first torque sensor pulse signal and a PWM duty cycle of the second torque sensor pulse signal;

s1-6-1: the MCU sends the sum of the PWM duty ratio of the first torque sensor pulse signal and the PWM duty ratio of the second torque sensor pulse signal to the safety MCU through SPI communication, and the MCU and the safety MCU respectively and simultaneously check whether the sum of the PWM duty ratio of the first torque sensor pulse signal and the PWM duty ratio of the second torque sensor pulse signal is in a normal range;

s1-6-2: if the sum of the PWM duty ratio of the first torque sensor pulse signal and the PWM duty ratio of the second torque sensor pulse signal is not in the normal range, the MCU or the safety MCU sends a fault signal to the pre-driver, and S1-7 is executed; if the sum of the PWM duty cycle of the first torque sensor pulse signal and the PWM duty cycle of the second torque sensor pulse signal is within the normal range, performing S1-8;

s1-7: the MCU or the safe MCU sends an instruction of 'the automobile enters a safe state' to the pre-driver, meanwhile, the MCU or the safe MCU stops the motor from rotating, stops performing electric power assistance on automobile steering, releases the instruction of 'the automobile enters the safe state' after the next ignition of the igniter, and executes S2;

s1-8: the MCU obtains a torque signal of the steering wheel through comprehensive calculation according to the duty ratio of the pulse signal of the first torque sensor and the duty ratio signal of the pulse signal of the second torque sensor and by combining the rigidity of the torsion bar, the characteristics of the first torque sensor and the second torque sensor and the like;

step S2 further includes:

s2-1: calculating the PWM duty ratio of the pulse signal of the first angle sensor, acquiring the pulse signal of the first angle sensor from the comparison and capture port by the MCU, and calculating the duty ratio of the pulse signal of the first angle sensor by the MCU;

S2-2: checking a PWM duty ratio of a first angle sensor pulse signal;

s2-2-1: the MCU sends the PWM duty ratio of the pulse signal of the first angle sensor to the safety MCU through SPI communication, and the MCU and the safety MCU respectively and simultaneously check whether the PWM duty ratio of the pulse signal of the first angle sensor is in a normal range;

s2-2-2: if any one of the MCU and the safety MCU detects that the PWM duty ratio of the first angle sensor pulse signal is not in a normal range, the MCU or the safety MCU sends a fault signal of 'the PWM duty ratio signal of the first angle sensor pulse signal is incorrect' to the pre-driver, and S2-7 is executed;

s2-3: calculating the PWM duty ratio of the pulse signal of the second angle sensor, acquiring the pulse signal of the first angle sensor from the comparison and capture port unit by the MCU, and calculating the duty ratio of the pulse signal of the second angle sensor by the MCU;

s2-4: checking the PWM duty ratio of the pulse signal of the second angle sensor;

s2-4-1: the MCU sends the PWM duty ratio of the pulse signal of the second angle sensor to the safety MCU through SPI communication, and the MCU and the safety MCU respectively and simultaneously check whether the PWM duty ratio of the pulse signal of the second angle sensor is in a normal range;

s2-4-2: if any one of the MCU and the safety MCU detects that the PWM duty ratio of the pulse signal of the second angle sensor is not in the normal range, the MCU or the safety MCU sends a fault signal of 'the PWM duty ratio signal of the pulse signal of the second angle sensor is incorrect' to the pre-driver, and S2-7 is executed;

s2-5: calculating the sum of the PWM duty ratio of the first angle sensor pulse signal and the PWM duty ratio of the second angle sensor pulse signal through the MCU;

s2-6: checking a sum of a PWM duty cycle of the first angle sensor pulse signal and a PWM duty cycle of the second angle sensor pulse signal;

s2-6-1: the MCU sends the sum of the PWM duty ratio of the pulse signal of the first angle sensor and the PWM duty ratio of the pulse signal of the second angle sensor to the safety MCU through SPI communication, and the MCU and the safety MCU respectively and simultaneously check whether the sum of the PWM duty ratio of the pulse signal of the first angle sensor and the PWM duty ratio of the pulse signal of the second angle sensor is in a normal range;

s2-6-2: if the sum of the PWM duty ratio of the first angle signal and the PWM duty ratio of the first angle signal is not in the normal range, the MCU or the safety MCU sends a fault signal to the pre-driver, and S2-7 is executed; if the sum of the PWM duty ratio of the first angle sensor pulse signal and the PWM duty ratio of the second angle sensor pulse signal is within the normal range, performing S2-8;

s2-7: the MCU or the safe MCU sends an instruction of 'the automobile enters a safe state' to the pre-driver, meanwhile, the MCU or the safe MCU stops the motor from rotating, stops performing electric power assistance on automobile steering, releases the instruction of 'the automobile enters the safe state' after the next ignition of the igniter, and executes S2;

s2-8: the MCU obtains an approximate angle range according to the characteristics of the first angle sensor and the second angle sensor and angle data of detection signals of the first angle sensor and the second angle sensor by using a vernier algorithm, and obtains an angle signal of the steering wheel by comprehensive calculation by adding an accurate angle.

3. the control method according to claim 1, characterized in that: step S6 further includes the steps of:

s5-1: the MCU performs low-pass filtering processing on the torque signal obtained by calculation in the S1-8;

s5-1-1: MCU according to functioncalculating low-frequency torque of the torque signal;

s5-2: calculating a high-frequency torque;

s5-2-1: the MCU subtracts the low-frequency torque from the torque signal calculated according to the S1-8, and the obtained difference is the high-frequency torque;

s5-3: looking up a table by interpolation;

s5-3-1: the MCU initiates a command for calling a basic power table look-up to the database, and the database sends the basic power table to the MCU;

s5-3-2: the MCU queries calibration parameters to obtain the current gain according to the vehicle speed obtained by the S4-2 as a key check word;

s5-4: and multiplying the high-frequency torque and the low-frequency torque by the obtained gain respectively to obtain a high-frequency gain and a low-frequency gain, and finally adding the high-frequency gain and the low-frequency gain to calculate the basic boosting torque through a stability function.

4. the control method according to claim 1, characterized in that: step S6 further includes the steps of:

s6-1: the MCU performs interpolation table lookup according to the torque signal obtained by calculation in S1-8 to obtain a first related parameter of the damping torque;

s6-1-1: the MCU initiates a table look-up command for adjusting the damping torque to the database, and the database sends a damping torque data table to the MCU;

s6-1-2: the MCU is used as a closing detection word according to the torque signal obtained by calculation of S1-8 to obtain a first related parameter of the damping torque;

s6-2: the MCU performs difference table lookup according to the vehicle speed obtained in the step S4-2 and the rotating speed of the steering wheel obtained in the step S3 to obtain a second related parameter of the damping torque;

s6-2-1: after receiving the steering wheel rotating speed signal from the motor position signal Encode, the MCU carries out filtering processing and limiting value processing on the steering wheel rotating speed signal;

s6-2-2: the MCU initiates a table look-up command for adjusting the damping torque to the database, and the database sends a damping torque data table to the MCU;

s6-2-3: the MCU is used as a closing check word according to the vehicle speed obtained in the step S4-2 and the rotating speed of the steering wheel obtained in the step S3, and a second related parameter of the damping torque is obtained;

S6-3: the MCU multiplies the second damping torque related parameter by the second damping torque related parameter, and the obtained product is the damping torque;

step S7 further includes the steps of:

s7-1: the MCU acquires a vehicle speed signal through S4-2, and calculates an absolute position according to signals input by the HALL sensor and the ENCODER;

s7-2: the MCU sends the absolute position to the safety MCU through SPI communication, and the safety MCU detects whether the absolute position is effective or not;

s7-2-1: the safety MCU mutually verifies whether the absolute position is effective or not through the Hella sensor and the position signal, and detects whether the middle position of the angle is calibrated or not through the safety MCU; if both are valid, executing S7-3;

s7-3: the MCU performs interpolation table lookup according to the vehicle speed signal obtained in the S4-2 and the absolute position signal obtained in the S7-1, and calculates the protection torque of the tail end of the rack;

s7-3-1: and the MCU sends an instruction for calling a rack tail end protection torque data table to a database, and searches corresponding data by taking the vehicle speed signal and the absolute position signal as keywords, wherein the obtained data is the size of the rack tail end protection torque.

5. the control method according to claim 1, characterized in that: step S8 further includes the steps of:

S8-1: the MCU performs interpolation table lookup according to the vehicle speed signal acquired by the S4-2 to acquire a first torque damping related parameter;

s8-1-1: the MCU sends an instruction for calling a torque damping torque data table to the database, and then searches a first related parameter of the torque damping torque by taking the vehicle speed signal as a keyword;

s8-2: the MCU performs interpolation table lookup according to the torque signal obtained by calculation in S1-8 to obtain a second torque damping related parameter;

s8-2-1: the MCU sends a command for calling a torque damping torque data table to the database, and then searches a second related parameter of the torque damping torque by taking a torque signal obtained by calculation of S1-8 as a keyword;

s8-3: the MCU obtains the variation of the torque signal in unit time according to the torque signal obtained by calculation in S1-8;

s8-4: carrying out low-pass filtering on the variable quantity, and subtracting the variable quantity signal subjected to the low-pass filtering from the original variable quantity signal to obtain a variable quantity signal subjected to high-pass filtering;

s8-5: the MCU sends an instruction for calling a torque damping torque data table to the database, and then interpolation table look-up is carried out on the variable quantity signals subjected to high-pass filtering processing to obtain third torque damping related parameters;

s8-6: multiplying the first torque damping related parameter, the second torque damping related parameter and the third torque damping related parameter, wherein the obtained product is the torque damping torque;

step S9 further includes the steps of:

s9-1: the MCU acquires a vehicle speed signal through S4-2, and calculates an absolute position according to signals input by the HALL sensor and the ENCODER;

s9-2: the MCU sends the absolute position to the safety MCU through SPI communication, and the safety MCU detects whether the absolute position is effective or not; if yes, executing S9-3;

s9-3: the MCU performs interpolation table lookup according to the vehicle speed signal obtained in the S4-2 and the absolute position signal obtained in the S7-1, and calculates the correction torque;

s9-3-1: and the MCU sends an instruction for calling a rack tail end protection torque data table to a database, and searches corresponding data by taking the vehicle speed signal and the absolute position signal as keywords, wherein the obtained data is the correction torque.

6. the control method according to claim 1, characterized in that: step S10 further includes the steps of:

s10-1: calculating a total power-assisted torque command limit value;

S10-1-1: a supply voltage limit; the method comprises the steps that the MCU acquires the voltage of a power supply, sends an instruction for calling a total power-assisted power supply voltage limit data table to a database, searches the power supply voltage limit percentage by taking the voltage as a keyword, and supplies power to a motor according to the power supply voltage limit percentage;

s10-1-2: the total power-assisted torque is over-limit; the MCU acquires an engine rotating speed signal from the CAN bus, simultaneously acquires a vehicle speed signal according to S4-2, acquires a torque signal according to S1-7 and acquires a steering wheel rotating speed signal according to S3; the MCU sends an instruction for calling a total power-assisted torque limit data table to the database, and searches for the total power-assisted torque limit by taking an engine rotating speed signal, a vehicle speed signal, a steering wheel rotating speed signal and a torque signal as keywords;

s10-1-3: when the engine stops, the total boosting torque is zero.

7. the control method according to claim 1, characterized in that: step S11 further includes:

s11-1: calculating the current of the motor;

s11-1-1: the MCU determines the Q-axis current according to the total power-assisted torque,

s11-1-2: then limiting the maximum value of the Q axis according to the detection signal of the temperature sensor;

s11-1-3: if the rotating speed of the motor is higher, adding current of a D shaft;

s11-2: calculating the position and the rotating speed of the motor;

s11-2-1: the MCU calculates the position of the motor according to the collected position signals of the HALL sensor;

s11-2-2: the MCU calculates the rotating speed of the motor according to the position change and the time of the motor;

s11-3: performing PI regulation on a D axis and a Q axis;

s11-4: calculating the three-phase voltage of the motor;

s11-5: distributing the duty ratio of the H-bridge MOS tube;

s11-6: sampling the current of the three-phase motor;

s11-6-1: detecting the current of any two phases in the three-phase motor;

s11-6-2: detecting the position of the motor rotor through the HALL sensor to obtain a sector corresponding to the motor rotor, and then obtaining the relation of the current three-phase current to calculate the three-phase current;

s11-7: calculating the torque of the motor;

s11-7-1: the motor torque is equal to the feedback Q-axis current multiplied by a current torque conversion constant;

s11-8: and estimating the temperature of the motor.

8. the control method according to claim 7, characterized in that: step S11-4 further includes:

s11-4-1: the MCU sends a motor position signal, a D-axis voltage value and a Q-axis voltage value which are subjected to PI regulation to the three-phase voltage calculation module, and the three-phase voltage calculation module calculates an alpha voltage and a beta voltage;

S11-4-1-1: correcting the position of the motor, obtaining the rotating angle of the motor in the time period according to the rotating speed of the motor by the MCU, re-determining the position of the motor, and sending a re-determined motor position signal to the three-phase voltage calculation module by the MCU;

s11-4-1-2: the three-phase voltage calculation module receives the re-determined motor position signal and calculates the cosine and sine of the re-determined motor position;

s11-4-1-3: the three-phase voltage calculation module calculates the magnitude of alpha voltage, wherein the alpha voltage is equal to the difference value obtained by subtracting the product of the Q-axis voltage command and the corrected sine of the motor position from the product of the D-axis voltage and the re-determined cosine of the motor position;

s11-4-1-4: the three-phase voltage calculation module calculates the beta voltage, and the beta voltage command is equal to the difference value obtained by multiplying the D-axis voltage command by the sine of the corrected motor position and subtracting the product of multiplying the Q-axis voltage command by the cosine of the corrected motor position;

s11-4-1-5: the three-phase voltage calculation module sends the alpha voltage value and the beta voltage value to the MCU;

s11-4-2: the three-phase voltage calculation module calculates a three-phase voltage value according to the alpha voltage and the beta voltage;

s11-4-2-1: the three-phase voltage calculation module calculates the voltage of the phase A, and the voltage of the phase A is equal to the voltage command of the alpha;

s11-4-2-2: the three-phase voltage calculation module calculates the voltage of the phase B, and the voltage of the phase B is equal to the sum of a negative one-half alpha voltage command plus a root-sign three-times beta voltage command divided by 2;

S11-4-2-2: the three-phase voltage calculation module calculates the magnitude of the C-phase voltage, and the voltage of the C-phase is equal to the opposite number of the sum of the voltage command of the phase line 1 and the voltage command of the phase line 2;

s11-4-3: and the three-phase voltage calculation module sends the voltage values of the three phases to the MCU.

9. the control method according to claim 1, characterized in that: step S11-5 further includes:

s11-5-1: distributing the duty ratio of the phase A;

s11-5-1-1: detecting whether the duty ratio of the phase A is larger than the maximum duty ratio, if so, executing S11-5-1-2, otherwise, executing S11-5-1-3;

s11-5-1-2: aligning a first edge of a phase A PWM period with a zero point, aligning a second edge of the phase A PWM period with the PWM period, opening an phase A upper MOS tube, closing a phase A lower MOS tube, and executing S11-5-2;

s11-5-1-3: detecting whether the duty ratio of the phase A is smaller than the minimum duty ratio, if so, executing S11-5-1-4, otherwise, executing S11-5-1-5;

s11-5-1-4: aligning a first edge of the A-phase PWM period with a zero point, aligning a second edge of the A-phase PWM period with a half of the PWM period, closing an MOS (metal oxide semiconductor) transistor on the A-phase, opening an MOS transistor on the A-phase, and executing S11-5-2;

s11-5-1-5: defining a phase B starting edge, wherein the phase A starting edge is equal to the minimum edge, and adding and summing the phase A starting edge and the phase A duty ratio;

S11-5-1-6: judging whether the sum of the A phase starting edge and the A phase duty ratio is greater than a second maximum edge or not; if the second maximum edge is greater than the first maximum edge, executing S11-5-1-7; otherwise, executing S11-5-1-8;

s11-5-1-7: a first edge of the A-phase PWM period is equal to a second maximum edge minus the A-phase duty cycle; executing S11-5-2 when the second edge of the A phase PWM period is equal to the second maximum edge;

S11-5-1-8: judging whether the sum of the A phase starting edge and the A phase duty ratio is smaller than a second minimum edge or not; if the second minimum edge is smaller than the second minimum edge, executing S11-5-1-9; otherwise, executing S11-5-1-10;

s11-5-1-9: a first edge of the A-phase PWM period is equal to the second minimum edge minus the A-phase duty cycle; the second edge of the a-phase PWM period is equal to the second minimum edge, and S11-5-2 is performed;

s11-5-1-10: a first edge of the A-phase PWM cycle is equal to the A-phase start edge; a second edge of the A-phase PWM period is equal to the A-phase start edge plus the A-phase duty cycle;

s11-5-2: distributing the duty ratio of the B phase;

s11-5-2-1: detecting whether the duty ratio of the B phase is larger than the maximum duty ratio, if so, executing S11-5-2-2, otherwise, executing S11-5-2-3;

s11-5-2-2: aligning a first edge of a B-phase PWM period with a zero point, aligning a second edge of the B-phase PWM period with the PWM period, opening an upper MOS tube of the B-phase, closing a lower MOS tube of the B-phase, and executing S11-5-3;

s11-5-2-3: detecting whether the duty ratio of the B phase is smaller than the minimum duty ratio, if so, executing S11-5-2-4, otherwise, executing S11-5-2-5;

s11-5-2-4: the PWM edge 1 of the phase B is equal to half of the PWM period, an MOS tube on the phase B is closed, an MOS tube under the phase B is opened, and S11-5-3 is executed;

s11-5-2-5: defining a B-phase starting edge, wherein the B-phase starting edge is equal to the first edge of the A-phase PWM period plus waveform overlapping setting;

s11-5-2-6: judging whether the phase B starting edge plus the phase B duty ratio is larger than a second maximum edge, and if so, executing S11-5-2-7; otherwise, executing S11-5-2-8;

s11-5-2-7: the first edge of the B-phase PWM period is equal to the second maximum edge minus the B-phase duty cycle; executing S11-5-3 when the second edge of the B-phase PWM period is equal to the second maximum edge;

s11-5-2-8: judging whether the sum of the B-phase starting edge and the B-phase duty ratio is smaller than a second minimum edge, if so, executing S11-5-2-9, otherwise, executing S11-5-2-10;

s11-5-2-9: a first edge of the B-phase PWM period is equal to a second minimum edge minus the B-phase duty cycle; the second edge of the B-phase PWM period is equal to the second minimum edge, and S11-5-3 is executed;

s11-5-2-10: the first edge of the B-phase PWM period is equal to the B-phase starting edge, and the first edge of the B-phase PWM period is equal to the B-phase starting edge plus the B-phase duty ratio;

s11-5-3: distributing the C-phase duty ratio;

s11-5-3-1: detecting whether the duty ratio of the C phase is larger than the maximum duty ratio, if so, executing S11-5-3-2, otherwise, executing S11-5-3-3;

s11-5-3-2: aligning a first edge of a C-phase PWM period with a zero point, enabling a second edge of the C-phase PWM period to be equal to the PWM period, opening an MOS (metal oxide semiconductor) tube on the C-phase, and closing an MOS tube under the C-phase;

s11-5-3-3: detecting whether the duty ratio of the C phase is smaller than the minimum duty ratio, if so, executing S11-5-3-4, otherwise, executing S11-5-3-5;

s11-5-3-4: the PWM edge 1 of the C phase is equal to half of the PWM period, the MOS tube on the C phase is closed, and the MOS tube under the C phase is opened;

s11-5-3-5: defining a C-phase starting edge, wherein the C-phase starting edge is equal to the first edge of the B-phase PWM period plus waveform overlapping setting;

S11-5-3-6: judging whether the sum of the C-phase starting edge and the C-phase duty ratio is greater than a second maximum edge, and if so, executing S11-5-3-7; otherwise, executing S11-5-3-8;

s11-5-3-7: a first edge of the C-phase PWM period is equal to a second maximum edge minus the C-phase duty cycle; executing S11-5-3 when the second edge of the C-phase PWM period is equal to the second maximum edge;

s11-5-3-8: judging whether the sum of the C-phase starting edge and the C-phase duty ratio is smaller than a second minimum edge, if so, executing S11-5-3-9, otherwise, executing S11-5-3-10;

s11-5-3-9: a first edge of the C-phase PWM period is equal to a second minimum edge minus the C-phase duty cycle; the second edge of the C-phase PWM period is equal to the second minimum edge, and S11-5-3 is performed;

s11-5-3-10: the first edge of the C-phase PWM period is equal to the C-phase start edge, which is equal to the C-phase start edge plus the C-phase duty cycle.

10. the control method according to claim 1, characterized in that: step S11-8 further includes:

s11-8-1: the MCU judges whether the motor is in a locked-rotor working state or not according to the rotating speed of the motor, and if the motor is in the locked-rotor working state, S11-8-2 is executed; if the motor is in a normal working state, executing S11-8-5;

s11-8-2: the MCU simultaneously sends the Q-axis feedback current and the D-axis feedback current to the motor locked-rotor temperature estimation module, the power consumption of the motor during locked-rotor is calculated by the motor locked-rotor temperature estimation module according to the motor current integral coefficient during locked-rotor, and the temperature rise degree is calculated according to the power consumption during locked-rotor;

s11-8-3: the MCU sends temperature detection data of a temperature sensor of the PCB to a motor locked-rotor temperature estimation module to determine the temperature of the PCB;

s11-8-4: the motor locked-rotor temperature estimation module calculates the motor temperature during locked-rotor through the temperature rise degree and the temperature of the PCB and sends the calculated motor temperature to the MCU; executing S11-8-8;

s11-8-5: the MCU simultaneously sends the Q-axis feedback current and the D-axis feedback current to the motor normal temperature estimation module, the motor normal temperature estimation module calculates the power consumption of the motor in normal according to the motor current integral coefficient in normal, and then calculates the temperature rise degree according to the power consumption in normal;

s11-8-6: the MCU sends temperature detection data of a temperature sensor of the PCB to a normal temperature estimation module of the motor to determine the temperature of the PCB;

s11-8-7: the motor normal temperature estimation module calculates the motor temperature in a normal state through the temperature rise degree and the temperature of the PCB and sends the calculated motor temperature to the MCU; executing S11-8-8;

s11-8-8: the MCU carries out interpolation table lookup according to the temperature of the motor, the MCU sends a Q-axis limiting current table lookup command to the database, and the database sends a Q-axis limiting current data table to the MCU;

s11-8-9: the MCU is used for obtaining the Q-axis limiting current according to the key word of the motor temperature, and the MCU adjusts the current of the Q axis after PI adjustment according to the Q-axis limiting current.

Technical Field

the invention relates to the technical field of automobile power assistance, in particular to a control method of an electric power steering gear.

background

in the driving of a motor vehicle, the steering movement is the most basic movement. The driving direction of the automobile is controlled and controlled through the steering wheel, so that the driving purpose of the automobile is realized. An electric power steering system, known by the acronym "EPS", uses power generated by an electric motor to assist a driver in steering. In the prior art, a rack is driven to move transversely by rotating a rotating shaft gear in a steering gear, and the rack is connected with a tie rod so as to drive the tie rod to move transversely, and finally a steering knuckle is pulled by the tie rod so that the steering knuckle drives wheels to steer. With the rapid development of modern automobile technology, people increasingly demand the steering performance of automobiles.

Disclosure of Invention

the invention aims to at least solve the technical problems in the prior art, and particularly provides a control method of an electric power steering gear, which can efficiently assist the steering of an automobile and is safe and stable.

in order to achieve the above object of the present invention, the present invention provides an electric power steering control method, including the steps of:

s1: calculating the torque of the steering wheel;

s2: calculating the angle of a steering wheel;

s3: calculating the rotating speed of a steering wheel, and calculating by the MCU according to the angle of the steering wheel and time;

s4: collecting a vehicle speed signal;

s4-1: the MCU acquires a vehicle speed signal through the CAN bus and transmits the vehicle speed signal to the safety MCU through SPI communication;

s4-2: limiting the change of the vehicle speed, and if the vehicle speed change amount in unit time is greater than the maximum vehicle speed change value, outputting the current vehicle speed to the MCU by taking the initial speed plus the maximum vehicle speed change value;

s5: calculating a basic power-assisted torque;

s6: calculating a damping torque;

s7: calculating the protection torque of the tail end of the rack;

s8: calculating a torque damping torque command;

s9: calculating the magnitude of aligning torque;

s10: calculating the total power-assisted torque, and summing the basic power-assisted torque, the compensation torque, the rack tail end protection torque, the damping torque, the torque damping torque and the aligning torque by the MCU to obtain a value of the total power-assisted torque;

s11: and controlling the motor.

in the scheme, the method comprises the following steps: step S1 further includes:

s1-1: calculating the PWM duty ratio of the pulse signal of the first torque sensor, acquiring the pulse signal of the first torque sensor from a CC2 unit by the MCU, and calculating the duty ratio of the pulse signal of the first torque sensor by the MCU;

s1-2: checking a PWM duty ratio of a first torque sensor pulse signal;

s1-2-1: the MCU sends the PWM duty ratio of the first torque sensor pulse signal to the safety MCU through SPI communication, and the MCU and the safety MCU respectively and simultaneously check whether the PWM duty ratio of the first torque sensor pulse signal is in a normal range;

s1-2-2: if any one of the MCU and the safety MCU detects that the PWM duty ratio of the first torque sensor pulse signal is not in a normal range, the MCU or the safety MCU sends out a fault signal of 'the PWM duty ratio signal of the first torque sensor pulse signal is incorrect' to the pre-driver, and S1-7 is executed;

s1-3: calculating the PWM duty ratio of the pulse signal of the second torque sensor, acquiring the pulse signal of the first torque sensor from the CC2 unit by the MCU, and calculating the PWM duty ratio of the pulse signal of the second torque sensor by the MCU;

s1-4: checking the PWM duty ratio of the pulse signal of the second torque sensor;

s1-4-1: the MCU sends the PWM duty ratio of the pulse signal of the second torque sensor to the safety MCU through SPI communication, and the MCU and the safety MCU respectively and simultaneously check whether the PWM duty ratio of the pulse signal of the second torque sensor is in a normal range;

s1-4-2: if any one of the MCU and the safety MCU detects that the PWM duty ratio of the pulse signal of the second torque sensor is not in the normal range, the MCU or the safety MCU sends a fault signal of 'the PWM duty ratio signal of the pulse signal of the second torque sensor is incorrect' to the pre-driver, and S1-7 is executed;

s1-5: calculating, by the MCU, a sum of a PWM duty cycle of the first torque sensor pulse signal and a PWM duty cycle of the second torque sensor pulse signal;

s1-6: checking a sum of a PWM duty cycle of the first torque sensor pulse signal and a PWM duty cycle of the second torque sensor pulse signal;

s1-6-1: the MCU sends the sum of the PWM duty ratio of the first torque sensor pulse signal and the PWM duty ratio of the second torque sensor pulse signal to the safety MCU through SPI communication, and the MCU and the safety MCU respectively and simultaneously check whether the sum of the PWM duty ratio of the first torque sensor pulse signal and the PWM duty ratio of the second torque sensor pulse signal is in a normal range;

s1-6-2: if the sum of the PWM duty ratio of the first torque sensor pulse signal and the PWM duty ratio of the second torque sensor pulse signal is not in the normal range, the MCU or the safety MCU sends a fault signal to the pre-driver, and S1-7 is executed; if the sum of the PWM duty cycle of the first torque sensor pulse signal and the PWM duty cycle of the second torque sensor pulse signal is within the normal range, performing S1-8;

s1-7: the MCU or the safe MCU sends an instruction of 'the automobile enters a safe state' to the pre-driver, meanwhile, the MCU or the safe MCU stops the motor from rotating, stops performing electric power assistance on automobile steering, releases the instruction of 'the automobile enters the safe state' after the next ignition of the igniter, and executes S2;

s1-8: the MCU obtains a torque signal of the steering wheel through comprehensive calculation according to the duty ratio of the pulse signal of the first torque sensor and the duty ratio signal of the pulse signal of the second torque sensor and by combining the rigidity of the torsion bar, the characteristics of the first torque sensor and the second torque sensor and the like;

step S2 further includes:

s2-1: calculating the PWM duty ratio of the pulse signal of the first angle sensor, acquiring the pulse signal of the first angle sensor from the comparison and capture port by the MCU, and calculating the duty ratio of the pulse signal of the first angle sensor by the MCU;

S2-2: checking a PWM duty ratio of a first angle sensor pulse signal;

s2-2-1: the MCU sends the PWM duty ratio of the pulse signal of the first angle sensor to the safety MCU through SPI communication, and the MCU and the safety MCU respectively and simultaneously check whether the PWM duty ratio of the pulse signal of the first angle sensor is in a normal range;

S2-2-2: if any one of the MCU and the safety MCU detects that the PWM duty ratio of the first angle sensor pulse signal is not in a normal range, the MCU or the safety MCU sends a fault signal of 'the PWM duty ratio signal of the first angle sensor pulse signal is incorrect' to the pre-driver, and S2-7 is executed;

s2-3: calculating the PWM duty ratio of the pulse signal of the second angle sensor, acquiring the pulse signal of the first angle sensor from the comparison and capture port unit by the MCU, and calculating the duty ratio of the pulse signal of the second angle sensor by the MCU;

s2-4: checking the PWM duty ratio of the pulse signal of the second angle sensor;

s2-4-1: the MCU sends the PWM duty ratio of the pulse signal of the second angle sensor to the safety MCU through SPI communication, and the MCU and the safety MCU respectively and simultaneously check whether the PWM duty ratio of the pulse signal of the second angle sensor is in a normal range;

s2-4-2: if any one of the MCU and the safety MCU detects that the PWM duty ratio of the pulse signal of the second angle sensor is not in the normal range, the MCU or the safety MCU sends a fault signal of 'the PWM duty ratio signal of the pulse signal of the second angle sensor is incorrect' to the pre-driver, and S2-7 is executed;

s2-5: calculating the sum of the PWM duty ratio of the first angle sensor pulse signal and the PWM duty ratio of the second angle sensor pulse signal through the MCU;

s2-6: checking a sum of a PWM duty cycle of the first angle sensor pulse signal and a PWM duty cycle of the second angle sensor pulse signal;

s2-6-1: the MCU sends the sum of the PWM duty ratio of the pulse signal of the first angle sensor and the PWM duty ratio of the pulse signal of the second angle sensor to the safety MCU through SPI communication, and the MCU and the safety MCU respectively and simultaneously check whether the sum of the PWM duty ratio of the pulse signal of the first angle sensor and the PWM duty ratio of the pulse signal of the second angle sensor is in a normal range;

s2-6-2: if the sum of the PWM duty ratio of the first angle signal and the PWM duty ratio of the first angle signal is not in the normal range, the MCU or the safety MCU sends a fault signal to the pre-driver, and S2-7 is executed; if the sum of the PWM duty ratio of the first angle sensor pulse signal and the PWM duty ratio of the second angle sensor pulse signal is within the normal range, performing S2-8;

s2-7: the MCU or the safe MCU sends an instruction of 'the automobile enters a safe state' to the pre-driver, meanwhile, the MCU or the safe MCU stops the motor from rotating, stops performing electric power assistance on automobile steering, releases the instruction of 'the automobile enters the safe state' after the next ignition of the igniter, and executes S2;

s2-8: the MCU obtains an approximate angle range according to the characteristics of the first angle sensor and the second angle sensor and angle data of detection signals of the first angle sensor and the second angle sensor by using a vernier algorithm, and obtains an angle signal of the steering wheel by comprehensive calculation by adding an accurate angle.

in the scheme, the method comprises the following steps: step S6 further includes the steps of:

s5-1: the MCU performs low-pass filtering processing on the torque signal obtained by calculation in the S1-8;

s5-1-1: MCU according to functioncalculating low-frequency torque of the torque signal;

s5-2: calculating a high-frequency torque;

s5-2-1: the MCU subtracts the low-frequency torque from the torque signal calculated according to the S1-8, and the obtained difference is the high-frequency torque;

s5-3: looking up a table by interpolation;

s5-3-1: the MCU initiates a command for calling a basic power table look-up to the database, and the database sends the basic power table to the MCU;

s5-3-2: the MCU queries calibration parameters to obtain the current gain according to the vehicle speed obtained by the S4-2 as a key check word;

s5-4: and multiplying the high-frequency torque and the low-frequency torque by the obtained gain respectively to obtain a high-frequency gain and a low-frequency gain, and finally adding the high-frequency gain and the low-frequency gain to calculate the basic boosting torque through a stability function.

in the scheme, the method comprises the following steps: step S6 further includes the steps of:

s6-1: the MCU performs interpolation table lookup according to the torque signal obtained by calculation in S1-8 to obtain a first related parameter of the damping torque;

s6-1-1: the MCU initiates a table look-up command for adjusting the damping torque to the database, and the database sends a damping torque data table to the MCU;

s6-1-2: the MCU is used as a closing detection word according to the torque signal obtained by calculation of S1-8 to obtain a first related parameter of the damping torque;

s6-2: the MCU performs difference table lookup according to the vehicle speed obtained in the step S4-2 and the rotating speed of the steering wheel obtained in the step S3 to obtain a second related parameter of the damping torque;

s6-2-1: after receiving the steering wheel rotating speed signal from the motor position signal Encode, the MCU carries out filtering processing and limiting value processing on the steering wheel rotating speed signal;

s6-2-2: the MCU initiates a table look-up command for adjusting the damping torque to the database, and the database sends a damping torque data table to the MCU;

s6-2-3: the MCU is used as a closing check word according to the vehicle speed obtained in the step S4-2 and the rotating speed of the steering wheel obtained in the step S3, and a second related parameter of the damping torque is obtained;

S6-3: the MCU multiplies the second damping torque related parameter by the second damping torque related parameter, and the obtained product is the damping torque;

Step S7 further includes the steps of:

s7-1: the MCU acquires a vehicle speed signal through S4-2, and calculates an absolute position according to signals input by the HALL sensor and the ENCODER;

s7-2: the MCU sends the absolute position to the safety MCU through SPI communication, and the safety MCU detects whether the absolute position is effective or not;

s7-2-1: the safety MCU mutually verifies whether the absolute position is effective or not through the Hella sensor and the position signal, and detects whether the middle position of the angle is calibrated or not through the safety MCU; if both are valid, executing S7-3;

s7-3: the MCU performs interpolation table lookup according to the vehicle speed signal obtained in the S4-2 and the absolute position signal obtained in the S7-1, and calculates the protection torque of the tail end of the rack;

s7-3-1: and the MCU sends an instruction for calling a rack tail end protection torque data table to a database, and searches corresponding data by taking the vehicle speed signal and the absolute position signal as keywords, wherein the obtained data is the size of the rack tail end protection torque.

in the scheme, the method comprises the following steps: step S8 further includes the steps of:

s8-1: the MCU performs interpolation table lookup according to the vehicle speed signal acquired by the S4-2 to acquire a first torque damping related parameter;

s8-1-1: the MCU sends an instruction for calling a torque damping torque data table to the database, and then searches a first related parameter of the torque damping torque by taking the vehicle speed signal as a keyword;

s8-2: the MCU performs interpolation table lookup according to the torque signal obtained by calculation in S1-8 to obtain a second torque damping related parameter;

s8-2-1: the MCU sends a command for calling a torque damping torque data table to the database, and then searches a second related parameter of the torque damping torque by taking a torque signal obtained by calculation of S1-8 as a keyword;

s8-3: the MCU obtains the variation of the torque signal in unit time according to the torque signal obtained by calculation in S1-8;

s8-4: carrying out low-pass filtering on the variable quantity, and subtracting the variable quantity signal subjected to the low-pass filtering from the original variable quantity signal to obtain a variable quantity signal subjected to high-pass filtering;

s8-5: the MCU sends an instruction for calling a torque damping torque data table to the database, and then interpolation table look-up is carried out on the variable quantity signals subjected to high-pass filtering processing to obtain third torque damping related parameters;

s8-6: multiplying the first torque damping related parameter, the second torque damping related parameter and the third torque damping related parameter, wherein the obtained product is the torque damping torque;

step S9 further includes the steps of:

s9-1: the MCU acquires a vehicle speed signal through S4-2, and calculates an absolute position according to signals input by the HALL sensor and the ENCODER;

s9-2: the MCU sends the absolute position to the safety MCU through SPI communication, and the safety MCU detects whether the absolute position is effective or not; if yes, executing S9-3;

s9-3: the MCU performs interpolation table lookup according to the vehicle speed signal obtained in the S4-2 and the absolute position signal obtained in the S7-1, and calculates the correction torque;

S9-3-1: and the MCU sends an instruction for calling a rack tail end protection torque data table to a database, and searches corresponding data by taking the vehicle speed signal and the absolute position signal as keywords, wherein the obtained data is the correction torque.

in the scheme, the method comprises the following steps: step S10 further includes the steps of:

s10-1: calculating a total power-assisted torque command limit value;

S10-1-1: a supply voltage limit; the method comprises the steps that the MCU acquires the voltage of a power supply, sends an instruction for calling a total power-assisted power supply voltage limit data table to a database, searches the power supply voltage limit percentage by taking the voltage as a keyword, and supplies power to a motor according to the power supply voltage limit percentage;

s10-1-2: the total power-assisted torque is over-limit; the MCU acquires an engine rotating speed signal from the CAN bus, simultaneously acquires a vehicle speed signal according to S4-2, acquires a torque signal according to S1-7 and acquires a steering wheel rotating speed signal according to S3; the MCU sends an instruction for calling a total power-assisted torque limit data table to the database, and searches for the total power-assisted torque limit by taking an engine rotating speed signal, a vehicle speed signal, a steering wheel rotating speed signal and a torque signal as keywords;

s10-1-3: when the engine stops, the total boosting torque is zero.

in the scheme, the method comprises the following steps: step S11 further includes:

s11-1: calculating the current of the motor;

s11-1-1: the MCU determines the Q-axis current according to the total power-assisted torque,

s11-1-2: then limiting the maximum value of the Q axis according to the detection signal of the temperature sensor;

s11-1-3: if the rotating speed of the motor is higher, adding current of a D shaft;

s11-2: calculating the position and the rotating speed of the motor;

s11-2-1: the MCU calculates the position of the motor according to the collected position signals of the HALL sensor;

s11-2-2: the MCU calculates the rotating speed of the motor according to the position change and the time of the motor;

S11-3: performing PI regulation on a D axis and a Q axis;

s11-4: calculating the three-phase voltage of the motor;

S11-5: distributing the duty ratio of the H-bridge MOS tube;

s11-6: sampling the current of the three-phase motor;

s11-6-1: detecting the current of any two phases in the three-phase motor;

s11-6-2: the position of the motor rotor is detected through the HALL sensor, the sector corresponding to the motor rotor is obtained, and then the current relation of the current three-phase current is obtained, and the three-phase current can be calculated.

s11-7: calculating the torque of the motor;

s11-7-1: the motor torque is equal to the feedback Q-axis current multiplied by a current torque conversion constant;

S11-8: and estimating the temperature of the motor.

in the scheme, the method comprises the following steps: step S11-4 further includes:

s11-4-1: the MCU sends a motor position signal and the D-axis voltage value and the Q-axis voltage value subjected to PI regulation to the three-phase voltage calculation module, and the three-phase voltage calculation module calculates alpha voltage and beta voltage;

S11-4-1-1: correcting the position of the motor, obtaining the rotating angle of the motor in the time period according to the rotating speed of the motor by the MCU, re-determining the position of the motor, and sending a re-determined motor position signal to the three-phase voltage calculation module by the MCU;

s11-4-1-2: the three-phase voltage calculation module receives the re-determined motor position signal and calculates the cosine and sine of the re-determined motor position;

s11-4-1-3: the three-phase voltage calculation module calculates the magnitude of alpha voltage, wherein the alpha voltage is equal to the difference value obtained by subtracting the product of the Q-axis voltage command and the corrected sine of the motor position from the product of the D-axis voltage and the re-determined cosine of the motor position;

s11-4-1-4: the three-phase voltage calculation module calculates the beta voltage, and the beta voltage command is equal to the difference value obtained by multiplying the D-axis voltage command by the sine of the corrected motor position and subtracting the product of multiplying the Q-axis voltage command by the cosine of the corrected motor position;

s11-4-1-5: the three-phase voltage calculation module sends the alpha voltage value and the beta voltage value to the MCU;

s11-4-2: the three-phase voltage calculation module calculates a three-phase voltage value according to the alpha voltage and the beta voltage;

s11-4-2-1: the three-phase voltage calculation module calculates the voltage of the phase A, and the voltage of the phase A is equal to the voltage command of the alpha;

s11-4-2-2: the three-phase voltage calculation module calculates the voltage of the phase B, and the voltage of the phase B is equal to the sum of a negative one-half alpha voltage command plus a root-sign three-times beta voltage command divided by 2;

s11-4-2-2: the three-phase voltage calculation module calculates the magnitude of the C-phase voltage, and the voltage of the C-phase is equal to the opposite number of the sum of the voltage command of the phase line 1 and the voltage command of the phase line 2;

s11-4-3: and the three-phase voltage calculation module sends the voltage values of the three phases to the MCU.

in the scheme, the method comprises the following steps: step S11-5 further includes:

s11-5-1: distributing the duty ratio of the phase A;

s11-5-1-1: detecting whether the duty ratio of the phase A is larger than the maximum duty ratio, if so, executing S11-5-1-2, otherwise, executing S11-5-1-3;

S11-5-1-2: aligning a first edge of a phase A PWM period with a zero point, aligning a second edge of the phase A PWM period with the PWM period, opening an phase A upper MOS tube, closing a phase A lower MOS tube, and executing S11-5-2;

s11-5-1-3: detecting whether the duty ratio of the phase A is smaller than the minimum duty ratio, if so, executing S11-5-1-4, otherwise, executing S11-5-1-5;

s11-5-1-4: aligning a first edge of the A-phase PWM period with a zero point, aligning a second edge of the A-phase PWM period with a half of the PWM period, closing an MOS (metal oxide semiconductor) transistor on the A-phase, opening an MOS transistor on the A-phase, and executing S11-5-2;

s11-5-1-5: defining a phase B starting edge, wherein the phase A starting edge is equal to the minimum edge, and adding and summing the phase A starting edge and the phase A duty ratio;

s11-5-1-6: judging whether the sum of the A phase starting edge and the A phase duty ratio is greater than a second maximum edge or not; if the second maximum edge is greater than the first maximum edge, executing S11-5-1-7; otherwise, executing S11-5-1-8;

s11-5-1-7: a first edge of the A-phase PWM period is equal to a second maximum edge minus the A-phase duty cycle; executing S11-5-2 when the second edge of the A phase PWM period is equal to the second maximum edge;

s11-5-1-8: judging whether the sum of the A phase starting edge and the A phase duty ratio is smaller than a second minimum edge or not; if the second minimum edge is smaller than the second minimum edge, executing S11-5-1-9; otherwise, executing S11-5-1-10;

s11-5-1-9: a first edge of the A-phase PWM period is equal to the second minimum edge minus the A-phase duty cycle; the second edge of the a-phase PWM period is equal to the second minimum edge, and S11-5-2 is performed;

s11-5-1-10: a first edge of the A-phase PWM cycle is equal to the A-phase start edge; a second edge of the A-phase PWM period is equal to the A-phase start edge plus the A-phase duty cycle;

S11-5-2: distributing the duty ratio of the B phase;

s11-5-2-1: detecting whether the duty ratio of the B phase is larger than the maximum duty ratio, if so, executing S11-5-2-2, otherwise, executing S11-5-2-3;

s11-5-2-2: aligning a first edge of a B-phase PWM period with a zero point, aligning a second edge of the B-phase PWM period with the PWM period, opening an upper MOS tube of the B-phase, closing a lower MOS tube of the B-phase, and executing S11-5-3;

s11-5-2-3: detecting whether the duty ratio of the B phase is smaller than the minimum duty ratio, if so, executing S11-5-2-4, otherwise, executing S11-5-2-5;

S11-5-2-4: the PWM edge 1 of the phase B is equal to half of the PWM period, an MOS tube on the phase B is closed, an MOS tube under the phase B is opened, and S11-5-3 is executed;

s11-5-2-5: defining a B-phase starting edge, wherein the B-phase starting edge is equal to the first edge of the A-phase PWM period plus waveform overlapping setting;

s11-5-2-6: judging whether the phase B starting edge plus the phase B duty ratio is larger than a second maximum edge, and if so, executing S11-5-2-7; otherwise, executing S11-5-2-8;

s11-5-2-7: the first edge of the B-phase PWM period is equal to the second maximum edge minus the B-phase duty cycle; executing S11-5-3 when the second edge of the B-phase PWM period is equal to the second maximum edge;

s11-5-2-8: judging whether the sum of the B-phase starting edge and the B-phase duty ratio is smaller than a second minimum edge, if so, executing S11-5-2-9, otherwise, executing S11-5-2-10;

s11-5-2-9: a first edge of the B-phase PWM period is equal to a second minimum edge minus the B-phase duty cycle; the second edge of the B-phase PWM period is equal to the second minimum edge, and S11-5-3 is executed;

s11-5-2-10: the first edge of the B-phase PWM period is equal to the B-phase starting edge, and the first edge of the B-phase PWM period is equal to the B-phase starting edge plus the B-phase duty ratio;

S11-5-3: distributing the C-phase duty ratio;

s11-5-3-1: detecting whether the duty ratio of the C phase is larger than the maximum duty ratio, if so, executing S11-5-3-2, otherwise, executing S11-5-3-3;

s11-5-3-2: aligning a first edge of a C-phase PWM period with a zero point, enabling a second edge of the C-phase PWM period to be equal to the PWM period, opening an MOS (metal oxide semiconductor) tube on the C-phase, and closing an MOS tube under the C-phase;

s11-5-3-3: detecting whether the duty ratio of the C phase is smaller than the minimum duty ratio, if so, executing S11-5-3-4, otherwise, executing S11-5-3-5;

S11-5-3-4: the PWM edge 1 of the C phase is equal to half of the PWM period, the MOS tube on the C phase is closed, and the MOS tube under the C phase is opened;

s11-5-3-5: defining a C-phase starting edge, wherein the C-phase starting edge is equal to the first edge of the B-phase PWM period plus waveform overlapping setting;

s11-5-3-6: judging whether the sum of the C-phase starting edge and the C-phase duty ratio is greater than a second maximum edge, and if so, executing S11-5-3-7; otherwise, executing S11-5-3-8;

s11-5-3-7: a first edge of the C-phase PWM period is equal to a second maximum edge minus the C-phase duty cycle; executing S11-5-3 when the second edge of the C-phase PWM period is equal to the second maximum edge;

s11-5-3-8: judging whether the sum of the C-phase starting edge and the C-phase duty ratio is smaller than a second minimum edge, if so, executing S11-5-3-9, otherwise, executing S11-5-3-10;

s11-5-3-9: a first edge of the C-phase PWM period is equal to a second minimum edge minus the C-phase duty cycle; the second edge of the C-phase PWM period is equal to the second minimum edge, and S11-5-3 is performed;

s11-5-3-10: the first edge of the C-phase PWM period is equal to the C-phase start edge, which is equal to the C-phase start edge plus the C-phase duty cycle.

in the scheme, the method comprises the following steps: step S11-8 further includes:

s11-8-1: the MCU judges whether the motor is in a locked-rotor working state or not according to the rotating speed of the motor, and if the motor is in the locked-rotor working state, S11-8-2 is executed; if the motor is in a normal working state, executing S11-8-5;

s11-8-2: the MCU simultaneously sends the Q-axis feedback current and the D-axis feedback current to the motor locked-rotor temperature estimation module, the power consumption of the motor during locked-rotor is calculated by the motor locked-rotor temperature estimation module according to the motor current integral coefficient during locked-rotor, and the temperature rise degree is calculated according to the power consumption during locked-rotor;

s11-8-3: the MCU sends temperature detection data of a temperature sensor of the PCB to a motor locked-rotor temperature estimation module to determine the temperature of the PCB;

s11-8-4: the motor locked-rotor temperature estimation module calculates the motor temperature during locked-rotor through the temperature rise degree and the temperature of the PCB and sends the calculated motor temperature to the MCU; executing S11-8-8;

s11-8-5: the MCU simultaneously sends the Q-axis feedback current and the D-axis feedback current to the motor normal temperature estimation module, the motor normal temperature estimation module calculates the power consumption of the motor in normal according to the motor current integral coefficient in normal, and then calculates the temperature rise degree according to the power consumption in normal;

s11-8-6: the MCU sends temperature detection data of a temperature sensor of the PCB to a normal temperature estimation module of the motor to determine the temperature of the PCB;

s11-8-7: the motor normal temperature estimation module calculates the motor temperature in a normal state through the temperature rise degree and the temperature of the PCB and sends the calculated motor temperature to the MCU; executing S11-8-8;

s11-8-8: the MCU carries out interpolation table lookup according to the temperature of the motor, the MCU sends a Q-axis limiting current table lookup command to the database, and the database sends a Q-axis limiting current data table to the MCU;

s11-8-9: the MCU is used for obtaining the Q-axis limiting current according to the key word of the motor temperature, and the MCU adjusts the current of the Q axis after PI adjustment according to the Q-axis limiting current.

in summary, due to the adoption of the technical scheme, the invention has the beneficial effects that: can calculate comparatively accurate total helping hand moment of torsion, the better control car turns to, improves the car security of traveling, increases and drives the travelling comfort.

additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.

drawings

the above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:

FIG. 1 is a schematic flow diagram of the present invention.

Detailed Description

reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout; the embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention.

as shown in fig. 1, a control method of an electric power steering includes the steps of:

s1: calculating a torque;

s1-1: calculating the PWM duty ratio of the pulse signal of the first torque sensor, acquiring the pulse signal of the first torque sensor from a CC2 unit by the MCU, and calculating the duty ratio of the pulse signal of the first torque sensor by the MCU;

s1-2: checking a PWM duty ratio of a first torque sensor pulse signal;

s1-2-1: the MCU sends the PWM duty ratio of the first torque sensor pulse signal to the safety MCU through SPI communication, and the MCU and the safety MCU respectively and simultaneously check whether the PWM duty ratio of the first torque sensor pulse signal is in a normal range;

s1-2-2: if any one of the MCU and the safety MCU detects that the PWM duty ratio of the first torque sensor pulse signal is not in a normal range, the MCU or the safety MCU sends out a fault signal of 'the PWM duty ratio signal of the first torque sensor pulse signal is incorrect' to the pre-driver, and S1-7 is executed;

s1-3: calculating the PWM duty ratio of the pulse signal of the second torque sensor, acquiring the pulse signal of the first torque sensor from the CC2 unit by the MCU, and calculating the PWM duty ratio of the pulse signal of the second torque sensor by the MCU;

s1-4: checking the PWM duty ratio of the pulse signal of the second torque sensor;

S1-4-1: the MCU sends the PWM duty ratio of the pulse signal of the second torque sensor to the safety MCU through SPI communication, and the MCU and the safety MCU respectively and simultaneously check whether the PWM duty ratio of the pulse signal of the second torque sensor is in a normal range;

s1-4-2: if any one of the MCU and the safety MCU detects that the PWM duty ratio of the pulse signal of the second torque sensor is not in the normal range, the MCU or the safety MCU sends a fault signal of 'the PWM duty ratio signal of the pulse signal of the second torque sensor is incorrect' to the pre-driver, and S1-7 is executed;

s1-5: calculating, by the MCU, a sum of a PWM duty cycle of the first torque sensor pulse signal and a PWM duty cycle of the second torque sensor pulse signal;

s1-6: checking a sum of a PWM duty cycle of the first torque sensor pulse signal and a PWM duty cycle of the second torque sensor pulse signal;

s1-6-1: the MCU sends the sum of the PWM duty ratio of the first torque sensor pulse signal and the PWM duty ratio of the second torque sensor pulse signal to the safety MCU through SPI communication, and the MCU and the safety MCU respectively and simultaneously check whether the sum of the PWM duty ratio of the first torque sensor pulse signal and the PWM duty ratio of the second torque sensor pulse signal is in a normal range;

s1-6-2: if the sum of the PWM duty ratio of the first torque sensor pulse signal and the PWM duty ratio of the second torque sensor pulse signal is not in the normal range, the MCU or the safety MCU sends a fault signal to the pre-driver, and S1-7 is executed; if the sum of the PWM duty cycle of the first torque sensor pulse signal and the PWM duty cycle of the second torque sensor pulse signal is within the normal range, performing S1-8;

s1-7: the MCU or the safe MCU sends an instruction of 'the automobile enters a safe state' to the pre-driver, meanwhile, the MCU or the safe MCU stops the motor from rotating, stops performing electric power assistance on automobile steering, releases the instruction of 'the automobile enters the safe state' after the next ignition of the igniter, and executes S2;

s1-8: the MCU obtains a torque signal of the steering wheel through comprehensive calculation according to the duty ratio of the pulse signal of the first torque sensor and the duty ratio signal of the pulse signal of the second torque sensor and by combining the rigidity of the torsion bar, the characteristics of the first torque sensor and the second torque sensor and the like;

s2: calculating an angle;

s2-1: calculating the PWM duty ratio of the pulse signal of the first angle sensor, acquiring the pulse signal of the first angle sensor from the comparison and capture port by the MCU, and calculating the duty ratio of the pulse signal of the first angle sensor by the MCU;

s2-2: checking a PWM duty ratio of a first angle sensor pulse signal;

s2-2-1: the MCU sends the PWM duty ratio of the pulse signal of the first angle sensor to the safety MCU through SPI communication, and the MCU and the safety MCU respectively and simultaneously check whether the PWM duty ratio of the pulse signal of the first angle sensor is in a normal range;

s2-2-2: if any one of the MCU and the safety MCU detects that the PWM duty ratio of the first angle sensor pulse signal is not in a normal range, the MCU or the safety MCU sends a fault signal of 'the PWM duty ratio signal of the first angle sensor pulse signal is incorrect' to the pre-driver, and S2-7 is executed;

s2-3: calculating the PWM duty ratio of the pulse signal of the second angle sensor, acquiring the pulse signal of the first angle sensor from the comparison and capture port unit by the MCU, and calculating the duty ratio of the pulse signal of the second angle sensor by the MCU;

s2-4: checking the PWM duty ratio of the pulse signal of the second angle sensor;

S2-4-1: the MCU sends the PWM duty ratio of the pulse signal of the second angle sensor to the safety MCU through SPI communication, and the MCU and the safety MCU respectively and simultaneously check whether the PWM duty ratio of the pulse signal of the second angle sensor is in a normal range;

S2-4-2: if any one of the MCU and the safety MCU detects that the PWM duty ratio of the pulse signal of the second angle sensor is not in the normal range, the MCU or the safety MCU sends a fault signal of 'the PWM duty ratio signal of the pulse signal of the second angle sensor is incorrect' to the pre-driver, and S2-7 is executed;

S2-5: calculating the sum of the PWM duty ratio of the first angle sensor pulse signal and the PWM duty ratio of the second angle sensor pulse signal through the MCU;

s2-6: checking a sum of a PWM duty cycle of the first angle sensor pulse signal and a PWM duty cycle of the second angle sensor pulse signal;

s2-6-1: the MCU sends the sum of the PWM duty ratio of the pulse signal of the first angle sensor and the PWM duty ratio of the pulse signal of the second angle sensor to the safety MCU through SPI communication, and the MCU and the safety MCU respectively and simultaneously check whether the sum of the PWM duty ratio of the pulse signal of the first angle sensor and the PWM duty ratio of the pulse signal of the second angle sensor is in a normal range;

s2-6-2: if the sum of the PWM duty ratio of the first angle signal and the PWM duty ratio of the first angle signal is not in the normal range, the MCU or the safety MCU sends a fault signal to the pre-driver, and S2-7 is executed; if the sum of the PWM duty ratio of the first angle sensor pulse signal and the PWM duty ratio of the second angle sensor pulse signal is within the normal range, performing S2-8;

s2-7: the MCU or the safe MCU sends an instruction of 'the automobile enters a safe state' to the pre-driver, meanwhile, the MCU or the safe MCU stops the motor from rotating, stops performing electric power assistance on automobile steering, releases the instruction of 'the automobile enters the safe state' after the next ignition of the igniter, and executes S2;

S2-8: the MCU obtains an approximate angle range according to the characteristics of the first angle sensor and the second angle sensor and angle data of detection signals of the first angle sensor and the second angle sensor by using a vernier algorithm, and obtains an angle signal of the steering wheel by comprehensive calculation by adding an accurate angle;

s3: calculating the rotating speed of a steering wheel, and calculating by the MCU according to the angle of the steering wheel and time;

s4: collecting a vehicle speed signal;

s4-1: the MCU acquires a vehicle speed signal through the CAN bus and transmits the vehicle speed signal to the safety MCU through SPI communication;

s4-2: limiting the change of the vehicle speed, and if the vehicle speed change amount in unit time is greater than the maximum vehicle speed change value, outputting the current vehicle speed to the MCU by taking the initial speed plus the maximum vehicle speed change value;

s5: calculating a basic power-assisted torque;

s5-1: the MCU performs low-pass filtering processing on the torque signal obtained by calculation in the S1-8;

s5-1-1: MCU according to functioncalculating low-frequency torque of the torque signal;

S5-2: calculating a high-frequency torque;

s5-2-1: the MCU subtracts the low-frequency torque from the torque signal calculated according to the S1-8, and the obtained difference is the high-frequency torque;

s5-3: looking up a table by interpolation;

s5-3-1: the MCU initiates a command for calling a basic power table look-up to the database, and the database sends the basic power table to the MCU;

s5-3-2: the MCU queries calibration parameters to obtain the current gain according to the vehicle speed obtained by the S4-2 as a key check word;

s5-4: multiplying the high-frequency torque and the low-frequency torque by the obtained gain respectively to obtain a high-frequency gain and a low-frequency gain, and finally adding the high-frequency gain and the low-frequency gain together to calculate a basic boosting torque through a stability function;

s6: calculating a damping torque;

s6-1: the MCU performs interpolation table lookup according to the torque signal obtained by calculation in S1-8 to obtain a first related parameter of the damping torque;

s6-1-1: the MCU initiates a table look-up command for adjusting the damping torque to the database, and the database sends a damping torque data table to the MCU;

s6-1-2: the MCU is used as a closing detection word according to the torque signal obtained by calculation of S1-8 to obtain a first related parameter of the damping torque;

s6-2: the MCU performs difference table lookup according to the vehicle speed obtained in the step S4-2 and the rotating speed of the steering wheel obtained in the step S3 to obtain a second related parameter of the damping torque;

s6-2-1: after receiving the steering wheel rotating speed signal from the motor position signal Encode, the MCU carries out filtering processing and limiting value processing on the steering wheel rotating speed signal;

s6-2-2: the MCU initiates a table look-up command for adjusting the damping torque to the database, and the database sends a damping torque data table to the MCU;

s6-2-3: the MCU is used as a closing check word according to the vehicle speed obtained in the step S4-2 and the rotating speed of the steering wheel obtained in the step S3, and a second related parameter of the damping torque is obtained;

s6-3: the MCU multiplies the second damping torque related parameter by the second damping torque related parameter, and the obtained product is the damping torque;

s7: calculating the protection torque of the tail end of the rack;

s7-1: the MCU acquires a vehicle speed signal through S4-2, and calculates an absolute position according to signals input by the HALL sensor and the ENCODER;

s7-2: the MCU sends the absolute position to the safety MCU through SPI communication, and the safety MCU detects whether the absolute position is effective or not;

S7-2-1: the safety MCU mutually verifies whether the absolute position is effective or not through the Hella sensor and the position signal, and detects whether the middle position of the angle is calibrated or not through the safety MCU; if both are valid, executing S7-3;

s7-3: the MCU performs interpolation table lookup according to the vehicle speed signal obtained in the S4-2 and the absolute position signal obtained in the S7-1, and calculates the protection torque of the tail end of the rack;

s7-3-1: the MCU sends an instruction for calling a rack tail end protection torque data table to a database, and then searches corresponding data by taking a vehicle speed signal and an absolute position signal as keywords, wherein the obtained data is the size of the rack tail end protection torque;

s8: calculating a torque damping torque command;

s8-1: the MCU performs interpolation table lookup according to the vehicle speed signal acquired by the S4-2 to acquire a first torque damping related parameter;

S8-1-1: the MCU sends an instruction for calling a torque damping torque data table to the database, and then searches a first related parameter of the torque damping torque by taking the vehicle speed signal as a keyword;

s8-2: the MCU performs interpolation table lookup according to the torque signal obtained by calculation in S1-8 to obtain a second torque damping related parameter;

s8-2-1: the MCU sends a command for calling a torque damping torque data table to the database, and then searches a second related parameter of the torque damping torque by taking a torque signal obtained by calculation of S1-8 as a keyword;

s8-3: the MCU obtains the variation of the torque signal in unit time according to the torque signal obtained by calculation in S1-8;

s8-4: carrying out low-pass filtering on the variable quantity, and subtracting the variable quantity signal subjected to the low-pass filtering from the original variable quantity signal to obtain a variable quantity signal subjected to high-pass filtering;

s8-5: the MCU sends an instruction for calling a torque damping torque data table to the database, and then interpolation table look-up is carried out on the variable quantity signals subjected to high-pass filtering processing to obtain third torque damping related parameters;

s8-6: multiplying the first torque damping related parameter, the second torque damping related parameter and the third torque damping related parameter, wherein the obtained product is the torque damping torque;

s9: calculating the magnitude of aligning torque;

s9-1: the MCU acquires a vehicle speed signal through S4-2, and calculates an absolute position according to signals input by the HALL sensor and the ENCODER;

s9-2: the MCU sends the absolute position to the safety MCU through SPI communication, and the safety MCU detects whether the absolute position is effective or not; if yes, executing S9-3;

s9-3: the MCU performs interpolation table lookup according to the vehicle speed signal obtained in the S4-2 and the absolute position signal obtained in the S7-1, and calculates the correction torque;

s9-3-1: the MCU sends an instruction for calling a rack tail end protection torque data table to a database, and then searches corresponding data by taking a vehicle speed signal and an absolute position signal as keywords, wherein the obtained data is the correction torque;

s10: calculating the total power-assisted torque, and summing the basic power-assisted torque, the compensation torque, the rack tail end protection torque, the damping torque, the torque damping torque and the aligning torque by the MCU to obtain a value of the total power-assisted torque;

s10-1: calculating a total power-assisted torque command limit value;

s10-1-1: a supply voltage limit; the method comprises the steps that the MCU acquires the voltage of a power supply, sends an instruction for calling a total power-assisted power supply voltage limit data table to a database, searches the power supply voltage limit percentage by taking the voltage as a keyword, and supplies power to a motor according to the power supply voltage limit percentage;

S10-1-2: the total power-assisted torque is over-limit; the MCU acquires an engine rotating speed signal from the CAN bus, simultaneously acquires a vehicle speed signal according to S4-2, acquires a torque signal according to S1-7 and acquires a steering wheel rotating speed signal according to S3; the MCU sends an instruction for calling a total power-assisted torque limit data table to the database, and searches for the total power-assisted torque limit by taking an engine rotating speed signal, a vehicle speed signal, a steering wheel rotating speed signal and a torque signal as keywords;

s10-1-3: when the engine stops, the total power-assisted torque is zero, namely the MCU stops the steering power assistance;

s11: controlling the motor;

s11-1: calculating the current of the motor;

s11-1-1: the MCU determines the Q-axis current according to the total power-assisted torque;

s11-1-3: if the rotating speed of the motor is higher, adding the current of the D shaft, wherein the current of the D shaft is calculated according to the rotating speed of the motor and the motor parameters;

s11-2: calculating the position and the rotating speed of the motor;

s11-2-1: the MCU calculates the position of the motor according to the collected position signals of the HALL sensor;

s11-2-2: the MCU calculates the rotating speed of the motor according to the position change and the time of the motor;

s11-3: performing PI regulation on a D axis and a Q axis;

s11-3-1: the MCU drives the motor to rotate according to D-axis current and Q-axis current calculated by the total power-assisted torque; then, the three-phase current of the motor is detected, and the detected three-phase current is converted into the actual D-axis current and the actual Q-axis current according to the position of the motor obtained in the step S11-2-1;

s11-3-2: the MCU firstly sends Q-axis current obtained by calculation according to the total power-assisted torque and D-axis current obtained according to the motor rotating speed and motor parameters to the PI adjusting module;

s11-3-3: sending the actual D-axis current and Q-axis current as D-axis feedback current and Q-axis feedback current to a PI regulation module;

s11-3-3: the PI adjusting module calculates the difference value of the D-axis current and the D-axis feedback current, and adjusts the D-axis current and the D-axis feedback current in combination with the vehicle speed; if the difference value of the currents is larger than 0, the output voltage command of the shaft is gradually increased, otherwise, the voltage command of the shaft is reduced, and finally the purpose that the difference value of the currents is 0 is achieved;

s11-4: calculating the three-phase voltage of the motor;

s11-4-1: the MCU sends the motor position signal obtained in the step S11-2-1, the D-axis voltage value and the Q-axis voltage value after PI adjustment to the three-phase voltage calculation module, and the three-phase voltage calculation module calculates alpha voltage and beta voltage;

s11-4-1-1: correcting the position of the motor, obtaining the rotating angle of the motor in the time period according to the rotating speed of the motor by the MCU, re-determining the position of the motor, and sending a re-determined motor position signal to the three-phase voltage calculation module by the MCU;

s11-4-1-2: the three-phase voltage calculation module receives the re-determined motor position signal and calculates the cosine and sine of the re-determined motor position;

s11-4-1-3: the three-phase voltage calculation module calculates the magnitude of alpha voltage, wherein the alpha voltage is equal to the difference value obtained by subtracting the product of the Q-axis voltage command and the corrected sine of the motor position from the product of the D-axis voltage and the re-determined cosine of the motor position;

s11-4-1-4: the three-phase voltage calculation module calculates the beta voltage, and the beta voltage command is equal to the difference value obtained by multiplying the D-axis voltage command by the sine of the corrected motor position and subtracting the product of multiplying the Q-axis voltage command by the cosine of the corrected motor position;

s11-4-1-5: the three-phase voltage calculation module sends the alpha voltage value and the beta voltage value to the MCU;

s11-4-2: the three-phase voltage calculation module calculates a three-phase voltage value according to the alpha voltage and the beta voltage;

s11-4-2-1: the three-phase voltage calculation module calculates the voltage of the phase A, and the voltage of the phase A is equal to the voltage command of the alpha;

s11-4-2-2: the three-phase voltage calculation module calculates the voltage of the phase B, and the voltage of the phase B is equal to the sum of a negative one-half alpha voltage command plus a root-sign three-times beta voltage command divided by 2;

s11-4-2-2: the three-phase voltage calculation module calculates the magnitude of the C-phase voltage, and the voltage of the C-phase is equal to the opposite number of the sum of the voltage command of the phase line 1 and the voltage command of the phase line 2;

s11-4-3: the three-phase voltage calculation module sends the voltage values of the three phases to the MCU;

S11-5: distributing the duty ratio of the H-bridge MOS tube;

s11-5-1: distributing the duty ratio of the phase A;

s11-5-1-1: detecting whether the duty ratio of the phase A is larger than the maximum duty ratio, if so, executing S11-5-1-2, otherwise, executing S11-5-1-3;

S11-5-1-2: aligning a first edge of a phase A PWM period with a zero point, aligning a second edge of the phase A PWM period with the PWM period, opening an phase A upper MOS tube, closing a phase A lower MOS tube, and executing S11-5-2;

s11-5-1-3: detecting whether the duty ratio of the phase A is smaller than the minimum duty ratio, if so, executing S11-5-1-4, otherwise, executing S11-5-1-5;

s11-5-1-4: aligning a first edge of the A-phase PWM period with a zero point, aligning a second edge of the A-phase PWM period with a half of the PWM period, closing an MOS (metal oxide semiconductor) transistor on the A-phase, opening an MOS transistor on the A-phase, and executing S11-5-2;

s11-5-1-5: defining a phase B starting edge, wherein the phase A starting edge is equal to the minimum edge, and adding and summing the phase A starting edge and the phase A duty ratio;

S11-5-1-6: judging whether the sum of the A phase starting edge and the A phase duty ratio is greater than a second maximum edge or not; if the second maximum edge is greater than the first maximum edge, executing S11-5-1-7; otherwise, executing S11-5-1-8;

s11-5-1-7: a first edge of the A-phase PWM period is equal to a second maximum edge minus the A-phase duty cycle; executing S11-5-2 when the second edge of the A phase PWM period is equal to the second maximum edge;

s11-5-1-8: judging whether the sum of the A phase starting edge and the A phase duty ratio is smaller than a second minimum edge or not; if the second minimum edge is smaller than the second minimum edge, executing S11-5-1-9; otherwise, executing S11-5-1-10;

s11-5-1-9: a first edge of the A-phase PWM period is equal to the second minimum edge minus the A-phase duty cycle; the second edge of the a-phase PWM period is equal to the second minimum edge, and S11-5-2 is performed;

s11-5-1-10: a first edge of the A-phase PWM cycle is equal to the A-phase start edge; a second edge of the A-phase PWM period is equal to the A-phase start edge plus the A-phase duty cycle;

s11-5-2: distributing the duty ratio of the B phase;

s11-5-2-1: detecting whether the duty ratio of the B phase is larger than the maximum duty ratio, if so, executing S11-5-2-2, otherwise, executing S11-5-2-3;

s11-5-2-2: aligning a first edge of a B-phase PWM period with a zero point, aligning a second edge of the B-phase PWM period with the PWM period, opening an upper MOS tube of the B-phase, closing a lower MOS tube of the B-phase, and executing S11-5-3;

s11-5-2-3: detecting whether the duty ratio of the B phase is smaller than the minimum duty ratio, if so, executing S11-5-2-4, otherwise, executing S11-5-2-5;

S11-5-2-4: the PWM edge 1 of the phase B is equal to half of the PWM period, an MOS tube on the phase B is closed, an MOS tube under the phase B is opened, and S11-5-3 is executed;

S11-5-2-5: defining a B-phase starting edge, wherein the B-phase starting edge is equal to the first edge of the A-phase PWM period plus waveform overlapping setting;

s11-5-2-6: judging whether the phase B starting edge plus the phase B duty ratio is larger than a second maximum edge, and if so, executing S11-5-2-7; otherwise, executing S11-5-2-8;

s11-5-2-7: the first edge of the B-phase PWM period is equal to the second maximum edge minus the B-phase duty cycle; executing S11-5-3 when the second edge of the B-phase PWM period is equal to the second maximum edge;

s11-5-2-8: judging whether the sum of the B-phase starting edge and the B-phase duty ratio is smaller than a second minimum edge, if so, executing S11-5-2-9, otherwise, executing S11-5-2-10;

s11-5-2-9: a first edge of the B-phase PWM period is equal to a second minimum edge minus the B-phase duty cycle; the second edge of the B-phase PWM period is equal to the second minimum edge, and S11-5-3 is executed;

s11-5-2-10: the first edge of the B-phase PWM period is equal to the B-phase starting edge, and the first edge of the B-phase PWM period is equal to the B-phase starting edge plus the B-phase duty ratio;

s11-5-3: distributing the C-phase duty ratio;

s11-5-3-1: detecting whether the duty ratio of the C phase is larger than the maximum duty ratio, if so, executing S11-5-3-2, otherwise, executing S11-5-3-3;

s11-5-3-2: aligning a first edge of a C-phase PWM period with a zero point, enabling a second edge of the C-phase PWM period to be equal to the PWM period, opening an MOS (metal oxide semiconductor) tube on the C-phase, and closing an MOS tube under the C-phase;

s11-5-3-3: detecting whether the duty ratio of the C phase is smaller than the minimum duty ratio, if so, executing S11-5-3-4, otherwise, executing S11-5-3-5;

s11-5-3-4: the PWM edge 1 of the C phase is equal to half of the PWM period, the MOS tube on the C phase is closed, and the MOS tube under the C phase is opened;

s11-5-3-5: defining a C-phase starting edge, wherein the C-phase starting edge is equal to the first edge of the B-phase PWM period plus waveform overlapping setting;

s11-5-3-6: judging whether the sum of the C-phase starting edge and the C-phase duty ratio is greater than a second maximum edge, and if so, executing S11-5-3-7; otherwise, executing S11-5-3-8;

s11-5-3-7: a first edge of the C-phase PWM period is equal to a second maximum edge minus the C-phase duty cycle; executing S11-5-3 when the second edge of the C-phase PWM period is equal to the second maximum edge;

S11-5-3-8: judging whether the sum of the C-phase starting edge and the C-phase duty ratio is smaller than a second minimum edge, if so, executing S11-5-3-9, otherwise, executing S11-5-3-10;

s11-5-3-9: a first edge of the C-phase PWM period is equal to a second minimum edge minus the C-phase duty cycle; the second edge of the C-phase PWM period is equal to the second minimum edge, and S11-5-3 is performed;

s11-5-3-10: the first edge of the C-phase PWM period is equal to the C-phase starting edge, and the first edge of the C-phase PWM period is equal to the sum of the C-phase starting edge and the C-phase duty ratio;

s11-6: sampling the current of the three-phase motor;

s11-6-1: detecting the current of any two phases in the three-phase motor;

s11-6-2: detecting the position of the motor rotor through the HALL sensor to obtain a sector corresponding to the motor rotor, and then obtaining the relation of the current three-phase current to calculate the three-phase current; one sector is divided into 6 sectors, and the three-phase current relationship of each sector is fixed; therefore, the collected current can be known as which phase of the A \ B \ C three phases by judging the sector where the current is located, and finally the three-phase current is obtained;

s11-7: calculating the torque of the motor;

s11-7-1: the motor torque is equal to the feedback Q-axis current multiplied by a current torque conversion constant;

s11-8: estimating the temperature of the motor;

s11-8-1: the MCU judges whether the motor is in a locked-rotor working state or not according to the rotating speed of the motor, and if the motor is in the locked-rotor working state, S11-8-2 is executed; if the motor is in a normal working state, executing S11-8-5;

s11-8-2: the MCU simultaneously sends the Q-axis feedback current and the D-axis feedback current to the motor locked-rotor temperature estimation module, the power consumption of the motor during locked-rotor is calculated by the motor locked-rotor temperature estimation module according to the motor current integral coefficient during locked-rotor, and the temperature rise degree is calculated according to the power consumption during locked-rotor;

s11-8-3: the MCU sends temperature detection data of a temperature sensor of the PCB to a motor locked-rotor temperature estimation module to determine the temperature of the PCB;

s11-8-4: the motor locked-rotor temperature estimation module calculates the motor temperature during locked-rotor through the temperature rise degree and the temperature of the PCB and sends the calculated motor temperature to the MCU; executing S11-8-8;

s11-8-5: the MCU simultaneously sends the Q-axis feedback current and the D-axis feedback current to the motor normal temperature estimation module, the motor normal temperature estimation module calculates the power consumption of the motor in normal according to the motor current integral coefficient in normal, and then calculates the temperature rise degree according to the power consumption in normal;

s11-8-6: the MCU sends temperature detection data of a temperature sensor of the PCB to a normal temperature estimation module of the motor to determine the temperature of the PCB;

s11-8-7: the motor normal temperature estimation module calculates the motor temperature in a normal state through the temperature rise degree and the temperature of the PCB and sends the calculated motor temperature to the MCU; executing S11-8-8;

s11-8-8: the MCU carries out interpolation table lookup according to the temperature of the motor, the MCU sends a Q-axis limiting current table lookup command to the database, and the database sends a Q-axis limiting current data table to the MCU;

s11-8-9: the MCU is used for obtaining the Q-axis limiting current according to the key word of the motor temperature, and the MCU adjusts the current of the Q axis after PI adjustment according to the Q-axis limiting current.

while embodiments of the invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

26页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种用于汽车爆胎后行驶方向稳定控制的转向器

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类