Problem in Implementing exponential transfer function
1 view (last 30 days)
Show older comments
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.
0 Comments
Accepted Answer
Naman Bhaia
on 19 Mar 2019
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.
1.2. Define the td1 value in the “Initialization Function” subsection of the “Model Properties” dialog box.
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.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!