Turn slTuner into genss

3 views (last 30 days)
Cedric Kotitschke
Cedric Kotitschke on 20 Sep 2024
When using a slTuner object, I can call methods like getIOTransfer to get the closedloop and getLoopTransfer to get the openloop transfer function. However, this is also possible with genss objects: getIOTransfer is not necessary because we already have the closedloop system but getLoopTransfer is possible if the genss objects has the appropriate analysis points defined.
Now my question:
Is it possible to convert the sltuner into a genss object such that I have all inputs, outputs and analysis points as defined in the slTuner object? I haven't found anything on this yet.
If you're wondering why I would need this:
I have a function that takes in genss objects and call getLoopTransfer on them but this genss object could come from anywhere. Set up from scratch, custom linearization of simulink models (we have our custom routine). However, when I linearize a simulink moodle using sltuner, I can't use this function.
Thanks for your help!

Answers (1)

Manikanta Aditya
Manikanta Aditya on 9 Oct 2024
Edited: Manikanta Aditya on 9 Oct 2024
Hi Cedric,
Looks like we can convert an slTuner object into a genss object while preserving all the inputs, outputs, and analysis points defined in the slTuner object.
This can be done using the getIOTransfer and getLoopTransfer methods to extract the necessary transfer functions and then constructing a genss model from these components.
Try the following steps and see if you can acheive the requirement you have:
  1. Extract Transfer Functions: Use the getIOTransfer and getLoopTransfer methods to get the transfer functions from the slTuner object.
  2. Define Analysis Points: Ensure that the analysis points are correctly defined in the genss object.
  3. Construct the genss Model: Use the extracted transfer functions and analysis points to construct a genss model.
Refer to the following reference to know about 'genss':
Hope this helps.
  2 Comments
Cedric Kotitschke
Cedric Kotitschke on 9 Oct 2024
and how exactyl do you construct the genss object? getIOTransfer loses the analysis points and getLoopTransfer loses the inputs and outputs
Manikanta Aditya
Manikanta Aditya on 9 Oct 2024
Hi,
I agree, you’re right, using getIOTransfer and getLoopTransfer separately can result in losing either the analysis points or the input/output definitions.
For constructing the genss object, we can the try to use the linearize the function (linearize - Linear approximation of Simulink model or subsystem - MATLAB - MathWorks India) to get the linearized model from the slTuner object.
Then use the genss function (genss - Generalized state-space model - MATLAB - MathWorks India) to covert the linearized model into a generalized state space model.

Sign in to comment.

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!