[Dspforum] Lab #6 STFT issues

Ryan Merton lucidsmog at gmail.com
Mon Oct 13 09:48:53 MDT 2008


I don't believe my STFT is working correctly in lab 6.  I have
generated a synthetic chirp in external RAM going from 1000 to 11000
Hz over a 10 second interval.  I pulled this from the board via CCS
and plotted the spectogram in matlab [ specgram(data, 8192, 48000) ]
and created good_spectrogram.jpg.  I also pulled the STFT data from
external RAM as well and plotted the results in matlab as
dsp_stft.jpg.  While I was at it I emulated the behavior of the DSP
STFT in matlab like this:

function do_stft(in)

q = zeros(8192, 100);
for x = 1:100,
    startIdx = 4096*(x-1) + 1;
    q(:,x) = fft( in(startIdx:(startIdx + 8192)), 8192 );
end
figure;
imagesc(20*log10(abs(q)));

Running do_stft(data) in matlab results in matlab_stft.jpg.

There appears to be issues on the DSP with the first and last 1 or 2
frames of FFT data.  There is also something wrong with the imaginary
half of the spectrum.  Is this a problem that you have seen before?  I
have spent quite a bit of time on it and haven't been able to make any
further headway.

Thanks,
Ryan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: good_spectrogram.jpg
Type: image/jpeg
Size: 45171 bytes
Desc: not available
URL: <http://echelonembedded.com/pipermail/dspforum_echelonembedded.com/attachments/20081013/1b5efd62/attachment-0003.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dsp_stft.jpg
Type: image/jpeg
Size: 48273 bytes
Desc: not available
URL: <http://echelonembedded.com/pipermail/dspforum_echelonembedded.com/attachments/20081013/1b5efd62/attachment-0004.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: matlab_stft.jpg
Type: image/jpeg
Size: 40900 bytes
Desc: not available
URL: <http://echelonembedded.com/pipermail/dspforum_echelonembedded.com/attachments/20081013/1b5efd62/attachment-0005.jpg>


More information about the Dspforum mailing list