Analytic Signal - Compute analytic signals of discrete-time inputs - Simulink (original) (raw)
Compute analytic signals of discrete-time inputs
Libraries:
DSP System Toolbox / Transforms
Description
The Analytic Signal block computes the complex analytic signal_y_ corresponding to each channel of the real input_u_.
where j=−1 and H{ } denotes the Hilbert transform.
The block computes the Hilbert transform using an equiripple FIR filter or a Kaiser window FIR filter. When the filter order is low, the block uses an equiripple FIR filter. For higher filter orders, if the equiripple design fails, the block uses a Kaiser window FIR filter.
This block supports C/C++ code generation and SIMD code generation. For details, see Code Generation.
Examples
Ports
Input
Specify the data input u as a vector or a matrix of size _M_-by-N.
Data Types: single
| double
Output
Analytic signal output y, returned as a vector or a matrix.
The block computes the analytic signal for each channel. The real part of the output in each channel is a replica of the real input in that channel. The imaginary part of the output is the Hilbert transform of the input. In the frequency domain, the Fourier transform of the analytic signal doubles the positive frequency content of the original signal while zeroing out the negative frequencies and retaining the DC component.
The output has the same size and data type as the input.
Data Types: single
| double
Complex Number Support: Yes
Parameters
Specify the order of the Hilbert FIR filter as an even positive integer. The FIR filter computes the Hilbert transform of the real input signal. When the filter order is low, the block uses an equiripple FIR filter to compute the Hilbert transform. For higher filter orders, if the equiripple design fails, the block uses a Kaiser window FIR filter instead.
Specify how the block should process the input.
You can set this parameter to one of these options:
Columns as channels (frame based)
— The block performs frame-based processing. In this mode, the block treats an M_-by-N matrix input as N independent channels containing_M sequential time samples. The block computes the analytic signal for each channel over time.Elements as channels (sample based)
— The block performs sample-based processing. In this mode, the block treats an _M_-by-N matrix input as M*N independent channels and computes the analytic signal for each channel (matrix element) over time.
Block Characteristics
Data Types | double | single |
---|---|
Multidimensional Signals | No |
Variable-Size Signals | No |
More About
The analytic signal x = xr +j xi, where the real part xr is the original data and the imaginary part xi contains the Hilbert transform. The imaginary part is a version of the original real sequence with a 90° phase shift. Sines are therefore transformed to cosines, and conversely, cosines are transformed to sines. The Hilbert-transformed series has the same amplitude and frequency content as the original sequence. The transform includes phase information that depends on the phase of the original.
The Hilbert transform is useful in calculating instantaneous attributes of a time series, especially the amplitude and the frequency. The instantaneous amplitude is the amplitude of the complex Hilbert transform. The instantaneous frequency is the time rate of change of the instantaneous phase angle. For a pure sinusoid, the instantaneous amplitude and frequency are constant. The instantaneous phase, however, is a sawtooth, reflecting how the local phase angle varies linearly over a single cycle.
Algorithms
The algorithm computes the Hilbert transform with an equiripple FIR for the specified order n using the Remez exchange algorithm. For higher filter orders, if the equiripple design fails, the algorithm uses a Kaiser window FIR filter instead. In both cases, the filter has a linear phase with a constant group delay of n/2 input samples.
References
[1] Claerbout, Jon F.Fundamentals of Geophysical Data Processing with Applications to Petroleum Prospecting. Oxford, UK: Blackwell, 1985.
[2] Marple, S. L. “Computing the Discrete-Time Analytic Signal via FFT.”IEEE® Transactions on Signal Processing. Vol. 47, 1999, pp. 2600–2603.
[3] Oppenheim, Alan V., Ronald W. Schafer, and John R. Buck. Discrete-Time Signal Processing. 2nd Ed. Upper Saddle River, NJ: Prentice Hall, 1999.
Extended Capabilities
Generated code relies on the memcpy
ormemset
function (string.h
) under certain conditions.
The Analytic Signal block supports SIMD code generation using Intel AVX2 code replacement library under these conditions:
- Input processing is set to
Columns as channels (frame based)
. - Input signal has to be real-valued.
- Input signal has a data type of
single
ordouble
.
The SIMD technology significantly improves the performance of the generated code. For more information, see SIMD Code Generation. To generate SIMD code from this block, see Use Intel AVX2 Code Replacement Library to Generate SIMD Code from Simulink Blocks.
Version History
Introduced before R2006a
When you specify a higher filter order, the Analytic Signal block uses a Kaiser window FIR filter to compute the Hilbert transform, resulting in a more robust filter design at higher orders.