Intermediate Reference System Filter

CCITT Recommendation P.48 specifies intermediate reference system filters.
These are filters that can be used to filter speech signals before and after
transmission.  Here we consider the design of a sending IRS filter.  This
filter can be used to filter speech signals before processing in a speech
coding system.

The IRS specifications are given as tabulated upper and lower bounds on the
frequency response of the filter.  The actual bounds are the straight line
segments on a dB - log frequency plot which join the tabulated values.
Furthermore tabulated nominal values are also given, but without a rule as to
how intermediate nominal values should be determined.

   freq   lower limit  nominal  upper limit  
    Hz       dB           dB        dB

    100                -45.8      -41
    125                -36.1
    160                -25.6
  < 200   -infty
    200    -21         -19.2      -16
    250                -14.3
    300                -11.3
    315                -10.8
    400    -11          -8.4       -6
    500                 -6.9
    600                 -6.3
    630                 -6.1
    800                 -4.9
   1000                 -3.7
   1250                 -2.3
   1600                 -0.6
   2000                  0.3
   3000     -1           1.5
   3150                  1.8
   3400     -4           ---      +6
 > 3400    -infty
   3500                 -7.3
   3600                           +4
   4000                -37.2
   5000                -52.2
   6000                          -60
   6300                -73.6
   8000                -90.0

The filter will be designed for 8 kHz sampling, so that only values up to 4 kHz
will be of interest.  This design would seem to be a candidate for the use of
limits in the input to DFiltFIR.  However, one normally uses limits when one
expects the approximation to actually hit the limits.  Here we want a filter
which fits well inside the limits.  We will use the P.48 limit curves to set
the weights, so that the excursion of the approximation about the nominal
values will depend on the distance between the limit curves.

As a first step we need to be able to sample the limit curves.  The P.48 limit
curves are linear on a log-log scale.  To sample these we have to write a
short program to sample the curves.  These values are then used to design the
filter.

We will use a filter length of 151.  Smaller lengths as low as 33 will design
filters which fall within the specifications, but which exhibit relatively
large ripples about the desired values.

The filter specification does not cover frequencies below 100 Hz.  Without
any specification below 100 Hz, the attenuation at dc is about 30 dB.  This dc
attenuation is less than the required minimum attenuation at 100 Hz (41 dB).
The response has a null at about 65 Hz.  To push the dc response lower, we
experimentally determine weights for the frequencies below 100 Hz.  The
response is very sensitive to the specification in this region.  We want to
avoid allocating any new extrema to frequencies below 100 Hz.  With the
specifications in the example below, the dc attenuation is below 45 dB and the
null has moved to just above 30 Hz.  (The extra weighing at 68 Hz is to avoid
a small local maximum at that frequency.)

DFiltFIR -n 151 -s 8000 Ex3-2.cof << EoF
0	0		10
68	0		12
90	0		10

100	0.00512861	264.278
125	0.0156675	146.107
160	0.0524807	97.4099
200	0.109648	48.7261
250	0.192752	27.1415
300	0.27227		25.9538
315	0.288403	20.5622
400	0.380189	10.1677
500	0.451856	7.87476
600	0.484172	7.76066
630	0.49545		7.6871
800	0.568853	6.66422
1000	0.65313		5.63758
1250	0.767362	4.4069
1600	0.933254	3.41011
2000	1.03514		3.04693
2500	1.23027		2.46451
3000	1.1885		3.36418
3150	1.23027		2.21588
3400	0.630957	5.01409
3401	0.630957	0.732975
3500	0.431519	0.744136
4000	0.0138038	3.00373
EoF

$Id: Example3,v 1.1 1994/06/03 FilterDesign-V1R7a $
