The system I have designed is fairly basic. The signal is a 5hz sine wave that gets outputed to a scope and a Zero-Order Hold. From there it goes to the Spectrum Scope and a vector scope.
Both the scope and vector scope show the same 5hz wave. The spectrum of a 5hz wave should show a single spike at 5hz (using stems), but this is not the case. I get one spike at ~4.8 and another at ~5.3
Can anyone help with this? I am at a lose for what to do next.
Thanks
Tc
The sine wave is setup at:
Amplitude 2
Freq 5
Thanks
Tc
"Tc Simons" <tcsi...@ualr.edu> wrote in message <hdikib$fcc$1...@fred.mathworks.com>...
I tried the same, but i am getting peak at 5Hz nowhere else. Can u tell me what are the parameters of ur sine wave and fft spectrum block.
Ashwini
SINE WAVE
====================================
Sine type: Time based
Time (t): Use simulation Time
Amplitude: 2
Bias: 0
Frequency (rad/sec): 31.41592649995191
Phase: pi/2
Sample time: 0
Interpret vector parameters as 1-D: Checked
FFT SPECTRUM BLOCK
=====================================
Buffer input: checked
Buffer size: 128
Buffer overlap: 64
Window type: Hann
Window sampling: Periodic
Specify FFT Length: Unchecked
Number of spectral averages: 2
I can email you my file if that would be more helpful.
Thanks
Tc
Try changing the FFT SPECTRUM BLOCK parameters to:
Buffer size: 1024
Specify FFT Length: checked (1024)
if it does not help u, then mail me ur model.
-- Ashwini
I sent you and email to your yahoo account with the file. Your suggestion made the plot with no markers selected spike at 5hz like it is supposed but with stem on it still is producing three spikes around 5hz but the same spike is still at 95hz as well, which I am unsure why?
Thank you again for all your help
Tc
I have replied to your mail. check it out.
And follow the link below, which will clear all your doubts.
Here is the link:
http://www.ele.uri.edu/~hansenj/projects/ele436/fft.pdf
HTH,
Ashwini
simulink:
I setup the waveform in simulink then send it to the workspace.
In matlab:
aa = abs(fft(wave1));
stem (aa);
I am unsure what needs to be changed to fix this issue.
Thanks
tc