Learn R Programming

simts (version 0.2.2)

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)

Value

A vec containing the QN process.

Arguments

N

An integer for signal length.

q2

A double that contains autocorrection.

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{12Q^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^*\sim U\left[ {0,1} \right]$$

Then, we multiple the sequence by \(\sqrt{12}\) so: $${U_k} = \sqrt{12} U_k^*$$

Next, we find the derivative of \({U_k}\) $${{\dot U}_k} = \frac{{{U_{k + \Delta t}} - {U_k}}}{{\Delta t}}$$

In this case, we modify the derivative such that: \({{\dot U}_k}\Delta t = {U_{k + \Delta t}} - {U_k}\)

Thus, we end up with: $${x_k} = \sqrt Q {{\dot U}_k}\Delta t$$ $${x_k} = \sqrt Q \left( {{U_{k + 1}} - {U_k}} \right)$$