|
Algorithm 2 LDASG filtering for ECG denoising |
Initialize the number of orders N and the length of moving window ;
Compute the discrete curvature of the input ECG signal using Algorithm 1, except the data points in the first and last window;
Find the maximum and minimum value in and perform uniform quantization to map to via Equation (15);
Compute the weighting coefficients matrix of SG filters according to the length of moving window and orders N;
For the data points within the first and last window, they are replaced by the value of fitting polynomial of the SG filter on the central data point. Perform discrete convolution on the rest input ECG signal via Equation (4), the weighting coefficients for each data point are determined by the row of ;
The output of the discrete convolution is the result of the adaptive SG filtering.
|