LUT based frequency translation in libcsdr

I’ve just written a shift_table_cc function for libcsdr.

This function uses a LUT to calculate the sine and cosine waves required for shifting the spectrum. The first quadrant of the sin(x) function is stored in the LUT. The resolution (sine table size) is given as a parameter.

I’ve been testing different sine table sizes. Below some results are presented.

For value 30:

For value 1000:

For value 10000:

For value 32768:

A plain sine wave was the input for shift_table_cc. The shift ratio was set to -0.11.

The source of this post is my previous blog at HA5KFU.