CN104865535A - SOC estimation method and equipment for lithium ion battery based on FPGA - Google Patents

SOC estimation method and equipment for lithium ion battery based on FPGA Download PDF

Info

Publication number
CN104865535A
CN104865535A CN201510306280.3A CN201510306280A CN104865535A CN 104865535 A CN104865535 A CN 104865535A CN 201510306280 A CN201510306280 A CN 201510306280A CN 104865535 A CN104865535 A CN 104865535A
Authority
CN
China
Prior art keywords
centerdot
soc
fpga
battery
lithium ion
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510306280.3A
Other languages
Chinese (zh)
Inventor
马彦
何鹏才
王留
周秀文
孙延帅
茹敬佩
李炳思
殷明月
陈虹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jilin University
Original Assignee
Jilin University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jilin University filed Critical Jilin University
Priority to CN201510306280.3A priority Critical patent/CN104865535A/en
Publication of CN104865535A publication Critical patent/CN104865535A/en
Pending legal-status Critical Current

Links

Landscapes

  • Tests Of Electric Status Of Batteries (AREA)

Abstract

The invention proposes an SOC estimation method for a lithium ion battery based on an FPGA, and the method comprises the following steps: building a second-order equivalent circuit model of the lithium ion battery; building an SOC estimation algorithm based on EKF, and estimating the SOC of the lithium ion battery; carrying out principle analysis of a quick matrix operation method and the quick matrix operation decomposition of an EKF algorithm; collecting voltage and current data; carrying out UART communication; building an SOC estimator in the FPGA, and estimating the SOC of the lithium ion battery in real time; and carrying out monitoring and alarm prompt through an upper computer. Meanwhile, the invention also provides SOC estimation equipment for the lithium ion battery based on the FPGA. The method and equipment employ the FPGA to estimate the SOC of the battery, and solve a problem that a processor employed by a conventional battery management system is small in memory and low in operation speed during SOC estimation. The proposed quick matrix operation method reduces the complexity of multidimensional matrix operation, and reduces the storage times and calculation times of a system during the matrix operation. The method and equipment are high in operation speed, and save resources.

Description

A kind of lithium ion battery SOC method of estimation based on FPGA and estimating apparatus
Technical field
The invention belongs to electric automobile power battery technical field, be specifically related to a kind of lithium ion battery SOC method of estimation based on FPGA and estimating apparatus.
Background technology
For cell management system of electric automobile (Battery Management System, be called for short BMS), in real time, state-of-charge (the State of Charge of battery is estimated efficiently and accurately, be called for short SOC) most important, can improve from SOC algorithm for estimating and processor structure two aspect.
For the nonlinear model of lithium ion battery, use EKF (Extended Kalman Filter is called for short EKF) algorithm can estimate the SOC value of battery exactly.The method not only can overcome ampere-hour method cannot determine the problem that SOC initial value, cumulative errors are large, and can also solve open-circuit voltage method can not the problem of On-line Estimation SOC.But, expanded Kalman filtration algorithm (EKF) exists that a large amount of multi-dimensional matrixes adds, subtracts, multiplying, calculating process is complicated, and committed memory is comparatively large, and the processors such as existing single-chip microcomputer cannot meet the requirement of system to travelling speed and internal memory.
Processor in existing battery management system is core mainly with single-chip microcomputer, ARM or DSP greatly.Single-chip microcomputer adopts distributed frame, and its internal memory is little, processing speed is slow, computing power is poor, causes the efficiency of battery management system low, poor reliability.ARM and DSP comparatively single-chip microcomputer makes moderate progress in internal memory and computing velocity, but its essence or the serial executive mode based on instruction, still restricted in the raising of processing speed.In actual applications, in order to reduce the pressure of processor, also usually employing multi-disc single-chip microcomputer, ARM or DSP combine, composition master controller and realize the work of battery management system different piece from the mode of controller, but these methods cause the segmentation of debug difficulties and system, reduce the stability of system.
Field programmable gate array (Field Programmable Gate Array, be called for short FPGA) as a kind of signal processor of internal hardware structure programmable, there is flexible and configurable, the advantage such as execution speed fast, stable and reliable working performance, memory capacity are large.In addition, Altera and Xilinx company also proposes soft-core processor to be embedded in the programmable logic device (PLD) of FPGA, can not only in soft core implementation algorithm easily, and achieve communicating of microprocessor and logical device by bus.Based on these advantages, FPGA is applicable to realizing large-scale and complicated algorithm, can meet the demand of SOC algorithm for estimating to hardware.
Summary of the invention
Instant invention overcomes processor used in existing battery management system and have when completing the complicated algorithm containing multi-dimensional matrix computing that internal memory is little, travelling speed is slow, internal memory and the large problem of clock sources consumption, provide a kind of lithium ion battery SOC method of estimation based on FPGA and estimating apparatus.
For solving the problems of the technologies described above, the present invention adopts following technical scheme to realize:
Based on a lithium ion battery SOC method of estimation of FPGA, it is characterized in that step is as follows:
The first step, set up the second order equivalent-circuit model of lithium ion battery:
Li-ion battery model adopts Order RC equivalent-circuit model, and the state equation of its discretize and output equation are:
SOC ( k + 1 ) V s ( k + 1 ) V d ( k + 1 ) = 1 0 0 0 1 - T τ s 0 0 0 1 - T τ d · SOC ( k ) V s ( k ) V d ( k ) + - T Q N T C s T C d · I ( k ) - - - ( 1 )
V D(k)=V oc(SOC(k))-V s(k)-V d(k)-R i·I(k) (2)
Wherein, state-of-charge SOC, the polarizing voltage V of inside battery is selected sand V das state variable, then in the k moment, x (k)=[SOC (k) V s(k) V d(k)] t; τ s=R sc s, τ d=R dc d, R s, R dthe polarization resistance of battery, C s, C dit is the polarization capacity of battery; R iit is the ohmic internal resistance of battery; T is sampling interval duration; Q nfor battery rated capacity; V oc(SOC (k)) is the open-circuit voltage of k moment battery, V dk () is the terminal voltage of k moment battery, I (k) is the charging and discharging currents of k moment battery;
Introduce process noise w (k) and measurement noises v (k), formula (1), (2) can be expressed as
x(k+1)=A·x(k)+B·I(k)+w(k) (3)
y(k)=V D(k)+v(k)=C·x(k)+v(k) (4)
Wherein, w (k) and v (k) is mutual incoherent zero mean Gaussian white noise; Y (k) represents the battery terminal voltage of actual measurement;
Matrix of coefficients: A = 1 0 0 0 1 - T τ s 0 0 0 1 - T τ d , B = - T Q N T C s T C d T , C = ∂ y ( k ) ∂ x ( k ) T ;
Second step, in conjunction with second order equivalent-circuit model, set up the SOC algorithm for estimating based on EKF
Lithium ion battery second order equivalent-circuit model in convolution (3), formula (4) and the first step, set up the SOC of the SOC algorithm for estimating estimation battery based on EKF, be specially:
(1) initialization
Variance Q=E [w (k), the w (k) of deterministic process noise during k=0 t], variance R=E [v (k), the v (k) of measurement noises t], Initial state estimation value the covariance of original state P ( 0 ) = E [ ( x ‾ - ( 0 ) - x ^ ( 0 ) ) ( x ^ - ( 0 ) - x ^ ( 0 ) ) T ] ;
(2) rolling upgrades
At k=0,1,2 ... moment,
Status predication: x ^ - ( k + 1 ) = A · x ^ ( k ) + B · I ( k ) - - - ( 5 )
Covariance is predicted: P -(k+1)=AP (k) A t+ Q (6)
Kalman gain: L (k+1)=P -(k+1) C (k) t[C k+1p -(k+1) C (k) t+ R] -1(7)
State updating: x ^ ( k + 1 ) = x ^ - ( k + 1 ) + L ( k + 1 ) · [ y ( k + 1 ) - V d ( k + 1 ) ] - - - ( 8 )
Covariance upgrades: P (k+1)=[E-L (k+1) C k] P -(k+1) (9)
Formula (5) in this step process (2) is to formula (9) loop iteration, and the SOC value of required solution is one of state, be separated quantity of state can obtain roll upgrade lithium battery SOC value;
3rd step, analyze quick matrix operation ratio juris, and the EKF algorithm in second step is carried out quick matrix operation decomposition, its process is:
(1) quick matrix operation method principle
If matrix A, B, C and D meet respectively
Then
A m × s · B s × n = a 11 · b 11 + . . . + a 1 q · b q 1 + . . . + a 1 s · b s 1 . . . a 11 · b 1 e + . . . + a 1 q · b qe . . . + a 1 s · b se . . . a 11 · b 1 n + . . . + a 1 q · b qn . . . + a 1 s · b sn . . . . . . . . . . . . . . . a p 1 · b 11 + . . . + a pq · b q 1 + . . . + a ps · b s 1 . . . a p 1 · b 1 e + . . . + a pq · b qe . . . + a ps · b se . . . a p 1 · b 1 n + . . . + a pq · b qn . . . + a ps · b sn . . . . . . . . . . . . . . . a m 1 · b 11 + . . . + a mq · b q 1 + . . . + a ms · b s 1 . . . a m 1 · b 1 e + . . . + a mq · b qe . . . + a ms · b se . . . a m 1 · b 1 n + . . . + a mq · b qn . . . + a ms · b sn - - - ( 10 )
C m × d · D d × n = c 11 · d 11 + . . . + c 1 f · d f 1 + . . . + c 1 d · d d 1 . . . c 11 · d 1 e + . . . + c 1 f · d fe . . . + c 1 d · d de . . . c 11 · d 1 n + . . . + c 1 f · d fn . . . + c 1 d · d dn . . . . . . . . . . . . . . . c p 1 · d 11 + . . . + c pf · d f 1 + . . . + c pd · d d 1 . . . c p 1 · d 1 e + . . . + c pf · d fe . . . + c pd · d de . . . c p 1 · d 1 n + . . . + c pf · d fn . . . + c pd · d dn . . . . . . . . . . . . . . . c m 1 · d 11 + . . . + c mf · d f 1 + . . . + c md · d d 1 . . . c m 1 · d 1 e + . . . + c mf · d fe . . . + c md · d de . . . c m 1 · d 1 n + . . . + c mf · d fn . . . + c md · d dn - - - ( 11 )
So the matrix polynomial computing of Arbitrary Dimensions can be expressed as:
Wushu (10), (11) are brought in formula (12), and the breakdown obtaining quick matrix operation method is:
g 11 = ( a 11 · b 11 + . . . + a 1 q · b q 1 + . . . + a 1 s · b s 1 ) ± ( c 11 · d 11 + . . . + c 1 f · d f 1 + . . . + c 1 d · d d 1 ) ± . . . g 1 e = ( a 11 · b 1 e + . . . + a 1 q · b qe + . . . + a 1 s · b se ) ± ( c 11 · d 1 e + . . . + c 1 f · d fe + . . . + c 1 d · d de ± ) . . . g pe = ( a p 1 · b 1 e + . . . + a pq · b qe + . . . + a ps · b se ) ± ( c p 1 · d 1 e + . . . + c pf · d fe + . . . + c pd · d de ) ± . . . g mn = ( a m 1 · b 1 n + . . . + a mq · b qn + . . . + a ms · b sn ) ± ( c m 1 · d 1 n + . . . + c mf · d fn + . . . + c md · d dn ) ± . . . - - - ( 13 )
Quick matrix operation method only needs by formula (13) compute matrix G m × ninterior each element;
(2) EKF algorithm decomposes
EKF algorithm Chinese style (5) can be decomposed to formula (9) by formula (13) according to quick matrix operation method, its process is as follows:
1) decomposing state predicted value
If status predication value x ^ - ( k + 1 ) = x ^ 1 - ( k + 1 ) x ^ 2 - ( k + 1 ) x ^ 3 - ( k + 1 ) T ;
Quantity of state x ^ ( k ) = x ^ 1 ( k ) x ^ 2 ( k ) x ^ 3 ( k ) T = x ( k ) ; Matrix of coefficients A = a 11 0 0 0 a 22 0 0 0 a 33 , B = b 1 b 2 b 3 ; Then the breakdown of status predication formula (5) is:
x ^ 1 - ( k + 1 ) = a 11 · x ^ 1 ( k ) + b 1 · I ( k ) x ^ 2 - ( k + 1 ) = a 22 · x ^ 2 ( k ) + b 2 · I ( k ) x ^ 3 - ( k + 1 ) = a 33 · x ^ 3 ( k ) + b 3 · I ( k ) - - - ( 14 )
2) covariance matrix is decomposed
If covariance predicted value P - ( k + 1 ) = p 11 - ( k + 1 ) p 12 - ( k + 1 ) p 13 - ( k + 1 ) p 21 - ( k + 1 ) p 22 - ( k + 1 ) p 23 - ( k + 1 ) p 31 - ( k + 1 ) p 32 - ( k + 1 ) p 33 - ( k + 1 ) ;
Covariance P ( k ) = p 11 ( k ) p 12 ( k ) p 13 ( k ) p 21 ( k ) p 22 ( k ) p 23 ( k ) p 31 ( k ) p 32 ( k ) p 33 ( k ) ; The variance of process noise Q = Q 11 0 0 0 Q 22 0 0 0 Q 33 ; Then the breakdown of covariance prediction type (6) is:
p 11 - ( k + 1 ) = a 11 2 · p 11 ( k ) + Q 11 p 12 - ( k + 1 ) = a 11 · a 22 · p 12 ( k ) p 13 - ( k + 1 ) = a 11 · a 33 · p 13 ( k ) p 21 - ( k + 1 ) = a 11 · a 22 · p 21 ( k ) p 22 - ( k + 1 ) = a 22 2 · p 22 ( k ) + Q 22 p 23 - ( k + 1 ) = a 22 · a 33 · p 23 ( k ) p 31 - ( k + 1 ) = a 33 · a 11 · p 31 ( k ) p 32 - ( k + 1 ) = a 22 · a 33 · p 32 ( k ) p 33 - ( k + 1 ) = a 33 2 · p 33 ( k ) + Q 33 - - - ( 15 )
3) kalman gain is decomposed
If kalman gain L (k+1)=[L 11(k+1) L 21(k+1) L 31(k+1)] t; Matrix of coefficients C=[c 11c 12c 13]; Then the breakdown of kalman gain formula (7) is:
L 11 ( k + 1 ) = ( p 11 - ( k + 1 ) · c 11 + p 12 - ( k + 1 ) · c 12 + p 13 - ( k + 1 ) · c 13 ) · ( g ) - 1 L 21 ( k + 1 ) = ( p 21 - ( k + 1 ) · c 11 + p 22 - ( k + 1 ) · c 12 + p 23 - ( k + 1 ) · c 13 ) · ( g ) - 1 L 31 ( k + 1 ) = ( p 31 - ( k + 1 ) · c 11 + p 32 - ( k + 1 ) · c 12 + p 33 - ( k + 1 ) · c 13 ) · ( g ) - 1 - - - ( 16 )
Wherein, g = c 11 2 · p 11 - + p 12 - · c 11 · c 12 + c 11 · c 13 · p 13 - + p 21 - · c 11 · c 12 + c 12 2 · p 22 - + c 12 · c 13 · p 23 - + c 11 · c 13 · p 31 - + c 12 · c 13 · p 32 - + c 13 2 · p 33 - + R ;
4) decomposing state updated value
The breakdown of state updating value formula (7) is:
x ^ 11 ( k + 1 ) = x ^ 11 - ( k + 1 ) + L 11 ( k + 1 ) · h x ^ 21 ( k + 1 ) = x ^ 21 - ( k + 1 ) + L 21 ( k + 1 ) · h x ^ 31 ( k + 1 ) = x ^ 31 - ( k + 1 ) + L 31 ( k + 1 ) · h - - - ( 17 )
Wherein, h=y k+1-V d(k+1);
5) covariance matrix update value is decomposed
The breakdown of covariance matrix update value formula (9) is:
P 11 ( k + 1 ) = ( 1 - L 11 ( k + 1 ) · c 11 ) · P 11 - ( k + 1 ) - L 11 ( k + 1 ) · c 12 P 21 - ( k + 1 ) - L 11 ( k + 1 ) · c 13 P 31 - ( k + 1 ) P 12 ( k + 1 ) = ( 1 - L 11 ( k + 1 ) · c 11 ) · P 12 - ( k + 1 ) - L 11 ( k + 1 ) · c 12 P 22 - ( k + 1 ) - L 11 ( k + 1 ) · c 13 P 32 - ( k + 1 ) P 13 ( k + 1 ) = ( 1 - L 11 ( k + 1 ) · c 11 ) · P 13 - ( k + 1 ) - L 11 ( k + 1 ) · c 12 P 23 - ( k + 1 ) - L 11 ( k + 1 ) · c 13 P 33 - ( k + 1 ) P 21 ( k + 1 ) = - L 21 ( k + 1 ) · c 11 · P 11 - ( k + 1 ) + ( 1 - L 21 ( k + 1 ) · c 12 ) P 21 - ( k + 1 ) - L 11 ( k + 1 ) · c 13 P 31 - ( k + 1 ) P 22 ( k + 1 ) = - L 21 ( k + 1 ) · c 11 · P 11 - ( k + 1 ) + ( 1 - L 21 ( k + 1 ) · c 12 ) P 22 - ( k + 1 ) - L 11 ( k + 1 ) · c 13 P 32 - ( k + 1 ) P 23 ( k + 1 ) = - L 21 ( k + 1 ) · c 11 · P 13 - ( k + 1 ) + ( 1 - L 21 ( k + 1 ) · c 12 ) P 23 - ( k + 1 ) - L 11 ( k + 1 ) · c 13 P 33 - ( k + 1 ) P 31 ( k + 1 ) = - L 13 ( k + 1 ) · c 11 P 11 - ( k + 1 ) - L 31 ( k + 1 ) · c 12 P 21 - ( k + 1 ) + ( 1 - L 31 ( k + 1 ) · c 13 ) · P 31 - ( k + 1 ) P 32 ( k + 1 ) = - L 13 ( k + 1 ) · c 11 P 12 - ( k + 1 ) - L 31 ( k + 1 ) · c 12 P 22 - ( k + 1 ) + ( 1 - L 31 ( k + 1 ) · c 13 ) · P 32 ( k + 1 ) P 33 ( k + 1 ) = - L 13 ( k + 1 ) · c 11 P 13 - ( k + 1 ) - L 31 ( k + 1 ) · c 12 P 23 - ( k + 1 ) + ( 1 - L 31 ( k + 1 ) · c 13 ) · P 33 - ( k + 1 ) - - - ( 18 )
Finally, when realizing EKF algorithm in FPGA, only need to calculate breakdown (14) to formula (18);
4th step, to lithium ion battery discharge and recharge, gather its voltage and current data simultaneously:
After the first step to the 3rd step completes, the charging and discharging currents operating mode of lithium ion battery is set in charging/discharging apparatus, start as battery carries out discharge and recharge, and the data of voltage y (k) collected under this operating mode and electric current I (k) are transferred to FPGA board by UART;
5th step, set up UART communication, read the electric current and voltage data in the 4th step, and transmit the SOC value that the 6th step exports:
UART data communication protocol is set up in FPGA, be the data of voltage y (k) and the electric current I (k) exported in SOC estimator transmission the 4th step in the 6th step on the one hand, on the other hand the SOC value estimated in real time in the 6th step be transferred to host computer display;
6th step, in FPGA, set up SOC estimator by the EKF decomposition algorithm of the 4th step, using the electric current and voltage data in the 5th step as input, estimate the SOC of lithium ion battery:
Set up SOC estimator, be embedded in FPGA, and the EKF algorithm breakdown (14) in the 3rd step is realized in this estimator to formula (18), then the data of voltage y (k) in the 4th step and electric current I (k) are read in real time, estimate the SOC value of battery, and send alerting signal by the I/O mouth of FPGA to warning circuit when SOC value exceeds the safe range of setting;
The monitoring of 7th step, host computer and alarm:
Host computer receives the SOC value that the 6th step transmits, and demonstrates the change curve of SOC in real time, if the 6th step sends alerting signal, warning circuit alarm driver simultaneously.
A kind of lithium ion battery SOC estimating apparatus based on FPGA, it is characterized in that, comprise lithium ion battery, charging/discharging apparatus, terminals, FPGA board, host computer, warning circuit, one-to-two Serial Port Line, signal wire, charging/discharging apparatus is connected with lithium ion battery by terminals, charging/discharging apparatus is connected with FPGA board by the left end of one-to-two Serial Port Line, host computer is connected with FPGA board by the right-hand member of one-to-two Serial Port Line, FPGA board is connected with warning circuit by signal wire, the FPGA board of FPGA board to be the model of altera corp be DE2-70, comprising UART telecommunication circuit.
Compared with prior art the invention has the beneficial effects as follows:
The present invention can monitor the situation of change of lithium ion battery SOC in real time, make accurate early warning when SOC value exceeds safe range, such driver just can know the service condition learning battery, reasonable arrangement plan of travel, and management battery that can be good, extend the serviceable life of battery;
Quick matrix operation method, the computing of the multi-dimensional matrix of complexity can be converted to the computing between matrix interior element, be easy to realize in FPGA, decrease storage number of times and the calculation times of matrix operation, in FPGA, saved a large amount of storage spaces and clock sources, the system of improve completes the efficiency that lithium ion battery SOC estimates;
In FPGA, adopt EKF algorithm to estimate the SOC of lithium ion battery, there is the problem that internal memory is little, travelling speed is slow in the SOC solving the processor employing EKF algorithm estimation battery that existing battery management system uses.
Accompanying drawing explanation
Below in conjunction with accompanying drawing, the present invention is further illustrated:
Fig. 1 is a kind of process flow diagram of the lithium ion battery SOC method of estimation based on FPGA;
Fig. 2 is a kind of schematic diagram of the lithium ion battery SOC estimating apparatus based on FPGA;
Fig. 3 is a kind of based on the EKF algorithm flow chart in the lithium ion battery SOC method of estimation of FPGA;
Fig. 4 is a kind of UART telecommunication circuit figure of the lithium ion battery SOC estimating apparatus based on FPGA;
Fig. 5 is a kind of Nios II system of building based on Qsys of the lithium ion battery SOC method of estimation based on FPGA;
Fig. 6 is a kind of circuit diagram of warning circuit of the lithium ion battery SOC estimating apparatus based on FPGA;
Fig. 7 is that 3.7V 300mAh lithium manganate battery SOC estimates operation result figure.
In figure: 1. lithium ion battery, 2. charging/discharging apparatus, 3. terminals, 4.FPGA board, 5. host computer, 6. warning circuit, 7. one-to-two Serial Port Line, 8. signal wire.
Embodiment
Below in conjunction with accompanying drawing, the present invention is explained in detail:
Described a kind of lithium ion battery SOC estimating apparatus based on FPGA, as shown in Figure 2, comprise lithium ion battery 1, charging/discharging apparatus 2, terminals 3, FPGA board 4, host computer 5, warning circuit 6, one-to-two Serial Port Line 7, signal wire 8, charge and discharge equipment 2 is connected with lithium ion battery 1 by terminals 3, charging/discharging apparatus 2 is connected with FPGA board 4 by the left end of one-to-two Serial Port Line 7, host computer 5 is connected with FPGA board 4 by the right-hand member of one-to-two Serial Port Line 7, and FPGA board 4 is connected with warning circuit 6 by signal wire 8.The FPGA board of FPGA board 4 to be the model of altera corp be DE2-70, comprising UART telecommunication circuit.
Described a kind of lithium ion battery SOC method of estimation based on FPGA, as shown in Figure 1, comprises seven steps: the second order equivalent-circuit model setting up lithium ion battery; Set up the SOC algorithm for estimating based on EKF; The principle analysis of quick matrix operation method and the quick matrix operation of EKF algorithm are decomposed; Electric current and voltage data acquisition; UART communicates; SOC estimator is set up in FPGA; Host computer monitoring and alarm.
The concrete steps of described a kind of lithium ion battery SOC method of estimation based on FPGA are
The first step, set up lithium ion battery second order equivalent-circuit model:
Li-ion battery model adopts Order RC equivalent-circuit model, and the state equation of its discretize and output equation are:
SOC ( k + 1 ) V s ( k + 1 ) V d ( k + 1 ) = 1 0 0 0 1 - T τ s 0 0 0 1 - T τ d · SOC ( k ) V s ( k ) V d ( k ) + - T Q N T C s T C d · I ( k ) - - - ( 1 )
V D(k)=V oc(SOC(k))-V s(k)-V d(k)-R i·I(k) (2)
Wherein, state-of-charge SOC, the polarizing voltage V of inside battery is selected sand V das state variable, then in the k moment, x (k)=[SOC (k) V s(k) V d(k)] t; τ s=R sc s, τ d=R dc d, R s, R dthe polarization resistance of battery, C s, C dit is the polarization capacity of battery; R iit is the ohmic internal resistance of battery; T is sampling interval duration; Q nfor battery rated capacity; V oc(SOC (k)) is the open-circuit voltage of k moment battery, V dk () is the terminal voltage of k moment battery, I (k) is the charging and discharging currents of k moment battery;
Introduce process noise w (k) and measurement noises v (k), formula (1), (2) can be expressed as:
x(k+1)=A·x(k)+B·I(k)+w(k) (3)
y(k)=V D(k)+v(k)=C·x(k)+v(k) (4)
Wherein, w (k) and v (k) is mutual incoherent zero mean Gaussian white noise; Y (k) represents the battery terminal voltage of actual measurement;
Matrix of coefficients A = 1 0 0 0 1 - T τ s 0 0 0 1 - T τ d , B = - T Q N T C s T C d T , C = ∂ y ( k ) ∂ x ( k ) T ;
Second step, in conjunction with second order equivalent-circuit model, set up the SOC algorithm for estimating based on EKF
The SOC that the present invention selects EKF algorithm to complete battery estimates, EKF algorithm can filtering noise and interference, obtains dynamic system state optimum solution, is applicable to the nonlinear model of lithium ion battery, can estimate the SOC of battery exactly;
Lithium ion battery second order equivalent-circuit model in convolution (3), formula (4) and the first step, set up the SOC of the SOC algorithm for estimating estimation battery based on EKF, as shown in Figure 3, detailed process is:
(1) initialization
Variance Q=E [w (k), the w (k) of deterministic process noise during k=0 t], variance R=E [v (k), the v (k) of measurement noises t], Initial state estimation value the covariance of original state P ( 0 ) = E [ ( x ‾ - ( 0 ) - x ^ ( 0 ) ) ( x ^ - ( 0 ) - x ^ ( 0 ) ) T ] ;
(2) rolling upgrades
At k=0,1,2 ... moment,
Status predication: x ^ - ( k + 1 ) = A · x ^ ( k ) + B · I ( k ) - - - ( 5 )
Covariance is predicted: P -(k+1)=AP (k) A t+ Q (6)
Kalman gain: L (k+1)=P -(k+1) C t[CP -(k+1) C t+ R] -1(7)
State updating: x ^ ( k + 1 ) = x ^ - ( k + 1 ) + L ( k + 1 ) · [ y ( k + 1 ) - V d ( k + 1 ) ] - - - ( 8 )
Covariance upgrades: P (k+1)=[E-L (k+1) C k] P -(k+1) (9)
(3) formula (5) in this step process (2) is to formula (9) loop iteration, and the SOC value of required solution is one of state, be separated quantity of state can obtain roll upgrade lithium battery SOC value;
As shown in Figure 3 when each circulation calculating battery SOC is initial, input variable not only needs the value of voltage y (k) and electric current I (k), also needs initial value SOC (k), polarizing voltage initial value V simultaneously s(k) and V d(k), covariance initial value P (k) (k=0,1,1823), often complete and once input, just can estimate a SOC value of battery, and upgrade state value and covariance value, it can be used as the initial value next time circulated, enter into cycle calculations SOC next time and go.In loop body, constantly run EKF algorithm like this, until complete the sampling of 1823 groups of data set by experiment, obtain corresponding battery SOC estimation curve.
3rd step, the fast principle analysis of matrix operation method and the quick matrix operation of EKF algorithm are decomposed
(1) Fast Matrix principle
The present invention proposes quick matrix operation method, the adding of the multi-dimensional matrix of complexity, subtract, multiplying converts computing between matrix interior element to, save a large amount of system resource, accelerate system running speed, quick matrix operation method principle is as follows:
If matrix A, B, C and D meet respectively:
Then
A m × s · B s × n = a 11 · b 11 + . . . + a 1 q · b q 1 + . . . + a 1 s · b s 1 . . . a 11 · b 1 e + . . . + a 1 q · b qe . . . + a 1 s · b se . . . a 11 · b 1 n + . . . + a 1 q · b qn . . . + a 1 s · b sn . . . . . . . . . . . . . . . a p 1 · b 11 + . . . + a pq · b q 1 + . . . + a ps · b s 1 . . . a p 1 · b 1 e + . . . + a pq · b qe . . . + a ps · b se . . . a p 1 · b 1 n + . . . + a pq · b qn . . . + a ps · b sn . . . . . . . . . . . . . . . a m 1 · b 11 + . . . + a mq · b q 1 + . . . + a ms · b s 1 . . . a m 1 · b 1 e + . . . + a mq · b qe . . . + a ms · b se . . . a m 1 · b 1 n + . . . + a mq · b qn . . . + a ms · b sn - - - ( 10 )
C m × d · D d × n = c 11 · d 11 + . . . + c 1 f · d f 1 + . . . + c 1 d · d d 1 . . . c 11 · d 1 e + . . . + c 1 f · d fe . . . + c 1 d · d de . . . c 11 · d 1 n + . . . + c 1 f · d fn . . . + c 1 d · d dn . . . . . . . . . . . . . . . c p 1 · d 11 + . . . + c pf · d f 1 + . . . + c pd · d d 1 . . . c p 1 · d 1 e + . . . + c pf · d fe . . . + c pd · d de . . . c p 1 · d 1 n + . . . + c pf · d fn . . . + c pd · d dn . . . . . . . . . . . . . . . c m 1 · d 11 + . . . + c mf · d f 1 + . . . + c md · d d 1 . . . c m 1 · d 1 e + . . . + c mf · d fe . . . + c md · d de . . . c m 1 · d 1 n + . . . + c mf · d fn . . . + c md · d dn - - - ( 11 )
So the matrix polynomial computing of Arbitrary Dimensions can be expressed as:
Wushu (10), formula (11) are brought in formula (12), obtain the breakdown of quick matrix operation method:
g 11 = ( a 11 · b 11 + . . . + a 1 q · b q 1 + . . . + a 1 s · b s 1 ) ± ( c 11 · d 11 + . . . + c 1 f · d f 1 + . . . + c 1 d · d d 1 ) ± . . . g 1 e = ( a 11 · b 1 e + . . . + a 1 q · b qe + . . . + a 1 s · b se ) ± ( c 11 · d 1 e + . . . + c 1 f · d fe + . . . + c 1 d · d de ± ) . . . g pe = ( a p 1 · b 1 e + . . . + a pq · b qe + . . . + a ps · b se ) ± ( c p 1 · d 1 e + . . . + c pf · d fe + . . . + c pd · d de ) ± . . . g mn = ( a m 1 · b 1 n + . . . + a mq · b qn + . . . + a ms · b sn ) ± ( c m 1 · d 1 n + . . . + c mf · d fn + . . . + c md · d dn ) ± . . . - - - ( 13 )
Therefore by formula (13) compute matrix G m × nin each element, and the matrix operation method of routine and quick matrix operation method different.If a=is [a 0a ia n], b=[b 0b ib n] t(0≤i≤n), c i=a ib i, then adopt conventional method to complete the thinking that row vector a is multiplied with column vector b to be: c i=c i+ a ib i(c 0=0), an a is namely often completed ib icomputing, need storage intermediate result, then result and a upper c ivalue is added, and assignment is to c istore.There are two obvious shortcomings in conventional method: a storage number of times being the increase in the intermediate result that matrix interior element is multiplied; If two is containing 0 element in matrix, for containing 0 multiplication, addition and subtraction, formula c i=c i+ a ib istill can perform, add calculation times.Compared with conventional method, quick matrix operation method effectively can reduce the calculation times of matrix operation and the storage number of times of data, shorten system operation time, save system-computed internal memory, thus improve running efficiency of system, be highly profitable for realizing this algorithm containing a large amount of matrix operation of similar EKF.
Table 1 sets forth and adopts conventional method and quick matrix operation method to complete formula (10) storage number of times used and calculation times.As can be seen from Table 1, the storage number of times of conventional method be the s of quick matrix operation method doubly, and fast the calculation times of matrix operation method fewer than conventional method (depending on 0 element in matrix number, 0 element is more, and the calculation times of saving is more).
The storage number of times of table 1 conventional method and quick matrix operation method and calculation times
(2) EKF algorithm decomposes
Owing to realizing the computing more complicated of multi-dimensional matrix in FPGA, so first the present invention adopts quick matrix operation method to add matrix, subtracts, multiplying is decomposed, convert the computing between matrix element to.
EKF algorithm Chinese style (5) can be decomposed to formula (9) by formula (13) according to quick matrix operation method, its process is as follows:
6) decomposing state predicted value
If status predication value x ^ - ( k + 1 ) = x ^ 1 - ( k + 1 ) x ^ 2 - ( k + 1 ) x ^ 3 - ( k + 1 ) T ; Quantity of state x ^ ( k ) = x ^ 1 ( k ) x ^ 2 ( k ) x ^ 3 ( k ) T = x ( k ) ; Matrix of coefficients A = a 11 0 0 0 a 22 0 0 0 a 33 , B = b 1 b 2 b 3 ; Then the breakdown of status predication formula (5) is:
x ^ 1 - ( k + 1 ) = a 11 · x ^ 1 ( k ) + b 1 · I ( k ) x ^ 2 - ( k + 1 ) = a 22 · x ^ 2 ( k ) + b 2 · I ( k ) x ^ 3 - ( k + 1 ) = a 33 · x ^ 3 ( k ) + b 3 · I ( k ) - - - ( 14 )
7) covariance matrix is decomposed
If covariance predicted value P - ( k + 1 ) = p 11 - ( k + 1 ) p 12 - ( k + 1 ) p 13 - ( k + 1 ) p 21 - ( k + 1 ) p 22 - ( k + 1 ) p 23 - ( k + 1 ) p 31 - ( k + 1 ) p 32 - ( k + 1 ) p 33 - ( k + 1 ) ;
Covariance P ( k ) = p 11 ( k ) p 12 ( k ) p 13 ( k ) p 21 ( k ) p 22 ( k ) p 23 ( k ) p 31 ( k ) p 32 ( k ) p 33 ( k ) ; The variance of process noise Q = Q 11 0 0 0 Q 22 0 0 0 Q 33 ; Then the breakdown of covariance prediction type (6) is
p 11 - ( k + 1 ) = a 11 2 · p 11 ( k ) + Q 11 p 12 - ( k + 1 ) = a 11 · a 22 · p 12 ( k ) p 13 - ( k + 1 ) = a 11 · a 33 · p 13 ( k ) p 21 - ( k + 1 ) = a 11 · a 22 · p 21 ( k ) p 22 - ( k + 1 ) = a 22 2 · p 22 ( k ) + Q 22 p 23 - ( k + 1 ) = a 22 · a 33 · p 23 ( k ) p 31 - ( k + 1 ) = a 33 · a 11 · p 31 ( k ) p 32 - ( k + 1 ) = a 22 · a 33 · p 32 ( k ) p 33 - ( k + 1 ) = a 33 2 · p 33 ( k ) + Q 33 - - - ( 15 )
8) kalman gain is decomposed
If kalman gain L (k+1)=[L 11(k+1) L 21(k+1) L 31(k+1)] t; Matrix of coefficients C=[c 11c 12c 13]; Then the breakdown of kalman gain formula (7) is:
L 11 ( k + 1 ) = ( p 11 - ( k + 1 ) · c 11 + p 12 - ( k + 1 ) · c 12 + p 13 - ( k + 1 ) · c 13 ) · ( g ) - 1 L 21 ( k + 1 ) = ( p 21 - ( k + 1 ) · c 11 + p 22 - ( k + 1 ) · c 12 + p 23 - ( k + 1 ) · c 13 ) · ( g ) - 1 L 31 ( k + 1 ) = ( p 31 - ( k + 1 ) · c 11 + p 32 - ( k + 1 ) · c 12 + p 33 - ( k + 1 ) · c 13 ) · ( g ) - 1 - - - ( 16 )
Wherein, g = c 11 2 · p 11 - + p 12 - · c 11 · c 12 + c 11 · c 13 · p 13 - + p 21 - · c 11 · c 12 + c 12 2 · p 22 - + c 12 · c 13 · p 23 - + c 11 · c 13 · p 31 - + c 12 · c 13 · p 32 - + c 13 2 · p 33 - + R ;
9) decomposing state updated value
The breakdown of state updating value formula (7) is:
x ^ 11 ( k + 1 ) = x ^ 11 - ( k + 1 ) + L 11 ( k + 1 ) · h x ^ 21 ( k + 1 ) = x ^ 21 - ( k + 1 ) + L 21 ( k + 1 ) · h x ^ 31 ( k + 1 ) = x ^ 31 - ( k + 1 ) + L 31 ( k + 1 ) · h - - - ( 17 )
Wherein, h=y k+1-V d(k+1);
10) covariance matrix update value is decomposed
The breakdown of covariance matrix update value formula (9) is:
P 11 ( k + 1 ) = ( 1 - L 11 ( k + 1 ) · c 11 ) · P 11 - ( k + 1 ) - L 11 ( k + 1 ) · c 12 P 21 - ( k + 1 ) - L 11 ( k + 1 ) · c 13 P 31 - ( k + 1 ) P 12 ( k + 1 ) = ( 1 - L 11 ( k + 1 ) · c 11 ) · P 12 - ( k + 1 ) - L 11 ( k + 1 ) · c 12 P 22 - ( k + 1 ) - L 11 ( k + 1 ) · c 13 P 32 - ( k + 1 ) P 13 ( k + 1 ) = ( 1 - L 11 ( k + 1 ) · c 11 ) · P 13 - ( k + 1 ) - L 11 ( k + 1 ) · c 12 P 23 - ( k + 1 ) - L 11 ( k + 1 ) · c 13 P 33 - ( k + 1 ) P 21 ( k + 1 ) = - L 21 ( k + 1 ) · c 11 · P 11 - ( k + 1 ) + ( 1 - L 21 ( k + 1 ) · c 12 ) P 21 - ( k + 1 ) - L 11 ( k + 1 ) · c 13 P 31 - ( k + 1 ) P 22 ( k + 1 ) = - L 21 ( k + 1 ) · c 11 · P 11 - ( k + 1 ) + ( 1 - L 21 ( k + 1 ) · c 12 ) P 22 - ( k + 1 ) - L 11 ( k + 1 ) · c 13 P 32 - ( k + 1 ) P 23 ( k + 1 ) = - L 21 ( k + 1 ) · c 11 · P 13 - ( k + 1 ) + ( 1 - L 21 ( k + 1 ) · c 12 ) P 23 - ( k + 1 ) - L 11 ( k + 1 ) · c 13 P 33 - ( k + 1 ) P 31 ( k + 1 ) = - L 13 ( k + 1 ) · c 11 P 11 - ( k + 1 ) - L 31 ( k + 1 ) · c 12 P 21 - ( k + 1 ) + ( 1 - L 31 ( k + 1 ) · c 13 ) · P 31 - ( k + 1 ) P 32 ( k + 1 ) = - L 13 ( k + 1 ) · c 11 P 12 - ( k + 1 ) - L 31 ( k + 1 ) · c 12 P 22 - ( k + 1 ) + ( 1 - L 31 ( k + 1 ) · c 13 ) · P 32 ( k + 1 ) P 33 ( k + 1 ) = - L 13 ( k + 1 ) · c 11 P 13 - ( k + 1 ) - L 31 ( k + 1 ) · c 12 P 23 - ( k + 1 ) + ( 1 - L 31 ( k + 1 ) · c 13 ) · P 33 - ( k + 1 ) - - - ( 18 )
Finally, when realizing EKF algorithm in FPGA, only need to calculate breakdown (14) to formula (18).
What illustrate is have an inversion operation in formula (7), finds CP by analyzing -(k+1) operation result of C+R is a number, and therefore the inversion operation of formula (7) only needs the division arithmetic by a number.
The storage number of times of table 2 conventional method and quick matrix operation method and calculation times (EKF algorithm)
In FPGA board, the quick matrix operation method of formula (14) to (18) and conventional method is adopted to complete in EKF algorithm required calculation times (comprising plus-minus method number of times, multiplication number of times and number of times of inverting) respectively and storage number of times is as shown in table 2.As can be seen from Table 2, complete primary lithium ion battery SOC and estimate, quick matrix operation method is fewer than conventional method stores 130 times, calculates 50 times less, and estimate if complete repeatedly SOC, the number of times that store and calculation times will reduce more.
4th step, to lithium ion battery discharge and recharge, gather its voltage and current data simultaneously
After the first step to the 3rd step completes, the charging and discharging currents operating mode of lithium ion battery is set in charging/discharging apparatus, start as battery carries out discharge and recharge, and the data of voltage y (k) collected under this operating mode and electric current I (k) are transferred to FPGA board 4 by UART.
The self-defined electric current operating mode of table 3
The present embodiment selects 4 joint 3.7V 300mAh LiMn2O4 cells to be in series, the charge and discharge equipment choosing of battery be new Weir battery test system, self-defining electric current operating mode is for shown in table 3.After being provided with, opening charging equipment, be battery charging and discharging, and voltage and current data are transferred out.
5th step, set up UART communication, read the electric current and voltage data in the 4th step, and transmit the SOC value that the 6th step exports
What the present embodiment was selected is one-to-two Serial Port Line, one end connects FPGA board 4, two ends connect charging/discharging apparatus 1 and host computer 5 respectively in addition, the SOC estimator that can be on the one hand in the 6th step transmits the data of voltage y (k) and the electric current I (k) exported in the 4th step, the SOC value estimated in real time in 6th step can be transferred to host computer display on the other hand, as shown in Figure 2.
The present embodiment uses ADM3202 transceiving chip and a nine kinds of needles D-SUB connector for forming the UART serial communication of FPGA board 4, and Fig. 4 is its hardware elementary diagram.Wherein UART_RXD is receiving end, receives the SOC value that FPGA processing unit exports, is connected with fpga chip D21 pin; UART_TXD is transmitting terminal, and the SOC value received by receiving end sends to host computer, is connected with fpga chip G22 pin; UART_RTS/UART_CTS is request to send/allowed to send signal, is connected respectively with fpga chip E21 with D21 pin.In the present embodiment, transfer rate is set to 19200bit/s.Receive in Fig. 5 and be connected with light emitting diode with transmitting terminal, whether send and receive information to point out.
According to UART communication protocol in the present embodiment, devise UART communication with Verilog HDL, not only increase execution speed, and UART Core Feature has been integrated in FPGA board 4, reliable, stable, compact data transmission can be realized.
6th step, in FPGA, set up SOC estimator by the EKF decomposition algorithm of the 4th step, using the electric current and voltage data in the 5th step as input, estimate the SOC of lithium ion battery
FPGA is that lithium ion battery SOC algorithm for estimating provides Qsys (SOPC) platform, sets up Nios II system on the platform, is embedded in FPGA, then set up the SOC value that EKF estimator estimates lithium ion battery within the system.
The present invention selects FPGA board 4 to be DE2-70 of Alera company, and its chip model is Cyclone II EP2C70F896C6N.Qsys hardware platform is configured in FPGA, and produce Nios II system, be embedded in FPGA board 4, then set up the SOC that EKF estimator estimates lithium ion battery within the system, by the I/O mouth of FPGA board 4 and UART communications to host computer 5 and warning circuit 6.Detailed process is as follows:
(1) in Quartus II software, engineering is set up.
(2) the Qsys system required for foundation.
Qsys instrument is SOPC builder developing instrument of new generation, it is an assembly in Quartus II, have good user customization features, the assembly by interpolation and deletion standard package or configuration different qualities builds the processor having different performance, meet different requirement.The Qsys system configured as shown in Figure 5, comprise Nios II CPU, the SystemID of representative capacity, the JTAG UART downloaded, internal storage OnChip RAM, export the PIO of SOC value, the kernel such as Performance counter that the working time of analytical algorithm and clock consume, each kernel is coupled together by Avalon bus and CPU.
(3) set up the top document of system, by top layer rowization, Qsys system and external hardware circuit are coupled together.
(4) produce Nios II system, and complete writing and debugging of EKF algorithm in Nios II IDE.
After completing according to said process, EKF algorithm breakdown (14) is realized in this estimator to formula (18).Finally, read the data of voltage y (k) and the electric current I (k) gathered, as the input of SOC estimator, in FPGA board 4, estimate the SOC value of lithium ion battery in real time, and send alerting signal by the I/O mouth of FPGA board 4 to warning circuit 6 when SOC value exceeds the safe range of setting.
The monitoring of 7th step, host computer and alarm
Host computer receives the SOC value that the 6th step transmits, and demonstrates the change curve of SOC in real time.
If the 6th step sends alerting signal, warning circuit 6 alarm driver simultaneously.As shown in Figure 6, EN_SOC represents the alerting signal that fpga chip sends to warning circuit 6, is connected with the I/O mouth of FPGA board 4.When the SOC of battery is lower than 15% or when reaching 100%, EN_SOC becomes high level, buzzer warning, simultaneously when red, reminds driver to charge in time or stops charging.
Complete experiment according to the present invention, the result that host computer 5 shows as shown in Figure 7.Wherein curve 1 is the lithium ion battery SOC estimation curve of the lithium ion battery SOC method of estimation based on FPGA, curve 2 is the lithium ion battery SOC estimation reference curves based on ampere-hour method (electric current used is the theoretical current arranging operating mode, there is not score accumulation error).As can be seen from Figure 7, in 0 ~ 1823s, the SOC of lithium ion battery drops to 71% by 89%, and in the reasonable scope, system estimation precision is higher for the error of estimation curve compared with reference curve.
By Performance counter kernel simulation analysis in Nios II system, the quick matrix operation method of use and conventional method realize the quality that EKF algorithm estimates battery SOC in simultaneously the present invention, and result is as table 4.Can be found out by table 4, the lithium ion battery SOC utilizing quick matrix operation method to realize estimates compared with conventional method, complete a SOC and estimate that the time used considerably reduces, estimate that the time used is 0.500526ms as conventional method completes a SOC, clock number used is 25026, and fast matrix operation method completes a SOC and estimates that the time used is 0.086594ms, clock number used is 4330, nearly 5 times of time decreased.
Table 4 EKF algorithm performance is analyzed

Claims (2)

1., based on a lithium ion battery SOC method of estimation of FPGA, it is characterized in that step is as follows:
The first step, set up the second order equivalent-circuit model of lithium ion battery:
Li-ion battery model adopts Order RC equivalent-circuit model, and the state equation of its discretize and output equation are:
SOC ( k + 1 ) V s ( k + 1 ) V d ( k + 1 ) = 1 0 0 0 1 - T τ s 0 0 0 1 - T τ d · SOC ( k ) V s ( k ) V d ( k ) + - T Q N T C s T C d · I ( k ) - - - ( 1 )
V D(k)=V oc(SOC(k))-V s(k)-V d(k)-R i·I(k) (2)
Wherein, state-of-charge SOC, the polarizing voltage V of inside battery is selected sand V das state variable, then in the k moment, x (k)=[SOC (k) V s(k) V d(k)] t; τ s=R sc s, τ d=R dc d, R s, R dthe polarization resistance of battery, C s, C dit is the polarization capacity of battery; R iit is the ohmic internal resistance of battery; T is sampling interval duration; Q nfor battery rated capacity; V oc(SOC (k)) is the open-circuit voltage of k moment battery, V dk () is the terminal voltage of k moment battery, I (k) is the charging and discharging currents of k moment battery;
Introduce process noise w (k) and measurement noises v (k), formula (1), (2) can be expressed as
x(k+1)=A·x(k)+B·I(k)+w(k) (3)
y(k)=V D(k)+v(k)=C·x(k)+v(k) (4)
Wherein, w (k) and v (k) is mutual incoherent zero mean Gaussian white noise; Y (k) represents the battery terminal voltage of actual measurement;
Matrix of coefficients: A = 1 0 0 0 1 - T τ s 0 0 0 1 - T τ d , B = - T Q N T C s T C d T , C = ∂ y ( k ) ∂ x ( k ) T ;
Second step, in conjunction with second order equivalent-circuit model, set up the SOC algorithm for estimating based on EKF
Lithium ion battery second order equivalent-circuit model in convolution (3), formula (4) and the first step, set up the SOC of the SOC algorithm for estimating estimation battery based on EKF, be specially:
(1) initialization
Variance Q=E [w (k), the w (k) of deterministic process noise during k=0 t], variance R=E [v (k), the v (k) of measurement noises t], Initial state estimation value the covariance of original state P ( 0 ) = E [ ( x ^ - ( 0 ) - x ^ ( 0 ) ) ( x ^ - ( 0 ) - x ^ ( 0 ) ) T ] ;
(2) rolling upgrades
At k=0,1,2 ... moment,
Status predication: x ^ - ( k + 1 ) = A · x ^ ( k ) + B · I ( k ) - - - ( 5 )
Covariance is predicted: P -(k+1)=AP (k) A t+ Q (6)
Kalman gain: L (k+1)=P -(k+1) C (k) t[C k+1p -(k+1) C (k) t+ R] -1(7)
State updating: x ^ ( k + 1 ) = x ^ - ( k + 1 ) + L ( k + 1 ) · [ y ( k + 1 ) - V D ( k + 1 ) ] - - - ( 8 )
Covariance upgrades: P (k+1)=[E-L (k+1) C k] P -(k+1) (9)
Formula (5) in this step process (2) is to formula (9) loop iteration, and the SOC value of required solution is one of state, be separated quantity of state can obtain roll upgrade lithium battery SOC value;
3rd step, analyze quick matrix operation ratio juris, and the EKF algorithm in second step is carried out quick matrix operation decomposition, its process is:
(1) quick matrix operation method principle
If matrix A, B, C and D meet respectively
Then
A m × s · B s × n = a 11 · b 11 + . . . + a 1 q · b q 1 + . . . + a 1 s · b s 1 . . . a 11 · b 1 e + . . . + a 1 q · b qe . . . + a 1 s · b se . . . a 11 · b 1 n + . . . + a 1 q · b qn . . . + a 1 s · b sn . . . . . . . . . . . . . . . a p 1 · b 11 + . . . + a pq · b q 1 + . . . + a ps · b s 1 . . . a p 1 · b 1 e + . . . + a pq · b qe . . . + a ps · b se . . . a p 1 · b 1 n + . . . + a pq · b qn . . . + a ps · b sn . . . . . . . . . . . . . . . a m 1 · b 11 + . . . + a mq · b q 1 + . . . + a ms · b s 1 . . . a m 1 · b 1 e + . . . + a mq · b qe . . . + a ms · b se . . . a m 1 · b 1 n + . . . + a mq · b qn . . . + a ms · b sn - - - ( 10 )
C m × d · D d × n = c 11 · d 11 + . . . + c 1 f · d f 1 + . . . + c 1 d · d d 1 . . . c 11 · d 1 e + . . . + c 1 f · d fe + . . . + c 1 d · d de . . . c 11 · d 1 n + . . . + c 1 f · d fn + . . . + c 1 d · d dn . . . . . . . . . . . . . . . c p 1 · d 11 + . . . + c pf · d f 1 + . . . + c pd · d d 1 . . . c p 1 · d 1 e + . . . + c pf · d fe + . . . + c pd · d de . . . c p 1 · d 1 n + . . . + c pf · d fn + . . . + c pd · d dn . . . . . . . . . . . . . . . c m 1 · d 11 + . . . + c mf · d f 1 + . . . + c md · d d 1 . . . c m 1 · d 1 e + . . . + c mf · d fe + . . . + c md · d de . . . c m 1 · d 1 n + . . . + c mf · d fn + . . . + c md · d dn - - - ( 11 )
So the matrix polynomial computing of Arbitrary Dimensions can be expressed as:
Wushu (10), (11) are brought in formula (12), and the breakdown obtaining quick matrix operation method is:
g 11 = ( a 11 · b 11 + . . . + a 1 q · b q 1 + . . . + a 1 s · b s 1 ) ± ( c 11 · d 11 + . . . + c 1 f · d f 1 + . . . + c 1 d · d d 1 ) ± . . . . . . . . . g 1 e = ( a 11 · b 1 e + . . . + a 1 q · b qe + . . . + a 1 s · b se ) ± ( c 11 · d 1 e + . . . + c 1 f · d fe + . . . + c 1 d · d de ± ) . . . . . . . . . g pe = ( a p 1 · b 1 e + . . . + a pq · b qe + . . . + a ps · b se ) ± ( c p 1 · d 1 e + . . . + c pf · d fe + . . . + c pd · d de ) ± . . . . . . . . . g mn = ( a m 1 · b 1 n + . . . + a mq · b qn + . . . + a ms · b sn ) ± ( c m 1 · d 1 n + . . . + c mf · d fn + . . . + c md · d dn ) ± . . . - - - ( 13 )
Quick matrix operation method only needs by formula (13) compute matrix G m × ninterior each element;
(2) EKF algorithm decomposes
EKF algorithm Chinese style (5) can be decomposed to formula (9) by formula (13) according to quick matrix operation method, its process is as follows:
1) decomposing state predicted value
If status predication value x ^ - ( k + 1 ) = x ^ 1 - ( k + 1 ) x ^ 2 - ( k + 1 ) x ^ 3 - ( k + 1 ) T ; Quantity of state x ^ ( k ) = x ^ 1 ( k ) x ^ 2 ( k ) x ^ 3 ( k ) T = x ( k ) ; Matrix of coefficients A = a 11 0 0 0 a 22 0 0 0 a 33 , B = b 1 b 2 b 3 ; Then the breakdown of status predication formula (5) is:
x ^ 1 - ( k + 1 ) = a 11 · x ^ 1 ( k ) + b 1 · I ( k ) x ^ 2 - ( k + 1 ) = a 22 · x ^ 2 ( k ) + b 2 · I ( k ) x ^ 3 - ( k + 1 ) = a 33 · x ^ 3 ( k ) + b 3 · I ( k ) - - - ( 14 )
2) covariance matrix is decomposed
If covariance predicted value P - ( k + 1 ) = p 11 - ( k + 1 ) p 12 - ( k + 1 ) p 13 - ( k + 1 ) p 21 - ( k + 1 ) p 22 - ( k + 1 ) p 23 - ( k + 1 ) p 31 - ( k + 1 ) p 32 - ( k + 1 ) p 33 - ( k + 1 ) ;
Covariance P ( k ) = p 11 ( k ) p 12 ( k ) p 13 ( k ) p 21 ( k ) p 22 ( k ) p 23 ( k ) p 31 ( k ) p 32 ( k ) p 33 ( k ) ; The variance of process noise Q = Q 11 0 0 0 Q 22 0 0 0 Q 33 ;
Then the breakdown of covariance prediction type (6) is:
p 11 - ( k + 1 ) = a 11 2 · p 11 ( k ) + Q 11 p 12 - ( k + 1 ) = a 11 · a 22 · p 12 ( k ) p 13 - ( k + 1 ) = a 11 · a 33 · p 13 ( k ) p 21 - ( k + 1 ) = a 11 · a 22 · p 21 ( k ) p 22 - ( k + 1 ) = a 22 2 · p 22 ( k ) + Q 22 p 23 - ( k + 1 ) = a 22 · a 33 · p 23 ( k ) p 31 - ( k + 1 ) = a 33 · a 11 · p 31 ( k ) p 32 - ( k + 1 ) = a 22 · a 33 · p 32 ( k ) p 33 - ( k + 1 ) = a 33 2 · p 33 ( k ) + Q 33 - - - ( 15 )
3) kalman gain is decomposed
If kalman gain L (k+1)=[L 11(k+1) L 21(k+1) L 31(k+1)] t; Matrix of coefficients C=[c 11c 12c 13];
Then the breakdown of kalman gain formula (7) is:
L 11 ( k + 1 ) = ( p 11 - ( k + 1 ) · c 11 + p 12 - ( k + 1 ) · c 12 + p 13 - ( k + 1 ) · c 13 ) · ( g ) - 1 L 21 ( k + 1 ) = ( p 21 - ( k + 1 ) · c 11 + p 22 - ( k + 1 ) · c 12 + p 23 - ( k + 1 ) · c 13 ) · ( g ) - 1 L 31 ( k + 1 ) = ( p 31 - ( k + 1 ) · c 11 + p 32 - ( k + 1 ) · c 12 + p 33 - ( k + 1 ) · c 13 ) · ( g ) - 1 - - - ( 16 )
Wherein, g = c 11 2 · p 11 - + p 12 - · c 11 · c 12 + c 11 · c 13 · p 13 - + p 21 - · c 11 · c 12 + c 12 2 · p 22 - + c 12 · c 13 · p 23 - + c 11 · c 13 · p 31 - + c 12 · c 13 · p 32 - + c 13 2 · p 33 - + R ;
4) decomposing state updated value
The breakdown of state updating value formula (7) is:
x ^ 11 ( k + 1 ) = x ^ 11 - ( k + 1 ) + L 11 ( k + 1 ) · h x ^ 21 ( k + 1 ) = x ^ 21 - ( k + 1 ) + L 21 ( k + 1 ) · h x ^ 31 ( k + 1 ) = x ^ 31 - ( k + 1 ) + L 31 ( k + 1 ) · h - - - ( 17 )
Wherein, h=y k+1-V d(k+1);
5) covariance matrix update value is decomposed
The breakdown of covariance matrix update value formula (9) is:
P 11 ( k + 1 ) = ( 1 - L 11 ( k + 1 ) · c 11 ) · P 11 - ( k + 1 ) - L 11 ( k + 1 ) · c 12 P 21 - ( k + 1 ) - L 11 ( k + 1 ) · c 13 P 31 - ( k + 1 ) P 12 ( k + 1 ) = ( 1 - L 11 ( k + 1 ) · c 11 ) · P 12 - ( k + 1 ) - L 11 ( k + 1 ) · c 12 P 22 - ( k + 1 ) - L 11 ( k + 1 ) · c 13 P 32 - ( k + 1 ) P 13 ( k + 1 ) = ( 1 - L 11 ( k + 1 ) · c 11 ) · P 13 - ( k + 1 ) - L 11 ( k + 1 ) · c 12 P 23 - ( k + 1 ) - L 11 ( k + 1 ) · c 13 P 33 - ( k + 1 ) P 21 ( k + 1 ) = - L 21 ( k + 1 ) · c 11 · P 11 - ( k + 1 ) + ( 1 - L 21 ( k + 1 ) · c 12 ) P 21 - ( k + 1 ) - L 11 ( k + 1 ) · c 13 P 31 - ( k + 1 ) P 22 ( k + 1 ) = - L 21 ( k + 1 ) · c 11 · P 11 - ( k + 1 ) + ( 1 - L 21 ( k + 1 ) · c 12 ) P 22 - ( k + 1 ) - L 11 ( k + 1 ) · c 13 P 32 - ( k + 1 ) P 23 ( k + 1 ) = - L 21 ( k + 1 ) · c 11 · P 13 - ( k + 1 ) + ( 1 - L 21 ( k + 1 ) · c 12 ) P 23 - ( k + 1 ) - L 11 ( k + 1 ) · c 13 P 33 - ( k + 1 ) P 31 ( k + 1 ) = - L 13 ( k + 1 ) · c 11 P 11 - ( k + 1 ) - L 31 ( k + 1 ) · c 12 P 21 - ( k + 1 ) + ( 1 - L 31 ( k + 1 ) · c 13 ) · P 31 - ( k + 1 ) P 32 ( k + 1 ) = - L 13 ( k + 1 ) · c 11 P 12 - ( k + 1 ) - L 31 ( k + 1 ) · c 12 P 22 - ( k + 1 ) + ( 1 - L 31 ( k + 1 ) · c 13 ) · P 32 ( k + 1 ) P 33 ( k + 1 ) = - L 13 ( k + 1 ) · c 11 P 13 - ( k + 1 ) - L 31 ( k + 1 ) · c 12 P 23 - ( k + 1 ) + ( 1 - L 31 ( k + 1 ) · c 13 ) · P 33 - ( k + 1 ) - - - ( 18 )
Finally, when realizing EKF algorithm in FPGA, only need to calculate breakdown (14) to formula (18);
4th step, to lithium ion battery discharge and recharge, gather its voltage and current data simultaneously:
After the first step to the 3rd step completes, the charging and discharging currents operating mode of lithium ion battery is set in charging/discharging apparatus, start as battery carries out discharge and recharge, and the data of voltage y (k) collected under this operating mode and electric current I (k) are transferred to FPGA board by UART;
5th step, set up UART communication, read the electric current and voltage data in the 4th step, and transmit the SOC value that the 6th step exports:
UART data communication protocol is set up in FPGA, be the data of voltage y (k) and the electric current I (k) exported in SOC estimator transmission the 4th step in the 6th step on the one hand, on the other hand the SOC value estimated in real time in the 6th step be transferred to host computer display;
6th step, in FPGA, set up SOC estimator by the EKF decomposition algorithm of the 4th step, using the electric current and voltage data in the 5th step as input, estimate the SOC of lithium ion battery:
Set up SOC estimator, be embedded in FPGA, and the EKF algorithm breakdown (14) in the 3rd step is realized in this estimator to formula (18), then the data of voltage y (k) in the 4th step and electric current I (k) are read in real time, estimate the SOC value of battery, and send alerting signal by the I/O mouth of FPGA to warning circuit when SOC value exceeds the safe range of setting;
The monitoring of 7th step, host computer and alarm:
Host computer receives the SOC value that the 6th step transmits, and demonstrates the change curve of SOC in real time, if the 6th step sends alerting signal, warning circuit alarm driver simultaneously.
2. the lithium ion battery SOC estimating apparatus based on FPGA, it is characterized in that, comprise lithium ion battery (1), charging/discharging apparatus (2), terminals (3), FPGA board (4), host computer (5), warning circuit (6), one-to-two Serial Port Line (7), signal wire (8), charging/discharging apparatus (2) is connected with lithium ion battery (1) by terminals (3), charging/discharging apparatus (2) is connected with FPGA board (4) by the left end of one-to-two Serial Port Line (7), host computer (5) is connected with FPGA board (4) by the right-hand member of one-to-two Serial Port Line (7), FPGA board (4) is connected with warning circuit (6) by signal wire (8), the model that FPGA board (4) is altera corp is the FPGA board of DE2-70, comprising UART telecommunication circuit.
CN201510306280.3A 2015-06-05 2015-06-05 SOC estimation method and equipment for lithium ion battery based on FPGA Pending CN104865535A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510306280.3A CN104865535A (en) 2015-06-05 2015-06-05 SOC estimation method and equipment for lithium ion battery based on FPGA

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510306280.3A CN104865535A (en) 2015-06-05 2015-06-05 SOC estimation method and equipment for lithium ion battery based on FPGA

Publications (1)

Publication Number Publication Date
CN104865535A true CN104865535A (en) 2015-08-26

Family

ID=53911499

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510306280.3A Pending CN104865535A (en) 2015-06-05 2015-06-05 SOC estimation method and equipment for lithium ion battery based on FPGA

Country Status (1)

Country Link
CN (1) CN104865535A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109061520A (en) * 2018-10-25 2018-12-21 杭州神驹科技有限公司 A kind of power battery health and power rating estimation on line method and system
JP2019146302A (en) * 2018-02-16 2019-08-29 株式会社半導体エネルギー研究所 Charging state estimation device for secondary battery, abnormality detection device, and management system for secondary battery
CN112415412A (en) * 2019-08-23 2021-02-26 比亚迪股份有限公司 Method and device for estimating SOC value of battery, vehicle and storage medium
CN112848966A (en) * 2020-12-24 2021-05-28 南京能晶电子科技有限公司 Lithium battery module connecting circuit stability detection equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102998629A (en) * 2012-12-16 2013-03-27 天津大学 Method for estimating lithium battery charge state
CN103116136A (en) * 2013-01-21 2013-05-22 天津大学 Lithium battery charge state assessment method based on finite difference expansion Kalman algorithm
CN103197256A (en) * 2013-04-07 2013-07-10 吉林大学 State of charge (SOC) estimation method of lithium ion battery
CN103941196A (en) * 2014-05-07 2014-07-23 吉林大学 Lithium ion battery state-of-charge estimation method
CN104391253A (en) * 2014-12-10 2015-03-04 国家电网公司 Method for monitoring statuses of storage batteries of transformer substation by using FPGA (field-programmable gate array)
WO2015033503A1 (en) * 2013-09-05 2015-03-12 カルソニックカンセイ株式会社 Estimation device and estimation method
CN104535932A (en) * 2014-12-20 2015-04-22 吉林大学 Lithium ion battery charge state estimating method
CN104656024A (en) * 2013-11-22 2015-05-27 韩燕� Method and device for detecting battery electric quantity and battery
CN204666798U (en) * 2015-06-05 2015-09-23 吉林大学 A kind of lithium ion battery SOC estimating apparatus based on FPGA

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102998629A (en) * 2012-12-16 2013-03-27 天津大学 Method for estimating lithium battery charge state
CN103116136A (en) * 2013-01-21 2013-05-22 天津大学 Lithium battery charge state assessment method based on finite difference expansion Kalman algorithm
CN103197256A (en) * 2013-04-07 2013-07-10 吉林大学 State of charge (SOC) estimation method of lithium ion battery
WO2015033503A1 (en) * 2013-09-05 2015-03-12 カルソニックカンセイ株式会社 Estimation device and estimation method
CN104656024A (en) * 2013-11-22 2015-05-27 韩燕� Method and device for detecting battery electric quantity and battery
CN103941196A (en) * 2014-05-07 2014-07-23 吉林大学 Lithium ion battery state-of-charge estimation method
CN104391253A (en) * 2014-12-10 2015-03-04 国家电网公司 Method for monitoring statuses of storage batteries of transformer substation by using FPGA (field-programmable gate array)
CN104535932A (en) * 2014-12-20 2015-04-22 吉林大学 Lithium ion battery charge state estimating method
CN204666798U (en) * 2015-06-05 2015-09-23 吉林大学 A kind of lithium ion battery SOC estimating apparatus based on FPGA

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
方明杰等: "基于扩展卡尔曼滤波算法的锂离子电池的SOC估算", 《电工电能新技术》 *
马彦等: "基于扩展卡尔曼滤波算法的锂离子电池SOC估计", 《第三十一届中国控制会议论文集》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019146302A (en) * 2018-02-16 2019-08-29 株式会社半導体エネルギー研究所 Charging state estimation device for secondary battery, abnormality detection device, and management system for secondary battery
CN109061520A (en) * 2018-10-25 2018-12-21 杭州神驹科技有限公司 A kind of power battery health and power rating estimation on line method and system
CN109061520B (en) * 2018-10-25 2021-04-23 杭州神驹科技有限公司 Power battery health and power state online estimation method and system
CN112415412A (en) * 2019-08-23 2021-02-26 比亚迪股份有限公司 Method and device for estimating SOC value of battery, vehicle and storage medium
CN112848966A (en) * 2020-12-24 2021-05-28 南京能晶电子科技有限公司 Lithium battery module connecting circuit stability detection equipment

Similar Documents

Publication Publication Date Title
CN106569136B (en) A kind of cell health state On-line Estimation method and system
CN102937704B (en) Method for identifying RC (resistor-capacitor) equivalent model of power battery
CN105676134B (en) A kind of SOH evaluation methods of vehicle lithium-ion power battery
Zhang et al. A deep learning method for lithium-ion battery remaining useful life prediction based on sparse segment data via cloud computing system
CN103926538B (en) Change exponent number RC equivalent-circuit model based on AIC criterion and implementation method
CN103698713B (en) A kind of health state of lithium ion battery appraisal procedure
Daowd et al. Battery models parameter estimation based on MATLAB/Simulink®
CN107576919A (en) Power battery charged state estimating system and method based on ARMAX models
US11526639B2 (en) Fractional-order KiBaM battery model considering nonlinear capacity characteristics and parameter identification method
CN103293485A (en) Model-based storage battery SOC (state of charge) estimating method
CN104865535A (en) SOC estimation method and equipment for lithium ion battery based on FPGA
CN104977545A (en) Power battery charge state estimation method and system
CN106338695A (en) Battery model parameter identification method based on particle swarm algorithm
CN108845264B (en) Wavelet-based battery health state estimation method
CN204666798U (en) A kind of lithium ion battery SOC estimating apparatus based on FPGA
CN104101838A (en) Power cell system, and charge state and maximum charging and discharging power estimation methods thereof
Xu et al. A vehicle-cloud collaborative method for multi-type fault diagnosis of lithium-ion batteries
CN102944848A (en) Real-time evaluation method for remaining capacity of power batteries and device thereof
CN106842056A (en) One kind is based on two-step on-line intelligence optimized algorithm electrokinetic cell peak power method of estimation
CN107132490A (en) A kind of method for realizing the estimation of lithium battery group state-of-charge
CN106772081A (en) Battery limit charging and discharging current estimation method based on extended equivalent circuit model
WO2022242058A1 (en) Battery state of health estimation method for real new energy vehicle
CN105203968A (en) Lead-acid battery residual energy on-line measuring system
CN112816875A (en) Electric vehicle battery cloud management system, method, medium and cloud server
CN103744027A (en) Kalman filtering-based self-correction cell SOC estimation method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20150826