Computer Generation of Sensitivities

advertisement
Computer Generation of Sensitivities
Sensitivity of Linear Algebraic Systems
Consider a linear system
(i)
TX = W
where T and W are, in general case, functions of
parameters h.
Differentiate (i) with respect to a single parameter hi
T
X T
W

X 
hi hi
hi
We are interested in derivatives of the response
vector, so we can get
(ii)
X
W 
1  T
 T 
X

hi
hi 
 hi
Very often, the output function is a linear
combination of the components hi of X
(iii)
 = d TX
where d is a constant vector (selector).
We will compute  / hi using the so called
adjoint method.
From (ii) and (iii) we get

W 
 T
 d T T 1 
X

hi
hi 
 hi
Let us define an adjoint vector Xa
X 
a T
 d T T 1
then, all the derivatives of the output function can be
computed from
T  T

W 
 X a  
X

(iv)
hi
hi 
 hi
and, from its definition, the adjoint vector can be
obtained by solving
(v)
TTXa = -d
Note that solution of this system can be obtained
based on LU factorization of the original system thus saving computations.
Example
Find sensitivity of vout with respect to G4.
C2=1
G1=1
-
+
++
+
+
E=1
-
G3=1
G4=4
Vout
-
System equations TX = W are
G1  C 2 s  C 2 s  v 4 
EG 1 
G  G
 v  = 


G
0
4
3   out 
 3


If we use s = 1 then the solution for X is
1
 v 4   2  1 1 1   1 1 1   1 / 3 
v   5  1 0  3   5 2 0    5 / 3
  

  

 out  
calculate
T


G4 G4
G1  sC2
G G
 3
4
 sC2  0 0

,
 G3  1 0
and
so
 T
w

X 
G4
 G4
 0
  
 1
 1

0 
0  3  


1

0  5    

 3   3 
0
Since vout = 0 1 X , we get d = 1 
 
and compute the adjoint vector from
 2 5   x1a 
T T X a  d   1  1  x a 
 2
0
 
 1
W 0

G4 0
a
 x1  1  1  5  0   5 / 3 

xa   3  1



2   1  2 / 3

 2
Finally the derivative
v out
W 
 0  2
a T  T




 X 
X

  5 / 3  2 / 3 


1
/
3
G4
G4 

 9
 G4
Finding a response of a network for different right
hand side vectors is easy using adjoint vectors.
Consider a system with different r.h.s. vectors:
TX i  Wi 

i  d T X i 
(vi)
We have

i  1, 2, ..., m

 
i  d T T 1 Wi    d T T 1 Wi   X a
T
Wi
(vii)
so all i can be obtained with a single analysis of the
adjoint system - this is significant saving comparing
to repeating forward and backward substitutions for
each vector Wi.
Adjoint Analysis in Electrical Networks
Modified nodal and tableau methods are best suited
for sensitivity calculations and have the following
features:
1. Right hand side vectors W and d in (i) and (v) are
sparse (only one or two elements in case of single
input, single output) so we can save time in
forward substitution solving for X and Xa.
2. Sensitivity to a source is simple, since in this case
T
0
h
W
 ei  e j
h
and
where eK is defined as a unit vector:
eKT  0 0 . . 01K 0. . . 0
So

  X0
h
  e
T
i
 e j   x aj  x ia
3. Sensitivity to a component is also simple, since
each component value appears in at most 4
locations in T matrix, so
T
T
 s v e i  e j e K  e L 
h
in t ersec tion
i
j
K
L
h h
h h
where v is 0 or 1.
Derivative of the output function is found as

 sv X a
h
  e
T
i


 e j eK  eL  X  s v xia  x aj xK  xL 
T
Example:
Consider the same network as before and
v out
calculate G . For the analyzed circuit we got
4
G1  C 2 s  C 2 s  v 4 
EG 1 
G  G
 v  = 


G
0
4
3   out 
 3


We find
 1
 3 
X  
 5 
 3 
and
Xa
5 
3 


2
   then we locate
 3 
G4 on intersection of row 2 and column 1 in T and
we get
vout
2  1 2
0
a
 s x2 x1        
G4
3  3 9
(only one multiplication).
 
4.Since not all components of X and Xa are required,
we can same time in back substitution solving for X
and Xa.
5.Sensitivity to op amps gain and parasitic elements
can be calculated without additional analysis. We
can use the same vectors X and Xa, since the nominal
value of a parasitic is zero. Suppose that we want to
find sensitivity with respect to a parasitic capacitance
CP between nodes i and j
i
j
Cp
According to the result presented in point 3, we have

 sx ia  x aj x i  x j 
.
C P
Noise Analysis Using Adjoint Vectors
Noise analysis is always performed with the use of
linear network model because amplitudes involved
are extremely small.
To illustrate how the adjoint analysis can be used in
estimation of the noise signal let us consider termal
noise of resistive element described by an
independent current source in parallel with resistor.
in 
4kT f
R
where K Boltzmann's constant
T temperature in Kelvins
f
frequency bandwidth
We assume that noise sources are random and
uncorrelated.
The mean-square value of the output noise energy is
V
n 2
n 2
1
 V
n
n 2
m
 V  ...  V
n
2
where Vi is the output signal due to the i-th noise
source. Since the noise sources are uncorrelated, we
cannot use superposition. Instead the linear circuit
has to be analyzed with different noise sources as
excitations (different r.h.s. vectors in system
equations). We can use equation (vii) to perform
noise analysis very efficiently. We will get
(viii)
n
W
where i
 
v X
n
i
a T
Win
n
V
represents i-th noise source. Since i
n

i
i
contains at most two entries
then only one
subtraction and one multiplication are needed for
each noise source.
Example
Calculate the signal-to-noise ration for the output
voltage. Ignore noise due to op-amp.
C2=1
G1=1
-
+
++
+
+
E=1
-
G3=1
G4=4
Vout
-
The adjoint vector was found in the previous
example.
 x1a   5 / 3 
 a


2
/
3
x

 2 
Using (viii) we have the nominal output
2  1 
5
a T
V0   x W0   
  
3  0
3
 
The same equation is used to obtain noise outputs:
V1n  X
W
a T
n
1
5
 
3
n

i
2 1 
5
      i1n
3  0 
3
5
V  
3
2  0  2 n
   n   i3
3   i3  3
5
V  
3
2  0  2 n
   n   i4
3   i4  3
n
3
n
4
About the only difficulty in this analysis is placement
of the noise source value in the r.h.s. vector
The total noise signal is
V
n 2
25 n 2 4 n 2 4 n 2
 i1  i3  i4
9
9
9
We can replace i
n
i
by
4 k T f Gi with
Gi 
1
Ri
to obtain
V
n 2

1
4kTf ( 25G1  4G3  4G4 ) 
9
1
4kTf ( 25  4  16)  20kTf
9
The noise is proportional to the frequency range and
temperature. Finally, the signal-to-noise ratio is
obtained as

V0
V
n

5
3
kTf 20
Download