MATLAB Project: Designing an Observer for Li-ion Battery SoC Tracking
VerifiedAdded on 2022/11/17
|11
|713
|247
Project
AI Summary
This MATLAB assignment focuses on designing an observer for a Li-ion battery to track its State of Charge (SoC) by measuring voltage, using an Equivalent Circuit Model (ECM). The solution begins by deriving the state-space representation of the battery model using Kirchhoff's laws and elemental equations. It then estimates the OCV parameters using the linear least squares method. The ECM parameters are implemented in Simulink to simulate the voltage response. The assignment then linearizes the state-space equations around an operating point, calculates the derivatives, and designs a linear observer using pole placement to track the battery SoC in Simulink. The solution includes MATLAB code and Simulink implementation details, along with references.

MATLAB ASSIGNMENT
[Year]
[Year]
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

QUESTION 2
Designing an observer for a Li0ion battery to track the battery state of charge by measuring the
voltage. The Li-ion battery is modelled using the Equivalent circuit model. The battery terminal
voltage is applied on the circuit as illustrated in the figure below such that,
The SoC is 0 ≤ z ≤ 1 and is defined as
z=z0− 1
Cn
∫
0
t
IL dt IL> 0 for discharge (1)
Where Cn in equation (1) is the battery nominal capacity in Ampere-seconds (As). The model
consists of two ideal resistors R0 , Rp and a capacitor C p. The Open Circuit Voltage (OCV) U ( z )
is non-linearly dependent on the battery SoC as:
U ( z ) =α 1+α2 / z +α 3 z +α 4 log ( z ) (2)
In equation (2) the coefficients α1 to α4 are unknown and need to be estimated.
PART I
By using the elemental equations of the electrical components and the application of Kirchhoff’s
Voltage and Current Law show that the battery model has the following state-space
representation.
˙V c=−V C
τ + Rp I L
τ
1
Designing an observer for a Li0ion battery to track the battery state of charge by measuring the
voltage. The Li-ion battery is modelled using the Equivalent circuit model. The battery terminal
voltage is applied on the circuit as illustrated in the figure below such that,
The SoC is 0 ≤ z ≤ 1 and is defined as
z=z0− 1
Cn
∫
0
t
IL dt IL> 0 for discharge (1)
Where Cn in equation (1) is the battery nominal capacity in Ampere-seconds (As). The model
consists of two ideal resistors R0 , Rp and a capacitor C p. The Open Circuit Voltage (OCV) U ( z )
is non-linearly dependent on the battery SoC as:
U ( z ) =α 1+α2 / z +α 3 z +α 4 log ( z ) (2)
In equation (2) the coefficients α1 to α4 are unknown and need to be estimated.
PART I
By using the elemental equations of the electrical components and the application of Kirchhoff’s
Voltage and Current Law show that the battery model has the following state-space
representation.
˙V c=−V C
τ + Rp I L
τ
1

˙z=−I L
Cn
V L ¿ U ( z ) −R0 I L−V C
To obtain the input, state and output variables,
The state vectors of the nonlinear battery system are,
The Euler discretization is obtained such that,
2
Cn
V L ¿ U ( z ) −R0 I L−V C
To obtain the input, state and output variables,
The state vectors of the nonlinear battery system are,
The Euler discretization is obtained such that,
2
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

To process the noise,
The measurement equation is,
The state transition and measurement equation for the battery in the state-space form such that,
The state equation is obtained for a given event such that,
PART II
Using the data file measured for the OCV data at 25 SoC points. The measured OCV consists of
some noise.
3
The measurement equation is,
The state transition and measurement equation for the battery in the state-space form such that,
The state equation is obtained for a given event such that,
PART II
Using the data file measured for the OCV data at 25 SoC points. The measured OCV consists of
some noise.
3
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
SoC
2.9
2.95
3
3.05
3.1
3.15
3.2
3.25
3.3
3.35
3.4
OCV
Plot of OCV against Soc
Using linear least squares method estimation and tabulating the parameters to perform the
estimation,
The summed square of residuals is obtained as,
The least squares fitting process tends to minimize the summed squares of the residuals and the
parameter are set to result to a zero value,
4
SoC
2.9
2.95
3
3.05
3.1
3.15
3.2
3.25
3.3
3.35
3.4
OCV
Plot of OCV against Soc
Using linear least squares method estimation and tabulating the parameters to perform the
estimation,
The summed square of residuals is obtained as,
The least squares fitting process tends to minimize the summed squares of the residuals and the
parameter are set to result to a zero value,
4

The linear estimate for the data fitting is as expressed below,
5
5
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
SoC
0
10
20
30
40
50
60
70
80
90
100
OCV
data
fitted curve
PART III
The ECM parameters are implemented in the non-linear battery model in the Simulink for the
estimated OCV function to simulate the voltage response of the battery at half-duty. The
simulation time of the total time of 7200 seconds.
Implementing the MATLAB Simulink,
6
SoC
0
10
20
30
40
50
60
70
80
90
100
OCV
data
fitted curve
PART III
The ECM parameters are implemented in the non-linear battery model in the Simulink for the
estimated OCV function to simulate the voltage response of the battery at half-duty. The
simulation time of the total time of 7200 seconds.
Implementing the MATLAB Simulink,
6
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

PART IV
The function U ( z ) makes the state-space system of equations non-linear. The system of
equations can be linearized around an operating state vector and input current. Let the state
vector around which we linearize be xop=[0 , zop ] and the current around which we linearize be
I op=0. zop is the SoC around which we linearise. The linearized state and output equations are
then
˙x=Δ ˙x + f (xop , I op )
V L ¿ Δ V L+g(xop , I op )
Furthermore Δ ˙x and Δ V L have a standard linear state-space of the form:
Δ ˙x= Alin Δ x +Blin I
Δ V L ¿ Clin Δ x+Dlin I
7
The function U ( z ) makes the state-space system of equations non-linear. The system of
equations can be linearized around an operating state vector and input current. Let the state
vector around which we linearize be xop=[0 , zop ] and the current around which we linearize be
I op=0. zop is the SoC around which we linearise. The linearized state and output equations are
then
˙x=Δ ˙x + f (xop , I op )
V L ¿ Δ V L+g(xop , I op )
Furthermore Δ ˙x and Δ V L have a standard linear state-space of the form:
Δ ˙x= Alin Δ x +Blin I
Δ V L ¿ Clin Δ x+Dlin I
7

Show that Alin=
[ −1/ τ 0
0 0 ], Blin= [ Rp /τ
−1/ Cn ], Clin= [−1 dU /dz ], Dlin= [ −R0 ]
Where dU /dz is the derivate of the OCV function with the SoC and can be calculated
analytically now that we have the values α1 to α4.
8
[ −1/ τ 0
0 0 ], Blin= [ Rp /τ
−1/ Cn ], Clin= [−1 dU /dz ], Dlin= [ −R0 ]
Where dU /dz is the derivate of the OCV function with the SoC and can be calculated
analytically now that we have the values α1 to α4.
8
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

PART V
With the poles of the linearized model known, design a linear observer (using Alin, Blin, Clin, Dlin)
and implement the observer in Simulink to track the battery SoC.
%% Original Plant
a=[-20.6 2;2 -1]
b=[5;1]
c=[1 1]
d=0
sys=ss(a,b,c,d)
eig(sys)
rank(obsv(sys))
L_T=place(a',c',[-10,-9])
L=L_T'
%% Observer pole placement at -1 and -2
a=[-20.6 1;0 -1]
b=[0;1]
c=[1 1]
d=0
sys=ss(a,b,c,d)
eig(sys)
rank(obsv(sys))
rank(ctrb(sys))
9
With the poles of the linearized model known, design a linear observer (using Alin, Blin, Clin, Dlin)
and implement the observer in Simulink to track the battery SoC.
%% Original Plant
a=[-20.6 2;2 -1]
b=[5;1]
c=[1 1]
d=0
sys=ss(a,b,c,d)
eig(sys)
rank(obsv(sys))
L_T=place(a',c',[-10,-9])
L=L_T'
%% Observer pole placement at -1 and -2
a=[-20.6 1;0 -1]
b=[0;1]
c=[1 1]
d=0
sys=ss(a,b,c,d)
eig(sys)
rank(obsv(sys))
rank(ctrb(sys))
9
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

REFERENCES
[1] Huria, Tarun, et al. "High fidelity electrical model with thermal dependence for
characterization and simulation of high power lithium battery cells." Electric Vehicle Conference
(IEVC), 2012 IEEE International. IEEE, 2012.
[2] Wan, Eric A., and Rudolph Van Der Merwe. "The unscented Kalman filter for nonlinear
estimation." Adaptive Systems for Signal Processing, Communications, and Control Symposium
2000. AS-SPCC. The IEEE 2000. Ieee, 2000.
10
[1] Huria, Tarun, et al. "High fidelity electrical model with thermal dependence for
characterization and simulation of high power lithium battery cells." Electric Vehicle Conference
(IEVC), 2012 IEEE International. IEEE, 2012.
[2] Wan, Eric A., and Rudolph Van Der Merwe. "The unscented Kalman filter for nonlinear
estimation." Adaptive Systems for Signal Processing, Communications, and Control Symposium
2000. AS-SPCC. The IEEE 2000. Ieee, 2000.
10
1 out of 11
Related Documents
Your All-in-One AI-Powered Toolkit for Academic Success.
+13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
Copyright © 2020–2026 A2Z Services. All Rights Reserved. Developed and managed by ZUCOL.



