4 views

Uploaded by Bright Breeze

matlab

- Course Contents
- Assignment 3 - Solutions
- L02 Lecture
- Bode Diagram Lecture - Control Engineering
- NonlinSys_pt2
- f10
- PEEII-lab+manuual
- ooooooooo
- 01461464
- lab#7
- Modern Control Systems 8th edition.pdf
- Wala Pa Nahuman
- Compensators.pdf
- 141_1_Final
- PIEAS MS Test 2014 Questions _ Entrytest Prep. and Admission Help
- eceb320
- Book1 Draft 1
- GATE EE 2008 With Solutions
- Lpfdesign Filter
- files-1._Introduction_To_Control_Systems_SE302_Topic_1_-_Introduction_to_Linear_systems.pdf

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.

- Course ContentsUploaded bywalidghoneim1970
- Assignment 3 - SolutionsUploaded byHussein Basma
- L02 LectureUploaded byPushpendra Dwivedi
- Bode Diagram Lecture - Control EngineeringUploaded byAimless Deegan
- NonlinSys_pt2Uploaded bymareladra
- f10Uploaded byanilpanalog
- PEEII-lab+manuualUploaded byRaj Patel
- oooooooooUploaded bySumitKumar
- 01461464Uploaded bydabalejo
- lab#7Uploaded by03155794054
- Modern Control Systems 8th edition.pdfUploaded bymohmmad shouqatali
- Wala Pa NahumanUploaded byJohnCarloTigue
- Compensators.pdfUploaded byGabriela Maersk
- 141_1_FinalUploaded bySanjay Rai
- PIEAS MS Test 2014 Questions _ Entrytest Prep. and Admission HelpUploaded byhamza malik
- eceb320Uploaded byradhakodirekka8732
- Book1 Draft 1Uploaded byrabbinsion
- GATE EE 2008 With SolutionsUploaded byAbhishek Mohan
- Lpfdesign FilterUploaded byMuhammad Naeem
- files-1._Introduction_To_Control_Systems_SE302_Topic_1_-_Introduction_to_Linear_systems.pdfUploaded byAHMED
- AN5659Uploaded bysksingl350
- Cpc Report Chapter 1Uploaded byFaiz Basri
- Biquad1 - Lab ReportUploaded byGavin Zhang
- Tutorial Digital Control Loop DesignUploaded byPhạm Văn Tưởng
- Outline PID Control: From Algorithm to CodeUploaded bytomy198610
- files-1._Introduction_To_Control_Systems_SE302_Topic_1_-_Introduction_to_Linear_systems.pdfUploaded byAHMED
- Chapter 8 RootlocustechniquesUploaded byManjula Pandarikar
- SampleUploaded bycaroline
- ROle of OB in SCMUploaded byDharmik Shah
- A43010109.pdfUploaded byGeorge Markas

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

- Radioactive Decay Kuliah Ke2Uploaded byNofa Darmawan Putranto
- On Efficient Modelling of Wheel-Rail Contact in Vehicle Dynamics SimulationUploaded byJoshua Bailey
- Pedlosky_12_824_Ch1_9385Uploaded bytuananhf14
- 35Uploaded byMohamed Molham
- TechTip Engineering UnitsUploaded byAntonis Alexiadis
- Prosonic S FDU9xUploaded byAyman Termanini
- Natural Freqency Modal ShapeUploaded byV.m. Rajan
- Medicion de Las Caracteristicas Del IGBT FINALUploaded byPablo Andres Achig Santamaria
- Formal Report (Quantitative Determination of Total Hardness in Drinking Water by Complexometric Edta Titration)Uploaded byJj Chua
- TheoryUploaded byAhmad Fikri
- Collapse of Cavitation BubblesUploaded byVincent J. Cataldi
- ASTM D1298-12BUploaded byMdf Dfs
- Problem 2.104Uploaded byEric Castillo Martínez
- MetoclopramideUploaded byBagus Setiawan
- Metrology-InShort3rdUploaded byMaria Cutajar
- Leonardo Da Vinci's Solution to the Problem of the Pinhole CameraUploaded byGorka Etxague
- Euclid - Wikipedia, The Free EncyclopediaUploaded bySurya Bhupathi Raju
- FluidUploaded byLuqman Yusof
- Chapter 17 - Essential Mathematical Methods Unit 1&2Uploaded byKelley
- Meem3750 Lect 2Uploaded byErik Wade
- answer key.docUploaded byLexiaYap
- Quantitative Models for Microscopic to Macroscopic Biological Macromolecules and TissuesUploaded byfitoscribd
- Torrent Downloaded From Demonoid.pwUploaded byShubham Kothari
- Innovative Process for Fatty Acid Esters by Dual Reactive DistillationUploaded byIrfan Zamzami
- Functions of One Complex Variable 2 - J ConwayUploaded byPaul Joseph Druce
- Fluid Mechanics - WikipediaUploaded bysdsad
- 73930470-Basic-Theory-of-Ordinary-Differential-Equations-Universitext.pdfUploaded byJaz Elle Domingo
- 1678-4383-bjce-34-02-00541Uploaded bynay den
- DSI_GEWI_Threadbar_System_EMEA.pdfUploaded byjuan carlos
- Homework 5 SolutionsUploaded bynawinnawmu1026