Commit 7ec0bba1 authored by Martin Vítek's avatar Martin Vítek

Modifications

parent f14aeed8
......@@ -85,8 +85,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{bmatrix} \frac{1}{L_3} & 0 \\ 0 & 0 \end{bmatrix}
\begin{bmatrix} U_{in} \\ u_{D6} \end{bmatrix}
\begin{bmatrix} \frac{1}{L_3} \\ 0 \end{bmatrix}
U_{in}
\end{align}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......@@ -98,7 +98,7 @@ U_{in} &= (R_{62} + R_{Q25} + R_{L3})i_l + L_3\derivative{i_l}{t} + R_{Q24}i_l \
\end{figure}
\begin{align}
U_{in} &= (R_{62} + R_{Q25} + R_{L3})i_l + L_3\derivative{i_l}{t} + u_{D6} + u_c \\
U_{in} &= (R_{62} + R_{Q25} + R_{L3})i_l + L_3\derivative{i_l}{t} + R_{s_{D6}}i_l + u_c \\
C_{out}\derivative{u_c}{t} &= i_l - \frac{u_c}{R_{63}+R_{load}}
\end{align}
......@@ -106,7 +106,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_{D6}-u_c)-\frac{R_{62}+R_{Q25}+R_{L3}}{L_3}i_l \\
\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{u_c}{t} &= \frac{1}{C_{out}}i_l-\frac{1}{C_{out}(R_{63}+R_{load})}u_c
\end{align}
......@@ -118,13 +118,13 @@ C_{out}\derivative{u_c}{t} &= i_l - \frac{u_c}{R_{63}+R_{load}}
\begin{bmatrix} i_l \\ u_c \end{bmatrix}
=
\begin{bmatrix}
-\frac{R_{62}+R_{Q25}+R_{L3}}{L_3} & -\frac{1}{L_3} \\
-\frac{R_{62}+R_{Q25}+R_{L3}+R_{s_{D6}}}{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} & -\frac{1}{L_3} \\ 0 & 0 \end{bmatrix}
\begin{bmatrix} U_{in} \\ u_{D6} \end{bmatrix}
\begin{bmatrix} \frac{1}{L_3} \\ 0 \end{bmatrix}
U_{in}
\end{align}
......@@ -136,7 +136,7 @@ C_{out}\derivative{u_c}{t} &= i_l - \frac{u_c}{R_{63}+R_{load}}
\overline{B} = B_1d + B_2 (1-d)
\end{align}
$A_1$, $B_1$ - Q24 v uzavřeném stavu, $A_2$, $B_2$ - Q24 v otevřeném stavu.
$A_1$, $B_1$ - Q24 v uzavřeném stavu, $A_2$, $B_2$ - Q24 v otevřeném stavu. Zanedbáno $R_{Q25}$ a $R_{s_{D6}}$.
\vspace{1em}
\centerline{}
......@@ -158,11 +158,12 @@ U_{in}
\subsection{Odezva otevřené smyčky pro různé hodnoty střídy}
\begin{figure}[!ht]
\centering
\includegraphics[width=1\textwidth, trim=4.8cm 1cm 4.3cm 1.8cm,clip]{figures/open_loop_response}
\includegraphics[width=1\textwidth, trim=4.9cm 1cm 4.3cm 1.8cm,clip]{figures/open_loop_response}
\end{figure}
\subsection{Linearizace}
\newpage
\section{Linearizace}
\begin{align}
D &= 1-d \\
R_{in} &= R_{62}+R_{Q25}+R_{L3}+R_{s_{D6}} \\
......@@ -190,7 +191,7 @@ U_{in}
\end{align}
\subsection{Integrace}
\section{Integrace}
\begin{align}
\Delta_{u_c} &= u_c - u_c^* \\
\int \Delta_{u_c} &= \Delta \\
......
......@@ -5,7 +5,7 @@ clear
% Converter parameters
par.R62 = 0.2;
par.R63 = 4.7;
par.RQ24 = 0.38;
par.RQ24 = 380e-3;
par.RQ25 = 23e-3;
par.RL3 = 1.1;
par.Rload = 12e3;
......@@ -14,90 +14,84 @@ par.L3 = 680e-6;
par.Cout = 1.41e-6;
par.Ud6 = 0.5;
par.Rin = par.R62 + par.RQ25 + par.RL3 + par.RsD6;
par.Rout = par.R63 + par.Rload;
Uin = 12;
f = 23437.5;
d = 0.94;
Ts = 24e-6;
d = 0.925;
Ts = 1/f;
% Create system
sys = create_with_RsD6(par, Ts, d);
uc_req = 180;
uc_lin = 180;
il_lin = 0.2;
% Plot open loop response
sim = simulate(sys, 0.01, Uin, 0, 0);
damp(sys)
plot_sim(sim, d);
% Matrixes
ssm.A = [-par.Rin/par.L3 0 0;
0 -1/(par.Cout*par.Rout) 0;
0 1 1];
ssm.B = [-uc_lin/par.L3;
il_lin/par.Cout;
0];
ssm.C = eye(3);
ssm.D = zeros(size(ssm.B));
X1 = [1/par.L3; 0; 0];
X2 = [0;0;-1];
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);
% Discrete system
sys = c2d(ss(ssm.A,ssm.B,ssm.C,ssm.D), Ts);
Ca = eye(2);
Da = zeros(size(Ba));
% State space model in discrete form
system = c2d(ss(Aa, Ba, Ca, Da), Ts);
end
% Regulator
Q = diag([0.5, 0, 1]);
R = 1;
N = [0; 0; 0];
L = dlqr(ssm.A, ssm.B, Q, R, N);
%K = place(ssm.A', ssm.C', [-50000000, -1800000])';
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
reg.A = ssm.A-ssm.B*L;
reg.B = zeros(3,1);
ssr = c2d(ss(reg.A, reg.B, ssm.C, ssm.D), Ts);
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
% Simulate system
i = 1;
i0 = 0;
u0 = 0;
delta0 = 0;
tmax = 0.2;
function sim = simulate(sys, tmax, Uin, i0, u0)
i = 1;
sim.vars(:,1) = [i0, u0];
sim.t(i) = 0;
sim.vars(:,1) = [i0, u0, delta0];
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;
for t=sys.Ts:sys.Ts:tmax
sim.vars(:, i+1) = sys.A*sim.vars(:, i) + sys.B.*(1-d) + X1*Uin + X2*uc_req;
sim.t(i+1) = t;
i = i+1;
end
i = i+1;
end
% Plot it
plot_sim(sim, d);
function plot_sim(sim, d)
figure(1);
title(sprintf("Open loop response of uncontrolled boost converter (d=%4.2f)", d))
subplot(1,2,1);
subplot(1,3,1);
plot(sim.t, sim.vars(1,:));
subplot(1,2,2);
title("il");
subplot(1,3,2);
plot(sim.t, sim.vars(2,:));
title("uc");
subplot(1,3,3);
plot(sim.t, sim.vars(3,:));
title("delta");
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