How to display a tf function in the command window frm simulink??
显示 更早的评论
I have a tf of a plant which i need the be pulled from the simulink for my matlab function. Is there any function/command which can help me automatically obtain the transfer function so that i can obtain the Characteristic equation for in my further program?
Lets say for my simulink transfer, i want the generator tf automatically being obtained during my online autotuning. See image below.

Any suggestion?? Thnk you for reading my query.
Nitesh
采纳的回答
更多回答(1 个)
Nobel Mondal
2015-9-19
If your model is loaded, you can access the parameter values for a block using "get_param" api.
Say, you have a model "myModel.slx" and you would like to get the coefficients of a "Transfer Fcn" block named "myTFBlock"
>> load_system('myModel') % If your model is already loaded, skip this
>> numeratorVal = get_param('myModel/myTFBlock', 'Numerator');
>> denomVal = get_param('myModel/myTFBlock', 'Denominator');
Hope this helps. Thanks.
类别
在 帮助中心 和 File Exchange 中查找有关 Simulink 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

