tf: Estimate the frequency-domain transfer function

Description Usage Arguments Details Value

Description

Estimates a transfer function between the columns of input x and the response y.

Usage

1
2
3
4
5
6
tf(x, y, blockSize = dim(x)[1], overlap = 0, deltat = 1, nw = 4,
  k = 7, nFFT = NULL, method = c("svd", "sft", "robust", "svdBendat"),
  lOrd = NULL, adaptiveWeighting = TRUE, interactionOrder = 0,
  freqRange = NULL, maxFreqOffset = NULL, cohSigCutoff = 0.9,
  useZeroOffset = TRUE, nOffsetFreq = -1, standardize = TRUE,
  prewhiten = TRUE, removePeriodic = TRUE, asMatrix = TRUE)

Arguments

x

A data.frame whose columns are the time domain input series.

y

A single column data.frame containing the response series.

blockSize

A numeric indicating the block sizes into which the input and response series will be partitioned.

overlap

A numeric between 0 and 1 indicating how much overlap should exist between adjacent blocks.

deltat

A numeric indicating the sample rate.

nw

A numeric indicating the time bandwidth parameter for estimating the Slepian data tapers.

k

A numeric indicating the number of tapers to use - should be approximately floor(2*nw - 1) and no larger than floor(2*nw).

nFFT

A numeric indicating the number of frequency bins to use (i.e. setting the zeropadding amount).

method

A character string indicating which method to use. See details.

lOrd

A vector with length == numColumns of x. The order of the regression for svdBendat method.

adaptiveWeighting

A logical indicating whether the eigencoefficients should be multiplied by their adaptive weights before performing the regression. Note: Only implemented for method = "svd".

interactionOrder

An integer indicating what order of interactions of the covariates to include in the linear regression model. A value of 0 would include the main effects only and no interactions. NOTE: there is currently no method to choose particulare interactions - all or none.

freqRange

A vector of length 2 containing the endpoints of the frequency range over which to calculate the offset coherences (these are central frequencies of the response).

maxFreqOffset

A numeric value in Hz indicating the largest offset to be calculated in both the positive and negative direction.

useZeroOffset

A logical value indicating whether to always in include the center frequency when taking offset frequencies into account.

nOffsetFreq

An integer indicating how many offset frequencies should be used (a maximum amount).

standardize

Should the inputs and outputs be standardized to have mean = 0 and standard deviation = 1?

prewhiten

NOT CURRENTLY IMPLEMENTED.

removePeriodic

NOT CURRENTLY IMPLEMENTED.

asMatrix

A logical which is only used during offset coherences - currently used in testing.

Details

Takes the times series inputs and response, divides these series into (optionally) overlapping blocks, tapers each block with Discrete Prolate Spheriodal Sequences (DPSS's or Slepian sequences), Fourier transforms each block, uses the adaptive weights (method = "svd") and then estimates the transfer function at each frequency between the Fourier transforms of the inputs and the response.

The method argument indicates how the transfer function should be estimated. method = "sft" does the following; 1) a slow Fourier transform is used, 2) no adaptive weights are used and 3) the matrix definition of the regression coefficients are used: $(X^tX)^-1)X^-1y$ method = "svd" uses 1) the FFT, 2) adaptive weights, and 3) a singular value decomposition method for estimating the regression coefficients. method = "svdBendat" decorrelates the inputs prior to estimating the transfer functions, then obtains the appropriate transfer function after (see Chapter 7.3 of Bendat & Piersol). Overall - method = "svdBendat" is in all probability the better method to use.

Value

An object of class transfer, consisting of a complex matrix whose columns are the individual transfer function for each input, and several attributes describing the transfer function estimate.


driegert/transfer documentation built on May 15, 2019, 2:11 p.m.