Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Lab 7 — Frequency response computations

Agenda

Time Item

5 min Lab introduction

10 min Computing the frequency response of a system

20 min Plotting the frequency response of a system

Lab activity 1 – Frequency response of an active band-pass filter


125 min
Lab activity 2 – Frequency response of a two-degree-of-freedom oscillator

The big picture: Practice performing frequency response calculations with a single input frequency.

Practice generating a Bode plot for a given transfer function.

Model an active band-pass filter, obtain a transfer function, perform frequency


response computations, and plot a Bode plot.

Model a two-degree-of-freedom oscillator, obtain a transfer function, perform


frequency response computations, and plot a Bode plot.

Submit a memo presenting your results.

ES 205 Lab 7 Page 1 of 8


Computing the frequency response of a system

The big picture of frequency response analysis:

Important frequency response quantities:

• Input amplitude: 

• Input frequency: 

• Transfer function: ()

• Frequency response function (FRF): (i) = ()| 

• FRF magnitude: |(i)|

• FRF phase: ∠(i)

ES 205 Lab 7 Page 2 of 8


Practice Problem 1

5(10 + 50)
Given: A transfer function () = , with input () = 3 sin 2 .
(2 + 5)(  + 20 + 30)

Taks: Compute the FRF magnitude |(i)| and FRF phase ∠(i).

Create an m-file and record the following lines of code:

w = 2; % Input frequency from f(t)


s = i*w; % Set s = i*w

Giw = (10*s + 50)/(s^2 + 20*s + 30) % FRF

magGiw = abs(Giw) % FRF magnitude

phaseGiw = angle(Giw)*180/pi % FRF phase in degrees

Results:

(i) = _______________________________

|(i)| = _______________________________

∠(i) = _______________________________

The steady-state response "## () to the given input is

"## () = __________________________________________________________________

ES 205 Lab 7 Page 3 of 8


Plotting the frequency response of a system

The Bode plot:

Plot the FRF magnitude and phase for a range of frequencies:

50

45
Magnitude (dB)

40

35

30

25

20 1 0 1 2 3
10 10 10 10 10
Frequency (rad/s)

40

20

0
Phase (deg)

20

40

60

80
1 0 1 2 3
10 10 10 10 10
Frequency (rad/s)

• Frequency is represented on a logarithmic scale in rad/s.

• Magnitude is plotted on a linear scale in decibels (dB):

$%& = 20 log*+(|(i)|)

• Phase is plotted on a linear scale in degrees.

ES 205 Lab 7 Page 4 of 8


Practice Problem 2

5(10 + 50)
Given: A transfer function () = .
(2 + 5)(  + 20 + 30)

Task: Plot the Bode plot over the frequency range 0.1 rad/s to 1000 rad/s.

In your m-file, record and complete the following lines of code:

a = ___; % 10^a = 0.1 rad/s


b = ___; % 10^b = 1000 rad/s
n = ___; % Number of frequency points
w = logspace(a,b,n)'; % Define the frequency range
s = i*w; % Set s = i*w

Giw = _____________; % FRF – use ‘.’ operators


magGiw = abs(Giw); % FRF magnitude
MdB = 20*log10(magGiw); % Magnitude in dB
phaseGiw = unwrap(angle(Giw))*180/pi; % FRF phase in degrees

figure(1)
set(gcf, 'color', 'w')
subplot(211) % Create a subplot figure
semilogx(w,MdB) % Bode magnitude plot
grid on
xlabel('Frequency (rad/s)')
ylabel('Magnitude (dB)')

subplot(212)
semilogx(w,phaseGiw) % Bode phase plot
grid on
xlabel('Frequency (rad/s)')
ylabel('Phase (deg)')

Print your Bode plot.

Mark on the graph the points that correspond to the magnitude and phase you calculated in Practice
Problem 1.

ES 205 Lab 7 Page 5 of 8


Lab activity 1 – Frequency response of an active band-pass filter

As a team, do the following:

1. Model the active band-pass filter shown below.

2. Use Maple to obtain the transfer function relating the input voltage , - to the output voltage ,./0 .
Use the following parameter values:

• 1* = 1 = 10 kΩ

• 14 = 15 = 1 kΩ

• 6* = 10 μF

• 6 = 1 μF

3. Let , - () = 5 cos 100 V. Calculate the FRF (i), the FRF magnitude |(i)|, the magnitude
$%& in dB, and the FRF phase ∠(i) at the input frequency.

4. Write an expression for the steady-state output voltage, ,./0,## ().

5. Plot the Bode plot over the frequency range 0.1 rad/s to 1000 rad/s.

ES 205 Lab 7 Page 6 of 8


Lab activity 2 – Frequency response of a two-degree-of-freedom oscillator

As a team, do the following:

1. Model the two-degree-of-freedom oscillator shown below.

2. Use Maple to obtain the transfer function relating the input force () to the block displacement
"*. Use the following parameter values:

• :* = 2 kg

• : = 1 kg

• ;* = ; = 0.5 N-s/m

• <* = 10 N/m

• < = 20 N/m

3. Let () = 2 sin 4 N. Calculate the FRF (i), the FRF magnitude |(i)|, the magnitude $%& in
dB, and the FRF phase ∠(i) at the input frequency.

4. Write an expression for the steady-state block displacement, "*,## ().

5. Plot the Bode plot over the frequency range 0.1 rad/s to 100 rad/s.

ES 205 Lab 7 Page 7 of 8


Submit a memo detailing your results

Download the Lab 7 memo template from the course website.

As a team, complete the Lab 7 memo:

• Complete all tables. Include units.

• Paste in all requested plots. Do NOT use the Snipping Tool.

• Provide descriptive captions for all tables and figures.


• Type in the transfer function for each system analyzed. Use Equation Editor.

• No additional text is required in your memo.

• Attach printouts of your Maple worksheet(s) and MATLAB m-file(s).

Submit your Lab 7 memo by the end of the lab period.

ES 205 Lab 7 Page 8 of 8

You might also like