Closed Anikesh31 closed 5 years ago
Yes, there is. You have to know the parameter name, though. For this, right click the block of interest, choose ‘Mask → View Base Mask...’ and locate the ‘Parameters & Dialog’ tab.
Here's an example. Suppose you have a model ‘test’ and inside it a Fractional Transfer Fcn block name ‘My transfer fcn’. Then, the code set_param('test/My transfer fcn', 'zeroPoly', '1+s')
will set the zero polynomial string to ‘1+s’.
Hope this works for you. Also, if you prefer to set factors/orders via vectors, there is a ‘Num Fractional Transfer Fcn’ block available in the fod model set.
Dear Aleksei,
Thanks a lot for your prompt reply.
Regards, Anikesh Kumar
On Thu, Mar 28, 2019 at 7:04 PM Aleksei Tepljakov notifications@github.com wrote:
Yes, there is. You have to know the parameter name, though. For this, right click the block of interest, choose ‘Mask → View Base Mask...’ and locate the ‘Parameters & Dialog’ tab.
Here's an example. Suppose you have a model ‘test’ and inside it a Fractional Transfer Fcn block name ‘My transfer fcn’. Then, the code set_param('test/My transfer fcn', 'zeroPoly', '1+s') will set the zero polynomial string to ‘1+s’.
Hope this works for you. Also, if you prefer to set factors/orders via vectors, there is a ‘Num Fractional Transfer Fcn’ block available in the fod model set.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/AlekseiTepljakov/fomcon-matlab/issues/2#issuecomment-477499537, or mute the thread https://github.com/notifications/unsubscribe-auth/Auvk1sxQR_7-bOHPez_5_xqIkxWQUYKvks5vbH7kgaJpZM4cPSYo .
I was facing the similar issue when I try to pass the variable from m-file to fractional transfer function block. I followed your suggestion to modify the using following code [set_param('m1/FOIMC', 'zeroPoly', '(1-0.25kp)s+kp')] and [set_param('m1/FOIMC', 'polePoly', 'lambda*s^a+1')]. I was able to create the variable inside the Frac Tf(s) block. But when I run the model it is still showing the error as [undefined function or variable 'kp']
Error is not resolved by given answers above , it still says "invalid setting in fractional transfer function block (mask) for parameter zeropoly"
Please check the way you set the parameter and whether Simulink can resolve the parameter that you set from its own workspace or the global one.
Is there a way to pass the transfer function parameters via command window or a m file? As of now, I can't write a variable in the block, unlike the regular Simulink transfer function block.