# Adaptive Wavelet Coding Applied in a Wireless Control System
## 2 Fundamentals of Wavelet Coding
### Wavelet Encoding Algorithm with Variable Code Rate  
So far, approaches employing wavelet coding in transceivers use coding rates equal to one information bit per channel symbol. In this paper, we propose a novel adaptive wavelet-coded system whose coding rate changes according to the channel state.  
In the proposed approach, the adaptive coding rate can be easily obtained by adjusting the displacement between the rows of a wavelet coding matrix \(C_{WCM}\) per \(m/k\), for integer \(1/k\), where \(k\) is the code rate, without losing the orthogonality properties of the matrix, fundamental for this coding technique, as discussed as follows.  
At each instant \(n=pm/k+q\), wherein \(p\in\{0,1,2,3,4,\cdots\}\) and \(q\in\{0,1,\cdots,m/k-1\}\), there will be \(m/k\) wavelet sub-symbols \(y^{j}_{pm+q},0\leq j\leq m/k-1\), generated simultaneously by the register \(q\)-th of each of the \(m\) banks \(WCM_{j}\) and available at the output of wavelet encoder. In Figure 1b, it can be observed that the wavelet sub-symbol \(y^{j}_{(pm/k)+q^{\prime}}\) by register \(q\)-th of bank \(WCM_{j}\), is given by:  
\[y^{j}_{(pm/k)+q}=\sum_{l=0}^{gk-1}a^{j}_{(lm/k)+q}x_{(p-l)m+j}. \tag{3}\]  
As there are \(mg/k\) elements in each bank of shift registers, as shown in Figure 1b, each input bit can affect at most \(mg/k\) wavelet sub-symbols. Finally, the \(m/k\) wavelet sub-symbols with the same time index \(n=(pm/k)+q\) are then added, and the resulting wavelet symbol is given by:  
\[y_{(pm/k)+q}=\sum_{j=0}^{m-1}\sum_{l=0}^{gk-1}a^{j}_{lm/k+q}x_{(p-l)m+j}. \tag{4}\]  
Figure 1: Encoder overview (**a**) and detailed view of \(MCW_{j}\) blocks of the wavelet encoder (**b**).  
The proposed wavelet coding process can also be written as the matrix product, as shown in the equation below:  
\[\tilde{y}=\tilde{x}\cdot C_{MCW}. \tag{5}\]  
Table 1 shows the wavelet symbols in relation to time, wherein it presents in detail Equation (5).  
As an illustration, Tables 2 and 3 show the symbols generated by the wavelet encoder based on the \(WCM\)\(2\times 8\) for \(k=1\) and \(k=0.5\), respectively.  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**n** & **0** & **1** & **\(\cdots\)** & **\(m/k\)** & **\(\cdots\)** & \(2g-1\)** & \(2g\)** & \(\cdots\) \\ \hline \(x_{0}\): & \((a_{0}^{0}\) & \(a_{1}^{0}\) & \(\cdots\) & \(a_{m/k}^{0}\) & \(\cdots\) & \(a_{2g-1}^{0}\)) & & \\ \(x_{1}\): & \((a_{1}^{0}\) & \(a_{1}^{1}\) & \(\cdots\) & \(a_{m/k}^{1}\) & \(\cdots\) & \(a_{2g-1}^{1}\)) & & \\ \(x_{2}\): & & & & \((a_{0}^{0}\) & \(a_{1}^{0}\) & \(a_{2}^{0}\) & \(\cdots\) & \(a_{2g-1}^{0}\)) \\ \(x_{3}\): & & & & \((a_{0}^{1}\) & \(a_{1}^{1}\) & \(a_{2}^{1}\) & \(\cdots\) & \(a_{2g-1}^{1}\)) \\ \(\vdots\) & & & & & \(\vdots\) & \(\vdots\) & \(\ddots\) \\ \hline  & \(y_{0}\) & \(y_{1}\) & \(\cdots\) & \(y_{m/k}\) & \(\cdots\) & \(y_{2g-1}\) & & \\ \hline \hline \end{tabular}
\end{table}
Table 1: Relationship in time between incoming bits and wavelet symbols.  
\begin{table}
\begin{tabular}{c c} \hline \hline \(nT_{s}\) & \(y_{m}\) \\ \hline
0 & \(a_{0}^{0}x_{0}+a_{0}^{1}x_{1}\) \\
1 & \(a_{1}^{0}x_{0}+a_{1}^{1}x_{1}\) \\
2 & \(a_{2}^{0}x_{0}+a_{2}^{1}x_{1}+a_{0}^{0}x_{2}+a_{0}^{1}x_{3}\) \\
3 & \(a_{3}^{0}x_{0}+a_{3}^{1}x_{1}+a_{0}^{1}x_{2}+a_{1}^{1}x_{3}\) \\
4 & \(a_{4}^{0}x_{0}+a_{4}^{1}x_{1}+a_{0}^{0}x_{2}+a_{2}^{1}x_{3}+a_{0}^{0}x_{4}+a_{ 0}^{