how to dising step function to be an input to 2nd order system?
Show older comments
Hello, I'm trying to dising a spasific step function, and to add a sine on it to get the data of the responce, and I couldn't find any function that does that.
My step function -
f(t)= { 0 t<0.7
0.5*t 0.7<t<0.77
0.77*0.5 t>0.77 }
and to add any sine to the step function, lets say - sin(8*t)
how can I do it on a 2nd order system and to get the raw data?
Hope my qution is clear, thank you!
1 Comment
Ameer Hamza
on 2 Apr 2020
What is the model of your system?
Answers (1)
Ameer Hamza
on 2 Apr 2020
This shows how to simulate the response of a second order for system for a given input signal
sys = tf(1, [1 1 1]);
t = linspace(0,10,1000); % time from 0 to 10
u = [0*t(t<0.7) 0.5*t(0.7<t & t<0.77) 0.77*0.5*ones(size(t(0.77<t)))] + sin(t);
lsim(sys,u,t)
2 Comments
ido lavi
on 2 Apr 2020
Ameer Hamza
on 2 Apr 2020
You can get the data from lsim using
[y, t] = lsim(sys,u,t);
plot(t, y);
Categories
Find more on System Identification Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!