# Re: Hilbert transform using FFT approach

On 23 Sep 2005 10:02:49 -0700, "john" <johns@xxxxxxxxxx> wrote:

>
>Jerry Avins wrote:
>> john wrote:
>>
>> ...
>>
>> > One way to split this real signal into quadrature channels is to apply
>> > two bandpass filters constructed from lowpass prototypes. Make a FIR
>> > LPF with half your desired bandwidth. Then multiply the taps by sine
>> > and cosine of 240 kHz to make them into BPFs. If you pass the input
>> > through each of the filters (sine and cosine), the outputs will be in
>>
>> I think you left out a crucial step. One takes sines and cosines of
>> angles, not frequencies.
>>
>> Jerry

>
>Picky picky. Here is some Matlab code:
>
>Fc=3D240e3;Fs=3D10e6;W=3D100e3;
>x=3Dsin(2*pi*[0:999]*Fc/Fs);
>Ntaps=3D200;
>hlp=3Dfir1(Ntaps-1,(W/2)/(Fs/2));
>hbps=3D2*hlp.*sin(2*pi*[0:Ntaps-1]*Fc/Fs);
>hbpc=3D2*hlp.*cos(2*pi*[0:Ntaps-1]*Fc/Fs);
>x =3D sin(2*pi*(Fc-W/4)*[0:999]/Fs);
>xs =3D filter(hbps,1,x);
>xc =3D filter(hbpc,1,x);
>plot([xs' xc']);grid;shg;
>
>John

Hi John,

I don't think Jerry was being picky.
He was just being correct.

Ya' know what I found out about that
"multiply a lowpass filter by sines & cosines"
method for designing a Hilbert transformer?
That method sometimes gives you bandpass
filters whose phase responses
are not exactly linear.

After removing those strange "3D" characters in your
example of the point you were making.

It might be interesting
for you to experiment with far fewer than 200 taps
and different BPF center frequencies to
see the phase nonlinearity. For example:

Fc=1.5e6;
Fs=10e6;
W=100e3;
x=sin(2*pi*[0:999]*Fc/Fs);
Ntaps=17;
hlp=fir1(Ntaps-1,(W/2)/(Fs/2));
hbps=2*hlp.*sin(2*pi*[0:Ntaps-1]*Fc/Fs);
hbpc=2*hlp.*cos(2*pi*[0:Ntaps-1]*Fc/Fs);
x = sin(2*pi*(Fc-W/4)*[0:999]/Fs);
xs = filter(hbps,1,x);
xc = filter(hbpc,1,x);

figure(1)
freqz(hbps,1024); grid on, zoom on
figure(2)
subplot(2,1,1), plot(hbps,'-bo'), grid on, zoom on
subplot(2,1,2), plot(grpdelay(hbps,1,1024)); grid on, zoom on
figure(3)
plot([xs' xc']); grid on, zoom on

I guess using hundreds of taps, as you did,
drastically reduces phase nonlinearity problems.
Interesting, ... huh?

See Ya',
[-Rick-]

.

## Relevant Pages

• Re: Hilbert transform using FFT approach
... >>Jerry Avins wrote: ... > subplot, plot, grid on, zoom on ... > drastically reduces phase nonlinearity problems. ...
(comp.dsp)
• Re: Run-time error3464
... Thank you both Jerry and John for your helps, ... I have a query based report and the following code to open the report ... Dim strDoc As String ...
(microsoft.public.access.queries)