lsim giving NaN output for zero input

조회 수: 5 (최근 30일)
shubha t r
shubha t r 2019년 5월 27일
댓글: shubha t r 2019년 5월 28일
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
shubha t r
shubha t r 2019년 5월 28일
Thanks a lot:)

댓글을 달려면 로그인하십시오.

추가 답변 (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