Learn R Programming

TDD (version 0.1)

MatchCoefDPZ: Find Digital Match to Analog Poles/Zeros

Description

Calculates digital poles and zeros to match a continuous instrument response given in poles, zeros, and sensitivity. Discretization effects mean that the given poles and zeros do not work for finite sample rates, with discrepancies increasing as the time interval increases. This function uses a Markov Chain Monte Carlo (MCMC) routine to match the responses.

Usage

MatchCoefDPZ(PZ, dt, N, niter = 50000, burn = 0, sigfac = 1, fh =
0.25/dt, k = 0.001)

Arguments

Value

List including the following elements:bMoving Average polynomial coefficientsaAutoregressive polynomial coefficientsanalogrespContinuous "analog" responsedigitalrespResponse of digital filterinvDetailed MCMC resultserrorGeometric root-mean-square error between digital and analog responseDPZDigital Poles and Zeros

Details

Large N allow it to match very low frequencies, but take longer to calculate. Large niter means longer calculation time, but probably a closer match. The burn-in period should be set to zero unless you want the posterior distribution of the poles and zeros. Large sigfac means that the MCMC makes smaller jumps, meaning it explores the sample space more slowly, but is less likely to make large jumps away from the interesting region. Note that the standard deviations of proposal distributions of the model parameters are proportional to the magnitude of the "guess" model--meaning that model parameters identically equal to zero (such as zeros at the origin) are fixed.

Discretization effects often make it difficult to match higher frequencies. Close match of somewhat high frequencies is done at the expense of poor match of very high frequencies. If very high frequencies are not interesting, fh should be left at its default value. Otherwise, it should be set to the highest interesting frequency.

See Also

MakeDPZ

Examples

Run this code
# Response of Guralp CMG-40T

PZ = list(poles = c(-0.149 + 0.149i, -0.149 - 0.149i, -503, -1010, -1130), zeros = c(0, 0), Knorm = 574095649, Sense = 800)
# MatchCoefDPZ(PZ, dt = 0.01, N = 10000) # takes minutes to run

Run the code above in your browser using DataLab