how to dising step function to be an input to 2nd order system?
Afficher commentaires plus anciens
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 commentaire
Ameer Hamza
le 2 Avr 2020
What is the model of your system?
Réponses (1)
Ameer Hamza
le 2 Avr 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 commentaires
ido lavi
le 2 Avr 2020
Ameer Hamza
le 2 Avr 2020
You can get the data from lsim using
[y, t] = lsim(sys,u,t);
plot(t, y);
Catégories
En savoir plus sur System Identification Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!