OpenViBE Documentation 3.6.0
|
Performs a Spectral Analysis using FFT.
The Spectral Analysis box performs spectrum computations on incoming signals and possible outputs include the spectrum amplitude (the power of the signal in a number of frequency bands), as well as its phase, real part and imaginary part.
Output computations may be enabled/disabled from the settings dialogue box. The analysis is performed using a Fast Fourier Transform .
Do not forget to apply a Windowing step before spectral analysis.
Considering an input signal \( X \in \mathbb{R}^{C \times N} \), composed of \( C \) channels and \( N \) temporal samples, this plugin computes the spectrum of this signal \( \Phi \in \mathbb{C}^{C \times F} \), composed of \( C \) channels and \( F \) frequencies.
Input signal being real, the spectrum exhibits conjugate symmetry: consequently, only half of the spectrum is returned with \( F = \left\lfloor N/2 \right\rfloor + 1 \).
For the \( c^{ \text{th} } \) channel and the \( f^{ \text{th} } \) frequency, the spectrum is defined as:
\[ \Phi(c,f) = \Phi_r(c,f) + \mathsf{i} \times \Phi_i(c,f) = \left| \Phi(c,f) \right| \times e^{\mathsf{i} \arg(\Phi(c,f))} \]
with \( \mathsf{i} \) being the imaginary unit.
Using these notations, for the \( c^{ \text{th} } \) channel, the Parseval's Theorem gives:
\[ \sum_{n=0}^{N-1} \left| X(c,n) \right|^2 = \frac{1}{N} \sum_{f=0}^{F-1} \left| \Phi(c,f) \right|^2 \]
with \( \left| \Phi(c,f) \right|^2 = \Phi_r(c,f)^2 + \Phi_i(c,f)^2 \).
An input multichannel signal \( X \in \mathbb{R}^{C \times N} \), composed of \( C \) channels and \( N \) temporal samples.
An output spectral amplitude (absolute value) \( \left| \Phi \right| \in \mathbb{R}^{C \times F} \).
An output spectral phase \( \arg(\Phi) \in \mathbb{R}^{C \times F} \), in radians.
An output real part of the spectrum \( \Phi_r \in \mathbb{R}^{C \times F} \).
An output imaginary part of the spectrum \( \Phi_i \in \mathbb{R}^{C \times F} \).
Activate or not the Amplitude output.
Activate or not the Phase output.
Activate or not the Real Part output.
Activate or not the Imaginary Part output.
Practical example : visualising the power spectrum of a signal.
Let's use a Signal Oscillator box to generator sinusoidal signals on one channel. Next we add a Spectral Analysis box and connect boxes together. We make sure the 'Amplitude' of the signal is computed by checking the appropriate setting in the settings dialog box (see image below). Finally, we connect the 'Amplitude' output connector of the Spectral Analysis box to the input connector of a Power Spectrum Display box. The player may now be launched to visualize the power spectrum of the signal.
To verify the Parseval's Theorem, in version 1.1, spectra have been multiplied by \( \sqrt{2} \) with respect the previous version 1.0.
DC bin and Nyquist bin (when \( N \) is even) are not concerned by this correction.