help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is this correct?


From: Ozzy Lash
Subject: Re: Is this correct?
Date: Fri, 25 Apr 2014 13:11:05 -0500




On Fri, Apr 25, 2014 at 12:11 PM, Macy <address@hidden> wrote:
This is a problem 'interpretting' a swept tone in octave.
The fft plot looks like it's too wide a spectrum.

Not sure why, or what is going on here.
The idea was to sweep from 300MHz to 400MHz: and doing so I expected ONLY energy in that spectral range, after all it is a slow sweep.

fixed tone as a reference:
fc=300e6;dt=1/10/fc;N=120000;
t=[0:1:N-1]*dt;
sig=sin(2*pi()*fc*t);
b=fft(sig)/N;
produces a plot with appropriate spike(s)

ok now I wish to sweep the tone from 300MHz up to 400MHz
sig=sin(2*pi()*1e6*(300+100*([0:N-1])/N).*t);
which should make a tone sweep from 300MHz up to 400MHz, right?
when I plotted the fft, it looked like the energy went from 300MHz up to 500MHz ??!!

so went back and plotted
plot(t(1:100),sig(1:100));
hold on;
plot(t(1:100),sig(end-100+1:end))
hold off;
is ok, time range held the same just for 'marking'

The frequency did indeed look like 300MHz at the low end and high at the end, like almost 400MHz
If go from 400MHz down to 300MHz:
sig=sin(2*pi()*1e6*(400-100*([0:N-1])/N).*t);
then the fft appears to go from 400MHz down to 200MHz ??!!

What I'm missing is why this is NOT equivalent. the start determines an EXACT edge and the ending frequency becomes twice its frequency. What?

The implication to me is that there is energy in those bands, else the fft would NOT show it. This is boggling my mind. The implication is that a low pass filter will act differently upon a low to high vs a high to low chirp. Perhaps the sweep was not as slow as I thought. something else to check. I'll check both premises soon, but right now I'm having difficulty wrapping my head about these results.

Are they correct? Is this right?




_______________________________________________
Help-octave mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-octave

The FFT is going to assume that the data that you are supplying will repeat over and over again, so really you are modulating with a sawtooth.  That is, the "instantaneous frequency" is going from 300 to 400 over the number of samples, and then is going immediately back to 300 as the data repeats, so I guess it isn't surprising to me that there is significant energy outside of the 300 to 400 range.

Bill


reply via email to

[Prev in Thread] Current Thread [Next in Thread]