Let’s import your model:
In[]:=
dCAC6=ImportString
,"MO";
Your interest seems to be ultimately linearization, the intention being to modify the value of the input vi at the operating point.
​
But before talking about linearization, let me mention a couple of details that are relevant.
​
At the moment vi initializes at 0 when simulating. The simplest way to modify this initial value for this model in particular is to add a start value for vi. In System Modeler you can make this start value more noticeable in your modeling by right-clicking on the input component, going to Properties and ticking the box Show in Variable Views. Now you get direct access to this value for vi in your General window at the bottom:
Now setting a start value there will lead to a modification in your model. For example, setting 20 as start value does this in the text view:
In general setting a start value is not a guarantee that the initialization will follow that setting (for more details see
here
or
here
), but in your model this is enough. If you instead want to set the start value in Mathematica you can do this with SetSystemModel
In[]:=
SetSystemModel[dCAC6,<|"InitialValues"->{"vi"->20}|>];
and with this start value, simulating and plotting gives you
In[]:=
SystemModelPlot[dCAC6,{"vi"}]
Out[]=
Now we can go back to talking about linearization. SystemModelLinearize by definition requires an operating point. The default uses an operating point found by FindSystemModelEquilibrium, if it finds one. In the case of your model, setting that start value for vi is enough for FindSystemModelEquilibrium to find an operating point with that constraint:
In[]:=
op=FindSystemModelEquilibrium[dCAC6]
Out[]=
{{{capacitor2.capacitor[1].v,0.},{capacitor2.capacitor[2].v,0.},{capacitor2.capacitor[3].v,0.},{capacitor2.i[3],0.},{inductor1.inductor[1].i,0.},{inductor1.inductor[3].i,0.},{i2,0.}},{{vi,20.}},{{i1,0.},{i2,0.},{vc,0.}}}
Notice that this is not a given for models in general, since
1) there is no guarantee that the constraint is consistent with an equilibrium point of the system,
2) even if the given value is valid, there is no guarantee that FindSystemModelEquilibirum will find the desired equilibrium point. This will depend on the complexity of the model.
But in the case of your model this is fine. And then you can use this operating point to linearize:
In[]:=
ssm=SystemModelLinearize[dCAC6,op]
Out[]=
​
​
vi
capacitor2.capacitor[1].v
0.
0.
0.
0.
1000.
0.
-1000.
0.
capacitor2.capacitor[2].v
0.
0.
0.
-1000.
-1000.
0.
1000.
0.
capacitor2.capacitor[3].v
0.
0.
0.
1000.
0.
0.
0.
0.
capacitor2.i[3]
6.66667
6.66667
-13.3333
-60.
-3.12586×
-9
10
-1000.
3.12564×
-9
10
0.
inductor1.inductor[1].i
-6.66667
3.33333
3.33333
-1.56282×
-9
10
-1030.
-1.807×
-13
10
30.
0.
inductor1.inductor[3].i
3.33333
3.33333
-6.66667
-30.
-1.56302×
-9
10
-1000.
1.56282×
-9
10
0.
i2
6.66667
-3.33333
-3.33333
1.56282×
-9
10
30.
1.807×
-13
10
-30.
0.
i1
0.
0.
0.
0.
1.
0.
0.
0.
i2
0.
0.
0.
0.
0.
0.
1.
0.
vc
0.666667
-0.333333
-0.333333
0.
3.
0.
-3.
0.
Looking at the result notice that the input seems to have no effect at the operating point. This may or may not be a cause for concern for your model... maybe you want to attach a ground component, Modelica.Electrical.Analog.Basic.Ground, to one of the pins of the signalVoltage1 component, like in the model Modelica.Electrical.PowerConverters.Examples.DCAC.MultiPhaseTwoLevel.MultiPhaseTwoLevel_R?
​
As a final remark, if you don’t want to modify your model with a start value, it is possible to simply indicate FindSystemModelEquilibrium the constraint for vi:
In[]:=
op2=FindSystemModelEquilibrium[dCAC6,{"vi"==30}]
Out[]=
{{{capacitor2.capacitor[1].v,0.},{capacitor2.capacitor[2].v,0.},{capacitor2.capacitor[3].v,0.},{capacitor2.i[3],0.},{inductor1.inductor[1].i,0.},{inductor1.inductor[3].i,0.},{i2,0.}},{{vi,30.}},{{i1,0.},{i2,0.},{vc,0.}}}
In[]:=
ssm2=SystemModelLinearize[dCAC6,op2]
Out[]=
​
​
vi
capacitor2.capacitor[1].v
0.
0.
0.
0.
1000.
0.
-1000.
0.
capacitor2.capacitor[2].v
0.
0.
0.
-1000.
-1000.
0.
1000.
0.
capacitor2.capacitor[3].v
0.
0.
0.
1000.
0.
0.
0.
0.
capacitor2.i[3]
6.66667
6.66667
-13.3333
-60.
-3.12586×
-9
10
-1000.
3.12564×
-9
10
0.
inductor1.inductor[1].i
-6.66667
3.33333
3.33333
-1.56282×
-9
10
-1030.
-1.807×
-13
10
30.
0.
inductor1.inductor[3].i
3.33333
3.33333
-6.66667
-30.
-1.56302×
-9
10
-1000.
1.56282×
-9
10
0.
i2
6.66667
-3.33333
-3.33333
1.56282×
-9
10
30.
1.807×
-13
10
-30.
0.
i1
0.
0.
0.
0.
1.
0.
0.
0.
i2
0.
0.
0.
0.
0.
0.
1.
0.
vc
0.666667
-0.333333
-0.333333
0.
3.
0.
-3.
0.