# Design and Implementation of DSLMS Algorithm Based Photoelectric Detection of Weak Signals
## 2 Related Work  
### Theoretical Analysis of Adaptive Filters  
Adaptive filters deal with weak signals without knowing the statistical characteristics of the input signal and noise; the filter itself can learn or estimate the statistical characteristics of the signal during the working process [18] and adjust its parameters based on this to achieve the optimal filtering effect under a specific cost function [19]. LMS algorithmic filters are a kind of adaptive filter widely used in noise cancelation, echo cancelation, spectral line enhancement, channel equalization, system identification, etc. [20; 21; 22]. As shown in Figure 1, the LMS algorithm includes two essential parts: filtering and adaptive processes. The filtering process consists of two key steps: Firstly, in the adaptive filtering process, the input signal, \(i(n)\), first undergoes a multilevel structure consisting of delay units \(\left(Z^{-1}\right)\) and weights, \(w_{0}(n),w_{1}(n),\cdots,w_{M-1}(n)\), which is responsible for implementing the signal weighting and accumulating it to form the output signal, \(o(n)\)[23]. The output of each stage consists of the product of the corresponding weights and the delayed version of the input signal, which is summarized into the final output of the filter. The adaptive adjustment mechanism is based on the error, \(e(n)\), between the output signal, \(o(n)\), and the desired signal, \(d(n)\). This error signal is used to guide the updating of the weight parameters according to a gradient descent algorithm, where the weight adjustment is proportional to the product of the error signal and the input signal, and a step factor (\(\upmu\)) controls the update amplitude. Such a weight-updating process aims to gradually reduce the mean square error between the output and the expectation, thus optimizing the overall performance of the filter [24]. The horizontal filter input signal vector, \(i(n)\), is denoted as \(i(n)=[i(n),i(n+1),\cdots,\)\(i(n-M+1)]^{T}\), where \(M\) is the order of the filter. The weight vector, \(w(n)\), of the filter is \(w(n)=[w_{0}(n),w_{1}(n),\cdots,w_{M-1}(n)]^{T}\), in this case, the output, \(o(n)\), of the filter is calculated as shown in Equation (1):  
\[o(n)=w^{T}(n)i(n) \tag{1}\]  
Equation (2) is the estimation error at the nth moment. \[ \begin{array}{ll}e(n)&=d(n)-o(n)\\ &=d(n)-w^{T}(n)i(n)\end{array}  \tag{2}\]  
Figure 1: Schematic diagram of the LMS algorithm. Equation (3) is the lateral filter's mean square error criterion cost function. \[J(n)=E\Big{\{}\big{|}e(n)\big{|}^{2}\Big{\}}=E\Big{\{}\Big{|}d(n)-w^{T}(n)i(n) \Big{|}^{2}\Big{\}} \tag{3}\]  
The gradient descent method is applied to adjust the values of the adaptive filter's weight coefficient vectors along the performance surface's negative gradient direction. Equation (4) is the iterative formula for calculating the weight vector, \(w\). \[w(n+1)=w(n)+\mu(-\
abla J) \tag{4}\]  
where \(\mu\) is the step factor, and \(\mu>0\). The transversal filter is optimized by seeking a weight vector that minimizes the mean square error cost function. For a generalized smooth process when the number of iterations tends to infinity, the expectation of this weight vector estimate is close to the Wiener optimal solution, \(w_{opt}\)[25]. Although the traditional least mean square error (LMS) adaptive filtering algorithm performs well in many aspects, the algorithm suffers from several shortcomings in applications dealing with weak signals. First, the traditional LMS algorithm uses the product of the instantaneous error and the weight vector, \(e(n)i(n)\), as an approximation of the gradient vector, \(\
abla J(n)\). Since this approximation does not include the computation of the expectation value in the weight-updating process, its iterative step lacks robustness under the influence of noise. Second, the step factor (\(\mu\)) plays a decisive role in the weight-updating process, which directly affects the response speed of the filter parameter tuning as well as the rate of minimizing the error.