get u0 and y0 to operating point

2 views (last 30 days)
Frank
Frank on 9 Mar 2012
Hi,
I am linearizing a system at a certain time. Is there an option to get the input and output values at this specified point in time?
I know that I could add some elements in the system to write the values. But I thought there could be a smarter solution. (?)
Cheers, Frank.
My code:
%%Specify the model name
model = 'sysToLinOneD';
%%Create the linearization I/O as specified in sysToLinOneD
ios(2) = linio('sysToLinOneD/Lookup 1800',1,'out');
ios(1) = linio('sysToLinOneD/Constant',1,'in');
%%Linearize the model
sys = linearize(model,ios);
%%Plot the resulting linearization.
figure(1)
step(sys)

Answers (1)

Arkadiy Turevskiy
Arkadiy Turevskiy on 4 Apr 2012
In your code you are linearizing at default model operating point. If you want to linearize a model at a speciific simulation time or at specific operating condition (for example, your model states are at steady state, and output is equal to number x), you need to trim the model first, using findop command.
To trim at a simulation time of 5 secs and then linearize the model at that condition:
>>op=findop(model,5);
>>sys=linearize(model,op,ios)
To see inputs and outputs, add inports and outports accordingly. Then simply do
>>op
See this demo and this demo for more details.
HTH.
Arkadiy

Categories

Find more on Linearization in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!