0% found this document useful (0 votes)
23 views11 pages

RW Criterion Matlab Design Classnotes

This document contains Matlab code for analyzing the stability of a feedback control system using the Routh-Hurwitz criterion. The code obtains the characteristic polynomial of the closed loop system, plots the stability region in the parameter space, and simulates the step response for sample parameters.

Uploaded by

Albert Forero
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views11 pages

RW Criterion Matlab Design Classnotes

This document contains Matlab code for analyzing the stability of a feedback control system using the Routh-Hurwitz criterion. The code obtains the characteristic polynomial of the closed loop system, plots the stability region in the parameter space, and simulates the step response for sample parameters.

Uploaded by

Albert Forero
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

RW-Criterion Using Matlab RW

Monday, April 6, 2020 8:53 AM 1. CL TF

%polynomials
n=[1]; d=[1 1 2 23];
Sysg=tf(n,d)
CLG=feedback(Sysg,[1])
poles(CLG)

𝑠 + 2𝑠 + 4𝑠 + 𝑘
0 < K < 20

RW-Lab-LectureNotes Page 1
plot(p(:,8),'x')

RW-Lab-LectureNotes Page 2
RW-Lab-LectureNotes Page 3
%Obtaining the aK stability region
a=[.1:.01:3.0];K=[20:1:120];
x=0*K; y=0*K; %to initialize the plotting vector (correct length)
n=length(K);m=length(a);
For i=1:n
For j=1:m
q=[1, 8, 17,K(i)+10, K(i)*a(j)];%each polynomial for the change of a & K
p=roots(q);
If max(real(p))>0,x(i)=K(i); y(i)=a(j-1);%for a given value of K determine a instability
Break; end
End
End
Plot(x,y), grid on, xlabel('K'),ylabel('a')

RW-Lab-LectureNotes Page 4
%Using a ramp Response
%start K=70 and a=1
t=[0:.01:16];u=t; %unit ramp
ngc=[1 1]; dgc=[1 1]; %a value n
sysgc=tf(ngc,dgc) %tf k=70 a=1
ng=[70];dg=[1 7 10 0];
sysg=tf(ng,dg)
sysa=series(sysgc,sysg)
sysG=feedback(sysa,[1])
y=lsim(sysG,u,t),
Plot(t,y,t,u.'--'), grid on;
xlabel('Time (s)'), ylabel('y(t)')

RW-Lab-LectureNotes Page 5
RW-Lab-LectureNotes Page 6
RW-Lab-LectureNotes Page 7
RW-Lab-LectureNotes Page 8
RW-Lab-LectureNotes Page 9
RW-Lab-LectureNotes Page 10
RW-Lab-LectureNotes Page 11

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy