help-octave
[Top][All Lists]
Advanced

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

Re: Is this correct?


From: Brian Kaczynski
Subject: Re: Is this correct?
Date: Fri, 25 Apr 2014 20:22:30 +0300

The method described below is not generally the proper method for generating FM signals.  A better method is to define a vector of increasing phases vs. time and to change the slope of the phases to modulate frequency.  Here is some code that might work:

fstart=300e6; fstop=400e6; dt=1/10/fc;N=120000;
t=[0:1:N-1]*dt;
ph = 2*pi*(fstart*t + 0.5*(fstop-fstart)*(t.^2)/t(end));
sig = sin(ph);

Let me know how that works!
-Brian

2014-04-25 20:11 GMT+03:00 Macy <address@hidden>:
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


reply via email to

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