Contributions:HilbertFilter: Difference between revisions
| Line 5: | Line 5: | ||
:<math> x_{a}(n) = \operatorname{Re}(x(n)) + \operatorname{Im}(x(n)) </math> | :<math> x_{a}(n) = \operatorname{Re}(x(n)) + \operatorname{Im}(x(n)) </math> | ||
The real part is the same input signal, and the imaginary part is the Hilbert transform of the input signal. The Hilbert transform was implemented as the convolution of the input signal with the | The real part is the same input signal, and the imaginary part is the Hilbert transform of the input signal. The Hilbert transform was implemented as the convolution of the input signal with the filter ''h''(''n''). | ||
:<math> h(n) = | :<math> h(n) = | ||
| Line 14: | Line 14: | ||
</math> | </math> | ||
To get an ideal Hilbert transform, ''n'' must be infinitely long <math>(-\infty < n < \infty)</math>. However, for real time implementations, ''h''(''n'') must be truncated and delayed to guarantee a causal filter. | To get an ideal Hilbert transform, ''n'' must be infinitely long <math>(-\infty < n < \infty)</math>. However, for real time implementations, ''h''(''n'') must be truncated and delayed to guarantee a causal filter. Thus, the FIR filter is defined as | ||
:<math> h(n) = | |||
\begin{cases} | |||
\ \ {2 \over \pi (n-\frac{N-1}{2})}, & \mbox{for } n \mbox{ odd}\\ | |||
\ \ 0, & \mbox{for } n \mbox{ even},\\ | |||
\end{cases} | |||
</math> | |||
for <math> 0\leq n \leq N-1 </math>, where ''N'' must be an odd number representing the length of the filter. The resulting Hilbert transform is delayed by <math> \delta = \frac{N-1}{2} </math> | |||
==Location== | ==Location== | ||
Revision as of 19:22, 20 March 2012
Synopsis
This filter computes the envelope or the phase of a signal using Hilbert transform. The discrete input signal x(n) is first transformed to its analytic representation (i.e., analytic signal), which is composed of a real and an imaginary part.
The real part is the same input signal, and the imaginary part is the Hilbert transform of the input signal. The Hilbert transform was implemented as the convolution of the input signal with the filter h(n).
To get an ideal Hilbert transform, n must be infinitely long . However, for real time implementations, h(n) must be truncated and delayed to guarantee a causal filter. Thus, the FIR filter is defined as
for , where N must be an odd number representing the length of the filter. The resulting Hilbert transform is delayed by
Location
Not yet released: will be released at http://www.bci2000.org/svn/trunk/src/contrib/SignalProcessing/HilbertSignalProcessing/HilbertFilter.cpp
Versioning
Authors
Cristhian Potes, Jeremy Hill
Source Code Revisions
- Initial development:
- Tested under:
- Known to compile under:
- Broken since:
Parameters
OutputSignal
This parameter may be one of
- 0 - Copy input signal
- no processing,
- 1 - Magnitude
- Hilbert envelope amplitude,
- 2 - Phase
- Hilbert phase,
- 3 - Real part
- original input signal, but with a delay to match its timing to the imaginary part.
- 4 - Imaginary part
- original signal filtered with an FIR-Hilbert transformer.
Delay
States
None.
See also
User Reference:Filters, Contributions:SignalProcessing, Contributions:HilbertSignalProcessing