# LED Nonlinearity Estimation and Compensation in VLC Systems Using Probabilistic Bayesian Learning
## 3 PBL-Based LED Nonlinearity Estimation and Compensation in VLC  
### PBL Regression  
Following the PBL regression model described in [30; 35], for a given data set of input-target pairs \(\{\mathbf{s}_{n},\tau_{n}\}_{n=1}^{N}\) with length \(N\), the target samples \(\{\tau_{n}\}_{n=1}^{N}\) can be predicted by a linear combination of basis functions:  
\[\tau_{n}=\sum_{m=1}^{M}\mu_{m}\phi_{m}(\mathbf{s}_{n})+\epsilon_{n}=\mathbf{\mu}^{T} \mathbf{\phi}(\mathbf{s}_{n})+\epsilon_{n}, \tag{3}\]  
where \(\mathbf{\mu}=[\mu_{1},\mu_{2},\cdots,\mu_{M}]^{T}\) is the parameter vector with length \(M\), \(\{\phi_{m}(\mathbf{s}_{n})\}_{m=1}^{M}\) is a set of \(M\) basis functions and the basis vector is expressed by \(\mathbf{\phi}(\mathbf{s}_{n})=[\phi_{1}(\mathbf{s}_{n}),\phi_{2}(\mathbf{s}_{n}),\cdots,\phi_ {M}(\mathbf{s}_{n})]^{T}\), and \(\mathbf{\epsilon}=[\epsilon_{1},\epsilon_{2},\cdots,\epsilon_{N}]^{T}\) is the error vector due to the additive noise in the VLC system. Assuming that the error samples \(\{\epsilon_{n}\}_{n=1}^{N}\) are independently and identically distributed Gaussian with zero mean and variance \(\sigma^{2}\), a multivariate Gaussian likelihood for the target vector \(\mathbf{\tau}=[\tau_{1},\tau_{2},\cdots,\tau_{N}]^{T}\) can be written as follows [30]  
\[p(\mathbf{\tau}\mid\mathbf{\mu},\sigma^{2})=\left(2\pi\sigma^{2}\right)^{-N/2}\exp \left(-\frac{\parallel\mathbf{\tau}-\mathbf{\Phi}(\mathbf{s})\mathbf{\mu}\parallel^{2}}{2 \sigma^{2}}\right), \tag{4}\]  
where \(\mathbf{\Phi}(\mathbf{s})=[\mathbf{\phi}(\mathbf{s}_{1}),\mathbf{\phi}(\mathbf{s}_{2}),\cdots,\mathbf{ \phi}(\mathbf{s}_{N})]^{T}\) is an \(N\times(N+1)\) design matrix with \(M=N+1\). According to [30], the basis vector with a bias is defined as \(\mathbf{\phi}(\mathbf{s}_{n})=[1,K(\mathbf{s}_{n},\mathbf{s}_{1}),K(\mathbf{s}_{n},\mathbf{s}_{2}), \cdots,K(\mathbf{s}_{n},\mathbf{s}_{N})]^{T}\), in which \(K(\mathbf{s}_{i},\mathbf{s}_{j})\) is the kernel function. In this work, the Gaussian kernel is adopted and hence the kernel function is given by \(K(\mathbf{s}_{i},\mathbf{s}_{j})=\exp(-\lambda\parallel\mathbf{s}_{i}-\mathbf{s}_{j}\parallel^ {2})\), where \(\lambda\) is known as the width parameter. From the Bayesian perspective, we can constrain the parameters by defining a zero-mean Gaussian prior distribution over them which takes the form:  
\[p(\mathbf{\mu}\mid\mathbf{\alpha})=\prod_{n=0}^{N}\mathcal{N}(\mu_{n}\mid 0,\alpha_{n} ^{-1}), \tag{5}\]  
where \(\mathbf{\alpha}=[\alpha_{0},\alpha_{1},\alpha_{2},\cdots,\alpha_{N}]^{T}\) is a vector of \(N+1\) independent hyperparameters and each one is used to individually control the strength of the prior over its associated parameter [30]. By combining the likelihood and the prior within Bayes' rule, the posterior parameter distribution conditioned on \(\mathbf{\tau}\) can be obtained by  
\[p(\mathbf{\mu}\mid\mathbf{\tau},\mathbf{\alpha},\sigma^{2})=\frac{p(\mathbf{\tau}\mid\mathbf{\mu},\sigma^{2})p(\mathbf{\mu}\mid\mathbf{\alpha})}{p(\mathbf{\tau}\mid\mathbf{\alpha},\sigma^{2} )}, \tag{6}\]  
which is Gaussian \(\mathcal{N}(\mathbf{w},\mathbf{\Sigma})\) and  
\[\mathbf{\Sigma}=\left(\sigma^{-2}\mathbf{\Phi}^{T}\mathbf{\Phi}+\text{diag}(\mathbf{\alpha}) \right)^{-1}, \tag{7}\]  
\[\mathbf{w}=\sigma^{-2}\mathbf{\Sigma}\mathbf{\Phi}^{T}\mathbf{\tau}. \tag{8}\]  
Since it is analytically intractable to include Bayesian inference over those hyperparameters, a type-II maximum likelihood procedure can be used to find a most-probable point estimate \(\mathbf{\alpha}_{\text{MP}}\)[30]. Therefore, PBL is formulated as the local maximization with respect to \(\mathbf{\alpha}\) of the marginal likelihood \(p(\mathbf{\tau}\mid\mathbf{\alpha},\sigma^{2})\) and the logarithm of the marginal likelihood is given by [35]  
\[