# Research on Compressed Sensing Spectrometry Based on Electro-Optical Transmittance Coding
## 3 Experiment
### Compressed Sensing Spectrum Measurement Experiment  
The built compressed sensing spectrometry system was used to measure the blue, green, and red LED light sources. The FPGA provides a sinusoidal AC driving control voltage source, and simultaneously collects the driving voltage signal and measured spectrum signals. For the blue LED light sources, as shown in Figure 6, the non-correlation measurement with transmittance coding is adopted. The measurement data collected  
Figure 4: Calibration of spectral transmittance coding under different driving voltages. Figure 5: Relationship between the characteristic criterion and the number of transmittance coding. by the detector under different driving voltages are shown in Figure 6b. To solve the minimization problem in Equation (7), a sparsity adaptive matching pursuit (SAMP) solver was used [18]. Further, the sparse matrix \(\Psi\) was set as wavelet transform-db4, which exhibits good compressibility and reconstruction performance. The number of spectral bands are \(N\) = 1024. The spectrum signal recovered using \(M\) = 35 electro-optical transmittance coding compressed sensing measurements is shown in Figure 6c. Figure 6 shows that the measured spectral signals are different under the transmittance coding realized by different driving voltages, and the driving voltage of non-correlated measurements obtained using the SFFS algorithm is not selected at equal intervals. The original spectrum of the blue LED was also measured via a commercial spectrometer, Ocean Optics HR4000, a high-resolution optical fiber spectrometer with a resolution of 0.2 nm. The experimental results of the measurement methods agree well. Additionally, the reconstruction spectrum was also obtained using different numbers of measurements from 20 to 100, and the spectral reconstruction accuracy can be calculated using the reconstruction relative error defined as  
\[\sigma=\frac{\left\|\hat{x}-x\right\|_{2}}{\left\|x\right\|_{2}}\times 100\%. \tag{8}\]  
According to Figure 6d, the relative error does not exceed 3.69% when the measurements number reaches 35. The spectral measurements and reconstruction results of green LED and red LED light sources were recorded concurrently for M = 35 measurements, as shown in Figure 7.  
Figure 6: Blue LED light source spectrum measurement: (**a**) Blue LED; (**b**) Compressed measurement signal; (**c**) Reconstructed spectrum signal; (**d**) Relative error with different number of measurements from 20 to 100. The spectral measurement reconstruction results of LED light sources reveal that the compressed spectral measurement results obtained using our method are in good agreement with the measurement results of the commercial spectrometer HR4000. The reconstruction relative errors of blue, green, and red LED according to Equation (8) are recorded in Table 1.  
The experimental results of the LED light sources verify that compressed spectrum measurement with the electro-optical transmittance coding method can achieve high-precision spectrum reconstruction and measurements. Moreover, a narrow linewidth semiconductor laser with a center wavelength of 660 nm and line width of 0.06 nm is used \begin{table}
\begin{tabular}{c c} \hline
**Light Sources** & **Reconstruction Relative Errors (\%)** \\ \hline Blue LED & 3.69 \\ Green LED & 3.58 \\ Red LED & 3.79 \\ \hline \end{tabular}
\end{table} 
Table 1: Reconstruction relative errors of LED light sources. Figure 7: LED light source spectrum measurement: (**a**) Green LED light source; (**b**) Green LED measurement signal; (**c**) Red LED light source; (**d**) Red LED measurement signal; (**e**) Green LED spectrum reconstruction result; (**f**) Red LED spectrum reconstruction result. to test the resolution of the method. In the experiment, the number of measurements is also \(M\) = 35 and the number of reconstructed spectral data is \(N\) = 1024. The experimental results are shown in Figure 8.  
As shown in Figure 8, the relative error of laser spectral reconstruction is 7.20%.