# matlab5 - Matlab Project 5 BE 228-04 jgh‘ This project is...

• Notes
• 2

This preview shows pages 1–2. Sign up to view the full content.

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

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Matlab Project 5 BE 228-04 jgh‘ 5/19/06 This project is the ﬁnal 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 frequency response and time domain impulse response of a ﬁrst order and second order system. Below is an uncommented m-ﬁle which provides the responses and associated calculations. Enter the m-ﬁle script ﬁle providing detailed comments for the coding. After successfully running the matlab5.m code, print your commented code, the command window results, and the resulting ﬁgures. Then, for each system, annotate your ﬁgures with measurements to respond to the following: , A. For the ﬁrst order system 1. From the ﬁequency response, estimate the bandwidth 2. From the impulse response, estimate the time constant 4 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 the 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-ﬁle code with their comments following good practices, command window output of the calculated parameters, annotated ﬁgures, pole-zero plots, and the responses to the instructions above. The report should conclude with a one page presentation of the individual paragraphs from each of the team members discussing what they have learned from the experience. The report is due Friday June 2, 2006. %matlab5.m %matlab5 prdject EE 228—04 %study of first order system %transfer function H(s) = (10A4)/(s+1OA4) w=logspace(1,6,200); Hw = (10A4)./(j*w+1OA4); Hm = 20*log10(abs(Hw)); Hp = (l80/pi)*angle(Hw); figure(1) subplot(2,l,l) semilogx(w,Hm) title('magnitude of H(w), first order') xlabel('frequency(rad/s)') ylabel('magnitude(dB)') subplot(2,l,2) semilogx(w,Hp) title('phase of H(w}, first order') xlabel('frequency(rad/s)') ylabel('phase(deg)') %time domain b=[l] a=[l 10A4] [r,p,k]=residue(b,a) m=abs(p) theta=angle(p) t=0:1OA-6:5*1OA—3; h=lOA4*exp(—1OA4*t); figure(2) plot(t,h) title(‘impluse response h(t), first order') xlabel('time (s)') ylabel('h(t) (v)’) % study of second order system % transfer function H(s}=(10“6(s+100))/(s“2+40003+iGA8) w=logspace(l,6,200); Hw = ((1006)*(100+j*w))./(10A8+j*w*4000—w.*w); Hm = 20*log10(abs(Hw)); Hp = (l80/pi)*angle(Hw); figure(3) subplot(2,l,1), semilogx(w,Hm) title(‘magnitude of H(w)') xlabel('frequency(rad/s}') ylabel('magnitude(dB)') subplot(2,l,2), semilogx(w,Hp) title('phase of H(w)') xlabel('frequency(rad/s}') ylabel('phase(deg)') %:ime domain b=[l 100] a=[l 4000 10“8] [r,p,k]=residue(b,a) m=abs(p) theta=angle(p) t=0:lOA—6:5*lO“—3; h=2000*exp(—2000*t).*cos(9798*t—1.7722); figure(4) plot(t,h) title('impluse response h(t)') xlabel('time (s)‘) ylabel(‘h(t) (v)') ...
View Full Document

• Spring '08
• HARRIS

{[ snackBarMessage ]}

### What students are saying

• 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.

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

• 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.

Dana University of Pennsylvania ‘17, Course Hero Intern

• 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.

Jill Tulane University ‘16, Course Hero Intern