Sinusoidal steady state response to sinusoidal input

So I have a transfer function of a feedback system,
>> yd
yd =
s^3 + 202 s^2 + 401 s + 200
------------------------------
s^3 + 202 s^2 + 20401 s + 1e06
Of which I'd like to look at the sinusoidal steady state response to the disturbance d(t) = sin(130t).
How do you do this in matlab? I'm well aware of how to get a step or impulse response, but not a sinusoidal response.

 채택된 답변

Star Strider
Star Strider 2016년 2월 20일
Use the lsim function:
% num = s^3 + 202 s^2 + 401 s + 200
% den = s^3 + 202 s^2 + 20401 s + 1e06
n = [1 202 401 200];
d = [1 202 20401 1E+6];
sys = tf(n,d); % Define LTI System
t = linspace(0, 100, 1000); % Time Vector
u = sin(130*t); % Forcing Function
y = lsim(sys, u, t); % Calculate System Response
figure(1)
plot(t, y)
grid

댓글 수: 4

Thanks for your comment, it helped me figure out how to test some systems for a school project. Can you also do that for systems in state space?
My pleasure!
Yes.
The lsim function will work for any valid system object.
here 130 is omega??
It is the frequency in radians/time_unit.

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

추가 답변 (1개)

Abdulhakim
Abdulhakim 2023년 11월 11일
편집: Abdulhakim 2023년 11월 11일
If you know the Laplace transform of the input you can exploit the fact that the impulse function in the s-domain is equal to 1. Here is how:
For a system with input and output
Since
impulse(G*R) is actually the output in the time domain .
The laplace transform for
num = [1 202 401 200];
den = [1 202 20401 10^6];
G = tf(num,den)
SIN = tf(130,[1 0 130^2]);
C = G*SIN
impulse(C)

카테고리

도움말 센터File Exchange에서 Dynamic System Models에 대해 자세히 알아보기

제품

질문:

2016년 2월 20일

편집:

2023년 11월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by