Slides

advertisement
Lecture 3: Cascaded LTI systems,
SFGs, and Stability…
Instructor:
Dr. Gleb V. Tcheslavski
Contact: gleb@ee.lamar.edu
Office Hours: Room 2030
Class web site:
http://ee.lamar.edu/gleb/dsp/ind
ex.htm
ELEN 5346/4304
DSP and Filter Design
Fall 2008
1
2
Cascaded LTI
xn
h1,n
vn
h2,n
yn
(a)
yn   h vnk   h2,k  h1,l xnk l   h1,l  h2,k x( nl )k  h1n  wn
(3.2.1)
wn  h2,n  xn  yn  h1,n  h2,n  xn  yn  h2,n  h1,n  xn
(3.2.2)


l
l
k
According to (3.2.2), system (a) is equivalent to (b):
xn
h2,n
wn
h1,n
Note: this property is a result of linearity
ELEN 5346/4304
DSP and Filter Design
Fall 2008
yn
(b)
3
Fundamental direct forms of Signal
Flow Graph (SFG)
xn
b0
z-1
b1
S1n
z-1
-a2
h1,n
h2,n
wn
-a1
-a2
wn-1
z-1
z-1
z-1
m 
Fundamental Direct
form SFG
z-1
+
b1
+
b2
yn
xn
wn
+
+
-a1
-a2
h1,n
z-1
z-1
z-1
b0
b1
+
+
b2
…
wn-2
z-1
S3n
S4n
b0
z-1

…
DSP and Filter Design
z-1
z-1
…
…
h2,n
ELEN 5346/4304
+

yn   a ynk   bm xnm
z-1
-a1
b2
+
+
+
…
S2n
+
yn
…
z-1
xn
+
vn

Equivalent (Direct 2) form
Fall 2008
yn
4
SFG description
for the Fundamental Direct form SFG (for SOS):
Next state:
Output:
 S1,n 1   0 0

 
S
1 0
2, n 1 


Sn1  


b1 b2
S3,n 1

 
 S4,n 1   0 0
yn  b1 b2
0
0
a1
1
0 
1 
0 
0 
Sn    xn
b0 
a2 
 

0 
0 
a1 a2  Sn  b0 xn
S n 1  AS n  bxn 

T
yn  c S n  dxn 
(3.4.1)
(3.4.2)
(3.4.2)
Here {A,b,c,d} are state-space description. They represent one clock-cycle for a
piece of soft/hard-ware.
ELEN 5346/4304
DSP and Filter Design
Fall 2008
5
SFG description (cont)
A – the system matrix
b – input matrix
c – output matrix
d – transmission matrix
For the equivalent (Direct 2) form of SFG:
 a1 a2 
1 
Sn 1  
Sn    xn

0 
 1
0 
yn  b1  b0 a1 b2  b0 a2  S n  b0 xn
(3.5.1)
(3.5.2)
S n 1  AS n  bxn 


T
yn  c S n  dxn 
(3.5.3)
S1  AS0  bx0 ; y0  cT S0  dx0 ;
(3.5.4)
S2  A2 S0  Abx0  bx1; y1  cT  AS0  bx0   dx1 ;
(3.5.5)
S3  A3 S0  A2bx0  Abx1  bx2 ; y2  cT  A2 S0  Abx0  bx1   dx2 ; (3.5.6)
ELEN 5346/4304
DSP and Filter Design
Fall 2008
6
SFG description (cont 2)
n 1
Sn  A S0   An 1l bxl
n
(3.6.1)
l 0
n 1
n 1
 n

n 1l
T n
T
yn  c  A S0   A bxl   dxn  c A S0  c  An 1l bxl
l 0
l 0


y zi ,n
T
(3.6.2)
y zs ,n
Holds only for n-1-l ≥ 0
T n l
l
n 1
n 1
hn  S0  0;xn   n   cT  An 1l b l  d   c A bu
l 0
 d l
(3.6.3)
Markov parameters
For the DF 2, the initial state depends on initial conditions but it’s NOT the same!
Fundamental Direct form: {A, b, c, d}
Direct 2 form:
A,b,c,d

ELEN 5346/4304
DSP and Filter Design
These systems are equivalent in
terms of input/output!

Fall 2008
7
SFG description (cont 3)
For the DF2 (3.5.3):
S n 1  AS n  bxn 

T
yn  c S n  dxn 
Q.: can we find S-3?
It’s not trivial since we would need to know x-2 etc. However, we don’t really
need it!
ELEN 5346/4304
DSP and Filter Design
Fall 2008
8
SFG relations
Let’s say we need to find S0 if S0 is known…

 yzs ,n  yzs ,n
frominput / outputequivalence

 yzi ,n  yzi ,n
fundamental
n  0; y0  cT S0  c T S0

T
T
n  1; y1  c AS0  c AS0

zeroinput :n  2; y2  cT A2 S0  c T A2 S0 
...

n  N  1...

In our case, we only need two
equations (n=0 and n=1)
ELEN 5346/4304
DSP and Filter Design
(3.8.2)
direct 2
weuseasmanyequations,
asthereareunknownsinS0
c T 
 cT 
S0   T  T  S0
c A
 c A
Fall 2008
(3.8.1)
(3.8.3)
(3.8.4)
9
SFG and characteristic roots
forBIBOhn  0" fastenough "conditionson Athesystemmatrix
a1 a2 
  a1 a2 
DF 2 : A
  I  A  0 


1
0

1





(3.9.1)
 2  a1  a2  0characteristicequation
(3.9.2)
 - eigenvalue (characteristic root)
0

 1 
DF 1:  I  A  0 
 b1 b2

0
 0
(3.9.1)  (3.9.4) !!!
ELEN 5346/4304
DSP and Filter Design
0
0
(3.9.3)
0
0    0    a1  a2 

 0 ...



  a1 a2   1    1
 

1

 2 ( 2  a   a )  0 (3.9.4)
1
a1  a12  4a2
1,2 
2
Fall 2008
2
(3.9.5)
10
Stability triangle
for a causal BIBO system:
1 and  2  1 polesof transfer functionmustbeinsidetheu.c. 
(3.10.1)
 12  1
  a1  a2  0(  1 )(  2 )  0  (1  2 )  12 
2
2
a2  11 a2  1alwaysnecessaryandsufficientwhencomplexconjugateroots
(3.10.2)
if 12 arereal :1  1  2  1a12  4a2  0
(3.10.3)

a1  a12  4a2
1 
(3.10.4)
a2  a1  1

2


2
(3.10.5)
a2  a1  1
 a1  a1  4a2
1


2
Stability triangle

 a1  1  a2
foraBIBOSOS :

 a2  1
(3.10.6)
Coefficients must be inside the triangle
For systems of higher orders, there are no simple conditions – can always cascade!
ELEN 5346/4304
DSP and Filter Design
Fall 2008
11
Stability triangle
The parabola a2 = a12/4 splits the stability
triangle into two regions. The region below it
corresponds to real and distinct roots 1, 2:
Impulse
response:
b0
hn 
1n1  2n1  un

1  2
(3.11.1)
The points on the parabola result in real and
equal (double) roots (poles) 1, 2:
Impulse
response:
ELEN 5346/4304
hn  b0  n 1  nun
DSP and Filter Design
(3.11.2)
Fall 2008
12
Stability triangle
The points above the parabola (a12 < 4a2)
correspond to complex-conjugate roots 1, 2:
Assuming the roots (poles) in the form:
  re j 00 
0
(3.12.1)
the filter coefficients are:
a1  2r cos 0
a2  r
2
(3.12.2)
And the corresponding impulse response:
b0 r n e j  n 10  e  j  n 10
hn 
un
sin 0
2j
b0 r n

sin  n  1 0  un
sin 0
(3.12.3)
has a decaying oscillatory behavior.
ELEN 5346/4304
DSP and Filter Design
Fall 2008
13
More on SFG relations
Sn  QSn Sn  Q1Sn
(3.13.1)
 Sn 1  QSn 1  QASn  Qbxn  QAQ 1 Sn  Qb xn


b
 Sn1  ASn  bxn

A



T
T
T 1
y

c
S

dx

n
n
 n
 yn  c Sn  dxn  c Q Sn  dxn

cT




 A,b,c,d  QAQ1 ,Qb, cT Q1  ,d
hn  c Q
T
1
T
QAQ 
1 n 1

Qbun1  d n  cT Q 1  QAQ 1  QAQ 1  ... QAQ 1  Qbun1  d n
hn  cT An1bun1  dn  hn
DSP and Filter Design
(3.13.3)
(3.13.4)
(3.13.5)
Many systems are equivalent in terms of I/O, hn but are different inside!
State space description is not unique in terms “what’s going inside”!
ELEN 5346/4304
(3.13.2)
Fall 2008
14
Overflow control
Assume xn  Bx butwhat ' saboutstates ? Si ,n  Bs  Bx
(3.14.1)
maybe
Fixed-point representation may cause a state overflow!
xn
cs
cs-1
b0
yn
+
+
z-1
z-1
Consider a
-a
1
b1
S
yn/
+
1,n
+
second order
z-1 S3,n
z-1
-a
b2
system
2
S
S
2,n
4,n

 S1,n  Bx  1
Assume xn  Bx  

 S2,n  Bx  1
(3.14.2)
if  S3,n  Bx  1 S 4,n  Bx  1need tocontrol S3,n  yn / !
We cannot change the system - it’s given. Instead, we add a scaling coefficient
cs and cs-1 to compensate for it.
ELEN 5346/4304
DSP and Filter Design
Fall 2008
15
Overflow control (cont)
Determinant of SFG:
  1   Li  Li Lj   Li Lj Lk ...  1   a1z 1  a2 z 2   0  1  a1z 1  a2 z 2
i j
i
i
0
0
0 
 0
 1  
 1

 0  
0
0
0

 Sn  
 xn 
S

n

1
T n 1
cs b1 cs b2 a1 a2 
csb0  
letxn  yn / 
h3,n  c A bun 1  0



 
0
0
1
0
0



 

yn /  S3,n   0 0 1 0 Sn  [0]xn

maxS3,n   h3,n Bx  Bx selectcs suchthat h3,n  1
n
n
We may use the original hn to find the output  find cs – experiment!
cs does not change the determinant of SFG.
ELEN 5346/4304
DSP and Filter Design
Fall 2008
16
Overflow control (cont 2)
If we have a cascade…
xn
cs
cs-1
To make sure that the input of the 2nd
cascade is bounded
cs(2)
We can also embed cs into b-coeffs
a2
1
fromthestabilitytriangle : a1  2; a2  1
a1
wedividecoeffsby2toensuremagnitude1
1
1 2
-1
Implementations:
xn
c s b0
z-1
z-1
ELEN 5346/4304
c s b1
c s b2
DSP and Filter Design
+
+
2
cs-1
+
+
-a1/2
-a2/2
z-1
z-1
Fall 2008
yn
This way we add
quantization noise!
17
Overflow control (cont 3)
Alternative implementations:
1st option:
xn
xn
c s b0
z-1
2nd option:
1/2
z-1
c s b1
c s b2
2
+
+
cs-1
Drawbacks?
cs-1
+
+
+
-a1/2
z-1
-a1/2
-a2
yn
Add additional
components to
the system
z-1
1. It’s better to NOT divide a2 since it is less than 1  this way we don’t
introduce quantization noise.
2. We chose to divide by 2 since 2 is a minimum divider that bounds a1 to 1.
ELEN 5346/4304
DSP and Filter Design
Fall 2008
18
Overflow…
Assume we use 8 bits to
represent integer numbers…
obviously, from 0 to 255.
If A = 255
and B is just 1…
C = A + B = 256…
which cannot be represented
by 8 bits.
As a result
back
ELEN 5346/4304
DSP and Filter Design
Fall 2008
Download