Borrar filtros
Borrar filtros

State Space unit step and initial conditions

41 visualizaciones (últimos 30 días)
David Bowden
David Bowden el 10 de Abr. de 2017
Respondida: Drishya Dinesh el 19 de Abr. de 2021
I am trying to get MATLAB to show a state space response with both a unit step input and initial conditions. All documentation shows only how to do one or the other, as if I try using step() or initial(), the second overrides the first. Thanks!

Respuestas (3)

Daniel Stankowski
Daniel Stankowski el 7 de En. de 2020
The above method works but you can also use an lsim command.
Do the following:
lsim(sys,u,t,x0)
where;
  • sys - defines your state space
  • u defines your input signal which in case of step input can be defined as u=ones(length(t)) % cause we know for step u(t)=1 (you can see it from laplace transform tables)
  • t - time, for example; t=linspace(0,5,10)
  • x0 = is a vector of initial conditions
  2 comentarios
shivam sahil
shivam sahil el 11 de Abr. de 2020
A small correction, it should be:
u=ones(length(t),1) ;
instead of
u=ones(length(t))
Xiaohan Tang
Xiaohan Tang el 3 de En. de 2021
Thank you!!!

Iniciar sesión para comentar.


Youngsik Kim
Youngsik Kim el 3 de Nov. de 2017
You can get the zero input response from initial() and zero state response from step() separately, and then you can add up later to plot the response.
[yi,ti,xi]=initial(systm,xinitial); [ystep,ts,xs]=step(systm,ti);
Then, the superposition of them is what you want. ytotal=yi+ystep; Then plot time .vs. ytotal.

Drishya Dinesh
Drishya Dinesh el 19 de Abr. de 2021
how to get a response with initial value of 10.
t2=400;
u_del=(0.0022*k*(s+0.06931)*(s^2+0.4852*s+0.1492))/((s+0.04833)*(s+0.004352)*(s^2+0.06012*s+0.01331));
figure
step(u_del,t2);
ylabel('Velocity,u (m/s)','fontsize',10);
title('Time Response');
grid

Categorías

Más información sobre Dynamic System Models en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by