330 likes | 578 Views
EE-240/2009 Análise Espectral. { x ( nT ), n Z } = sinal x ( t ) seja amostrado com período de amostragem T . D iscrete- T ime F ourier T ransform:. Transformada de Fourier . { x n = x(nT) } registrada somente para n = 0, ..., N – 1 .
E N D
EE-240/2009 Análise Espectral
{ x(nT), n Z } = sinal x(t) seja amostrado com período de amostragem T. Discrete-Time Fourier Transform: Transformada de Fourier • { xn = x(nT) }registrada somente para n = 0, ..., N – 1. • DTFT discretizada em N pontos entre w= 0 a w = 2p. • Discrete Fourier Transform:
randn('state',0) x = randn(5,1); N = length(x); X = zeros(N,1); for k = 0 : N - 1 n = 0 : N - 1; Wk = exp(- j * 2*pi *k * n / N)' ; X(k+1) = sum(x .* Wk); end [X fft(x)] absX = abs(X); [sum(x.^2) sum(absX.^2)/N] Energia do sinal = Teorema de Parseval
fft(x) N*mean(x) Média do Sinal
N par N ímpar
fft(x) 2 3 1 4 k = 0 N = 8 7 5 6
Dada uma seqüência Periodograma
Dada uma seqüência Periodograma
Dada uma seqüência Periodograma
Dada uma seqüência Periodograma
Dada uma seqüência Periodograma
Dada uma seqüência Periodograma
xn = x(nT) n = 0, ..., N – 1 Transformada Inversa
Segmento 5 Segmento 2 Segmento 3 Segmento 4 Segmento 1 DFT DFT DFT DFT DFT Análise Conjunta Tempo-Freqüência
B = SPECGRAM(A,NFFT,Fs,WINDOW,NOVERLAP) calculates the spectrogram for the signal in vector A. SPECGRAM splits the signal into overlapping segments, windows each with the WINDOW vector and forms the columns of B with their zero-padded, length NFFT discrete Fourier transforms. Thus each column of B contains an estimate of the short-term, time-localized frequency content of the signal A. Time increases linearly across the columns of B, from left to right. Frequency increases linearly down the rows, starting at 0. If you specify a scalar for WINDOW, SPECGRAM uses a Hanning window of that length. WINDOW must have length smaller than or equal to NFFT and greater than NOVERLAP. NOVERLAP is the number of samples the sections of A overlap. Fs is the sampling frequency.
CHIRP Swept-frequency cosine generator. Y = CHIRP(T,F0,T1,F1) generates samples of a linear swept-frequency signal at the time instances defined in array T. The instantaneous frequency at time 0 is F0 Hertz. The instantaneous frequency F1 is achieved at time T1. By default, F0=0, T1=1, and F1=100. Exemplo
t=0:0.001:2; % 2 secs @ 1kHz sample rate % Start @ DC, cross 150Hz at t=1sec x = chirp(t,0,1,150); specgram(x,256,1000,256,250);
Transformada Wavelet Idéia: Janelas de tamanho variável Janelas estreitas componentes localizados no tempo (picos estreitos) "Janelas" largas para baixa freqüência (variações de linha de base)
Transformada Wavelet Deslocamento “Onda localizada (b)”: Média zero e duração limitada (a). Wavelet Mãe Escala
Real Imag Imag Real Exemplos de Wavelet:Morlet
CWT Real or Complex Continuous 1-D wavelet coefficients. COEFS = CWT(S,SCALES,'wname') computes the continuous wavelet coefficients of the vector S at real, positive SCALES, using wavelet whose name is 'wname'. The signal S is real, the wavelet can be real or complex. COEFS = CWT(S,SCALES,'wname','plot') computes and, in addition, plots the continuous wavelet transform coefficients.
t = 0:0.001:2; % 2 secs @ 1kHz sample rate % Start @ DC, cross 150Hz at t=1sec x = chirp(t,0,1,150); cwt(x,1:64,’gaus1’,’plot’);