Transfer Function in Simulink

조회 수: 11 (최근 30일)
Samson
Samson 2014년 10월 19일
답변: Orion 2014년 10월 21일
I have created a model for muscle stimulus in Simulink which takes a stimulus (S) and inputs it through a transfer function block, 1/(tau*s + 1) and outputs muscle activation (A).
S --> 1/(tau*s+1) --> A
I am trying to implement a model where tau = 0.030s when A is rising and tau = 0.08s when A is falling.
How can I vary tau within the Simulink model of the transfer function with my two parameters?

답변 (3개)

Orion
Orion 2014년 10월 20일
Hi,
you can try something like
you may need to add a second switch for the falling case.
  댓글 수: 1
Samson
Samson 2014년 10월 20일
Doesn't this already take care of the falling case where if output A is not increasing, the switch will change from T to F?

댓글을 달려면 로그인하십시오.


Orion
Orion 2014년 10월 20일
Actually, the simple model I made just takes care of the detect increase. it computes :
if U>U/Z % if current value > precedent value
A = fcn(0.03)
else % all other case : decrease OR S is constant
A = fcn(0.08)
end
So, as you see if S becomes constant, instantly, the function with 0.08 is used.
it depends on what you need to compute, but you may have to implement
if U>U/Z % if current value > precedent value
A = fcn(0.03)
elseif U<U/Z % if current value < precedent value
A = fcn(0.08)
else % all other case : S is constant
A = last_value_of_A;
end
and in simulink, you need 2 switch to do that.
  댓글 수: 1
Samson
Samson 2014년 10월 21일
Hmm, would you mind showing me how to implement the second switch? I keep running into issues with having multiple signals going into A.

댓글을 달려면 로그인하십시오.


Orion
Orion 2014년 10월 21일
here is a model which computes with 2 swicth. Note : i made a change using S instead of A to detect increase and decrease (I don't think it can really work using the ouput A)

카테고리

Help CenterFile Exchange에서 General Applications에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by