Contents

Filter Example

% /home/dimarzio/Documents/working/12229/lectures/filter_example.m
% Sat Nov 18 11:08:42 2017
% Chuck DiMarzio, Northeastern University, Fall 2017

Filter: Vary C and pick a good one

% Parallel R_2LC feedback impedance in opamp
% omega  = 1/sqrt(LC), Q = R2 sqrt{C/L), A_V = -R2/R1 midband gain
% 2 pi f = 1/sqrt(LC), B/f = sqrt{L/C)/R2, A_V = -R2/R1 midband gain
% B = sqrt{L/C/L/C)/R2/2/pi
% B = sqrt{1/C^2)/R2/2/pi
% L=1/(2 pi f)^2/C
% R2 = sqrt{1/C^2)/B/2/pi
% R1 = R2/A_V
A_VMB=10;B=200;f0=500;
C=10.^[-8:.01:-4];
L=1/(2*pi*f0)^2./C;
R2 = sqrt(1./C.^2)/B/2/pi;
R1=R2/A_VMB;
figure;loglog(C,L,C,R2,C,R1);grid on;

Picked from Graph C=5e-6

C=5e-6
L=1/(2*pi*f0)^2./C
R2 = sqrt(1./C.^2)/B/2/pi
R1=R2/A_VMB
C =
   5.0000e-06
L =
    0.0203
R2 =
  159.1549
R1 =
   15.9155

Use these results to filter the signal in HW9

A_VMB=10;B=200;f0=500;
C=5e-6
L=1/(2*pi*f0)^2./C
R2 = sqrt(1./C.^2)/B/2/pi
R1=R2/A_VMB

% H is the actual gain, A_V, which is a function of frequency
%H = % Your code here
%Vout=H.*V; % Use the variable you used for V

% if you used this for the FT
%V=fftshift(fft(v)/npts*max(t));

% then use this for the IFT (Just undo everything you did going
% forward)
%vout=ifft(ifftshift(Vout*npts/max(t)));
C =
   5.0000e-06
L =
    0.0203
R2 =
  159.1549
R1 =
   15.9155