This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Matlab Project 5 BE 22804 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 polezero 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 polezero 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, polezero 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:1OA6: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

Click to edit the document details