ECE 626 Project
Rishi Gupta
School of Electrical Engineering and
        Computer Science
     Oregon State University
                                Matlab
Fs=10MHz
DC gain=0db
Fp=0~1MHz
1.   Declare and analog filter. I set the cutoff to 5MHz (random choice).
     [num,den]=butter(2,5e6,'low','s');
      H=tf(num,den)
      bode(H);
2. Transfrom to z-domain using impulse invariance method.
     [numz,denz]=impinvar(num,den,10e6);
     Hz=tf(numz,denz,100e-9)
3. Observe the discrete time charecteristics. Fvtool plots everything, I’ve olny
    shown magnitude response and pole zero plot.
     hz=fvtool(numz,denz);
                                                     Magnitude Response
 Normalized Frequency: 0                                                Magnitude Response (dB)
                     0.5425
Magnitude (dB): -0.182093
                                 -2.1581
                                 -4.8588
                                 -7.5594
                                  -10.26
               Magnitude (dB)
                                -12.9606
                                -15.6612
                                -18.3618
                                -21.0624
                                -23.7631
                                -26.4637
                                           0   0.1    0.2   0.3   0.4              0.5              0.6   0.7   0.8   0.9
                                                                  Normalized Frequency (  rad/sample)
                                       Pole-Zero Plot
                                                Pole/Zero Plot
                 1.0997
                 0.8798
                 0.6598
                 0.4399
                 0.2199
Imaginary Part
                 -0.2199
                 -0.4399
                 -0.6598
                 -0.8798
                 -1.0997
                           -1.5   -1     -0.5        0           0.5   1   1.5   2
                                                 Real Part
             Converting TF to circuit.
Transfer function:
           0.1719 z
Hz= ---------------------------
    z^2 - 1.318 z + 0.4931
Sampling time: 1e-007
* Refer to page 418 of Johns Martin on how to do this, DO NOT BLINDLY
GET THE COIFICENTS. Work it out yourself to make sure.
The Fully Differential Circuit
                 Making an Ideal Switch
• analogLib-> switch (relay line)
• Set a threshold of VDD/2
• Bypass cap added to aid with
  convergence.
               Making an Ideal OPAMP
• analogLib-> dependant sources -> vcvs
      Simulating the Frequency Response
• Click on the vsource and set all
  the options.
     Simulating the Frequency Response
• Go to the Analog enviorment.
     Simulating the Frequency Response
• Set the PAC analysis like the following.
• Make sure the stop frequency is Fs/2
     Simulating the Frequency Response
• From the Analog Enviorment click on
 AC TRAN DC Button, and pick PSS
• And follow this. Make sure your phi1
   and phi2 show up. The will be at your
  sampling frequency.
• Always select conservative for most
  accurate results.
     Simulating the Frequency Response
• Make sure your PSS window looks like this.
     Simulating the Frequency Response
• Change to the PAC option.
• Under select make sure you change it to differential
Simulating the Frequency Response
Simulating the Frequency Response