Clear Filters
Clear Filters

problem to create a stable buck-boost state space model

6 views (last 30 days)
Hello Everybody,
I am working to build a state space system for a Buck-Boost converter using the mathematical symbolic formatting in matlab. The problem that I have that the code is generating matrices with unstable system, although the component values that were chosen were tested out of the code and they generated stable buck-boost system.
Can anybody help me to fix my mistakes?
I will incloud the code for reviewing.
Thank you
clear all;
close all;
clc;
%%
E0=48;
Laa=2e-3;
R=10;
Rl=10e-3;
C=5e-5;
V0=70;
% ron=10e-3; rL=10e-3; R=10; rC=10e-3; vd=0.7; L=2e-3; C=5e-5; Iload=10; Vin=48; d=0.5;
% E0=30;
% Laa=1e-3;
% R=2;
% Rl=2.134e-3;
% C=200e-6;
% V0=60;
R11=0.3;
% VG=50; rl=10e-3; L=400e-6; rc=0.05; C=100e-6; R=20; D=0.4; Io=0;
syms laa rl r ilp il E vcp vc D c rc;
eq1=-laa*ilp+E-il*rl-(1-D)*vc==0;
eq2=-c*vcp-(1-D)*il+(1-D)*(1/R)*vc==0;
eq1=subs(eq1,[E laa c r],[E0 Laa C R ]);
eq2=subs(eq2,[E laa c r],[E0 Laa C R ]);
sol=solve([subs(eq1,ilp,0),subs(eq2,vcp,0)],[il,vc]);
sol2=solve([subs(eq1,ilp,0),subs(eq2,vcp,0)],[il,D]);
sol.il;
sol.vc;
D_=0:0.001:1;
Vo_=subs(sol.vc,[D],[D_]);
Vo_1=subs(Vo_,[rl],[Rl]);
Vo_2=subs(Vo_,[rl],[R11]);
%duty cycle calculation
d1=double(subs(sol2.D(1),[vc rl],[V0 Rl]));
d2=double(subs(sol2.D(2),[vc rl],[V0 R11]));
alpha=min(d1,d2)
% alpha=0.55;
%I1
il1=subs(sol.il,[D rl],[alpha Rl]);
il1=double(subs(il1,'D',alpha))
%Vc1
Vc1=subs(sol.vc,[D rl],[alpha Rl]);
Vc1=double(subs(Vc1,'D',alpha))
eq1_=solve(eq1,ilp);
eq2_=solve(eq2,vcp);
ilp_A=[diff(eq1_,il) diff(eq1_,vc)];
vcp_A=[diff(eq2_,il) diff(eq2_,vc)];
ilp_B=[diff(eq1_,D) ];
vcp_B=[diff(eq2_,D) ];
A=[ilp_A; vcp_A];
B=[ilp_B; vcp_B];
A=[subs(ilp_A,[rl D],[Rl alpha]); subs(vcp_A,[rl D],[Rl alpha])];
B=[subs(ilp_B,[rl D vc],[Rl alpha Vc1]); 0];%subs(vcp_B,[rl D il],[Rl alpha il1])];
% for i=1:size(A,1)
% for j=1:size(A,2)
% A1(i,j)=double(A(i,j));
% end
% B1(i,1)=double(B(i,1));
%
%
% end
% A=A1
% B=B1
Caa=[0 1];
Daa=0;

Answers (0)

Communities

More Answers in the  Power Electronics Control

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!