96 kHz.org
Advanced Audio Recording

Real Time Resampling in FPGAs

It is often necessary to import a 44.1-kHz signal from sound cards into 48-kHz or 96-kHz systems. Other typical sources include consumer electronics products. In the digital domain, it is not readily possible to resample the signal directly, as the period intervals are too coarse. A modern FPGA runs only about 100 times faster than the audio sampling rate.


Conversion Circuit

With this resampler circuit it is possible to create 48kHz and 96kHz audio data in 24 Bit in realtime by synchronizing an incoming data stream and using a combination of upsampling, interpolation and filtering. In the image below, a block diagram is presented:

frequency conversion between 48kHz, 44,1kHz and 96kHz in audio systems

 

In data stream is interpolated with a modified LaGrange-filter using integer-only operation to avoid divisions.
The filter is 4 times oversampled to obtain a fine curve to resample at the new frequency.
Using 98,x Mhz and appropriate divisions the relationship of the 441 : 1920 can be maintained.

Interpolation Filter

 

modified LaGRange Interpolation Filter for audio resampling 44,1kHz to 48kHz

The filter interpolates the data between the low-frequency sample values and provides practicyll any intermediate coordinates with 16-bit precision. The bending of the curve by adjacent points is taken into account. A following low-pass filter set to approximately 24 kHz (16 kHz for 48-k systems) reduces anti-aliasing. This is essential for eliminating the artifacts of Lagrange interpolation and make is useable for audio applications.
 

Conclusion

Interpolation filters in PLDs and FPGAs can be used to easily interchange data from consumer and professional mixing consoles without external chips or resamplers.

 

 

© 2005 Jürgen Schuhmacher