You are on page 1of 15

SC Filter Frequency Response

Sampled data (and hence SC) filter responses are periodic CT and SD responses agree only for f << fs Derive exact SD frequency response
RC SC example z-transform SC integrator styles

A/D DSP

EECS 247 Lecture 10: SC Filter Frequency Response

2002 B. Boser 1

RC / SC Bandpass
RC / SC Biquad Comparison
CLK1 fs = 100kHz Netlist ahdl_include "zoh.def" R = 1.592MOhm fo = 10kHz Q = 10 Cint = 10pF Cs = 6.28pF Cd = 628fF Periodic AC Analysis PAC_lin sweep from 0 to 200k (500 steps) Periodic AC Analysis PAC_log log sweep from 10 to 200k (500 steps) R * Q = 15.92MOhm

Cint = 10pF

Cint = 10pF

R = 1.592MOhm -1M

R = -1.592MOhm -1M Vo_bp_rc Vo_lp_rc

phi1 phi2 Cd = 628fF phi1 phi2 phi1 phi2

Cs = 6.28pF phi1 phi2

Cint = 10pF Cs = 6.28pF Vin V1 ac = 1V phi1 phi2 phi1 phi2 -1M phi1 phi2

Cint = 10pF phi1 C s 6.28pF phi2 phi1 ZOH2 T = 10us Vo_bp_sc ZOH1 T = 10us -1M Vo_lp_sc

A/D DSP

EECS 247 Lecture 10: SC Filter Frequency Response

2002 B. Boser 2

Frequency response
SC Aliases

CT bandpass has zero at finfinity Where did that zero go in the SC filter? Note: fs/2 would be a reasonable place!

RC Filter

A/D DSP

EECS 247 Lecture 10: SC Filter Frequency Response

2002 B. Boser 3

Non-Inverting SC Integrator
Non-Inverting SC Integrator
CLK1 fs = 1MHz Transient Analysis to 3us 1pF Ci 1pF Cs Vi phi1a VS1 1V 150kHz phi2b Gm = 50uS phi2 phi1 phi2c Vo2 phi1c Vo1

A/D DSP

EECS 247 Lecture 10: SC Filter Frequency Response

2002 B. Boser 4

Transient Analysis

A/D DSP

EECS 247 Lecture 10: SC Filter Frequency Response

2002 B. Boser 5

Difference Equation
1 2 Qs(kT) = Cs Vi(kT) Qs(kT+T/2) = 0 Qi(kT) = Qi(kT-T/2) Qi(kT+T/2) = Qi(kT) + Qs(kT) = Qi(kT-T/2) + Qs(kT)

With Vo = Qi/Ci and Vi = Qs/Cs

Vo2(kT+T/2) = Vo2(kT-T/2) + (Cs/Ci) Vi(kT)


A/D DSP

EECS 247 Lecture 10: SC Filter Frequency Response

2002 B. Boser 6

Laplace Transform
Vo2(kT+T/2) = Vo2(kT-T/2) + (Cs/Ci) * Vi(kT)

Laplace Transform
+s T 2 s T 2

Vo 2 ( s )e

= Vo 2 ( s) e

Cs Vi ( s ) Ci

A/D DSP

EECS 247 Lecture 10: SC Filter Frequency Response

2002 B. Boser 7

z-Transform
Vo 2 ( s )e
+s T 2

= Vo 2 ( s )e

T 2

Cs Vi ( s ) Ci

z e sT Vo 2 ( z ) z 2 = Vo 2 ( z ) z 2 +
1 1

Cs Vi ( z ) Ci

Ref: Oppenheim and Schafer, Discrete-Time Signal Processing, Chapter 4

Vo 2 ( z ) = Vo 2 ( z ) z 1 +

1 Cs Vi ( z ) z 2 Ci

H int_ non-inverting_ 2 ( z ) = H int_ non-inverting_ 1 ( z ) =

Vo 2 ( z ) Cs z 2 = Vi ( z ) Ci 1 z 1
1

Vo1 ( z ) Cs z 1 = Vi ( z ) Ci 1 z 1

Note: the derivation assumes that the output is taken at the end of phase 2. If, as is often the case, the output is used only at the end of the next phase 1, the numerator is z-1.
2002 B. Boser 8

A/D DSP

EECS 247 Lecture 10: SC Filter Frequency Response

Frequency Response
H SC_ni ( f ) = H int_ni ( z ) z= e2jfT = Cs z 2 Cint 1 z 1
1

=
z= e
2 jfT

Cs 1 1 1 Cint z 2 z 2

2 = ejfT =cos fT +

j sin fT

C 1 = s Cint cos fT + j sin fT cos fT + j sin fT = Cs 1 Cint 2 j sin fT Cs 1 Cint 2jfT 1 2jfRC
2002 B. Boser 9

for

fT << 1 or

f << f s

H RC ( f ) =
A/D DSP

EECS 247 Lecture 10: SC Filter Frequency Response

Inverting SC Integrator
Inverting SC Integrator
CLK1 fs = 1MHz Transient Analysis to 3us 1pF Ci 1pF Cs Vi

phi1c

Vo1

VS1 1V 150kHz

Gm = 50uS phi2 phi2

phi2c

Vo2

H int_i ( z ) = H SC_i ( f ) =

Cs z 2 Cint 1 z 1
1

Cs 1 Cint 2 j sin fT

Note: Hint_i(z) assumes that the output is used at the end of phase 2. If, as is often the case, the output is used already at the end of phase 1, the numerator is 1. If, as is normally the case, circuit topologies are used where inverting and non-inverting SC integrators alternate, this is not an issue.
2002 B. Boser 10

A/D DSP

EECS 247 Lecture 10: SC Filter Frequency Response

Transient Analysis

A/D DSP

EECS 247 Lecture 10: SC Filter Frequency Response

2002 B. Boser 11

General SC Integrator
Ci phi1 C1 Vi1 phi2 Vo1 phi1 phi1c phi2 phi1 phi2c Vo2 phi2 phi1 C2 Vi2 phi1

phi2

phi2

C3 Vi3

Vo1 (z ) = Vo 2 ( z ) =
A/D DSP

C1 z 1 C 1 C Vi1 (z ) 2 Vi 2 (z ) 3 Vi 3 ( z ) Ci 1 z 1 Ci 1 z 1 Ci C1 z 2 C z 2 C V (z ) 2 Vi 2 ( z ) 3 Vi 3 ( z ) 1 i 1 Ci 1 z Ci 1 z 1 Ci
1 1

EECS 247 Lecture 10: SC Filter Frequency Response

2002 B. Boser 12

Integrator Signal Flow Diagram


Vi1 ( z )
C1 z 1
1 1 Cint 1 z 1

Vi 2 ( z ) Vi 3 ( z )

C2

Vo1 ( z )

C3 (1 z 1 )

A/D DSP

EECS 247 Lecture 10: SC Filter Frequency Response

2002 B. Boser 13

SFD of SC BP
Cs Cd

Vi ( z )

Cs

1 1 Cint 1 z 1

C s z 1

1 1 Cint 1 z 1

VLP ( z )

VBP ( z )

A/D DSP

EECS 247 Lecture 10: SC Filter Frequency Response

2002 B. Boser 14

Frequency Response of SC BP
VBP = VLP = 1 1 (CsVi + CsVLP + CdVBP ) Cint 1 z 1 1 z 1 ( CsVBP ) Cint 1 z 1

some work (Mason' s rule helps) z (z 1) f s 0 1 f s 1 f s z2 + 2 + + f + Q z s 0 0 Q 0 Cs 0 Cs 1 = = using : and Cint fs Cd Q H BP = VBP = Vi


A/D DSP

EECS 247 Lecture 10: SC Filter Frequency Response

2002 B. Boser 15

s-Plane versus z-Plane


s-plane

z-plane

A/D DSP

EECS 247 Lecture 10: SC Filter Frequency Response

2002 B. Boser 16

z-Plane
In the z-plane
The distance from the pole to the unit circle is inversely proportional to pole Q The angle to the pole is equal to 360 (or 2 radians) times the ratio of the pole frequency to the sampling frequency

How do poles and zeroes in the complex z-plane relate to frequency response?
A/D DSP

EECS 247 Lecture 10: SC Filter Frequency Response

2002 B. Boser 17

z-Domain Frequency Response


The j axis maps onto the unit circle Particular values:
f=0 z=1 f = fs/2 z = -1

(cos(T),sin(T))

The frequency response is obtained by evaluating H(z) on the unit circle at


z = ejT = cos(T)+jsin(T)

f = fs/2

2f fS
f=0

Once z=1 (fs/2) is reached, the frequency response repeats, as expected

A/D DSP

EECS 247 Lecture 10: SC Filter Frequency Response

2002 B. Boser 18

Pole-Zero Map in z-Plane


Pole-Zero Map 1 0.8 0.6

0.4

0.2 Imag Axis

-0.2

-0.4

The zero from finfinity is mapped to z=0, a non-physical frequency. This explains the poor attenuation at f=fs/2.

-0.6

-0.8

-1 -1

-0.8

-0.6

-0.4

-0.2

0 Real Axis

0.2

0.4

0.6

0.8

A/D DSP

EECS 247 Lecture 10: SC Filter Frequency Response

2002 B. Boser 19

Frequency Response
Bode Diagram 20 10 0 Magnitude (dB) -10 -20 -30 -40 -50 -60 -90 fs/f0 = 1000 100 10

-135 Phase (deg)

-180

-225

-270 10
2

10

10

10

Frequency (rad/sec)

A/D DSP

EECS 247 Lecture 10: SC Filter Frequency Response

2002 B. Boser 20

Frequency Warping
Frequency response
Continuous time (s-plane): Sampled time (z-plane): imaginary axis unit circle

Continuous to sampled time transformation


Should map imaginary axis onto unit circle How do SC integrators map frequencies?
H SC ( z ) = Cs z 2 Cint 1 z 1
1

Cs 1 Cint 2 j sin fT
2002 B. Boser 21

A/D DSP

EECS 247 Lecture 10: SC Filter Frequency Response

CT SC Integrator Comparison
CT Integrator
1 H RC ( s ) = s = 1 2jf RC
Identical time constants:

SC Integrator
H SC ( z ) = Cs z 2 Cint 1 z 1
1

Cs 1 Cint 2 j sin f SCT

= RC =

Cint f s Cs

Compare: HRC(fRC) = HSC(fSC)

f RC =

f s f SC sin f s
2002 B. Boser 22

A/D DSP

EECS 247 Lecture 10: SC Filter Frequency Response

LDI Integration
1 0.9

f RC =

f s f SC sin f s

0.8

0.7 0.6 fSC / f s

RC frequencies up to fs/ map to physical (real) SC frequencies Frequencies above fs/ do not map to physical frequencies Mapping is symmetric about fs/2 (aliasing) Accurate only for fRC << fs

0.5

0.4 0.3

0.2

0.1

0.05

0.1

0.15 fRC / fs

0.2

0.25

0.3

0.35

A/D DSP

EECS 247 Lecture 10: SC Filter Frequency Response

2002 B. Boser 23

Types of Integration
Signal Amplitude

Lossless discrete integration


H (z ) =
Time

z 2 1 z 1
1

Signal Amplitude

Bilinear integration (Delta rule)


vo (kT ) = vo (kT T ) +
Time

T [vi (kT ) + vi (kT T )] 2

(and many others, e.g. Euler, Runge Kutta, Gear, )


A/D DSP

EECS 247 Lecture 10: SC Filter Frequency Response

2002 B. Boser 24

Bilinear Transform
Bilinear integrator
vo (kT ) = vo (kT T ) +
1 1 o i

[1 z ]V ( z ) = T [1 + z ]V ( z ) 2
Frequency translation

T [vi (kT ) + vi (kT T )] 2

V ( z ) T 1 + z 1 H (z ) = o = Vi ( z ) 2 1 z 1

1 = H SC (z ) z =e 2jf SC T s s = 2jfRC f RC = f SC fs tan f s

A/D DSP

EECS 247 Lecture 10: SC Filter Frequency Response

2002 B. Boser 25

Bilinear Transform
0.5 0.45

f RC =

0.4

f SC fs tan f s

0.35 0.3 fS C / f s

Entire j axis maps onto the unit circle Mapping is nonlinear (tan distortion) prewarp specifications of RC prototype Matlab filter design automates this (see, e.g. bilinear)

0.25

0.2 0.15

0.1

0.05

0.5

1.5 fRC / f s

2.5

3.5

A/D DSP

EECS 247 Lecture 10: SC Filter Frequency Response

2002 B. Boser 26

Bilinear Bandpass
fs = 100kHz fc = fs/8 Q = 10 Matlab:
0.0378 z^2 - 0.0378 H(z) = ---------------------z^2 - 1.362 z + 0.9244
Pole-Zero Map 1 0.8

0.6

zero at fs/2
Imag Axis

0.4

0.2

-0.2

-0.4

-0.6

-0.8

-1 -1

-0.8

-0.6

-0.4

-0.2

0 Real Axis

0.2

0.4

0.6

0.8

A/D DSP

EECS 247 Lecture 10: SC Filter Frequency Response

2002 B. Boser 27

Martin-Sedra Biquad
Periodic AC Analysis PAC1 log sweep from 1k to 50k (300 steps)

K4 CA = 1.125pF phi1 phi1 phi2 phi2

CLK1 fs = 100kHz

K6 CA = 151.2fF

CA = 1pF

CB = 1pF

Vi

phi1

K1 CA = 0F

phi1

-1M

K5 CB = 500fF phi1 phi2 phi2 phi1

-1M

Vo

phi2 V1 ac = 1V

phi2

K2 CA = 151.2fF

K3 CB = 37.8fF

Vo (z ) K3 z 2 + ( 2 K 3 + K1K5 + K 2 K5 )z + (K3 K2 K5 ) = Vi (z ) z 2 + ( 2 + K 4 K5 + K5 K6 )z + (1 K5 K6 )
A/D DSP

Ref: K. Martin and A. S. Sedra, Strays-insensitive switchedcapacitor filters based on the bilinear z transform, Electron. Lett., vol. 19, pp. 365-6, June 1979.

EECS 247 Lecture 10: SC Filter Frequency Response

2002 B. Boser 28

Magnitude Response
0 -10

-20 Magnitude [dB]

-30

-40

-50

-60

-70

0.2

0.4

0.6

0.8

1 1.2 Frequency [Hz]

1.4

1.6

1.8 x 10

2
5

A/D DSP

EECS 247 Lecture 10: SC Filter Frequency Response

2002 B. Boser 29

LD vs Bilinear Transform
LDI transform:
Realized by standard SC integrators High frequency zeros are lost Simple filter synthesis:
Replace RC integrators with SC integrators Ensure that inverting and non-inverting integrators alternate in loops

Bilinear transform
Maps entire j axis onto unit circle (nonlinear mapping) Not implemented by standard SC integrators Synthesis:
Biquads: direct coefficient comparison Ladders: see R. B. Datar and A. S. Sedra, Exact design of strays-insensitive switched capacitor high-pass ladder filters, Electron. Lett., vol. 19, no 29, pp. 1010-12, Nov. 1983.

A/D DSP

EECS 247 Lecture 10: SC Filter Frequency Response

2002 B. Boser 30

You might also like