# Modified Joint Source-Channel Trellises for Transmitting JPEG Images over Wireless Networks
## 4 Simulated Results  
We applied our combined JSCC model to estimate the average peak signal-to-noise ratio (PSNR) for test JPEG images over a wireless channel with additive white Gaussian noise (AWGN). When the linear code encoding JPEG images over such a channel is sufficiently long, accurately estimating image quality becomes difficult. The average bit error rate (BER) of a sufficiently long string of code can be estimated through adequate sampling to decrease computational complexity. We selected the subsets of several random codes and sample codewords produced from these codes through a code expurgation process. In the expurgation process, a JPEG image with dimensions 512 \(\times\) 512 was first divided into 4096 8 \(\times\) 8 blocks. Second, each block was converted to the frequency domain using the block's DCT transform. Third, the frequency coefficients in each block were encoded and the resulting bit sequence was used to encode random codes. The trellis was constructed using a random code \((n,k)\). Fourth, the watermarked image quality was calculated using the Equation (8)  
\[PSNR=10\text{log}_{10}\frac{255^{2}}{MSE} \tag{8}\]  
where \(MSE\) represents the mean square error between the original JPEG image and the decoded image over a slow-fading channel with AWGN. \(MSE\) is calculated using the Equation (9):  
\[MSE=\frac{1}{N}\text{$\sum_{i=1}^{512}\sum_{j=1}^{512}(I_{0}(i,j)-I_{r}(i,j))^{ 2}$} \tag{9}\]  
The robustness of the noise channel to be used in JPEG compression was evaluated as follows. The channel model and its impulse response conform to the IEEE 802.11b standard. The delay power spectrum for the IEEE 802.11b model is such that an exponentially decaying function and path amplitude form a Rayleigh distribution. Additionally, the distance between the amplitude samples is constant in the IEEE 802.11b model. The discrete channel impulse response of the 802.11 model is given by  
\[g(\tau)=\sum_{k=1}^{K_{\text{max}}}\beta_{k}\delta(\tau-kT_{s})e^{i\theta_{k}} \tag{10}\]  
where  
\[\frac{K_{\text{max}}}{\left|\beta_{k}\right|^{2}}=\frac{\left|\frac{10\tau_{ \text{rms}}}{T_{s}}\right|}{\left|\beta_{0}\right|^{2}}e^{-kT_{s}/\tau_{rms}}\]  
where \(\tau_{rms}\) is the root mean square delay spread in a given indoor area, and \(T_{s}\) is the sampling interval considered in realizing the channel impulse response. The delay power spectrum is calculated using the Equation (11):  
\[Q(\tau)=\sum_{k=1}^{K_{\text{max}}}|\beta_{k}|^{2}\delta(\tau-kT_{s}) \tag{11}\]  
Figure 6 illustrates the exponential profile for the delay power spectrum in the 802.11b channel mode. The filter taps are independent complex Gaussian variables with an average power profile that decays exponentially. In the simulation of this channel, each sample of the channel impulse response is generated from a filtered complex Gaussian random variable,  
\[h(k)=N(0,\frac{1}{2}\overline{\left|\beta_{k}\right|^{2}})+jN(0,\frac{1}{2} \overline{\left|\beta_{k}\right|^{2}}),\]  
\[for\quad k=0\dots K_{\text{max}}\]This variable induces Rayleigh amplitude fading with variance \(\overline{\left|\beta_{k}\right|^{2}}\) and a uniform distribution between \(\left\{0,2\pi\right\}\) for the phase \(\phi_{k}\). The value of \(\overline{\left|\beta_{0}\right|^{2}}\) was selected to normalize the addition of all samples of the delay power spectrum to 1. The two-tiered trellis model developed in this study employs BCJR decoding to maintain acceptable image quality over a wireless fading channel. The combination of VLCs and linear block codes in the transmitter reduces error propagation and decoding complexity compared with the conventional source-channel tandem system that uses separate source and channel coding optimizations. Our experiments show the superior performance of our proposed JSCC scheme with respect to the bandwidth compression ratio and coding ratio \(k/n\), over different signal-to-noise ratios (SNRs). We examined the robustness of our JSCC model over various channels using expurgating techniques.