A scrambler is a function that is applied to a sequence of data before transmitting with the goal of making this data more “random-like”. For instance, scrambling avoids long runs of the bits 0 or 1 only, which may make the receiver loose synchronization or cause spectral concentration of the signal. The receiver applies the inverse function, which is called descrambler, to recover the original data. The documentation for the scrambler blocks in GNUradio is not very good and one may need to take a look at the implementation of these blocks to get their parameters right. Here, I’ll try to explain a bit of the mathematics behind scramblers and the peculiarities of their implementation in GNUradio.
Tag: dsp
Another look at recursive quadrature oscillators
In a recent post, we looked at which \(2\times 2\) Toeplitz real matrices \(T\) gave useful quadrature oscillators by the recurrence \(x_{n+1}=T x_n\). There, we computed their eigenvalues and solved the recurrence in terms of them. Of course, there are many other ways to approach this problem. Here we look at another approach that gives a good geometric picture of what happens, can be applied to general \(2\times 2\) matrices, and may be used as a starting point for the \(n\times n\) case.
A look at a new digital quadrature oscillator
Two sinusoidal signals are said to be in quadrature if they have a constant phase difference of 90º. Quadrature signals are widely used in signal processing. A digital quadrature oscillator is just an algorithm that computes the sequence \(x_n = (\cos(\omega n), \sin(\omega n))\), \(n\geq 0\), or a similar sequence of sinusoids in quadrature. Here \(\omega\) is the oscillator frequency in radians per sample. Direct computation of this sequence is very time consuming, because the trigonometric functions have to be evaluated for each sample. Therefore, it is a good idea to use a linear recurrence scheme to compute \(x_n\). Using basic trigonometric identities, we see that\[x_{n+1} = A x_n,\quad x_0=\begin{pmatrix}1\\0\end{pmatrix},\]with\[A = \begin{pmatrix}\alpha_1 & -\alpha_2\\\alpha_2 & \alpha_1\end{pmatrix},\quad \alpha_1 = \cos(\omega),\ \alpha_2=\sin(\omega).\]
However, to actually perform these computations in a digital processor, one has to quantize \(\alpha_1,\alpha_2\), meaning that one has to replace \(\alpha_1,\alpha_2\) by approximations. It is easy to see that if one replaces \(\alpha_1,\alpha_2\) by some perturbation, then the eigenvalues of \(A\) are no longer in the unit circle, so the oscillation can grow or decay exponentially and one would need to apply an AGC scheme to keep this method stable.
Here we will look at a new quadrature oscillator by Martin Vicanek that has appeared recently and solves this problem.