Digital Signal Processing
Embedded Systems
Realtime Kernels
Lattice Wave Filters
Road Survey Software




I am selling out some of the implementations of double complementary lattice wave filters that I use. Belive me when I say "when you get the hang of these type of filters you will never want to use anything else. "

But as it is very difficult to find nice and easy and good Lattice Wave C-code implementations I have put my implementations for sale.


Of course you may search the web for lattice Wave digital filters
(click here to search on Google)

and you will find a lot of very nice academical documents with mathematical symbols all over. Example one, Example two, Example three, Example four, Example five, Example six.

I have done that and to make it easier for you you get real C-code that actually do the stuff and not only the in the sky abstract descriptions.

I work with nitty gritty details and you may buy them.

The abstract level documents complements this C code but the code gives you a low level perspective also to have something to "play" with.



THUS  P H A S E - L I N E A R      I I R - F I L T E R S

You are most likely a smart guy and can do this stuff yourself You get c-code filter coeficient generation, c-code filter implementation, c-code FFT code, c-code magnitude generation, and a c-code method for phase linearity. Now, if you want to know about FFT:s get the original papers written by Cooley and Tukey for the FFT algorithm from about 1965. I bought them in an IEEE-sale a number of years ago just for the fun and it was well worth it.

This is a gold mine as I have worked more than 8 years with these types of filters in many possible configurations and as I was told impossible configurations of these filters. I have done multirate filtering, filterbanks, decimation, interpolation, and lots of stuff. The implementation has never failed me. But I Still keep some secrets even though this C code implementation shows what other people get doctorate degrees in.


The output of a lattice wave double complementary filter is simultaneously:

  • Highpass signal
  • Lowpass signal

This is the double complementary property and if you add together the two signals you have the complete magnitude again.

Thus they are extremely good and efficient in filterbanks, multirate or not. The power in the signal is always kept intact even if it is splitted into different partitions and this I think is unique for filters.

Lattice wave double complementary filter does not "explode" and are extremely stable. It is thus possible to change the filter coeficients in realtime. On the fly without that the filters behave strangely. This is very good if you have adaptive filtering processes. The Speed of an IIR filter and the stability of an FIR filter.


If you search in the internet for "lattice wave" you get a lot of additional information.

They build on Gazsi, L., ''Explicit formulas for lattice wave digital filters'', IEEE Trans. Circuits Syst., 1985, Vol. CAS-32, pp. 68-88. You should really get this article, it is a beauty.

However as I implemented the filters in floating point DSPs I simplified the filter implementation algorithms even further.

The C code that you buy is not complicated, it is ANSI-C, and should easily compile on any system.

It contains C code that generates filter coefficients for

  1. Butterworth
  2. Chebyshev
  3. Cauer


as you can see in the following code.

You have sampling-rate, cutoff-frequency, and filter-order. Filter order is 1,3,5,7.. thus an odd number.

lw_butterworth_coefficients(&butterworth[0], 20000.0, 5000.0, order) ;
lw_chebyshev_coefficients( &chebyshev[0] , 20000.0, 5000.0, order) ;
lw_cauer_coefficients ( &cauer[0], 20000.0, 5000.0, order) ;

And in addition

You get one of my methods implemented of making linear-phase filtered data that some measurement systems require or even telephone systems. I have still a better one a linear phase filter without impulse response but that is my BIG SECRET that you can buy for more $$$ if you contact me.

This linear-phase filter method works faster than what FIR filters can accomplish given the same data. I presume continuous input data (for a number of milli seconds anyway).

The code filters an Impulse response for the three types of filters and generates text files that can be read by Excel. The code calculation so that you have text file outputs for the filter magnitude. I use the Brigham method in the C - code for FFT where you use a 512 points complex FFT for 1024 points of real values. It goes quicker. It takes some time to execute the C code but that is because of that it creates text files on your system and writes into them and then because of that excel likes a "," instead of a "." for like 0.00345 it converts all "." to "," and that also takes some time. Excel likes 0,00345 for decimal number.

The ouput is thus

  1. six NON linear filtered impulse responses
  2. six linear filtered impulse responses
  3. six magnitudes from FFT of NON linear filtered impulse responses
  4. six magnitudes from FFT of linear filtered impulse responses


You can see the filter magnitude for

  • Butterworth both lowpass and highpass
  • Chebyshev both lowpass and highpass
  • Cauer both lowpass and highpass





Here are the magnitudes of the 3 filters FFT:ed phase linear filter response giving 6 outputs. And here is a link to excel file.

CLICK on following image for greater detail.







Here is a link to excel file for Butterworth impulse response. Both NON-linear and linear

And below you have the LINEAR PHASE impulse response of both low and highpass filtered impulse that is later inserted into the FFT.

CLICK on it for greater detail






Both impulse response of Butterworth Linear phase and NON linear phase. The first impulse is the linear phase filter and you can see how nice and symmetric it is. The non-linear filter tilts, and you can see that at point 14 the pink point is higher then at point 16. This is due to the unstationary part of the difference equation that makes the filter. This is not seen for the linear phase filter as it is only running in the stationary part of the difference equation.

That is what i believe anyway and you can see the difference and this difference is vital when building measurement systems.
Because if you are not measuring the system but the filter implementation response it is not the same.

I learned me that the hard way as I built road measurement systems and were actually out on the road and measured the bumps decimeter for decimeter.

It was actually nicer when a measured bump was exactly at the physical location (for a phase linear filter) than being shifted in the measurement with two meters due to non-linear phase errors in the filter.
Rather difficult to explain that to the road builders and I was very glad when I stumbled upon this solution. Maybe it is zero-phase, I don't know.

A real thing like a small stone with very spiky edges, in the asphalt, is seen in the filter as an impulse, and it has to look the same in the output data also. and not shifted by phase-distorsions in the filters.


You can click on the image to get up to 1600 pixels






The C code is not very huge and the filter code is even shorter
but it is
as with a bikini
the smaller it gets
the more expensive it is.

I have had so many fights with managers without software experience,
you wouldn't belive,
they don't understand that.

It is not that they are stupid,
even though I occasionaly wonder if Dilbert is right,
but they can't get into their heads
that one can make a filter for a DSP implementation in a few weeks time
but it takes eigth months
to get it inside the DSP with it's small memory.

Yes I know that DSPs have more memory
for every new generation
there are more stuff going inside them also
so there is still the same wrestling
with the compiler and linker to get the stuff in.





Take your time to think about all the benefits you can have. And these filters are HOT!

And if you excuse my metaphore.
They are sexy!




Pay now $99 through PayPal.      

1. Click the Buy Now button.
2. You will be taken to the PayPal secure checkout page.
3. You may then safely enter either your card details or pay using your PayPal account.
4. You will receive immediate email confirmation of your payment.

Oberon Data och Elektronik AB will never be aware of your card details at any point. Payment is handled securely and safely by PayPal.

Then you get a link via email where you can download the software.


How Quickly do you drink up $99?

How quickly do you smoke up $99

How Quickly do you eat for $99

How much petrol do you get for $99 and how far can you go?

How many cinema visits are $99.

How many pizzas are $99.

Do you really think $99 is expensive?

By now! for sure you have decided!