Level of noise in fft

13 visualizzazioni (ultimi 30 giorni)
Maxime Duquesnoy
Maxime Duquesnoy il 10 Giu 2016
Commentato: Maxime Duquesnoy il 10 Giu 2016
Hello everyone,
I am trying to model a DAC , to do so I need to write a Zero Order Hold function , which repeats each sample a certain number of times. I see that the spectrum has not the same amplitude before and after ZOH . I used a number of points in power of 2 so that I can see the noise floor.
I have really big problems to make the noise appear at the same level than before. I join 2 photos, 1 which is the result of a 3bit DAC on a 100 Hz sine wave and then the spectrum of the holded signal.
Could you tell me why the noise level becomes 0 dBm when it was -78 dBm before ZOH ?
I also give you my ZOH code;
L=length(signal);
output_signal=[];
for j=1:L;
x=duration;
while x>0
output_signal=[output_signal signal(j)];
x=x-1;
end;
end;
Thank you for your help.

Risposta accettata

J. Webster
J. Webster il 10 Giu 2016
This looks like you aren't windowing your data properly before you take the fft of it. Try applying a Hamming or Hanning window first.
  2 Commenti
Maxime Duquesnoy
Maxime Duquesnoy il 10 Giu 2016
Well I use a rectangular window, I take exactly a certain number of periods of my signal to avoid frequency leakage. This number of periods is the same after the ZOH. If you are talking about the noise you see on the first picture, it is due to quantization.
Maxime Duquesnoy
Maxime Duquesnoy il 10 Giu 2016
I solved my problem when I was taking my shower. For the first one, I used the power per sample, for the second I forgot to divide by the signal's length. Lesson: do never forget what you put in the functions you create Thank you for your help. Regards

Accedi per commentare.

Più risposte (0)

Prodotti

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by