EEC 212 - Winter 2015 Problem Set 6 - Due: Feb....

4
EEC 212 - Winter 2015 Problem Set 6 - Due: Feb. 20 Professor Hurst Read: Chapter on Switched-Capacitor Circuits 1 A first-order switched capacitor high-pass filter is shown in Figure 1. + - V i - + Next Stage C i =4pF C R =0.2pF C F =2pF Φ 1 Φ 2 Φ 1 Φ 2 Φ 1 Φ 1 n n+1 n+2 n+3 V i V o Figure 1: High-pass filter for Problem 1 (a) Find H (z )= Vo Vi (z ). Assume an ideal op-amp and V o is to be sampled on Φ 1 . (b) What is the new pole location if the op-amp has a finite open-loop voltage gain of 200? 2 An R-C filter shown in Figure 2 is to be transformed into the S-C filter shown in Figure 3. Assume an ideal op-amp is used (e.g., a →∞). (a) If f S = 200kHz, compute values for C i and C R using the approximation R eqx 1/(f S C X ). (b) Find H (z ) = Vo Vi (z ). What is the dc gain? What is the minimum gain? At what frequency is the minimum gain? (c) Verify the design using SWITCAP. Look at H (z ) using the command 1

Transcript of EEC 212 - Winter 2015 Problem Set 6 - Due: Feb....

Page 1: EEC 212 - Winter 2015 Problem Set 6 - Due: Feb. 20web.ece.ucdavis.edu/~hurst/EEC212/problem_sets/2015/ps6.pdf · EEC 212 - Winter 2015 Problem Set 6 - Due ... Transformed S-C Filter

EEC 212 - Winter 2015

Problem Set 6 - Due: Feb. 20

Professor Hurst

Read: Chapter on Switched-Capacitor Circuits

1

A first-order switched capacitor high-pass filter is shown in Figure 1.

+−

Vi

+

Next StageCi=4pF

CR=0.2pF

CF =2pFΦ1

Φ2

Φ1

Φ2

Φ1

Φ1

n n+1 n+2 n+3

Vi

Vo

Figure 1: High-pass filter for Problem 1

(a) Find H(z) = Vo

Vi(z). Assume an ideal op-amp and Vo is to be sampled on Φ1.

(b) What is the new pole location if the op-amp has a finite open-loop voltage gain of 200?

2

An R-C filter shown in Figure 2 is to be transformed into the S-C filter shown in Figure 3. Assume an idealop-amp is used (e.g., a → ∞).(a) If fS = 200kHz, compute values for Ci and CR using the approximation Reqx ≈ 1/(fSCX).

(b) Find H(z) = Vo

Vi(z). What is the dc gain? What is the minimum gain? At what frequency is the

minimum gain?

(c) Verify the design using SWITCAP. Look at H(z) using the command

1

Page 2: EEC 212 - Winter 2015 Problem Set 6 - Due: Feb. 20web.ece.ucdavis.edu/~hurst/EEC212/problem_sets/2015/ps6.pdf · EEC 212 - Winter 2015 Problem Set 6 - Due ... Transformed S-C Filter

HURST - EEC212 - PS6 2

SAMPLE OUTPUT IMPULSE ....

in SWITCAP. (See page 27 of the SWITCAP manual.)

(d) Plot |H(

z = ejωTS

)

| for Figure 3 and |H (s = jω) | for Figure 2 on the same graph for f = 0 tof = fS . Over what frequency range do the two plots differ by less than 20%?

+

25pF

800kΩ

800kΩ

Vi

Vo

Figure 2: R-C Filter for Problem 2

+

Ci

CF =25pF

CR

Φ1

Φ2

Φ1

Φ2

Φ1 Φ1

Φ2 Φ2

Vi

Vo

Figure 3: Transformed S-C Filter for Problem 2

3

Return ratio can be simulated using SPICE by breaking the loop at an arbitrary point and calculating 2terms, RR′

V and RR′

I , which can be combined to find RR. (See attached, first 3 pages of a paper).

+−

Vin

vo

+− 1000vx

1 210kΩ

50kΩ

1kΩ

10pF 1nF

−vx

+

Figure 4: Circuit for Problem 3

Page 3: EEC 212 - Winter 2015 Problem Set 6 - Due: Feb. 20web.ece.ucdavis.edu/~hurst/EEC212/problem_sets/2015/ps6.pdf · EEC 212 - Winter 2015 Problem Set 6 - Due ... Transformed S-C Filter

HURST - EEC212 - PS6 3

(a) For the circuit in Figure 4, use SPICE to find the RR directly by breaking the loop at node 1. Print orplot the magnitude and phase of RR. Is this feedback circuits stable? What is the phase margin?

(b) Find the RR indirectly by breaking the loop at node 2 and finding RR′

V = −vr/vd in Figure 4a ofthe attached paper and RR′

I = −ir/id in Figure 4b of the attached paper (use SPICE). Then RR can befound using Equation 3 in the paper. (Note: The return ratios are complex numbers.) Compare this answerwith the answer you got in 3a. [The return ratio can be found by simulation. See the information on returnratio simulation of a single-ended feedback circuit on the 212 web page.]

There are three Appendices below:Appendix A - Running SWITCAPAppendix B - Sample SWITCAP input fileAppendix C - First 3 pages of this paper (the complete paper is available from the course web page):

P.J. Hurst and S.H. Lewis, Determination of stability using return ratios in balanced fully dif-ferential feedback circuits. IEEE Transactions on Circuits and Systems II: Analog and Digital Signal

Processing, vol. 42, no. 12, pp. 805-817, Dec. 1995.

Appendix A: Running SWITCAP at UCDNote: SWITCAP is not the most user-friendly program. Its error messages can be confusing, and sometimesa major error in the input file will produce no output.I recommend that you run a simple test case, using the SWITCAP test input file on the 212 web page (lookjust below ’Homework 6’). Use the approach you plan to use when doing your homework (see options below).

The SWITCAP manual can be accessed from a link at http://www.ece.ucdavis.edu/cad/switcap/.

Option 1 - The safest and most reliable way to run SWITCAP :

Follow the directions on the 212 web page for ’How to run SWITCAP1 on a Linux computer’. (Unfor-tunately, the initial setup is little messy.) This method runs SWICAP1, which is fine for EEC212.

Option 2 - A less reliable way to run SWITCAP :

SWITCAP2 only runs on an older HP Unix system at UCD, and ECE support has set up an email serverto handle SWITCAP runs. To run SWITCAP2, do this:

Email to [email protected], with a subject ’switcap’ and with the SWITCAP input file included asthe body of the email. (Do not attach the input file to the email - that won’t work!)

Shortly after you send the email, the email server will send you a short reply with subject ’README!’acknowleging receipt of your input file. If you don’t get this email, your subject line wasn’t ’switcap’ or youremail address was wrong. Then a few minutes later, the email server should send you an email with subject”switcap output ...” that contains your SWITCAP output file.

WARNINGS: the SWITCAP email server sometimes stops running. If you are sure the SWITCAP emailserver is not running, please email to me and to support@ece. Also, using this email server only seems towork if you do everything on a Linux computer. If you create your input file on a PC and then submit it byemail, for example, it usually won’t work (because the end-of-line characters used on a PC that SWITCAP2doesn’t like.)

For a quick test, you can run this command on an ECE Linux computer (which always works for me ifthe computer running SWITCAP2 is working properly):mail [email protected] < /home/hurst/212/sw-test.in

Page 4: EEC 212 - Winter 2015 Problem Set 6 - Due: Feb. 20web.ece.ucdavis.edu/~hurst/EEC212/problem_sets/2015/ps6.pdf · EEC 212 - Winter 2015 Problem Set 6 - Due ... Transformed S-C Filter

HURST - EEC212 - PS6 4

Appendix B: Sample SWITCAP Circuit

The sample SWITCAP circuit is shown on Figure 5 and the corresponding netlist, which is the SWIT-CAP input file, is below. Note that #CLK means ’non-overlapping complement of CLK’.

+−

Vi

+av

Vo

C1

0.035pF

C2=0.25pf C3=1.00pf

CLK CLK

0

1 2 3

4

Figure 5: Sample SWITCAP problem (av = 5500)

Input netlist

TITLE: Sample SWITCAP Circuit;

TIMING;PERIOD 8E-6;CLOCK clk 1 (0 3/8);END;

CIRCUIT;S1 (1 2) clk;S2 (2 3) #clk;C1 (2 0) 0.035;C2 (1 3) 0.250;C3 (3 4) 1.000;E1 (4 0 0 3) 5500;V1 (1 0);END;

ANALYZE SSS;INFREQ 0.01 100000 LOG 15;SET V1 AC 1.0 0.0PRINT VR(4) VI(4)PLOT VDB(4) VP(4)END;

END;