Estimation of spectra - rich/course/PSD.pdfEstimation of spectra • Fourier Transform • Periodogram • Spectral leakage resolution bias • Tapered Periodogram ... Bendat Piersol: Random data, Wiley 2000

Download Estimation of spectra -  rich/course/PSD.pdfEstimation of spectra • Fourier Transform • Periodogram • Spectral leakage  resolution  bias • Tapered Periodogram ... Bendat  Piersol: Random data, Wiley 2000

Post on 09-May-2018

213 views

Category:

Documents

1 download

Embed Size (px)

TRANSCRIPT

  • Johannes.Sarnthein@usz.ch

    Estimation of spectra

    Fourier Transform Periodogram Spectral leakage & resolution & bias Tapered Periodogram Welchs method Confidence Intervals

    Further reading on spectral analysis:Bendat & Piersol: Random data, Wiley 2000Percival & Walden: Spectral analysis for physical applications, Cambridge 1993

  • Johannes.Sarnthein@usz.ch

    Periodogram

  • Johannes.Sarnthein@usz.ch

    Spectral leakage & resolution

    randn('state',0)fs = 1000; % Sampling frequency 1000 Hzt = (0:fs/10)/fs; % 100 samplesA = [1 2]; % Sinusoid amplitudesf = [150;140]; % Sinusoid frequenciesxn = A*sin(2*pi*f*t) + 0.1*randn(size(t));Hs = spectrum.periodogram;psd(Hs,xn,'Fs',fs,'NFFT',1024)

    randn('state',0)fs = 1000; % Sampling frequency 1000 Hzt = (0:fs/15)/fs; % 67 samplesA = [1 2]; % Sinusoid amplitudesf = [150;140]; % Sinusoid frequenciesxn = A*sin(2*pi*f*t) + 0.1*randn(size(t));Hs = spectrum.periodogram;psd(Hs,xn,'Fs',fs,'NFFT',1024)

    L = 100 samples L = 67 samples

    0 50 100 150 200 250 300 350 400 450 500-70

    -60

    -50

    -40

    -30

    -20

    -10

    0

    Frequency (Hz)

    Pow

    er/fr

    eque

    ncy

    (dB

    /Hz)

    Periodogram Power Spectral Density Estimate

    0 50 100 150 200 250 300 350 400 450 500-80

    -70

    -60

    -50

    -40

    -30

    -20

    -10

    0

    Frequency (Hz)

    Pow

    er/fr

    eque

    ncy

    (dB

    /Hz)

    Periodogram Power Spectral Density Estimate

  • Johannes.Sarnthein@usz.ch

    Leakage introducesAuto regressive process AR(4)

    = }{Ebias

    4,4,44,34,24,14, 9238.06535.28106.37607.2 tttttt XXXXX ++=

    )1(,,1,0,1}{ )( =

    = NlagnsobservatioNs

    NsE p K

  • Johannes.Sarnthein@usz.ch

    Noisy data

    randn('state',0)fs = 1000; % Sampling frequency 1000 Hzt = (0:fs/10)/fs; % 100 samplesA = [1 2]; % Sinusoid amplitudesf = [150;140]; % Sinusoid frequenciesxn = A*sin(2*pi*f*t) + 2*randn(size(t));Hs = spectrum.periodogram;psd(Hs,xn,'Fs',fs,'NFFT',1024)

    0 50 100 150 200 250 300 350 400 450 500-55

    -50

    -45

    -40

    -35

    -30

    -25

    -20

    -15

    -10

    -5

    Frequency (Hz)

    Pow

    er/fr

    eque

    ncy

    (dB

    /Hz)

    Periodogram Power Spectral Density Estimate

  • Johannes.Sarnthein@usz.ch

    Tapered Periodogram I

    10 20 30 40 500

    0.2

    0.4

    0.6

    0.8

    1

    Samples

    Ampl

    itude

    Time domain

    0 0.2 0.4 0.6 0.8-150

    -100

    -50

    0

    50

    Normalized Frequency ( rad/sample)

    Mag

    nitu

    de (d

    B)

    Frequency domain

    Rectangular

    Hamming

    Hanning

    fs = 1;t0 = 25;t = [-t0:1/fs:t0];L = numel(t);wvtool(rectwin(L),hamming(L),hanning(L))

  • Johannes.Sarnthein@usz.ch

    Tapered Periodogram II

    randn('state',0)fs = 1000; % Sampling frequency 1000 Hzt = (0:fs/10)/fs; % 100 samplesA = [1 2]; % Sinusoid amplitudesf = [150;140]; % Sinusoid frequenciesxn = A*sin(2*pi*f*t) + 0.1*randn(size(t));Hs = spectrum.periodogram('rectangular');psd(Hs,xn,'Fs',fs,'NFFT',1024)

    randn('state',0)fs = 1000; % Sampling frequency 1000 Hzt = (0:fs/10)/fs; % 100 samplesA = [1 2]; % Sinusoid amplitudesf = [150;140]; % Sinusoid frequenciesxn = A*sin(2*pi*f*t) + 0.1*randn(size(t));Hs = spectrum.periodogram('Hamming');psd(Hs,xn,'Fs',fs,'NFFT',1024)

    0 50 100 150 200 250 300 350 400 450 500-80

    -70

    -60

    -50

    -40

    -30

    -20

    -10

    0

    Frequency (Hz)

    Pow

    er/fr

    eque

    ncy

    (dB

    /Hz)

    Periodogram Power Spectral Density Estimate

    0 50 100 150 200 250 300 350 400 450 500-80

    -70

    -60

    -50

    -40

    -30

    -20

    -10

    0

    Frequency (Hz)

    Pow

    er/fr

    eque

    ncy

    (dB

    /Hz)

    Periodogram Power Spectral Density Estimate

  • Johannes.Sarnthein@usz.ch

    Welchs method (WOSA)Welchs overlapping

    segment averaging

  • Johannes.Sarnthein@usz.ch

    Welchs methodThe signal is divided into overlapping segments

    randn('state',1)fs = 1000; % Sampling frequency 1000 Hzt = (0:0.3*fs)/fs; % 301 samplesA = [1 2]; % Sinusoid amplitudesf = [150;140]; % Sinusoid frequenciesxn = A*sin(2*pi*f*t) + 5*randn(size(t));Hs = spectrum.periodogram('rectangular');psd(Hs,xn,'Fs',fs,'NFFT',1024)

    randn('state',1)fs = 1000; % Sampling frequencyt = (0:0.3*fs)./fs; % 301 samplesA = [2 8]; % Sinusoid amplitudes (row vector)f = [150;140]; % Sinusoid frequencies (column vector)xn = A*sin(2*pi*f*t) + 5*randn(size(t));Hs = spectrum.welch('rectangular',150,50);psd(Hs,xn,'Fs',fs,'NFFT',512);

    nseg = 1 nseg = 3

    0 50 100 150 200 250 300 350 400 450 500-25

    -20

    -15

    -10

    -5

    0

    5

    10

    Frequency (Hz)

    Pow

    er/fr

    eque

    ncy

    (dB

    /Hz)

    Welch Power Spectral Density Estimate

    0 50 100 150 200 250 300 350 400 450 500-50

    -45

    -40

    -35

    -30

    -25

    -20

    -15

    -10

    -5

    0

    Frequency (Hz)

    Pow

    er/fr

    eque

    ncy

    (dB

    /Hz)

    Periodogram Power Spectral Density Estimate

  • Johannes.Sarnthein@usz.ch

    Chi2 Confidence interval

    { }( ){ }

    nsegPP

    PPE

    afP

    xx

    xx

    xx

    xx

    xx

    /1,21

    1

    211

    var

    2

    )(

    2

    2

    +

    =

    =

  • Johannes.Sarnthein@usz.ch39.504441553454383541449

    34.00209249354920432534

    46.0035514998383138543432

    37.2043119238544651424

    meanBootstrap samples

    384142924665313425

    2045535515434969

    51544298744454493281

    Original sample

    Bootstrap Confidence intervalhttp:\\people.revoledu.com\kardi\tutorial\bootstrap\

Recommended

View more >