Lecture 2: Transfer Functions - University of California, Berkeley

Download Report

Transcript Lecture 2: Transfer Functions - University of California, Berkeley

EECS 105 Fall 2003, Lecture 2
Lecture 2: Transfer Functions
Prof. Niknejad
Department of EECS
University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Prof. A. Niknejad
Review of LTI Systems

Since most periodic (non-periodic) signals can be
decomposed into a summation (integration) of
sinusoids via Fourier Series (Transform), the
response of a LTI system to virtually any input is
characterized by the frequency response of the
system:
Phase Shift
Any linear circuit
With L,C,R,M
and dep. sources
Department of EECS
Amp
Scale
University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Prof. A. Niknejad
“Proof” for Linear Systems

For an arbitrary linear circuit (L,C,R,M, and
dependent sources), decompose it into linear suboperators, like multiplication by constants, time
derivatives, or integrals:
d
d2
y  L( x)  ax  b1 x  b2 2 x    c1  x  c2  x  c3  x  
dt
dt

For a complex exponential input x this simplifies:
2
d
d
y  L(e jt )  ae jt  b1 e jt  b2 2 e jt    c1  e jt  c2  e jt  
dt
dt
jt
jt
e
e
y  ae jt  b1 je jt  b2 ( j ) 2 e jt    c1
 c2

2
j
( j )

c1
c2
jt 
2
y  Hx  e  a  b1 j  b2 ( j )   

 
2
j ( j )


Department of EECS
University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Prof. A. Niknejad
“Proof” (cont.)

Notice that the output is also a complex exp times a
complex number:
y  Hx  e

jt


c1
c2
2
 a  b1 j  b2 ( j )   

 
2
j ( j )


The amplitude of the output is the magnitude of the
complex number and the phase of the output is the
phase of the complex number
y  Hx  e
jt


c1
c2
2
 a  b1 j  b2 ( j )   

 
2
j ( j  )


y  e jt H ( ) e j  H ( )
Re[ y ]  H ( ) cos(t   H ( ))
Department of EECS
University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Prof. A. Niknejad
Complex Transfer Function



Excite a system with an input voltage (current) x
Define the output voltage y (current) to be any node
voltage (branch current)
For a complex exponential input, the “transfer
function” from input to output:

y 
c1
c2
2

H    a  b1 j  b2 ( j )   

 
2
x 
j ( j )


We can write this in canonical form as a rational
function:
n1  n2 j  n3 ( j ) 2  
H ( ) 
d1  d 2 j  d 3 ( j ) 2  
Department of EECS
University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Prof. A. Niknejad
Impede the Currents !

Suppose that the “input” is defined as the voltage of
a terminal pair (port) and the “output” is defined as
the current into the port:
+
v (t )
Arbitrary LTI
Circuit
i (t )
v(t )  Ve jt  V e j (t v )
i (t )  Ie jt  I e j (t i )
–

The impedance Z is defined as the ratio of the
phasor voltage to phasor current (“self” transfer
function)
V V j (v i )
Z ( )  H ( )   e
I
I
Department of EECS
University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Prof. A. Niknejad
Admit the Currents!

Suppose that the “input” is defined as the current of
a terminal pair (port) and the “output” is defined as
the voltage into the port:
+
v (t )
Arbitrary LTI
Circuit
i (t )
v(t )  Ve jt  V e j (t v )
i (t )  Ie jt  I e j (t i )
–

The admmittance Z is defined as the ratio of the
phasor current to phasor voltage (“self” transfer
function)
I
I j (i v )
Y ( )  H ( )   e
V V
Department of EECS
University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Prof. A. Niknejad
Voltage and Current Gain

The voltage (current) gain is just the voltage
(current) transfer function from one port to another
port:
+
+
v1 (t )
Arbitrary LTI
Circuit
i1 (t )
–
Gv ( ) 
i2 (t )
v2 (t )
–
V2 V2 j (2 1 )

e
V1 V1
I 2 I 2 j (2 1 )
Gi ( )  
e
I1
I1


If G > 1, the circuit has voltage (current) gain
If G < 1, the circuit has loss or attenuation
Department of EECS
University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Prof. A. Niknejad
Transimpedance/admittance


Current/voltage gain are unitless quantities
Sometimes we are interested in the transfer of
voltage to current or vice versa
+
v1 (t )
+
Arbitrary LTI
Circuit
i1 (t )
–
Department of EECS
i2 (t )
v2 (t )
–
V2 V2 j (2 1 )
J ( ) 

e
I1
I1
[ ]
I 2 I 2 j (2 1 )
K ( )  
e
V1 V1
[S ]
University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Prof. A. Niknejad
Power Flow


The instantaneous power flow into any element is
the product of the voltage and current: P(t )  i(t )v(t )
For a periodic excitation, the average power is:
Pav   i( )v( )d
T

In terms of sinusoids we have
Pav   I cos(t  i ) V cos(t  v )d
T
 I  V  (cos t cos i  sin t sin i )  (cos t cos v  sin t sin v )d
T
 I  V  d cos 2 t cos i cos v  sin 2 sin i sin v  c sin t cos t
T

I V
2
(cos i cos v  sin i sin v ) 
Department of EECS
I V
2
cos(i  v )
University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Prof. A. Niknejad
Power Flow with Phasors
Pav 
I V
2
cos(i  v )
Power Factor



I V
cos( / 2)  0
Note that if (i  v )  , then Pav 
2
2
Important: Power is a non-linear function so we
can’t simply take the real part of the product of the
phasors:
P  Re[ I  V ]

From our previous calculation:
P
Department of EECS
I V
2
1
1
*
cos(i  v )  Re[ I V ]  Re[ I * V ]
2
2
University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Prof. A. Niknejad
More Power to You!

In terms of the circuit impedance we have:
2
V
1
1
V *
*
P  Re[ I V ]  Re[ V ] 
Re[ Z 1 ]
2
2
Z
2



V
2
2
Re[
Z
Z
*
]
2
V
2Z
2
2
Re[ Z * ] 
V
2Z
2
2
Re[ Z ]
Check the result for a real impedance (resistor)
Also, in terms of current:
2
I
1
1
*
*
P  Re[ I V ]  Re[ I  I  Z ] 
Re[ Z ]
2
2
2
Department of EECS
University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Prof. A. Niknejad
Direct Calculation of H (no DEs)



To directly calculate the transfer function
(impedance, transimpedance, etc) we can
generalize the circuit analysis concept from the
“real” domain to the “phasor” domain
With the concept of impedance (admittance), we
can now directly analyze a circuit without explicitly
writing down any differential equations
Use KVL, KCL, mesh analysis, loop analysis, or
node analysis where inductors and capacitors are
treated as complex resistors
Department of EECS
University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Prof. A. Niknejad
LPF Example: Again!


Instead of setting up the DE in the time-domain,
let’s do it directly in the frequency domain
Treat the capacitor as an imaginary “resistance” or
impedance:
→
time domain “real” circuit

frequency domain “phasor” circuit
Last lecture we calculated the impedance:
ZR  R
Department of EECS
1
ZC 
jC
University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Prof. A. Niknejad
LPF … Voltage Divider

Fast way to solve problem is to say that the LPF is
really a voltage divider
1
V
ZC
1
jC
H ( )  o 


Vs Z C  Z R R  1
1  jRC
jC
Department of EECS

University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Prof. A. Niknejad
Bigger Example (no problem!)

Consider a more complicated example:
Z eff
Vo
ZC 2
H ( ) 

Vs Z eff  Z C 2
Z eff  R2  R1 || Z C1
ZC 2
H ( ) 
R2  R1 || Z C1  Z C 2
Department of EECS
University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Prof. A. Niknejad
Does it sound better?





Application of LPF: Noise Filter
Listen to the following sound file (voice corrupted
with noise)
Since the noise has a flat frequency spectrum, if we
LPF the signal we should get rid of the highfrequency components of noise
The filter cutoff frequency should be above the
highest frequency produced by the human voice (~
5 kHz).
A high-pass filter (HPF) has the opposite effect, it
amplifies the noise and attenuates the signal.
Department of EECS
University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Prof. A. Niknejad
Building Tents: Poles and Zeros

For most circuits that we’ll deal with, the transfer
function can be shown to be a rational function
n1  n2 j  n3 ( j ) 2  
H ( ) 
d1  d 2 j  d 3 ( j ) 2  

The behavior of the circuit can be extracted by
finding the roots of the numerator and deonminator
( z1  j )( z2  j )   ( zi  j )
H ( ) 

( p1  j )( p2  j )   ( pi  j )

Or another form (DC gain explicit)
(1  j z1 )(1  j z 2 ) 
H ( )  G0 ( j )
 G0 ( j ) K
(1  j p 2 )(1  j p 2 ) 
K
Department of EECS
 (1  j
 (1  j
z ,i
)
p ,i
)
University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Prof. A. Niknejad
Poles and Zeros (cont)

The roots of the
numerator are called the
“zeros” since at these
frequencies, the transfer
function is zero

The roots of the
denominator are called
the “poles”, since at
these frequencies the
transfer function peaks
(like a pole in a tent)
Department of EECS
“poles”
H ( ) 
( z1  j )( z 2  j ) 
( p1  j )( p2  j ) 
University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Prof. A. Niknejad
Finding the Magnitude (quickly)

The magnitude of the response can be calculated
quickly by using the property of the mag operator:
(1  j z1 )(1  j z 2 ) 
H ( )  G0 ( j )
(1  j p 2 )(1  j p 2 ) 
K
 G0 

K
1  j z1 1  j z 2 
1  j p 2 1  j p 2 
The magnitude at DC depends on G0 and the
number of poles/zeros at DC. If K > 0, gain is zero.
If K < 0, DC gain is infinite. Otherwise if K=0,
then gain is simply G0
Department of EECS
University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Prof. A. Niknejad
Finding the Phase (quickly)

As proved in HW #1, the phase can be computed quickly
with the following formula:
K (1  j z1 )(1  j z 2 ) 
 H ( )  G0 ( j )
(1  j p 2 )(1  j p 2 ) 
 G0   ( j ) K   (1  j z1 )  (1  j z 2 )  
  (1  j p1 )  (1  j p 2 )  

No the second term is simple to calculate for positive
frequencies:
 ( j )  K
K


2
Interpret this as saying that multiplication by j is equivalent
to rotation by 90 degrees
Department of EECS
University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Prof. A. Niknejad
Bode Plots




Simply the log-log plot of the magnitude and phase
response of a circuit (impedance, transimpedance, gain, …)
Gives insight into the behavior of a circuit as a function of
frequency
The “log” expands the scale so that breakpoints in the
transfer function are clearly delineated
In EECS 140, Bode plots are used to “compensate” circuits
in feedback loops
Department of EECS
University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Prof. A. Niknejad
Example: High-Pass Filter

Using the voltage divider rule:
L
j
R
j L
H ( ) 

R  j L 1  j  L
R
j
H ( ) 
1  j
 
j
H 
1
j
0
 0 H 
0
1 0
1
j
1

H 


1 j
2
Department of EECS
University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Prof. A. Niknejad
HPF Magnitude Bode Plot

Recall that log of product is the sum of log
H ( ) dB
j
j

1  j
dB
1
 j dB 
1  j
dB
Increase by 20 dB/decade
  1  j dB  0 dB Equals unity at breakpoint
dB
40 dB
20 dB
20 dB
0 dB
0.1
1
10
100
-20 dB
Department of EECS
University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Prof. A. Niknejad
HPF Bode Plot (dissection)

The second term can be further dissected:
1
1  j
0 dB
.1/ 
-20 dB
1/ 
 0 dB  1  j
dB
dB
 
10 / 
1

1
 

1


20 dB
-40 dB
-60 dB
0 dB
-20 dB/dec
~ -3dB
- 3dB

Department of EECS
1

University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Prof. A. Niknejad
Composite Plot

Composit is simply the sum of each component:
1
j dB 
1  j
j
dB
0 dB
.1/ 
1/ 
dB
High frequency ~ 0 dB Gain
10 / 
Low frequency attenuation
-20 dB
1
1  j
dB
-40 dB
Department of EECS
University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Prof. A. Niknejad
Approximate versus Actual Plot


Approximate curve accurate away from breakpoint
At breakpoint there is a 3 dB error
Department of EECS
University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Prof. A. Niknejad
HPF Phase Plot

Phase can be naturally decomposed as well:
j
1

 H ( ) 
 j  
  tan 1 
1  j
1  j 2



First term is simply a constant phase of 90 degrees
The second term is a classic arctan function
Estimate argtan function:
 
1


-45
1

Actual curve
-90
Department of EECS
 
1

University of California, Berkeley