필터 지우기
필터 지우기

What does s = tf ('s') do?

조회 수: 126 (최근 30일)
Leonardo Wayne
Leonardo Wayne 2017년 4월 1일
댓글: Walter Roberson 2019년 1월 28일
I am currently doing an exercise in PID control, the first line in the code is
s = tf ('s');
What does it do? according to Mathworks website:
sys = tf(M) creates a static gain M (scalar or matrix)
from what I know that tf is supposed to create a transfer function with a denominator and numerator. what does static gain mean?

채택된 답변

Star Strider
Star Strider 2017년 4월 1일
Using:
s = tf('s');
allows you to enter the transfer function in the next line in symbolic form rather than as numerator and denominator vectors. You can easily recover the numerator and denominator vectors from the system object created:
s = tf('s');
sys = (244.2*s + 244.2) / (0.015*s^4 + 1.525*s^3 + 2.51*s^2 + 245.2*s + 1221);
num = [sys.Numerator{:}]
den = [sys.Denominator{:}]
num =
0 0 0 244.2 244.2
den =
0.015 1.525 2.51 245.2 1221

추가 답변 (2개)

Rik
Rik 2017년 4월 1일
You could think of this as something similar to uint8(5). It is a way to generate a variable with the correct data-type, so you can more easily manipulate it. Static gain in this case means that you have a transfer function that simply multiplies your input with a number and does nothing else.
  댓글 수: 1
Walter Roberson
Walter Roberson 2019년 1월 28일
not really . the 's' is detected specially. The static gain situation only applies for numeric input.

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


Janakiraman S
Janakiraman S 2019년 1월 28일
It creates a continuous time function of variable s (to be given as a text input in quotes) which can be used in defining transfer funtion models
Matlab code and result
s=tf('s')
s =
s
Continuous-time transfer function.

카테고리

Help CenterFile Exchange에서 PID Controller Tuning에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by