### Create a StudySoup account

#### Be part of our community, it's free to join!

Already have a StudySoup account? Login here

# Auto Control of Engr Sys EME 172

UCD

GPA 3.8

### View Full Document

## 46

## 0

## Popular in Course

## Popular in Engineering Mechanical

This 32 page Class Notes was uploaded by Melissa Durgan on Tuesday September 8, 2015. The Class Notes belongs to EME 172 at University of California - Davis taught by Staff in Fall. Since its upload, it has received 46 views. For similar materials see /class/191793/eme-172-university-of-california-davis in Engineering Mechanical at University of California - Davis.

## Similar to EME 172 at UCD

## Popular in Engineering Mechanical

## Reviews for Auto Control of Engr Sys

### What is Karma?

#### Karma is the currency of StudySoup.

#### You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 09/08/15

Example 1 Lag Compensator Design A unit feedback system Rs Es C S with KGs is operating with 25 overshoot 4 04 s 1s 2s 10 a Design a compensator that will yield e55 1 b Use control toolkit to simulate the uncompensated and compensated systems Solution a 1 Use program 1 to plot the root locus of the uncompensated system Program 1 k k File name rl uncompch k k include ltControlhgt int main double k l array double complex p3 complex l 0L complex 2 0L complex lO 0 array double zetal 04 array double omegal 10 CControl sys CPlot plot sysmodelquotzpkquot NULL p kL syssgridl zeta omega sysrlocusampplot NULL NULL return 0 Output Rum Laws 0 AQEI mag Am R ea Am 2 From the root locus measure the real and imaginary pa1ts of the dominant poles The dominant poles are found to be 7112 41258 3 Use program 2 with one of the dominant poles to nd the gain K and the third pole The gain K and the third pole are found to be 65 and 1076 respectively Program 2 gt5 File name rlf uncompch k k k k k k k k k k k k k k k k k k k k k k k k include ltcontrolhgt int main default system gain double dk l uncompensated system poles array double complex up3 7 complex l complex 2 complex l r r O I 0 0 OH dominant pole selected from the root locus array double complex dpl complex l12 258 closed loop poles when one of the dominant poles is selected array double complex p3 system gain when one of the dominant poles is selected array double kl CControl sys sysmodelquotzpkquot NULL up dk sysrlocfindk p dp printfquotk fnquot kL printfquotpoles fnquot p return 0 Output k 65105433 poles complex lO7612780000000 complex 11193612579829 complex 1119361 2579829 4 Find the steadystate error of the uncompensated system 1 T e0e YP s 1Kp K 65 K 1imKGs 0 Ho 1X2gtlt10 20 F 325 024 1Kp0 1325 eSS Kp FindK that y1e1ds e 001 PO UI K L99 p 2 3046 325 6 Select the compensator pole close to the origin The compensator pole is chosen to be 0015 FN K which means p5 0015 25 K X p 3046gtlt0015 E 05 which means the compensator F0 zero is 05 7 Use program 3 to plot the root locus of the comgensated system Program 3 gt5 File name rl compch kkkkkkkkkkkkkkkkkkkkkkkk include ltControlhgt int main double k l array double complex zl complex O5 0 array double complex p4 complex O 015 0 complex l 0L complex 2 0L complex lO 0 array double zetal 04 array double omegal CControl sys CPlot plot sysmodelquotzpkquot z p kL syssgridl zeta omega sysrlocusampplot NULL NULL return 0 Output A Rum Lucus 2D 15 1D D 4 5 i 1 El gt EIEI 2 y 5 El I DEl 1n 715 VZEI 2D 15 1D 5 El 2 9437 27n655 R ea Am 8 From the root locus measure the real and imaginary palts of the dominant poles The dominant poles are found to be 7 097 r 1225 9 Use program 4 with one of the dominant poles to nd the gain K The gain K is found to be 55 Program 4 File name rlf compch include ltcontrolhgt int main default system gain double dk l compensated system zero array double complex czl complex O5 0 compensated system poles array double complex cp4 complex 00l5 O complex l 0L complex 2 0L complex lO 0 dominant pole selected from the root locus array double complex dpl complex O97 225 closed loop poles when one of the dominant poles is selected array double complex p4 system gain when one of the dominant poles is selected array double kl CControl sys sysmodelquotzpkquot cz cp dkL sysrlocfindk p dp printfquotk fnquot kL printfquotpoles fnquot p return 0 Output k 55103584 poles complex lO6324210000000 complex O9735192250924 complex O9735l9 2250924 complex 04355410000000 10 Find the steadystate error of the compensated system 1 T e0 6 yp SS 1Kp 55X05 K 1imKG s 9167 FN Sso L g 1x2gtlt10gtlt0015 egg 1 0011 1KFN 19167 b 1 Use program 5 to obtain the step response of the uncompensated system Program 5 kkkkkkkkkkkkkkkkkkkkkkkkkk File name step uncompch k k k k k k k k k k k k k k k k k k k k k k k k k include ltControlhgt int main system gain double k 65 uncompensated system poles array double complex up3 complex l 0L complex 2 0L complex lO 0 array double numl 1h array double denl 1H double tf 9 CControl sysl sys2 sys3 CPlot plot syslmodelquotzpkquot NULL up k sys2modelquottfquot num den sys3 syslfeedbackampsys2 sys3 gtgridl sys3 gtstepampplot NULL NULL NULL tf return 0 Output S Ep R espunse Amphmde v rnmnmn may Tune 52 2 Use program 6 to obtain the step response of the comgensated system Program 6 kkkkkkkkkkkkkkkkkkkkkkkkkk File name step compch k k k k k k k k k k k k k k k k k k k k k k k k k include ltcontrolhgt int main system gain double k 55 compensated system zero array double complex czl complex 05 0 compensated system poles array double complex cp4 complex 0 015 0 complex l 0L complex 2 0L complex 10 0 array double numl 1h array double denl 1h double tf 9 CControl sysl sys2 sys3 CPlot plot syslmodelquotzpkquot cz cp kL sys2modelquottfquot num den sys3 syslfeedbackampsys2 sys3 gtgridl sys3 gtstepampplot NULL NULL NULL tf return 0 Example 2 Lead Compensator Design A unit feedback system Rs Es C S with KGS is operating with 30 overshoot 4 0358 L ss 4s 6 a Design a compensator that will reduce the settling time by a factor of 2 b Use control toolkit to simulate the uncompensated and compensated systems Solution a 1 Use Wm plot the root locus ofthe W Program 1 File name rl uncompch k k include ltControlhgt int main double k array double complex p3 complex0 O complex 4 0L complex 6 0 array double zetal 0358 array double omegal 10H CControl sys CPlot plot sysmodelquotzpkquot NULL p kL syssgridl zeta omega sysrlocusampplot NULL NULL return 0 Output JELH Rum Lucus wuu mag Am Reai Am 2 From the root locus measure the real and imaginary palts of the dominant poles The dominant poles are found to be 71007i 1263 3 Use program 2 with one of the dominant poles to nd the gain K and the third pole The gain K and the third pole are found to be 63 and 7987 respectively Since the third pole is more than 5 times of the real part of the dominant poles the second order approximation is valid Program 2 HiHiHHHHHHHHHHH File name rlf uncompch k k k k k k k k k k k k k k k k k k k k k k k k include ltcontrolhgt int main default system gain double dk l uncompensated system poles array double complex up3 complexO O dominant pole selected from the root locus array double complex dpl complex lOO7 263 closed loop poles when one of the dominant poles is selected array double complex p3 system gain when one of the dominant poles is selected array double kl CControl sys sysmodelquotzpkquot NULL up dk sysrlocfindk p dp printfquotk fnquot kL printfquotpoles fnquot p return 0 Output k 63321714 poles complex 79878510000000 complex lOO60752629651 complex lOO6075 2629651 4 UI Find the settling time of the uncompensated system 4 4 S 3972 sec g a 1007 Find the settling time dominant poles of the compensated system 7 1986 sec The real part ofthe dominant poles is gm 2014 92 2014 5252 tanlsin391 tanlsin391 0358l The imaginary part of the dominant poles is ma Select the compensator zero to be 5 which means 25 5 The compensated plant is Ls s p ss 4s 6 To the dominant poles 4L0 925 19p 91 92 93 2k 1180 k 0 i 1 i 2 Choose k 1 19p 180 6Z5 91 92 93 Choose the dominant pole at 2014 15252 9 can be found to be 731 5252 W tant9p tan731 p5 4296 whch means the compensator pole is 4296 P 7 Use program 3 to plot the root locus of the comgensated system Program 3 gt5 File name rl compch kkkkkkkkkkkkkkkkkkkkkkkk include ltControlhgt int main double k l array double complex zl complex 5 0 array double complex p4 complex 42 96 0 complex0 O complex 4 0L complex 6 0 array double zetal 0358 array double omegal 50H CControl sys CPlot plot sysmodelquotzpkquot z p kL syssgridl zeta omega sysrlocusampplot NULL NULL return 0 Output D331 Rum Lucus mag Am 4 34 n Van ran an EU 4U 2n n 2n Rm Am 8 Use program 4 with one of the dominant poles to nd the gain K and other closedloop poles The gain K is found to be 1423 The third and fourth poles are found to be 438 and 5 134 respectively Since the third pole at 438 is more than 20 times of the real part of the dominant poles the effect of the third pole is negligible Since the fourth pole at 5l34 is close to the zero at 5 the polezero cancellation stands As a result the second order approximation is valid Program 4 HiHiHHHHHHHHHHH File name rlf compch kkkkkkkkkkkkkkkkkkkkkkkk include ltcontrolhgt int main default system gain double dk l compensated system zero array double complex czl complex 5 0 compensated system poles array double complex cp4 complex 4296 O complexO 0L complex 4 0L complex 6 0 dominant pole selected from the root locus array double complex dpl complex 20l4 5252 closed loop poles when one of the dominant poles is selected array double complex p4 system gain when one of the dominant poles is selected array double kl CControl sys sysmodelquotzpkquot CZ Cp dkL sysrlocfindk p dp printfquotk fnquot kL printfquotpoles fnquot p return 0 Output k 1422905212 poles complex 437979200000000 complex 20140255252003 complex 51340290000000 complex 20l4025 5252003 b 1 Use program 5 to obtain the step response of the uncomgensated system Program 5 k k k k k k k k k k k k k k k k k k k k k k k k k k File name step uncompch k k k k k k k k k k k k k k k k k k k k k k k k k include ltControlhgt int main system gain double k 63 uncompensated system poles array double complex up3 complex0 O complex 4 m complex O array double numl 1h array double denl 1h double tf 6 CControl sysl sys2 sys3 CPlot plot syslmodelquotzpkquot NULL sys2modelquottfquot num den sys3 syslfeedbackampsys2 sys3 gtgridl sys3 gtstepampplot NULL NULL NULL up k tf39 return 0 Output Amphmde v S Ep R espunse Agni 237963 Lszlns Tune 52 2 Use program 6 to obtain the step response of the comgensated system Program 6 File name step compch k k k k k k k k k k k k k k k k k k k k k k k k k include ltcontrolhgt int main system gain double k 1423 compensated system zero array double complex czH 7 complex 5 0 compensated system poles array double complex cp4 complex 4296 O complex0 0L complex 4 0L complex 6 0 array double numl 1H array double denl 1H double tf 6 CControl sysl sys2 sys3 CPlot plot syslmodelquotzpkquot cz cp kL sys2modelquottfquot num den sys3 syslfeedbackampsys2 sys3 gtgridl sys3 gtstepampplot NULL NULL NULL tf return 0 EME172 Dlscusslon 3 Second Order System 1Relationship between transfer function and damping rationatural frequency From the denominator of the transfer function for a second order system we can find the system s damping ratio and natural frequency From the obtained damping ratio we can determine the nature of the system s response The general denominator of a second order transfer function is s22 mnsmn2 If gt1 the response is overdamped lf 1 the response is critically damped If gquot lt1 the response is under damped If gquot 0 the response is undamped Example 1 Find the damping ratio and natural frequency of the second order system shown below Determine the nature of the system s response Hs s2239 Sol 2 on 9 mn3 2 wn2 033 The response is under damped 2Relationship between damping rationatural frequency and settling time peak time rise time percent overshoot Listed below are equations that show the relationship between damping rationatural frequency and settling timepeak timerise timepercent overshoot 4 T5 9 7239 wnT 176 3 04172 1039g1 4 OS e quot1 42x1oo Example 2 Find the settling time peak time rise time percent overshoot of the second order system shown below HS s2239 Sol From example l we know a 3 033 Use the above equations we can obtain T5 4 Tp 111 T 045 OS329 3 Relationship between poles and percent oversh 00t setting time peak time Listed below are equations that show the relationship between poles and percent overshootsettling timepeak time poles an i faquot 1 4 2 OS m 100 4 0OS 72392 ln2 0 100 4 a 42 It a 3111 9 Example 3 Find the poles of a second order system whose TS4 and Tp111 Sol Use the above equations we can obtain gwn1 a 1 44 283 Therefore poles are 1j283 1 j283 Ch Control Toolkit Examples int stepclass CPlot plot array double ampyout array double amptout array double ampXout double tf I Calculate and plot step response of a system I plot Pointer to an existing object of class CPlot I yout Array of reference containing the output of the step response I tout Array of reference containing the time vector for the simulation I xout Array of reference containing the state trajectories I tf Double value specifying the final time of the simulation int convarray double ampden array double ampdenl array double ampden2 I Convolution and polynomial multiplication I If denl and den2 are arrays of reference containing polynomial coefficients convolving them is equivalent to multiplying the two polynomials I den Array of reference containing the output of the convolution I denl Array of reference containing the first input vector I den2 Array of reference containing the second input vector Example 4 System with Denominator Consisting of Single Polynomial Plot the step response of the following system 9 HS s2239 Program example4ch include ltcontrolhgt int main array double numl 9 denl3l l1 2 9 CControl sys CPlot plot sysmodelquottfquot num den sysstepampplot NULL NULL NULL return 0 Output Step Response Amplitude Y 0 1 2 3 4 Time sec Example 5 System with Denominator Consisting of Multiple Polynomials Plot the step response of the following system Hs s3s 239 Program example5ch include ltcontrolhgt int main array double num1 9 den12 1 3 den23 1 2 9 denM 1 2 9 CControl sys CPlot plot convden denl den2 sysmodelquottfquot num den sysstepampplot NULL NULL NULL return 0 Output Amplitude Y O N Step Response 2 Time sec 25 Example 6 Default Step Response Plot the step response of the following system HS 003 s2 003s006 Program example6ch include ltcontrolhgt int main array double num1 003L den3 1 003 006 CControl sys CPlot plot sysmodelquottfquot num den sysstepampplot NULL NULL NULL return 0 Output Amplitude Y O 01 Step Response 30 40 Time sec 70 Example 7 Step Response with Simulation Time Speci ed Plot the step response of the following system 003 H3 SZOD3SOD6 Program example7ch include ltcontrolhgt int main array double num1 003L den3 1 003 006 double tf 500 CControl sys CPlot plot sysmodelquottfquot num den sysstepampplot NULL NULL NULL tf return 0 Output Step Response Amplitude Y 0 100 200 300 400 500 Time sec Example 8 Step Response with Simulation Time and Number of Points Speci ed Plot the step response of the following system 003 H3 SZOD3SOD6 Program example8ch include ltcontrolhgt int main array double num1 003L den3 1 003 006 yout500 tout500 double tf 500 CControl sys CPlot plot sysmodelquottfquot num den sysstepampplot yout tout NULL tf return 0 Output Step Response Amplitude Y Time sec

### BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.

### You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

## Why people love StudySoup

#### "There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

#### "Selling my MCAT study guides and notes has been a great source of side revenue while I'm in school. Some months I'm making over $500! Plus, it makes me happy knowing that I'm helping future med students with their MCAT."

#### "There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

#### "Their 'Elite Notetakers' are making over $1,200/month in sales by creating high quality content that helps their classmates in a time of need."

### Refund Policy

#### STUDYSOUP CANCELLATION POLICY

All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email support@studysoup.com

#### STUDYSOUP REFUND POLICY

StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here: support@studysoup.com

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to support@studysoup.com

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.