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
Amp
Scale
Department of EECS University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
“Proof” for Linear Systems
Prof. A. Niknejad
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: y
L ( x )
ax
b
1 d x
b
2 d
2 dt
2 x
c
1
x
c
2
x
c
3
x dt
For a complex exponential input x this simplifies:
y
L ( e j
t
) y
ae j
t y
ae j
t
Hx
b
1
b
1 j
e j
t d dt e j
t
b
2
(
b
2 d 2 dt
2 j
)
2 e j
t e j
t
c
1 c
1
e j
t j
e
j
t c
2
e j
t
a
b
1 j
b
2
( j
)
2 c
1 j
(
e c
2 j
t
e j
) 2 j
t
( j c
2
)
2
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
a
b
1 j
b
2
( j
)
2 c
1 j
( c
2 j
)
2
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
a
b
1 j
b
2
( j
)
2 c
1 j
( j c
2
)
2
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
Complex Transfer Function
Prof. A. Niknejad
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:
H
y x
a
b
1 j
b
2
( j
)
2 c
1 j
( c
2 j
)
2
We can write this in canonical form as a rational function:
H (
)
n
1 d
1
n
2
d
2 j
j
n
3
( d
3
( j
)
2 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 ) i ( t )
+
Arbitrary LTI
Circuit 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)
Z (
)
H (
)
V
I
V
I e j (
v
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 ) i ( t )
+
Arbitrary LTI
Circuit 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)
Y (
)
H (
)
I
V
I
V e j (
i
v
)
Department of EECS University of California, Berkeley
Prof. A. Niknejad EECS 105 Fall 2003, Lecture 2
Voltage and Current Gain
The voltage (current) gain is just the voltage
(current) transfer function from one port to another port:
+ + v
1
( t ) i
1
( t )
Arbitrary LTI
Circuit i
2
( t ) v
2
( t )
– –
G v
(
)
V
2
V
1
V
2
V
1 e j (
2
1
)
G i
(
)
I
2
I
1
I
2
I
1 e j (
2
1
)
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
Transimpedance/admittance
Prof. A. Niknejad
Current/voltage gain are unitless quantities
Sometimes we are interested in the transfer of voltage to current or vice versa
+ + v
1
( t ) i
1
( t )
Arbitrary LTI
Circuit i
2
( t ) v
2
( t )
– –
J (
)
V
2
I
1
V
2 e j (
2
1
)
I
1
K (
)
I
2
V
1
I
V
1
2 e j (
2
1
)
[
]
[ S ]
Department of EECS 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:
P av
P av
i (
) v (
) d
T
T
In terms of sinusoids we have
I cos(
t
i
) V cos(
t
v
) d
I
I
I
V
V
V
T
(cos
t cos
i
T d
sin
t sin
i
)
(cos
t cos
v cos
2
t cos
i cos
v
sin
2 sin
i sin
v
sin
t sin
v
) d
c sin
t cos
t
(cos
i cos
v
sin
i sin
v
)
I
V
2 cos(
i
v
)
University of California, Berkeley
EECS 105 Fall 2003, Lecture 2 Prof. A. Niknejad
Power Flow with Phasors
P av
I
V cos(
i
v
)
2
(
i
v
Power Factor
2
P av
I
V cos(
/ 2 )
2
Important: Power is a non-linear function so we
can’t simply take the real part of the product of the
0 phasors:
P
Re[ I
V ]
From our previous calculation:
P
I
V
2 cos(
i
v
)
1
2
Re[ I
V
*
]
1
2
Re[ I
*
V ]
Department of EECS University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
More Power to You!
In terms of the circuit impedance we have:
2
P
1
2
Re[ I
V
*
]
1
2
Re[
V
Z
V
*
]
V
2
Re[ Z
1
]
V
2
2
Re[
Z
*
2
]
Z
2
V
2 Z
2
Re[ Z
*
]
2
V
2 Z
2
Re[ Z ]
Check the result for a real impedance (resistor)
Also, in terms of current:
P
1
2
Re[ I
*
V ]
1
2
Re[ I
*
I
Z ]
I
2
Re[ Z ]
2
Prof. A. Niknejad
Department of EECS University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Direct Calculation of H (no DEs)
Prof. A. Niknejad
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:
Z
R Z
1
R C j
C
Department of EECS University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
LPF … Voltage Divider
Prof. A. Niknejad
Fast way to solve problem is to say that the LPF is really a voltage divider
H (
)
V o
V s
Z
C
Z
C
Z
R
R
1 j
C
1 j
C
1
1 j
RC
Department of EECS University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Bigger Example (no problem!)
Prof. A. Niknejad
Consider a more complicated example:
Z eff
H (
)
V o
V s
Z eff
Z
C
2
Z
C 2
Z eff
R
2
R
1
|| Z
C 1
H (
)
R
2
Z
C 2
R
1
|| Z
C 1
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
Building Tents: Poles and Zeros
Prof. A. Niknejad
For most circuits that we’ll deal with, the transfer function can be shown to be a rational function
H (
)
n
1 d
1
n
2
d
2 j
j
n
3
( d
3
( j
)
2 j
)
2
The behavior of the circuit can be extracted by finding the roots of the numerator and deonminator
H (
)
(
( z
1 p
1
j
)( j
)( z
2 p
2
j
) j
)
(
( z i p i
j
) j
)
H (
)
Or another form (DC gain explicit)
G
0
( j
)
K
( 1
( 1
j j
z 1
)( 1
)( 1
p 2 j
j
z 2
) p 2
)
G
0
( j
)
K
( 1
( 1
j
z , i
) j
p , i
)
Department of EECS University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Poles and Zeros (cont)
“poles”
The roots of the numerator are called the
“zeros” since at these frequencies, the transfer function is zero
Prof. A. Niknejad
The roots of the denominator are called the “poles”, since at these frequencies the transfer function peaks
(like a pole in a tent)
H (
)
( z
1
( p
1
j
)( j
)( z
2 p
2
j
) j
)
Department of EECS University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Finding the Magnitude (quickly)
Prof. A. Niknejad
The magnitude of the response can be calculated quickly by using the property of the mag operator:
H (
)
G
0
( j
)
K
G
0
K
( 1
( 1
j j
z 1
)( 1 p 2
)( 1
j
j
z 2
) p 2
)
1
1
j
z 1 j
p 2
1
1
j
z 2 j
p 2
The magnitude at DC depends on G
0 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 G
0
Department of EECS University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Finding the Phase (quickly)
Prof. A. Niknejad
As proved in HW #1, the phase can be computed quickly with the following formula:
H (
)
G
0
( j
)
K
( 1
( 1
j j
z 1
)( 1 p 2
)( 1
j
j
z 2
) p 2
)
G
0
( 1
( j
)
K j
p 1
)
( 1
( 1
j
z 1
)
j
p 2
)
( 1
j
z 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
Example: High-Pass Filter
Prof. A. Niknejad
Using the voltage divider rule:
H (
)
R
H ( j
L
j
L
)
1
1
j
j
j
L j
R
L
R
H
j
j
1
0
1
H
0
1
0
0
H
1
j j
1
2
Department of EECS University of California, Berkeley
Prof. A. Niknejad EECS 105 Fall 2003, Lecture 2
HPF Magnitude Bode Plot
Recall that log of product is the sum of log
H (
) dB
1
j
j
dB
j
dB
1
1 j
dB j
dB
1
j
dB
0 dB
40 dB
Increase by 20 dB/decade
Equals unity at breakpoint
20 dB
20 dB
0.1
0 dB
1
-20 dB
10 100
Department of EECS University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
HPF Bode Plot (dissection)
Prof. A. Niknejad
The second term can be further dissected:
1
1 j
dB
0 dB
1
j
dB
0 dB
.
1 /
-20 dB
-40 dB
-60 dB
1 /
10 /
20 dB
1
1
1
0 dB
-20 dB/dec
~ -3dB
1
- 3dB
Department of EECS University of California, Berkeley
EECS 105 Fall 2003, Lecture 2 Prof. A. Niknejad
Composite Plot
Composit is simply the sum of each component: j
dB
1
1 j
dB j
dB
High frequency ~ 0 dB Gain
Low frequency attenuation
0 dB .
1 /
-20 dB
1 /
10 /
1
1 j
dB
-40 dB
Department of EECS University of California, Berkeley
EECS 105 Fall 2003, Lecture 2
Approximate versus Actual Plot
Prof. A. Niknejad
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:
H (
)
1
j
j
j
1
1 j
tan
1
2
First term is simply a constant phase of 90 degrees
The second term is a classic arctan function
Estimate argtan function:
1
1
-45
Actual curve
1
University of California, Berkeley Department of EECS
-90