lsim not working with a single pole system
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Miguel Perez Andrade
el 12 de Mayo de 2019
Respondida: Sulaymon Eshkabilov
el 13 de Mayo de 2019
I'm trying to simualte the response of a first oreder low pass system, but I'm getting a strange result so I tried to simulate first a sine input. The result does not appear to be another sine with modified amplitude and phase, so it looks like the output of a non-linear system, so I must be doing something wrong. Here is the code
% system definition
p = -200e3;
z = [];
sys = zpk(z, p, prod(abs(p)));
% input definition
f = 300e3;
x = linspace(0, 2*pi/f, 100e3);
y = sin(f*x);
% simualte
lsim(sys,y,x);
I'm trying to define a low-pass system with a cutoff frequency of 200 kHz. This is the output I'm getting

0 comentarios
Respuestas (1)
Sulaymon Eshkabilov
el 13 de Mayo de 2019
Hi,
Everything you have done is ok except for one small (but crucial point):
y = sin(f*x); has to be y = sin(2*pi*f*x);
Then you will get a nice and neat response that can be also verified in Simulink.
Good luck.
0 comentarios
Ver también
Categorías
Más información sobre Digital Filter Analysis 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!