wlog - a real-time signal wavelet analyzer

ON4CKO - nov 2002

About wlog...

wlog is a tool to analyze signals using wavelets. The wavelet tranformation has the property that it "divides"(or "decomposes") a signal in "smooth" S and a "discontinuous" D part. The tool is experimental but can be used to measure the smoothness (and noise-levels) of a signal.

How the tool works

The best thing to do in finding out how the tool works, is to select a Sinus from the Signal menu: This visualises the wavelet decomposition of a smooth sinus signal.

Select the 'S-component' item from the Watch menu: This shows the Smooth S part of the signal that is decomposed. Make sure that 'Octave 1' in this menu is selected and you will see a smooth black sinus passing by on the screen.

By adding different octaves on the screen you see the daub4-wavelet decomposition of the smooth part of the signal on different scales. From octave 7 on, this signal is totally decomposed, leaving nothing but a flat line.

NOTE: You may notice that the higher the octave, the more 'blockier' it becomes. This has to do with the synchronisation as higher octaves signal have less datapoints than the lower levels. Select the 'Octave 3' from the Synch menu to lock the update speed of the display to a reasonable value.

Now select the discontinuous D component of the signal in the Watch-menu. Run over the different octaves and you see the following important feature of wavelet decomposition: for small octaves, the D(iscontinous) signal is very small (bcs. a sinus is a smooth signal, there is little discontinuity). This signal grows for higher octaves there is more and more in the D-part bcs. as the scale is growing, there is more and more discontinuity. Up till octave 6: the full sinus signal. This scale is the point were the whole signal is decomposed as in the D part.
There is no D signal left after octave 6, bcs the wavelet decomposition reuses only the Smooth part of the signal.

SINUS/SMOOTH PART - A smooth sinus at scale 1 (block) is decomposed to a block wave (green) until there is no smoothness left and the signal is flat (lightblue)

You can see a similar thing with the square signal in the Signal menu. However, for this signal you must take into account that a square signal is already discontinuous at small scales (ie. low octaves).

SQUARE/SMOOTH PART - A blockwave at scale 1 (block) has already lost its sharp edges (black). It loses more and more of its discontinuity until the signal is almost a sinus (green). In the end, the signal decomposes in a flat line (yellow)

The menu system:

File

  1. Restart - Restarts the program
  2. Exit

Watch

  1. S/D component - Select the Smooth or Discontinuous part of the decomposition.
  2. Octave X - Visualize the transformed signal at different scales (or "octaves"). Each octave has its own colour.

Synch

  1. Lock scale - wlog uses dynamic scaling to display both small and big signals. This can clash with measurements and introduces a 'dancing' effect on the signal. Use this menu to turn the feature on or off.
  2. Octave X - Select the update speed of the display to match the Nth octave. The higher the octave, the slower the update speed.

Signal

  1. Sinus - Select a smooth sinus signal.
  2. Square - Select a block signal.
  3. Microphone - (default) Select the microphone input as the input source (8bit @8KHz MONO).

Options

  1. Double buffer - Fluent (but memory intensive) graphics technique.
  2. Enlarge/Shrink - Larger/smaller display

Disadvantages

AUTO SCALING - The signal that is shown on the screen is not the real signal anymore (it cannot be viewed as a denoised signal). So, the only information that can be retrieved from te tool is the amplitude of the signal.

But, to make the tool work, it has an auto-scaling function: the amplitude of the signal on the screen is automaticly updated (you can see this as a stable signal is fluctuating a little). Now, to compare noise levels of the signal, the following steps must be taken:

  1. Turn on the auto-scaling and analyze of reference signal with wlog.
  2. Turn the auto-scaling off (w. the menu) and apply the real signal.
Now you can compare the amplitude of the signal (2) with the amplitude of step (1).

RESOURCES - This program is quite heavy for the processor: it takes much of the computing and processing power from the system. This is esp. so when using the microphone as an input device. This is why the sampling of data happens at 8bit Mono @8KHz. It is advisable to increase the sampling rate (and/or adjust the sampling routine) of this program (but you'll have to recompile it).

UPDATE SPEED - Wavelet decompition of higher octaves takes some time to compute (this is inherant to wavelet decomp. as higher octaves need the data from the lower octaves). Changing a signal input-source make take some time to show effect on the screen.

Download

Source code (needs Qt 2.x)src (.zip)
win32 buildbin (.zip)
Linux buildbin (.tgz)

ON4CKO - nov 2002