matlab

Attribution Non-Commercial (BY-NC)

4 views

matlab

Attribution Non-Commercial (BY-NC)

- Process Control Assessment on Foundation
- Feedback Amplifier 1
- Assessment of Aircraft Flight Controllers Using Nonlinear Robustness Analysis Techniques and Simulation
- docslide.net_advanced-electrical-engineering-lab-manual.pdf
- New Text Documentvm,
- matlab lab work
- TM-2007-215007
- E15
- pb400
- Single Input Single Output System
- akagi23
- A New Coordinated Control Strategy for Boiler-Turbine System of Coal-Fired Power Plant
- Jadual Waktu Jke Jan2011
- NASA Marshall
- PID Para Procesos Inestables
- Control_System_EEE-4122_Lecture-02.pptx
- 20180613054811942.pdf
- Ejemplo de Revista
- Frequency Response and Nyquist Diagrams2
- PID Presentaion

You are on page 1of 9

31 Homework 1 Solution

Prof. S. R. Hall Issued: September 8, 2006 Due: September 15, 2001

Problem 1: Plot the root locus diagram for positive values of K for the solutions of the equation

s3 + (5 + K )s2 + (6 + K )s + 2K = 0

s3 + 5s2 + 6s + K s2 + s + 2 = 0

This equation is essentially the characteristic equation for a system with open-loop zeros at the roots of s2 + s + 2 = 0 and open-loop poles at the roots of s3 + 5s2 + 6s = 0. So the zeros are at The poles are at

1 7 0.5 1.3229j z1,2 = j 2 2 p1 = 0 p2 = 3 p3 = 2

The locus for positive K must include the region on the real line 2 < s < 0 and s < 3, since these regions are to the left of an odd number of poles and zeros. There is 3 2 = 1 asymptote, which is that s as K . The Matlab root locus may be obtained by the commands

>> >> >> >> >> >> >> >> >> >> >> >> num = [1 1 2]; den = [1 5 6 0]; rlocus(num,den) title() h = xlabel('Real Axis'); set(h,'fontsize',14); h = ylabel('Imaginary Axis'); set(h,'fontsize',14); h = gca; set(h,'fontsize',14); print -depsc 'figure1.eps'

The rst three commands generate the root locus. The last six commands clean up the plot a bit and produce a plot le for this solution. The Matlab plot is shown below: 1

1.5

Imaginary Axis

0.5

0.5

1.5 5

3 Real Axis

Problem 2: The open loop transfer function of a closed-loop control system with unity negative gain feedback is

G(s) = K s(s + 3)(s2 + 6s + 64)

Plot the root locus for this system, and then determine the closed-loop gain that gives an eective damping ratio of 0.707.

Solution: The root locus may be obtained by the commands:

> > den = conv([1 3 0],[1 6 64]) den = 1 9 82 192 0 > > num = [0 0 0 0 1]; >> > > % set the range of gains fine enough to figure out the right gain > > % to get 0.707 damping >> > > k=logspace(-5,5,10000); >> > > % Do the root locus >> > > rlocus(num,den,k)

At this point, I used the cursor tool in the plot window to nd that K = 232 gives the desired damping ratio. Then I sent the plot to a le:

> > title()

h = gca; set(h,'fontsize',14); h = xlabel('Real Axis'); set(h,'fontsize',14); h = ylabel('Imaginary Axis'); set(h,'fontsize',14); print -depsc 'figure2.eps'

15

10

System: sys Gain: 232 Pole: 1.38 + 1.38i Damping: 0.708 Overshoot (%): 4.28 Frequency (rad/sec): 1.95

Imaginary Axis

0

System: sys Gain: 232 Pole: 3.12 7.16i Damping: 0.4 Overshoot (%): 25.4 Frequency (rad/sec): 7.81

10

15 15

10

5 Real Axis

10

Does the closed-loop system have the desired behavior, that is, does it behave like a pure second order system with damping ratio = 0.0707? To see, form the closed-loop transfer function

HCL (s) = G(s) 1 + G(s)

and plot its step response, y1 (t), compared to the step response y2 (t) of the ideal system

H0.707 =

2 0 2 s2 + 20 s + 0

>> >> >> >> >> >> >> % Gain that gives 0.707 damping to dominant poles K = 232; % Time vector for plot t = 0:.01:10;

>> > > % Closed-loop numerator >> > > numcl = K*num numcl = 0 0 0 0 232 >> > > % Closed-loop denominator >> > > dencl = den +K*num; dencl = 1 9 82 192 232 >> > > % Closed-loop step response >> > > y1 = step(numcl,dencl,t); >> > > % Ideal second order response >> > > zeta = 0.707; > > w0 = 1.95; > > num2 = [0 0 w0^2]; > > den2 = [1 2*zeta*w0 w0^2]; > > y2 = step(num2,den2,t); >> > > % Do the plot >> > > plot(t,y1,'b',t,y2,'r') > > h = gca; > > set(h,'fontsize',14); > > h = xlabel('Time, {\it t}, (s)') > > set(h,'fontsize',14); > > h = ylabel('Step Response') > > set(h,'fontsize',14); >> > > print -depsc 'figure3.eps'

1.4

1.2

1 Step Response

0.8

0.6

0.4

0.2

0 0

4 Time, t, (s)

10

Note that y1 and y2 are quite close. The major dierence is that the step response of the closed-loop system is atter near t = 0, which is a result of the fourth order dynamics of the system

Problem 3: A unity gain negative feedback system has an open-loop transfer function given by

G(s) = K (1 + 5s) s(1 + 10s)(1 + s)2

Draw a Bode diagram for this system and determine the loop gain K required for a phase margin of 20 deg. What is the gain margin? A lag compensator

Gc (s) = 1 + 10s 1 + 50s

is added to this system. Use Bode diagrams to nd the reduction in steady state error following a ramp change to the reference input, assuming that the 20 deg phase margin is maintained.

Solution: Using Matlab, plot the Bode plot:

> > num = [0 0 0 5 1]; > > den = conv([10 1 0],[1 2 1]) den = 10 21 12 1 0 > > bode(num,den) > > w = logspace(-3,2,3000); > > bode(num,den,w)

Bode Diagram

50 0

System: sys Frequency (rad/sec): 0.59 Magnitude (dB): 3.68 System: sys Frequency (rad/sec): 0.897 Magnitude (dB): 10

Magnitude (dB)

50 100 90 135

Phase (deg)

10

10

10

10

10

Frequency (rad/sec)

Using the cursor tool, I found that the phase is -160 deg (20 deg phase margin) at = 0.59. Find the magnitude at that frequency:

> > [mag,phase] = bode(num,den,0.59) mag = 0.6544 phase = -160.1873

K= 1 = 1.528 0.6544

Next, use the cursor tool to nd the frequency at which the phase is -180 deg, to nd the gain margin. The phase is -180 deg at = 0.897, at which frequency the gain of the original system is 0.3145:

> > [mag,phase] = bode(num,den,0.897) mag = 0.3145 phase = -179.9924

So the gain of the system with the new gain K included at = 0.897 r/s is 1.528 0.3145 = 0.481. The gain margin is the reciprocal of this number, so that Gain margin = 2.08 6

Gc (s) = 1 + 10s 1 + 50s

The new loop transfer function numerator and denominator (again assuming K = 1) is found in Matlab via

> > num2 = conv(num,[10 1]) num2 = 0 0 0 50 15 1 > > den2 = conv(den,[50 1]) den2 = 500 1060 621 62 1 0

Bode Diagram 100

50 Magnitude (dB)

System: sys Frequency (rad/sec): 0.453 Magnitude (dB): 14

50

100

150 90

System: sys Frequency (rad/sec): 0.456 Phase (deg): 160

180

225

270 3 10

10

10 10 Frequency (rad/sec)

10

10

Plotting the Bode plot and using the cursor tool yields a crossover frequency of c = 453 r/s to achieve a phase margin of 20 deg. At this frequency, the magnitude of the transfer function with gain K = 1 is 0.2, so we need K = 5 to get the desired crossover frequency. For the original control system with K = 1.528 and no lag compensator, the velocity constant is

Kv = lim sG(s) = K = 1.528

s0

For the modied system with K = 5 and the lag compensator, the velocity constant is

Kv = lim sG(s)Gc (s) = K = 5

s0

Therefore, the steady-state error to a unit ramp is reduced from 1/Kv = 0.654 for the original control system, to 1/Kv = 0.2 for the modied control system, a reduction a factor of 3.27. 7

Problem 4: Plot the Nyquist diagram for the plant with the unstable open-loop transfer function

G(s) = K (s + 0.4) s(s2 + 2s 1)

Determine the range of K for which the closed-loop system with unity negative gain feedback which incorporated this plant would be stable.

Solution: This system has one unstable pole (at s = 0.4142), an we need therefore one counter clockwise encirclement of the point 1/K for stability. Use Matlab to plot the Nyquist diagram:

>> >> >> >> >> >> >> >> >> >> >> >> >> >> >> num = [1 0.4]; den = [1 2 -1 0]; nyquist(num,den,.1:.01:10);axis equal title() h = xlabel('Real Axis'); set(h,'fontsize',14); h = xlabel('Imaginary Axis'); set(h,'fontsize',14); h = gca; set(h,'fontsize',14); h = xlabel('Real Axis'); set(h,'fontsize',14); h = ylabel('Imaginary Axis'); set(h,'fontsize',14); print -depsc 'figure6.eps'

4 3 2 Imaginary Axis 1 0 1 2 3 4 6

2 Real Axis

The closure of the Nyquist plot is a bit tricky. Since the Nyquist contour in the s-plane must detour around the pole at s = 0 in a counterclockwise direction, the Nyquist plot above closes in a clockwise direction. So to get one CCW encirclement, 1/K must be inside the small loop near the origin. Blowing up the plot shows that the real line inside the loop is

0.8 < 1/K < 0

1 1 = 1.25 0.8 Indeed, the characteristic equation for K = 1.25 is K> (s) = (s3 + 2s2 s) + 1.25 (s + 0.4) = s3 + 2s2 + 0.25s + 0.5 = 0

s = 2, s = 0.5j

That is, for K = 1.25, the closed-loop system is at the boundary of stability, with oscillatory poles on the j -axis, as is predicted by Nyquist.

- Process Control Assessment on FoundationUploaded byaugur886
- Feedback Amplifier 1Uploaded byBharavi K S
- Assessment of Aircraft Flight Controllers Using Nonlinear Robustness Analysis Techniques and SimulationUploaded byVincent Morio
- docslide.net_advanced-electrical-engineering-lab-manual.pdfUploaded byrijilpoothadi
- New Text Documentvm,Uploaded byaravind77
- matlab lab workUploaded bykaushik_ranjan_2
- TM-2007-215007Uploaded byDiana Pasaca
- E15Uploaded byRishikesh Bhavsar
- pb400Uploaded byranisyamdhiya
- Single Input Single Output SystemUploaded byndtruc
- akagi23Uploaded byDonato Vargas
- A New Coordinated Control Strategy for Boiler-Turbine System of Coal-Fired Power PlantUploaded byBhuvanithaaKesavan
- Jadual Waktu Jke Jan2011Uploaded byBudaq Ronggeng
- NASA MarshallUploaded byjudithcindhiya
- PID Para Procesos InestablesUploaded bySevilla Fc
- Control_System_EEE-4122_Lecture-02.pptxUploaded byতানভীর আহমেদ
- 20180613054811942.pdfUploaded byroyclhor
- Ejemplo de RevistaUploaded byDavid Guillen
- Frequency Response and Nyquist Diagrams2Uploaded byAsma Amirah
- PID PresentaionUploaded byGilagidkid
- IntroUploaded byJoe Marie Valcarcel
- TieUploaded byAdrián Lara
- San DeepUploaded byAbhishek Kandoi
- 10.1.1.116.370Uploaded bySuhail Khokhar
- An Advanced LFC Design ConsideringUploaded byAhmed58seribegawan
- 4528.04.R380.02_ShellUploaded byAnil B Yadav
- 04749294Uploaded bydebasishmee5808
- M.Tech-syllabu-2007-2008Uploaded byAkhilReddy Sankati
- ITAUploaded byMisael Fernando Gamba Gomez
- Introduction PidUploaded byganeen hahgdha

- Calculus & Vectors Exam Review Spring 2012Uploaded byBright Breeze
- Xiong_H_D_2015Uploaded byBright Breeze
- op ampUploaded byBright Breeze
- Prog_manUploaded byBright Breeze
- OL Manual.pdfUploaded byBright Breeze
- Drives and Control SyllabusUploaded byannaglory
- 28jan03Uploaded byBright Breeze
- basicinsUploaded byBright Breeze
- EE-303Uploaded byBright Breeze
- vecalgUploaded byAnita Gloria

- prob-weber.pdfUploaded byАльберт Бермудес
- AD2007Uploaded byCeyda Görçiz
- mpcUploaded byGodofredo
- 9231_s06_qp_1Uploaded bySwarnapali Liyanage
- Topic 8 TransformationUploaded byayie4256017
- QuadraticsUploaded bywolfretonmaths
- A Level Brochure.pdfUploaded byKai Jie
- 12 Maths Key Notes Ch 12 Linear ProgrammingUploaded bySachin Yadav
- Advances in Mathematical Economics - 2013 - Profits and Exploitaton - A Reappraisal.pdfUploaded byjoebloggsscribd
- jozette roberts-lesson 1 matrices concept 1Uploaded byapi-403984108
- 2016-2017 Marshall SPSAUploaded byPasadena Unified
- Quantitative Applications in Management and Research- AssignmentUploaded byLorato Laetsang
- cubes from origamiUploaded byapi-281623170
- Aristotelian Logic and Euclidean Mathematics. Seventeenth-Century Developments of the Quaestio de Certitudine Mathematicarum - Paolu MancosuUploaded byCamila Cabral
- MathematicsUploaded byDexter Lorenzo Torres
- Evans Analytics2e Ppt 08Uploaded byqun
- lba3Uploaded bygpal.india2802
- MHF4U Chapter 1 Notes.unlockedUploaded byAlex Jim
- 14471351 WorksheetsUploaded bybadbidbud
- Hw 4 SolutionsUploaded byAnonymous jxm0WNS7Qa
- pronunciation of mathematical expressionsUploaded bybaodepei6034
- 3rd grade 2nd six weeks problem solving englishUploaded byapi-268306861
- MTT101 Syllabus - SpringUploaded byshihabsultan
- Chaos BookUploaded byNgô Lưu Duy Thái
- C. S. Peirce, On the Algebra of Logic, 1880Uploaded bymediologist
- 314 Matlab AssignmentUploaded bycontaparaolixo9120
- MTH 252 LabUploaded bysnaxtothemax
- Access Programme CpUploaded byJulius Godslove
- 10.1007@978-3-319-28341-8.pdfUploaded byVidriotes
- Ancient NumeralsUploaded bynarendran069