FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > DSP

DSP comp.dsp newsgroup, mailing list

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-13-2009, 01:16 AM
fisico30
Guest
 
Posts: n/a
Default zero padding once again

Hello forum,

can someone clarify for me , once again, what zero padding is good for?
To my understanding the frequencies in the DFT are integer multiples o


f_s /N (where f_s is the sampling frequency).

So the interval between neighbouring frequencies is Delta_f= f_s/ N.
The bigger N, the higher the resolution, because the smaller Delta_f.
But I hear that zero padding does not actually increase resolution....
Confused.

Thanks
fisico30
Reply With Quote
  #2 (permalink)  
Old 02-13-2009, 07:09 AM
steve
Guest
 
Posts: n/a
Default Re: zero padding once again

On Feb 12, 4:16 pm, "fisico30" <marcoscipio...@gmail.com> wrote:
> Hello forum,
>
> can someone clarify for me , once again, what zero padding is good for?
> To my understanding the frequencies in the DFT are integer multiples of
>
> f_s /N (where f_s is the sampling frequency).
>
> So the interval between neighbouring frequencies is Delta_f= f_s/ N.
> The bigger N, the higher the resolution, because the smaller Delta_f.
> But I hear that zero padding does not actually increase resolution....
> Confused.
>
> Thanks
> fisico30


if f_s =1000 and N = 10, resolution will be 100Hz, but what if you
want 106Hz resolution and you only have N power FFTs, zero padding
solves this problem
Reply With Quote
  #3 (permalink)  
Old 02-13-2009, 12:12 PM
Rune Allnor
Guest
 
Posts: n/a
Default Re: zero padding once again

On 13 Feb, 01:16, "fisico30" <marcoscipio...@gmail.com> wrote:
> Hello forum,
>
> can someone clarify for me , once again, what zero padding is good for?
> To my understanding *the frequencies in the DFT are *integer multiples of
>
> f_s /N *(where f_s is the sampling frequency).
>
> So the interval between neighbouring frequencies is Delta_f= f_s/ N.
> The bigger N, the higher the resolution, because the smaller Delta_f.
> But I hear that zero padding does not actually increase resolution....
> Confused.


The confusion occurs because 'resolution' means different
things in different contexts. Zero padding causes the spectrum
coefficients to become denser in frequency domain, which
might be seen as 'increasing the resolution'. However, this
does not mean that the spectrum shows more than it does without
the zero-padding.

In other contexts 'resolution' means 'separating two sinusoidals
that have similar frequencies.' In this case, the question how
to separate the two sines and recognize them as different.
Zero-padding does not help with this.

Below is a matlab script that illustrates a few of the concepts.
If you run it, you will get three grapchs. Graph a) shows how
the spectrum is interpolated by zero-padding: There are just a
few more 'dots' in the graph, but the basic graph is the same.

Panel b) shows a spectrum where thre are two sines, at f1 = 0.14
and f2 = 0.2 (the green spikes). If you have N=8 samples in your
data sequence, the basic spectrum (blue) does not resolve the
sines, nor does the zero-padded spectrum (red).

However, if you have enough data in the first place (N=32)
then both the basic and the zero-padded spectrum separate
the signals, as in panel c). In this case zero-padding is
helpful with locating exactly where the spikes are, which
is yet another possible meaning for the term 'resolution'.

So the problem is that the terminology is ambiguous. You
need to understand the different concepts of 'resolution'
and then make sure you understand exactly what is meant
when you see or hear the term 'resolution'.

And be aware that whoever you are talking with might not
be aware of such subtle differences in terminology.

Rune

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all
fs = 1;
N = 8;

tv = (0:N-1)/fs;
f = 0.125*fs;
x=sin(2*pi*tv*f);
fv =(0:N-1)*fs/N;
X = fft(x);

Nfft = 32;
fvzp=(0:Nfft-1)*fs/Nfft;
Xzp=fft(x,Nfft);


clf
subplot(3,1,1)
stem(fvzp,abs(Xzp),'r');
hold on
stem(fv,abs(X),'b');
title('a) Spectrum Interpolation by Zero Padding')

y = sin(2*pi*tv*0.14)+sin(2*pi*tv*0.2);
Y=fft(y);
Yzp = fft(y,Nfft);
subplot(3,1,2)
stem(fvzp,abs(Yzp),'r');
hold on
stem(fv,abs(Y),'b');
stem([0.14,0.2,0.8,0.86],4*[1 1 1 1],'g')
title('b) Zero-padding does *not* resolve spikes')

N = 32;
tv = (0:N-1)/fs;
z = sin(2*pi*tv*0.14)+sin(2*pi*tv*0.2);
fv =(0:N-1)*fs/N;

subplot(3,1,3)
Z = fft(z);
Nfft = 128;
fvzp=(0:Nfft-1)*fs/Nfft;
Zzp=fft(z,Nfft);

stem(fvzp,abs(Zzp),'r');
hold on
stem(fv,abs(Z),'b')
stem([0.14,0.2,0.8,0.86],16*[1 1 1 1],'g')
title('c) Sufficient data *does* resolve spikes')
Reply With Quote
  #4 (permalink)  
Old 04-21-2009, 04:57 PM
fisico32
Guest
 
Posts: n/a
Default Re: zero padding once again

Hello Rune,

thanks again for the clarification on zero padding and resolution.
So, semantics aside, zero padding does
1) not change the form of the spectrum (good)
2) not change the total bandwidth of signal (good)
3) add new, more frequency values to the FFT. These values ar
interpolated values that make the spectrum look better, more continuous.

But, in my mind, resolution means getting more values, see deeper, mor
precisely. And that seems to be what zero padding does. We can argue i
interpolated values are just estimations ( not as truthful as real data).

However, to me it seems that zero padding actually increases resolution.
IF not, I am wrong again. What causes then an increase in resolution?
Same data length but faster sampling (more data samples)?

thanks again
marco


>On 13 Feb, 01:16, "fisico30" <marcoscipio...@gmail.com> wrote:
>> Hello forum,
>>
>> can someone clarify for me , once again, what zero padding is goo

for?
>> To my understanding =A0the frequencies in the DFT are =A0intege

multiple=
>s of
>>
>> f_s /N =A0(where f_s is the sampling frequency).
>>
>> So the interval between neighbouring frequencies is Delta_f=3D f_s/ N.
>> The bigger N, the higher the resolution, because the smaller Delta_f.
>> But I hear that zero padding does not actually increase resolution....
>> Confused.

>
>The confusion occurs because 'resolution' means different
>things in different contexts. Zero padding causes the spectrum
>coefficients to become denser in frequency domain, which
>might be seen as 'increasing the resolution'. However, this
>does not mean that the spectrum shows more than it does without
>the zero-padding.
>
>In other contexts 'resolution' means 'separating two sinusoidals
>that have similar frequencies.' In this case, the question how
>to separate the two sines and recognize them as different.
>Zero-padding does not help with this.
>
>Below is a matlab script that illustrates a few of the concepts.
>If you run it, you will get three grapchs. Graph a) shows how
>the spectrum is interpolated by zero-padding: There are just a
>few more 'dots' in the graph, but the basic graph is the same.
>
>Panel b) shows a spectrum where thre are two sines, at f1 =3D 0.14
>and f2 =3D 0.2 (the green spikes). If you have N=3D8 samples in your
>data sequence, the basic spectrum (blue) does not resolve the
>sines, nor does the zero-padded spectrum (red).
>
>However, if you have enough data in the first place (N=3D32)
>then both the basic and the zero-padded spectrum separate
>the signals, as in panel c). In this case zero-padding is
>helpful with locating exactly where the spikes are, which
>is yet another possible meaning for the term 'resolution'.
>
>So the problem is that the terminology is ambiguous. You
>need to understand the different concepts of 'resolution'
>and then make sure you understand exactly what is meant
>when you see or hear the term 'resolution'.
>
>And be aware that whoever you are talking with might not
>be aware of such subtle differences in terminology.
>
>Rune
>
>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>clear all
>fs =3D 1;
>N =3D 8;
>
>tv =3D (0:N-1)/fs;
>f =3D 0.125*fs;
>x=3Dsin(2*pi*tv*f);
>fv =3D(0:N-1)*fs/N;
>X =3D fft(x);
>
>Nfft =3D 32;
>fvzp=3D(0:Nfft-1)*fs/Nfft;
>Xzp=3Dfft(x,Nfft);
>
>
>clf
>subplot(3,1,1)
>stem(fvzp,abs(Xzp),'r');
>hold on
>stem(fv,abs(X),'b');
>title('a) Spectrum Interpolation by Zero Padding')
>
>y =3D sin(2*pi*tv*0.14)+sin(2*pi*tv*0.2);
>Y=3Dfft(y);
>Yzp =3D fft(y,Nfft);
>subplot(3,1,2)
>stem(fvzp,abs(Yzp),'r');
>hold on
>stem(fv,abs(Y),'b');
>stem([0.14,0.2,0.8,0.86],4*[1 1 1 1],'g')
>title('b) Zero-padding does *not* resolve spikes')
>
>N =3D 32;
>tv =3D (0:N-1)/fs;
>z =3D sin(2*pi*tv*0.14)+sin(2*pi*tv*0.2);
>fv =3D(0:N-1)*fs/N;
>
>subplot(3,1,3)
>Z =3D fft(z);
>Nfft =3D 128;
>fvzp=3D(0:Nfft-1)*fs/Nfft;
>Zzp=3Dfft(z,Nfft);
>
>stem(fvzp,abs(Zzp),'r');
>hold on
>stem(fv,abs(Z),'b')
>stem([0.14,0.2,0.8,0.86],16*[1 1 1 1],'g')
>title('c) Sufficient data *does* resolve spikes')
>



Reply With Quote
  #5 (permalink)  
Old 04-21-2009, 05:46 PM
Rune Allnor
Guest
 
Posts: n/a
Default Re: zero padding once again

On 21 Apr, 16:57, "fisico32" <marcoscipio...@gmail.com> wrote:
> Hello Rune,
>
> thanks again for the clarification on zero padding and resolution.
> So, semantics aside,


Establishing a semantic basis is the key to communicate.
In this case means you need to find out

1) The common terms used
2) What you want to say
3) Find a formulation that expresses what you want
to say in a way that is in keeping with the
established terminology.

> zero padding does
> 1) not change the form of the spectrum (good)
> 2) not change the total bandwidth of signal (good)
> 3) add new, more frequency values to the FFT. These values are
> interpolated values that make the spectrum look better, more continuous.
>
> But, in my mind, resolution means getting more values, see deeper, more
> precisely.


Here the semantics you didn't care to learn all of a sudden
splashes eggs all over your face: I have no idea what you mean.

> And that seems to be what zero padding does. We can argue if
> interpolated values are just estimations ( not as truthful as real data).


Again, I have no idea what you mean. Read up on the basics
and learn the established terminology.

> However, to me it seems that zero padding actually increases resolution.


No it doesn't. It interpolates the spectrum.

> IF not, I am wrong again.


Yes you are.

> What causes then an increase in resolution?


It depends on what you mean by 'resolution'.

> Same data length but faster sampling (more data samples)?


I gave a very detailed explanation + matlab example in my
previous post, which you apparently did not care to read.
If you want further help from me, re-read that post, run
the example and learn the basic terminology.

Then try and use that terminology to ask any follow-up
questions.

Rune
Reply With Quote
  #6 (permalink)  
Old 04-21-2009, 05:54 PM
fisico32
Guest
 
Posts: n/a
Default Re: zero padding once again

sorry Rune,
I will be more diligent and re-read your post.
thanks again

>On 21 Apr, 16:57, "fisico32" <marcoscipio...@gmail.com> wrote:
>> Hello Rune,
>>
>> thanks again for the clarification on zero padding and resolution.
>> So, semantics aside,

>
>Establishing a semantic basis is the key to communicate.
>In this case means you need to find out
>
>1) The common terms used
>2) What you want to say
>3) Find a formulation that expresses what you want
> to say in a way that is in keeping with the
> established terminology.
>
>> zero padding does
>> 1) not change the form of the spectrum (good)
>> 2) not change the total bandwidth of signal (good)
>> 3) add new, more frequency values to the FFT. These values are
>> interpolated values that make the spectrum look better, mor

continuous.
>>
>> But, in my mind, resolution means getting more values, see deeper

more
>> precisely.

>
>Here the semantics you didn't care to learn all of a sudden
>splashes eggs all over your face: I have no idea what you mean.
>
>> And that seems to be what zero padding does. We can argue if
>> interpolated values are just estimations ( not as truthful as rea

data).
>
>Again, I have no idea what you mean. Read up on the basics
>and learn the established terminology.
>
>> However, to me it seems that zero padding actually increase

resolution.
>
>No it doesn't. It interpolates the spectrum.
>
>> IF not, I am wrong again.

>
>Yes you are.
>
>> What causes then an increase in resolution?

>
>It depends on what you mean by 'resolution'.
>
>> Same data length but faster sampling (more data samples)?

>
>I gave a very detailed explanation + matlab example in my
>previous post, which you apparently did not care to read.
>If you want further help from me, re-read that post, run
>the example and learn the basic terminology.
>
>Then try and use that terminology to ask any follow-up
>questions.
>
>Rune
>

Reply With Quote
  #7 (permalink)  
Old 04-21-2009, 07:28 PM
Tim Wescott
Guest
 
Posts: n/a
Default Re: zero padding once again

fisico32 wrote:
> Hello Rune,
>
> thanks again for the clarification on zero padding and resolution.
> So, semantics aside, zero padding does
> 1) not change the form of the spectrum (good)
> 2) not change the total bandwidth of signal (good)
> 3) add new, more frequency values to the FFT. These values are
> interpolated values that make the spectrum look better, more continuous.
>
> But, in my mind, resolution means getting more values, see deeper, more
> precisely. And that seems to be what zero padding does. We can argue if
> interpolated values are just estimations ( not as truthful as real data).
>
> However, to me it seems that zero padding actually increases resolution.
> IF not, I am wrong again. What causes then an increase in resolution?
> Same data length but faster sampling (more data samples)?
>
> thanks again
> marco

-- snip --

Understand the difference between resolution and precision.

If you have a 13-inch long ruler that marks out 12 inches, and each inch
has 128 lines (and you have a magnifying glass), then your resolution is
less than 0.01", which is really good for a ruler.

On the other hand, your _precision_ is over 8% off of true, so in many
cases the resolution is useless.

In the case of your FFT, zero padding adds resolution but can create
artifacts (distantly akin to that 8% oversize ruler) that render the
resolution pointless.

Make sense?

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" was written for you.
See details at http://www.wescottdesign.com/actfes/actfes.html
Reply With Quote
  #8 (permalink)  
Old 04-21-2009, 07:58 PM
Sebastian Doht
Guest
 
Posts: n/a
Default Re: zero padding once again

fisico32 schrieb:

> But, in my mind, resolution means getting more values, see deeper, more
> precisely. And that seems to be what zero padding does. We can argue if
> interpolated values are just estimations ( not as truthful as real data).



No it does not increase the resolution it just generates more
measurement points. In measurement engineering (radar, sonar, tdr etc.)
resolution is usually defined as the ability to distinguish between two
signal sources in whatever your domain you are working in (time,
frequency, spatial etc.). Therefore for your example if you have two
signals in the time domain with a difference in the frequency which is
below your resolution than you can not seperate them in the frequency
domain no matter how many measurement points you are interpolating. You
have two increase the measurement time or use a window that has a better
resolution than the recangular one. I advise you to get hands on some
basic textbooks about spectrum estimation or radar analysis if you can
not follow me. Hope that helps.

Sebastian
Reply With Quote
  #9 (permalink)  
Old 04-21-2009, 09:42 PM
glen herrmannsfeldt
Guest
 
Posts: n/a
Default Re: zero padding once again

fisico32 <[email protected]> wrote:

> thanks again for the clarification on zero padding and resolution.
> So, semantics aside, zero padding does
> 1) not change the form of the spectrum (good)
> 2) not change the total bandwidth of signal (good)
> 3) add new, more frequency values to the FFT. These values are
> interpolated values that make the spectrum look better, more continuous.


As with any interpolation method, yes, the data looks better
and more continuous, but it is still the same data.

> But, in my mind, resolution means getting more values, see deeper, more
> precisely. And that seems to be what zero padding does. We can argue if
> interpolated values are just estimations ( not as truthful as real data).


Not any truth at all. There is no substitute for actually
measuring something when you want to know its value.

> However, to me it seems that zero padding actually increases resolution.
> IF not, I am wrong again. What causes then an increase in resolution?
> Same data length but faster sampling (more data samples)?


Yes, for actual resolution you need more samples in the same
amount of time.

-- glen
Reply With Quote
  #10 (permalink)  
Old 04-21-2009, 11:23 PM
Rune Allnor
Guest
 
Posts: n/a
Default Re: zero padding once again

On 21 Apr, 21:42, glen herrmannsfeldt <g...@ugcs.caltech.edu> wrote:
> fisico32 <marcoscipio...@gmail.com> wrote:


> > However, to me it seems that zero padding actually increases resolution.
> > IF not, I am wrong again. What causes then an increase in resolution?
> > Same data length but faster sampling (more data samples)?

>
> Yes, for actual resolution you need more samples in the same
> amount of time.


Hmmmm... I think you will find that the information
contained in the extra data points is spent computing
spectrum coefficients over a wider spectrum band.

The quick'n dirty example is if you double the sampling
frequency, you double the bandwidth. Unless you change
the time over which you sample the signal, the width of
the frequency bins remain unchanged.

Rune
Reply With Quote
  #11 (permalink)  
Old 04-21-2009, 11:25 PM
mmoctar
Guest
 
Posts: n/a
Default Re: zero padding once again

>Hello forum,
>
>can someone clarify for me , once again, what zero padding is good for?
>To my understanding the frequencies in the DFT are integer multiple

of
>
>
>f_s /N (where f_s is the sampling frequency).
>
>So the interval between neighbouring frequencies is Delta_f= f_s/ N.
>The bigger N, the higher the resolution, because the smaller Delta_f.
>But I hear that zero padding does not actually increase resolution....
>Confused.
>
>Thanks
>fisico30
>

You think you make a confusion between precsion Fs/N where N is the numbe
of DFT point and the resolution Fs/L where L stands for the number o
samples.
Zero padding is use also to make a linear convolution with DFT.
Reply With Quote
  #12 (permalink)  
Old 04-21-2009, 11:27 PM
rickman
Guest
 
Posts: n/a
Default Re: zero padding once again

On Apr 21, 11:46*am, Rune Allnor <all...@tele.ntnu.no> wrote:
> On 21 Apr, 16:57, "fisico32" <marcoscipio...@gmail.com> wrote:
>
> > Hello Rune,

>
> > thanks again for the clarification on zero padding and resolution.
> > So, semantics aside,

>
> Establishing a semantic basis is the key to communicate.
> In this case means you need to find out
>
> 1) The common terms used
> 2) What you want to say
> 3) Find a formulation that expresses what you want
> * *to say in *a way that is in keeping with the
> * *established terminology.
>
> > zero padding does
> > 1) not change the form of the spectrum (good)
> > 2) not change the total bandwidth of signal (good)
> > 3) add new, more frequency values to the FFT. These values are
> > interpolated values that make the spectrum look better, more continuous..

>
> > But, in my mind, resolution means getting more values, see deeper, more
> > precisely.

>
> Here the semantics you didn't care to learn all of a sudden
> splashes eggs all over your face: I have no idea what you mean.
>
> > And that seems to be what zero padding does. We can argue if
> > interpolated values are just estimations ( not as truthful as real data).

>
> Again, I have no idea what you mean. Read up on the basics
> and learn the established terminology.
>
> > However, to me it seems that zero padding actually increases resolution..

>
> No it doesn't. It interpolates the spectrum.
>
> > IF not, I am wrong again.

>
> Yes you are.
>
> > What causes then an increase in resolution?

>
> It depends on what you mean by 'resolution'.
>
> > Same data length but faster sampling (more data samples)?

>
> I gave a very detailed explanation + matlab example in my
> previous post, which you apparently did not care to read.
> If you want further help from me, re-read that post, run
> the example and learn the basic terminology.
>
> Then try and use that terminology to ask any follow-up
> questions.
>
> Rune



If you don't have a copy of Matlab, how would your examples be used?
I see they offer a 15 day eval version, but that is not of much use
for this sort of thing, especially if you have already used it once.

Rick
Reply With Quote
  #13 (permalink)  
Old 04-21-2009, 11:34 PM
rickman
Guest
 
Posts: n/a
Default Re: zero padding once again

On Apr 21, 1:28*pm, Tim Wescott <t...@seemywebsite.com> wrote:
> fisico32 wrote:
> > Hello Rune,

>
> > thanks again for the clarification on zero padding and resolution.
> > So, semantics aside, zero padding does
> > 1) not change the form of the spectrum (good)
> > 2) not change the total bandwidth of signal (good)
> > 3) add new, more frequency values to the FFT. These values are
> > interpolated values that make the spectrum look better, more continuous..

>
> > But, in my mind, resolution means getting more values, see deeper, more
> > precisely. And that seems to be what zero padding does. We can argue if
> > interpolated values are just estimations ( not as truthful as real data).

>
> > However, to me it seems that zero padding actually increases resolution..
> > IF not, I am wrong again. What causes then an increase in resolution?
> > Same data length but faster sampling (more data samples)?

>
> > thanks again
> > marco

>
> -- snip --
>
> Understand the difference between resolution and precision.
>
> If you have a 13-inch long ruler that marks out 12 inches, and each inch
> has 128 lines (and you have a magnifying glass), then your resolution is
> less than 0.01", which is really good for a ruler.
>
> On the other hand, your _precision_ is over 8% off of true, so in many
> cases the resolution is useless.
>
> In the case of your FFT, zero padding adds resolution but can create
> artifacts (distantly akin to that 8% oversize ruler) that render the
> resolution pointless.
>
> Make sense?
>
> --
>
> Tim Wescott
> Wescott Design Serviceshttp://www.wescottdesign.com


To understand the difference between resolution and accuracy, I always
use the example of the dial caliper. I have one I bought some years
back that is marked off in .001" increments. I also have a plastic
slide rule type caliper with a gauge showing 100th of an inch with
other markings to allow you to interpolate to 0.001". The dial
caliper has shown to be accurate to around the 0.001" markings. The
plastic caliper has markings that vary quite a bit up and down the
scale so that the extra digit is seldom significant. Both have 0.001"
resolution, but only the dial caliper has the same accuracy.

Contrast that to the lab burette with markings that we were expected
to read in 1/5th of a graduation. They really were accurate enough
for that. The main limitation was the user.

Rick
Reply With Quote
  #14 (permalink)  
Old 04-21-2009, 11:38 PM
mmoctar
Guest
 
Posts: n/a
Default Re: zero padding once again

>On Apr 21, 11:46=A0am, Rune Allnor <all...@tele.ntnu.no> wrote:
>> On 21 Apr, 16:57, "fisico32" <marcoscipio...@gmail.com> wrote:
>>
>> > Hello Rune,

>>
>> > thanks again for the clarification on zero padding and resolution.
>> > So, semantics aside,

>>
>> Establishing a semantic basis is the key to communicate.
>> In this case means you need to find out
>>
>> 1) The common terms used
>> 2) What you want to say
>> 3) Find a formulation that expresses what you want
>> =A0 =A0to say in =A0a way that is in keeping with the
>> =A0 =A0established terminology.
>>
>> > zero padding does
>> > 1) not change the form of the spectrum (good)
>> > 2) not change the total bandwidth of signal (good)
>> > 3) add new, more frequency values to the FFT. These values are
>> > interpolated values that make the spectrum look better, mor

continuous=
>.
>>
>> > But, in my mind, resolution means getting more values, see deeper

more
>> > precisely.

>>
>> Here the semantics you didn't care to learn all of a sudden
>> splashes eggs all over your face: I have no idea what you mean.
>>
>> > And that seems to be what zero padding does. We can argue if
>> > interpolated values are just estimations ( not as truthful as rea

data=
>).
>>
>> Again, I have no idea what you mean. Read up on the basics
>> and learn the established terminology.
>>
>> > However, to me it seems that zero padding actually increase

resolution=
>.
>>
>> No it doesn't. It interpolates the spectrum.
>>
>> > IF not, I am wrong again.

>>
>> Yes you are.
>>
>> > What causes then an increase in resolution?

>>
>> It depends on what you mean by 'resolution'.
>>
>> > Same data length but faster sampling (more data samples)?

>>
>> I gave a very detailed explanation + matlab example in my
>> previous post, which you apparently did not care to read.
>> If you want further help from me, re-read that post, run
>> the example and learn the basic terminology.
>>
>> Then try and use that terminology to ask any follow-up
>> questions.
>>
>> Rune

>
>
>If you don't have a copy of Matlab, how would your examples be used?

Octave is a solution...°°°
>I see they offer a 15 day eval version, but that is not of much use
>for this sort of thing, especially if you have already used it once.
>
>Rick
>

Moctar
Reply With Quote
  #15 (permalink)  
Old 04-21-2009, 11:59 PM
Sebastian Doht
Guest
 
Posts: n/a
Default Re: zero padding once again

rickman schrieb:
> On Apr 21, 11:46 am, Rune Allnor <all...@tele.ntnu.no> wrote:
>> On 21 Apr, 16:57, "fisico32" <marcoscipio...@gmail.com> wrote:
>>
>>> Hello Rune,
>>> thanks again for the clarification on zero padding and resolution.
>>> So, semantics aside,

>> Establishing a semantic basis is the key to communicate.
>> In this case means you need to find out
>>
>> 1) The common terms used
>> 2) What you want to say
>> 3) Find a formulation that expresses what you want
>> to say in a way that is in keeping with the
>> established terminology.
>>
>>> zero padding does
>>> 1) not change the form of the spectrum (good)
>>> 2) not change the total bandwidth of signal (good)
>>> 3) add new, more frequency values to the FFT. These values are
>>> interpolated values that make the spectrum look better, more continuous.
>>> But, in my mind, resolution means getting more values, see deeper, more
>>> precisely.

>> Here the semantics you didn't care to learn all of a sudden
>> splashes eggs all over your face: I have no idea what you mean.
>>
>>> And that seems to be what zero padding does. We can argue if
>>> interpolated values are just estimations ( not as truthful as real data).

>> Again, I have no idea what you mean. Read up on the basics
>> and learn the established terminology.
>>
>>> However, to me it seems that zero padding actually increases resolution.

>> No it doesn't. It interpolates the spectrum.
>>
>>> IF not, I am wrong again.

>> Yes you are.
>>
>>> What causes then an increase in resolution?

>> It depends on what you mean by 'resolution'.
>>
>>> Same data length but faster sampling (more data samples)?

>> I gave a very detailed explanation + matlab example in my
>> previous post, which you apparently did not care to read.
>> If you want further help from me, re-read that post, run
>> the example and learn the basic terminology.
>>
>> Then try and use that terminology to ask any follow-up
>> questions.
>>
>> Rune

>
>
> If you don't have a copy of Matlab, how would your examples be used?
> I see they offer a 15 day eval version, but that is not of much use
> for this sort of thing, especially if you have already used it once.
>
> Rick


Use octave instead...
Reply With Quote
  #16 (permalink)  
Old 04-22-2009, 02:44 AM
Jerry Avins
Guest
 
Posts: n/a
Default Re: zero padding once again

Sebastian Doht wrote:
> fisico32 schrieb:
>
>> But, in my mind, resolution means getting more values, see deeper, more
>> precisely. And that seems to be what zero padding does. We can argue if
>> interpolated values are just estimations ( not as truthful as real data).

>
>
> No it does not increase the resolution it just generates more
> measurement points.


If they were measured points, they would represent increased resolution.
They are merely extra plotting points, so they don't.

> In measurement engineering (radar, sonar, tdr etc.)
> resolution is usually defined as the ability to distinguish between two
> signal sources in whatever your domain you are working in (time,
> frequency, spatial etc.). Therefore for your example if you have two
> signals in the time domain with a difference in the frequency which is
> below your resolution than you can not seperate them in the frequency
> domain no matter how many measurement points you are interpolating. You
> have two increase the measurement time or use a window that has a better
> resolution than the recangular one. I advise you to get hands on some
> basic textbooks about spectrum estimation or radar analysis if you can
> not follow me. Hope that helps.
>
> Sebastian


Jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
Reply With Quote
  #17 (permalink)  
Old 04-22-2009, 04:37 AM
Greg Heath
Guest
 
Posts: n/a
Default Re: zero padding once again

On Apr 21, 1:28*pm, Tim Wescott <t...@seemywebsite.com> wrote:
> fisico32 wrote:
> > Hello Rune,

>
> > thanks again for the clarification on zero padding and resolution.
> > So, semantics aside, zero padding does
> > 1) not change the form of the spectrum (good)
> > 2) not change the total bandwidth of signal (good)
> > 3) add new, more frequency values to the FFT. These values are
> > interpolated values that make the spectrum look better, more continuous..

>
> > But, in my mind, resolution means getting more values, see deeper, more
> > precisely. And that seems to be what zero padding does. We can argue if
> > interpolated values are just estimations ( not as truthful as real data).

>
> > However, to me it seems that zero padding actually increases resolution..
> > IF not, I am wrong again. What causes then an increase in resolution?
> > Same data length but faster sampling (more data samples)?

>
> > thanks again
> > marco

>
> -- snip --
>
> Understand the difference between resolution and precision.


See below.

> If you have a 13-inch long ruler that marks out 12 inches, and each inch
> has 128 lines (and you have a magnifying glass), then your resolution is
> less than 0.01", which is really good for a ruler.
>
> On the other hand, your _precision_ is over 8% off of true, so in many
> cases the resolution is useless.


Accuracy, not precision.

> In the case of your FFT, zero padding adds resolution but can create
> artifacts (distantly akin to that 8% oversize ruler) that render the
> resolution pointless.
>
> Make sense?


Not to me.

Resolution corresponds to precision and variance.

Accuracy corresponds to bias. The ruler's bias per unit length of
measurement is 1/12.

Hope this helps.

Greg
Reply With Quote
  #18 (permalink)  
Old 04-22-2009, 04:56 AM
Greg Heath
Guest
 
Posts: n/a
Default Re: zero padding once again

On Apr 21, 3:42*pm, glen herrmannsfeldt <g...@ugcs.caltech.edu> wrote:
> fisico32 <marcoscipio...@gmail.com> wrote:
> > thanks again for the clarification on zero padding and resolution.
> > So, semantics aside, zero padding does
> > 1) not change the form of the spectrum (good)
> > 2) not change the total bandwidth of signal (good)
> > 3) add new, more frequency values to the FFT. These values are
> > interpolated values that make the spectrum look better, more continuous..

>
> As with any interpolation method, yes, the data looks better
> and more continuous, but it is still the same data.
>
> > But, in my mind, resolution means getting more values, see deeper, more
> > precisely. And that seems to be what zero padding does. We can argue if
> > interpolated values are just estimations ( not as truthful as real data).

>
> Not any truth at all. *There is no substitute for actually
> measuring something when you want to know its value.
>
> > However, to me it seems that zero padding actually increases resolution..
> > IF not, I am wrong again. What causes then an increase in resolution?
> > Same data length but faster sampling (more data samples)?

>
> Yes, for actual resolution you need more samples in the same
> amount of time.


No.

The fft assumes a time period of T = N*dt with time
resolution dt = 1/Fs.

t = 0:dt:T-dt = dt*(0:N-1)

This results in a periodic spectrum of period Fs = N*df
with frequency resolution

df = 1/T = 1/(N*dt) = Fs/N

f = 0:df:Fs-df = df*(0:N-1).

Therefore increasing N with T fixed does not increase resolution.
However, it does increase the bandwidth BW = Fs/2.



Hope this helps.

Greg
Reply With Quote
  #19 (permalink)  
Old 04-22-2009, 08:39 AM
rickman
Guest
 
Posts: n/a
Default Re: zero padding once again

On Apr 21, 5:59*pm, Sebastian Doht <seb_d...@lycos.com> wrote:
> rickman schrieb:
>
>
>
> > On Apr 21, 11:46 am, Rune Allnor <all...@tele.ntnu.no> wrote:
> >> On 21 Apr, 16:57, "fisico32" <marcoscipio...@gmail.com> wrote:

>
> >>> Hello Rune,
> >>> thanks again for the clarification on zero padding and resolution.
> >>> So, semantics aside,
> >> Establishing a semantic basis is the key to communicate.
> >> In this case means you need to find out

>
> >> 1) The common terms used
> >> 2) What you want to say
> >> 3) Find a formulation that expresses what you want
> >> * *to say in *a way that is in keeping with the
> >> * *established terminology.

>
> >>> zero padding does
> >>> 1) not change the form of the spectrum (good)
> >>> 2) not change the total bandwidth of signal (good)
> >>> 3) add new, more frequency values to the FFT. These values are
> >>> interpolated values that make the spectrum look better, more continuous.
> >>> But, in my mind, resolution means getting more values, see deeper, more
> >>> precisely.
> >> Here the semantics you didn't care to learn all of a sudden
> >> splashes eggs all over your face: I have no idea what you mean.

>
> >>> And that seems to be what zero padding does. We can argue if
> >>> interpolated values are just estimations ( not as truthful as real data).
> >> Again, I have no idea what you mean. Read up on the basics
> >> and learn the established terminology.

>
> >>> However, to me it seems that zero padding actually increases resolution.
> >> No it doesn't. It interpolates the spectrum.

>
> >>> IF not, I am wrong again.
> >> Yes you are.

>
> >>> What causes then an increase in resolution?
> >> It depends on what you mean by 'resolution'.

>
> >>> Same data length but faster sampling (more data samples)?
> >> I gave a very detailed explanation + matlab example in my
> >> previous post, which you apparently did not care to read.
> >> If you want further help from me, re-read that post, run
> >> the example and learn the basic terminology.

>
> >> Then try and use that terminology to ask any follow-up
> >> questions.

>
> >> Rune

>
> > If you don't have a copy of Matlab, how would your examples be used?
> > I see they offer a 15 day eval version, but that is not of much use
> > for this sort of thing, especially if you have already used it once.

>
> > Rick

>
> Use octave instead...


Does octave run the above examples or are the files incompatible?

Rick
Reply With Quote
  #20 (permalink)  
Old 04-22-2009, 08:50 AM
rickman
Guest
 
Posts: n/a
Default Re: zero padding once again

On Apr 21, 5:59*pm, Sebastian Doht <seb_d...@lycos.com> wrote:
> rickman schrieb:
>
>
>
> > On Apr 21, 11:46 am, Rune Allnor <all...@tele.ntnu.no> wrote:
> >> On 21 Apr, 16:57, "fisico32" <marcoscipio...@gmail.com> wrote:

>
> >>> Hello Rune,
> >>> thanks again for the clarification on zero padding and resolution.
> >>> So, semantics aside,
> >> Establishing a semantic basis is the key to communicate.
> >> In this case means you need to find out

>
> >> 1) The common terms used
> >> 2) What you want to say
> >> 3) Find a formulation that expresses what you want
> >> * *to say in *a way that is in keeping with the
> >> * *established terminology.

>
> >>> zero padding does
> >>> 1) not change the form of the spectrum (good)
> >>> 2) not change the total bandwidth of signal (good)
> >>> 3) add new, more frequency values to the FFT. These values are
> >>> interpolated values that make the spectrum look better, more continuous.
> >>> But, in my mind, resolution means getting more values, see deeper, more
> >>> precisely.
> >> Here the semantics you didn't care to learn all of a sudden
> >> splashes eggs all over your face: I have no idea what you mean.

>
> >>> And that seems to be what zero padding does. We can argue if
> >>> interpolated values are just estimations ( not as truthful as real data).
> >> Again, I have no idea what you mean. Read up on the basics
> >> and learn the established terminology.

>
> >>> However, to me it seems that zero padding actually increases resolution.
> >> No it doesn't. It interpolates the spectrum.

>
> >>> IF not, I am wrong again.
> >> Yes you are.

>
> >>> What causes then an increase in resolution?
> >> It depends on what you mean by 'resolution'.

>
> >>> Same data length but faster sampling (more data samples)?
> >> I gave a very detailed explanation + matlab example in my
> >> previous post, which you apparently did not care to read.
> >> If you want further help from me, re-read that post, run
> >> the example and learn the basic terminology.

>
> >> Then try and use that terminology to ask any follow-up
> >> questions.

>
> >> Rune

>
> > If you don't have a copy of Matlab, how would your examples be used?
> > I see they offer a 15 day eval version, but that is not of much use
> > for this sort of thing, especially if you have already used it once.

>
> > Rick

>
> Use octave instead...


I took a look and I can't even download a native Windows version. The
page on Sourceforge for downloading the files is blank! Is this not
available or is the page corrupted somehow?

Rick
Reply With Quote
  #21 (permalink)  
Old 04-22-2009, 10:23 AM
Richard Dobson
Guest
 
Posts: n/a
Default Re: zero padding once again

rickman wrote:
...
>>> If you don't have a copy of Matlab, how would your examples be used?
>>> I see they offer a 15 day eval version, but that is not of much use
>>> for this sort of thing, especially if you have already used it once.
>>> Rick

>> Use octave instead...

>
> I took a look and I can't even download a native Windows version. The
> page on Sourceforge for downloading the files is blank! Is this not
> available or is the page corrupted somehow?
>



Just tried it, had no problem. The file you want is gp425win32.zip
from here:
http://sourceforge.net/project/showf...ackage_id=1996


The executable itself is called wgnuplot.exe.

It's the usual story: a lot of mfiles are compatible, but equally, a lot
of them are not. In particular, many of the functions in the DSP toolbox
are different or absent in octave. It is always worth Googling on Octave
+ somefunction, as it may well be around somewhere. Check out
"octave-forge" for lots of additional packages.

Richard Dobson


Reply With Quote
  #22 (permalink)  
Old 04-23-2009, 10:09 AM
Sebastian Doht
Guest
 
Posts: n/a
Default Re: zero padding once again

Everything except the stem-command runs also under octave. And the stem
command can be substituted by some plot command. But I also experienced
that octave is quite unstable under windows. When I used to work with
octave I had it installed under ubuntu...
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
zero padding of FFT bharat pathak DSP 29 02-20-2008 05:49 AM
zero padding jimosoto DSP 1 02-25-2007 08:27 AM
Implicit Zero Padding? Gary Spivey Verilog 8 11-03-2006 06:54 PM
zero padding in matlab rakesh5454 DSP 2 06-26-2006 12:42 PM
Zero Padding a DFT quick one DSP 5 02-02-2005 05:34 PM


All times are GMT +1. The time now is 03:20 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved