#### 2.1. Transfer Matrix Modeling

According to Maxwell’s equations and boundary conditions [

26,

27], the reflectivity of the

N-layer structure can be calculated by the transmission matrix method:

where

${\beta}_{k}=\left(\frac{2\pi {d}_{k}}{\lambda}\right)\times {\left({\epsilon}_{k}-{n}_{1}{}^{2}\mathrm{sin}{\theta}_{1}\right)}^{\frac{1}{2}}$,

${q}_{k}=\frac{{\left({\epsilon}_{k}{}^{2}-{n}_{1}{}^{2}\mathrm{sin}{\theta}_{1}\right)}^{\frac{1}{2}}}{{\epsilon}_{k}}$,

d_{k} represents the

k_{th} layer thickness,

n_{k} represents the RI in the

k_{th} layer, and

θ_{1} represents the incident angle.

where

R_{p} is the reflectance. The incident angles

θ_{1} are 42.6°, 42.7°, 42.75°, 42.8°, 43°, 43.3°, 43.5°, 43.7°, 44°, and 44.6°. The parameter values in the mathematical model will be listed below.

#### 2.2. Model Parameters

In

Figure 1,

n_{BK}_{7} can be calculated as follows [

26,

28]:

According to the Drude–Lorentz model, the thickness of the gold film is 50 nm and the dielectric constant can be calculated as follows [

26]:

where

λ_{p} = 168.26 nm is the plasma wavelength and

λ_{c} = 8934.2 nm is the collision wavelength.

The three kinds of SPD are simulated in the sensor simulation.

As shown in

Figure 2, among the three SPDs, SPD1 is the ideal light source, and SPD2 and SPD3 change the slope of the SPD to obtain different changing trends of spectral SNR and performance indicators.

In the actual measurements, the uncontrollable noise mainly comes from the detector, which is mainly divided into the readout noise, dark noise, fixed mode noise, and photoelectric noise [

22,

29]. Each noise is independent, and the total noise can be expressed as follows:

As shown in

Figure 3, the noise simulation value is given separately, and the final calculated simulation value

N is given.

N_{R} is dependent on the circuit design of the instrument and is mainly generated when the analog signal is transformed into a digital signal.

N_{R} can be calculated as follows [

29]:

N_{D} is the dark noise in the detector because of the thermal movement of particles, which produces current at the output end.

N_{D} can be calculated as follows [

29]:

N_{F} is the fixed mode noise caused by the difference in pixel dark current, which is mainly determined by the manufacturing process.

N_{F} can be calculated as follows [

29]:

N_{p} is the photoelectron noise, which is determined by the statistical difference of particle arrival at the detector.

N_{p} can be calculated as follows [

29]:

where

S_{bias} is a bias signal,

S_{D} is the dark current signal and wavelength point at the current wavelength point,

n_{e−} is the number of detected photoelectrons, and

g is gain constant. Given the influence of total noise, the SPR measurement curve is expressed as follows [

26]:

where

S_{m} is the measurement curve,

R_{p} is the reflectance curve, and

N is the total noise. This paper qualitatively analyses the effects of spectral SNR through the spectral SPR curve. During the simulation, the results are changed by adjusting the noise and SPD. The RI resolution is used as an evaluation index to judge the influence of the spectral SNR.

Three different SPDs are constructed and two noise levels are added. The standard deviation of resonance wavelength is regarded as noise for each resonance wavelength. The light intensity value is used as the signal value in the current wavelength. The spectral SNR corresponding to the resonance wavelength is simulated, as is shown in

Figure 4a,d,g. The spectral SNR is calculated as follows:

P_{s} is the spectral power signal, and P_{n} represents the resonant wavelength noise.

Figure 4 shows the spectral SNRs and fitted SPR curves under three spectral powers along with two types of noise. Spectral SNRs show the same trend as SPD, and the fitted SPR curves of the spectral power under different wavelengths are given. The fitted SPR curves are changed under different spectral SNRs. In the next part, we analyze the changes in sensor performance based on the changes in the fitted curves.

#### 2.3. RI Resolution

The resolution formula of RI can be obtained as follows [

30]:

where

${\delta}_{n}$,

${\delta}_{\lambda}$, and

${S}_{n}$ are the RI resolution, RI detection accuracy, and RI sensitivity of the SPR sensor, respectively [

31].

S_{n} is an important indicator of the sensor’s static characteristics and is defined as the ratio of the output change to the input change. In the SPR sensor, when the RI of the sample changes, the resonance wavelength

λ also changes. The RI sensitivity can be calculated as follows:

The RI of the sample is from 1 to 1 + ∆

n (∆

n = 0.00001), the deviation of resonance wavelength is obtained, and the sensitivity of the sensor is calculated and fitted by Equation (13). The fitted results are shown in

Figure 5.

As shown in

Figure 5, the sensitivity increases with resonance wavelength. The trend between resonance wavelength and sensor sensitivity under different conditions is the same. The increase in sensitivity with wavelength is consistent with the results obtained by mathematical model analysis [

30]. There is a slight difference in sensitivity, which is mainly due to the influence of the spectral SNR on the wavelength accuracy in the peak seeking process. The difference in the SPD results in the shift of the resonance wavelength, thus the sensitivity is affected.

${\delta}_{\lambda}$ is mainly affected by the FWHM and minimum value of the SPR curve. To verify this result, the effects of three trending spectral SNRs are simulated. The resonance wavelength corresponding to each angle is simulated 1000 times, and the standard deviation of the resonance wavelength here is used as the detection accuracy of the current wavelength.

As displayed in

Figure 6a,b, the growth rate in the resonance wavelength of 500–650 nm is small, indicating that the resonance wavelength value is relatively stable. When the resonance wavelength is 650–800 nm, as the resonance wavelength increases, the detection accuracy growth rate increases violently. Because the spectral SNR is very small, the fluctuation of the detected resonance wavelength changes violently, which leads to an increase in the standard deviation of the resonance wavelength and an obvious decrease in system performance. The results show that the spectral SNR can affect the detection accuracy of the current resonance wavelength.

In the simulation, three spectral power curves and two noise levels are presented. The noise and SPD are combined to obtain six simulation results. The influence of the spectral SNR is obtained through methods of controlling variables comparison.

#### 2.3.1. Same Noise Levels at Different SPDs

In this case, the changing trend of resolution is obtained by simulating the three SPDs under the same noise level.

Figure 7 shows the effect of noise on RI resolution.

As shown in

Figure 7, when the resonance wavelength is 500–650 nm, the resolution of the system changes monotonically. When the resonance wavelength is 650–800 nm, the resolution of the system presents different trends in two cases. The reason for the phenomena is that the spectral SNR of the system decreases rapidly, which means the noise will cause more impacts on the system. The impacts are so severe that the system cannot maintain its own modulated mode, resulting in a different trend of the resolution changes. Thus, it is important to find the optimal resonance wavelength. The optimal resonance wavelength is obtained by changing the SPD.

#### 2.3.2. Same SPD at Different Noise Levels

When the SPD is kept constant, the influence of noise on the sensor resolution can be observed. The influence of different noise levels on the current resonance wavelength and the best resolution is given in

Figure 8. The effect of the different noise levels at the same SPD is obtained.

#### 2.4. Experimental

The system consists of a light source (halogen lamp, Daheng Optoelectronic Technology Co., Ltd., beijing, China), a collimator (Φ5.0 mm, SMA905, Daheng Optoelectronic Technology Co., Ltd., beijing, China), a polarizer (Φ25.4 mm, FU-PZP-Y24, Daheng Optoelectronic Technology Co., Ltd., beijing, China), a SPR device (right-angle prism BK7, Daheng Optoelectronic Technology Co., Ltd., beijing, China, gold film thickness 50 nm), and a spectrometer (USB4000+ Ocean Optics, Weihai Optical Instrument Co., Ltd., Shanghai, China). The spectral curve of the halogen tungsten lamp is unstable for a short period, which affects the accuracy of the sensor experiment. The measurement experiment can be carried out when the measured spectral curve does not show a large jump. The light source is warmed up for 5 min and the measurement begins when the light source is stable. The measurement needs to be stopped after a period of measurement to prevent the stability of the light source from deteriorating. In the next part, the experimental results are described.

Figure 9a shows the spectral curves of different integration times from the same spectrometer. The fitted spectral SNR curve for the spectral curves of different integration times is shown in

Figure 9b. The measured SPR curves of the two spectral signals after adjusting the integration time in the SPR device are shown in

Figure 9c,d.