causa FFT

I

ienes

Guest
Eu tenho uma pergunta MATLAB.
Minha entrada é uma onda senoidal de 1MHz e meu clk é 80MHz.
Quando eu faço fft sobre SFDR, meu valor de pico não está na 1MHz na imagem FFT.
Pode dizer-me se você conhece detalhes.
Obrigado.Minha entrada é out1.txt

0010101010
0010101010
1010101000
1010101000
1010101000
1010101000
1010101000
1010101000
1010101000
1010101000
1010101000
1010101000
1010101000
1010101000
1010101000
1010101011
1010101011
1010101011
1010101011
1010101011
1010101011
1010101011
1010101011
1010101011
1010101011
1010101011
1010101011
1010100000
1010110000
1010110000
1010110000
1010110000
1010110000
1010110000
1010110000
1010110000
1010110000
1010110000
1010110000
1010110011
1010111111
1010111111
1010111111
1010111111
1010111111
1010111111
1010111111
1010111111
1010111111
1010111111
1010111111
1010111111
1100000001
1100000000
1100000000
1100000000
1100000000
1100000000
1100000000
1100000000
1100000000
1100000000
1100000000
1100000000
1100000001
0111111111
0111111111
0111111111
0111111111
0111111111
0111111111
0111111111
0111111111
0111111111
0111111111
0111111111
0111111111
1000001101
1000001100
1000001100
1000001100
1000001100
1000001100
1000001100
1000001100
1000001100
1000001100
1000001100
1000001100
1000001101
1000111111
1000111111
1000111111
1000111111
1000111111
1000111111
1000111111
1000111111
1000111111
1000111111
1000111111
1000111111
1001100101
1001100101
1001100101
1001100101
1001100101
1001100101
1001100101
1001100101
1001100101
1001100101
1001100101
1001100101
1001100101
1010001010
1010001010
1010001010
1010001010
1010001010
1010001010
1010001010
1010001010
1010001010
1010001010
1010001010
1010001010
1010010011
1010110011
1010110011
1010110011
1010110011
1010110011
1010110011
1010110011
1010110011
1010110011
1010110011
1010110011
1010110011
1011011000
1011011000
1011011000
1011011000
1011011000
1011011001
1011011000
1011011000
1011011000
1011011000
1011011000
1011011000
1011011010
1011111010
1011111010
1011111010
1011111010
1011111010
1011111010
1011111010
1011111010
1011111010
1011111010
1011111010
1011111011
1100011011
1100011011
1100011011
1100011011
1100011011
1100011011
1100011011
1100011011
1100011011
1100011011
1100011011
1100011011
1100011110
1100111110
1100111110
1100111110
1100111110
1100111110
1100111110
1100111110
1100111110
1100111110
1100111110
1100111110
1100111110
1101011000
1101011000
1101011000
1101011000
1101011000
1101011000
1101011000
1101011000
1101011000
1101011000
1101011000
1101011000
1101010100
1101110100
1101110100
1101110100
1101110100
1101110100
1101110100
1101110100
1101110100
1101110100
1101110100
1101110100
1101110100
1110001100
1110001100
1110001100
1110001100
1110001100
1110001100
1110001100
1110001100
1110001100
1110001100
1110001100
1110001100
1110000101
1110100101
1110100101
1110100101
1110100101
1110100101
1110100101
1110100101
1110100101
1110100101
1110100101
1110100101
1110100101
1110110111
1110110111
1110110111
1110110111
1110110111
1110110111
1110110111
1110110111
1110110111
1110110111
1110110111
1110110111
1111000000
1111001000
1111001000
1111001000
1111001000
1111001000
1111001000
1111001000
1111001000
1111001000
1111001000
1111001000
1111001000
1111010111
1111010111
1111010111
1111010111
1111010111
1111010111
1111010111
1111010111
1111010111
1111010111
1111010111
1111010111
1111100010
1111100010
1111100010
1111100010
1111100010
1111100010
1111100010
1111100010
1111100010
1111100010
1111100010
1111100010
1111100010
1111101001
1111101001
1111101001
1111101001
1111101001
1111101001
1111101001
1111101001
1111101001
1111101001
1111101001
1111101001
1111101111
1111101111
1111101111
1111101111
1111101111
1111101111
1111101111
1111101111
1111101111
1111101111
1111101111
1111101111
1111101111
1111110010
1111110010
1111110010
1111110010
1111110010
1111110010
1111110010
1111110010
1111110010
1111110010
1111110010
1111110010
1111110010
1111110010
1111110010
1111110010
1111110010
1111110010
1111110010
1111110010
1111110010
1111110010
1111110010
1111110010
1111110010
1111110000
1111110000
1111110000
1111110000
1111110000
1111110000
1111110000
1111110000
1111110000
1111110000
1111110000
1111110000
1111101001
1111101001
1111101001
1111101001
1111101001
1111101001
1111101001
1111101001
1111101001
1111101001
1111101001
1111101001
1111101001
1111100001
1111100001
1111100001
1111100001
1111100001
1111100001
1111100001
1111100001
1111100001
1111100001
1111100001
1111100001
1111010110
1111010110
1111010110
1111010110
1111010110
1111010110
1111010110
1111010110
1111010110
1111010110
1111010110
1111010110
1111010110
1111000111
1111000111
1111000111
1111000111
1111000111
1111000111
1111000111
1111000111
1111000111
1111000111
1111000111
1111000111
1110100110
1110110110
1110110110
1110110110
1110110110
1110110110
1110110110
1110110110
1110110110
1110110110
1110110110
1110110110
1110110110
1110100010
1110100010
1110100010
1110100010
1110100010
1110100010
1110100010
1110100010
1110100010
1110100010
1110100010
1110100010
1110001001
1110001001
1110001001
1110001001
1110001001
1110001001
1110001001
1110001001
1110001001
1110001001
1110001001
1110001001
1110001001
1101110011
1101110011
1101110011
1101110011
1101110011
1101110011
1101110011
1101110011
1101110011
1101110011
1101110011
1101110011
1101010101
1101010101
1101010101
1101010101
1101010101
1101010101
1101010101
1101010101
1101010101
1101010101
1101010101
1101010101
1101010101
1100110101
1100110101
1100110101
1100110101
1100110101
1100110101
1100110101
1100110101
1100110101
1100110101
1100110101
1100110101
1100010111
1100010111
1100010111
1100010111
1100010111
1100010111
1100010111
1100010111
1100010111
1100010111
1100010111
1100010111
1100010111
1011111001
1011111001
1011111001
1011111001
1011111001
1011111001
1011111001
1011111001
1011111001
1011111001
1011111001
1011111000
1011010100
1011010100
1011010100
1011010100
1011010100
1011010100
1011010100
1011010100
1011010100
1011010100
1011010100
1011010100
1011010100
1010101110
1010101110
1010101110
1010101110
1010101110
1010101110
1010101110
1010101110
1010101110
1010101110
1010101110
1010101110
1010001010
1010001010
1010001010
1010001010
1010001010
1010001010
1010001010
1010001010
1010001010
1010001010
1010001010
1010001010
1010001010
1001011010
1001011010
1001011010
1001011010
1001011010
1001011010
1001011010
1001011010
1001011010
1001011010
1001011010
1001011010
1000010101
1000110101
1000110101
1000110101
1000110101
1000110101
1000110101
1000110101
1000110101
1000110101
1000110101
1000110101
1000110101
1000010001
1000010001
1000010001
1000010001
1000010001
1000010001
1000010001
1000010001
1000010001
1000010001
1000010001
1000010001
0110101100
0111101100
0111101100
0111101100
0111101100
0111101100
0111101100
0111101100
0111101100
0111101100
0111101100
0111101100
0111101100
0111000011
0111000011
0111000011
0111000011
0111000011
0111000011
0111000011
0111000011
0111000011
0111000011
0111000011
0111000011
0110001101
0110011101
0110011101
0110011101
0110011101
0110011101
0110011101
0110011101
0110011101
0110011101
0110011101
0110011101
0110011101
0101101101
0101101101
0101101101
0101101101
0101101101
0101101101
0101101101
0101101101
0101101101
0101101101
0101101101
0101101101
0101001100
0101001100
0101001100
0101001100
0101001100
0101001100
0101001100
0101001100
0101001100
0101001100
0101001100
0101001100
0101001100
0100100110
0100100110
0100100110
0100100110
0100100110
0100100110
0100100110
0100100110
0100100110
0100100110
0100100110
0100100110
0100000100
0100000100
0100000100
0100000100
0100000100
0100000100
0100000100
0100000100
0100000100
0100000100
0100000100
0100000100
0100000100
0011100101
0011100101
0011100101
0011100101
0011100101
0011100101
0011100101
0011100101
0011100101
0011100101
0011100101
0011100101
0011000000
0011000000
0011000000
0011000000
0011000000
0011000000
0011000000
0011000000
0011000000
0011000000
0011000000
0011000000
0011000000
0010100111
0010100111
0010100111
0010100111
0010100111
0010100111
0010100111
0010100111
0010100111
0010100111
0010100111
0010100111
0010001011
0010001011
0010001011
0010001011
0010001011
0010001011
0010001011
0010001011
0010001011
0010001011
0010001011
0010001011
0010001011
0001110100
0001110100
0001110100
0001110100
0001110100
0001110100
0001110100
0001110100
0001110100
0001110100
0001110100
0001110100
0001011011
0001011011
0001011011
0001011011
0001011011
0001011011
0001011011
0001011011
0001011011
0001011011
0001011011
0001011011
0001011011
0001000111
0001000111
0001000111
0001000111
0001000111
0001000111
0001000111
0001000111
0001000111
0001000111
0001000111
0001000111
0000001001
0000111001
0000111001
0000111001
0000111001
0000111001
0000111001
0000111001
0000111001
0000111001
0000111001
0000111001
0000111001
0000101001
0000101001
0000101001
0000101001
0000101001
0000101001
0000101001
0000101001
0000101001
0000101001
0000101001
0000101001
0000001110
0000011110
0000011110
0000011110
0000011110
0000011110
0000011110
0000011110
0000011110
0000011110
0000011110
0000011110
0000011110
0000010101
0000010101
0000010101
0000010101
0000010101
0000010101
0000010101
0000010101
0000010101
0000010101
0000010101
0000010101
0000010001
0000010001
0000010001
0000010001
0000010001
0000010001
0000010001
0000010001
0000010001
0000010001
0000010001
0000010001
0000010001
0000001110
0000001110
0000001110
0000001110
0000001110
0000001110
0000001110
0000001110
0000001110
0000001110
0000001110
0000001110
0000001101
0000001101
0000001101
0000001101
0000001101
0000001101
0000001101
0000001101
0000001101
0000001101
0000001101
0000001101
0000001101
0000010000
0000010000
0000010000
0000010000
0000010000
0000010000
0000010000
0000010000
0000010000
0000010000
0000010000
0000010000
0000010010
0000010110
0000010110
0000010110
0000010110
0000010110
0000010110
0000010110
0000010110
0000010110
0000010110
0000010110
0000010110
0000011111
0000011111
0000011111
0000011111
0000011111
0000011111
0000011111
0000011111
0000011111
0000011111
0000011111
0000011111
0000101010
0000101010
0000101010
0000101010
0000101010
0000101010
0000101010
0000101010
0000101010
0000101010
0000101010
0000101010
0000101010
0000111001
0000111001
0000111001
0000111001
0000111001
0000111001
0000111001
0000111001
0000111001
0000111001
0000111001
0000111001
0000001001
0001001001
0001001001
0001001001
0001001001
0001001001
0001001001
0001001001
0001001001
0001001001
0001001001
0001001001
0001001001
0001011101
0001011101
0001011101
0001011101
0001011101
0001011101
0001011101
0001011101
0001011101
0001011101
0001011101
0001011101
0001110101
0001110101
0001110101
0001110101
0001110101
0001110101
0001110101
0001110101
0001110101
0001110101
0001110101
0001110101
0001110101
0010001011
0010001011
0010001011
0010001011
0010001011
0010001011
0010001011
0010001011
0010001011
0010001011
0010001011
0010001011
0010001001
0010101001
0010101001
0010101001
0010101001
0010101001
0010101001
0010101001
0010101001
0010101001
0010101001
0010101001
0010101001
0011001001
0011001001
0011001001
0011001001
0011001001
0011001001
0011001001
0011001001
0011001001
0011001001
0011001001
0011001001
0011000111
0011100111
0011100111
0011100111
0011100111
0011100111
0011100111
0011100111
0011100111
0011100111
0011100111
0011100111
0011100111
0100000110
0100000110
0100000110
0100000110
0100000110
0100000110
0100000110
0100000110
0100000110
0100000110
0100000110
0100000110
0100001011
0100101011
0100101011
0100101011
0100101011
0100101011
0100101011
0100101011
0100101011
0100101011
0100101011
0100101011
0100101011
0101010001
0101010001
0101010001
0101010001
0101010001
0101010001
0101010001
0101010001
0101010001
0101010001
0101010001
0101010001
0101010101
0101110101
0101110101
0101110101
0101110101
0101110101
0101110101
0101110101
0101110101
0101110101
0101110101
0101110101
0101110101
0110100100
0110100100
0110100100
0110100100
0110100100
0110100100
0110100100
0110100100
0110100100
0110100100
0110100100
0110100100
0111001001
0111001001
0111001001
0111001001
0111001001
0111001001
0111001001
0111001001
0111001001
0111001001
0111001001
0111001001
0111001001
0111101110
0111101110
0111101110
0111101110
0111101110
0111101110
0111101110
0111101110
0111101110
0111101110
0111101110
0111101110
1000010011
1000010011
1000010011
1000010011
1000010011
1000010011
1000010011
1000010011
1000010011
1000010011
1000010011
1000010011
1000010011
1000111010
1000111010
1000111010
1000111010
1000111010
1000111010
1000111010
1000111010
1000111010
1000111010
1000111010
1000111010
1001100101
1001100101
1001100101
1001100101
1001100101
1001100101
1001100101
1001100101
1001100101
1001100101
1001100101
1001100101
1001100101
1010001111
1010001111
1010001111
1010001111
1010001111
1010001111
1010001111
1010001111
1010001111
1010001111
1010001111
1010001111
1010000011
1010110011
1010110011
1010110011
1010110011
1010110011
1010110011
1010110011
1010110011
1010110011
1010110011
1010110011
1010110011
1011011001
1011011001
1011011001
1011011001
1011011001
1011011001
1011011001
1011011001
1011011001
1011011001
1011011001
1011011001
1011011010
1011111010
1011111010
1011111010
1011111010
1011111010
1011111010
1011111010
1011111010
1011111010
1011111010
1011111010
1011111010
1100011001
1100011001
1100011001
1100011001
1100011001
1100011001
1100011001
1100011001
1100011001
1100011001
1100011001
1100011001
1100011111
1100111111
1100111111
1100111111
1100111111
1100111111
1100111111
1100111111
1100111111
1100111111
1100111111
1100111111
1100111111
1101011001
1101011001
1101011000
1101011000
1101011000
1101011000
1101011000
1101011000
1101011000
1101011000eo meu código MATLAB é
clc;
claro;
fclk 80E = 6;
numpt = 1200;
numbit = 10;
out1.txt carga; dados% de carga a partir do disco;
um OUT1 = ';
N = comprimento (um);
[M, N] = size (a);% Número de dados;
for i = 1:1: N;%
int2str c = (a i ());% de variação de tipo de dados inteiro para o tipo string;
temp = 0;%
NLength = comprimento (c);% Comprimento da cadeia;
for j = 1:1: nLength;%
d = str2num (c (j)) * 2 ^ (nLength-j);% binário para decimal
temp = temp d;%
end;%
código (i) = temp;% / 3988 * 2,5;%
end;
N = length (code);
Exibir% advertência, quando a entrada gera um código maior que em grande escala
if (max (code) == 2 ^ numbit-1) | (min (código) == 0)
disp ( 'Atenção: ADC pode ser clipping !!!');
fim
Traçar% de resultados no domínio do tempo

zoom xon;
Centrar% a onda senoidal digital
Dout code =-(2 ^ numbit-1) / 2;
subplot (3,1,1);
plot ([1: N], Dout);
title ( 'TIME DOMAIN');
xlabel ( 'Samples');
ylabel ( 'DIGITAL OUTPUT CODE');
% Se nenhuma função janela é usada, o sinal de entrada deve ser escolhido para ser único e com
Tendo% para a frequência de amostragem.Para atingir esse números primos são introduzidas e os
tom% de entrada é determinada pelo FIN = fSAMPLE * (Prime Number / Data Tamanho Record).
Para relaxar% este requisito, funções como a janela Hanning e Haming (veja abaixo) pode
% ser introduzidos, no entanto, o fundamental no espectro FFT resultante aparece 'afiado'
% sem o uso das funções da janela.
Doutw% = Dout;
= janela Hanning (numpt);
subplot (3,1,2);
plot (janela);
Doutw = Dout janela .* ';
Doutw% = Dout .* Hamming (numpt);
% Execução da Fast Fourier Transform
Dout_spect = fft (Doutw, numpt);
Recalcular% para dB
Dout_dB = 20 * log10 (abs (Dout_spect));

subplot (3,1,3);

plot ([1: N / 2], Dout_dB (1: N / 2));
Exibir% dos resultados no domínio da freqüência com um enredo de FFT

mysqli = max (Dout_dB (2: numpt / 2));
Para TTIMD%, use a seguinte rotina curta, normalizado para 6.5dB em grande escala.
plot ([0: numpt/2-1] .* fclk numpt /, Dout_dB (1: numpt / 2)-mysqli-6,5);
% plot ([0: numpt/2-1] .* fclk numpt /, Dout_dB (1: numpt / 2)-mysqli);

title ( 'FFT PLOT');
xlabel ( 'ANALOG INPUT FREQUENCY (MHz)');
ylabel ( 'Amplitude (dB)');
% a1 = eixo; axis ([A1 (1) a1 (2) -120 a1 (4)]);

 
Primeiro, você deve fazer uma análise FFT de 1024 pontos em 1200 pontos, não em você código.
Em segundo lugar, você deve não apenas uma amostra período da onda de pecado.
Por exemplo: fclk = 80M, pontos de amostra = 1024, círculos = 499 (deve ser um número primo), assim fsin * 499/1024 = '80 'M

 
flushrat escreveu:

Primeiro, você deve fazer uma análise FFT de 1024 pontos em 1200 pontos, não em você código.

Em segundo lugar, você deve não apenas uma amostra período da onda de pecado.

Por exemplo: fclk = 80M, pontos de amostra = 1024, círculos = 499 (deve ser um número primo), assim fsin * 499/1024 = '80 'M
 
Caro Yen,

A FFT é FAST algoritmo para obter a Discrete Fourier Transform (DFT) de um sinal, onde o número de pontos deve ser uma potência de dois.

A DFT assume que o vetor de entrada (ou seja, as amostras) se repete até o infinito.Theferore, ao fazer a FFT / DFT de um sinewase deve garantir que as amostras de primeiro e último são adjacentes.Se isso não acontecer há vazamento espectral.Para saber mais acesse:

http://zone.ni.com/devzone/conceptd.nsf/webmain/4D2F2B3C170CC02E862568C1006857EB

ou Google.Isto é assegurado pela escolhendo cuidadosamente a entrada ou a freqüência do relógio:
M. Ti = N. Ts
Onde
Ti-período do sinal de entrada
Ts-período do clock
N-número de pontos da DFT / FFT
M-número primo.

Em princípio, M poderia ser qualquer número, mas não haveria o risco de amostragem os valores repetidamente o mesmo da onda senoidal de entrada.Se M é principal isso não acontece.

Rgds

 
Ienes Hi,

Sua pergunta no fórum despertou meu interesse.Como você out1.txt gerar o arquivo?Trata-se da saída de simulação SPICE?É resultado da análise transitória? Caso afirmativo, qual é a sintaxe para gerar o arquivo?Agradecemos se você pode compartilhar.

thanks in advance
-snoop835 -

 
Caro Yen,
Esta página pode ajudá-lo
http://www.maxim-ic.com/appnotes.cfm/appnote_number/1040
Rgds

 

Welcome to EDABoard.com

Sponsor

Back
Top