Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gen_qn

Generate a Quantisation Noise (QN) or Rounding Error Sequence


Description

Simulates a QN sequence given Q^2.

Usage

gen_qn(N, q2 = 0.1)

Arguments

N

An integer for signal length.

q2

A double that contains autocorrection.

Value

A vec containing the QN process.

Process Definition

Quantization Noise (QN) with parameter Q^2 in R^{+}. With i.i.d Y_t \sim U(0,1) (i.e. a standard uniform variable), this process is defined as:

X_t = sqrt(12*Q^2)*(Y[t]-Y[t-1])

Generation Algorithm

To generate the quantisation noise, we follow this recipe: First, we generate using a random uniform distribution:

U_k^*~U[0,1]

Then, we multiple the sequence by sqrt(12) so:

U_k = sqrt(12)*U_k^*

Next, we find the derivative of U_k

U_k^. = (U_(k + (delta)t) - U_k)

In this case, we modify the derivative such that: U_k^. * (delta)t = U_{k + (delta)*t} - U_k

Thus, we end up with:

x_k = sqrt(Q)*U_k^.*(delta)t

x_k = sqrt(Q)* (U_(k+1) - U_(k))


simts

Time Series Analysis Tools

v0.1.1
AGPL-3 | file LICENSE
Authors
Stéphane Guerrier [aut, cre, cph], James Balamuta [aut, cph], Roberto Molinari [aut, cph], Justin Lee [aut], Yuming Zhang [aut], Wenchao Yang [ctb], Nathanael Claussen [ctb], Yunxiang Zhang [ctb], Christian Gunning [cph], Romain Francois [cph], Ross Ihaka [cph], R Core Team [cph]
Initial release
2019-07-21

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.