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.
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
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);
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')
>
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.
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
>
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.
> 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.
> 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.
> > 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.
>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.
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.
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.
>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
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
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.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
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.
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.
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?
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?
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?
>
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.
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...