AbVolt

 
   


Projects   /   Research


Publications



Sources and Algorithms

   Here you can find some useful algorithms. All sources are in ANSI C. Most of the sources optimized for microcontroller implementation.

 


Hamming 7.4 code and extended Hamming 8.4 code encoding and decoding

Hamming 7.4 is a simplest error correction code. It encodes input 4-bit data into 7-bit codewords. The Hamming distance for this code is 3. This allows to correct one error per codeword. 7.4 code can't detect any multiple errors. The extended 8.4 code can correct one error and detect at least two errors per codeword.

Download Hamming code

Back


Extended BCH 32.21 code encoding and decoding.

The extended BCH 32.21 forward error correction code is used in paging POCSAG and FLEX standards. The minimum Hamming distance for this code is 6. For hard decision decoding algorithms, that allows to correct up to 2 random errors and detect not less than 3 errors per codeword. For larger amount of random errors the probability of undetected erroneous codeword is approximately 1/4.
The decoding of BCH 32.21 code can be done by several methods. Here are the C language examples of three simple algebraic algorithms easy to be implemented in realtime for any microcontroller:
1. Using the syndromes table (fastest, largest size)
2. Using Zeh functions (medium speed, medium size)
3. Using Meggit algorithm (slowest, smallest size)
Test programs also included.

Download BCH 32.21 sources

Here is a soft decision algorithm for BCH 32.21 code based on dynamic programming approach. The S/N performance is about 2dB better than that for algebraic algorithms. The algorithm demands a lot of computation and targeted for fast CPUs or DSPs.

Download BCH 32.21 soft decision

Back


Golay 23.12 code

Golay 23.12 code is the only perfect binary code which can correct up to 3 errors per codeword. The minimum Hamming distance for this code is 7. Here is an example of encoding and hard decision decoding of Golay 23.12

Download Golay code

Back


Convolutional 21.7.16 code and Viterbi soft decision decoding algorithm

The convolutional nonsystematic 21.7.16 code has constraint length of 7 and free distance of 16. This rate 1/3 code is very robust to smoothly distributed random errors in the data stream. Viterbi algorithm with the soft decision is used for the decoding.
For further performance improvement, it is commonly recommended to use interleaving and combine the inner convolutional code with the outer Reed Solomon code.

Download convolutional code and Viterbi decoding

Back


Digital Filter Design

Here is the C++ source code of a program which designs digital filters for audio processing. Crossovers with Butterworth, Bessel and Linkwitz–Riley function and parametric equalizers are supported.

A Guide on digital audio filters

Download Digital Filter Design Source Code

Back


How to work with PC Windows sound system

This is a simple Win32 C++ interface class to work with the wave input and output on PC windows sound system. It allows processing arbitrary PCM waveforms in the real time. Full duplex operation is supported.

Download

Back

 


Fast Fourier Transform (FFT)

Here is a very simple and convenient C language implementation of the radix 2 FFT for any given order. Floating point calculations are used. Can work in FFT and reverse FFT mode. The results are normalized accordingly.

Download FFT sources

Back


Linear Predicative Coding (LPC)

Here are the basic functions of the LPC analysis - synthesis: Levinson-Durbin recursion, LPC analyze FIR filter, LPC synthesis IIR filter. The functions are implemented in C using floating point, and can work for any given LPC order.
Download LPC functions sources

Back


Walsh functions, Fast Walsh Transform (FWT)

Here are the C implementations of the Walsh functions, fast and slow Walsh transforms.

Download Walsh sources

Back


C language mathematical functions for simple microcontrollers.

Here are C language math functions to be implemented for any simple microcontroller. They are small, efficient and accurate enough for the most of applications. The arguments and the return values are 16-bit integers. You can find here mul(x,y), div(y,x), sin(x), cos(x), atan2(y,x), sqrt(x).

Download function sources

Back


Simpson integrator.

Here is a very basic function for numerical integration - Simpson algorithm (Square approximation).

Download Simpson algorithm

Back

 


   AbVolt, LLC
   Kansas City, USA

   Telephone: (580) 336-7949
   E-mail: vlv@abvolt.com