# To determine the stability of a LTI system with a two-sided impulse response has the difference equation model

조회 수: 4(최근 30일)
William 2021년 9월 21일
I am trying to determine the stability of the following system:. The following is my code:
My question is: In my code, I can only enter a single value for λ. Is there a way to express λ as a vector which contains multiple values and thus, I can prove the stability of the system with different λ simultaneously?
function stable(k)
b = [0 0 k 0 0];
a = [1 -4 k+6 -4 1];
zplane(b,a);
p = roots(a);
pm = roundn(abs(p),-4);
if max(pm)>1 %double-sided
disp('System is stable');
else
disp('System is not stable');
end
##### 댓글 수: 2표시숨기기 이전 댓글 수: 1
Paul 2021년 9월 21일
What is meant by "two-sided impulse response"?

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

### 답변(1개)

Harikrishnan Balachandran Nair 2021년 9월 24일
Hi,
I understand that you are trying to check the stability of the given system for different values of lamda.
You can obtain the same by having an input vector containing the values of lamda. You may use a for loop to call the function you have written , for each value in the input vector lamda.
If you do not want to have a function call for each value in the input vector, you can vectorize the whole function. The following code might help for the given system, assuming that the number of lamda values used are 6.
l=[1,2,3,4,5,6]'; %l is containing the lamda values and the number of lamda values used here are 6.
b=zeros(6,5);
b(:,3)=-1*l;
a=[1,-4,6,-4,1];
a=repmat(a,6,1);
a(:,3)=a(:,3)+l(:);
for i = 1:6
p(i,:)=roots(a(i,:));
p(i,:)=roundn(abs(p(i,:)),-4);
end
output=max(p,[],2)>1;
Alternatively, you can directly use the 'isstable' function in matlab to get the stability of all transfer functions simultaneously , by passing a model array to the function. You may refer to the documentation to get a better idea on it.

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

R2020b

### Community Treasure Hunt

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

Start Hunting!

Translated by