FourierAnalysis: Fourier Analysis

View source: R/FourierAnalysis.R

FourierAnalysisR Documentation

Fourier Analysis

Description

Fourier Analysis with a window function equal to 4 times the time series

Usage

FourierAnalysis(Y,

SamplingRate,AdjustWindow=FALSE, na.rm = FALSE, PlotIt = FALSE)

Arguments

Y

numerical vector [1:N] of time series

SamplingRate

Optional, used if specific frequencies should be given back instead of 1:Nqist frequency

AdjustWindow

FALSE: Window is time series, make sure that its periodic and detrended.

TRUE: see details, time series does not have to be periodic

na.rm

easy and maybe incorrect imputation of FastFourierTransformation

PlotIt

TRUE: Plots frequency domain

Details

Fourier Analysis in case of a discrete finite signal defined by a time series.

AdjusteWindow=TRUE: The DC part is not given back due to the choice of window. The first frequency is "artificial" because it results directly from the window function and thus is also not given back.

Value

A list with

PowerSpectrum

Description of 'comp1'

FFT

see FastFourierTransformation

ggObject

object of ggplot2 of PlotIT=TRUE

Author(s)

Michael C. Thrun

References

Lectures of MCT

See Also

FastFourierTransformation

Examples

data("ElectricityBRD")
#days,hours,mins,secs
SamplingRateInSecs=30.5*24*60*60
FA=FourierAnalysis(ElectricityBRD$Mrd_KWh,

SamplingRate=1/SamplingRateInSecs)

Mthrun/TSAT documentation built on Feb. 5, 2024, 11:15 p.m.