From: jumpfunky on
Hi,

I'm used follwing MatLab-Code to visualize a spectogram of a linear chirp
signal:

n=(1:1:512);
for ind=1:512;
fac = 0.2*ind;
S3(ind)=sin(fac*pi*ind/512);
end
u = specgram(S3,512,512,64,63);
figure, imagesc(abs(u));

So, i think there must be frequencies between 0.1 and 51.2, but the
spectrogram shows me frequencies between 0 and ~100.

That's a bit confusing!
I would be grateful if there any ideas how this can be explained.

Thank you.



From: Rune Allnor on
On 6 Mai, 14:43, "jumpfunky" <jumpfunky(a)n_o_s_p_a_m.web.de> wrote:
> Hi,
>
> I'm used follwing MatLab-Code to visualize a spectogram of a linear chirp
> signal:
>
> n=(1:1:512);
> for ind=1:512;
>         fac = 0.2*ind;
>         S3(ind)=sin(fac*pi*ind/512);
> end
> u = specgram(S3,512,512,64,63);
> figure, imagesc(abs(u));
>
> So, i think there must be frequencies between 0.1 and 51.2, but the
> spectrogram shows me frequencies between 0 and ~100.
>
> That's a bit confusing!
> I would be grateful if there any ideas how this can be explained.

You could start by explaining why you expect the numbers you state.
And proceed by writing a code snippet that does not rely on the
signal processing toolbox (or matlab at all, for that matter).

Rune
From: jumpfunky on
>You could start by explaining why you expect the numbers you state.
>And proceed by writing a code snippet that does not rely on the
>signal processing toolbox (or matlab at all, for that matter).

Okay, the Signal (linear chirp) is defined as:
s[n] = sin(0,2*n*pi*n/512) 1 <= n <= 512 and n is element of natural
numbers.
As 2D-Plot: http://img689.imageshack.us/img689/6402/71183907.jpg

For n = 1 the frequency of sine is 0.1 Hz. For n = 512 the frequency is
51,2Hz. Since the frequency of the chirp-Signal grows linear, the sine
contains only frequencys between 0.1Hz and 51,2Hz.

And now the Spectrogram calculated by matlab:
http://img689.imageshack.us/img689/6067/s3sm.jpg

As you can see, matlab says: There are frequencies above 50Hz! The
Spectrogram is calculated by means of a windowed (hann) FFT. The windows
used 64 samples per section and the sections overlapps each other with 63
samples.
From: Jerry Avins on
On 5/6/2010 9:26 AM, jumpfunky wrote:

...

> For n = 1 the frequency of sine is 0.1 Hz. For n = 512 the frequency is
> 51,2Hz. Since the frequency of the chirp-Signal grows linear, the sine
> contains only frequencys between 0.1Hz and 51,2Hz.

That's an understandable error that has been made before. It is
tantamount to the claim that a frequency modulated signal fits into a
channel as wide as its peak deviation. "Taint so. It has to be wider.

...

Jerry
--
"I view the progress of science as ... the slow erosion of the tendency
to dichotomize." --Barbara Smuts, U. Mich.
�����������������������������������������������������������������������
From: Mark on
On May 6, 9:26 am, "jumpfunky" <jumpfunky(a)n_o_s_p_a_m.web.de> wrote:
> >You could start by explaining why you expect the numbers you state.
> >And proceed by writing a code snippet that does not rely on the
> >signal processing toolbox (or matlab at all, for that matter).
>
> Okay, the Signal (linear chirp) is defined as:
> s[n] = sin(0,2*n*pi*n/512) 1 <= n <= 512 and n is element of natural
> numbers.
> As 2D-Plot:http://img689.imageshack.us/img689/6402/71183907.jpg
>
> For n = 1 the frequency of sine is 0.1 Hz. For n = 512 the frequency is
> 51,2Hz. Since the frequency of the chirp-Signal grows linear, the sine
> contains only frequencys between 0.1Hz and 51,2Hz.
>
> And now the Spectrogram calculated by matlab:http://img689.imageshack.us/img689/6067/s3sm.jpg
>
> As you can see, matlab says: There are frequencies above 50Hz! The
> Spectrogram is calculated by means of a windowed (hann) FFT. The windows
> used 64 samples per section and the sections overlapps each other with 63
> samples.

are the frequencies you see that you don't expect to see, EXACTLY 2x
the ones you do expcet to see?

also how about the low end, do you see a 2x error there too...

Mark?