Cyclostationary Signal Processing (CSP)

The Struggling CSP Student's Unofficial Blog Companion :-)
Mike Markowski, mike.ab3ap@gmail.com

Some eye candy generated by the code below (axis values removed):

Cyclostationary signal processing exploits a property found in many man-made signals - periodicity in their statistical characteristics - that ordinary spectral analysis misses. This makes it a powerful tool for signal detection, classification, and parameter estimation in noisy or contested radio environments.

For practicing engineers CSP has felt a bit out of reach until Dr. Chad Spooner created his cyclostationary blog. It is incredibly helpful bridging the gulf between theoretical and practical CSP, especially the trail of posts he put together for CSP beginners. Even at that, I was often challenged to make my code re-create what is presented in the blog. That says more about me than the blog!

I share my efforts, hopefully useful to fellow students stuck working their ways through the blog. A variety of CSP routines are provided in the libcsp.py library. These are called by a script named 'blog' which steps through a number of blog lessons. While libcsp.py is fairly well written and documented, the blog script is admittedly ugly. It simply makes calls to libcsp and plots results, mimicking a sequence of blog entries.

Another program, csp, does not so directly follow the blog. It performs many of the same calls but instead of plotting directly to the screen, creates a LaTeX document. The .tex file includes plots created by the csp program. The output is a pdf (and corresponding tex file and plots) with the idea that a person will flesh out the skeleton of a report. The CSP results present cycle frequencies but it is left to the person to explain them and turn data into information. The CSP-knowledgeable engineer edits the .tex file to augment it and delete any unhelpful data.

These are after hours efforts by a newcomer to CSP, not an expert. Treat this code like a best effort from a fellow CSP student, not an answer key from the professor. :-) I would be especially happy if others improve and augment what I've started. The files are:

Or download all files in one tarfile cspCode.tar.bz2 which will untar into a directory named cspCode.

To generate some blog post graphs, simply type the script name:

blog

The makesig program described below can create a great CSP demo signal from Eric April's 1991 paper, "The Advantages of Cyclostationary Processing." CSP is able to resolve two overlapping BPSK signals that are indistinguishable in a conventional power spectrum, demonstrating the strength of the technique. To create and analyze the overlapping BPSK signals:

mksig -d
csp -i bpskDual.iq -o rpt
evince rpt/csp.pdf
where rpt is a directory that will contain many plots and tex files generated by csp. My pdf reader is evince, but replace by whatever you use. The csp program also accepts Matlab 5.0 files as input. So you can similarly do something like:
csp -i wifi.mat -o rpt
evince rpt/csp.pdf
To see if this is something helpful to you, here is a sample report generated by csp using an 802.11a signal as input.

To generate binary IQ test signals:

mksig.py -h
Usage: mksig [-b bps] [-c fc] [-f fs] [-h] [-n n] [-o out] [-s snr] [-t type]
-b: bits/sec, default 1 bps.
-c: center freq in Hz, default 0 Hz.
-d: dual BPSK example, creates bpskDual.iq.
-f: sample rate in Hz, default 1 Hz.
-h: help message.
-n: number of symbols, default 10.
-o: output file name.
-p: phase noise random intensity, default 0.
-s: SNR in dB, default 30 dB.
-t: type of signal, default bpsk.  Any of 16qam, 4psk, 4qam, 
    64qam, 8psk, bpsk, qpsk.

Share

If you enhance or debug the code in any manner, please let me know. For that matter, please feel free to drop a line simply to say you find this page useful!

Web Analytics