L2-Norm Objective Functions in MFB Design

advertisement
L2 -Norm Objective Functions in MFB Design
Frequency Responses of Symmetric FIR Prototype Filters
a) Filter Order N Even
When the filter order N is even the prototype filter h[n] has a single center tap. Then
the frequency response H(ejω ) can be written as
H(ejω ) =
N
X
N/2
X
h[n]e−jωn = e−jωN/2
n=0
h[n + N/2]e−jωn .
n=−N/2
If the summation is written in parts and reverse the sign of the index we get
N/2
X
H(ejω ) = e−jωN/2 h[N/2] +
h[n + N/2]e−jωn +
n=1
−1
X
h[n + N/2]e−jωn
n=−N/2
N/2
N/2
X
X
= e−jωN/2 h[N/2] +
h[n + N/2]e−jωn +
h[N/2 − n]ejωn
n=1
n=1
Due to symmetry h[n + N/2] = h[N/2 − n] when n = 1, 2, . . . , N/2 and the two
sums can be merged
N/2
jω
−jωN/2
−jωN/2
H(e ) = e
h[N/2] +
X
h[n + N/2] e−jωn + ejωn
n=1
N/2
=e
h[N/2] + 2
X
h[n + N/2] cos(nω) = ejφ(ω) H(ω)
n=1
The purely real part of H(ejω ) is the amplitude response H(ω) and the argument of
the complex exponential φ(ω) is the phase response.
b) Filter Order N Odd
Similarly as above we write the sum in parts
H(ejω ) =
N
X
(N −1)/2
X
h[n]e−jωn = e−jωN/2
n=0
h[n + (N + 1)/2]e−jω(n+1/2)
n=−(N +1)/2
= e−jωN/2
−1)/2
(NX
h[n + (N + 1)/2]e−jω(n+1/2)
n=0
+
−1
X
h[n + (N + 1)/2]e−jω(n+1/2)
n=−(N +1)/2
1
The second sum can be tweaked into a more convenient form
−1
X
h[n + (N + 1)/2]e−jω(n+1/2)
n=−(N +1)/2
0
X
=
h[(n − 1) + (N + 1)/2]e−jω((n−1)+1/2)
n=−(N −1)/2
(N −1)/2
0
X
=
h[n + (N − 1)/2]e−jω(n−1/2) =
X
h[(N − 1)/2 − n]ejω(n+1/2)
n=0
n=−(N −1)/2
and then recombined with the first one using the impulse response symmetry h[(N −
1)/2 − n] = h[n + (N + 1)/2] where n = 0, 1, . . . , (N − 1)/2:
H(ejω ) = e−jωN/2
−1)/2
(NX
h[n + (N + 1)/2]e−jω(n+1/2)
n=0
(N −1)/2
X
+
n=0
h[(N − 1)/2 − n] ejω(n+1/2)
{z
}
|
h[n+(N +1)/2]
(N −1)/2
= e−jωN/2 2
X
h[n + (N + 1)/2] cos (n + 1/2)ω
= ejφ(ω) H(ω).
n=0
L2 -Norm Stopband Objective for Lowpass FIR Filter
a) Filter Order N Even
It is adequate to use only the amplitude response H(ω) in the calculation of Es , i.e.,
the stopband energy:
Z π
Es =
H(ω)2 dω.
ωs
The lower bound of the integral ωs is the stopband edge. The expression for H(ω) is
pluged into the above equation and expanded:
Z
N/2
π
Es =
h[N/2] + 2
ωs
X
2
(h[N/2])2
ωs
n=1
+ 2 h[N/2]
π
h[n + N/2] cos(nω) dω =
N/2
X
Z
N/2
h[n + N/2] cos(nω) + 2 h[N/2]
n=1
X
h[m + N/2] cos(mω)
m=1
N/2 N/2
+4
XX
h[n + N/2]h[m + N/2] cos(nω) cos(mω) dω.
n=1 m=1
2
Before
integration the product
of cosines is replaced with cos(nω) cos(mω) =
m)ω + cos (n + m)ω and we may proceed:
N/2
h
2
Es = (h[N/2]) ω + h[N/2]
X
h[n + N/2]
n=1
N/2
+ h[N/2]
X
h[m + N/2]
m=1
1
2
cos (n−
2
sin(nω)
n
iπ
2
+ I,
sin(mω)
m
ωs
where
I=

N/2 N/2

XX



h[n +
4




 n=1 m=1
N/2 N/2
XX

h[n +
4




m=1
n=1




N
2 ]h[m
+
N
2 ]h[m
+
N
2]
h
ω+
h
1
n+m
N
1
2 ] n−m
iπ
sin((n + m)ω)
ωs
when n = m
sin((n − m)ω)
1
+ n+m
sin((n + m)ω)
iπ
ωs
when n 6= m.
If we substitute the upper limit π into Es we get multiple realizations of sin(kπ) = 0,
where k ∈ Z. Then these terms can be omitted. Furthermore, the matrix form of Es is
more convenient for optimization purposes:
Es = hT Ps h,
T
where h = h[N/2] h[N/2 + 1] · · · h[N ] . The elements of Ps are defined as
Ps n,m =


π − ωs
n=m=0



2


n = 0 and 0 < m ≤ N/2
− m sin(mωs )
m = 0 and 0 < n ≤ N/2
− n2 sin(nωs )


1

2 π − ωs − 2m
sin(2mωs )
n = m and 1 < n ≤ N/2



− 2 sin((n − m)ω ) − 2 sin((n + m)ω ) otherwise
s
s
n−m
n+m
b) Filter Order N Odd
The stopband energy for odd N is a bit easier to calculate
Z
π
Es =
(N −1)/2
ωs
Z
h[n + (N + 1)/2] cos (n + 1/2)ω
2
dω
(N −1)/2 (N −1)/2
4
ωs
X
n=0
π
=
2
X
X
n=0
m=0
h[n + (N + 1)/2]h[m + (N + 1)/2]
· cos (n + 1/2)ω cos (m + 1/2)ω dω.
3
Then it is only needed to carry out the integration
Z π
4
cos (n + 1/2)ω cos (m + 1/2)ω dω
ωs
Z π
cos (n − m)ω + cos (m + n + 1)ω
=4
dω
2
ωs
 h
iπ
1

2 ω +
n=m
sin (m + n + 1)ω
ωs
i
h 1n+m+1
=
π
1

2
n 6= m
sin (n − m)ω +
sin (m + n + 1)ω
n−m
n+m+1
ωs
 1

2 π − ωs −
sin (2m + 1)ωs
n=m
2m + 1
1
=
1

−2
n 6= m
sin (n − m)ωs +
sin (m + n + 1)ωs
n−m
n+m+1
= Ps n,m
and write the terms as the elements of matrix Ps as n, m = 0, 1, . . . , (N − 1)/2. When
Ps is inserted into the stopband energy equation
Es = hT Ps h,
T
the coefficient vector becomes h = h[(N + 1)/2] h[(N + 1)/2 + 1] · · · h[N ] .
L2 -Norm Passband Objective for Lowpass FIR Filter
a) Filter Order N Even
On the passband region [0, ωp ] we want the amplitude response to be approximately
constant. The required scaling of the prototype depends on the number of subchannels and is set by the constraint functions. The passband energy for the minimization
problem is thus
Z ωp
Z ωp
H(ω) − C 2 dω =
H(ω)2 − 2CH(ω) + C 2 dω
Ep =
0
0
= hT Pp h − 2pTp h + C 2 ωp
The first term of integral was previously calculated with different limits and we can
reuse the previous expressions. If we denote by Pp the matrix used in the computation
of Ep , its elements are given as
Pp n,m =


ωp
n=m=0



2


sin(mω
)
n
= 0 and 0 < m ≤ N/2
p
m
2
m = 0 and 0 < n ≤ N/2
n sin(nωp )


2 ωp + 1 sin(2mωp )
n
= m and 1 < n ≤ N/2

2m


 2 sin((n − m)ω ) + 2 sin((n + m)ω ) otherwise.
p
p
n−m
n+m
4
The vector pp is written elementwise as
(
Cωp
n=0
pp n =
2C/n sin(nωp ) 1 ≤ n ≤ N/2.
b) Filter Order N Odd
The same applies for odd filter orders when Ep is calculated with
Pp n,m
 1

2 ωp +
n=m
sin (2m + 1)ωp
1 2m + 1
=
1

2
n=
6 m
sin (n − m)ωp +
sin (m + n + 1)ωp
n−m
n+m+1
and
pp n = 2 C/(n + 1/2) sin (n + 1/2)ω .
Objective Function
The passband/stopband edges depend on the number of subchannels M . This can be
π(1−ρ )
s)
included to the optimization procedure by selecting ωp = 2M p and ωs = π(1+ρ
2M .
Typical values for the stopband roll-off are ρs ∈ [.5, 1.5]. The Ep criteria is often omitted in the optimization because the constraint functions shape the passband amplitude
response characteristics adequately. But if it is applied the parameter ρp must be within
[0, 1].
The parameter Ws ∈ [0, 1] is a term that can be used to adjust the weight of stopband energy. Then the `2 -norm objective for the MFB design is
E = Ws Es + (1 − Ws ) Ep
= hT Ws Ps + (1 − Ws )Pp h − 2(1 − Ws ) pTp h + (1 − Ws )C 2 ωp .
The closed form computation of the objective function gradient thus simplifies to
∇h E = 2 Ws Ps + (1 − Ws )Pp h − 2(1 − Ws ) pp .
By selecting Ws = 1 the passband energy is omitted.
Non-Symmetric Prototype Filters
Amplitude Response of Non-Symmetric Filters
When the impulse response symmetry does hold, the previously calculated versions of
Pp and Ps are not applicable. Instead, we find the expression for H(ω)2 by re-ordering
5
the summation
N
N
N
2 X
X
X
−jωn −jωn
H(ω) = h[n]e
h[n]e
h[n]ejωm
=
2
n=0
=
N
X
N
X
n=0
h[n]h[m]e−jω(n−m) =
n=0 m=0
+
N
−1
X
+
h[n]2 +
n=0
h[n + 1]h[n]e−jω + · · · +
n=0
1
X
n=0
N
X
1
X
N
−1
X
h[n]h[n + 1]ejω
n=0
h[n]h[n + N − 1]ejω(N −1)
n=0
h[n + N − 1]h[n]e−jω(N −1) + h[0]h[N ]ejωN + h[N ]h[0]e−jωN .
n=0
Simplifying the exponential terms produces
H(ω)2 =
N
X
n=0
··· + 2
1
X
h[n]2 + 2
N
−1
X
h[n]h[n + 1] cos(ω) + 2
n=0
N
−2
X
h[n]h[n + 2] cos(2ω)+
n=0
h[n]h[n + N − 1] cos (N − 1)ω + 2 h[0]h[N ] cos(N ω).
n=0
The integration of this function is a straightforward task.
Stopband Objective Function when h[n] Non-Symmetric
If the bounds of the integration are [ωs , π], the `2 -norm objective is
Z
π
Es =
ωs
+
2
2
N
−2
X
N
N
−1
h X
X
H(ω)2 dω = ω
h[n]2 + 2
h[n]h[n + 1] sin(ω)
n=0
h[n]h[n + 2] sin(2ω) + · · · +
n=0
n=0
1
2 X
h[n]h[n + N − 1] sin (N − 1)ω
N − 1 n=0
iπ
2
+ h[n]h[N ] sin(N ω)
N
ωs
The computation of Es = hT Ps h can be handled with a Toeplitz-matrix defined as


− sin(2ωs )
− sin(N ωs )
π − ωs
− sin(ωs )
2
N


− sin (N −1)ωs
 − sin(ω )

π
−
ω
−
sin(ω
)
·
·
·

s
s
s
N −1



− sin (N −2)ωs


s)
Ps =  − sin(2ω
−
sin(ω
)
π
−
ω
.
s
s
2
N −2


..
..


..


.
.
.


− sin (N −1)ωs
− sin (N −2)ωs
− sin(N ωs )
···
π − ωs
N
N −1
N −2
6
Passband Objective Function when h[n] Non-Symmetric
Now the filter delay dh ∈ [0, N ] is an adjustable parameter and it enters the passband
objective function:
Z ωp
Z ωp
jω
−jωdh 2
H(ω)2 − 2CRe ejωdh H(ejω ) + C 2 dω
dω =
H(e ) − Ce
Ep =
0
0
= hT Pp h − 2C
Z
ωp
Re
0
N
nX
o
h[n]e−j(n−dh )ω dω + C 2 ωp .
n=0
The matrix Pp is again Toeplitz

ωp
sin(ωp )

 sin(ω )
ωp

p

 sin(2ωp )
Pp = 
sin(ωp )
2

..


.

sin(N ωp )
N
sin (N −1)ωp
N −1
sin(2ωp )
2
···
sin(ωp )
ωp
..
sin (N −2)ωp
N −2
sin(N ωp )
N
sin (N −1)ωp
N −1
sin (N −2)ωp
N −2
..
.
.
···











ωp
and the second term can also be written as a vector dot product. First we carry out the
integration
Z
C
ωp
Re
0
=
N
nX
Z
o
h[n]e−j(n−dh )ω dω = C
0
n=0
N
ωp X
h[n] cos (n − dh )ω dω
n=0

N
h X

sin (n − dh )ω iωp

C
h[n]
+ Ch[dh ]ωp


n − dh
0

n=0
dh ∈ {0, 1, . . . , N }

N
hX

sin (n − dh )ω iωp



h[n]
C
n − dh
0
n=0
otherwise
n6=dh
= pTp h.
The elements of pp are thus

 1 sin (n − d )ω h
p
pp n = n − dh
Cω
p
when dh 6= n
when dh = n.
Objective Function for Non-Symmetric Prototype
In biorthogonal MFB design the analysis-synthesis reconstruction delay τ is an adjustable parameter: τ = N + D. Once the filter order is fixed, we may select D ∈
{−(N − M + 1), −(N − M ), . . . , N − M + 1}. Negative D values produce a low
delay system, D = 0 corresponds to a paraunitary system with a symmetric prototype
7
and positive a maximum-phase system. To embed this into the prototype filter design
we substitute dh = (N + D)/2.
These are all ingredients needed to write the objective function similarly with the
paraunitary design case:
E = Ws Es + (1 − Ws ) Ep
= hT Ws Ps + (1 − Ws )Pp h − 2(1 − Ws ) pTp h + (1 − Ws )C 2 ωp .
If the full weight is on the stopband, the biorthgonal constraints handle the passband
shaping.
Two-Prototype Design for 2x Oversampled EMFBs
`2 -Norm Objective Function
The 2x oversampled EMFB relaxes the constraints of the two prototype designs when
compared with the critically sampled case. The analysis and synthesis prototypes are
denoted with h[n] and f [n], respectively. This makes possible to optimize various
kind on parameter combinations and biorthogonality types. For example, one of the
prototypes can have a symmetric impulse response and the other is non-symmetric.
The `2 objective for all these cases has a similar form:
E = Whf Wsb,h Es,h + (1 − Wsb,h )Ep,h + (1 − Whf ) Wsb,f Es,f + (1 − Wsb,f )Ep,f .
The weight parameter Whf ∈ [0, 1] can be used to put more emphasis on the analysis
or synthesis portion of the objective function. There are also now two stopband weight
parameters Wsb,h and Wsb,f .
The passband and stopband edges are controlled with parameters ρp,h , ρp,f , ρs,h ,
and ρs,f . These are applied with the integration limits
π(1 − ρp,h )
2M
π(1 − ρp,f )
=
2M
π(1 + ρs,h )
2M
π(1 + ρs,f )
=
2M
ωp,h =
ωs,h =
ωp,f
ωs,f
If both h[n] and f [n] are symmetric, the objective function can be expanded as
follows:
Z π
Z ωp,h
H(ω) − C 2 dω
E = Whf Wsb,h
H(ω)2 dω + (1 − Wsb,h )
0
ωs,h
Z
π
+ (1 − Whf ) Wsb,f
F (ω)2 dω + (1 − Wsb,f )
ωs,h
Z
ωp,f
F (ω) − C 2 dω .
0
The value of the constant C depends on the scaling used with the constraint
√ functions.
In LT-toolbox the applied value depends on the decimation factor: C = M .
8
`∞ -Norm Objective for Single Prototype Designs
Paraunitary Design
In `∞ -norm design we use an equispaced frequency grid to formulate the objective
function. Let us denote the passband region with ωp and the stopband with Ωs . Then
we pick frequency points such that ωk ∈ Ωp ∪Ωs , i.e., the transition band is a don’t care
region. In the paraunitary case we can write the frequency response of the prototype
filter as H(ejω ) = H(ω)e−jωN/2 . If the desired zero-phase response is D(ω) and the
weight function W (ω) the minimization problem becomes
min max W (ωk )|H(ωk ) − D(ωk )|.
h
ωk
The prototype filter scaling by the constraint functions are taken into account by setting
(√
M ωk ∈ Ω p
D(ωk ) =
0
ωk ∈ Ωs .
One can emphasize the passband/stopband objective by selecting Wsb ∈ [0, 1] with the
weight function
(
1 − Wsb ωk ∈ Ωp
W (ωk ) =
Wsb
ωk ∈ Ωs .
Depending on the parity of N we have two alternative formulae for computing the
zero-phase response at ωk :
H(ωk ) =
 (N −1)/2
X



h[n] cos (N/2 − n)ωk

2
N odd
N/2−1

X



h[n] cos (N/2 − n)ωk
h[N/2] + 2
N even.
n=0
n=0
In both cases the above can be written as H(ωk ) = cT (ωk )h. Now comes the shift
move how an `∞ problem is transformed into an linear optimization problem; we add
an extra unknown ξ and optimize
min ξ
h,ξ
s.t.
or
W (ωk )cT (ωk )h − W (ωk )D(ωk ) ≤ ξ
−W (ωk )cT (ωk )h + W (ωk )D(ωk ) ≤ ξ
h
min [0T 1]
h,ξ
ξ
h
s.t. A
≤ b,
ξ
9
ωk ∈ Ω
where





A=




W (ω0 )cT (ω0 )
..
.


−1
W (ω0 )D(ω0 )

.. 
..

. 
.


 W (ωK )D(ωK )
W (ωK )cT (ωK ) −1 


and b = 
−W (ω0 )cT (ω0 ) −1 
 −W (ω0 )D(ω0 )


..
..
.. 


.
.
.
−W (ωK )D(ωK )
−W (ωK )cT (ωK ) −1





.




Biorthogonal Design
In the biorthogonal case the impulse response is not symmetric and we can’t separate
the zero-phase response as we did with the paraunitary MFB design. Secondly, the
desired frequency response D(ejω ) is now complex-valued
(√
M e−jωdh ωk ∈ Ωp
jω
D(e ) =
0
ωk ∈ Ωs .
Now the minimization problem is
p
min max W (ωk ) |H(ejωk ) − D(ejωk )|2 .
h
ωk
Since the square root is a monotonically increasing function and its argument belongs
to R+ we can alternatively minimize
min max W (ωk )2 |H(ejωk ) − D(ejωk )|2 .
h
ωk
The objective function without the weight can be written in a closed form with realvalued components
|H(ejωk ) − D(ejωk )|2 = hT P(ωk )h − 2pT (ωk )h + |D(ejωk )|2 ,
where




P(ωk ) = 


1
cos(ωk )
cos(2ωk )
cos(ωk )
1
cos(ωk )
..
.
cos(2ωk )
cos(ωk )
1
···
..
.
cos (N − 1)ωk
cos (N − 2)ωk
···
(√
M cos (n − dh )ωk
ωk ∈ Ωp
p(ωk ) n =
0
ωk ∈ Ωs ,
cos(N ωk )
and
(
|D(e
jωk
2
)| =
M
0
10
ω k ∈ Ωp
ωk ∈ Ωs .
cos(N ωk ) cos (N − 1)ωk cos (N − 2)ωk
..
.
1




,


The minimization problem is then rewritten using an extra variable
min ξ
s.t. hT W (ωk )2 P(ωk )h − 2W (ωk )2 pT (ωk )h + W (ωk )2 |D(ejωk )|2 ≤ ξ.
This can be streamlined into a minimization problem with N + 2 variables
h
T
min [0 1]
ξ
s.t. hT Pk h − 2pTk h + (1 − Wsb )2 M − ξ ≤ 0 ωk ∈ Ωp
hT Pk h − ξ ≤ 0
ω k ∈ Ωs
11
Download