Step input applied for different seconds

조회 수: 7 (최근 30일)
Mustafa Furkan
Mustafa Furkan 2022년 12월 21일
댓글: Star Strider 2022년 12월 25일
I want to apply step input to the system as in the graphs above, where the second values are seen in the row and column. Entries will start at 1 second and end at 5 and 40 seconds respectively. I want to plot the vibration graph x(t), and the amplitude graph of these vibrations, but I couldn't find where to start.

채택된 답변

Star Strider
Star Strider 2022년 12월 21일
Experiment with this approach —
N = 1500; % Desired Length Of Simulation
t = linspace(0, 50, N);
u = @(tlen,lz) [zeros(1,lz) 10*ones(1,size(t(t<=tlen),2)-lz) zeros(1,size(t(t>tlen),2))]; % 'tlen'=Length Of '10' Region, 'lz'=Length Of Leading Zero Vector
u5 = u(5,2);
u40 = u(40,2);
figure
subplot(2,1,1)
plot(t, u5, 'g', 'LineWidth',1.5)
grid
title('u(5,2)')
axis('padded')
ylim([0 15])
subplot(2,1,2)
plot(t, u40, 'b', 'LineWidth',1.5)
grid
title('u(40,2)')
axis('padded')
ylim([0 15])
Use ‘t’ and ‘u(tlen,lz)’ as inputs to lsim to get the system response. Change ‘u(tlen,lz)’ to get the result you want.
.
  댓글 수: 10
Mustafa Furkan
Mustafa Furkan 2022년 12월 25일
It worked now thank you. Unfortunately, as you said, I don't get a different result than before. I guess I'll have to include values like mass stiffness to get a result as expected.
Star Strider
Star Strider 2022년 12월 25일
As always, my pleasure!
I have no idea what results are expected. It would appear that you would be using a state space realisation. There are likely documentation examples that could help code your system.
If necessary, you can use stepinfo with the arguments of all the step calls to get that information from each of them.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Filter Analysis에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by