Ramp function with steady-state

48 Ansichten (letzte 30 Tage)
AA
AA am 30 Okt. 2024 um 17:54
Kommentiert: Les Beckham am 31 Okt. 2024 um 0:01
Hello.
I have a ramp function input that increases linearly from 0 units to 30 units in 10 seconds, and after 10 seconds it stays constant at 30. My questions are: 1) How can I define such function?? 2) How do I find the time domain response to such ramp input?? The transfer function is known.
Thank for any hints/help. AA

Akzeptierte Antwort

Les Beckham
Les Beckham am 30 Okt. 2024 um 18:33
Maybe something like this using lsim?
t = 0:0.01:30;
u = 3*t;
u(u > 30) = 30;
sys = tf([1 0], [1 1]); % <<< s / (s+1) -- replace with your transfer function
y = lsim(sys, u, t);
plot(t, u, t, y);
grid on
legend('input', 'response')
  1 Kommentar
Les Beckham
Les Beckham am 31 Okt. 2024 um 0:01
Thank you for accepting this answer.
Also, if you are just getting started with Matlab, I would highly recommend that you take a couple of hours to go through the free online tutorial: Matlab Onramp
This will explain a lot of things like "How can I define such function??".
If you have any questions about what I did here (after going through the Onramp training), please let me know.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by