DSPRelated.com
Forums

Hilbert transform and down sampling

Started by Thomas March 6, 2012
Hi all,

I am a newbie in DSP and need your help on understanding Hilbert
transform...

I have a real, double sided signal coming in. I want to use Hilbert
transform to get rid of the negative side spectrum. Then, since I have
only one side of spectrum expressed in an analytic signal, I want to
down sample it by 2.
When the signal is expressed in analytic signal (after Hilbert FIR),
the bandwidth should be from 0 to fs/2.

Before I read a chapter in my multi-rate DSP book, I thought I always
have to shift it down to baseband before the down sampling. However,
one example I saw in the book performed down-sample by 2 right after
the Hilbert FIR. I don't understand why it does not create
aliasing...Wouldn't it "fold" the signal between fs/4 and fs/2 to fs/4
to 0?

Thanks,

Thomas
On 3/6/12 7:20 PM, Thomas wrote:
> Hi all, > > I am a newbie in DSP and need your help on understanding Hilbert > transform... > > I have a real, double sided signal coming in. I want to use Hilbert > transform to get rid of the negative side spectrum. Then, since I have > only one side of spectrum expressed in an analytic signal, I want to > down sample it by 2. > When the signal is expressed in analytic signal (after Hilbert FIR), > the bandwidth should be from 0 to fs/2. > > Before I read a chapter in my multi-rate DSP book, I thought I always > have to shift it down to baseband before the down sampling. However, > one example I saw in the book performed down-sample by 2 right after > the Hilbert FIR. I don't understand why it does not create > aliasing...Wouldn't it "fold" the signal between fs/4 and fs/2 to fs/4 > to 0?
i think in principle it should work because when you go from real to analytical, you changed it from one wire to two. and then if you sample those two wires at 1/2 the sampling rate, you end up with the same amount of information as when you sampled the real signal (before the hilbert) at the full sampling rate. essentially the spectrum from -fs/2 to 0 gets aliased on top of what lives between DC and +fs/2. but since that spectrum in the negative frequencies is known to be zero, no aliasing occurs in the overlap. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On Tue, 6 Mar 2012 16:20:33 -0800 (PST), Thomas <gongdori@hotmail.com>
wrote:

>Hi all, > >I am a newbie in DSP and need your help on understanding Hilbert >transform... > >I have a real, double sided signal coming in. I want to use Hilbert >transform to get rid of the negative side spectrum. Then, since I have >only one side of spectrum expressed in an analytic signal, I want to >down sample it by 2. >When the signal is expressed in analytic signal (after Hilbert FIR), >the bandwidth should be from 0 to fs/2. > >Before I read a chapter in my multi-rate DSP book, I thought I always >have to shift it down to baseband before the down sampling. However, >one example I saw in the book performed down-sample by 2 right after >the Hilbert FIR. I don't understand why it does not create >aliasing...Wouldn't it "fold" the signal between fs/4 and fs/2 to fs/4 >to 0? > >Thanks, > >Thomas
A little off topic but thought I would post it here. A while ago someone posted this in IEEE Signal Processing. It was a lower noise version of the typical analytic signal conversion. Ie. Matlab hilbert function. Not sure how it compares with the filtering method. function [ z ] = analytic( s ) %ANALYTIC Compute the analytic function N = length(s); S = fft(s,2*N); S(2:N) = S(2:N).*2; S(N+2:2*N)=0; z = ifft(S); z(N+1:2*N) = 0; end
Thank you all for your reply.
But, I still don't understand how it works.

If I have a real signal whose spectrum is spread from -fs/2 to fs/2
(double sided), I can get rid of the negative portion by creating
analytic signal.
Then, after the Hilbert transform, I would have one sided spectrum
which occupies 0 to fs/2.

I think it can be decimated by 2 because the bandwidth was reduced by
2 (from double to single side) as you mentioned.
However, wouldn't it be possible only when I shift the spectrum to
baseband? (by shifting the spectrum left by fs/4)

If I have a spectrum from 0 to fs/2, and change the sampling rate from
fs to fs/2, the spectrum between 0 to fs/4 and fs/4 to fs/2 will
overlap... wouldn't it?

Thomas


On 3/7/2012 7:34 AM, Thomas wrote:
> Thank you all for your reply. > But, I still don't understand how it works. > > If I have a real signal whose spectrum is spread from -fs/2 to fs/2 > (double sided), I can get rid of the negative portion by creating > analytic signal. > Then, after the Hilbert transform, I would have one sided spectrum > which occupies 0 to fs/2. > > I think it can be decimated by 2 because the bandwidth was reduced by > 2 (from double to single side) as you mentioned. > However, wouldn't it be possible only when I shift the spectrum to > baseband? (by shifting the spectrum left by fs/4) > > If I have a spectrum from 0 to fs/2, and change the sampling rate from > fs to fs/2, the spectrum between 0 to fs/4 and fs/4 to fs/2 will > overlap... wouldn't it?
No, because each of your analytic samples has two parts, real and imaginary. There is just as much information in the down-shifted analytic samples as there was in the two-sided ones, just in a different form. A signal with a bandwidth B needs 2*B pieces of information per second. Some combinations are 2*B real samples, B real and B imaginary samples, and B amplitude samples with B slope samples. All sets allow reconstruction and each set is barely sufficient. 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;
On Tuesday, March 6, 2012 7:20:33 PM UTC-5, Thomas wrote:
> Hi all, >=20 > I am a newbie in DSP and need your help on understanding Hilbert > transform... >=20 > I have a real, double sided signal coming in. I want to use Hilbert > transform to get rid of the negative side spectrum. Then, since I have > only one side of spectrum expressed in an analytic signal, I want to > down sample it by 2. > When the signal is expressed in analytic signal (after Hilbert FIR), > the bandwidth should be from 0 to fs/2. >=20 > Before I read a chapter in my multi-rate DSP book, I thought I always > have to shift it down to baseband before the down sampling. However, > one example I saw in the book performed down-sample by 2 right after > the Hilbert FIR. I don't understand why it does not create > aliasing...Wouldn't it "fold" the signal between fs/4 and fs/2 to fs/4 > to 0? >=20 > Thanks, >=20 > Thomas
Hello Thomas, Perhaps you need to try something simple to see why this works. As you know analytic signals have one sided fourier transforms and each sin= usoidal component of the original signal when analytically extended may be = written as Z[n] =3D A*e^(j*phase) * ( cos(2pi*n*f/fs) + j*sin(2pi*n*f/fs) ) where fs is the smaple rate and f is the frequency of the component. The am= plitude A and complex phase factor are constant and just carry thru the ana= lysis. Now this expression for a single freq component may simply be rewritten as Z[n] =3D A*e^(j*phase) * ( cos(2pi*2n*f/(fs/2)) + j*sin(2pi*2n*f/(fs/2))= ) which if we substitute m=3D2n and fss =3D fs/2 Z[m] =3D A*e^(j*phase) * ( cos(2pi*m*f/fss) + j*sin(2pi*m*f/fss) ) Which we can still see is analytic and is comprised of every other sample o= f Z[n]. Now at which point does Z[m] have its frequency wrap? In the original analy= tic signal (sampled at fs), f may range from [0, fs) without being remapped= , likewise for the decimated version, Z[m], f may range from [0, fss] witho= ut remapping which of course ranges from [0, fs/2]. IHTH, Clay
On Mar 7, 7:34=A0am, Thomas <gongd...@hotmail.com> wrote:
> Thank you all for your reply. > But, I still don't understand how it works. > > If I have a real signal whose spectrum is spread from -fs/2 to fs/2 > (double sided), I can get rid of the negative portion by creating > analytic signal. > Then, after the Hilbert transform, I would have one sided spectrum > which occupies 0 to fs/2. > > I think it can be decimated by 2 because the bandwidth was reduced by > 2 (from double to single side) as you mentioned. > However, wouldn't it be possible only when I shift the spectrum to > baseband? (by shifting the spectrum left by fs/4) > > If I have a spectrum from 0 to fs/2, and change the sampling rate from > fs to fs/2, the spectrum between 0 to fs/4 and fs/4 to fs/2 will > overlap... wouldn't it? > > Thomas
I haven't checked the math exactly, but because you've reduced the frequency bandwidth in producing the analytic signal, you can decimate. The real tradeoff is that now the samples are complex instead of real. The aliasing is deterministic in this case. Consider the samples of the modulation function for fs/4: exp(j*2*pi*(0:10)/4) =3D 1, i, -1, -i, 1, i, -1, -i ... So modulating by this and decimating (and if you take the samples corresponding to 1, -1 , 1, -1). You can see you don't really need to apply the modulation function to start with. You could decimate and then just multiply every other sample by -1. Cheers, David