Trimming a subsystem in simulink

30 views (last 30 days)
I am trying to linearize a nonlinear model. The nonllinear model is a subsystem in my simulink model file. I defined my I/O signals in simulink model but when I am trying to find the operating point for linearization i.e. trimming the model, simulink says that my model does not have any input or output points. My whole simulink model file does not have any inputs or output ports but a subystem of my model has them and I want to linearize only that subystem.
On the other hand, I am able to linearize this subsystem because linearize function allows me to linearize individual blocks or subsystems. But I cannot choose a trimming point about which I want to linearize the subystem. Does Simulink allow me to do this?
  2 Comments
Ryan G
Ryan G on 11 Mar 2013
Can you upload an image of your model showing the input and output points?
Are you using the linearization GUI or the trim function? If you use the GUI you can export into MATLAB code once it is successful for easier implementation.
Shyam Mudiraj
Shyam Mudiraj on 11 Mar 2013
I am unable to upload the pic. Tried using google drive and dropbox. Both didnot work. I cannot see the image in the preview. I just see a tile.

Sign in to comment.

Accepted Answer

Arkadiy Turevskiy
Arkadiy Turevskiy on 12 Mar 2013
Yes, you can do what you are trying to accomplish. As you said, you can linearize the subsystem, but what you cannot do yet is select a non-default operating point.
You can trim your model at desired conditions, and you do not necessarily need input and output specifications for trimming.When you specify trimming specifications the tool shows you all the states - if you know which states should be in steady state and which one should be fixed at known values - you can specify that.
Additionally, you can add output constraint on the output of your subsystem - just right click on the output signal -> linear analysis points -> output constraint. Now when you specify trimming conditions you will have a signal in the Outputs tab, and you can specify desired value for the output.
Another option is to calculate an operating point at a simulation snapshot - specify simulation time when your simulation reaches desired steady state.
A couple of videos may help: this one and this one.
HTH.
Arkadiy
  1 Comment
Shyam Mudiraj
Shyam Mudiraj on 20 Mar 2013
What if my inputs are constraints. For example: if my input is a current signal, it cannot be negative and lets say the my input has an upper bound too. Is there a way to use this information while trimming in simulink

Sign in to comment.

More Answers (1)

YI YANG
YI YANG on 28 Nov 2016
I have the exactly the same question on how to linearize my simulink block. I think my case is a little bit more complicated than Shyam's. All my 8 states won't be stable if there's no input signals, which means I must specify my input signals before doing the linearization. Are there any tricks here let me tell simulink what my inputs are?
Thanks so much

Community Treasure Hunt

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

Start Hunting!