Dust accumulation on the surface of solar panels is a persistent and critical issue affecting photovoltaic power generation efficiency. Particulate matter settling on the panels reduces the effective solar irradiance reaching the photovoltaic cells, directly leading to a decline in output power. This performance degradation is positively correlated with the thickness and density of the deposited dust layer. Beyond efficiency loss, uneven soiling can create localized shading, which in turn may cause hotspots, permanently damaging the solar panel cells. Therefore, the real-time, accurate detection of dust levels on solar panels is essential for timely cleaning and optimal maintenance scheduling, directly impacting the economic viability and operational lifespan of photovoltaic installations. This study focuses on an active detection system using laser scattering to quantify dust on solar panels. However, the inherently weak scattering signal from dust particles is invariably submerged within a sea of noise and interference, posing a significant challenge for accurate measurement. To extract this weak signal with high fidelity, we propose a novel two-stage denoising methodology combining Kalman filtering with Digital Lock-in Amplification (DLIA) technology, implemented on a Field-Programmable Gate Array (FPGA) platform for real-time processing.

Design and Analysis of the Photoelectric Detection System
The core principle of the solar panel dust detection system is based on active laser scattering. A modulated laser beam is incident on the surface of the solar panel. Dust particles on the panel scatter the incident light in all directions. A photodetector, strategically positioned, collects a portion of this backscattered light. The intensity of this collected scattered light correlates with the density of dust present on the solar panel surface. By establishing and calibrating this relationship, the system can provide a reliable metric for dust accumulation, aiding in data-driven cleaning decisions for solar power plants.
The primary challenge lies not in the principle but in the signal processing. The signal received by the photodetector is a complex mixture of the desired dust-scattered component and various noise sources. These interfering signals primarily originate from:
- Background Optical Noise: This is predominantly ambient sunlight, a broadband optical signal many orders of magnitude stronger than the laser scattering from dust on the solar panel.
- Internal System Noise: This includes fundamental electronic noises such as thermal (Johnson) noise from resistors, shot noise from the photodetector, and 1/f (flicker) noise from amplifiers.
- External Interference: Electromagnetic interference from other equipment and power line harmonics can also couple into the sensitive analog front-end.
To facilitate the separation of signal from noise, the system employs a modulated laser source. The laser is driven by a square-wave signal, imprinting a specific frequency signature onto the optical signal incident on the solar panel. Consequently, the useful dust-scattering information is confined to the harmonics of this modulation frequency, while much of the noise (like background sunlight) is either DC or broadband. The subsequent digital signal processing stage, implemented in the FPGA, is designed to perform synchronous detection to recover this modulated signal from the noisy measurement.
Design and Implementation of the Joint Denoising Algorithm
Algorithm Architecture
Individually, both Kalman filtering and lock-in amplification have limitations for this application. The Kalman filter is excellent for real-time, recursive estimation and can suppress a wide spectrum of noise. However, its performance is highly dependent on accurate knowledge of system and noise statistics (Q and R matrices), which are often difficult to estimate precisely for complex photoelectric signals. Imperfect tuning can leave residual noise. On the other hand, Digital Lock-in Amplification is a supremely effective technique for extracting a signal at a known reference frequency with a very narrow bandwidth, offering exceptionally high signal-to-noise ratio (SNR) improvement. However, its performance can degrade if the input signal is excessively noisy, as out-of-band noise can cause saturation or non-linear effects in the processing chain, and it requires time to settle due to its filtering nature.
Our proposed joint algorithm synergistically combines the strengths of both methods to overcome their individual weaknesses. The architecture is a sequential two-stage process:
- Stage 1 – Kalman Filter Preprocessing: The raw, noisy signal from the analog-to-digital converter (ADC) is first processed by a tuned Kalman filter. This stage acts as a robust, adaptive pre-filter. Its primary role is to perform a coarse denoising across a wide frequency band, significantly reducing the amplitude of noise components without requiring perfect statistical models. This cleansed signal is now much more suitable for the precise lock-in stage.
- Stage 2 – Digital Lock-in Amplification: The pre-filtered signal from Stage 1 is fed into a digital, dual-phase lock-in amplifier. This stage performs synchronous demodulation using a digitally generated reference signal matching the laser modulation frequency. It extracts only the signal component coherent with the reference, effectively rejecting all other frequency components, including any residual noise that passed through the Kalman filter. This stage provides the final, high-precision estimation of the signal’s amplitude and phase.
This cascade structure ensures that the lock-in amplifier operates on a relatively “clean” signal, improving its accuracy, dynamic range, and convergence speed. The overall algorithm is designed for efficient implementation on an FPGA, enabling a compact, fast, and high-performance embedded system for solar panel monitoring.
Implementation of the Kalman Filter Stage
For the scalar signal from our solar panel dust detection system, we implement a one-dimensional Kalman filter. The state-space model is simplified. We assume the “state” \(x_k\) is the true, denoised voltage value at time step \(k\). The process is modeled simply as:
$$ x_k = x_{k-1} + w_k $$
where \(w_k\) is the process noise (modeling slight variations in the true signal), assumed to be zero-mean Gaussian with variance \(Q\). The measurement \(z_k\) is the ADC reading:
$$ z_k = x_k + v_k $$
where \(v_k\) is the measurement noise (modeling all sensor and circuit noise), assumed to be zero-mean Gaussian with variance \(R\).
The Kalman filter operates recursively in two steps per iteration:
- Prediction:
$$ \hat{x}_{k|k-1} = \hat{x}_{k-1|k-1} $$
$$ P_{k|k-1} = P_{k-1|k-1} + Q $$
Here, \(\hat{x}_{k|k-1}\) is the prior state estimate, and \(P_{k|k-1}\) is the prior estimate error covariance. - Update:
$$ K_k = \frac{P_{k|k-1}}{P_{k|k-1} + R} $$
$$ \hat{x}_{k|k} = \hat{x}_{k|k-1} + K_k (z_k – \hat{x}_{k|k-1}) $$
$$ P_{k|k} = (1 – K_k) P_{k|k-1} $$
Here, \(K_k\) is the Kalman Gain, \(\hat{x}_{k|k}\) is the posterior state estimate (our denoised output for this time step), and \(P_{k|k}\) is the posterior error covariance.
The filter is initialized with \(\hat{x}_{0|0} = 0\) and \(P_{0|0} = 1\). The critical tuning parameters are \(Q\) (process noise variance) and \(R\) (measurement noise variance). \(R\) can be approximated from the variance of the raw signal data, while \(Q\) is a small empirical value; a smaller \(Q\) makes the filter trust the model more, leading to smoother output but potentially slower response.
Implementation of the Digital Lock-in Amplification Stage
The second stage is a fully digital, quadrature lock-in amplifier. Let the pre-filtered signal from the Kalman stage be \(S(t)\), which is a noisy square wave at the modulation frequency \(\omega_0\) with amplitude \(A\) and phase shift \(\phi\). It can be represented by its Fourier series plus noise \(N(t)\):
$$ S(t) = \frac{4A}{\pi} \sum_{m=1}^{\infty} \frac{(-1)^{m+1}}{2m-1} \cos\left[(2m-1)\omega_0 t + \phi \right] + N(t) $$
The lock-in amplifier digitally generates two orthogonal square-wave reference signals, \(U_{r1}(t)\) (in-phase) and \(U_{r2}(t)\) (quadrature-phase):
$$ U_{r1}(t) = \frac{4U_r}{\pi} \sum_{n=1}^{\infty} \frac{(-1)^{n+1}}{2n-1} \cos\left[(2n-1)\omega_0 t \right] $$
$$ U_{r2}(t) = \frac{4U_r}{\pi} \sum_{n=1}^{\infty} \frac{(-1)^{n+1}}{2n-1} \sin\left[(2n-1)\omega_0 t \right] $$
where \(U_r\) is the digital amplitude of the reference.
The core operation is multiplication (mixing):
$$ X(t) = S(t) \cdot U_{r1}(t), \quad Y(t) = S(t) \cdot U_{r2}(t) $$
This generates signals containing DC components, components at \(2\omega_0\), \(4\omega_0\), etc., and noise terms. The next step is low-pass filtering (LPF) to isolate the DC component. Assuming an ideal LPF that removes all AC components, the outputs are:
$$ X_{DC} = \frac{A U_r}{2} \left( \frac{4}{\pi} \right)^2 \sum_{m=1}^{\infty} \left( \frac{1}{2m-1} \right)^2 \cos \phi = \frac{8 A U_r}{\pi^2} \cdot \frac{\pi^2}{8} \cdot \cos \phi = A U_r \cos \phi $$
$$ Y_{DC} = \frac{A U_r}{2} \left( \frac{4}{\pi} \right)^2 \sum_{m=1}^{\infty} \left( \frac{1}{2m-1} \right)^2 \sin \phi = A U_r \sin \phi $$
The summation \(\sum_{m=1}^{\infty} \left( \frac{1}{2m-1} \right)^2\) converges to \(\pi^2/8\). The amplitude \(A\) and phase \(\phi\) of the signal from the solar panel scattering are then easily calculated:
$$ A = \frac{\sqrt{X_{DC}^2 + Y_{DC}^2}}{U_r} $$
$$ \phi = \arctan\left( \frac{Y_{DC}}{X_{DC}} \right) $$
This quadrature method is advantageous as it is insensitive to the phase difference \(\phi\) between the signal and reference, simplifying system calibration. The final clean signal can be reconstructed as \(A \cdot \text{SquareWave}(\omega_0 t + \phi)\). In practice, the LPF is a Finite Impulse Response (FIR) filter designed within the FPGA.
Experimental Validation and Result Analysis
Experimental Setup and Data Acquisition
The laser photoelectric detection system was physically constructed for validation. A 405 nm wavelength laser diode was used as the source, driven by a 1 kHz, 5V TTL square wave, with its output power adjusted to 10 mW. The laser was incident at a 45° angle onto the surface of a test solar panel sample. A photodetector was placed near the laser source to collect the backscattered light, approximately 10.7 cm from the illumination spot. The output voltage from the photodetector’s conditioning circuit was recorded using a data acquisition system for varying levels of artificially applied dust density on the solar panel. The acquired voltage data was then processed offline using the algorithm implemented in Quartus II software to verify the denoising performance before final FPGA integration.
The raw voltage waveform captured from the photodetector is shown conceptually (data from a dusty solar panel). The signal exhibits the expected 1 kHz square-wave modulation but is heavily corrupted by noise, appearing ragged. The noise floor is significant, obscuring the true amplitude of the scattering signal from the solar panel dust.
Analysis of Single-Stage Kalman Filter Results
The performance of the Kalman filter is highly sensitive to the choice of \(Q\) and \(R\). To find the optimal tuning for our solar panel scattering signal, we evaluated the filter’s output under different parameter sets. Performance was quantified using three metrics calculated over a signal segment:
- Signal-to-Noise Ratio (SNR): $$ \text{SNR} = 10 \log_{10}\left( \frac{P_{\text{signal}}}{P_{\text{noise}}} \right) $$ Higher is better.
- Root Mean Square Error (RMSE): $$ \text{RMSE} = \sqrt{ \frac{1}{N} \sum_{i=1}^{N} (s_i – \hat{s}_i)^2 } $$ Relative to a “clean” reference estimate. Lower is better.
- Smoothness (r): A metric based on the second derivative; a value closer to 1 indicates optimal smoothness without being over-damped.
The results are summarized in the table below:
| Q | R | SNR (dB) | RMSE | Smoothness (r) |
|---|---|---|---|---|
| 0.1 | 0.8 | 4.15 | 5.27 | 0.25 |
| 0.01 | 0.8 | 4.29 | 5.18 | 0.05 |
| 0.001 | 0.8 | 4.54 | 5.04 | 0.02 |
| 0.001 | 0.1 | 4.32 | 5.17 | 0.05 |
| 0.01 | 0.1 | 4.16 | 5.26 | 0.21 |
| 0.1 | 0.1 | 4.09 | 5.31 | 1.01 |
Analysis shows that as \(Q\) decreases (trusting the model more), the SNR generally increases, and the output becomes smoother. However, if \(R\) is also set too low (trusting the measurement too much), the filter can become under-damped, leading to increased RMSE. The configuration \(Q=0.001\), \(R=0.8\) yielded the best balance for our solar panel data, providing the highest SNR, lowest RMSE, and good smoothness. The Kalman-filtered signal from this configuration shows a markedly cleaner square wave, with high-frequency noise significantly suppressed, successfully completing the first-stage preprocessing.
Analysis of the Complete Joint Algorithm Results
The Kalman-filtered signal was then processed by the digital lock-in amplifier stage. The in-phase and quadrature reference signals were generated internally. The mixing process produced signals containing strong components at DC and even harmonics of 1 kHz. A 64th-order low-pass FIR filter with a Hanning window and a cutoff frequency of 1.5 kHz (sampling at 5 kHz) was designed to attenuate all AC components. The filtered outputs, \(X_{DC}\) and \(Y_{DC}\), were stable DC levels with minimal ripple. Using the equations from the previous section, the amplitude \(A\) and phase \(\phi\) were computed in real-time. The system could then reconstruct a clean, noise-free square wave representation of the original dust scattering signal from the solar panel. The processing time for one complete cycle of data was approximately 2 ms on the FPGA, meeting real-time requirements. The final output SNR achieved by the joint algorithm was measured to be 72.6 dB, demonstrating exceptional noise rejection.
Comparative Analysis with Other Denoising Methods
To underscore the efficacy of our proposed joint Kalman-DLIA method, we compared its performance against three other common denoising techniques applied to the same solar panel scattering dataset: Moving Average Filter (a simple low-pass), standalone Kalman filter (with optimal Q, R), and standalone Digital Lock-in Amplification. The results are compelling:
| Denoising Method | SNR (dB) | RMSE | Smoothness (r) |
|---|---|---|---|
| Moving Average Filter | 4.50 | 5.06 | 0.024 |
| Standalone Kalman Filter | 4.54 | 5.04 | 0.018 |
| Standalone Digital Lock-in Amp | 53.06 | 0.016 | 1.014 |
| Proposed Joint (Kalman + DLIA) | 72.57 | 0.002 | 0.999 |
The table clearly demonstrates the superiority of the cascaded approach. While standalone DLIA is very effective (53 dB SNR), our joint method improves upon it by approximately 36% in SNR (reaching 72.6 dB) and reduces the RMSE by about 87%. This significant enhancement is attributed to the Kalman filter’s role in preconditioning the signal, removing a substantial portion of out-of-band and non-Gaussian noise before the lock-in process, allowing the DLIA to operate at its maximum potential. The smoothness metric also confirms that the joint algorithm produces an output virtually free from noise-induced jaggedness while perfectly preserving the signal’s fundamental shape. For the purpose of accurately analyzing dust accumulation levels on solar panels, this method provides a distinctly more reliable and precise signal.
Conclusion
Accurate detection of dust on solar panels via laser scattering is fundamentally a problem of weak signal recovery in a high-noise environment. This study has successfully developed and validated a high-performance denoising algorithm tailored for this application. By strategically combining a tuned Kalman filter for adaptive, wideband pre-filtering with a precise quadrature digital lock-in amplifier for narrowband synchronous detection, we have created a synergistic two-stage processing chain. Implemented on an FPGA platform, the algorithm provides real-time, robust signal extraction. Experimental results using actual scattering data from solar panels demonstrate that the proposed joint algorithm outperforms individual methods, achieving a 36% higher SNR and an 87% lower RMSE compared to using a digital lock-in amplifier alone. This method effectively mitigates noise interference in photoelectric detection systems, thereby enhancing the precision, stability, and reliable detection range of solar panel soiling monitoring systems. It offers a practical and valuable solution for maintaining the efficiency and longevity of photovoltaic power generation assets.
