lsim giving NaN output for zero input

6 Ansichten (letzte 30 Tage)
shubha t r
shubha t r am 27 Mai 2019
Kommentiert: shubha t r am 28 Mai 2019
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

Akzeptierte Antwort

Raj
Raj am 27 Mai 2019
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 Kommentare
Raj
Raj am 27 Mai 2019
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 am 28 Mai 2019
Thanks a lot:)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by