Why do these methods to obtain the simulink model transfer functions return different results?

6 Ansichten (letzte 30 Tage)
I am trying to learn to use the simulink model linearizer to obtain a transfer function from the following simplified model in MATLAB 2020b:
If I understand the manual correctly, in order to obtain the closed-loop transfer function of the full loop PI/(1+PI*Feedback), the complementary sensitivity analysis point should be applied here:
When applying this at the model output and running the linearizer, the following tf is obtained:
However, the result differs from my own calculations.
When I apply the open-loop input and output however to the loop as follows:
This seems to give me the correct result:
Using these is not always possible in my other complex model however, without ripping it apart. The way I understand the manual, both approaches should be identical. Where am I wrong, what does the complementary sensitivity yield here and what would be the correct way of obtaining the closed loop tf?
Edit: Also, is it possible to obtain a tf with gain parameters held as undefined variables instead of numerical values from such a model?
My sincere thanks for helping me out with this one...

Akzeptierte Antwort

Paul
Paul am 27 Jun. 2024
Hi BW,
Define PI and F
s = zpk('s');
PI = 1 + 2/s;
F = 6;
In the first case, the linerarizer computes the transfer function from the input arrow to the output arrow.
The forward path gain is -F*PI and the loop gain is also -F*PI. Using the standard transfer function formula we get
H = -F*PI/(1 - (-F*PI))
H = -0.85714 s (s+2) ---------------- s (s+1.714) Continuous-time zero/pole/gain model.
which is the result produced by the linearizer (keeping in mind that s in the numerator cancels with s in the denominator.
Fo the second case, the transfer function is from the input arrow to the output arrow, which is the result you expect:
H = feedback(PI,F) % better way to compute PI/(1 + F*PI)
H = 0.14286 (s+2) ------------- (s+1.714) Continuous-time zero/pole/gain model.
and what the linearizer produces.
The correct way to get the closed loop transfer fucntion from r to y is the second approach.
Not sure why the second approach would require "ripping apart" the model. Just place the linear anlaysis points where they need to be, exactly as you did.
No, one can't obtain the TF from simulink in terms of unevaluated, or symbolic parameters. You can specify a grid of parameters and get a grid of linearizations. Search the doc for "Batch Linearize Model for Parameter Variations"
  3 Kommentare
Paul
Paul am 27 Jun. 2024
You're quite welcome.
For this problem there is no need to use open-loop input and open-loop output analysis points. Instead, use the input perturbation and the output measurement analysis points. The former goes on the output of the Constant block, like you already have, and the latter would go at the output of the PI sum block. This way there is no need for the additional gain block at the input to the scope.
The open-loop analysis points are useful when you want to get the TF for only a portion of the model. For example, if you want the TF of only the PI you could put an open-loop input on the output of the sum block that forms the error signal and an open-loop output at the output of the PI sum block.
Unfortunately, neither Simulink, Simulink Control Design, nor the Control System toolbox offer any facility for analytical, rather than numeric, analysis. The closest they come is being able to represent parameterized models, but the parameterization is always for specific numerical values. You can submit an enhancement request to MathWorks if you feel strongly about it.
The Symbolic Math Toolbox isn't that hard to learn and use for basic problems such as this. Sometimes it takes a bit of effort to wrangle results into simpler forms. Let's assume your feedback gain is K_f
syms s K_f
PI(s) = 1 + 2/s;
F = K_f
F = 
H(s) = PI/(1 + F*PI)
H(s) = 
[num,den] = numden(H(s))
num = 
den = 
H(s) = num/den
H(s) = 
For our specific case
H(s) = subs(H(s),K_f,6)
H(s) = 
I've often wondered how hard it would be to build a toolbox that provides basic control system analysis functionality for commands like feedback, et. al. and other basic functions for symbolic representations of linear systems. Maybe there's something out there already on the File Exchange. I know that there are threads on this forum that show how to convert symbolic objects, like H(s), into lti objects for use with Control System Toolbox.
BW
BW am 2 Jul. 2024
Bearbeitet: BW am 2 Jul. 2024
Thank you again, the reference to output pertubation helped a lot!
My current understanding is that these commands are really just inputs, outputs, and loop breaks or combinations thereof. Seeing these this way (as suggested by the symbols) clarifies this a lot.
I agree that the symbolic math toolbox works well once you get the hang of it, for lectures and hands-on experience, switching between simulink and a general transfer function would help, but I see the effort needed to get there. As for the wrangling, much agreed, the 'simplify(H(s))' command helped me as well in certain situations.
For the reference, since you mentioned it, transferring a symbolic Transfer function to something compatible with the control system toolbox has worked well with me in the past using the approach mentioned here.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by