File: SPpcBWexp.html

package info (click to toggle)
libtsp 3r0-1
  • links: PTS
  • area: non-free
  • in suites: potato, woody
  • size: 5,096 kB
  • ctags: 1,798
  • sloc: ansic: 14,464; sh: 1,217; makefile: 182
file content (109 lines) | stat: -rw-r--r-- 3,061 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<HTML>
<HEAD>
<TITLE>TSP (libtsp/SP) - SPpcBWexp</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFACD">
<H2>SPpcBWexp</H2>
<HR>
<H4>Routine</H4>
<DL>
<DT>
void SPpcBWexp (double bwexp, const float pc[], float pcb[], int Np)
</DL>
<H4>Purpose</H4>
<DL>
<DT>
Bandwidth expand a set of predictor coefficients
</DL>
<H4>Description</H4>
The procedure forms the bandwidth expanded version of a set of predictor
coefficients.  The roots of the all-pole LPC filter are radially scaled by
the factor bwexp.  This has the effect of increasing the bandwidth of the
resonant peaks in the frequency response (speech formants).  Let the
prediction error filter be
<PRE>
              Np       -k
  A(z) = 1 - SUM p(k) z  .
             k=1
</PRE>
The corresponding all-pole filter is 1/A(z).  The filter with the radially
scaled poles is 1/A(b*z).  The bandwith expanded polynomial A(b*z) has
coefficients,
<P>
<PRE>
   p'(k) = p(k) * b^k  for 1 &lt;= k &lt;= Np.
</PRE>
<P>
The effective bandwidth expansion of a sharp resonance can be determined
from that for an isolated pole pair.  Consider a simple filter with poles at
z1 = r exp (j w0) and z2 = r exp (-j w0),
<PRE>
               z^2 - 1
  H(z) = ------------------------- .
         z^2 - 2r cos(w0) z  + r^2
</PRE>
The frequency response of this filter has a peak at w = w0 with a 3 dB
bandwidth
<PRE>
  BW = pi/2 - 2 atan (r^2)     normalized radians.
</PRE>
<P>
If the pole positions are scaled radially, r' = r * b, with b &lt; 1, the
bandwidth of the resonance increases.  The increase in bandwidth can be
computed to be
<PRE>
  dBW = 2 atan (r^2 (1-b^2) / (1 + b^2 r^4))
</PRE>
For a 8 kHz sampling rate, the bandwidths expansions for different values
of b are shown below (calculated for r=1).
<PRE>
     b       BW exp
   1.000      0
   0.996     10.2 Hz
   0.995     12.8 Hz
   0.994     15.3 Hz
   0.990     25.6 Hz
   0.980     51.4 Hz
</PRE>
For speech analysis, bwexp is often chosen to give a bandwidth expansion of
10 to 25 Hz.
<P>
Predictor coefficients are usually expressed algebraically as vectors with
1-offset indexing.  The correspondence to the 0-offset C-arrays is as
follows.
<PRE>
  p(1)  &lt;==&gt; pc[0]       predictor coefficient corresponding to lag 1
  p(k)  &lt;==&gt; pc[k-1]     1 &lt;= k &lt; Np
  p'(1) &lt;==&gt; pcb[0]      predictor coefficient corresponding to lag 1
  p'(k) &lt;==&gt; pcb[k-1]    1 &lt;= k &lt; Np
</PRE>
<H4>Parameters</H4>
<DL>
<DT>
 -&gt; double bwexp
<DD>
Bandwidth expansion factor
<DT>
 -&gt; const float pc[]
<DD>
Input predictor coefficients (Np values)
<DT>
&lt;-  float pcb[]
<DD>
Output predictor coefficients (Np values).  The output values can overlay
the input values.
<DT>
 -&gt; int Np
<DD>
Number of predictor coefficients
</DL>
<H4>Author / revision</H4>
P. Kabal  Copyright (C) 1996
/ Revision 1.9  1996/05/30
<H4>See Also</H4>
<A HREF="SPcorBWexp.html">SPcorBWexp</A>
<P>
<HR>
Main Index <A HREF="../libtsp.html">libtsp</A>
</BODY>
</HTML>