필터 지우기
필터 지우기

response of state space to arbitrary input

조회 수: 6 (최근 30일)
Shlok Vaibhav Singh
Shlok Vaibhav Singh 2021년 12월 24일
댓글: Star Strider 2021년 12월 26일
Using the ss function (https://in.mathworks.com/help/control/ref/ss.html?searchHighlight=ss%20&s_tid=srchtitle_ss%20_1), we can create state space models and we can use step(sys, t) to simulate the step response of the model for a time grid t, however what if i want to give a non-trivial input different from step, like a traingular wave??
Piecewise constants can be modelled by adding signed delayed step responses but how to proceed with any general input that can be even specified in form of an array to accompany time grid?
Thanks

채택된 답변

Star Strider
Star Strider 2021년 12월 24일
what if i want to give a non-trivial input different from step, like a traingular wave??
Use the lsim function. That is the appropriate answer to the second question as well.
Using a system from the lsim documentation and an arbitrary waveform —
A = [-3 -1.5; 5 0];
B = [1; 0];
C = [0.5 1.5];
D = 0;
sys = ss(A,B,C,D);
t = linspace(0, 10, 1500); % Time Vector
u = sum(sin((1:9)'*2*pi*t/2.5)); % Arbitrary Input
lsim(sys,u,t)
grid on
Experiment with different systems and ‘u’ vectors.
.
  댓글 수: 2
Shlok Vaibhav Singh
Shlok Vaibhav Singh 2021년 12월 26일
Thanks a lot
Star Strider
Star Strider 2021년 12월 26일
As always, my pleasure!
.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Time and Frequency Domain Analysis에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by