AnsweredAssumed Answered

FIR and general filtering on ADAU1701. Hints about fixed point arithmetic!

Question asked by leonxp on Aug 2, 2013
Latest reply on Aug 10, 2013 by leonxp

Hi everybody, I'll show you what I've done and what results I got.

 

Aim


Exploiting ADAU1701 to correct a loud speaker frequency response (from 40Hz to 1000Hz) in order to make it as flat as possible in the low band.

 

Procedure


  1. Get loudspeaker impulse response and frequency response measurements.
  2. Use of the inverse measured frequency response in order to compute FIR coefficients of an equalizing filter that eqaualizes my loudspeaker. The filter design has been done using a simple windowing method. Many filters have been designed of many different order, I choose for this example a 600th-order FIR.
  3. Simulation in Matlab of the filter designed (see Results point 1.)
  4. Exporting of filter coefficients in text-file in order to feed the "FIR" block of sigmastudio.
  5. Build a patch in SigmaStudio composed of just a FIR filter block, a probe/stimulus components and input/output associations. Instructions memory consumption of about 610 instruction memory locations.
    The FIR block has been updated with the coefficients file ( I've attached it below).
  6. Measure the loudspeaker frequency response using the processing corretion built-up by the 600th-order FIR (see Results point 2.)

 

Results


  1. Matlab simulation of equalization procedure
    Matlab Measure.bmp
  2. Real equalization process using the ADAU1701 computation procedure to correct the original loudspeaker frequency response
    Real Measure.bmp
  3. FIR filter frequency response into Matlab domain
    Matlab Filter.bmp
  4. FIR filter frequency response into ADAU1701 domain (exploiting stimulus/probe blocks)
    Sigma Filter.bmp

 

Questions


  1. As you can see the simulated equalization process and the real one are very different. Also the frequency response of FIR in matlab and in sigmastudio are different expecially on the tail at high frequencies. I think that this mismatch is due to the arithmetic used by ADAU1701 and a PC. In my opinion ADAU1701 is a fixed-point DSP with double precision, isn't it?
  2. How FIR computation into DSP works? What's the correct format of the coefficients in order to achieve a working FIR filtering? I attached the coefficients file as you can see if the decimal format is useful or not (to visualize it better use matlab or notepad++, because windows textfile reader doesn't read newline commands).
  3. What's the wordlength of a fixed-point coefficient admitted by the chip?
  4. How can I convert matlab coefficients in a fixed-point version suitable for sigmaDSP ADAU1701?

 

I hope you can help me because I'm completely frozen on ths. I made many many tests and measurements without any successful results.
Regards,
Leo.

Outcomes