필터 지우기
필터 지우기

Problem in Implementing exponential transfer function

조회 수: 5 (최근 30일)
Rahul
Rahul 2019년 3월 16일
댓글: Rahul 2019년 3월 20일
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