Multi-stage processing pA-stage weak current accurate acquisition method
By employing a multi-stage processing method, combined with improved median averaging filtering, improved variable step size LMS algorithm, and dynamic weighted least squares calibration method, the accuracy and reliability issues of traditional weak current detection in various noise environments are resolved, achieving efficient pA-level weak current acquisition.
Patent Information
- Application Number
- CN202511469886.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-15
- Publication Date
- 2026-02-03
AI Technical Summary
Traditional weak current detection technology is difficult to cope with complex environments where multiple types of noise coexist, resulting in insufficient detection accuracy and poor reliability.
A multi-level processing method is adopted, including an improved median average filtering algorithm to suppress impulse interference, an improved variable step size LMS algorithm to eliminate power frequency interference, and a dynamic weighted least squares calibration method to improve data nonlinearity, thus constructing a multi-level noise suppression system.
It significantly improves the signal-to-noise ratio of weak current detection, reduces measurement errors caused by component tolerances, improves response speed and stability, and reduces hardware costs and CPU load.
Smart Images

Figure CN121456291A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of weak current detection, and particularly relates to a multi-stage processing pA-level weak current accurate acquisition method. BACKGROUND
[0002] As a key technology of electrical measurement, weak current detection has important application value in the fields of biomedicine, semiconductor testing, nuclear technology and photoelectric detection, and the accurate measurement of pA-level signals directly affects the performance indicators of related technologies. At present, high-end weak current detection equipment faces the dilemma of high price and limited maintenance in China. Compensation through innovative signal processing algorithms under low-cost hardware is the key path to realize technological breakthrough.
[0003] pA-level weak current signals are easily overwhelmed by 1 / f noise, power frequency interference and burst pulse noise, and the detection requires high robustness of the algorithm. Although the traditional weak current detection technology such as adaptive filtering algorithm (classic LMS) can suppress periodic noise, it has defects such as slow convergence speed and large steady-state error in pA-level detection, and is almost ineffective against transient interference. The least square calibration method estimates parameters by minimizing the sum of squares of residuals, which causes the influence of abnormal points to be squared and amplified, and the fitting result may deviate seriously from the true trend. The current algorithm architecture often adopts a single processing mode, which is difficult to cope with the complex environment of coexistence of multiple types of noise in actual application scenarios, and seriously restricts the accuracy and reliability of weak current detection. SUMMARY
[0004] The purpose of the present application is to provide a multi-stage processing pA-level weak current accurate acquisition method, aiming to solve the problem of insufficient accuracy of weak current detection caused by the difficulty of traditional weak current detection technology in coping with the complex environment of coexistence of multiple types of noise in actual application scenarios.
[0005] To achieve the above purpose, the present application provides a multi-stage processing pA-level weak current accurate acquisition method, comprising the following steps:
[0006] Step 1: input the original signal, and suppress the pulse interference by an improved median average filtering algorithm;
[0007] Step 2: use an improved variable step LMS algorithm to eliminate power frequency interference and retain effective signal characteristics;
[0008] Step 3: improve data nonlinearity by a dynamic weighted least square calibration method, and output the processed current signal.
[0009] Optionally, the process of suppressing pulse interference by the improved median average filtering algorithm comprises the following steps:
[0010] Step 1.1: Initialize parameters; mainly including maximum window size, minimum window size and outlier threshold, the maximum and minimum window size need to be considered in setting to balance real-time and filtering effect, and the outlier threshold needs to balance sensitivity and robustness.
[0011] Step 1.2: Calculate the local signal-to-noise ratio; take the minimum window with the current sampling point as the center and calculate the median value of the data in the window, and the local signal-to-noise ratio is calculated.
[0012] Step 1.3: Dynamically adjust the window size according to the real-time signal-to-noise ratio; specifically, automatically expand the window (maximum not more than the maximum window) in the low signal-to-noise ratio area to enhance the noise suppression ability, and reduce the window (minimum not less than the minimum window) in the high signal-to-noise ratio area to retain signal details, solve the problem of unstable performance of fixed window algorithm in noise fluctuation environment.
[0013] Step 1.4: Median filter processing for data in the dynamic window; take the median value of the data in the current window, mark and remove the outliers whose deviation from the median value exceeds the outlier threshold, to avoid the influence of these outliers on the final result.
[0014] Step 1.5: Weighted average output. Calculate the standard deviation of the non-outlier points in the current window, and then perform Gaussian weight distribution, so that the data close to the median value has a greater contribution, which not only smooths random noise but also maximizes the retention of signal authenticity, and finally obtains the weighted average output result.
[0015] Optionally, the execution process of the improved variable step-size LMS algorithm comprises the following steps:
[0016] Step 2.1: Initialize LMS parameters; mainly including basic step size, weight vector, noise variance threshold and effective data variance of inherited median average filter output.
[0017] Step 2.2: Generate 50Hz orthogonal reference signal;
[0018] Step 2.3: Dynamically adjust the step size according to the effective data variance of the median average filter output; realize automatic reduction of step size in high noise and automatic increase of step size in low noise, achieve the effect of balancing convergence speed and steady-state accuracy.
[0019] Step 2.4: Estimate the power frequency noise; estimate the current power frequency noise according to the current anti-interference weight and the noise reference signal.
[0020] Step 2.5: Improved variable step-size LMS algorithm output; calculate the error of the current data point. Through the algorithm, the power frequency interference is offset, and the weak current effective signal is retained.
[0021] Step 2.6: Anti-interference weight update. The weight is updated by a dynamic step for the next sampling point noise estimation.
[0022] Optionally, the execution process of the dynamic weighted least square calibration method comprises the following steps:
[0023] Step 3.1: Establishing a dynamic weighted least square calibration method model of unknown parameters;
[0024] Step 3.2: Setting a window size, calculating a standard deviation according to a real system input weak current and a window-in front-stage filter output residual error;
[0025] Step 3.3: Dynamically updating the weight according to the standard deviation of the residual error; the weight is reduced with the increase of the residual error, and the influence of noise and abnormal values is suppressed.
[0026] Step 3.4: Solving the weighted least square solution;
[0027] Step 3.5: Determining the specific parameters of the model, repeating step 3.3 until the parameters are stable or the maximum iteration number is reached. The specific recursive update avoids matrix operation, and the weight and residual error jointly adjust the parameter update direction until the parameters are stable or the maximum iteration number is reached.
[0028] The application provides a multi-stage processing pA-level weak current accurate acquisition method, the median average filtering algorithm and the variable step LMS adaptive algorithm are improved for system noise, the two are combined to construct a multi-stage noise suppression system, and specifically, the improved median average filtering algorithm is used for suppressing pulse interference and reducing most of the noise, the improved variable step LMS adaptive algorithm is used for suppressing power frequency interference, and the dynamic weighted least square calibration method is used for compensating system nonlinearity, so that the signal-to-noise ratio is greatly improved. The measurement error caused by the tolerance of the component is effectively reduced. The method of the application has lower time complexity, reduces redundant calculation, reduces CPU load, improves response speed and stability, reduces hardware requirements and cost, greatly improves the method speed while ensuring accuracy, and considers real-time performance. BRIEF DESCRIPTION OF DRAWINGS
[0029] In order to more clearly illustrate the technical solutions of the embodiments of the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiment or prior art description. Obviously, the drawings in the following description are only some embodiments of the application, and for those skilled in the art, other drawings can also be obtained without creative labor.
[0030] Figure 1 is a method principle schematic diagram of a multi-stage processing pA-level weak current accurate acquisition method of the application.
[0031] Figure 2 is a specific flowchart of the pA-level weak current accurate acquisition method of the multi-stage processing of the present application.
[0032] Figure 3 is a flowchart of the least square calibration model of the specific embodiment of the present application.
[0033] Figure 4 is a 100pA sampling frequency domain diagram before processing of the specific embodiment of the present application.
[0034] Figure 5 is a 100pA sampling frequency domain diagram after processing of the specific embodiment of the present application. DETAILED DESCRIPTION
[0035] Embodiments of the present application are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference signs represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the accompanying drawings are exemplary and are intended to explain the present application, and cannot be understood as a limitation of the present application.
[0036] The present application provides a pA-level weak current accurate acquisition method of multi-stage processing, comprising the following steps:
[0037] Step 1: input the original signal, and suppress the pulse interference by the improved median average filtering algorithm;
[0038] Step 2: use the improved variable step size LMS algorithm to eliminate the power frequency interference and retain the effective signal characteristics;
[0039] Step 3: improve the data nonlinearity by the dynamic weighted least square calibration method, and output the processed current signal.
[0040] Please refer to Figure 1 and Figure 2 , Figure 1 is the method principle block diagram of the present application, Figure 2 is a specific implementation flowchart, first, the weak current signal is suppressed by the improved median average filtering algorithm to suppress the pulse interference, reduce the overall noise, and effectively improve the convergence characteristics of the later stage filtering. Secondly, the improved variable step size LMS algorithm eliminates the power frequency interference while retaining the effective signal characteristics, and finally, the dynamic weighted least square calibration method is used to improve the data nonlinearity, preferentially trust the high reliability data, thereby improving the calibration accuracy. The specific description of each part of the algorithm is as follows.
[0041] I. Improved median average filtering algorithm
[0042] The median average filtering algorithm combines the median filtering and the sliding average filtering algorithm, and is a hybrid filtering method. The median average filtering algorithm has the pulse noise suppression capability of the median filtering and the smoothing characteristic of the sliding average. However, in the median average filtering with a fixed window, if the window size N is too large, the signal is excessively smoothed and the rapid change details are lost; if the window size N is too small, the noise suppression is insufficient and the signal-to-noise ratio (SNR) is limited.
[0043] Based on this, an improved median average filtering algorithm is proposed. The window size is dynamically adjusted by real-time evaluation of the local SNR of the signal. In the high noise area (low SNR), the window is increased to enhance the noise suppression; in the low noise area (high SNR), the window is reduced to retain the signal details. The improved median average filtering algorithm includes the following 5 steps:
[0044] Step 1.1, initialize parameters. Mainly including the maximum window size, the minimum window size and the outlier threshold. The maximum and minimum window sizes need to be considered in setting to balance the real-time performance and the filtering effect, and the outlier threshold needs to balance the sensitivity and the robustness.
[0045] Step 1.2, calculate the local SNR. Take the minimum window and calculate the median value of the data in the window with the current sampling point as the center, and the local SNR is calculated. The local SNR can accurately identify the noise level of the current signal and provide a decision basis for subsequent processing.
[0046] Step 1.3, dynamically adjust the window size according to the real-time SNR. In the low SNR area, the window is automatically expanded (not more than the maximum window) to enhance the noise suppression capability, and in the high SNR area, the window is reduced (not less than the minimum window) to retain the signal details, solving the problem of unstable performance of the fixed window algorithm in the noise fluctuation environment.
[0047] Step 1.4, median filtering processing of the data in the dynamic window. The median value of the data in the current window is taken, and the outlier points whose deviation from the median value exceeds the outlier threshold are marked and removed to avoid the influence of these outliers on the final result.
[0048] Step 1.5, weighted average output. The standard deviation of the non-outlier points in the current window is calculated, and then the Gaussian weight is distributed, so that the data close to the median value has a greater contribution, which not only smooths the random noise but also maximally retains the signal authenticity, and finally the weighted average output result is obtained.
[0049] The improved median average filtering algorithm is used as the pre-processing algorithm of the application, which dynamically eliminates impulse interference and suppresses most noise (such as power frequency interference) by adjusting the filtering strength in real time through an adaptive window, avoids abnormal values far exceeding the signal body from causing the weight of the subsequent improved LMS adaptive algorithm to fluctuate sharply or even diverge, greatly improves the convergence speed of the improved LMS adaptive algorithm, and reduces the CPU load while improving real-time performance.
[0050] II. Improved variable step-size LMS adaptive algorithm
[0051] The traditional least mean square (LMS) adaptive algorithm is an adaptive filtering algorithm based on gradient descent method, which aims to optimize the coefficients of the filter by minimizing the mean square error. The performance of the traditional LMS algorithm is highly dependent on the selection of the step size parameter. A large step size will lead to algorithm divergence, while a small step size will reduce the convergence speed. Moreover, the LMS algorithm is extremely sensitive to impulse interference, and sudden pulses will cause the weight to fluctuate sharply or even diverge, resulting in jumps in weak current measurement results.
[0052] Therefore, an improved variable step-size LMS algorithm is proposed, which dynamically adjusts the step size using the variance of the output of the previous median average filter instead of the traditional fixed step size. The step size is automatically reduced to prevent divergence in high noise conditions, and the step size is increased to accelerate convergence in low noise conditions. This can greatly reduce the convergence time, and the previous filtering can filter out impulse interference and suppress most noise, so that the improved variable step-size LMS algorithm can focus on suppressing power frequency and its harmonics. The improved variable step-size LMS algorithm includes the following six steps:
[0053] Step 2.1, initialize LMS parameters. Mainly includes basic step size, weight vector, noise variance threshold and effective data variance of inherited median average filter output. The basic step size needs to be set according to the signal amplitude, and generally the weaker the current, the smaller the basic step size.
[0054] Step 2.2, generate 50Hz orthogonal reference signal. After pre-processing by the previous improved median average filtering algorithm, the overall noise of the system mainly comes from power frequency interference. Setting the noise reference signal to 50Hz orthogonal signal can greatly simplify the design, ensure the accuracy of the algorithm while improving the speed, and reduce the CPU load.
[0055] Step 2.3, dynamically adjust the step size according to the effective data variance of the median average filter output. Realize automatic reduction of step size in high noise and automatic increase of step size in low noise, achieve the effect of balancing convergence speed and steady-state accuracy.
[0056] Step 2.4, estimate the power frequency noise. Estimate the current power frequency noise according to the current anti-interference weight and the noise reference signal.
[0057] Step 2.5, Improved variable step-size LMS algorithm output. Calculate the error for the current data point. Cancel the power frequency interference through the algorithm, and retain the weak current effective signal.
[0058] Step 2.6, Anti-interference weight update. Update the weight for the next sampling point noise estimation according to the dynamic step size.
[0059] The improved variable step-size LMS adaptive algorithm effectively overcomes the limitations of traditional fixed step-size LMS algorithm by inheriting the improved median average filtering algorithm output, avoids the influence of impulse interference on the algorithm, and achieves good suppression effect for power frequency interference. It is significantly improved in speed, accuracy and robustness. It is suitable for high sensitivity scenes such as pA level detection.
[0060] Three, dynamic weighted least squares calibration method
[0061] The least squares method is a best approximation method for fitting data by minimizing the sum of squares of errors. The core idea is to find a set of model parameters that minimize the square sum of residuals between predicted values and actual observations.
[0062] To better adapt to the noise characteristics, the least squares calibration method is improved, and the dynamic weight allocation mechanism and the output characteristics of the front filter are integrated into the least squares calibration process. By adjusting the weight of the data point through residual analysis and noise statistical characteristics, the high reliability data is preferred, thereby improving the calibration accuracy. The dynamic weighted least squares calibration method in the calibration stage includes the following 5 steps:
[0063] Step 3.1, establish the dynamic weighted least squares calibration model of unknown parameters.
[0064] Step 3.2, set the window size, calculate the standard deviation according to the real system input weak current and the window front filter output residual.
[0065] Step 3.3, dynamically update the weight according to the standard deviation of the residual. The weight decreases with the increase of the residual, and the influence of noise and outliers is suppressed.
[0066] Step 3.4, solve the weighted least squares solution. According to the weight, establish a diagonal matrix to solve the parameters.
[0067] Step 3.5, determine the specific parameters of the model. Repeat step 3.3 to recursively update and avoid matrix operations. The weight and residual jointly adjust the parameter update direction until the parameter is stable or the maximum iteration number is reached. Multiple tests ensure the accuracy of the parameters.
[0068] The dynamic weighted least square calibration method assigns high weight to low noise area and low weight to high noise area through dynamic weight mechanism, thereby improving the fitting accuracy of the model under abnormal data points and reducing the interference of the model on parameter estimation. The dynamic weighted least square calibration method is complementary to the previous improved median average filtering algorithm and the improved variable step size LMS algorithm, cooperatively suppresses abnormal disturbance in the statistical domain, and significantly improves the precision and stability of weak current measurement.
[0069] Further, the application also proposes specific embodiments for auxiliary description:
[0070] The hardware circuit of the embodiment is a self-made pA level weak current detection meter, the MCU is selected as STM32F103C8T6, the sampling frequency is 1 kHz, the core operational amplifier is selected as OPA392 of TI, the transimpedance amplifier forms an I-V conversion network through a feedback resistor and a compensation capacitor, and signal lifting is realized through a negative feedback amplification structure. The gear switching is realized through a manual waveband switch, and the wide range current detection requirements of ±200pA to ±20mA are met. The voltage follower of LMV321 is connected to the rear stage, the high input impedance and low output impedance characteristics of the voltage follower are used, the problems of insufficient signal driving capacity and impedance mismatch are effectively solved, and the signal-to-noise ratio and stability of the system are improved. The hardware circuit considers the performance and cost of the device, and can effectively meet the hardware requirements of the application under the premise of low cost and high applicability.
[0071] The acquisition method in the embodiment includes the following 12 steps (steps 1-5 are the implementation steps of the improved median average filtering algorithm, steps 6-11 are the implementation steps of the improved variable step size LMS adaptive algorithm, and step 12 is the implementation step of the dynamic weighted least square calibration method):
[0072] Step 1, initialize the parameters of the improved median average filtering algorithm, including the maximum window size (N_max), the minimum window size (N_min) and the threshold of abnormal value (δ). For the self-made pA level weak current meter, the measured pulse response time is about 15 ms, and in order to consider the signal change caused by temperature drift, N_max is set to 21. In order to preliminarily suppress the power frequency interference (50 Hz), the window should cover at least 1 / 2 cycle (10 ms), and N_min is set to 11. When N_max is set to 21, the single filtering time of the system is about 18μs under 1 kHz sampling, which meets the real-time requirement of 1 kHz.
[0073] Step 2, calculate the local signal-to-noise ratio (SNR). Take the current point x[n] and the k points before and after (k=(N_min-1) / 2) to get the set S init ={x[n-k],...,x[n],...,x[n+k]}, and sort it from small to large to get the initial window median value (m=Median(S init )). The SNR is calculated as formula (1).
[0074] ) Equation (1)
[0075] Var (x[n]) in Equation (1) ) is the variance of x[n].
[0076] Step 3, dynamically adjust the window size (N) according to the real-time signal-to-noise ratio. Automatically expand the window (maximum not more than N_max) to enhance the noise suppression ability in the low signal-to-noise ratio area, and reduce the window (minimum not less than N_min) to retain signal details in the high signal-to-noise ratio area.
[0077] Calculate N as shown in Equation (2).
[0078] Equation (2)
[0079] In Equation (2), the calculation result of the roud function for N is rounded to an integer, and if N is even, add 1 to make N an odd number.
[0080] Step 4, median filtering processing is performed on the data in the dynamic window. First, extract the window data after adjustment
[0081] (S={x[n-(N-1) / 2],...,x[n],...,x[n+(N-1) / 2]}), then sort the data from small to large to get the current window median value (m new =Median(S)), and remove the abnormal data points in the window, as shown in Equation (3).
[0082] Equation (3)
[0083] Step 5, weighted average output. First, calculate the standard deviation of the non-abnormal points in the current window as shown in Equation (4).
[0084] Equation (4)
[0085] Then perform Gaussian weight distribution, so that data close to the median value has a greater contribution, smooth random noise while maximizing signal authenticity, as shown in Equation (5).
[0086] Equation (5)
[0087] Finally, the output of the improved median average filtering algorithm is obtained as shown in Equation (6).
[0088] Equation (6)
[0089] The specific steps of the improved variable step size LMS adaptive algorithm are as follows:
[0090] Step 6, initialize the improved variable step size LMS adaptive algorithm parameters. Set the basic step size (μ base ), which needs to be adjusted according to the signal amplitude. The pA level weak current detection has very high requirements for signal accuracy, so the step size is usually small. Since the improved median filter algorithm in the previous stage suppresses noise, the step size can be appropriately increased. For the self-made pA level weak current meter, the basic step size is selected as 0.01 after actual detection. The weight vector (W[0]) is initially set as [0, 0] (corresponding to sin / cos components), and the noise variance threshold T is selected as 10 mV 2 (historical data statistics).
[0091] Step 7, generate a 50Hz orthogonal reference signal as formula (7).
[0092] Formula (7)
[0093] In formula (7), Ts is 1ms, corresponding to a sampling rate of 1kHz. Since the 50Hz power frequency period is 20ms, Ts should be less than half of the power frequency period to completely capture the power frequency waveform. A 1ms interval can ensure that at least 20 points are sampled per power frequency period, satisfying the Nyquist sampling theorem. After preprocessing by the improved median average filter algorithm in the previous stage, the overall noise of the system mainly comes from power frequency interference. Setting the reference signal as a 50Hz orthogonal signal can greatly simplify the design, ensure algorithm accuracy, improve speed, and reduce CPU load.
[0094] Step 8, dynamic step size adjustment. Take the effective standard deviation of the output of the median average filter in step five (σ ) to obtain the variance (σ , and calculate the step size as formula (8).
[0095] Formula (8)
[0096] Step 9, noise estimation. Estimate the current power frequency noise (y noise [n]) based on the current weight (W[n]), and calculate as formula (9).
[0097] Formula (9)
[0098] Step 10, improved variable step size LMS algorithm output. Calculate the LMS current sampling point error (e[n]) as formula (10).
[0099] Formula (10)
[0100] In formula (10), y1[n] is the output signal of the improved median average filter algorithm in the previous stage.
[0101] Improved variable step size LMS algorithm output (y LMS [n]) as in equation (11).
[0102] Equation (11)
[0103] The improved variable step size LMS algorithm minimizes the noise energy in e[n], accurately matches the reference signal to the power frequency signal, and prevents weak current signals from being learned as noise. Its output signal is the difference between the input signal and the power frequency noise, i.e., the error (e[n]).
[0104] Step 11, Anti-interference weight update. Update the weight (w[n+1]) according to the dynamic step size for the calculation of the next sampling point, as shown in equation (12).
[0105] Equation (12)
[0106] Specific steps of dynamic weighted least squares calibration method:
[0107] Step 12: Linearly fit the output signal of the previous stage according to the dynamic weighted least squares calibration model. This step requires establishing the dynamic weighted least squares calibration model in advance. The flowchart for establishing the least squares calibration model is shown below. Figure 3 As shown.
[0108] Combination Figure 3 The establishment of the dynamic weighted least squares calibration model includes the following five steps:
[0109] Step 12.1: Determine the dynamic weighted least squares calibration model with unknown parameters as shown in equation (13).
[0110] Equation (13)
[0111] In equation (13), a0, a1, and a2 are the unknown parameters to be solved, a0 is the zero-point offset compensation, a1 is the signal gain coefficient, a2 is the temperature drift compensation coefficient, and y LMS [n] represents the output of the improved LMS algorithm, and T[n] represents the temperature compensation term.
[0112] Step 12.2: Based on the actual input weak current (I) true The standard deviation of the output residual (e[n]) of the previous stage filter within the window is calculated. Mean residual within the window ( ) Calculate as shown in equation (14).
[0113] Equation (14)
[0114] In equation (14), M is the window size, set to 20ms to cover the power frequency cycle, so that the statistics are reliable and not delayed.
[0115] The standard deviation of the windowed residuals is calculated as in equation (15).
[0116] Equation (15)
[0117] Step 12.3, dynamically update the weights The weights are determined by the output characteristics of the previous stage filter, the data points with smaller residuals have higher weights. The weights are calculated as in equation (16).
[0118] Equation (16)
[0119] Step 12.4, solve the weighted least square solution [n]}. The design matrix X is X = [1, y1[n], T[n]]T, the diagonal weight matrix W is W = diag(w1, w2, …, wn), where wnnis the weight The weighted least square solution is calculated as in equation (17).
[0120] Equation (17)
[0121] In equation (17), X T is the transpose of the diagonal weight matrix X.
[0122] Step 12.5, recursively update the solution. To reduce the computational complexity, recursive update is used, repeat step 12.3, update the weights every time the window value is reached. The recursive update formula is as in equation (18).
[0123] Equation (18)
[0124] In equation (18), a is the learning rate, when the noise is large (the standard deviation of the improved average filtering algorithm is large), the learning rate is reduced to avoid over-adjustment. The formula is as in equation (19).
[0125] Equation (19)
[0126] In equation (18), Z[n] is the prediction error, which is calculated as in equation (20).
[0127] Equation (20)
[0128] The test results of the embodiment are as follows:
[0129] The frequency domain analysis method is used to analyze the suppression effect of noise interference. For weaker current, the feedback resistance is larger, the noise such as power frequency interference is more serious, the minimum range of half value (100pA) is selected as the measurement value, 1000 data are selected as the test number, and the frequency spectrum diagrams before and after data processing are compared, so that the suppression effect of the method on noise is compared. The sampling frequency domain diagram before processing 100pA is as shown in Figure 4 .
[0130] The sampling frequency domain diagram after processing 100pA is as shown in Figure 5 .
[0131] The test results show that when the 100pA weak current is implemented, the hardware circuit can achieve-50dB noise interference, and the present application can
[0132] accurately collect the weak current signal, effectively filter out noise, and improve the signal-to-noise ratio.
[0133] In summary, the present application provides a multi-stage processing pA-level weak current accurate collection method, including an improved median average filtering algorithm, an improved variable step size LMS adaptive algorithm, and a dynamic weighted least squares calibration method. The algorithm combination has significant advantages. The improved median average filtering algorithm effectively eliminates impulse noise and most interference and protects the edge details through dynamic window adjustment and mean weighted strategy; the improved variable step size LMS algorithm uses variable step size design to solve the correlation preprocessing, can quickly converge and suppress power frequency interference, significantly improves the signal-to-noise ratio in weak current signal processing, and the actual measurement embedded real-time processing time is less than 10us; the weighted average least squares method dynamically allocates weights through the residual error of the previous stage filtering, significantly reduces the nonlinear error (temperature drift error), and improves the global fitting accuracy of the model. The three form a multi-level noise processing system, taking into account real-time, robustness and high precision.
[0134] Compared with the prior art, the present application has the following advantages:
[0135] 1. The present application adopts a multi-stage noise cooperative suppression system, and the filtering algorithms and calibration methods at each stage have clear division of labor and synergistic effect. The improved median average filtering algorithm suppresses impulse interference and reduces most of the noise, the improved variable step size LMS adaptive algorithm suppresses power frequency interference, and the dynamic weighted least squares calibration method compensates for the nonlinearity of the system, which greatly improves the signal-to-noise ratio.
[0136] 2, The application improves the median average filtering algorithm, LMS adaptive algorithm and least square calibration method aiming at noise characteristics. The dynamic window scheme solves the conflict between signal oversmoothing and limited signal-to-noise ratio improvement of the traditional fixed window median average filtering algorithm; the step length scheme according to the pre-filtering overcomes the conflict between the convergence speed and algorithm divergence of the traditional fixed step length LMS algorithm; the dynamic weighted least square calibration method and the pre-filtering algorithm are complementary. While ensuring the accuracy, the method speed is greatly improved, and the real-time performance is considered.
[0137] 3, The optimization algorithm step of the application has lower time complexity, reduces redundant calculation, reduces CPU load, improves response speed and stability, and reduces hardware requirements and cost.
[0138] The above only discloses one or more preferred embodiments of the application, of course cannot limit the scope of the right of the application, and those skilled in the art can understand that all or part of the above-mentioned embodiments can be implemented, and equivalent changes made according to the claims of the application still belong to the scope covered by the application.
Claims
1. A method for precise acquisition of pA-level weak current through multi-stage processing, characterized in that, Includes the following steps: Step 1: Input the original signal and suppress impulse interference using an improved median averaging filter algorithm; Step 2: Use the improved variable step size LMS algorithm to eliminate power frequency interference while preserving effective signal characteristics; Step 3: Improve data nonlinearity by using dynamic weighted least squares calibration method, and output the processed current signal.
2. The method for accurate acquisition of pA-level weak currents with multi-stage processing as described in claim 1, characterized in that, The process of suppressing impulse interference using an improved median averaging filtering algorithm includes the following steps: Step 1.1: Initialize parameters; Step 1.2: Calculate the local signal-to-noise ratio; Step 1.3: Dynamically adjust the window size based on the real-time signal-to-noise ratio; Step 1.4: Perform median filtering on the data within the dynamic window; Step 1.5: Weighted average output.
3. The method for precise acquisition of pA-level weak currents with multi-stage processing as described in claim 2, characterized in that, The execution process of the improved variable step size LMS algorithm includes the following steps: Step 2.1: Initialize LMS parameters; Step 2.2: Generate a 50Hz quadrature reference signal; Step 2.3: Dynamically adjust the step size based on the effective data variance of the median average filter output; Step 2.4: Estimate power frequency noise; Step 2.5: Output of the improved variable step size LMS algorithm; Step 2.6: Update the anti-interference weights.
4. The method for accurate acquisition of pA-level weak currents with multi-stage processing as described in claim 3, characterized in that, The execution process of the dynamic weighted least squares calibration method includes the following steps: Step 3.1: Establish the dynamic weighted least squares calibration model for unknown parameters; Step 3.2: Set the window size and calculate the standard deviation based on the weak input current of the actual system and the residual output of the pre-stage filter within the window; Step 3.3: Dynamically update the weights based on the standard deviation of the residuals; Step 3.4: Find the weighted least squares solution; Step 3.5: Determine the specific parameters of the model, and repeat step 3.3 until the parameters are stable or the maximum number of iterations is reached.