20.309:Recitation 092107: Difference between revisions

From OpenWetWare
Jump to navigationJump to search
Line 106: Line 106:
===Sallen Key transfer function===
===Sallen Key transfer function===


[[Image:First Order vs Second Order Low Pass.jpg|thumb|700 px]]
[[Image:First Order vs Second Order Low Pass.jpg|700 px|center]]
 
<pre>
clf;
 
R1=1;
R2=1;
C1=1;
C2=1;
Fc = 1;
 
% generate frequency vector
w = [-2:.01:2];
w = 10 .^ w;
s = Fc * w * j;
 
% Sallen Key transfer function
Vsk = 1 ./ (R1 * R2 * C1 * C2 * s .^2 + (R1 + R2) * C2 * s + 1);
 
%Plot result
loglog( abs(s), abs(Vsk));
hold on
axis([ min(abs(s)), max(abs(s)), 1.2 * min(abs(Vsk)), 1.2 * max(abs(Vsk))])
 
 
R = 1;
C = 1;
 
% Single order low pass transfer function
Vlp = 1 ./(R * C * s + 1);
 
loglog(abs(s), abs(Vlp), 'r');
title('First and Second Order Filter Responses')
ylabel('|H(s)|');
xlabel('Frequency');
</pre>


</div>
</div>

Revision as of 16:42, 22 September 2007

20.309 Fall Semester 2007
Recitation Notes for 9/21/2007


Review of ideal circuit elements

Linear passive

Independent sources

Dependent sources

Nonlinear

Modeling real components with ideal elements

Modeling a battery

Modeling an op amp

Sallen Key circuit

Key concepts

  • Even though the circuit is complicated, solving it requires only two techniques: the golden rules and Kirchoff' Current Law.
  • Because of the buffer amplifer at its output, the Sallen Key circuit has low output impedence.
  • The circuit implements a second order low pass filter. (There are also band and high pass versions.)
  • The cutoff frequency, [math]\displaystyle{ F_c }[/math], is defined to be where the magnitude of the transfer funcion falls to [math]\displaystyle{ 1/\sqrt{2} }[/math]. This occurs at the frequency where the real and imaginary parts of the denominaor are equal.
  • Above the cutoff frequency, the second order transfer function falls off twice as fast as the first order — 40 dB per decade versus 20.

Approach to solving the Sallen Key circuit

  1. Apply the Golden Rules
  2. Apply KCL at the [math]\displaystyle{ V_x }[/math] node
  3. Apply KCL at the [math]\displaystyle{ V_- }[/math] node
  4. Solve one equation for [math]\displaystyle{ V_x }[/math] and substitute into the other
  5. Rewrite the result in the form of a transfer function [math]\displaystyle{ V_o / V_i }[/math]

The gruesome details

Apply the Golden Rules

In the Sallen Key circuit, a wire connects [math]\displaystyle{ V_- }[/math] to [math]\displaystyle{ V_o }[/math]. Therefore, [math]\displaystyle{ V_- = V_+ = V_o }[/math]. This will be a useful substitution when applying KCL.

Apply KCL at the [math]\displaystyle{ V_x }[/math] node

KCL
[math]\displaystyle{ \frac{V_i-V_x}{R_1} + \frac{V_o-V_x}{R_2} + C_1 s (V_o - V_x) = 0 }[/math]      (1)


Multiply by [math]\displaystyle{ R_1 R_2 }[/math]
[math]\displaystyle{ R_2(V_i-V_x) + R_1(V_o-V_x) + R_1 R_2 C_1 s (V_o - V_x) = 0 }[/math]      (2)


Gather terms
[math]\displaystyle{ R_2 V_i - (R_2 + R_1 + R_1 R_2 C_1 s) V_x + (R_1 + R_1 R_2 C_1 s)V_o = 0 }[/math]      (3)


Apply KCL at the [math]\displaystyle{ V_- }[/math] node

KCL
[math]\displaystyle{ \frac{V_x-V_o}{R_2} - V_o C_2 s = 0 }[/math]      (4)


Multiply by [math]\displaystyle{ R_2 }[/math]
[math]\displaystyle{ V_x=V_o (1 + R_2 C_2 s) }[/math]      (5)


Substitute for [math]\displaystyle{ V_x }[/math] (equation 5 into equation 3)

Sustitute
[math]\displaystyle{ R_2 V_i - (R_2 + R_1 + R_1 R_2 C_1 s) (1 + R_2 C_2 s) V_o + (R_1 + R_1 R_2 C_1 s)V_o = 0 }[/math]      (6)


Multiply and collect terms
[math]\displaystyle{ R_2 V_i + (-R_2 -R_1 - R_1 R_2 C_1 s - R_2^2 C_2 s - R_1 R_2 C_2 s - R_1 R_2^2 C_1 C_2 s^2 + R_1 + R_1 R_2 C_1 s)V_o = 0 }[/math]      (7)


[math]\displaystyle{ V_i = \{ R_1 R_2 C_1 C_2 s^2 + C_2(R_1 + R_2) s + 1\}V_o }[/math]      (8)


Rewrite as a transfer function

[math]\displaystyle{ \frac{V_o}{V_i} = \frac{1}{ R_1 R_2 C_1 C_2 s^2 + C_2(R_1 + R_2) s + 1} }[/math]      (9)


Sallen Key transfer function

clf;

R1=1;
R2=1;
C1=1;
C2=1;
Fc = 1;

% generate frequency vector
w = [-2:.01:2];
w = 10 .^ w;
s = Fc * w * j;

% Sallen Key transfer function
Vsk = 1 ./ (R1 * R2 * C1 * C2 * s .^2 + (R1 + R2) * C2 * s + 1);

%Plot result
loglog( abs(s), abs(Vsk));
hold on
axis([ min(abs(s)), max(abs(s)), 1.2 * min(abs(Vsk)), 1.2 * max(abs(Vsk))])


R = 1;
C = 1;

% Single order low pass transfer function
Vlp = 1 ./(R * C * s + 1);

loglog(abs(s), abs(Vlp), 'r');
title('First and Second Order Filter Responses')
ylabel('|H(s)|');
xlabel('Frequency');