Problem 1: ME 565: Battery Systems and Control, University of Michigan, Winter 2018

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

ME 565: Battery Systems and Control, University of Michigan, Winter 2018

Instructor: J. Siegel (siegeljb), Student Instructor: Peyman Mohtat (pmohtat)

HW #5 Solutions

Problem 1
(a) The plot:

2.5

1.5
Current density, i [A/m2]

0.5

−0.5

−1

−1.5

−2

−2.5
−0.5 0 0.5
Overpotential, η [V]

Figure 1: Overpotential

(b) Refer to figure 2.The mean value of overpotential is: 0.35V

0.1
Electrode SOC

0.05

0
0 500 1000 1500 2000 2500
Current density, i [A/m2]Overpotential, η [V]

0.5
0.45
0.4
0.35

0 500 1000 1500 2000 2500


0
10

−1
10

−2
10
0 500 1000 1500 2000 2500
Time, t [sec]

Figure 2: Solution to Question 1(b)

(c)
    
(1 − α)F η −αF η
i = f (η) = i0 exp − exp (1.1)
RT RT
    
(1 − α)F (1 − α)F η −αF −αF η
σ = i0 exp − exp (1.2)
RT RT RT RT
η=η0

σ = 2.276 (1.3)
1
= 0.434 (1.4)
σ
A solution that is purely a) numerical (perturbation to the left and right by 1% to get the approximate
derivative) or b) graphical is also good as an answer

(d) Refer to figure 3


Analysis of Linearization about η0 = 0.35

Electrode SOC
0.1
Nonlinear
Linearized
0.05

0
0 500 1000 1500 2000 2500

Current density, i [A/m2]Overpotential, η [V]


0.5
0.45
0.4
0.35

0 500 1000 1500 2000 2500


0
10

−1
10

−2
10
0 500 1000 1500 2000 2500
Time, t [sec]

Figure 3: Solution to question 1(d)

Problem 2
(a) (i)

Ci+1 − 2Ci + Ci−1


∀i ∈ (0, N − 1) Ċi = D (2.1)
δx2
C0 = 0 (2.2)
∂c
(1, t) = J(t) (2.3)
∂x
Ċ0 = 0 (2.4)
C2 − 2C1
Ċ1 = D (2.5)
δx2
CN = CN −1 + Jδx (2.6)
CN −2 − 2CN −1 + (CN −1 + Jδx)
CN −1 = D (2.7)
δx2

 
−2 1 0 0 0 ... 0
 
1 −2 1 0 0 ... 0 0
 
 
0 1 −2 1 0 ... 0 0
 
D  0 0 1 −2 1 . . . 0
 D .. 
A= , B= 
.
 , C = I40×40 , D = [0]40×1
(δx)2  . δx 
 
 .. .. .. .. .. .. ..   
 . . . . . . 
 0
0 ... 0 0 1 −2 1 1 40×1
 
0 ... 0 0 0 1 −1 40×40
(2.8)

(ii)
%% Homework #5 Diffusion Skeleton File
clear
close a l l
clc
5 %% Parameters
D = 2.4;%.24 % Diffusion coefficient
N = 161;% 41 % Number of spatial discretization segments
delta_x =1/( N -1); % Spatial step size
alpha = D / delta_x ^2;
10

f p r i n t f (1 , ’ - - - - - - - - - - - - - - - - - - - - - - - - -\ n ’ );
f p r i n t f (1 , ’D = %2.1 f | N = %3.0 f \ n ’ ,D , N );

% Compute A,B,C,D matrices (see lecture)


15 A = alpha *( diag ( -2* ones (1 ,N -1))+ diag ( ones (1 ,N -2) ,1)+ diag ( ones (1 ,N -2) , -1));
%A(1,2)=2
A (N -1 ,N -2)=2* alpha ;
B = [ zeros (N -2 ,1);2* alpha * delta_x ];
C = eye(N -1);
20 D = 0;
% (CN+1−CN−1)/(2∗Delta_x)=J
% and
% CN_dot=alpha∗(Cn+1−2∗Cn+Cn−1)
% plugging in CN+1=J∗(2∗Delta_x)+CN−1
25 % CN_dot=alpha∗(J∗(2∗Delta_x)−2∗Cn+2∗Cn−1)

% Calculate the slowest eigenvalue of the system matrix A

30 eig_slowest = min( abs ( e i g ( A )));


f p r i n t f (1 , ’ The slowest eigenvalue is %3.2 f rad / sec \ n ’ , eig_slowest );

sys = s s (A ,B ,C , D );

35 %% Simulate PDE system


% Initial concentration
c0 = zeros (N -1 ,1);

% Time Span
40 t = 0:0.02:5; % SELECT A FINAL SIMULATION TIME
NT = length ( t );

% Input Butler−Volmer Current


J = zeros ( s i z e ( t )); % Make everything zero
45 J ( t <= 1) = 1; % Set J(t) = 1, only for the first second

% Simulate Linear System


[y ,t , c_x ] = lsim ( sys ,J ,t , c0 );

50

%% Perform post−simulation calculations


% Add boundary conditions to both ends
%c = [zeros(NT,1), c_x, delta_x∗J’ + c_x(:,end)];
c = [ zeros ( NT ,1) , c_x , delta_x *J ’ + c_x (: ,end)];
55 % Compute the average value of c.
% Use the "sum" function. Use the help documentation to ensure you sum
% across the 2nd dimesion.
c_avg = sum(c ,2)/( N +1);

60

% Determine when systems reaches equilibrium i.e., c_avg <= 0.01


% Use this for the relaxation period
ind_eq = f i n d (( c_avg <= 0.01) & ( t > 1) ,1 , ’ first ’ );
65 f p r i n t f (1 , ’ The system reaches equilibrium @ t = %2.2 f sec \ n ’ ,t ( ind_eq ));
f i g u r e (1)
plot (t , c_avg , ’ LineWidth ’ ,2)
x l a b e l ( ’ time [ s ] ’ , ’ FontSize ’ ,12)
70 y l a b e l ( ’ C_ { avg } ’ , ’ FontSize ’ ,12)
s e t (gca , ’ FontSize ’ ,12)
hold on ;
plot ( t ( ind_eq ) , c_avg ( ind_eq ) , ’* ’ , ’ LineWidth ’ ,2)
text ( t ( ind_eq ) , c_avg ( ind_eq ) , ’\ leftarrow C_ { avg } <= 0.01 ’ , ’ VerticalAlig nment ’ , ’ bo

(b) The system reaches “equilibrium” at t = 1.70 sec.

0.5

0.45

0.4

0.35

0.3
C avg

0.25

0.2

0.15

0.1

0.05
C avg <= 0.01
0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time [s]

(c) It can be noticed that the system reaches to the equilibrium faster as diffusion coefficient D increases. As
you have learned in the class, the response of the system is dominated by the slowest pole. The equation
of settling time for the second order system can be used to see this trend : ts = σ4d where σs is the absolute
value of the negative real part of the slowest pole.

Diffusion Coefficient, D Time to reach equilibrium Slowest e-value of A


1.2 2.34 seconds 2.96 rad/sec
4.8 1.36 seconds 11.84 rad/sec
9.6 1.20 seconds 23.68 rad/sec

(d) It is observed that as the number of discretizations increases, the system starts to take longer to reach
equilibrium. This should not lead one to conclude that it is better to consider fewer discretizations; on the
contrary, it serves as an indicator of the number of discretizations required for adequate fidelity. Since the
equations for the approximation of partial derivatives are used to convert a PDE to ODEs, the system’s
dynamics can be more accurately emulated with a larger number of discretization.

No. of discretization segments, N Time to reach equilibrium Slowest e-value of A


4 1.52 seconds 7.61 rad/sec
81 1.68 seconds 6 rad/sec
161 1.70 seconds 5.96 rad/sec

You might also like