1 Introduction

Real time detection and identification of explosives become an urgent need to thwart the increasing terroristic operations. This requires standoff detection techniques that can provide instant detection and classification of the materials and avoid the necessity for direct contact with the investigated material or the preparation of a sample for detection. One of the most promising techniques for this purpose is the Raman spectroscopy that can provide remote detection and classification of the materials with high sensitivity. Raman spectroscopy has been recognized as a powerful technique capable of detecting and identifying a large variety of biological, chemical or explosive materials which considered as a threat for our humanity from terrorist attacks.

Raman spectra of different molecules have their unique and specific shape characteristics that can be selected for distinction between different types of explosives (Tuschel and Mikhonin 2010; Mogilevsky et al. 2012). Different detection systems based on exploiting Raman effect for detection and identification of explosives or spectroscopic analysis for instrumental techniques have been developed and introduced (Carter et al. 2005; Gaft and Nagli 2008; Gottfried et al. 2008; Marshall and Oxley 2009; Misra et al. 2010; Zachhuber et al. 2010; Edelman et al. 2012; Botti et al. 2013; Hwang et al. 2013; Fountain et al. 2014; Lopez-Lopez and García-Ruiz 2014; Hakonen et al. 2015; Brown et al. 2016; Hakonen et al. 2016; Tuschel 2016; Thomas et al. 2017; Khandasammy et al. 2018; Wen et al. 2018; Zhang et al. 2018; Mahfouz et al. 2020; Ayoub et al. 2021a, b).

Jin and Cho successfully recorded Raman spectra of different chemical materials over a long distance up to 54 m for explosive identification. Most of the signatures could be well recognized despite some missing information, including the shifts and loss of some peaks of the observed Raman signal (Jin and Cho 2014). Zhang et al. obtained the Raman signal intensities of ammonium nitrate, potassium nitrate, and sodium nitrate in solid samples in a distance range from 2 to 10 m (Zhang et al. 2016). Although the Raman spectra of these three samples look similar in the highest peak; small differences can serve as a signature for discriminating between them.

Remote Raman spectra of naphthalene, sulfur, nitrobenzene, ammonium nitrate, potassium chlorate and urea are measured from 1752 m distance during daylight using spontaneous Raman signals with integration time of 1–30 s with high signal to noise ratio (S/N). The work is performed as attempt to use these systems to work from platforms mounted on helicopters and light airplanes (Misra et al. 2020).

The UV resonance Raman spectroscopy for of TNT, PETN, RDX, HMXis measured at 204–257 nm and it was found out that the spectral characteristics of the Raman signal increases and improved significantly with the decrease of excitation laser wavelength (Ghosh et al. 2012).

Recently, an experiment was conducted using a novel Raman wide field imaging spectrometer for detecting explosive residues operating at UV spectrum showed the advantages of using this spectrum over the Infrared systems (Hufziger et al. 2016). Most of the previous work in this area of research focused on the detection process of the extremely weak Raman backscattered signal. As a result of these studies, detecting explosives remotely or generally at further distance is challenging and requires choosing appropriate laser excitation wavelength, increasing the laser output power, using a telescope with optics optimized for this purpose to collect the weak backscattered Raman signal, using a detector with enhanced sensitivity, and using longer integration time, and or nanosecond time gating capability or generally reducing the ambient noise to enhance the signal to noise ratio. The mathematical model that describes the process of Raman effect was introduced in many references such as (Yinon 2007; Fountain et al. 2014; Lopez-Lopez and García-Ruiz 2014; Gares et al. 2016).

Laser light is electromagnetic radiation that contains an oscillating electric field. Raman scattering arises when a laser light is incident on a material causes molecular vibrations and distortion of the electron cloud or change in the polarizability of the molecule. Polarizability is determined by the ability of the electron cloud to interact with an incident electric field. The intensity of the Raman scattering depends on the excitation laser power, the square of the polarizability of the investigated molecule and inversely proportional to the fourth power of the wavelength of the excitation laser. Thus, the molecular information that distinguishes certain substance from other substances depends on one molecular property which is the polarizability, while the laser power and wavelength can be controlled by the designer or the user (Yinon 2007; Gares et al. 2016).

When a laser source with proper power and wavelength illuminates a material, there will be different types of scattered radiation. When laser light is scattered by a material, almost all of the scattered photons are due to an elastic process or the Rayleigh scattering in which the scattered photons have the same wavelength as that of the incident light. On the other hand, very small amount of the scattered photons is due to inelastic process in which the scattered photons have different wavelength from the incident light. The inelastic scattering process was first experimentally observed by Raman in 1928. These scattering processes are illustrated in Figs. 1, and 2. In Rayleigh scattering process, an electron in the ground state is excited and relaxes to the original ground state releasing a scattered photon with the same wavelength. Raman scattering process is classified into Stokes Raman scattering and anti-Stokes Raman scattering. In Stokes Raman scattering process, an electron is excited from the ground state to a virtual energy state and relaxes to a vibrational state. In the Stokes Raman scattering, energy of the incident photons is transferred or absorbed by the molecule thus in this case, the scattered photon has less energy or a longer wavelength than the wavelength of the incident photon. In Anti-Stokes Raman scattering process an electron is excited from the vibrational state to a virtual state and relaxes to the ground state. In this case energy is transferred from the molecule to the incident photon causes the scattered photon to have a shorter wavelength. This difference in energy or the shift in wavelength is corresponding to the energy of vibrational modes of the molecule which can be regarded as a fingerprint that uniquely identifies the chemical structure of the sample. The Rayleigh scattering process is the dominant, while the Raman scattered energy is extremely weak such that only one photon scatters in every 106–108 photons. Raman spectrum is expressed in the form of the intensity of the scattered photons versus wavenumber that represent the Raman shift in cm−1 and can be calculated from Eq. (1):

$$ Raman shift \left( {cm^{ - 1} } \right) = \left( {\frac{1}{{\lambda_{o} }} - \frac{1}{{\lambda_{s} }}} \right) $$
(1)
Fig. 1
figure 1

Diagram shows the Raman Scattering Processes

Fig. 2
figure 2

The energy diagram of Rayleigh and Raman scattering

where λo is the laser excitation wavelength and λs is the Raman shifted wavelength, both in cm.

One possible solution to the problem of the low signal intensity obtained from Raman spectroscopy is the surface enhanced Raman spectroscopy (SERS) (liszewska et al. 2019), and surface-enhanced resonance Raman scattering (SERRS) (Hakonen et al. 2015; Jha et al. 2015). SERS enhanced the Raman signal to noise ratio dramatically. On the other hand, detection using SERS technique needs sample preparation, fixed sample, and the SERS spectra sometimes is different from a normal Raman spectrum for the same material, so generally it can’t be used practically for standoff detection of explosives in real time, and/or to detect traces on moving objects.

Building real-time explosive material identification analysis software is more demanded by Raman spectroscopy. These systems require a robust signal processing built for signature matching for accurate identification of the explosive materials. Pattern recognition technique of principal component analysis (PCA) with Raman detection systems was proposed in (Hwang et al. 2013). Some techniques were used to extract and classify the Raman signature are presented in (Almeida et al. 2015; Pellegrino et al. 2015). The main contribution of this paper is not measuring the Raman spectra of different explosive materials at long distances as this has already been discussed and introduced in the literature but to propose an integrated tool for explosive detection and identification that facilitates the analysis process of different bulk or traces of explosive substances based on advanced signal processing to be used as a reliable standoff checkpoint explosive detection and identification system.

In this paper we adopt a novel signal processing technique that provides faster, and more accurate results which are required for real time computations compared to the other techniques. The proposed framework stores the processed acquired backscattered Raman signal and constructs an equivalent material signature using a compaction method to build up material’s signatures library. In the material detection phase, signature matching process carried out between the formed signature for the investigated material and the stored signatures in the constructed library.

The proposed framework under normal conditions detects the material under test within few milliseconds as a result of library fetching optimization. The proposed models are implemented using MATLAB codes that allow the operator to get real time detection of explosives and easy to use recognition interface form shows the identified substances, their classification, the signature plot, the matching level of the investigated substance, and gives threat identification with text and audio alarm. The tested explosive materials are trinitrotoluene (TNT), pentaerythritol tetranitrate (PETN), cyclotetramethylene-tetranitramine (HMX), ammonium nitrate-fuel oil (ANFO), Cyclotrimethylenetrinitramine (RDX), and Ammonium Nitrate.

2 Experimental setup and components description

In this study, selected conventional explosives materials are tested such as TNT, PETN, HMX, ANFO, and Ammonium Nitrate. Some safe materials such as sugar, salt, and flour are also studied to test the system's ability to distinguish between explosives and safe materials. The system can be upgraded easily to include any other types of explosives.

At the beginning, a Raman sample holder (Ocean Optics-RIP-PA-SH) that allows a working distance of 7.5 mm between the excitation laser source and the sample is used. The laser source beam is focused on the samples; the backscattered light from the sample is detected, and the Stokes-Raman spectra of the investigated materials are extracted and analyzed in the range 200–2000 cm−1. Detecting the explosive materials in contact is useful to allow storing the Raman signatures of the materials under test to build the required material library to be used in comparison with the materials to be identified later (explosive—safe—organic material…).The main system components and the setup of the experiment for detecting the explosive materials in contact and for stand-off detection up to 1 m are shown in Fig. 3. It was reported that the environmental conditions could change the characteristic signals of explosives (Mogilevsky et al. 2012; Tuschel 2016).

Fig. 3
figure 3

The experimental setup of the Raman system

In this experiment Raman spectrum of each of the investigated materials is collected at least 40 times in the lab and outside the lab in different days and different times during the days, this leads to increasing the probability of detection of the explosives in different environmental conditions. This is to account for any slight change in the Raman spectrum of the material under test due to the environmental change like room temperature, pressure, humidity, ambient light conditions, especially as the temperature change causes spectral variance.

To study the variability and the stability of the collected Raman spectra and generally the effect of the background materials on the detection process, the experimental measurements are performed when the investigated bulk/trace materials is deposited on different background materials like polytetrafluoroethytene sheet (PTFE), sand, clay, traces on fingers and door handle. After building the material library, a variable beam expander with 2 × to 12 × expansion ratio is used to control the size of the laser spot at the sample to allow detecting the explosive materials at distance up to 1 m.

The Raman spectra of the materials are obtained using the microcontroller-controlled Ocean Optics QE65000 spectrometer. The QE65000 spectrometer has a 1200 line/mm grating and the detector used is a scientific-grade, back-thinned, TE Cooled (TEC), 1044 × 64 element CCD array from Hamamatsu (product number S7031-1006) with spectral range from UV to NIR (200–1100 nm). The spectral resolution of the spectrometer is 1.3 nm. The used laser source for Raman excitation (LASER-785-LAB-ADJ-SMA) is a stabilized laser diode with Raman excitation wavelength of 785 nm, adjustable output power > 350 mW, beam divergence 0.5 mrad, spectral linewidth < 0.15 nm (FWHM), and SMA 905 fiber connection. It has integrated laser driver and is thermoelectrically cooled for optimum performance. The laser power is set to 400 mW in the experiment. The distance between the telescope and the Raman probe is 2 cm. The variable beam expander is adjusted to provide 10 × magnification and the measured laser spot size on the sample at 1 m is 1 cm. The used Raman coupled fiber probe (Ocean Optics-RIP-RPB-785-SMA-SMA) supports an excitation wavelength of 785 nm. The core diameters of the excitation fiber and the collection fiber are 105 and 200 µm, respectively, both has NA of 0.22, and SMA 905 connectors for excitation and collection fibers. The probe is characterized by the strong signal collection and high optical density laser line filtering (a notch filter at 785 nm (OD 6) is used to block the Rayleigh backscattered photons). The spectrometer interfaces to PCs through USB 2.0. A computer is used for signal processing and display of the results as will be explained in the next section. For all measurements performed in this experiment, the integration time used is 100 ms.

3 Signal processing

During this work part, the acquired Raman backscattered signal should be processed and recognized to identify the material under test (MUT). The MUT identification module should decide whether the material is safe, organic or explosive material with a probabilistic guess of the material type. The signal processing portion subdivided into two main phases. The training phase (material library construction) and the evaluation (engagement) phase. During the training phase, a set of identified materials should be fed to the training module to build the materials library. The second phase is the test or engagement phase where an unknown material should be investigated for safety. The proposed framework block diagram is shown in Fig. 4.

Fig. 4
figure 4

The proposed framework block diagram

Signal acquiring and processing are performed through the following steps:

3.1 Raman signal acquisition

After illuminating the MUT with the laser source, the backscattered Raman signal acquired by the Raman architecture setup, the data collected and formatted within a file that autonomously saved in a predefined location. After reading the material file, a preconditioning process should start to prepare the acquired information to be recognized.

3.2 Acquired signal preconditioning

The preconditioning process should include filtration, scaling and normalization. Filtration aims to improve the signal to noise ratio by removing the superimposed noise using a 1D gaussian kernel described by Eq. (2) for maximizing the recognition rate and minimizing ambiguity. Scaling and normalization sub processes aim to unify the scale of all the acquired backscattered Raman signals from different materials to the same magnitude scale using Eq. (3).

$$ g\left( x \right) = \frac{1}{{\sqrt {2\pi } \times \sigma }}e^{{ - \frac{{x^{2} }}{{2\sigma^{2} }}}} $$
(2)

where σ is the sample standard deviation

$$ \left. {g\left( x \right)} \right|_{{{\text{rescaled}}}} = \left. {g\left( x \right)} \right|_{{{\text{min}}}} + \left( {\frac{{\left. {g\left( x \right)} \right|_{{{\text{max}}}} - \left. {g\left( x \right)} \right|_{{{\text{min}}}} }}{{\left. x \right|_{{{\text{max}}}} - \left. x \right|_{{{\text{min}}}} }} \times \left( {{\text{x}} - \left. x \right|_{{\min }} } \right)} \right) $$
(3)

3.3 Training phase

During the training phase, the proposed framework stores the processed acquired backscattered Raman signal and constructs an equivalent material signature using a compacted shape version of the original backscattering after removing signal distortions using a compaction approach described by Eq. (4) and Fig. 6 to build up a material’s signatures library. This library should be the recognition reference for the proposed framework. The trainer interface form is shown in Fig. 5. The following subtasks are performed in the training phase:

Fig. 5
figure 5

The trainer interface form

3.3.1 Supervised training

Through supervised training, the proposed framework learns the categories and the types of the materials under supervision of system operator. The operator feeds the system with a predefined material data, a material signature constructed from the fed data and further the operator feeds the system with the material category and type that sticks with the material generated signature as shown in Fig. 5.

3.3.2 Signature formation

Material unique signature formed by compacting the acquired preconditioned backscattered Raman signal into constant width signature vector that describe the material unique pattern. Signature formation through compaction can mask different variations for the same material that may lead to false detection or recognition. The Raman Backscatter subdivided into predefined number of bins equals the signature vector width, while each bin compresses a median value for its corresponding Backscatter levels using the Eq. (4) and signature formation block diagram shown in Fig. 6.

$$ \left. {Sig} \right|_{1:n} = Median\left( {\left. {g(x)_{bins} } \right|_{1:n} } \right) $$
(4)
Fig. 6
figure 6

Material’s signature formation Illustration

3.4 Library construction (Patch Processing)

This step builds up the material library by loading all the backscattered Raman signal files of specific material in patch mode, the system trainer gives it a name and category. Material Library collects all the trained materials signatures in an organized form to facilitate signatures retrieval and matching. The library organized according to material category and material type to patches to speed up the matching subprocess. This process is shown in Fig. 7.

Fig. 7
figure 7

Library construction

3.4.1 Library control

Constructed library comprises some features and functions as appending new signatures, modifying, deletion or even removing the whole signatures library.

3.5 Engagement phase

Through this phase, the proposed framework engaged in an investigation channel and start to recognize the materials that passes through this channel, correct recognition rate mainly depends on the number of materials got trained and the number of records of the same material under different conditions and circumstances. The recognition interface form is shown in Fig. 8. The following subtasks are performed in the engagement phase:

Fig. 8
figure 8

The recognition interface form

3.5.1 Signature matching

At this step, a matching process carried out between the formed signature for the material under investigation and the trained signatures stored in the constructed library. The matching process uses Pearson correlation to achieve a quantitative matching criterion using Eq. (5):

$$ r_{xy} = \frac{{\mathop \sum \nolimits_{i = 1}^{n} \left( {x_{i} - \overline{x}} \right)\left( {y_{i} - \overline{y}} \right)}}{{\sqrt {\mathop \sum \nolimits_{i = 1}^{n} \left( {x_{i} - \overline{x}} \right)^{2} } \sqrt {\mathop \sum \nolimits_{i = 1}^{n} \left( {y_{i} - \overline{y}} \right)^{2} } }} $$
(5)

where rxy represents the correlation coefficient, \(x\) represents the material under investigation signature vector, \(y\) represents the library signature record.

3.5.2 Autonomous sensitivity adjustment

The proposed framework does not depend on a perfect matching between the investigated material signature and the stored signatures within library. The signature matching could be carried out using a predefined sensitivity level or it could be set to autonomously adjust (sensitivity scan) the sensitivity level until a stored library signature match the investigated signature at certain sensitivity level.

3.5.3 Real time detection

The proposed framework under normal conditions and opened sensitivity adjustment detects the MUT within few milliseconds as a result of library fetching optimization (the material dictionary or library stored categorized with labels and addresses for each material category and type, the engagement phase convert the whole dictionary to a single labeled matrix to facilitate and speed up the search process according to the predefined system sensitivity) as shown in Fig. 9 that could be considered real time recognition.

Fig. 9
figure 9

Materials dictionary optimization process

3.5.4 Visual signature comparison

The proposed framework includes a visual representation of the investigated material signature (Signature Curve) in addition to the recognized probable materials signatures to support the operator’s decision making as shown in Fig. 10.

Fig. 10
figure 10

Real time visual comparison

3.5.5 Detection alarming

In case of detecting a dangerous or threat material, the proposed framework sends out a warning siren and visual message that warn the operator about a probable threat material, in addition to its probable type and its probability ratio with respect to the adjusted sensitivity.

4 Experimental results and analysis

Performing the experiment during the daytime outside the lab up to 1 m to the sample using the current components and setup, we get a noisy Raman signal for each material but the detected signal still has its distinguished peaks of the Raman spectrum of the material. If the distance to the sample under test is increased beyond 1 m, the signal to noise ratio is degraded.

Improving the signal to noise ratio may be accomplished generally by choosing system components with better specifications such as laser power, wavelength, optics of the telescope, increasing the integration time, and using some techniques like nanosecond time gating. All the obtained Raman spectra, corresponding to the different samples under test, are saved in the library to be compared later with the measured samples.

The proposed GUI and the written code allow saving any kind of explosive or other substances. When the measured sample is tested and its Raman spectrum is matched with any of the previously saved Raman spectrum of the explosive materials, alarm is initiated and the GUI shows the type of detected explosive material and the percentage of the matching level.

The measured Raman spectra of the TNT, PETN, HMX, ammonium nitrate, ANFO, and RDX samples covering a range from 200 to 2000 cm−1 measured at 1 m as shown in Figs. 11, 12, 13, 14, 15, and 16 respectively. It can be seen that all major peaks of the investigated substances can be identified in the obtained spectrum at 1 m distance. The Raman spectrum is recorded and then compared to the stored Raman spectra in the material library for matching and identification. The result of investigating the TNT sample is obtained and displayed on the recognition interface form shown in Fig. 17. The TNT material is identified and classified as “Explosive Material” with matching level of 98.77%. This shows that the proposed system could correctly and accurately identify the TNT material.

Fig. 11
figure 11

The measured Raman spectra of TNT sample placed at 1 m from the excitation laser source measured with 100 ms integration time

Fig. 12
figure 12

The measured Raman spectrum of the of PETN sample

Fig. 13
figure 13

The measured Raman spectrum of the of HMX sample

Fig. 14
figure 14

The measured Raman spectrum of the of Ammonium Nitrate sample

Fig. 15
figure 15

The measured Raman spectrum of the of Anfo sample

Fig. 16
figure 16

The measured Raman spectrum of the of RDX sample

Fig. 17
figure 17

The recognition interface form shows that the material type is TNT with matching level of 98.77%

Following the same steps, the identification results of the PETN, HMX, ammonium nitrate, ANFO, and RDX are shown in Figs. 18, 19,20, 21, and 22 with matching levels of 97.41%, 95.64%, 99.93%, 97.2, and 98.92 respectively. After some days and testing other samples of PETN, and HMX, the system could identify the materials but with lower matching levels that was 79.83, and 67.51%, respectively. For these samples of PETN and HMX, the low matching level could be attributed to the sample itself (impurity, humidity of the sample, crystallity of the sample), in addition to the environmental conditions in the lab. Also, this can be attributed to the laser heating effect on the exposed sample which can change its chemical structure during the analysis.

Fig. 18
figure 18

The recognition interface form shows that the material type is PETN with matching level of 97.41%

Fig. 19
figure 19

The recognition interface form shows that the material type is HMX with matching level of 95.64%

Fig. 20
figure 20

The recognition interface form shows that the material type is Ammonium Nitrate with matching level of 99.93%

Fig. 21
figure 21

The recognition interface form shows that the material type is ANFO with matching level of 97.2%

Fig. 22
figure 22

The recognition interface form shows that the material type is RDX with matching level of 98.92%

Morphology of the sample (size and shape) and cyrstallinty can affect strongly the obtained spectra. So, separate research should be conducted to study these effects on the sample’s Raman spectra but this is not our goal in this study. Thus, it is sufficient for the current work this matching efficiency at this stage and the ability of the system to identify the material.

The obtained Raman spectrum from an investigated sample whether it is pure substance or composed of mixture of two or many substances will contain the Raman information about all of the molecules of the substances that form the sample. As the laser scans the examined area of the mixture, there will be some characteristic peaks that distinguish the components of the mixture. To extend the system capabilities, the system is tested to detect the explosives that are mixed with safe materials. To show this capability, a sample of a mixture contains 40% HMX, 30% flour, and 30% sugar is investigated. The measured Raman spectrum of the mixture is shown in Fig. 23. The proposed system could detect the safe and the explosive substances and the identification results show approximately equal matching levels, as shown in Fig. 24.

Fig. 23
figure 23

The measured Raman spectrum of the mixture 40% HMX, 30% sugar and 30% flour

Fig. 24
figure 24

The recognition interface form shows the identified substances, the classification, the signature plot (on the top right part of the figure), and the matching levels of the substances form the mixture

The close match between sugar and flour is due to their close chemical structure as they have the same heterocylic structure. HMX shows quite significant difference from them because the presence of N-NO2 bond which is neither in sugar nor on flour.

To confirm the ability of the system to detect the explosives mixed with safe substances, another sample consists of 50% TNT, and 50% sugar is tested. The measured Raman spectrum of the mixture of the sugar and the TNT is shown in Fig. 25. Figure 26 shows the ability to identify the TNT and the sugar with matching levels of 84, and 82.24%, respectively.

Fig. 25
figure 25

The measured Raman spectrum of the mixture of 50% of TNT, and 50% of sugar

Fig. 26
figure 26

The recognition interface form shows that the system could identify, classify the mixture of TNT and the sugar with matching levels of 84%, and 82.24%, respectively

The data in the figures presented in this section illustrate that the proposed Raman system can accurately identify the investigated substances. Regardless the obtained matching level, any indication of the presence of explosive is important to take actions in time, and generally in this case the probability of miss is unacceptable.

5 Conclusion

In this paper, we proposed a real time standoff detection and identification of explosives based on high performance Raman spectroscopy and novel signal processing technique. The results presented in this paper show the ability of the proposed Raman system to detect, identify the investigated substances, and classify them to safe and explosives substances. The proposed models are implemented using MATLAB codes that allow the operator to get real time detection of explosives and easy to use recognition interface form shows the identified substances, their classification, and the signature plot. The investigated substances are TNT, PETN, HMX, ammonium nitrate, ANFO, and RDX that could be identified with matching levels 98.77%, 97.41%, 95.64%, 99.93%, 97.2, and 98.92, respectively. The measurement is performed at distances up to 1 m in ambient light conditions. It is also shown the ability of the proposed system to detect and differentiate between the explosive materials accurately even if it is mixed with other safe material which is one of the important results presented in this paper. This is demonstrated by investigating a sample contains 40% of HMX, 30% sugar, and 30% of flour, and another sample formed of 50% of TNT, and 50% of sugar to confirm the results. The system can be used as standoff check point explosive detection system and generally can be used for building a compact system for Homeland security and for securing the important facilities. In the future work we intend to study the identification of different new explosives, explosive mixtures and pbx; to find the trace limit of sample identification for the same distance 1 m; and to study the main peak shift for example TNT under different conditions and different common mixtures.