lsim not working with a single pole system
Show older comments
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

Answers (1)
Sulaymon Eshkabilov
on 13 May 2019
0 votes
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.
Categories
Find more on Matched Filter and Ambiguity Function 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!