matlab5_sol - BB 301 Matlab Project 5 EE 301-04-05 jgh This...

Info icon This preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
Image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 6
Image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: BB 301 Matlab Project 5 EE 301-04,-05 jgh 11/18/02 This project is the final team effort in Matlab, and as such, its goal is to provide an opportunity to investigate the relationship between the time and the frequency domain representations for a linear time invariant system. We will study the response to a first and second order system. Below is an uncommented m-file. Enter the m-file script file, provide comments, and print the code and figures. Then, for each system, respond to the following: A. For the first order system 1. From the frequency response, estimate the bandwidth. 2. From the impulse response, estimate the time constant. 3. Compare the two estimates and relate to the value of the pole, and discuss the results in terms of the pole-zero plot. B. For the second order system 1.From the frequency response, estimate the resonant frequency, the bandwidth, and the damping factor. 2. From the impulse response, estimate the frequency and the damping factor of the damped sinusoid. 3. Compare the estimates for resonant frequency and damping factor, and relate to the values of the poles in terms of the pole-zero plot. Each team is to provide their Matlab m-file code with their cements following good practices, annotated figures, pole-zero plots, and the responses to the questions above. The report should conclude with the individual paragraphs from each of the team members discussing what they have learned from the experience. The report is due Fmdav Dpnpmlfipr 6 2n“? LIHUVLLLU Arm w—logspace(l 6, 200); Hw — (10 4). /(j*w+lO 4); Hm = 20*log10(abs(Hw)); Hp = l80/pi)*angle(Hw); subplot(2,l,l) semilogx(w,Hm) title 'magnitude of H(w), first OIG er ) Xlabe;('f:equency(rad/s)') ylabei('magnitude(dB>’) subplot(2,l,2) semilogx(w,Hp) title 'phase of H(w), first order') xlabel('ftequency(raj/s") ylabe;(‘phase{deg)' ) %time domain b=[l] a=[l ;OA4] [r,p,k]=residue(b,a) m=abs p) theta=angle(p) t=O:lOA-6:5* h=lOA4*exp(— figure plot(t,h) title('imp" xlabel(' ylabel( w=logspace(l, Hw = ((10 6)* Hm = 20*logl Hp = (lSO/pi figure subplot(2,l, Lplieldl" 100-3; 1004*t); 6, 200); (100+j*w 0(abs( (Hw) )*angle(H SVV 1) semilogx(w,Hm) title('magnit xlabel(‘frequency'rad/s) ylabel('magni subplot(2,l, ude of H(w) - ~ a!) (D x) ) B)') 2) semilogx(w,Hp) of H{ w), second order') xlabel(' frequencyi rad/s) ') title('f chase ylabel(’ phase %tév b=[l 100] a=[l 4000 10A 'due(b,a) [r,p,k]=re5l m=abs(p) domain ('deg) ) 8] theta=angle(p) t=O:lOA-6:5* h=2000*exp( figure plot(t, h) title(' 100-3; . response h(t), first order') .5. A ,‘\ /§5‘4+40003+1 )./(1008+j*w*4OOO-w.*w); —2000*t).*cos(9798*t-l.7722); econd order') ’\ A r: U r: ) 3 Student License —— for use in conjunction with courses offered at a A? degree—granting institution. Professional and commercial use prohibited. To get started, type one of these: helpwin, helpdesk, or demo. For product information, visit www.mathworks.com. EDU» matlab5 b = l a = 1 10000 r : l p = —10000 k = m = 10000 theta = 3:1416 b = l 100 a = l 4000 100000000 r = 0.5000 + 0.0970i 0.5000 — 0.0970i l.Oe+003 * -2.0000 + 9.7980i —2.0000 - 9.7980i k: m: 10000 10000 theta = 1.7722 —1.7722 EDU» I ()3 magnitude(dB) % phase(deg) “9%: My} ; 553*“ A» , in 1b.; 0 0‘0 c'p o 1o1 102 103 1o4 4. 1o5 10 frequency(rad/s) . a) 34% = ‘0 . moi/5 phase of H(w), first order _1OOL1—I_L._I_J|_L_I'I L L_llJ_|L_IJ I ll 10 1o2 103 1o4 105 1o6 frequency(rad/s) Student Version of MA TLAB impluse response h(t), first order 10000 9000 8000 7000 6000 4000 33:10:! 3000 2000 1000 0 ' . . 0 0.5 1 1.5 2 2.5 3 3.5 4 45 5 4 3M H CS3 : S + we => 901g 05. - so 6% , 13 ~——- 0‘ \ - s a ‘ afoé \ é f .../ l” ' ‘ 1 1 ~ 1:.) PSCXQ) 7‘ I}. \V\ K?“ *dfg ) W {YMCA \, S M i h V‘aY-SQ V‘Z,1£}T§-Qv\\ 5L 1‘? TM. \chx “=1 , 11a \ov‘gar +10. demflix Md HQ Syn-Akr- “EL; *HM Cahs'ngJé‘ , Student Version of MA TLAB sh} - , 'F- r“ N _ ‘ A“ M} Mr» W” PUZ - —- was; 4 q .299; ~ C“ fl. A A 040% 9/3 ‘ 1 w 1" :z 504 “sf/5 V‘QEGV‘O’V‘CQ 7Q ‘3 Coo, ’ G- + A it ) 3%”ch MAM-9‘1 T Hmoflas : 4am ‘ , i ”—- 1 ' 1 4 (Ag 2‘) I '20” V .. HWW’) ”Sm “Q“ __. ”,4. m 2 QGQMWM was A , :3 W9. ’ 0 4 z .. \ZoaOLVOd/T) X i g- :3ng g wcwo‘rq: ’0' +000“ : r~-;<2f_(§:~333___.__ :3 Rb»: : ww L912 1‘ W”). 3:33;) 1 4:13;? Lmég) HQ)- 51+40903+ 30% 9;,(9 magnitude(dB) 10 10 10 10 _ 4 10 10 frequency(rad/s) “’9 ‘ ’0 phase of H(w), second order fl Q phase(deg) 1o1 102 1o3 10“ 1o5 106 frequency(rad/s) ‘ L430 \ a £533 Shh» wa‘fmwcgofir (ckfséemaj Q : “ME ~— 2 ”g -» "9;?va _ if?“ i ‘ f i . W .. m» 6» mm:- ~: *Wr‘r : "r w w M , an 5% ~ i?» :2 ~=~ mg "" m 3%.»: 3*" ‘* s g ‘ ”3’ Student Version of MA TLAB \ 3443 ’ 1000 500 -500 {Jobs 08* Hm = ~20mt 3017019, 1500 . - 1" m «335...... "MW?" 1:." 9 1 g 4 5:5 W'- P‘Mfi “ ”W“ Maven” 3’” k ’ ,morft «1546074) kw) = 20006. CMPVMQ’ I 6‘11. Una/Ex 1:, 1‘ 0 “firms _ ow, O‘K'hi—‘ffl @433; . k e - ~ - e .. 5:.) = Li's-a ~— 8 = 5755 ”‘95. i .. , g...“ (Lgm3/(a‘ggé a gigfigj jam) .7 [L557 3 ma$hs+wj§cfigi£fl~t {10¢ _6‘~_9:- «355.. W. 4.0 s-fio’ua' W-o.\ga4 Awfég‘w‘“ impluse response h(t), second order \/ :5 0.5 5 1 1.5 2 2.5 3 3.5 4 4.5 5 f -. time (3) x10'3 \ \ Apr ‘mgk a ( m} 08* w 55W”? Seer-Law é (4 i) \ 5-. WOWW/s‘), w z 104 (We) 2 We , ‘5 = 0‘20 .SJ’Y‘Q Ci ELM CLT‘ ( w = 155'» (“Pm/s}, Lad : 51954 “:5ng 2 {.50 *S: 049 *W ) Student Version of MA TLAB ...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern