- Extract Transfer Functions: Use the getIOTransfer and getLoopTransfer methods to get the transfer functions from the slTuner object.
- Define Analysis Points: Ensure that the analysis points are correctly defined in the genss object.
- Construct the genss Model: Use the extracted transfer functions and analysis points to construct a genss model.
Turn slTuner into genss
3 views (last 30 days)
Show older comments
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!
0 Comments
Answers (1)
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:
Refer to the following reference to know about 'genss':
Hope this helps.
2 Comments
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.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!