Problem in Implementing exponential transfer function

5 次查看(过去 30 天)
I am facing a problem while implementing exponential transfer function.
I have td1= 0.01+0.01sin(40.pi.t) where t is simulation time
I need to implement exp^(-td1*s) in simulink but I am unable to do so. I understand we can implement exponential transfer function by mscript but I wanted to implement it by simulink. I have seen some answers stating that we have to use transport delay to implement the time delay. Is that the only way or is there a different way to implement in simulink.Thank you.

采纳的回答

Naman Bhaia
Naman Bhaia 2019-3-19
Hello Rahul,
From what I can understand, you can do the following as an alternative to using MATLAB script
1. There can be two ways Define the transport delay function (td1)
1.1. Using your regular Simulink blocks. Define the “frequency” of the sine wave input source as 40*pi. Run this model before the other and save the output to the workspace as td1. You can mask this as a subsystem and make it priority 1 while compiling. This way it will store the value of td1 to the workspace before it executes the transfer function.
img1.PNG
1.2. Define the td1 value in the “Initialization Function” subsection of the “Model Properties” dialog box.
img2.PNG
2. After completing step 1, convert the exponential transfer function to a logical format using the Transfer Function from the Simulink/Continuous library.
2.1. In the transfer function you can convert your exponential function exp^(-td1*s) to exp^(-td1*s/2)/ exp^(td1*s/2).
2.2. This can then be simplified down to (1+(td1*s)/2)/( 1-(td1*s)/2)
3. Give the input to this transfer function as a constant (1) and the output is what you desired.
img3.PNG
  2 个评论
Rahul
Rahul 2019-3-19
Hello Naman,
Thank you very much for your help. I just have one question from your answer, in step 1 how make the masked subsystem a priority to compile first as explained by you.
Rahul
Rahul 2019-3-20
Hello Naman,
I figured out how to assign prority for subsystems and accordingly execute them. What I found out was there is something called block properties with an option called priority and assign 1 to it. Thank you very much

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Subsystems 的更多信息

产品


版本

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by