simulink workspace transfert function

Hello everyone;
I need some help ,I saw this video (https://www.mathworks.com/videos/transfer-functions-in-simulink-part-2-extracting-transfer-functions-106147.html) and it was very helpful but my question is as follow: Are there any matlab commande to extract the transfert function(from linear analysis tool app) automatically to the workspace?
or :Are there any matlab commande to extract the transfert function(from simout simulink bloc) automatically to the workspace
I thank you in advance for your collaboration.

1 Comment

Sulaymon Eshkabilov answer moved here since it’s not an answer but rather a comment instead:
Could you please clarify your question: what you are trying to get the simulation values (signal values) from the TF block or coeff.s of the transfer function block or something else?

Sign in to comment.

Answers (2)

djihed ch
djihed ch on 12 May 2019
hello;
I'm traying to tune Kp,ki and kd parameters of a non linear PID controller, I designed the non linear PID controller and the system in simulink and I wrote the tuning code in script file witch it needs the open loop transfer function of the system with the controller from simulink to calculates the new Kp,ki and kd parameters ; the simout bloc (to workspace) gives to me the response but i need the transfert function .
please is there any command to extract the transfert function from simulink to workspace?
I thank you in advance for your interest in my request.
Hi,
If you are using linearization as demonstrated in the video and wish to see/save a State-Space respresentation of the transfer function of your designed system, then you should save the linear analysis under [LINEAR ANALYSIS] tab of the [Linear Analysis Tool] that will save the whole analysis in *.mat file. You can see the State-Space representation of your transfer function (under the variable name: LinearAnalysisToolProjects(1).Data.Value ... something like this) when you load your saved *.mat file into MATLAB workspace. It may differ if you have later versions of MATLAB. Mine is 2013b.
Good luck.

Tags

Asked:

on 11 May 2019

Community Treasure Hunt

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

Start Hunting!