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

Info icon This preview shows pages 1–2. 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
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 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 frequency response and time domain impulse response of a first order and second order system. Below is an uncommented m-file which provides the responses and associated calculations. Enter the m-file script file providing detailed comments for the coding. After successfully running the matlab5.m code, print your commented code, the command window results, and the resulting figures. Then, for each system, annotate your figures with measurements to respond to the following: , A. For the first order system 1. From the fiequency 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-file code with their comments following good practices, command window output of the calculated parameters, annotated figures, 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

{[ 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