# Correcting Impulse Invariance Method

Started by March 14, 2016
```I'm trying to find out if the correction (Jackson, Nelatury,
Mecklenbr&auml;uker) could improve the (IIM based) filter's magnitude response
near Nyqvist.

Here's my c++ routine (which is used for to calculate various RIAA and
non-RIAA filters by just changing the timeconstant values and
samplerate):

double a0, a1, a2, b0, b1, b2;
double fs = 44100;
//timeconstants (case RIAA):
// frequency -> time conversion 1/(2*pi*fc) (= R*C)
//poles
double p1 = 3180e-6; // 1/(2*pi*50.05Hz)
double p2 = 75e-6;    // 2212Hz
//zeros
double z1 = 318e-6;  // 500.5Hz
double z2 = 0.0;       // 3.18e-6 for Neumann pole (50kHz)

double pole1= exp(-1.0/(fs*p1));
double pole2 = exp(-1.0/(fs*p2));
double zero1 = exp(-1.0/(fs*z1));
double zero2 = exp(-1.0/(fs*z2));

a0 = 1.0;	// = 1.0
a1 = -pole1 - pole2; // = -0.931176
a2 = pole1 * pole2; // = 0
b0 = 1.0; // = 1.0
b1 = -zero1 - zero2; // = -1.731986
b2 = zero1 * zero2; // = 0.733838

Q's:
- is correction already taken notice in above code
- is the correction needed in that routine
- would the correction improve anything in this case (by the plots, showen
in papers, it should)
- how would the correction be implemented (final equations)

Tried to google "ready to use" solution of this but the only source code
which mentioned this correction had added a remark "not necessary" (it was
some convolution routine in question).

Papers: