This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Scalogram Computation in Signal Analyzer

The scalogram is the absolute value of the continuous wavelet transform (CWT) of a signal, plotted as a function of time and frequency. The scalogram can be more useful than the spectrogram for identifying signals with low-frequency components or rapidly changing frequency content. Use the scalogram when you want better time localization for short-duration, high-frequency events and better frequency localization for low-frequency, longer-duration events.

Unlike the spectrogram, which decomposes the input signal into sinusoids of infinite duration, the CWT decomposes the signal into wavelets. Wavelets are good for analyzing data that exhibit regular behavior punctuated with abrupt changes because they are localized in both frequency and time. In other words, wavelets have a beginning and an end. The finite duration of wavelets makes it possible to control not just their amplitude and shape, but also their location. This extra degree of freedom enables the CWT to detect transients and identify regions where a signal has abrupt changes in frequency.

Note

You need a Wavelet Toolbox™ license to use the scalogram view.

To achieve localization in time, the spectrogram divides the input signal into windowed segments, which it Fourier transforms one-by-one and then displays. (See Spectrogram Computation in Signal Analyzer for more information.) The length of the window, however, is fixed, and the uncertainty principle imposes a tradeoff between time resolution and frequency resolution:

  • Improving the time resolution, for example to detect a burst, comes at the expense of the frequency resolution.

  • Improving the frequency resolution, for example to characterize tones to high precision, comes at the expense of the time resolution.

The scalogram, on the other hand, can resize the wavelet as the signal evolves and adjust the wavelet when conditions change. The procedure stretches the wavelet to capture long-duration, low-frequency information and shrinks the wavelet to capture short-duration, high-frequency information. Using this procedure, the scalogram can achieve good frequency localization at low frequencies and good time localization at high frequencies.

To compute the scalogram, Signal Analyzer performs these steps:

  1. If the signal has more than 1 million samples, divide the signal into overlapping segments.

  2. Compute the CWT of each segment to get its scalogram.

  3. Display the scalogram segment by segment.

Tip

  • The scalogram view does not support nonuniformly sampled signals. To compute the scalogram of a nonuniformly sampled signal, resample your signal to a uniform grid by using the resample function.

  • The scalogram view is available in displays that contain only one signal. To compare scalograms of different signals, open separate displays and drag each signal to its own display.

Divide the Signal into Segments

If the input signal has 1 million samples or less, Signal Analyzer uses the cwt function directly. If the signal has more than 1 million samples, the app performs these steps:

  1. Divide the signal into segments of 1 million samples, with 50% overlap between adjoining segments.

  2. If the last segment extends beyond the signal endpoint, zero-pad the signal until the last segment has 1 million samples.

  3. After computing the scalogram of each segment, remove edge effects:

    • Discard the first 250,000 and the last 250,000 scalogram samples of all segments except the first and the last.

    • Discard the last 250,000 scalogram samples of the first segment.

    • In the last segment, discard the first 250,000 scalogram samples and the samples corresponding to the zero-padded region.

Consider, for example, a signal with 2.6 × 106 samples:

Compute the Continuous Wavelet Transform

Signal Analyzer computes the CWT using the default settings of the cwt function. The app uses generalized analytic Morse wavelets with gamma factor γ = 3. See Morse Wavelets (Wavelet Toolbox) for more information.

Signal Analyzer provides two separate controls for frequency resolution.

  • The Time-Bandwidth slider controls the time-bandwidth product, which is proportional to the wavelet duration in the time domain. Increasing the time-bandwidth product results in wavelets with more oscillations in their central portions, larger spreads in time, and narrower spreads in frequency. The slider moves in the range from 3 to 120. The default value is 60. The figure shows some Morse wavelets with varying time-bandwidth product P. The real part is in blue, the imaginary part is in red, and the absolute value is in black.

  • The Voices Per Octave slider controls the number of scales per octave used to discretize the CWT. As the number of voices per octave increases, the scale resolution becomes finer. The slider moves in steps of multiples of 4 in the range from 4 to 16. The default value is 8.

Display the Scalogram

Signal Analyzer plots the absolute value of the CWT coefficients as a function of time and frequency. If the signal was divided into segments, the app concatenates portions of the scalograms of the individual segments and displays them. The app also plots the cone of influence, which shows where edge effects become significant. See Boundary Effects and the Cone of Influence for more information.

See Also

Apps

Functions

Related Examples

More About