

Cohen-Class-Distribution Signalprocessing Toolbox in C++
The picture above shows a Time-Frequency analysis of a sound signal with a length of 1000 samples ! The resulting picture has a size of 1000 x 512 pixel and can be improved to a size of 1000 x N2 with arbitrary N. Non-Geeks will say „nice, but passes me...“ but people who are involved in the theory of the Time-Frequency-Analysis and the Fourier-Analysis will understand that this can not be possible because the uncertainty relation of the sampling theorem. But apart from Wavelets with there logarithmic resolution there is another way to bypass the quantum of the information theory, the so called „Cohen-Class-Distributions“. Of course this can not be done without costs of side effects, in case of the Cohen-Class-Distributions autocorrelation artefacts will occur, but the resulting two dimensional representation is blindingly impressive. The Wigner-Ville Distribution provides the most precise signal frequency analysis without decreasing the time domain resolution, exploring also new areas in time-frequency plane, invisible by means of spectrograms. The trade-off between time and frequency resolution, inherent in spectrogram analysis, doesn't hold for WVD. We have here free choice of analysis resolution to meet our needs most closely. The WVD shows not only significantly better resolution, but also satisfies boundary conditions i.e. its time average is equal to spectral energy density and frequency average is equal to the signal power. The WVD vanishes also for those time points, where signal vanishes. The Toolbox is implemented in ANSI C/C++ and is developed on a windows machine with CYGWIN and GCC in the console. Everyone who knows me, knwos that i tend to write clean code. The core algorithms can be easily included into other applications and are very well documented. As displaying engine i use the previous in this blog announced DISLIN data plotting library which is free available for non commercial purposes from the Max Plank Institute for Solar System Reseach. The Toolbox includes also a Short-Time-Fourier-Transformation(STFT) Time-Frequency analysis which allows the comparison with the classical world like it is implemented in my Sonogram application.
The following Cohen Kernelfunctions are included into the Toolbox:
• The classical Short-Time-Fourier-Transformation (STFT)
• Smoothed-Pseudo-Wigner-Wille-Distribution (SPWVD)
• Choi-Williams-Distribution (CWD)
• Pseudo-Margenau-Hill-Distribution (PMHD)
• Zaho-Atlas-Marks-Distribution (ZAMD)
The image below open the Photoalbum with exampe images for a small test signal. So what will you need to reproduce the build:
• A standart Windows machine.
• A Cygwin installation on that machine with all the shell and development components like bash, gcc and make and so on...
• The sourcecode which you can download below.
• Basic knowledge about how build applications into the console.
If you have installed CYGWIN, you can simple do a „make“ in the root directory of the Toolbox. If all went well, five test images will be displayed on the screen. The compiled test.exe files in the corresponding folders can be used to generate the plots which are per default displayed on the screen ( e.g. „./test.exe ../../TEST_SIGNALS/test.wav“). Note that the DISLIN interpolation routines need time to calculate large images. An additional save flag stores the image on the disk instead displaying it on the screen (e.g. „./test.exe ../../TEST_SIGNALS/test.wav save“). Note that the test programs are restricted to calculate only the first 20000 samples of the wave file because performance reasons. This can be disabled into the corresponding test.cpp file. In the Cohen-Class folder, the shellscripts allScreen.sh or allDisk.sh can be used to generate images for all five frequency-time analyses (e.g. „./allScreen.sh ../TEST_SIGNALS/test.wav“). The screen variant displays the image on the screen, and the disk variant saves the images as png file in the Cohen-Class folder. The source code of the sample test applications can be taken as template for the handling of the core algorithm API from C/C++. The Toolbox is completely rewritten, tested and bugfixed compared to the prior non official version. An experienced programmer should not have any problems because the interface is well designed. Alternatively the Toolbox can be used with any other development environment when the core algorithm classes are directely included into your application, but aware the license rights wich only allow non commercial usage. On other Systems apart from Windows, the DISLIN based DataPlotter will not work out of the box.
Apart from the four CCD and the STFT all the helper algorithms are included into the Toolbox-Libraray (Data-Plotter, Envelope, (rewritten) Fast-Hilbert, Analytic-Signal, (rewritten) Minimal-Phase-Representation, Fast-Fourier, Math-Utilities, (rewritten) Normalization, (rewritten) Wave-File-Processing, Arbitary-Base-Logarithmisation...). A documentation or paper for the algorithm library is not available because the complexity of the algorithm, the source code will be your friend. The code is documented corresponding the Doxygen rules so you can generate the Toolbox ApiDoc with doxygen. A good german book for the study of time-frequency analysis is „Signalverarbeitung: Zeit-Frequenz-Analyse und Schätzverfahren“ from Uwe Kiencke form Karlsruhe. All the theoretical background for the algorithms came from this book. The Toolbox is not licensed under a license which allows usage in commercial products, so don‘t forget that the Cohen-Class-Signalprocessing-Toolbox is only free for non commercial and research purposes, like described in the License file included in the package. As far i know i am the first who developed this algorithms in a fast and practical language. I would be afraid if any user could write me a short message and report about here work. The algorithms provided here are only free for non commercial usage, companies with commercial interest should contact me.
15. Juli 2009