Background
The electric drive system is an important component of an electric automobile and is the key for realizing mutual conversion of mechanical energy and electric energy. In a pure electric vehicle, bus current of a driving motor is an important parameter related to safe operation, efficiency calculation and the like of the vehicle, and needs to be monitored in real time and sent to a vehicle control unit.
The bus current estimation method of the electric drive system of the electric automobile comprises the following steps:
(1) the analog signal of the voltage value output by the bus current sensor is converted into a digital signal through the drive controller hardware through the amplifying circuit and the AD sampling circuit, the drive controller chip acquires the digital signal, and the drive controller software calculates the bus current according to the gain of the amplifying circuit and the digital signal acquired by the controller.
(2) The rack is according to the motor efficiency, the control efficiency, output torque, motor speed, the motor operating condition (electronic, the electricity generation) of test, according to the formula, electronic: m × n/(9550 × μ)1×μ2) And (3) power generation: m × n × μ1×μ2/9550 (in the formula, P is kW of input power of the controller, M is N.m of measured output torque of the motor on the rack, n is rpm/min of actual rotation speed of the motor, and μ1For motor efficiency, mu2For controller efficiency), calculate the controller input power P, and then use the formula P × 1000 ═ U × I (where: u is the bus voltage unit V and I is the bus current unit a) calculates the bus current I.
The method (1) collects the bus current by using a current sensor and a hardware circuit, and has the defects of increasing the weight and the volume of the controller, increasing the cost and increasing the fault occurrence probability of the controller.
The method (2) uses the bench actual measurement parameters to calculate the bus current, and has the defects that the bus current is different when the motor and the controller work at different voltages, torques and rotating speeds, so that the bench test period is long in order to ensure that the bus current precision is too many, and the bench test period is long, and the motor control chip needs to select a larger storage space for storing data required by bus current calculation when the bench wastes resources, so that the development cost of the product is increased, and the development period is long.
Chinese patent No. CN 109861610a discloses a method for estimating bus current of a permanent magnet synchronous motor in real time, which comprises: acquiring the rotating speed S, the torque T, the system input power P0 and the bus voltage U of the permanent magnet synchronous motor, and forming an offline data table; obtaining a coefficient vector k through third-order least square fitting calculation; acquiring input power P of an estimation system; and obtaining an estimated bus current I. According to the method, the bus current value obtained by estimation is inaccurate through three-order least square fitting calculation.
Disclosure of Invention
In order to solve the existing technical problems, the invention provides a bus current estimation method of an electric vehicle electric drive system, which estimates the bus current by using an extremum optimization algorithm combining a least square method and a genetic algorithm, so that the estimated bus current value is more accurate, the hardware cost is saved, the product reliability is improved, and the product development period is shortened.
The technical scheme of the invention is as follows:
a bus current estimation method of an electric drive system of an electric automobile comprises the following steps:
s01: acquiring the rotating speed n of a motor, the control torque M of the motor and the bus voltage U, and forming a data table and performing data segmentation;
s02: establishing a fitting function of
Wherein I is the estimated bus current, and a, b and c are coefficients;
s03: using least square method to solve and obtain a, b and c values, and constructing a fitness function of
Wherein m is the segment number, I
iIs the actual bus current; calculating the fitness d by using the values a, b and c solved by a least square method according to the constructed fitness function;
s04: iterative solution of a, b and c values is carried out by adopting a genetic algorithm, the fitness q is calculated, and if the fitness q is smaller than d-k within the iteration times and k is a preset value, the a, b and c values solved by the genetic algorithm are selected to obtain a fitting function; otherwise, obtaining a fitting function by using the values a, b and c solved by the least square method;
s05: using the obtained fitting function I ═ ax2+ bx + c estimates the bus current.
In a preferred embodiment, the data segmentation in step S01 is to segment the formed data table according to a certain motor control torque interval.
In a preferred technical solution, the iterative solution of the values a, b, and c by using a genetic algorithm in step S04 includes:
s41: coding the parameters to obtain an initialization group P (t);
s42: calculating the fitness of each individual in the population P (t) and evaluating;
s43: and acquiring a selection operator, acting the selection operator on the population and the mutation operator to perform genetic operation, and performing iterative operation.
The invention also discloses a bus current estimation system of the electric drive system of the electric automobile, which comprises the following components:
the data acquisition module is used for acquiring the rotating speed n of the motor, the motor control torque M and the bus voltage U, forming a data table and carrying out data segmentation;
a model building module for building a fitting function of
Wherein I is the estimated bus current, and a, b and c are coefficients;
the operation construction module obtains values a, b and c by using a least square method to solve, and constructs a fitness function of
Wherein m is the segment number, I
iIs the actual bus current; calculating the fitness d by using the values a, b and c solved by a least square method according to the constructed fitness function;
the operation module adopts a genetic algorithm to carry out iterative solution on values a, b and c, calculates the fitness q, and selects the values a, b and c solved by the genetic algorithm to obtain a fitting function if the fitness q is smaller than d-k within the iteration times and k is a preset value; otherwise, obtaining a fitting function by using the values a, b and c solved by the least square method;
an estimation module using the obtained fitting function I ═ ax2+ bx + c estimates the bus current.
In a preferred technical scheme, the data segmentation of the data acquisition module is to segment a formed data table according to a certain motor control torque interval.
In a preferred technical scheme, the iterative solution of the values a, b and c by using a genetic algorithm in the operation module comprises:
s41: coding the parameters to obtain an initialization group P (t);
s42: calculating the fitness of each individual in the population P (t) and evaluating;
s43: and acquiring a selection operator, acting the selection operator on the population and the mutation operator to perform genetic operation, and performing iterative operation.
The invention also discloses a bus current estimation device of an electric automobile electric drive system, which comprises: the method comprises a memory for storing a bus current estimation program of an electric vehicle electric drive system and a processor for operating the bus current estimation program of the electric vehicle electric drive system, wherein the bus current estimation program of the electric vehicle electric drive system is configured to realize the steps of the bus current estimation method of the electric vehicle electric drive system.
Compared with the prior art, the invention has the advantages that:
a hardware sampling circuit is not used, the bus current is estimated by using an extreme value optimization algorithm combining a least square method and a genetic algorithm, the estimated bus current value is more accurate, the hardware cost is saved, the reliability of the product is improved, and the product development period is shortened.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the accompanying drawings in conjunction with the following detailed description. It should be understood that the description is intended to be exemplary only, and is not intended to limit the scope of the present invention. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present invention.
Example (b):
the preferred embodiments of the present invention will be further described with reference to the accompanying drawings.
A bus current estimation method of an electric drive system of an electric automobile comprises the following steps:
s01: acquiring the rotating speed n of a motor, the control torque M of the motor and the bus voltage U, and forming a data table and performing data segmentation; the data segmentation is that the formed data table is segmented according to a certain motor control torque interval;
s02: establishing a fitting function of
Wherein I is the estimated bus current, and a, b and c are coefficients;
s03: using least square method to solve and obtain a, b and c values, and constructing a fitness function of
Wherein m is the segment number, I
iIs the actual bus current; calculating the fitness d by using the values a, b and c solved by a least square method according to the constructed fitness function;
s04: iterative solution of a, b and c values is carried out by adopting a genetic algorithm, the fitness q is calculated, and if the fitness q is smaller than d-k within the iteration times and k is a preset value, the a, b and c values solved by the genetic algorithm are selected to obtain a fitting function; otherwise, obtaining a fitting function by using the values a, b and c solved by the least square method;
s05: using the obtained fitting function I ═ ax2+ bx + c estimates the bus current.
The genetic algorithm is an algorithm for simulating a natural biological evolution mechanism, namely, a principle of survival, superiority and inferiority of a suitable person is followed, namely, useful and useless reservation in the optimizing process is eliminated. In genetic algorithms, the initial population is composed by encoding. The task of genetic manipulation is to apply certain manipulation to individuals of the population according to the fitness (fitness evaluation) of the individuals to the environment, thereby realizing the evolution process of high-quality and low-quality. From an optimization search perspective, genetic operations can optimize the solution of the problem, one generation after another, and approach an optimal solution. As shown in fig. 2, iterative solution of values a, b, and c using a genetic algorithm includes:
s41: coding the parameters to obtain an initialization group P (t);
s42: calculating the fitness of each individual in the population P (t) and evaluating;
s43: and acquiring a selection operator, acting the selection operator on the population and the mutation operator to perform genetic operation, and performing iterative operation.
As shown in fig. 1, the concrete practical operation of the bus current estimation method includes the following steps:
1. selecting a proper rack for testing the driving motor, recording the motor speed n fed back by the bus voltage U, MCU fed back by an MCU (Motor controller) and collecting the bus current I by a rack current sensoriControlling the torque M by the motor to generate a data table;
firstly, rack hardware can collect direct current bus current input by a motor controller, and a rack upper computer can perform corresponding filtering on the collected bus current to ensure that the collected current is real and effective;
secondly, the rack and the MCU need to have a communication function, the rack acquires bus voltage and motor rotating speed fed back by the MCU in real time according to a certain communication rule, the MCU acquires motor control torque issued by the rack in real time, and the communication function comprises one or more of CAN, Lin, FlexRay and Ethernet;
2. segmenting data according to a data table generated by bench test;
3. establishing a mathematical model expression by using a bus voltage U unit V, a motor rotating speed n unit rpm/min, a bus current I unit A and a motor control torque M unit N.m
4. Using the least squares method (
Minimum, m is determined by segmentation, I
iCollecting the bus current value through a rack current sensor for the actual bus current value) to respectively solve the values of a, b and c for each section of data torque;
5. since the actual use is solving
Minimization thereof, least squares solution
At a minimum, | I will be reduced
i-a deviation of I < 1, amplifying I
i-a deviation of I > 1, for which the invention further uses genetic algorithms to optimize a, b, c, the calculation of values of a, b, c being solved using the least squares method
6. Solving the values of a, b and c by using a genetic algorithm, wherein the fitness function of the genetic algorithm is
When one of the following conditions occurs, completing data fitting and determining a, b and c;
if the calculated fitness q of a, b and c solved by the genetic algorithm is less than d-k (k is determined according to actual needs), the values of a, b and c are taken as solutions;
secondly, according to the iteration times specified by the genetic algorithm, if the fitness q is still not less than d-k, the values a, b and c calculated by the least square method are taken as solutions;
7. programming MCU software, writing the expression into the software, and uploading the MCU calculation bus current to a communication network through a communication protocol;
8. and the rack retest detection rack acquires the bus current and feeds back the bus current by the MCU, corrects the c value to the extent that the error is in a reasonable range aiming at the unqualified point software, and performs rack test again until the requirement is met.
The following examples are given for illustrative purposes:
1. the rack records the working bus voltage range of the motor, high (U)high) Middle (U)mid) Low (U)low) Motor speed n fed back by bus voltage U, MCU fed back by MCU (motor controller) with three bus voltages and bus current I collected by rack current sensoraMotor control torque M, data table (motor speed interval 5) is generated00rpm/min, control torque interval of 5N.m) at each rotation speed;
2. segmenting the control torque in each bus voltage and the motor rotating speed in a data table generated by the bench test according to 30N.m intervals;
for example: (U)midAt voltage, the motor speed is n1500rpm/min, Torque Point M1=5N.m,M2=10N.m,M3=15N.m,M4=20N.m,M5=25N.m,M630 n.m. is one segment;
②Umidunder voltage, the rotating speed of the motor is 500rpm/min, the torque points are 35N.m, 40N.m, 45N.m, 50N.m, 55N.m and 60N.m, and the section is a section;
③Umidunder voltage, the rotating speed of the motor is 1000rpm/min, the torque points are 65N.m, 70N.m, 75N.m, 80N.m, 85N.m and 90N.m, and the section is a section;
3. establishing a mathematical model expression by using a bus voltage U unit V, a motor rotating speed n unit rpm/min, an estimated bus current I unit A and a motor control torque M unit N.m:
①x=Mn/U
②I=ax2+bx+c
4. using the least squares method (
Minimum) separately solving a for each data torque
1、b
1、c
1A value;
5. using a solved in step 4
1、b
1、c
1Computing
6. Using a genetic algorithm fitness function of
Solving the values a, b and c, finishing data fitting when one of the following conditions occurs, and determining a, b and c;
solving a if genetic algorithm2、b2、c2Calculating the fitness q to be less than d-1, and then a2、b2、c2The value is the solution;
② iterating 5000 times according to the genetic algorithm, if the fitness q is less than d-1, calculating a by least square method1、b1、c1The value is the solution;
7. programming MCU software, writing the expression into the software, and uploading the MCU calculation bus current to a communication network through a communication protocol;
8. and the rack retest detection rack acquires the bus current and feeds back the bus current by the MCU, corrects the c value to the extent that the error is in a reasonable range aiming at the unqualified point software, and performs rack test again until the requirement is met.
It is to be understood that the above-described embodiments of the present invention are merely illustrative of or explaining the principles of the invention and are not to be construed as limiting the invention. Therefore, any modification, equivalent replacement, improvement and the like made without departing from the spirit and scope of the present invention should be included in the protection scope of the present invention. Further, it is intended that the appended claims cover all such variations and modifications as fall within the scope and boundaries of the appended claims or the equivalents of such scope and boundaries.