In[]:=
eqns={L0*il'[t]ed[t]*d[t]+vc[t]*(1-d[t])-il[t]*r,C0*vc'[t](-vc[t]/R0)-il[t]*(1-d[t])-vc[t]*g}
Out[]=
L0
′
il
[t]d[t]ed[t]-ril[t]+(1-d[t])vc[t],C0
′
vc
[t]-(1-d[t])il[t]-gvc[t]-
vc[t]
R0

In[]:=
m=StateSpaceModel[eqns,{{il[t],I0},{vc[t],V0}},{{d[t],D0},{ed[t],ED}},{il[t],vc[t]},t,SystemsModelLabels{{"d","ed"},{"il","vc"},{"il","vc"}},DescriptorStateSpaceTrue]
Out[]=
​
​
​
d
ed
il
-L0
0
r
-1+D0
-ED+V0
-D0
vc
0
-C0
1-D0
g+
1
R0
-I0
0
il
​
​
1
0
0
0
vc
​
​
0
1
0
0
In[]:=
tf=TransferFunctionModel[m]
Out[]=
​
d
ed
il
ED+EDgR0+I0R0-D0I0R0-V0-gR0V0+C0EDR0s.-C0R0V0s.
r+R0-2D0R0+
2
D0
R0+grR0+L0s.+gL0R0s.+C0rR0s.+C0L0R0
2
s.
D0+D0gR0+C0D0R0s.
r+R0-2D0R0+
2
D0
R0+grR0+L0s.+gL0R0s.+C0rR0s.+C0L0R0
2
s.
vc
R0-ED+D0ED+I0r+V0-D0V0+I0L0s.
r+R0-2D0R0+
2
D0
R0+grR0+L0s.+gL0R0s.+C0rR0s.+C0L0R0
2
s.
(-D0+
2
D0
)R0
r+R0-2D0R0+
2
D0
R0+grR0+L0s.+gL0R0s.+C0rR0s.+C0L0R0
2
s.
In[]:=
CreateSystemModel[tf]
Part
:Part specification r〚1〛 is longer than depth of object.
Part
:Part specification R0〚1〛 is longer than depth of object.
Part
:Part specification r〚2〛 is longer than depth of object.
General
:Further output of Part::partd will be suppressed during this calculation.
Out[]=
CreateSystemModel
​
d
ed
il
ED+EDgR0+I0R0-D0I0R0-V0-gR0V0+C0EDR0s.-C0R0V0s.
r+R0-2D0R0+
2
D0
R0+grR0+L0s.+gL0R0s.+C0rR0s.+C0L0R0
2
s.
D0+D0gR0+C0D0R0s.
r+R0-2D0R0+
2
D0
R0+grR0+L0s.+gL0R0s.+C0rR0s.+C0L0R0
2
s.
vc
R0-ED+D0ED+I0r+V0-D0V0+I0L0s.
r+R0-2D0R0+
2
D0
R0+grR0+L0s.+gL0R0s.+C0rR0s.+C0L0R0
2
s.
(-D0+
2
D0
)R0
r+R0-2D0R0+
2
D0
R0+grR0+L0s.+gL0R0s.+C0rR0s.+C0L0R0
2
s.
