DEN4123 MATLAB Assignment: System Stability using Hurwitz Matrix
VerifiedAdded on  2023/04/08
|15
|1847
|118
Practical Assignment
AI Summary
This MATLAB assignment focuses on determining the stability of closed-loop systems using the Hurwitz matrix method and Routh's stability criterion. The solution involves creating several MATLAB functions: `AllNonZero()`, `AllSameSign()`, `HurwitzMatrix()`, and `IsStable()`. The `AllNonZero()` and `AllSameSign()` functions validate the characteristic equation, while `HurwitzMatrix()` generates the Hurwitz matrix. The `IsStable()` function then assesses stability by checking for sign changes in the first column of the Hurwitz matrix. The assignment includes testing these functions with various polynomials and comparing the results with the `roots()` function to confirm the accuracy of the stability analysis. The functions successfully determine system stability based on the Routh-Hurwitz criterion, as validated by the roots of the characteristic equations.
Contribute Materials
Your contribution can guide someone’s learning journey. Share your
documents today.

MATLAB Assignment 1
MATLAB ASSIGNMENT
Name
Course Code
Professor
University
City and State
Date
MATLAB ASSIGNMENT
Name
Course Code
Professor
University
City and State
Date
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.

MATLAB Assignment 2
Task 2.1 and 3.2
Introduction
Solution of linear differential equation is important in any engineering applications
especially in the design phases. The Hurwitz matrix method is an important technique in the
solution of linear differential equation with constant coefficients. Using the Hurwitz matrix, we
are able to establish the stability of any closed-loop system. However, we must first find the
characteristic equation of the linear differential equation to be able to determine the Hurwitz
matrix. Routh’s stability criterion is used to answer the question of stability of a system without
necessarily solving for the roots of the characteristic equation. It only determines the number of
closed loop poles that fall in the RHS of the s-plane (Li, 2011).
The necessary conditions for the Hurwitz matrix method is that the solutions of the
characteristic equation must have real parts that are smaller than zero in a strict sense. Therefore,
all the coefficients of the characteristic equations must be non-zero and all positive or all
negative without any sign changes. The principal minors of the formed Hurwitz matrix H can be
used to deduce for stability in that all solutions of the characteristic equation have real parts that
are smaller than zero strictly if and only if the principal minors of the Hurwitz matrix are all
positive in a strict sense (Nise, 2015).
To determine the stability of the system using Routh-Hurwitz method, the polynomial
(characteristic equation) must be checked to have all non-zero elements, and that all coefficients
have the same sign. Using the HurwitzMatrix() and IsStable() functions created in MATLAB,
the stability of the system is then successfully determined by checking for sign changes in the
first column of Hurwitz matrix, H (McMahon, 2011).
Task 2.1 and 3.2
Introduction
Solution of linear differential equation is important in any engineering applications
especially in the design phases. The Hurwitz matrix method is an important technique in the
solution of linear differential equation with constant coefficients. Using the Hurwitz matrix, we
are able to establish the stability of any closed-loop system. However, we must first find the
characteristic equation of the linear differential equation to be able to determine the Hurwitz
matrix. Routh’s stability criterion is used to answer the question of stability of a system without
necessarily solving for the roots of the characteristic equation. It only determines the number of
closed loop poles that fall in the RHS of the s-plane (Li, 2011).
The necessary conditions for the Hurwitz matrix method is that the solutions of the
characteristic equation must have real parts that are smaller than zero in a strict sense. Therefore,
all the coefficients of the characteristic equations must be non-zero and all positive or all
negative without any sign changes. The principal minors of the formed Hurwitz matrix H can be
used to deduce for stability in that all solutions of the characteristic equation have real parts that
are smaller than zero strictly if and only if the principal minors of the Hurwitz matrix are all
positive in a strict sense (Nise, 2015).
To determine the stability of the system using Routh-Hurwitz method, the polynomial
(characteristic equation) must be checked to have all non-zero elements, and that all coefficients
have the same sign. Using the HurwitzMatrix() and IsStable() functions created in MATLAB,
the stability of the system is then successfully determined by checking for sign changes in the
first column of Hurwitz matrix, H (McMahon, 2011).

MATLAB Assignment 3
Methodology
MATLAB functions were used to obtain Hurwitz matrix and comment on the stability of
the closed-loop system given the characteristic equation. The characteristic equation must be a
row vector representing the polynomial (HAHN, 2019).
The AllNonZero() function was used to check that all the elements of the row vector
consumed were non-zeros. AllNonZero() returns a value 0 (False) whenever at least one zero
coefficient of the polynomial is detected. It returns 1(True) if all the coefficients of the
polynomial are non-zero elements.
The AllSameSign() function consumes the row vector polynomial of the characteristic
equation and check that all the elements of the row vector have the same sign. It returns a value
1(True) if all the coefficients of the polynomial have the same sign and 0(False) when the signs
of all the coefficients are not the same.
The HurwitzMatrix() function takes the row vector and returns the Hurwitz matrix
associated with the polynomial. For a valid output, the two conditional functions AllNonZero()
and AllSameSign() must be 1(True).
Finally to assess the stability of the closed-loop system using Routh-Hurwitz matrix
method, a function IsStable() was created. It checks that the conditions above are met and then
calculates the Hurwitz matrix. All the principal minors are checked to be positive in a while loop
and stops checking when a negative or zero principal minor is encountered. A comment on the
stability of the system is then made successfully (McMahon, 2011).
Methodology
MATLAB functions were used to obtain Hurwitz matrix and comment on the stability of
the closed-loop system given the characteristic equation. The characteristic equation must be a
row vector representing the polynomial (HAHN, 2019).
The AllNonZero() function was used to check that all the elements of the row vector
consumed were non-zeros. AllNonZero() returns a value 0 (False) whenever at least one zero
coefficient of the polynomial is detected. It returns 1(True) if all the coefficients of the
polynomial are non-zero elements.
The AllSameSign() function consumes the row vector polynomial of the characteristic
equation and check that all the elements of the row vector have the same sign. It returns a value
1(True) if all the coefficients of the polynomial have the same sign and 0(False) when the signs
of all the coefficients are not the same.
The HurwitzMatrix() function takes the row vector and returns the Hurwitz matrix
associated with the polynomial. For a valid output, the two conditional functions AllNonZero()
and AllSameSign() must be 1(True).
Finally to assess the stability of the closed-loop system using Routh-Hurwitz matrix
method, a function IsStable() was created. It checks that the conditions above are met and then
calculates the Hurwitz matrix. All the principal minors are checked to be positive in a while loop
and stops checking when a negative or zero principal minor is encountered. A comment on the
stability of the system is then made successfully (McMahon, 2011).

MATLAB Assignment 4
Task 2.1
The MATLAB functions
1. AllNonZero() function
function y = AllNonZero(x)
%ALLNONZERO returns a value 0(false) if at least one of the
coefficients of
%the polynomial is zero and a value 1(True) otherwise.
n = nnz(x);
if isrow(x)==0
disp('The entry made is not a row vector')
else if numel(x)==n
disp('1(True)')
else
disp('0(False)')
end
end
2. AllSameSign() function
function y = AllSameSign(x)
%ALLSAMESIGN takes a row vector representing a polynomial and
returns a
%value 0(false) if not all the coefficients have the same sign
and a value
%1(True) otherwise.
s=sign(x);m=(s<0);q=(s>0);
if isrow(x)==0
disp('The entry made is not a row vector')
else if nnz(m)==numel(s)||nnz(q)==numel(s)
disp('1(True)')
else
disp('0(False)')
end
end
3. HurwitzMatrix() function
function y = HurwitzMatrix(x)
%Hurwitz Matrix formulation
leng=length(x);
modulo=mod(leng,2);
if modulo==0
u=rand(1,(leng/2));
v=rand(1,(leng/2));
for i=1:(leng/2)
Task 2.1
The MATLAB functions
1. AllNonZero() function
function y = AllNonZero(x)
%ALLNONZERO returns a value 0(false) if at least one of the
coefficients of
%the polynomial is zero and a value 1(True) otherwise.
n = nnz(x);
if isrow(x)==0
disp('The entry made is not a row vector')
else if numel(x)==n
disp('1(True)')
else
disp('0(False)')
end
end
2. AllSameSign() function
function y = AllSameSign(x)
%ALLSAMESIGN takes a row vector representing a polynomial and
returns a
%value 0(false) if not all the coefficients have the same sign
and a value
%1(True) otherwise.
s=sign(x);m=(s<0);q=(s>0);
if isrow(x)==0
disp('The entry made is not a row vector')
else if nnz(m)==numel(s)||nnz(q)==numel(s)
disp('1(True)')
else
disp('0(False)')
end
end
3. HurwitzMatrix() function
function y = HurwitzMatrix(x)
%Hurwitz Matrix formulation
leng=length(x);
modulo=mod(leng,2);
if modulo==0
u=rand(1,(leng/2));
v=rand(1,(leng/2));
for i=1:(leng/2)
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.

MATLAB Assignment 5
u(i)=x((2*i)-1);
v(i)=x(2*i);
end
else
CharEq1=[x 0];
u=rand(1,((leng+1)/2));
v=[rand(1,((leng-1)/2)),0];
for i=1:((leng+1)/2)
u(i)=CharEq1((2*i)-1);
v(i)=CharEq1(2*i);
end
end
% Generation of the remaining rows of Hurwitz matrix
leng1=length(u);
s=zeros(leng,leng1);
s(1,:)=u;
s(2,:)=v;
for modulo=3:leng
for n=1:leng1-1
s(modulo,n)=-(1/s(modulo-1,1))*det([s((modulo-2),1)
s((modulo-2),(n+1));
s((modulo-1),1) s((modulo-1),(n+1))]);
end
end
format shortG
disp('Routh Hurwitz Matrix H is given by: ')
H=s
End
4. IsStable() function
%%Recalling functions AllNonZero and AllSameSign
AllNonZero(x);
AllSameSign(x);
%%Hurwitz Matrix formulation
leng=length(x);
modulo=mod(leng,2);
if modulo==0
u=rand(1,(leng/2));
v=rand(1,(leng/2));
for i=1:(leng/2)
u(i)=x((2*i)-1);
v(i)=x(2*i);
end
else
CharEq1=[x 0];
u=rand(1,((leng+1)/2));
v=[rand(1,((leng-1)/2)),0];
u(i)=x((2*i)-1);
v(i)=x(2*i);
end
else
CharEq1=[x 0];
u=rand(1,((leng+1)/2));
v=[rand(1,((leng-1)/2)),0];
for i=1:((leng+1)/2)
u(i)=CharEq1((2*i)-1);
v(i)=CharEq1(2*i);
end
end
% Generation of the remaining rows of Hurwitz matrix
leng1=length(u);
s=zeros(leng,leng1);
s(1,:)=u;
s(2,:)=v;
for modulo=3:leng
for n=1:leng1-1
s(modulo,n)=-(1/s(modulo-1,1))*det([s((modulo-2),1)
s((modulo-2),(n+1));
s((modulo-1),1) s((modulo-1),(n+1))]);
end
end
format shortG
disp('Routh Hurwitz Matrix H is given by: ')
H=s
End
4. IsStable() function
%%Recalling functions AllNonZero and AllSameSign
AllNonZero(x);
AllSameSign(x);
%%Hurwitz Matrix formulation
leng=length(x);
modulo=mod(leng,2);
if modulo==0
u=rand(1,(leng/2));
v=rand(1,(leng/2));
for i=1:(leng/2)
u(i)=x((2*i)-1);
v(i)=x(2*i);
end
else
CharEq1=[x 0];
u=rand(1,((leng+1)/2));
v=[rand(1,((leng-1)/2)),0];

MATLAB Assignment 6
for i=1:((leng+1)/2)
u(i)=CharEq1((2*i)-1);
v(i)=CharEq1(2*i);
end
end
% Generation of the remaining rows of Hurwitz matrix
leng1=length(u);
s=zeros(leng,leng1);
s(1,:)=u;
s(2,:)=v;
for modulo=3:leng
for n=1:leng1-1
s(modulo,n)=-(1/s(modulo-1,1))*det([s((modulo-2),1)
s((modulo-2),(n+1));
s((modulo-1),1) s((modulo-1),(n+1))]);
end
end
format shortG
disp('Routh Hurwitz Matrix H is given by: ')
H = s
%% Stabity check using the first column of the Hurwitz matrix
if s(:,1)>0
disp('Stable System: There was no sign change in the first
column of the Hurwitz Matrix')
else
disp('Unstable System: There was/were sign change(s) in the
first column of the Hurwitz Matrix');
end
end
for i=1:((leng+1)/2)
u(i)=CharEq1((2*i)-1);
v(i)=CharEq1(2*i);
end
end
% Generation of the remaining rows of Hurwitz matrix
leng1=length(u);
s=zeros(leng,leng1);
s(1,:)=u;
s(2,:)=v;
for modulo=3:leng
for n=1:leng1-1
s(modulo,n)=-(1/s(modulo-1,1))*det([s((modulo-2),1)
s((modulo-2),(n+1));
s((modulo-1),1) s((modulo-1),(n+1))]);
end
end
format shortG
disp('Routh Hurwitz Matrix H is given by: ')
H = s
%% Stabity check using the first column of the Hurwitz matrix
if s(:,1)>0
disp('Stable System: There was no sign change in the first
column of the Hurwitz Matrix')
else
disp('Unstable System: There was/were sign change(s) in the
first column of the Hurwitz Matrix');
end
end

MATLAB Assignment 7
Results (Outputs of MATLAB functions and roots ())
a) Testing using different polynomials of degree 3 to 10
i. P=[1 2 3]
>> AllNonZero(p)
1(True)
>> AllSameSign(p)
1(True)
>> HurwitzMatrix(p)
Routh Hurwitz Matrix H is given by:
H =
1 3
2 0
3 0
>> IsStable(p)
1(True)
1(True)
Routh Hurwitz Matrix H is given by:
H =
1 3
2 0
3 0
Stable System: There was no sign change in the first column of the Hurwitz Matrix
ii. P=[3 4 5 6]
>> IsStable(p)
1(True)
1(True)
Routh Hurwitz Matrix H is given by:
H =
3 5
Results (Outputs of MATLAB functions and roots ())
a) Testing using different polynomials of degree 3 to 10
i. P=[1 2 3]
>> AllNonZero(p)
1(True)
>> AllSameSign(p)
1(True)
>> HurwitzMatrix(p)
Routh Hurwitz Matrix H is given by:
H =
1 3
2 0
3 0
>> IsStable(p)
1(True)
1(True)
Routh Hurwitz Matrix H is given by:
H =
1 3
2 0
3 0
Stable System: There was no sign change in the first column of the Hurwitz Matrix
ii. P=[3 4 5 6]
>> IsStable(p)
1(True)
1(True)
Routh Hurwitz Matrix H is given by:
H =
3 5
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

MATLAB Assignment 8
4 6
0.5 0
6 0
Stable System: There was no sign change in the first column of the Hurwitz Matrix
iii. P=[7 8 9 10 11]
>> IsStable(p)
1(True)
1(True)
Routh Hurwitz Matrix H is given by:
H =
7 9 11
8 10 0
0.25 11 0
-342 0 0
11 0 0
Unstable System: There was/were sign change(s) in the first column of the Hurwitz Matrix
iv. P=[1 2 3 4 5 6]
>> IsStable(p)
1(True)
1(True)
Routh Hurwitz Matrix H is given by:
H =
1 3 5
2 4 6
1 2 0
0 6 0
Inf NaN 0
NaN NaN 0
Unstable System: There was/were sign change(s) in the first column of the Hurwitz Matrix
4 6
0.5 0
6 0
Stable System: There was no sign change in the first column of the Hurwitz Matrix
iii. P=[7 8 9 10 11]
>> IsStable(p)
1(True)
1(True)
Routh Hurwitz Matrix H is given by:
H =
7 9 11
8 10 0
0.25 11 0
-342 0 0
11 0 0
Unstable System: There was/were sign change(s) in the first column of the Hurwitz Matrix
iv. P=[1 2 3 4 5 6]
>> IsStable(p)
1(True)
1(True)
Routh Hurwitz Matrix H is given by:
H =
1 3 5
2 4 6
1 2 0
0 6 0
Inf NaN 0
NaN NaN 0
Unstable System: There was/were sign change(s) in the first column of the Hurwitz Matrix

MATLAB Assignment 9
v. P=[8 7 6 5 4 2 1]
>> IsStable(p)
1(True)
1(True)
Routh Hurwitz Matrix H is given by:
H =
8 6 4 1
7 5 2 0
0.28571 1.7143 1 0
-37 -22.5 0 0
1.5405 1 0 0
1.5175 0 0 0
1 0 0 0
Unstable System: There was/were sign change(s) in the first column of the Hurwitz Matrix
vi. P=[4 5 6 7 6 5 4 1]
>> IsStable(p)
1(True)
1(True)
Routh Hurwitz Matrix H is given by:
H =
4 6 6 4
5 7 5 1
0.4 2 3.2 0
-18 -35 1 0
1.2222 3.2222 0 0
12.455 1 0 0
3.1241 0 0 0
1 0 0 0
v. P=[8 7 6 5 4 2 1]
>> IsStable(p)
1(True)
1(True)
Routh Hurwitz Matrix H is given by:
H =
8 6 4 1
7 5 2 0
0.28571 1.7143 1 0
-37 -22.5 0 0
1.5405 1 0 0
1.5175 0 0 0
1 0 0 0
Unstable System: There was/were sign change(s) in the first column of the Hurwitz Matrix
vi. P=[4 5 6 7 6 5 4 1]
>> IsStable(p)
1(True)
1(True)
Routh Hurwitz Matrix H is given by:
H =
4 6 6 4
5 7 5 1
0.4 2 3.2 0
-18 -35 1 0
1.2222 3.2222 0 0
12.455 1 0 0
3.1241 0 0 0
1 0 0 0

MATLAB Assignment 10
Unstable System: There was/were sign change(s) in the first column of the Hurwitz Matrix
vii. P=[ 1 4 5 6 8 9 15 6 3]
>>IsStable(p)
1(True)
1(True)
Routh Hurwitz Matrix H is given by:
H =
1 5 8 15 3
4 6 9 6 0
3.5 5.75 13.5 3 0
-0.57143 -6.4286 2.5714 0 0
-33.625 29.25 3 0 0
-6.9257 2.5204 0 0 0
17.013 3 0 0 0
3.7417 0 0 0 0
3 0 0 0 0
Unstable System: There was/were sign change(s) in the first column of the Hurwitz Matrix
viii. P=[1 2 4 6 8 6 4 2 1 32 ]
>> IsStable(p)
1(True)
1(True)
Routh Hurwitz Matrix H is given by:
H =
1 4 8 4 1
2 6 6 2 32
1 5 3 -15 0
-4 0 32 32 0
5 11 -7 0 0
Unstable System: There was/were sign change(s) in the first column of the Hurwitz Matrix
vii. P=[ 1 4 5 6 8 9 15 6 3]
>>IsStable(p)
1(True)
1(True)
Routh Hurwitz Matrix H is given by:
H =
1 5 8 15 3
4 6 9 6 0
3.5 5.75 13.5 3 0
-0.57143 -6.4286 2.5714 0 0
-33.625 29.25 3 0 0
-6.9257 2.5204 0 0 0
17.013 3 0 0 0
3.7417 0 0 0 0
3 0 0 0 0
Unstable System: There was/were sign change(s) in the first column of the Hurwitz Matrix
viii. P=[1 2 4 6 8 6 4 2 1 32 ]
>> IsStable(p)
1(True)
1(True)
Routh Hurwitz Matrix H is given by:
H =
1 4 8 4 1
2 6 6 2 32
1 5 3 -15 0
-4 0 32 32 0
5 11 -7 0 0
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.

MATLAB Assignment 11
8.8 26.4 32 0 0
-4 -25.182 0 0 0
-29 32 0 0 0
-29.596 0 0 0 0
32 0 0 0 0
Unstable System: There was/were sign change(s) in the first column of the Hurwitz Matrix
b) Results using the function roots()
i. P=[1 2 3]
roots(p)
ans =
-1 + 1.4142i
-1 - 1.4142i
Comment: Both the roots are on the LHS of the s-plane hence the system is Stable
ii. p=[3 4 5 6]
>> roots(p)
ans =
-1.2653 + 0i
-0.034003 + 1.2568i
-0.034003 - 1.2568i
Comment: All the roots are on the LHS of the s-plane hence the system is stable.
iii. p=[7 8 9 10 11]
>> roots(p)
ans =
0.33637 + 1.0671i
0.33637 - 1.0671i
-0.9078 + 0.65659i
-0.9078 - 0.65659i
Comment: Two roots are on the RHS of the s-plane hence the system is unstable.
iv. p=[1 2 3 4 5 6]
>> roots(p)
ans =
8.8 26.4 32 0 0
-4 -25.182 0 0 0
-29 32 0 0 0
-29.596 0 0 0 0
32 0 0 0 0
Unstable System: There was/were sign change(s) in the first column of the Hurwitz Matrix
b) Results using the function roots()
i. P=[1 2 3]
roots(p)
ans =
-1 + 1.4142i
-1 - 1.4142i
Comment: Both the roots are on the LHS of the s-plane hence the system is Stable
ii. p=[3 4 5 6]
>> roots(p)
ans =
-1.2653 + 0i
-0.034003 + 1.2568i
-0.034003 - 1.2568i
Comment: All the roots are on the LHS of the s-plane hence the system is stable.
iii. p=[7 8 9 10 11]
>> roots(p)
ans =
0.33637 + 1.0671i
0.33637 - 1.0671i
-0.9078 + 0.65659i
-0.9078 - 0.65659i
Comment: Two roots are on the RHS of the s-plane hence the system is unstable.
iv. p=[1 2 3 4 5 6]
>> roots(p)
ans =

MATLAB Assignment 12
0.55169 + 1.2533i
0.55169 - 1.2533i
-1.4918 + 0i
-0.80579 + 1.2229i
-0.80579 - 1.2229i
Comment: Two roots are on the RHS of the s-plane hence the system is unstable.
v. p=[8 7 6 5 4 2 1]
>> roots(p)
ans =
0.37297 + 0.66978i
0.37297 - 0.66978i
-0.63793 + 0.34977i
-0.63793 - 0.34977i
-0.17254 + 0.60997i
-0.17254 - 0.60997i
Comment: Two roots are on the RHS of the s-plane hence the system is unstable.
vi. P=[4 5 6 7 6 5 4 1]
>> roots(p)
ans =
0.50504 + 0.82766i
0.50504 - 0.82766i
-0.13651 + 0.95044i
-0.13651 - 0.95044i
-0.80875 + 0.3556i
-0.80875 - 0.3556i
-0.36955 + 0i
Comment: Two roots are on the RHS of the s-plane hence the system is unstable.
vii. p=[ 1 4 5 6 8 9 15 6 3]
>> roots(p)
ans =
0.55169 + 1.2533i
0.55169 - 1.2533i
-1.4918 + 0i
-0.80579 + 1.2229i
-0.80579 - 1.2229i
Comment: Two roots are on the RHS of the s-plane hence the system is unstable.
v. p=[8 7 6 5 4 2 1]
>> roots(p)
ans =
0.37297 + 0.66978i
0.37297 - 0.66978i
-0.63793 + 0.34977i
-0.63793 - 0.34977i
-0.17254 + 0.60997i
-0.17254 - 0.60997i
Comment: Two roots are on the RHS of the s-plane hence the system is unstable.
vi. P=[4 5 6 7 6 5 4 1]
>> roots(p)
ans =
0.50504 + 0.82766i
0.50504 - 0.82766i
-0.13651 + 0.95044i
-0.13651 - 0.95044i
-0.80875 + 0.3556i
-0.80875 - 0.3556i
-0.36955 + 0i
Comment: Two roots are on the RHS of the s-plane hence the system is unstable.
vii. p=[ 1 4 5 6 8 9 15 6 3]
>> roots(p)
ans =

MATLAB Assignment 13
-2.5916 + 0i
-1.6972 + 0i
0.77668 + 0.9803i
0.77668 - 0.9803i
-0.43324 + 1.1999i
-0.43324 - 1.1999i
-0.199 + 0.47781i
-0.199 - 0.47781i
Comment: Two roots are on the RHS of the s-plane hence the system is unstable.
viii. p=[1 2 4 6 8 6 4 2 1 32 ]
>> roots(p)
ans =
-1.5253 + 0i
-1.2833 + 1.0349i
-1.2833 - 1.0349i
-0.38514 + 1.4964i
-0.38514 - 1.4964i
0.50985 + 1.5433i
0.50985 - 1.5433i
0.92123 + 0.61261i
0.92123 - 0.61261i
Comment: Four roots are on the RHS of the s-plane hence the system is unstable.
-2.5916 + 0i
-1.6972 + 0i
0.77668 + 0.9803i
0.77668 - 0.9803i
-0.43324 + 1.1999i
-0.43324 - 1.1999i
-0.199 + 0.47781i
-0.199 - 0.47781i
Comment: Two roots are on the RHS of the s-plane hence the system is unstable.
viii. p=[1 2 4 6 8 6 4 2 1 32 ]
>> roots(p)
ans =
-1.5253 + 0i
-1.2833 + 1.0349i
-1.2833 - 1.0349i
-0.38514 + 1.4964i
-0.38514 - 1.4964i
0.50985 + 1.5433i
0.50985 - 1.5433i
0.92123 + 0.61261i
0.92123 - 0.61261i
Comment: Four roots are on the RHS of the s-plane hence the system is unstable.
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

MATLAB Assignment 14
Conclusion
In summary, the AllNonZero, AllSameSign, HurwitzMatrix and IsStable functions were all
created and run successfully. The desired outputs of the stability of the system were achieved
using the IsStable function. The correctness of the outputs were confirmed by their strict
conformity with the outputs of the roots function.
Conclusion
In summary, the AllNonZero, AllSameSign, HurwitzMatrix and IsStable functions were all
created and run successfully. The desired outputs of the stability of the system were achieved
using the IsStable function. The correctness of the outputs were confirmed by their strict
conformity with the outputs of the roots function.

MATLAB Assignment 15
References
HAHN, B. (2019). Essential MATLAB for engineers and scientists. [Houston]: ELSEVIER
ACADEMIC Press.
Li, W. (2011). Practical criteria for positive-definite matrix, M-matrix and Hurwitz
matrix. Applied Mathematics and Computation, 185(1), pp.397-401.
NISE, N. (2015). Control systems engineering + wileyplus learning space. New York: JOHN
WILEY, p.216.
Musto, J., Howard, W. and Williams, R. (2009). Engineering computations. Boston: McGraw-
Hill Higher Education, pp.134-156.
References
HAHN, B. (2019). Essential MATLAB for engineers and scientists. [Houston]: ELSEVIER
ACADEMIC Press.
Li, W. (2011). Practical criteria for positive-definite matrix, M-matrix and Hurwitz
matrix. Applied Mathematics and Computation, 185(1), pp.397-401.
NISE, N. (2015). Control systems engineering + wileyplus learning space. New York: JOHN
WILEY, p.216.
Musto, J., Howard, W. and Williams, R. (2009). Engineering computations. Boston: McGraw-
Hill Higher Education, pp.134-156.
1 out of 15
Related Documents

Your All-in-One AI-Powered Toolkit for Academic Success.
 +13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
© 2024  |  Zucol Services PVT LTD  |  All rights reserved.