lsim giving NaN output for zero input

5 次查看(过去 30 天)
Hi,
I have a system with frequency and phase response as shown. The system is unstable with one pole on the right half of s-plane. If input is x=[0 0 0] output through lsim is NaN. How can this issue be solved ? Please help. Thank you.
Zeros=(-37436128.4318415 + 29344189.3569776i , -37436128.4318415 - 29344189.3569776i , -4398673.13805009 + 4099882.75353130i , -4398673.13805009 - 4099882.75353130i, -632969.549556042 + 0.00000000000000i)
Poles=( -1105299964.29975 + 0.00000000000000i, -102844523.541346 + 0.00000000000000i, -23575505.1105442 + 30425526.2059357i, -23575505.1105442 - 30425526.2059357i, 24762584.8470421 + 0.00000000000000i)
Gain k = -8.8777e+04

采纳的回答

Raj
Raj 2019-5-27
I am getting zero output for zero input if that's what you are looking for. Check how you are using lsim.
Zeros=[-37436128.4318415 + 29344189.3569776i , -37436128.4318415 - 29344189.3569776i , -4398673.13805009 + 4099882.75353130i , -4398673.13805009 - 4099882.75353130i, -632969.549556042 + 0.00000000000000i];
Poles=[ -1105299964.29975 + 0.00000000000000i, -102844523.541346 + 0.00000000000000i, -23575505.1105442 + 30425526.2059357i, -23575505.1105442 - 30425526.2059357i, 24762584.8470421 + 0.00000000000000i];
k = -8.8777e+04;
sys=zpk(Zeros,Poles,k) % Define your system
t=0:0.1:1; % lets say we run the simulation for 1 second
x=zeros(1,numel(t)); % all zero input till end of simulation
lsim(sys,x,t)
  5 个评论
Raj
Raj 2019-5-27
I have edited my previous answer a bit. Please take care of that.
You are right about point that filter is for discrete time systems. For details see
and

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Digital Filter Analysis 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by