# Frequency Range Optimization for Continuous Wave Terahertz Imaging
###### Abstract
The transmitter and receiver in transmission mode are then moved as in single-point scanning, and a spectrogram image is generated. Each trace in the spectrogram was generated in the frequency range between 710 GHz to 810 GHz. The acquired spectrogram image was processed using the proposed Gauss Spotlight Filter (GSF), and then compressed into a one-dimensional (1D) image. The GSF method assumes that the intensity profile or spotlight of the PCA antenna has a Gauss intensity function [18]. One-dimensional image compression was developed for amplitude images and phase images. The low acquisition time was the first problem mitigated with the proposed THz imaging techniques applied to material classification. Each material in the sample was observed in a wide frequency range. Based on an expert opinion, the frequency range was set from 710 GHz to 810 GHz. A narrower bandwidth and bidirectional scanning helped reduce the acquisition time significantly. The second problem mitigated by the proposed THz imaging technique was frequency tuning. Frequency tuning in THz-FDS systems is performed by shifting the wavelengths. Wavelength shift can be achieved by heating or cooling the laser diode. Since the actual frequency is too high to be measured, it is estimated based on the temperature difference. The actual frequency differs from the target frequency, and the resulting data will have additional phase shifts. With a broader frequency range, the phase shifts occur because of the tuning error. The proposed THz imaging proved to mitigate some of the THz-FDS's problems. However, the acquisition time still needed to be lowered for practical applications. An approach to frequency range optimization is proposed in this paper. In the preliminary work, the expert chose the frequency range and, in this paper, a convolutional neural network (CNN) and occlusion sensitivity were used for frequency range optimization. A windowing spectrum dilation (WSD) [19] algorithm was proposed for the transformation of data series to two-dimensional (2D) images. The 2D images created using WSD were then used to train the CNN and for sample classification. The WSD algorithm leans onto the measured data's properties so that, at lower frequencies, the intensity of the detected THz waves is much higher; therefore, spectral footprints at lower frequencies will have a higher impact on the classification. The proposed WSD algorithm mitigated frequency tuning errors while retaining full spectrum information. In this paper, the WSD algorithm and classification using CNN were used to distinguish between different materials in the observed sample. The goal was to use CNN visualization features, and determine which features are the most suitable for material classification and, based on a CNN visualization output, select the optimized frequency range. The CNN was analyzed and visualized using occlusion sensitivity. Occlusion sensitivity is one of many CNN analytics tools, as shown in [20], and its result is the occlusion map of the same size as the input image to the CNN. In the first step of the occlusion sensitivity, the algorithm selects the first pixel or area in the image. The image with the occluded pixel is used for prediction, and a change is estimated in the probability score. The change in the probability score is stored in the occlusion map, and the next pixel or area of the image is processed. The algorithm repeats until every pixel or area in the image has been processed. Any pixel or area with a high probability score change has a high impact on the classification. The occlusion sensitivity function (OSF) can be estimated, since we can estimate the frequency from the measured spectrum in the 2D image created using inverse WSD transformation. The optimized frequency range can be selected from the OSF. Occlusion sensitivity was used successfully in different applications, such as COVID-19 detection [21]. The experimental validation of the proposed method is presented in this paper. The sample was built from three different materials.