SlideShare a Scribd company logo
1 of 9
Download to read offline
ROOT LOCUS (SAMPLE ASSIGNMENT)
Our online Tutors are available 24*7 to provide Help with Root Locus Homework/Assignment or a
long term Graduate/Undergraduate Root Locus Project. Our Tutors being experienced and proficient
in Root Locus ensure to provide high quality Root Locus Homework Help. Upload your Root Locus
Assignment at ‘Submit Your Assignment’ button or email it to .
You can use our ‘Live Chat’ option to schedule an Online Tutoring session with our Root Locus
Tutors.
Routh Hurwitz Criterion
RouthHurwitzCriterion.m
% PROGRAM BY ASUTOSH MISHRA %
clc;
close all;
clear all;
y1 = input('Press "y" and "Enter" to Start The Program:: ','s');
disp(' ');
if (y1~='y')
errordlg('**Please Type "y" to continue Else The Program Will Terminate**','Caution');
y1 = input('Press "y" and Enter to Continue:: ','s');
end
if (y1~='y')
disp(' ');
disp('Program Terminates');
end
y2 = y1;
y3 = y1;
clc;
while (y1=='y') && (y2=='y')
if (y3~='y')
clc;
end
disp('~:~:~:~:~:~:~:~:~:~ROUTH HURWITZ CRITERION~:~:~:~:~:~:~:~:~:~');
disp(' ');
disp(' Stability Analysis Using Characteristic Equation ');
disp(' ');
if (y1=='y');
clear a b c D1 D2 G G1 G2 H i I k K L1 L2 m n P P1 P2 Q r R R1 R2 R3 Z Z1;
disp('~:~:Analysis Using Characteristic Equation:~:~');
disp(' ');
helpdlg(sprintf('--> The Charateristic Equation Is " a(0) * x^n + a(1) * x^(n-1) + ... + a(n)"
n--> a(0) , a(1) , a(2) ... are coefficients n--> If n is odd then Even Power Coefficients are
:: a(1) , a(2) , a(3) ... a(n-1) n--> If n is even then the Even Power Coefficients are :: a(0) ,
info@assignmentpedia.com
a(2) , ... a(n) n--> Give The values of all the Coefficients(Even if they are "0") n'),'Note On
Entering Input');
a = input('Even Power Coefficients in decreasing order of power of "x"(Ex. Within []) :: ');
b = input('Odd Power Coefficients in decreasing order of power of "x"(Ex. Within []) :: ');
disp(' ');
digits(5)
L1 = length(a);
L2 = length(b);
disp(['No. Of The Roots:: ',num2str(L1+L2-1)]);
disp(' ');
disp('~:~:~:~:~:~:~:~:~:~:~:~Routh Array~:~:~:~:~:~:~:~:~:~:~:~');
if (L2>L1)
P = 0;
P1 = 0;
P2 = 0;
Z = zeros(1,(L2-L1));
R = horzcat(a,Z);
Z1 = horzcat(a,Z);
R1 = b;
disp(vpa(b));
disp(vpa(Z1));
H = 1;
for n = 1:(L2+L1-2)
R2 = R;
for m = 1:(L2-1)
if (R2(1,1)~=0)
if (abs(R2(1,1))~=inf)
R(1,m) = (((R2(1,1).*R1(1,m+1))-(R1(1,1).*R2(1,m+1)))./(R2(1,1)));
else
R2(1,1) = 1;
R(1,m) = (((R2(1,1).*R1(1,m+1))-(R1(1,1).*R2(1,m+1)))./(R2(1,1)));
end
else
if (R2(1,1)==0)
R(1,m) = R1(1,m+1);
if ((R1(1,1)*R2(1,2))>R1(1,2))
R(1,1) = -(1./0);
P1 = P1+1;
else
R(1,1) = (1./0);
end
end
end
end
if (R(1,1)==0)&&(R(1,m)==0)
H = R(1,1);
for i = 1:L1+L2-n
if (rem(i,2)~=0)
G(1,i) = R2(1,(i+1)./2);
else
if (rem(i,2)==0)
G(1,i) = 0;
end
end
end
r = roots(G);
R3 = r';
for j = 1:length(R3)
if (real(R3(1,j))<0.0001)
P2 = P2+1;
end
end
k = polyder(G);
i = 2:4:(length(k)*2);
k(:,(i+2)./2) = [];
G1 = zeros(1,length(R2)-length(k));
R = horzcat(k,G1);
end
if (R(1,1)<0)
P = P+1;
end
if (R2(1,1)*R(1,1)<0)
P1 = P1+1;
end
disp(vpa(R));
R1 = R2;
R2 = R;
end
if (P>0)
disp(' ');
disp('~:~:~:~:~:~:~The System is Unstable~:~:~:~:~:~:~');
else
if (P==0) && (H==0)
disp(' ');
disp('~:~:~:~:~:~:~The System is Marginally Stable~:~:~:~:~:~:~');
else
if (P==0)
disp(' ');
disp('~:~:~:~:~:~:~The System is Stable~:~:~:~:~:~:~')
end
end
end
disp(' ');
disp(['Roots to the right of imaginary axis in Z-plane:: ',num2str(P1)]);
disp(['Roots to the left of imaginary axis in Z-plane:: ',num2str(L1+L2-P1-1-P2)]);
disp(['Roots on the imaginary axis in Z-plane:: ',num2str(P2)]);
else
if (L1>L2)
P = 0;
P1 = 0;
P2 = 0;
Z = zeros(1,(L1-L2));
R = horzcat(b,Z);
Z1 = horzcat(b,Z);
R1 = a;
disp(vpa(a));
disp(vpa(Z1));
H = 1;
for n = 1:(L1+L2-2)
R2 = R;
for m = 1:(L1-1)
if (R2(1,1)~=0)
if (abs(R2(1,1))~=inf)
R(1,m) = (((R2(1,1).*R1(1,m+1))-(R1(1,1).*R2(1,m+1)))./(R2(1,1)));
else
R2(1,1) = 1;
R(1,m) = (((R2(1,1).*R1(1,m+1))-(R1(1,1).*R2(1,m+1)))./(R2(1,1)));
end
else
if (R2(1,1)==0)
R(1,m) = R1(1,m+1);
if ((R1(1,1)*R2(1,2))>R1(1,2))
R(1,1) = -(1./0);
P1 = P1+1;
else
R(1,1) = (1./0);
end
end
end
end
if (R(1,1)==0)&&(R(1,m)==0)
H = R(1,1);
for i = 1:L1+L2-n
if (rem(i,2)~=0)
G(1,i) = R2(1,(i+1)./2);
else
if (rem(i,2)==0)
G(1,i) = 0;
end
end
end
r = roots(G);
R3 = (r');
for j = 1:length(R3)
if (real((R3(1,j)))<0.0001)
P2 = P2+1;
end
end
k = polyder(G);
i = 2:4:(length(k)*2);
k(:,(i+2)./2) = [];
G1 = zeros(1,length(R2)-length(k));
R = horzcat(k,G1);
end
if (R(1,1)<0)
P = P+1;
end
if (R2(1,1)*R(1,1)<0)
P1 = P1+1;
end
disp(vpa(R));
R1 = R2;
R2 = R;
end
if (P>0)
disp(' ');
disp('~:~:~:~:~:~:~The System is Unstable~:~:~:~:~:~:~');
else
if (P==0) && (H==0)
disp(' ');
disp('~:~:~:~:~:~:~The System is Marginally Stable~:~:~:~:~:~:~');
disp(' ');
disp(['The Roots Of The Auxiliary Eqn. are:: ',num2str(R3)]);
else
if (P==0)
disp(' ');
disp('~:~:~:~:~:~:~The System is Stable~:~:~:~:~:~:~')
end
end
end
disp(' ');
disp(['Roots to the right of imaginary axis in Z-plane:: ',num2str(P1)]);
disp(['Roots to the left of imaginary axis in Z-plane:: ',num2str(L1+L2-1-P1-P2)]);
disp(['Roots on the imaginary axis in Z-plane:: ',num2str(P2)]);
end
end
if (L1 == L2)
P = 0;
P1 = 0;
P2 = 0;
H = 1;
for h = 1:(L1-1)
Q(1,h) = (((a(1,1).*b(1,h+1))-(b(1,1).*a(1,h+1)))./(a(1,1)));
end
L3 = length(Q);
T = a;
if (Q(1,1)==0)&&(Q(1,h)==0)
for j = 1:(length(a)+length(b)-1)
if (rem(j,2)~=0)
Q(1,j) = T(1,(j+1)./2);
else
Q(1,j) = 0;
end
end
r = roots(Q);
R3 = r';
for j = 1:length(R3)
if (real(R3(1,j))<0.0001)
P2 = P2+1;
end
end
K = polyder(Q);
I = 2:4:(length(K)*2);
K(:,(I+2)./2) = [];
G2 = zeros(1,length(b)-length(K));
Q = horzcat(K,G2);
end
if (Q(1,1)<0)
P = P+1;
P1 = P1+1;
end
P3 = 0;
Z = zeros(1,(L2-L3));
R = horzcat(Q,Z);
Z1 = horzcat(Q,Z);
R1 = a;
Z0 = zeros(1,(length(Z1)-L1));
D1 = horzcat(a,Z0);
D2 = horzcat(b,Z0);
disp(vpa(D2));
disp(vpa(D1));
disp(vpa(Z1));
for n = 1:(L1+L2-3)
R2 = R;
for m = 1:(L1-1)
if (R2(1,1)~=0)
if (abs(R2(1,1))~=inf)
R(1,m) = (((R2(1,1).*R1(1,m+1))-(R1(1,1).*R2(1,m+1)))./(R2(1,1)));
else
R2(1,1) = 1;
R(1,m) = (((R2(1,1).*R1(1,m+1))-(R1(1,1).*R2(1,m+1)))./(R2(1,1)));
end
else
if (R2(1,1)==0)
R(1,m) = R1(1,m+1);
if ((R1(1,1)*R2(1,2))>R1(1,2))
R(1,1) = -(1./0);
P1 = P1+1;
else
R(1,1) = (1./0);
end
end
end
end
if (R(1,1)==0)&&(R(1,m)==0)
H = R(1,1);
for i = 1:L1+L2-n
if (rem(i,2)~=0)
G(1,i) = R2(1,(i+1)./2);
else
if (rem(i,2)==0)
G(1,i) = 0;
end
end
end
r = roots(G);
R3 = r';
for j = 1:length(R3)
if (real(R3(1,j))<0.0001)
P2 = P2+1;
end
end
k = polyder(G);
i = 2:4:(length(k)*2);
k(:,(i+2)./2) = [];
G1 = zeros(1,length(R2)-length(k));
R = horzcat(k,G1);
end
if (R(1,1)<0)
P = P+1;
end
if (R2(1,1)*R(1,1)<0)
P1 = P1+1;
end
disp(vpa(R))
R1 = R2;
R2 = R;
end
if (P>0)
disp(' ');
disp('~:~:~:~:~:~:~The System is Unstable~:~:~:~:~:~:~');
else
if (P==0) && (H==0)
disp(' ');
disp('~:~:~:~:~:~:~The System is Marginally Stable~:~:~:~:~:~:~');
disp(' ');
disp(['The Roots Of The Auxiliary Equations Are:: ',num2str(R3)])
else
if (P==0)
disp(' ');
disp('~:~:~:~:~:~:~The System is Stable~:~:~:~:~:~:~')
end
end
end
disp(' ');
disp(['Effective no. of Roots to the right of imaginary axis in Z-plane:: ',num2str(P1)]);
disp(['Effective no. of Roots to the left of imaginary axis in Z-plane:: ',num2str(L1+L2-
P1-1-P2)]);
disp(['Effective no. of Roots on the imaginary axis in Z-plane:: ',num2str(P2)]);
end
else
.....
end
disp(' ');
y2 = input('Do you want to Rerun Program again?(y/n):: ','s');
if (y2~='y')&&(y2~='n')
disp(' ');
disp('Please Type "y" or "n"');
disp(' ');
y2 = input('Do you want to Rerun Program again?(y/n):: ','s');
end
if (y2=='y')
y3 = input('Do you want to keep the previous analysis?(y/n):: ','s');
if (y3~='y')&&(y3~='n')
disp(' ');
disp('Please Type "y" or "n"');
disp(' ');
y3 = input('Do you want to keep the previous analysis?(y/n):: ','s');
end
end
end
if (y2=='n')
disp(' ');
disp('Program Terminated');
disp(' ');
disp('*****You can "Press Any Key" to clear screen and "End Program"*****');
pause
pause on;
clc;
end
visit us at www.assignmentpedia.com or email us at info@assignmentpedia.com or call us at +1 520 8371215

More Related Content

What's hot

小波变换程序
小波变换程序小波变换程序
小波变换程序
byron zhao
 
13200836 solution-manual-process-dynamics-and-control-donald-r-coughanowr-130...
13200836 solution-manual-process-dynamics-and-control-donald-r-coughanowr-130...13200836 solution-manual-process-dynamics-and-control-donald-r-coughanowr-130...
13200836 solution-manual-process-dynamics-and-control-donald-r-coughanowr-130...
nutkoon
 
Merge sort
Merge sortMerge sort
Merge sort
Kumar
 

What's hot (17)

Minimum phase, All pass and Magnitude Squared Function
Minimum phase, All pass and Magnitude Squared FunctionMinimum phase, All pass and Magnitude Squared Function
Minimum phase, All pass and Magnitude Squared Function
 
Phase Responce of Pole zero
Phase Responce of Pole zeroPhase Responce of Pole zero
Phase Responce of Pole zero
 
Filter Designing
Filter DesigningFilter Designing
Filter Designing
 
Merge sort
Merge sortMerge sort
Merge sort
 
Bubble and-merge-sort
Bubble and-merge-sortBubble and-merge-sort
Bubble and-merge-sort
 
Merge sort code in C explained
Merge sort code in C explained Merge sort code in C explained
Merge sort code in C explained
 
小波变换程序
小波变换程序小波变换程序
小波变换程序
 
Shortest path algorithms
Shortest path algorithmsShortest path algorithms
Shortest path algorithms
 
Z TRANSFORM PROPERTIES AND INVERSE Z TRANSFORM
Z TRANSFORM PROPERTIES AND INVERSE Z TRANSFORMZ TRANSFORM PROPERTIES AND INVERSE Z TRANSFORM
Z TRANSFORM PROPERTIES AND INVERSE Z TRANSFORM
 
SINGLE-SOURCE SHORTEST PATHS
SINGLE-SOURCE SHORTEST PATHS SINGLE-SOURCE SHORTEST PATHS
SINGLE-SOURCE SHORTEST PATHS
 
digital control Chapter 2 slide
digital control Chapter 2 slidedigital control Chapter 2 slide
digital control Chapter 2 slide
 
control system
control systemcontrol system
control system
 
inverse z transform
inverse z transforminverse z transform
inverse z transform
 
13200836 solution-manual-process-dynamics-and-control-donald-r-coughanowr-130...
13200836 solution-manual-process-dynamics-and-control-donald-r-coughanowr-130...13200836 solution-manual-process-dynamics-and-control-donald-r-coughanowr-130...
13200836 solution-manual-process-dynamics-and-control-donald-r-coughanowr-130...
 
Merge sort
Merge sortMerge sort
Merge sort
 
Inverse Laplace Transform
Inverse Laplace TransformInverse Laplace Transform
Inverse Laplace Transform
 
Laplace table
Laplace tableLaplace table
Laplace table
 

Similar to Help with root locus homework1

Fractional Calculus A Commutative Method on Real Analytic Functions
Fractional Calculus A Commutative Method on Real Analytic FunctionsFractional Calculus A Commutative Method on Real Analytic Functions
Fractional Calculus A Commutative Method on Real Analytic Functions
Matt Parker
 
6-Nfa & equivalence with RE.pdf
6-Nfa & equivalence with RE.pdf6-Nfa & equivalence with RE.pdf
6-Nfa & equivalence with RE.pdf
shruti533256
 

Similar to Help with root locus homework1 (20)

The Moore-Spiegel Oscillator
The Moore-Spiegel OscillatorThe Moore-Spiegel Oscillator
The Moore-Spiegel Oscillator
 
Scope Graphs: A fresh look at name binding in programming languages
Scope Graphs: A fresh look at name binding in programming languagesScope Graphs: A fresh look at name binding in programming languages
Scope Graphs: A fresh look at name binding in programming languages
 
Lecture5
Lecture5Lecture5
Lecture5
 
Struct examples
Struct examplesStruct examples
Struct examples
 
Graph Algebra
Graph AlgebraGraph Algebra
Graph Algebra
 
A Dimension Abstraction Approach to Vectorization in Matlab
A Dimension Abstraction Approach to Vectorization in MatlabA Dimension Abstraction Approach to Vectorization in Matlab
A Dimension Abstraction Approach to Vectorization in Matlab
 
Cgo2007 P3 3 Birkbeck
Cgo2007 P3 3 BirkbeckCgo2007 P3 3 Birkbeck
Cgo2007 P3 3 Birkbeck
 
Matlab dsp examples
Matlab dsp examplesMatlab dsp examples
Matlab dsp examples
 
A Course in Fuzzy Systems and Control Matlab Chapter Three
A Course in Fuzzy Systems and Control Matlab Chapter ThreeA Course in Fuzzy Systems and Control Matlab Chapter Three
A Course in Fuzzy Systems and Control Matlab Chapter Three
 
Fractional Calculus A Commutative Method on Real Analytic Functions
Fractional Calculus A Commutative Method on Real Analytic FunctionsFractional Calculus A Commutative Method on Real Analytic Functions
Fractional Calculus A Commutative Method on Real Analytic Functions
 
IRJET- On Certain Subclasses of Univalent Functions: An Application
IRJET- On Certain Subclasses of Univalent Functions: An ApplicationIRJET- On Certain Subclasses of Univalent Functions: An Application
IRJET- On Certain Subclasses of Univalent Functions: An Application
 
Asymptotic Analysis
Asymptotic  AnalysisAsymptotic  Analysis
Asymptotic Analysis
 
Scala as a Declarative Language
Scala as a Declarative LanguageScala as a Declarative Language
Scala as a Declarative Language
 
Introduction to R programming
Introduction to R programmingIntroduction to R programming
Introduction to R programming
 
Ch3
Ch3Ch3
Ch3
 
Sequences
SequencesSequences
Sequences
 
Csci101 lect04 advanced_selection
Csci101 lect04 advanced_selectionCsci101 lect04 advanced_selection
Csci101 lect04 advanced_selection
 
6-Nfa & equivalence with RE.pdf
6-Nfa & equivalence with RE.pdf6-Nfa & equivalence with RE.pdf
6-Nfa & equivalence with RE.pdf
 
Algorithm Design and Analysis - Practical File
Algorithm Design and Analysis - Practical FileAlgorithm Design and Analysis - Practical File
Algorithm Design and Analysis - Practical File
 
Programming in lua STRING AND ARRAY
Programming in lua STRING AND ARRAYProgramming in lua STRING AND ARRAY
Programming in lua STRING AND ARRAY
 

More from Assignmentpedia

Transmitter side components
Transmitter side componentsTransmitter side components
Transmitter side components
Assignmentpedia
 
Single object range detection
Single object range detectionSingle object range detection
Single object range detection
Assignmentpedia
 
Sequential radar tracking
Sequential radar trackingSequential radar tracking
Sequential radar tracking
Assignmentpedia
 
Radar cross section project
Radar cross section projectRadar cross section project
Radar cross section project
Assignmentpedia
 
Radar application project help
Radar application project helpRadar application project help
Radar application project help
Assignmentpedia
 
Parallel computing homework help
Parallel computing homework helpParallel computing homework help
Parallel computing homework help
Assignmentpedia
 
Network costing analysis
Network costing analysisNetwork costing analysis
Network costing analysis
Assignmentpedia
 
Matlab simulation project
Matlab simulation projectMatlab simulation project
Matlab simulation project
Assignmentpedia
 
Matlab programming project
Matlab programming projectMatlab programming project
Matlab programming project
Assignmentpedia
 
Image processing project using matlab
Image processing project using matlabImage processing project using matlab
Image processing project using matlab
Assignmentpedia
 
Theory of computation homework help
Theory of computation homework helpTheory of computation homework help
Theory of computation homework help
Assignmentpedia
 
Help With Digital Communication Project
Help With  Digital Communication ProjectHelp With  Digital Communication Project
Help With Digital Communication Project
Assignmentpedia
 

More from Assignmentpedia (20)

Transmitter side components
Transmitter side componentsTransmitter side components
Transmitter side components
 
Single object range detection
Single object range detectionSingle object range detection
Single object range detection
 
Sequential radar tracking
Sequential radar trackingSequential radar tracking
Sequential radar tracking
 
Resolution project
Resolution projectResolution project
Resolution project
 
Radar cross section project
Radar cross section projectRadar cross section project
Radar cross section project
 
Radar application project help
Radar application project helpRadar application project help
Radar application project help
 
Parallel computing homework help
Parallel computing homework helpParallel computing homework help
Parallel computing homework help
 
Network costing analysis
Network costing analysisNetwork costing analysis
Network costing analysis
 
Matlab simulation project
Matlab simulation projectMatlab simulation project
Matlab simulation project
 
Matlab programming project
Matlab programming projectMatlab programming project
Matlab programming project
 
Links design
Links designLinks design
Links design
 
Image processing project using matlab
Image processing project using matlabImage processing project using matlab
Image processing project using matlab
 
Transmitter subsystem
Transmitter subsystemTransmitter subsystem
Transmitter subsystem
 
Computer Networks Homework Help
Computer Networks Homework HelpComputer Networks Homework Help
Computer Networks Homework Help
 
Theory of computation homework help
Theory of computation homework helpTheory of computation homework help
Theory of computation homework help
 
Econometrics Homework Help
Econometrics Homework HelpEconometrics Homework Help
Econometrics Homework Help
 
Video Codec
Video CodecVideo Codec
Video Codec
 
Radar Spectral Analysis
Radar Spectral AnalysisRadar Spectral Analysis
Radar Spectral Analysis
 
Pi Controller
Pi ControllerPi Controller
Pi Controller
 
Help With Digital Communication Project
Help With  Digital Communication ProjectHelp With  Digital Communication Project
Help With Digital Communication Project
 

Recently uploaded

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 

Recently uploaded (20)

Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 

Help with root locus homework1

  • 1. ROOT LOCUS (SAMPLE ASSIGNMENT) Our online Tutors are available 24*7 to provide Help with Root Locus Homework/Assignment or a long term Graduate/Undergraduate Root Locus Project. Our Tutors being experienced and proficient in Root Locus ensure to provide high quality Root Locus Homework Help. Upload your Root Locus Assignment at ‘Submit Your Assignment’ button or email it to . You can use our ‘Live Chat’ option to schedule an Online Tutoring session with our Root Locus Tutors. Routh Hurwitz Criterion RouthHurwitzCriterion.m % PROGRAM BY ASUTOSH MISHRA % clc; close all; clear all; y1 = input('Press "y" and "Enter" to Start The Program:: ','s'); disp(' '); if (y1~='y') errordlg('**Please Type "y" to continue Else The Program Will Terminate**','Caution'); y1 = input('Press "y" and Enter to Continue:: ','s'); end if (y1~='y') disp(' '); disp('Program Terminates'); end y2 = y1; y3 = y1; clc; while (y1=='y') && (y2=='y') if (y3~='y') clc; end disp('~:~:~:~:~:~:~:~:~:~ROUTH HURWITZ CRITERION~:~:~:~:~:~:~:~:~:~'); disp(' '); disp(' Stability Analysis Using Characteristic Equation '); disp(' '); if (y1=='y'); clear a b c D1 D2 G G1 G2 H i I k K L1 L2 m n P P1 P2 Q r R R1 R2 R3 Z Z1; disp('~:~:Analysis Using Characteristic Equation:~:~'); disp(' '); helpdlg(sprintf('--> The Charateristic Equation Is " a(0) * x^n + a(1) * x^(n-1) + ... + a(n)" n--> a(0) , a(1) , a(2) ... are coefficients n--> If n is odd then Even Power Coefficients are :: a(1) , a(2) , a(3) ... a(n-1) n--> If n is even then the Even Power Coefficients are :: a(0) , info@assignmentpedia.com
  • 2. a(2) , ... a(n) n--> Give The values of all the Coefficients(Even if they are "0") n'),'Note On Entering Input'); a = input('Even Power Coefficients in decreasing order of power of "x"(Ex. Within []) :: '); b = input('Odd Power Coefficients in decreasing order of power of "x"(Ex. Within []) :: '); disp(' '); digits(5) L1 = length(a); L2 = length(b); disp(['No. Of The Roots:: ',num2str(L1+L2-1)]); disp(' '); disp('~:~:~:~:~:~:~:~:~:~:~:~Routh Array~:~:~:~:~:~:~:~:~:~:~:~'); if (L2>L1) P = 0; P1 = 0; P2 = 0; Z = zeros(1,(L2-L1)); R = horzcat(a,Z); Z1 = horzcat(a,Z); R1 = b; disp(vpa(b)); disp(vpa(Z1)); H = 1; for n = 1:(L2+L1-2) R2 = R; for m = 1:(L2-1) if (R2(1,1)~=0) if (abs(R2(1,1))~=inf) R(1,m) = (((R2(1,1).*R1(1,m+1))-(R1(1,1).*R2(1,m+1)))./(R2(1,1))); else R2(1,1) = 1; R(1,m) = (((R2(1,1).*R1(1,m+1))-(R1(1,1).*R2(1,m+1)))./(R2(1,1))); end else if (R2(1,1)==0) R(1,m) = R1(1,m+1); if ((R1(1,1)*R2(1,2))>R1(1,2)) R(1,1) = -(1./0); P1 = P1+1; else R(1,1) = (1./0); end end end end if (R(1,1)==0)&&(R(1,m)==0)
  • 3. H = R(1,1); for i = 1:L1+L2-n if (rem(i,2)~=0) G(1,i) = R2(1,(i+1)./2); else if (rem(i,2)==0) G(1,i) = 0; end end end r = roots(G); R3 = r'; for j = 1:length(R3) if (real(R3(1,j))<0.0001) P2 = P2+1; end end k = polyder(G); i = 2:4:(length(k)*2); k(:,(i+2)./2) = []; G1 = zeros(1,length(R2)-length(k)); R = horzcat(k,G1); end if (R(1,1)<0) P = P+1; end if (R2(1,1)*R(1,1)<0) P1 = P1+1; end disp(vpa(R)); R1 = R2; R2 = R; end if (P>0) disp(' '); disp('~:~:~:~:~:~:~The System is Unstable~:~:~:~:~:~:~'); else if (P==0) && (H==0) disp(' '); disp('~:~:~:~:~:~:~The System is Marginally Stable~:~:~:~:~:~:~'); else if (P==0) disp(' '); disp('~:~:~:~:~:~:~The System is Stable~:~:~:~:~:~:~') end
  • 4. end end disp(' '); disp(['Roots to the right of imaginary axis in Z-plane:: ',num2str(P1)]); disp(['Roots to the left of imaginary axis in Z-plane:: ',num2str(L1+L2-P1-1-P2)]); disp(['Roots on the imaginary axis in Z-plane:: ',num2str(P2)]); else if (L1>L2) P = 0; P1 = 0; P2 = 0; Z = zeros(1,(L1-L2)); R = horzcat(b,Z); Z1 = horzcat(b,Z); R1 = a; disp(vpa(a)); disp(vpa(Z1)); H = 1; for n = 1:(L1+L2-2) R2 = R; for m = 1:(L1-1) if (R2(1,1)~=0) if (abs(R2(1,1))~=inf) R(1,m) = (((R2(1,1).*R1(1,m+1))-(R1(1,1).*R2(1,m+1)))./(R2(1,1))); else R2(1,1) = 1; R(1,m) = (((R2(1,1).*R1(1,m+1))-(R1(1,1).*R2(1,m+1)))./(R2(1,1))); end else if (R2(1,1)==0) R(1,m) = R1(1,m+1); if ((R1(1,1)*R2(1,2))>R1(1,2)) R(1,1) = -(1./0); P1 = P1+1; else R(1,1) = (1./0); end end end end if (R(1,1)==0)&&(R(1,m)==0) H = R(1,1); for i = 1:L1+L2-n if (rem(i,2)~=0) G(1,i) = R2(1,(i+1)./2);
  • 5. else if (rem(i,2)==0) G(1,i) = 0; end end end r = roots(G); R3 = (r'); for j = 1:length(R3) if (real((R3(1,j)))<0.0001) P2 = P2+1; end end k = polyder(G); i = 2:4:(length(k)*2); k(:,(i+2)./2) = []; G1 = zeros(1,length(R2)-length(k)); R = horzcat(k,G1); end if (R(1,1)<0) P = P+1; end if (R2(1,1)*R(1,1)<0) P1 = P1+1; end disp(vpa(R)); R1 = R2; R2 = R; end if (P>0) disp(' '); disp('~:~:~:~:~:~:~The System is Unstable~:~:~:~:~:~:~'); else if (P==0) && (H==0) disp(' '); disp('~:~:~:~:~:~:~The System is Marginally Stable~:~:~:~:~:~:~'); disp(' '); disp(['The Roots Of The Auxiliary Eqn. are:: ',num2str(R3)]); else if (P==0) disp(' '); disp('~:~:~:~:~:~:~The System is Stable~:~:~:~:~:~:~') end end end
  • 6. disp(' '); disp(['Roots to the right of imaginary axis in Z-plane:: ',num2str(P1)]); disp(['Roots to the left of imaginary axis in Z-plane:: ',num2str(L1+L2-1-P1-P2)]); disp(['Roots on the imaginary axis in Z-plane:: ',num2str(P2)]); end end if (L1 == L2) P = 0; P1 = 0; P2 = 0; H = 1; for h = 1:(L1-1) Q(1,h) = (((a(1,1).*b(1,h+1))-(b(1,1).*a(1,h+1)))./(a(1,1))); end L3 = length(Q); T = a; if (Q(1,1)==0)&&(Q(1,h)==0) for j = 1:(length(a)+length(b)-1) if (rem(j,2)~=0) Q(1,j) = T(1,(j+1)./2); else Q(1,j) = 0; end end r = roots(Q); R3 = r'; for j = 1:length(R3) if (real(R3(1,j))<0.0001) P2 = P2+1; end end K = polyder(Q); I = 2:4:(length(K)*2); K(:,(I+2)./2) = []; G2 = zeros(1,length(b)-length(K)); Q = horzcat(K,G2); end if (Q(1,1)<0) P = P+1; P1 = P1+1; end P3 = 0; Z = zeros(1,(L2-L3)); R = horzcat(Q,Z); Z1 = horzcat(Q,Z);
  • 7. R1 = a; Z0 = zeros(1,(length(Z1)-L1)); D1 = horzcat(a,Z0); D2 = horzcat(b,Z0); disp(vpa(D2)); disp(vpa(D1)); disp(vpa(Z1)); for n = 1:(L1+L2-3) R2 = R; for m = 1:(L1-1) if (R2(1,1)~=0) if (abs(R2(1,1))~=inf) R(1,m) = (((R2(1,1).*R1(1,m+1))-(R1(1,1).*R2(1,m+1)))./(R2(1,1))); else R2(1,1) = 1; R(1,m) = (((R2(1,1).*R1(1,m+1))-(R1(1,1).*R2(1,m+1)))./(R2(1,1))); end else if (R2(1,1)==0) R(1,m) = R1(1,m+1); if ((R1(1,1)*R2(1,2))>R1(1,2)) R(1,1) = -(1./0); P1 = P1+1; else R(1,1) = (1./0); end end end end if (R(1,1)==0)&&(R(1,m)==0) H = R(1,1); for i = 1:L1+L2-n if (rem(i,2)~=0) G(1,i) = R2(1,(i+1)./2); else if (rem(i,2)==0) G(1,i) = 0; end end end r = roots(G); R3 = r'; for j = 1:length(R3) if (real(R3(1,j))<0.0001) P2 = P2+1;
  • 8. end end k = polyder(G); i = 2:4:(length(k)*2); k(:,(i+2)./2) = []; G1 = zeros(1,length(R2)-length(k)); R = horzcat(k,G1); end if (R(1,1)<0) P = P+1; end if (R2(1,1)*R(1,1)<0) P1 = P1+1; end disp(vpa(R)) R1 = R2; R2 = R; end if (P>0) disp(' '); disp('~:~:~:~:~:~:~The System is Unstable~:~:~:~:~:~:~'); else if (P==0) && (H==0) disp(' '); disp('~:~:~:~:~:~:~The System is Marginally Stable~:~:~:~:~:~:~'); disp(' '); disp(['The Roots Of The Auxiliary Equations Are:: ',num2str(R3)]) else if (P==0) disp(' '); disp('~:~:~:~:~:~:~The System is Stable~:~:~:~:~:~:~') end end end disp(' '); disp(['Effective no. of Roots to the right of imaginary axis in Z-plane:: ',num2str(P1)]); disp(['Effective no. of Roots to the left of imaginary axis in Z-plane:: ',num2str(L1+L2- P1-1-P2)]); disp(['Effective no. of Roots on the imaginary axis in Z-plane:: ',num2str(P2)]); end else ..... end disp(' '); y2 = input('Do you want to Rerun Program again?(y/n):: ','s');
  • 9. if (y2~='y')&&(y2~='n') disp(' '); disp('Please Type "y" or "n"'); disp(' '); y2 = input('Do you want to Rerun Program again?(y/n):: ','s'); end if (y2=='y') y3 = input('Do you want to keep the previous analysis?(y/n):: ','s'); if (y3~='y')&&(y3~='n') disp(' '); disp('Please Type "y" or "n"'); disp(' '); y3 = input('Do you want to keep the previous analysis?(y/n):: ','s'); end end end if (y2=='n') disp(' '); disp('Program Terminated'); disp(' '); disp('*****You can "Press Any Key" to clear screen and "End Program"*****'); pause pause on; clc; end visit us at www.assignmentpedia.com or email us at info@assignmentpedia.com or call us at +1 520 8371215