Commit 10a2841a authored by Martin Vítek's avatar Martin Vítek

Some model changes

parent 5f5175ea
......@@ -78,7 +78,7 @@ U_{in} &= (R_{62} + R_{Q25} + R_{L3})i_l + L_3\derivative{i_l}{t} + R_{Q24}i_l \
\begin{align}
%\renewcommand\arraystretch{1.3}
\derivative{}{t}
\begin{bNiceMatrix} i_l \\ i_c \end{bNiceMatrix}
\begin{bNiceMatrix} i_l \\ u_c \end{bNiceMatrix}
&=
\begin{bNiceMatrix}
-\frac{R_{62}+R_{Q25}+R_{L3}+R_{Q24}}{L_3} & 0 \\
......@@ -86,8 +86,8 @@ U_{in} &= (R_{62} + R_{Q25} + R_{L3})i_l + L_3\derivative{i_l}{t} + R_{Q24}i_l \
\end{bNiceMatrix}
\begin{bNiceMatrix}i_l \\ u_c \end{bNiceMatrix}
+
\begin{bNiceMatrix} \frac{1}{L_3} \\ 0 \end{bNiceMatrix}
U_{in}
\begin{bmatrix} \frac{1}{L_3} & 0 \\ 0 & 0 \end{bmatrix}
\begin{bmatrix} U_{in} \\ u_{D6} \end{bmatrix}
\end{align}
......@@ -100,7 +100,7 @@ U_{in}
\end{figure}
\begin{align}
U_{in} &= (R_{62} + R_{Q25} + R_{L3})i_l + L_3\derivative{i_l}{t} + R_{s_{D6}}i_l + u_c \\
U_{in} &= (R_{62} + R_{Q25} + R_{L3})i_l + L_3\derivative{i_l}{t} + u_{D6} + u_c \\
C_{out}\derivative{u_c}{t} &= i_l - \frac{u_c}{R_{63}+R_{load}}
\end{align}
......@@ -108,7 +108,7 @@ C_{out}\derivative{u_c}{t} &= i_l - \frac{u_c}{R_{63}+R_{load}}
\centerline{}
\begin{align}
\derivative{i_l}{t} &= \frac{1}{L_3}(U_{in}-u_c)-\frac{R_{62}+R_{Q25}+R_{L3}+R_{s_{D6}}}{L_3}i_l \\
\derivative{i_l}{t} &= \frac{1}{L_3}(U_{in}-u_{D6}-u_c)-\frac{R_{62}+R_{Q25}+R_{L3}}{L_3}i_l \\
\derivative{u_c}{t} &= \frac{1}{C_{out}}i_l-\frac{1}{C_{out}(R_{63}+R_{load})}u_c
\end{align}
......@@ -117,16 +117,16 @@ C_{out}\derivative{u_c}{t} &= i_l - \frac{u_c}{R_{63}+R_{load}}
\begin{align}
\derivative{}{t}
\begin{bmatrix} i_l \\ i_c \end{bmatrix}
\begin{bmatrix} i_l \\ u_c \end{bmatrix}
=
\begin{bmatrix}
-\frac{R_{62}+R_{Q25}+R_{L3}+R_{s_{D6}}}{L_3} & -\frac{1}{L_3} \\
-\frac{R_{62}+R_{Q25}+R_{L3}}{L_3} & -\frac{1}{L_3} \\
\frac{1}{C_{out}} & -\frac{1}{C_{out}(R_{63}+R_{load})}
\end{bmatrix}
\begin{bmatrix}i_l \\ u_c \end{bmatrix}
+
\begin{bmatrix} \frac{1}{L_3} \\ 0 \end{bmatrix}
U_{in}
\begin{bmatrix} \frac{1}{L_3} & -\frac{1}{L_3} \\ 0 & 0 \end{bmatrix}
\begin{bmatrix} U_{in} \\ u_{D6} \end{bmatrix}
\end{align}
......@@ -145,7 +145,7 @@ $A_1$, $B_1$ - Q24 v uzavřeném stavu, $A_2$, $B_2$ - Q24 v otevřeném stavu.
\begin{align}
\derivative{}{t}
\begin{bmatrix} i_l \\ i_c \end{bmatrix}
\begin{bmatrix} i_l \\ u_c \end{bmatrix}
=
\begin{bmatrix}
-\frac{R_{62}+R_{Q25}+R_{L3}+R_{s_{D6}}}{L_3} & -\frac{1-d}{L_3} \\
......
%% Nixie clock boost converter
% Converter parameters
R62 = 0.2;
R63 = 4.7;
RQ25 = 23e-3;
RL3 = 1.1;
RsD6 = 2;
Rload = 12e3;
clear
L3 = 680e-6;
Cout = 1.4e-6;
% Converter parameters
par.R62 = 0.2;
par.R63 = 4.7;
par.RQ24 = 0.38;
par.RQ25 = 23e-3;
par.RL3 = 1.1;
par.Rload = 12e3;
par.RsD6 = 2;
par.L3 = 680e-6;
par.Cout = 1.41e-6;
par.Ud6 = 0.5;
Uin = 12;
f = 23437.5;
d = 0.93;
d = 0.94;
Ts = 24e-6;
% Create system
sys = create_with_RsD6(par, Ts, d);
% State space matrices - switch closed
A1 = [ -(R62+RQ25+RL3+RsD6)/L3, 0;
0 , -1/(Cout*(R63+Rload))];
% Plot open loop response
sim = simulate(sys, 0.01, Uin, 0, 0);
damp(sys)
plot_sim(sim, d);
B1 = [ 1/L3;
0 ];
% State space matrices - switch opened
A2 = [ -(R62+RQ25+RL3+RsD6)/L3, -1/L3;
1/Cout , -1/(Cout*(R63+Rload))];
B2 = [ 1/L3;
0 ];
% State space matrices - averaged
Aa = A1.*d + A2.*(1-d);
Ba = B1.*d + B2.*(1-d);
Ca = eye(2);
Da = zeros(2,1);
% State space model in discrete form
Ts = 5e-5;
Sys = ss(Aa, Ba, Ca, Da);
Sd = c2d(Sys, Ts);
function system = create_averaged(A1, A2, B1, B2, Ts, d)
% State space matrices - averaged
Aa = A1.*d + A2.*(1-d);
Ba = B1.*d + B2.*(1-d);
% Plot open loop response
figure(1);
hold off
step(Sd)
title(sprintf("Open loop response of uncontrolled boost converter (d=%4.2f)", d))
Ca = eye(2);
Da = zeros(size(Ba));
% State space model in discrete form
system = c2d(ss(Aa, Ba, Ca, Da), Ts);
end
function system = create_with_RsD6(par, Ts, d)
% State space matrices - switch closed
A1 = [ -(par.R62+par.RQ25+par.RL3+par.RsD6+par.RQ24)/par.L3, 0;
0 , -1/(par.Cout*(par.R63+par.Rload))];
B1 = [ 1/par.L3;
0 ];
% State space matrices - switch opened
A2 = [ -(par.R62+par.RQ25+par.RL3+par.RsD6)/par.L3, -1/par.L3;
1/par.Cout , -1/(par.Cout*(par.R63+par.Rload))];
B2 = [ 1/par.L3;
0 ];
system = create_averaged(A1, A2, B1, B2, Ts, d);
end
function system = create_with_ud6(par, Ts, d)
% State space matrices - switch closed
A1 = [ -(par.R62+par.RQ25+par.RL3+par.RQ24)/par.L3, 0;
0 , -1/(par.Cout*(par.R63+par.Rload))];
B1 = [ 1/par.L3, 0;
0 , 0 ];
% State space matrices - switch opened
A2 = [ -(par.R62+par.RQ25+par.RL3)/par.L3, -1/par.L3;
1/par.Cout , -1/(par.Cout*(par.R63+par.Rload))];
B2 = [ 1/par.L3, -1/par.L3;
0 , 0 ];
system = create_averaged(A1, A2, B1, B2, Ts, d);
end
function sim = simulate(sys, tmax, Uin, i0, u0)
i = 1;
sim.vars(:,1) = [i0, u0];
sim.t(i) = 0;
for t=sys.Ts:sys.Ts:tmax
sim.vars(:, i+1) = sys.A*sim.vars(:, i) + sys.B*Uin;
sim.t(i+1) = t;
i = i+1;
end
end
damp(Sd)
\ No newline at end of file
function plot_sim(sim, d)
figure(1);
title(sprintf("Open loop response of uncontrolled boost converter (d=%4.2f)", d))
subplot(1,2,1);
plot(sim.t, sim.vars(1,:));
subplot(1,2,2);
plot(sim.t, sim.vars(2,:));
hold off
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment