# Good old Hilbert Transform question

Started by June 24, 2006
```Hello everyone,

just a little question about the good old Hilbert Transform.

- Goal: obtain analytic signal (a(n)+j&#4294967295;(n)) from an in-phase signal
(a(n));
- Tool: Blackfin BF537. I get a sampled signal, and i compute it's hilbert
transform using a FIR filter with coefficients obtained using
Matlab/Scilab's "Hilb" function.
-Problem: I have to create the analytic signal in a numeric fashion... The
signal &#4294967295;(n) coming out of the filter is longer than the initial signal
a(n), by the amount of taps/coeffs in the filter. So, when i reassemble
both signals in a .re and .im structure, the imaginary part is longer...

The question is, can i just truncate the imaginary signal so that i have
equivalent length signal components? Or should i use a smaller length
signal applied to the input of the filter? This way, i would have:
- initial signal a[n] of length N
- filter h length M
- yields:   &#4294967295;[N]=a[N-M]*h[M]

Although i have not noticed anyproblems with this method, I am not sure if
this is a correct way of proceeding, or if some better method exists...

-----------------------------------

```
```NiCad wrote:
> Hello everyone,
>
> just a little question about the good old Hilbert Transform.
>
> - Goal: obtain analytic signal (a(n)+j=E2(n)) from an in-phase signal
> (a(n));
> - Tool: Blackfin BF537. I get a sampled signal, and i compute it's hilbert
> transform using a FIR filter with coefficients obtained using
> Matlab/Scilab's "Hilb" function.
> -Problem: I have to create the analytic signal in a numeric fashion... The
> signal =E2(n) coming out of the filter is longer than the initial signal
> a(n), by the amount of taps/coeffs in the filter. So, when i reassemble
> both signals in a .re and .im structure, the imaginary part is longer...
>
> The question is, can i just truncate the imaginary signal so that i have
> equivalent length signal components? Or should i use a smaller length
> signal applied to the input of the filter? This way, i would have:
>  - initial signal a[n] of length N
>  - filter h length M
>  - yields:   =E2[N]=3Da[N-M]*h[M]
>
> Although i have not noticed anyproblems with this method, I am not sure if
> this is a correct way of proceeding, or if some better method exists...
>
> Thanks for your time DSPers!
>
> -----------------------------------
> NickelCadmium - NiCad - keeps on going, and going, and going..

Since you are doing a Hilbert transform via an FIR filter, then simply
delay your in-phase part by the delay of the Hilbert and then pair the
two together to make your analytic signal. Linear phase FIRs have a
delay of (N+1)/2 samples where N is the number of taps in the filter.

Clay

```
```Clay wrote:
>> Hello everyone,
>>
>> just a little question about the good old Hilbert Transform.
>>
>> - Goal: obtain analytic signal (a(n)+j&#4294967295;(n)) from an in-phase signal
>> (a(n));
>> - Tool: Blackfin BF537. I get a sampled signal, and i compute it's hilbert
>> transform using a FIR filter with coefficients obtained using
>> Matlab/Scilab's "Hilb" function.
>> -Problem: I have to create the analytic signal in a numeric fashion... The
>> signal &#4294967295;(n) coming out of the filter is longer than the initial signal
>> a(n), by the amount of taps/coeffs in the filter. So, when i reassemble
>> both signals in a .re and .im structure, the imaginary part is longer...
>>
>> The question is, can i just truncate the imaginary signal so that i have
>> equivalent length signal components? Or should i use a smaller length
>> signal applied to the input of the filter? This way, i would have:
>>  - initial signal a[n] of length N
>>  - filter h length M
>>  - yields:   &#4294967295;[N]=a[N-M]*h[M]
>>
>> Although i have not noticed anyproblems with this method, I am not sure if
>> this is a correct way of proceeding, or if some better method exists...
>>
>> Thanks for your time DSPers!
>>
>> -----------------------------------
>> NickelCadmium - NiCad - keeps on going, and going, and going..
>
>
> Since you are doing a Hilbert transform via an FIR filter, then simply
> delay your in-phase part by the delay of the Hilbert and then pair the
> two together to make your analytic signal. Linear phase FIRs have a
> delay of (N+1)/2 samples where N is the number of taps in the filter.

If your HT has an even number of taps, the necessary delay will not be a
whole number of sample times. If your HT has an odd number of taps, the
properly delayed I signal is available at the middle tap of the HT delay
structure. Both ends of a filtered signal are corrupted with transients.
While the whole output is longer than the input by twice the filter
length, the uncorrupted output is shorter by the same amount.

Jerry
--
Engineering is the art of making what you want from things you can get.
&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
```
```>Clay wrote:
>>> Hello everyone,
>>>
>>> just a little question about the good old Hilbert Transform.
>>>
>>> - Goal: obtain analytic signal (a(n)+j&#4294967295;(n)) from an in-phase signal
>>> (a(n));
>>> - Tool: Blackfin BF537. I get a sampled signal, and i compute it's
hilbert
>>> transform using a FIR filter with coefficients obtained using
>>> Matlab/Scilab's "Hilb" function.
>>> -Problem: I have to create the analytic signal in a numeric fashion...
The
>>> signal &#4294967295;(n) coming out of the filter is longer than the initial
signal
>>> a(n), by the amount of taps/coeffs in the filter. So, when i
reassemble
>>> both signals in a .re and .im structure, the imaginary part is
longer...
>>>
>>> The question is, can i just truncate the imaginary signal so that i
have
>>> equivalent length signal components? Or should i use a smaller length
>>> signal applied to the input of the filter? This way, i would have:
>>>  - initial signal a[n] of length N
>>>  - filter h length M
>>>  - yields:   &#4294967295;[N]=a[N-M]*h[M]
>>>
>>> Although i have not noticed anyproblems with this method, I am not
sure if
>>> this is a correct way of proceeding, or if some better method
exists...
>>>
>>> Thanks for your time DSPers!
>>>
>>> -----------------------------------
>>> NickelCadmium - NiCad - keeps on going, and going, and going..
>>
>>
>> Since you are doing a Hilbert transform via an FIR filter, then simply
>> delay your in-phase part by the delay of the Hilbert and then pair the
>> two together to make your analytic signal. Linear phase FIRs have a
>> delay of (N+1)/2 samples where N is the number of taps in the filter.
>
>If your HT has an even number of taps, the necessary delay will not be a

>whole number of sample times. If your HT has an odd number of taps, the
>properly delayed I signal is available at the middle tap of the HT delay

>structure. Both ends of a filtered signal are corrupted with transients.

>  While the whole output is longer than the input by twice the filter
>length, the uncorrupted output is shorter by the same amount.
>
>Jerry
>--
>Engineering is the art of making what you want from things you can get.
>&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
>

Thanks alot for the good info

Nic

-----------------------------------