How to include the operating points when linearizing a Simulink Model from the command line?
Mostrar comentarios más antiguos
I have a question regarding linearization. I am working on a model that includes a static nonlinear block (I modelled in Simulink) and a dynamic linear block. I want to linearize the static nonlinear block around an operating point.
However, when I use the linearize command the output is a static gain that doesn't take the operating points (x0,y0) into consideration as shown in the figure below:

Instead I calculated the static gain from the linearize command and updated the gain block as well as x0 and y0 as the oeprating point changes.
My Question is: How to linearize the static nonlinearity from the command line, while also accounting for x0 and y0, so that x0 gets subtracted from the input to the gain block and y0 gets added to the output of the gain block (as shown in the figure above) ?
11 comentarios
Paul
el 5 de Dic. de 2021
If that highlighted gain block in the diagram is this block, then it should linearize to just a gain, namely the value of its Gain parameter. Can you provided more detail about what result you're tyring to achieve or expecting, perhaps with an equation?
Adel Abdelsamed
el 5 de Dic. de 2021
Paul
el 6 de Dic. de 2021
Sorry, I still don't understand what is meant by "nonlinear static block." Is that block a subsystem that implements an algebraic, nonlinear relationship between its input and output? For example, like y = u^2?
Can you write down an example, nonlinear equation that illustrates problem and what you would expect to see after linearization?
Adel Abdelsamed
el 6 de Dic. de 2021
Paul
el 6 de Dic. de 2021
The linearize() command resturns a linear model where the states, inputs, and outputs are perturbations from the operating point. So in your example, the u in f(u) = u^2 is not the sam as the u in the result from the linearize command. To be more formal, if we start with:
y = f(u) = u^2
the linear model returned by linearize() is
ybar = df/du(u = u0) * ubar
where:
ybar = y - y0
ubar = u - u0
u0 is the input at the operating point (4, in the example)
y0 is the output at the operationg point (16, in the example)
df/du(u = u0) is the derivative of f wrt u evaluated at u = u0, so 2*u evaluated at u = 4, or 8.
So everything is working as it should, wtih the correct interpretation of the output of linearize().
The next question would be what do you intend to do with the output from linearize()? Typically, it's used for linear control analysis and/or design. Is that your plan? Or are you thinking that you want to use the output from linearize() to replace the nonlinear block in the Simulink model with its linear approximation for some reason?
Adel Abdelsamed
el 6 de Dic. de 2021
Paul
el 7 de Dic. de 2021
Obviously I don't know anything about your particular model. But the general approach is:
a. Define an operating point for the plant at a trim condition (inputs and state such that all state derivatives equal zero)
b. Linearize the plant at that operating point
c. Design a (PID?) controller based on that linearized plant model.
If well designed, the controller from step c should work well over some "operating region" around the operating point. For example, if the system (nonlinear plant and controller) is initialized at the operating point, then just letting the simulation run should, in theory, result in no change from the operating point. If the system is then slightly perturbed from the operating point, for example due to a change in the reference input, then the controller should cause the closed-loop to react as expected based on the linear design.
How far from the operating point the controller is still acceptable will depend on the properties of the plant. If the controller doesn't work well enough over the full operating spaces as the system strays from the operating point, then you go back to step (a), define an additional operating point, design a second controller, and then come up with a way to define the real time control based on two controller designs, usually through gain scheduling. If two controllers aren't sufficient, go back to step (a) and add a third into the mix, and so on.
There really shouldn't be a need to substitute a linear approximation for the nonlinear block (assuming I understand your goals correctly).
Finally, the preceding discussion assumed the plant contains smooth nonlinearities, like u^2, not hard nonlinearities, like saturations, which are a different problem.
Adel Abdelsamed
el 8 de Dic. de 2021
Sam Chak
el 9 de Dic. de 2021
@Adel Abdelsamed, Speaking of the gain-scheduling controller, you can try heuristically identifying how the scheduling variable should change the gain at the operation point (
,
), upper region of operation (
,
), and the lower region of operation (
,
). Generally, if the operation point (
,
) is already stable, it may be good to have a relatively low gain around the operation point so that the controller cannot disturb the nonlinear process too much, whereas a unstable operation point should have a relatively high gain.
The process I've described works well with the types of systems I'm familiar with. However, it's certainly possible that those systems have certain properties that makes them amenable to the described approach. Others may not. For sure, gain scheduling can be an ad hoc process. At least it was the last I checked; maybe there have been advances since then. For sure, there are lots of papers on gain scheduling that I'm sure you can find.
The Control System Toolbox doc has examples,with references, if you're interested. Link to examples
Edit: 2021-11-10 I should have mentioned that the gain scheduling approach I described also can introduce "hidden feedback" paths that can affect closed loop system performance and stability. An internet search on "gain scheduling hidden feedback" may be of interest.
Respuestas (0)
Categorías
Más información sobre Time and Frequency Domain Analysis en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

