A Gsensor automated testing method for IC environmental deviation
By establishing a correction model between the power supply voltage and the output on Gsensor and compensating the power supply voltage fluctuations in real time, the measurement error problem caused by the power supply voltage fluctuations in the prior art is solved, and the stability of the Gsensor output signal and the accuracy of the test results are achieved.
Patent Information
- Application Number
- CN202510009822.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-03
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2045-01-03
AI Technical Summary
The existing Gsensor test methods cannot effectively compensate for measurement errors caused by fluctuations in the power supply voltage, resulting in unstable measurement accuracy and low degree of automation.
By placing Gsensor in a constant acceleration field, recording the output data at different power supply voltages, establishing a correction model between the power supply voltage and the sensor output, and monitoring and compensating the power supply voltage fluctuations in real time to maintain the stability of the Gsensor output.
It significantly reduces measurement errors caused by power supply fluctuations, improves the stability of Gsensor output signals, makes the test results more accurate and reliable, and meets the needs of efficient, fast and accurate testing in large-scale production.
Smart Images

Figure CN119394336B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of inertial sensors, and in particular to a Gsensor automatic testing method for IC environmental deviation. Background Art
[0002] In modern electronic products, inertial sensors (such as accelerometers, referred to as Gsensors) are widely used in mobile devices, automotive electronics, and industrial automation. Gsensors are usually used to measure the acceleration of an object and convert the detected acceleration signal into a voltage output through a built-in circuit. However, the output performance of Gsensors is often affected by the stability of the power supply voltage. When the power supply voltage fluctuates, the output voltage of the sensor will also change. This output fluctuation leads to measurement errors, which affects the measurement accuracy and reliability of the system.
[0003] Existing Gsensor test methods usually rely on manual calibration or specific hardware design to reduce the impact of power supply fluctuations on the output signal. However, these methods have the following disadvantages: High calibration complexity: Traditional calibration methods require technicians to manually adjust the parameters of the sensor, which is time-consuming and error-prone, and difficult to meet the needs of mass production; Unstable test accuracy: Due to environmental factors and dynamic changes in power supply voltage, existing methods cannot compensate for sensor output fluctuations in real time, resulting in poor repeatability of test results; Low degree of automation: Most existing test methods cannot achieve a fully automated process and need to rely on manual intervention, which reduces test efficiency. Especially in application environments where the power supply voltage varies widely and the power supply stability is poor, the measurement error problem is more prominent and becomes a key bottleneck affecting sensor performance evaluation and production efficiency. Summary of the invention
[0004] The purpose of the present invention is to provide a Gsensor automated testing method for IC environmental deviation, which solves the problem of how to compensate for sensor output fluctuations caused by different power supply voltages to solve the measurement error caused by poor power supply stability.
[0005] To achieve the above object, the present invention provides the following technical solution: a Gsensor automated testing method for IC environmental deviation, the method comprising:
[0006] S1. Place Gsensor in a constant acceleration field and record the output data under different supply voltages.
[0007] S2. Establish a correction model between the supply voltage and the sensor output based on the recorded output data, including establishing a mathematical model of the sensor output and the supply voltage to describe the saturation trend of the sensor output. The specific mathematical model formula is: ;
[0008] Where S represents the output value of the sensor, S max Indicates the maximum output value of the sensor, V indicates the supply voltage, and K indicates that the sensor output value reaches the maximum output S max The corresponding supply voltage value at half time;
[0009] Use the recorded data to perform parameter fitting on the above mathematical model, build a correction model based on the fitting parameters, predict the sensor output under the supply voltage, and compensate for the effect of supply voltage fluctuation on the output;
[0010] S3, adjust the supply voltage according to the correction model so that the output of Gsensor remains stable under different supply voltages;
[0011] S4. Real-time monitoring and compensation of power supply voltage fluctuations to ensure the accuracy of measurement results.
[0012] Preferably, the S1 comprises:
[0013] Record the sensor output signal and supply voltage, set a sliding window size, and calculate the standard deviation within each window. The specific formula is: ;
[0014] Among them, σ R Represents the standard deviation of the sensor output signal, R i represents a single sample value of the sensor output signal within the sliding window, represents the average value of the sensor output signal in the sliding window, N represents the size of the sliding window, and i represents the sampling point index;
[0015] Compare the standard deviation of the sensor output signals corresponding to different supply voltages and identify the fluctuation range.
[0016] Preferably, the average value of the sensor output signal in the sliding window in S1 is The specific calculation formula is: ;
[0017] in, represents the average value of the sensor output signal within the sliding window, N represents the size of the sliding window, and R i Represents a single sample value of the sensor output signal within the sliding window, and i represents the sampling point index.
[0018] Preferably, S3 includes:
[0019] Define the balance formula for supply voltage adjustment. The specific formula is:
[0020] ;
[0021] Among them, ΔV is the adjustment amount of the power supply voltage, ΔS represents the deviation of the sensor output signal, and β represents the power supply voltage adjustment efficiency parameter;
[0022] Calculate the deviation of the sensor output signal. The specific formula is: ΔS = S target -S current ;
[0023] Among them, ΔS represents the deviation of the sensor output signal, S target Indicates the target value of the sensor output, S current Indicates the current output value of the sensor;
[0024] The adjustment amount of the supply voltage is calculated according to the balance formula and applied. The specific formula is:
[0025] V new =V current +ΔV;
[0026] Among them, V new Indicates the new supply voltage value after adjustment, V current Indicates the current supply voltage value, ΔV supply voltage adjustment amount;
[0027] Set an allowable range of signal deviation and continue to adjust the supply voltage until the deviation of the sensor output signal meets:
[0028] |ΔS|<δ;
[0029] Among them, ΔS represents the deviation of the sensor output signal, and δ represents the allowable range of the signal deviation.
[0030] Preferably, S4 includes:
[0031] Model the fluctuation of the supply voltage. The specific formula is:
[0032] ;
[0033] Wherein, V(t) represents the fluctuation amplitude of the power supply voltage at the current time point, t represents time, V0 represents the initial fluctuation amplitude, e represents the base of the natural logarithm, and λ represents the attenuation factor of the fluctuation;
[0034] Monitor the changes in voltage fluctuations in real time, record the fluctuation value at the current time point, and calculate the impact of the predicted power supply voltage fluctuation on the sensor output signal. The specific formula is: ΔS=α×V(t);
[0035] Among them, ΔS represents the deviation of the sensor output signal, α represents the fluctuation influence coefficient, and V(t) represents the fluctuation amplitude of the power supply voltage at the current time point;
[0036] Dynamically adjust the compensation voltage, the specific formula is: V comp =V base −ΔS;
[0037] Among them, V comp Indicates the adjusted compensation supply voltage value, V base represents the reference supply voltage value, ΔS represents the deviation of the sensor output signal;
[0038] Continue to monitor the effectiveness of adjustments.
[0039] Preferably, S2 also includes recording the sensor output values under multiple supply voltages, establishing a linear or nonlinear correction model based on the recorded data, analyzing the parameters in the correction model, determining the degree of influence of voltage fluctuations on the output, and presetting a voltage deviation threshold. When |V−V0|>θ, a compensation value D=k×|V−V0| is calculated, wherein V represents the supply voltage, V0 represents the standard voltage, θ represents the preset voltage deviation threshold, k represents the proportional constant, and D represents the compensation value of the output offset.
[0040] Preferably, the preset voltage deviation threshold θ is determined based on statistical analysis of historical fluctuation data by calculating the standard deviation of the power supply voltage fluctuation, and the specific formula is:
[0041] θ = μ + ng;
[0042] Wherein, θ represents a preset voltage deviation threshold, μ represents the mean value of the supply voltage, n represents an adjustment coefficient, and g represents the standard deviation of the supply voltage fluctuation.
[0043] Preferably, the parameters K and S in the correction model in S2 are max The acquisition is based on the output data of the sensor under different supply voltages and is determined by least squares fitting.
[0044] Preferably, when the mathematical model in S2 is fitted with parameters, a segmented fitting method is used to divide the supply voltage into multiple intervals, and each interval is fitted with model parameters K and S respectively. max .
[0045] Preferably, the calculation formula for the size N of the sliding window in S1 is:
[0046] ;
[0047] Wherein, N represents the size of the sliding window, ΔR represents the fluctuation amplitude of the signal in the current sliding window, and c represents the preset signal stability threshold.
[0048] It can be seen from the above technical solution that the present invention has the following beneficial effects:
[0049] The Gsensor automated test method for IC environmental deviation places the Gsensor in a constant acceleration field, records the output data under different power supply voltages, establishes a correction model between the power supply voltage and the sensor output based on the recorded output data, adjusts the power supply voltage according to the correction model, so that the Gsensor output remains stable under different power supply voltages, monitors and compensates for power supply voltage fluctuations in real time, ensures the accuracy of the measurement results, significantly reduces the measurement errors caused by power supply fluctuations, improves the stability of the Gsensor output signal, makes the test results more accurate and reliable, and ensures the repeatability and consistency of the test even in an unstable power supply environment, without the need for manual calibration, greatly reducing technical It reduces the operational complexity of personnel, simplifies the calibration process, reduces errors caused by human factors, improves the accuracy and efficiency of the test process, and can complete real-time compensation and calibration of power supply voltage fluctuations without human intervention, meeting the needs of efficient, fast and accurate testing in mass production, improving production efficiency, ensuring that the sensor can still maintain high-precision output in various complex environments, providing stable and reliable measurement data for terminal equipment, reducing the rework and scrap rate of sensors due to measurement errors, and improving the overall efficiency of the production line. It adapts to the current industrial production needs for intelligence and efficiency, and solves the problem of how to compensate for sensor output fluctuations caused by different power supply voltages to solve the measurement error caused by poor power supply stability. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0052] like Figure 1 As shown, the present invention provides a technical solution: a Gsensor automated testing method for IC environmental deviation, the method comprising:
[0053] S1. Place Gsensor in a constant acceleration field and record the output data under different supply voltages.
[0054] S2. Establish a correction model between the supply voltage and the sensor output based on the recorded output data, including establishing a mathematical model of the sensor output and the supply voltage to describe the saturation trend of the sensor output. The specific mathematical model formula is: ;
[0055] Where S represents the output value of the sensor, S max Indicates the maximum output value of the sensor, V indicates the supply voltage, and K indicates that the sensor output value reaches the maximum output S max The corresponding supply voltage value at half time;
[0056] Use the recorded data to perform parameter fitting on the above mathematical model, build a correction model based on the fitting parameters, predict the sensor output under the supply voltage, and compensate for the effect of supply voltage fluctuation on the output;
[0057] S3, adjust the supply voltage according to the correction model so that the output of Gsensor remains stable under different supply voltages;
[0058] S4. Real-time monitoring and compensation of power supply voltage fluctuations to ensure the accuracy of measurement results.
[0059] The core of this implementation is to solve the problem of the influence of power supply voltage fluctuation on Gsensor output by establishing a mathematical model between power supply voltage and sensor output. First, in step S1, the output of Gsensor is tested in a constant acceleration field, and the output data under different power supply voltages is recorded to provide basic data for model construction. Then, in step S2, a mathematical model is constructed and parameter fitting is performed based on the data. The model formula Describes the nonlinear relationship between the supply voltage and the sensor output, where S max, K and V represent the output saturation value of the sensor, the voltage corresponding to the half output value and the current supply voltage, respectively. By determining the key parameters in the model through data fitting, the output value of the sensor under different supply voltage conditions can be accurately predicted, and the impact of supply voltage fluctuations on the sensor output can be analyzed through the correction model. In step S3, the supply voltage is adjusted in real time according to the model to compensate for the interference of voltage fluctuations on the output of Gsensor. Finally, in step S4, a real-time monitoring mechanism is further introduced to dynamically detect and compensate for supply voltage fluctuations to ensure that the output accuracy of Gsensor is not affected by unstable power supply in complex environments. By constructing a correction model between the power supply voltage and the Gsensor output, the influence of the power supply voltage fluctuation on the Gsensor output can be accurately predicted and compensated, ensuring the accuracy of the test results. By adopting real-time monitoring and correction methods, the Gsensor can output stable measurement results under different power supply voltages, improving the applicability of the sensor in complex environments. This method automates the test and correction process, avoids the tedious steps of traditional manual calibration, and significantly improves the test efficiency and reliability. Through mathematical model fitting and parameter correction, the measurement error caused by IC environmental deviation is minimized, the robustness of the measurement system is improved, and the mathematical model fitting technology is used to quickly establish the correction model, which greatly reduces the experimental debugging time and improves the R&D efficiency.
[0060] S1 includes recording the sensor output signal and supply voltage, setting a sliding window size, and calculating the standard deviation within each window. The specific formula is: ;
[0061] Among them, σ R Represents the standard deviation of the sensor output signal, R i represents a single sample value of the sensor output signal within the sliding window, represents the average value of the sensor output signal in the sliding window, N represents the size of the sliding window, and i represents the sampling point index;
[0062] Compare the standard deviation of the sensor output signals corresponding to different supply voltages and identify the fluctuation range.
[0063] In this embodiment, by analyzing the fluctuation characteristics of the sensor output signal, a mathematical statistical method is used to identify the impact of power supply voltage fluctuation on sensor performance. When executing the method, the output signal data of Gsensor under different power supply voltage conditions are first recorded. These signal data contain possible noise and environmental interference. In order to analyze the signal fluctuation, a sliding window (window size is N) is set, and the standard deviation σ of the signal is calculated within the window. R The formula for calculating the standard deviation is: , It represents the average value of the sensor output signal within the sliding window, which is used to characterize the overall level of the signal, while the standard deviation of the sensor output signal σ R It reflects the degree of fluctuation or discreteness of the signal. By calculating the standard deviation of the output signal point by point through the sliding window, the signal fluctuation can be continuously monitored on the time axis. On this basis, the standard deviation values calculated under different power supply voltage conditions are compared and analyzed. If the standard deviation value of a certain power supply voltage interval increases significantly, it means that there is a large signal fluctuation in the interval, which may be caused by power supply voltage fluctuations or nonlinear response of the sensor. Through the above analysis process, the influence of the power supply voltage on the sensor output can be effectively identified, and the fluctuation range can be determined, providing data support for subsequent correction and optimization. By calculating the standard deviation through a sliding window, the fluctuation range in the Gsensor output signal affected by the power supply voltage can be effectively detected and identified, which significantly improves the accuracy of signal analysis. The design of the sliding window makes the calculation of the standard deviation real-time, and can continuously track the fluctuation during the signal output process, providing support for rapid response to voltage fluctuations. This implementation method can effectively cope with the influence of environmental interference and random noise through a signal statistical analysis method, and improves the adaptability to power supply voltage fluctuations. By analyzing the signal fluctuation characteristics under different power supply voltages, high-precision basic data is provided for the power supply voltage correction model, making the correction result more reliable. Signal analysis can be completed without manual intervention, greatly improving the test efficiency. By continuously calculating the standard deviation value, a trend chart of signal fluctuations with power supply voltage changes can be intuitively drawn, which is convenient for quickly locating abnormal intervals.
[0064] The average value of the sensor output signal within the sliding window in S1 The specific calculation formula is: ;
[0065] in, represents the average value of the sensor output signal within the sliding window, N represents the size of the sliding window, and R i Represents a single sample value of the sensor output signal within the sliding window, and i represents the sampling point index.
[0066] In this embodiment, a sliding window average value calculation method is introduced to analyze the signal output characteristics of Gsensor under different power supply voltage conditions. The size of the sliding window is N, and the sensor output signal sampling values within it are {R1, R2, …, R N}. formula: , which is used to calculate the average value of the signal within the window. This average value can effectively smooth signal fluctuations and eliminate the influence of high-frequency noise or random interference, thereby accurately reflecting the overall level of the signal. When the sliding window moves point by point, each calculation will include new sample values and remove the earliest sample values, thereby achieving real-time tracking of the signal average value. By comparing the average values under different supply voltage conditions, the response characteristics of Gsensor during the supply voltage change process can be observed, and reference data can be provided for the correction model. Specifically, this method is implemented by the following steps:
[0067] Signal acquisition: When the Gsensor is in a constant acceleration field, record the output signal under different supply voltages;
[0068] Sliding window average calculation: divide the signal data into segments and put them into sliding windows, and calculate the average value in each window according to the formula;
[0069] Data analysis: By continuously calculating the average value and constructing the trend curve of the signal, it is convenient to observe the impact of power supply voltage fluctuations on the Gsensor output.
[0070] The design of sliding window ensures the real-time performance of calculation results and reduces the interference of occasional noise on signal analysis.
[0071] By calculating the sliding window average value, the interference of high-frequency noise can be effectively reduced, making the signal curve smoother, thereby more accurately reflecting the overall trend of the sensor output. Using the average value in the window instead of the single point value as the analysis basis greatly reduces the signal fluctuation caused by random interference or occasional errors, ensuring that the output change characteristics of Gsensor can be captured in real time during the signal acquisition process, providing timely feedback for subsequent correction and optimization. This method can adapt to working conditions with different power supply voltages, stabilize the output characteristics by calculating the average value, and reduce the impact of power supply fluctuations. The calculation of the average value simplifies the complexity of signal analysis, reduces the requirements for data post-processing, and makes the entire test process more efficient and reliable.
[0072] S3 includes a balancing formula that defines the supply voltage adjustment. The specific formula is:
[0073] ;
[0074] Among them, ΔV is the adjustment amount of the power supply voltage, ΔS represents the deviation of the sensor output signal, and β represents the power supply voltage adjustment efficiency parameter;
[0075] Calculate the deviation of the sensor output signal. The specific formula is: ΔS = S target -S current ;
[0076] Among them, ΔS represents the deviation of the sensor output signal, S target Indicates the target value of the sensor output, S current Indicates the current output value of the sensor;
[0077] Calculate the supply voltage adjustment according to the balance formula and apply the supply voltage adjustment. The specific formula is: V new =V current +ΔV;
[0078] Among them, V new Indicates the new supply voltage value after adjustment, V current Indicates the current supply voltage value, ΔV supply voltage adjustment amount;
[0079] Set an allowable range of signal deviation and continuously adjust the supply voltage until the deviation of the sensor output signal satisfies: |ΔS|<δ;
[0080] Among them, ΔS represents the deviation of the sensor output signal, and δ represents the allowable range of the signal deviation.
[0081] In this embodiment, in order to ensure the stability of the Gsensor output signal, the supply voltage is dynamically adjusted according to the deviation of the sensor output signal by using a balance formula for supply voltage adjustment, so that the sensor output signal remains within a target range.
[0082] First, according to the current value S of the sensor output signal current With the target value S target Calculate the deviation ΔS = S target -S current The deviation quantifies the difference between the sensor output signal and the target value, providing a basis for adjusting the supply voltage.
[0083] According to the balance formula , calculate the amount of supply voltage ΔV that needs to be adjusted, where β is the supply voltage adjustment efficiency parameter, which reflects the degree of influence of supply voltage change on the sensor output signal. The adjustment efficiency parameter β can be calibrated through experiments.
[0084] Use the formula V new =V current +ΔV, calculate the new supply voltage value and update the supply voltage. The adjusted supply voltage directly acts on Gsensor, thereby changing its output signal.
[0085] The adjusted sensor output signal is tested and a new deviation value is calculated. If the deviation |ΔS| still does not meet the allowable range |ΔS|<δ, the above adjustment process is repeated until the deviation meets the requirement.
[0086] Through the above method, the supply voltage can be adjusted in real time to compensate for the sensor output signal error caused by environmental or supply voltage fluctuations, ensuring that the measurement results of Gsensor are accurate and stable.
[0087] This method effectively compensates for the deviation between the sensor output signal and the target value by dynamically adjusting the power supply voltage, significantly improving the accuracy and stability of the measurement result. The use of the balance formula enables the adjustment of the power supply voltage to quickly respond to the deviation of the sensor output signal, realize real-time adjustment, and adapt to the dynamically changing working environment. By continuously calculating and adjusting the power supply voltage, this method can complete the error correction of the sensor output signal without human intervention, significantly improving the automation level and efficiency of the system. This method can adapt to the sensor measurement needs in a variety of complex environments (such as voltage instability or environmental interference) to ensure that the output of the sensor is stable and reliable. The power supply voltage adjustment process is based on strict mathematical formulas, and the results are highly consistent and repeatable, reducing possible human errors in the correction process. The error is compensated by precise adjustment of the power supply voltage rather than hardware modification, which reduces costs and simplifies system design.
[0088] S4 includes modeling the fluctuation of the supply voltage, and the specific formula is: ;
[0089] Wherein, V(t) represents the fluctuation amplitude of the power supply voltage at the current time point, t represents time, V0 represents the initial fluctuation amplitude, e represents the base of the natural logarithm, and λ represents the attenuation factor of the fluctuation;
[0090] Monitor the changes in voltage fluctuations in real time, record the fluctuation value at the current time point, and calculate the impact of the predicted power supply voltage fluctuation on the sensor output signal. The specific formula is: ΔS=α×V(t);
[0091] Among them, ΔS represents the deviation of the sensor output signal, α represents the fluctuation influence coefficient, and V(t) represents the fluctuation amplitude of the power supply voltage at the current time point;
[0092] Dynamically adjust the compensation voltage, the specific formula is: V comp =V base −ΔS;
[0093] Among them, V comp Indicates the adjusted compensation supply voltage value, V base Represents the reference supply voltage value, ΔS represents the deviation of the sensor output signal; continuously monitor the adjustment effect.
[0094] This implementation ensures that the influence of the power supply voltage on the output signal of Gsensor is minimized by real-time monitoring, modeling and dynamic compensation of power supply voltage fluctuations.
[0095] Using the formula Mathematical modeling of power supply voltage fluctuations is performed. This formula describes the trend of the power supply voltage fluctuation amplitude gradually decaying over time, where V0 is the initial fluctuation amplitude and λ is the fluctuation attenuation factor, which reflects the rate of change of the fluctuation. Dynamic fluctuation data can be obtained by measuring the power supply voltage fluctuation amplitude in real time.
[0096] According to the fluctuation influence formula ΔS=α×V(t), the influence of the power supply voltage fluctuation on the sensor output signal is calculated. Among them, the coefficient α is the fluctuation influence coefficient, which indicates the degree of influence of the unit power supply voltage fluctuation on the deviation of the sensor output signal, which can be obtained through experimental calibration.
[0097] According to the deviation ΔS of the sensor output signal, the supply voltage is adjusted to compensate for the influence of fluctuations. The adjusted voltage value is calculated by the formula V comp =V base −ΔS calculation, where V base is the reference supply voltage value, ΔS is the deviation of the sensor output signal. The stability of the sensor output signal is ensured through dynamic compensation.
[0098] Monitor the adjusted supply voltage value and sensor output signal in real time to verify the compensation effect. If the deviation still does not meet the allowable range, continue to adjust the supply voltage until the sensor output signal reaches the target range.
[0099] Through the above steps, the method can effectively eliminate the interference of power supply voltage fluctuation on sensor output and ensure the accuracy of measurement results.
[0100] Through mathematical modeling and real-time compensation technology, this method can accurately analyze and eliminate the impact of power supply voltage fluctuations on sensor output, thereby improving the measurement accuracy of the system. By combining real-time monitoring with dynamic adjustment, the system can quickly respond to power supply voltage fluctuations and implement effective compensation. It is suitable for dynamically changing working environments. The voltage fluctuation modeling formula and the fluctuation influence coefficient can be adjusted according to the actual environment, which enhances the adaptability of this method to different power supply voltage fluctuation conditions. Compared with reducing the impact of fluctuations by improving the hardware stability of the power supply voltage, this method achieves error correction through software compensation, reduces the stringent requirements on hardware, saves costs, and compensates for the impact of power supply voltage fluctuations in real time, ensuring that the sensor output signal remains stable in a fluctuating environment, providing a guarantee for high-precision measurement. By compensating for signal deviations caused by power supply voltage fluctuations, the system can achieve long-term stable operation and improve overall performance reliability.
[0101] S2 also includes recording the sensor output values under multiple supply voltages, establishing a linear or nonlinear correction model based on the recorded data, analyzing the parameters in the correction model, determining the degree of influence of voltage fluctuations on the output, and presetting a voltage deviation threshold. When |V−V0|>θ, a compensation value D=k×|V−V0| is calculated, where V represents the supply voltage, V0 represents the standard voltage, θ represents the preset voltage deviation threshold, k represents the proportional constant, and D represents the compensation value of the output offset.
[0102] This embodiment records the sensor output data under multiple supply voltages, constructs a correction model and analyzes the impact of voltage fluctuations on the output signal, determines the compensation value required when the supply voltage deviates from the standard voltage, and thus ensures the stability of the sensor output.
[0103] Under different supply voltage conditions, record the output value of Gsensor and obtain the response data of the sensor. These data reflect the relationship between the output value of the sensor and the supply voltage. According to the recorded data, establish a correction model, and choose a linear model (including the output signal and the voltage are proportional) or a nonlinear model (including saturation curve, exponential model) to describe the relationship between the supply voltage and the output signal.
[0104] The parameters of the calibration model are analyzed to determine the extent to which voltage fluctuations affect the sensor output. For example, in a nonlinear model, the sensitivity of different voltage ranges can be determined by analyzing the slope or curvature of the curve.
[0105] Set a voltage deviation threshold θ. When the supply voltage V deviates from the standard voltage V0 by more than θ (i.e. |V−V0|>θ), calculate the compensation value D of the output offset. The formula is: D=k×|V−V0|;
[0106] Where k is a proportional constant, which reflects the influence of the supply voltage deviation on the output signal and can be obtained through experimental calibration. The output offset compensation value D is used to adjust the sensor output to offset the error caused by the supply voltage deviation.
[0107] According to the calculated output offset compensation value D, the sensor output is adjusted in real time to ensure the accuracy of the output signal. For example, the compensation correction of the output signal is achieved through digital signal processing technology or dynamic adjustment of the power supply voltage.
[0108] Through the above process, this implementation can effectively solve the impact of power supply voltage fluctuations on sensor output and ensure that the output value of the sensor remains consistent under different power supply voltage conditions.
[0109] By establishing a linear or nonlinear correction model, the influence of the power supply voltage on the sensor output can be fully described, providing a scientific basis for subsequent compensation. When the power supply voltage deviation exceeds the threshold, the compensation value can be quickly calculated and applied, and the influence of voltage fluctuations on the sensor output can be responded to in real time to ensure signal stability. The introduction of the compensation mechanism significantly reduces the error caused by the power supply voltage fluctuation, improves the accuracy of the sensor output signal, and meets the needs of high-precision measurement scenarios. Regardless of whether the relationship between the power supply voltage and the output signal is linear or nonlinear, this implementation method can achieve adaptation through model parameter adjustment, and has strong versatility and flexibility. This method realizes the automatic compensation of power supply voltage fluctuations and sensor output signals, avoids the tedious process of manual calibration, improves test efficiency and system automation, and users can adjust the voltage deviation threshold Θ\ThetaΘ according to actual needs to balance the error compensation accuracy and compensation response speed, thereby enhancing the adaptability of the system.
[0110] The preset voltage deviation threshold θ is determined based on the statistical analysis of historical fluctuation data by calculating the standard deviation of the power supply voltage fluctuation. The specific formula is: θ=μ+ng;
[0111] Wherein, θ represents a preset voltage deviation threshold, μ represents the mean value of the supply voltage, n represents an adjustment coefficient, and g represents the standard deviation of the supply voltage fluctuation.
[0112] This embodiment is based on the historical fluctuation data of the power supply voltage, and calculates the appropriate voltage deviation threshold θ through statistical analysis to improve the automatic correction accuracy of Gsensor. In the experiment or operation environment, the fluctuation data of the power supply voltage is recorded for a long time to form a set of data sets {V1, V2, ..., V N}, where each V i Represents the power supply voltage value at a certain point in time. By performing statistical analysis on the fluctuation data, the mean value μ of the power supply voltage is calculated: ;
[0113] The mean value represents the average level of the power supply voltage under fluctuation conditions.
[0114] The standard deviation g of the power supply voltage fluctuation is calculated for the historical data set. The specific formula is: ;
[0115] The standard deviation g of the power supply voltage fluctuation reflects the degree of dispersion of the power supply voltage fluctuation. If g is large, it means that the voltage fluctuation is large; if g is small, it means that the voltage fluctuation is relatively stable.
[0116] The choice of adjustment coefficient n depends on the correction accuracy requirement: if higher accuracy is required, a larger n can be selected to increase the preset voltage deviation threshold θ and reduce unnecessary adjustments. If a more sensitive response is required, a smaller n can be selected to quickly adjust to smaller fluctuations.
[0117] According to the formula θ=μ+ng, the allowable range of voltage deviation is determined by combining the mean and standard deviation of the supply voltage. When the deviation of the supply voltage from the mean exceeds the threshold, the correction mechanism is triggered.
[0118] In actual operation, the supply voltage V is monitored in real time. If |V−μ|>θ is found, that is, the current voltage fluctuation exceeds the threshold range, the correction algorithm is started to calculate the adjustment amount of the supply voltage and compensate in real time to ensure the stability of the sensor output signal.
[0119] Through statistical analysis of historical fluctuation data, the deviation threshold is dynamically determined using the mean and standard deviation of the power supply voltage to adapt to different operating environments, thereby improving the adaptability of the correction mechanism. The coefficient n can be adjusted according to different accuracy requirements, and the correction threshold can be flexibly set, which can avoid excessive adjustment and quickly respond to severe fluctuations, thereby improving the correction efficiency. This method takes into account the statistical characteristics of power supply voltage fluctuations. Even in an environment with large fluctuations, a reasonable deviation threshold can be accurately set to ensure the effectiveness of the correction mechanism. By combining the mean and standard deviation, normal fluctuations in a small range can be effectively filtered out, frequent correction triggering can be avoided, and the stability of system operation can be improved. This method does not rely on a specific fluctuation model, but directly sets the threshold through statistical characteristics, which is suitable for scenarios with various power supply fluctuation characteristics and enhances versatility. The mean and standard deviation of the power supply voltage can be automatically calculated through real-time data without manual intervention, thereby improving the automation capability of the system.
[0120] Parameters K and S in the calibration model in S2 max The acquisition is based on the output data of the sensor under different supply voltages and is determined by least squares fitting.
[0121] In this embodiment, the output data of the sensor under different supply voltages are fitted by the least square method to obtain the parameters K (corresponding to the supply voltage of half the output value) and S in the correction model. max (the maximum output value of the sensor), thereby completing the construction of the supply voltage correction model.
[0122] The correction model describes the relationship between the supply voltage and the sensor output signal. The mathematical expression is:
[0123] ;
[0124] Where S represents the output value of the sensor, S max Indicates the maximum output value of the sensor, V indicates the supply voltage, and K indicates that the sensor output value reaches the maximum output S max The supply voltage value corresponding to half.
[0125] Under different supply voltage conditions (such as V1, V2, ..., Vn ), record the corresponding sensor output signal value (such as S1, S2, ..., S n ), forming a data set {(V i , S i )}. Example data points: {(V1,S1),(V2,S2),…,(V n ,S n )}.
[0126] Use the least squares method to fit the above data and determine the parameters K and S in the calibration model max .
[0127] Minimize the sum of squared errors between the measured values and the values predicted by the model: ;
[0128] Use nonlinear fitting tools (such as MATLAB's nonlinear regression function) to solve the parameters K and S through iterative optimization algorithms (such as gradient descent method and Newton method). max .
[0129] K: The sensor output value reaches the maximum output S max The supply voltage value corresponding to half of the time reflects the sensitivity of the sensor to the supply voltage; Smax: the maximum output value of the sensor, which reflects the output capacity of the sensor. Substitute the fitted parameters into the correction model formula to calculate the error between the model prediction value and the experimental value. If the error meets the accuracy requirements (such as the mean square error MSE is lower than the threshold), the model fitting is completed; otherwise, adjust the sampling point or optimize the fitting algorithm.
[0130] By fitting the sensor output data using the least squares method, the parameters K and S in the correction model can be accurately obtained. max , providing a reliable basis for power supply voltage correction. The correction model based on fitting can effectively describe the nonlinear relationship between the power supply voltage and the sensor output, significantly improve the accuracy of the correction, and ensure the stability of the sensor output signal. This method does not require manual estimation of parameters, has a high degree of automation, and reduces human errors. The least squares method can be used to fit various forms of models (linear or nonlinear), adapt to the characteristics of different types of sensors, improve the versatility of the correction method, and greatly reduce the time cost of model construction and correction. It is suitable for high-frequency and multi-data point application scenarios. This method fits the correction model based on the collected data and performs dynamic correction by real-time monitoring of the power supply voltage. It can quickly respond to environmental changes and improve the reliability of sensor measurement.
[0131] When fitting the parameters of the mathematical model in S2, the segmented fitting method is used to divide the supply voltage into multiple intervals, and each interval is fitted with model parameters K and S max .
[0132] In this embodiment, the power supply voltage range is divided into multiple intervals, and the parameters K and S in the mathematical model are fitted to each interval. max This piecewise fitting method can more accurately describe the effect of the supply voltage on the sensor output, especially in scenarios with complex nonlinear relationships. The mathematical expression of the correction model is: ;
[0133] Where S represents the output value of the sensor, S max Indicates the maximum output value of the sensor, V indicates the supply voltage, and K indicates that the sensor output value reaches the maximum output S max The corresponding supply voltage value at half time;
[0134] In actual situations, the relationship between the supply voltage and the output signal may show different characteristics in different intervals. For example, in the low voltage interval, the output signal changes rapidly and the model shows strong nonlinearity. In the high voltage interval, the output signal tends to saturate and the model shows weak nonlinearity. In order to fit the mathematical model more accurately, the supply voltage range can be divided into multiple intervals, and the parameters K and S can be fitted independently for each interval. max .
[0135] In the experiment, the sensor output data under different supply voltages are recorded to form a data set {(V i , S i )}. According to the supply voltage range (such as from V min To V max ), the range is divided into multiple intervals (such as low voltage interval, medium voltage interval, high voltage interval). The division standard of each interval can be fixed (such as equal interval) or dynamically adjusted (based on nonlinear characteristic distribution).
[0136] For each data point in the voltage range, the least squares method is used to fit the parameters K and S of the correction model. max . Objective function: Minimize the sum of squared errors in the interval: ;
[0137] Among them, k represents the kth interval, n k represents the number of data points in the kth interval, K k and S max,k is the fitting parameter of the kth interval.
[0138] The fitting results of all intervals are combined to form a piecewise correction model:
[0139] ;
[0140] By combining the model parameters of each interval, the correction model can accurately describe the overall effect of the supply voltage on the sensor output. Substitute the segmented model into the test data for verification and calculate the error index of the overall model (such as mean square error MSE). If the error is large, the fitting accuracy can be further improved by increasing the number of intervals or optimizing the interval division criteria.
[0141] The piecewise fitting method can adjust the model parameters in each interval according to the nonlinear characteristics of the relationship between the power supply voltage and the output signal, significantly improving the accuracy of the correction model. By fitting parameters separately for different intervals, the number of intervals and the fitting method can be dynamically adjusted according to the complexity of the sensor characteristics to adapt to various nonlinear changes. The piecewise fitting method decomposes the complex global nonlinear fitting problem into multiple simple local fitting problems, effectively reducing the model error. The piecewise correction model can accurately adapt to the characteristic changes within different power supply voltage ranges, providing a reliable basis for subsequent automated correction. Due to the small number of data points in each interval, piecewise fitting has more advantages in terms of computational complexity and convergence speed than global fitting.
[0142] The calculation formula for the size N of the sliding window in S1 is: ;
[0143] Wherein, N represents the size of the sliding window, ΔR represents the fluctuation amplitude of the signal in the current sliding window, and c represents the preset signal stability threshold.
[0144] This embodiment calculates the size N of the sliding window and dynamically adjusts the length of the sliding window to adapt to the fluctuation characteristics of the signal, thereby improving the accuracy and stability of data analysis during the test process.
[0145] Sliding window is a common technique in signal processing, which is used to analyze the characteristics of sensor output signals in real time. In this embodiment, the size of the sliding window N is dynamically calculated based on the fluctuation amplitude ΔR of the signal and the preset signal stability threshold c:
[0146] ΔR represents the fluctuation amplitude of the signal in the current sliding window, which is usually calculated by the difference between the maximum and minimum values of the signal in the sliding window: ΔR=R max −R min ;
[0147] Among them, R max is the maximum value of the signal in the current sliding window, R min It is the minimum value of the signal in the current sliding window. If the signal fluctuates greatly, it means that the signal is significantly interfered by the outside world, and the size of the sliding window needs to be increased to smooth the impact of the fluctuation on the analysis.
[0148] c is a constant set according to the actual application scenario, reflecting the signal stability requirement. A smaller c corresponds to a higher stability requirement, and the sliding window will be larger; a larger c corresponds to a lower stability requirement, and the sliding window will be smaller.
[0149] The size of the sliding window N is calculated according to the following formula: ;
[0150] Wherein, N represents the size of the sliding window, ΔR represents the fluctuation amplitude of the signal in the current sliding window, and c represents the preset signal stability threshold.
[0151] If ΔR>c, the window size N is increased to enhance the signal smoothing effect; if ΔR≤c, the window size N is reduced to maintain the analysis sensitivity. Real-time monitoring of signal fluctuations: Each time the sliding window moves, calculate the signal fluctuation amplitude ΔR in the current window. Calculate the sliding window size: According to the formula: Dynamically adjust the sliding window size to adapt it to the characteristics of signal fluctuations. Sliding window update: The adjusted sliding window is used to calculate statistical parameters such as the mean and standard deviation of the signal to complete data analysis and correction.
[0152] When the signal fluctuation is extremely small (ΔR≈0), the sliding window size N will tend to the minimum value to improve sensitivity. When the signal fluctuation is drastic (ΔR≫c), the sliding window size N will increase significantly to ensure the stability of data analysis.
[0153] Dynamically adjusting the sliding window size can adapt to changes in signal fluctuations. When the fluctuation is severe, the window can be increased to smooth the signal, and when the fluctuation is small, the window can be reduced to maintain sensitivity, thereby improving the accuracy and robustness of signal processing. Through the adaptive adjustment mechanism of the sliding window, a dynamic balance between signal sensitivity and analysis accuracy is achieved. For stable signals, high sensitivity is maintained; for fluctuating signals, the anti-interference ability is enhanced. The method can adapt to different types of signal characteristics and fluctuation intensity, and is suitable for dynamic signal processing needs in complex working environments. The size of the sliding window is dynamically calculated by a formula without manual intervention, which improves the automation and real-time performance of the system. When the signal fluctuates greatly, increasing the sliding window size can effectively reduce the impact of instantaneous noise on data analysis and ensure the stability of the measurement results.
[0154] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A Gsensor automated testing method for IC environmental deviation, characterized in that: The method comprises: S1. Place Gsensor in a constant acceleration field and record the output data under different supply voltages. S2. Establish a correction model between the supply voltage and the sensor output based on the recorded output data, including establishing a mathematical model of the sensor output and the supply voltage to describe the saturation trend of the sensor output. The specific mathematical model formula is: Where S represents the output value of the sensor, S max Indicates the maximum output value of the sensor, V indicates the supply voltage, and K indicates that the sensor output value reaches the maximum output S max The corresponding supply voltage value at half time; Use the recorded data to perform parameter fitting on the above mathematical model, build a correction model based on the fitting parameters, predict the sensor output under the supply voltage, and compensate for the effect of supply voltage fluctuation on the output; S3, adjust the supply voltage according to the correction model so that the output of Gsensor remains stable under different supply voltages; S4, real-time monitoring and compensation of power supply voltage fluctuations to ensure the accuracy of measurement results; The S1 includes: Record the sensor output signal and supply voltage, set a sliding window size, and calculate the standard deviation within each window. The specific formula is: Among them, σ R Represents the standard deviation of the sensor output signal, R i represents a single sample value of the sensor output signal within the sliding window, represents the average value of the sensor output signal in the sliding window, N represents the size of the sliding window, and i represents the sampling point index; Compare the standard deviation of the sensor output signals corresponding to different supply voltages to identify the fluctuation range; The S3 includes: Define the balance formula for supply voltage adjustment. The specific formula is: Among them, ΔV represents the adjustment amount of the power supply voltage, ΔS represents the deviation of the sensor output signal, and β represents the power supply voltage adjustment efficiency parameter; Calculate the deviation of the sensor output signal. The specific formula is: ΔS = S target -S current ; Among them, ΔS represents the deviation of the sensor output signal, S target Indicates the target value of the sensor output, S current Indicates the current output value of the sensor; The adjustment amount of the supply voltage is calculated according to the balance formula and applied. The specific formula is: V new =V current +ΔV; Among them, V new Indicates the new supply voltage value after adjustment, V current Indicates the current supply voltage value, ΔV indicates the adjustment amount of the supply voltage; Set an allowable range of signal deviation and continue to adjust the supply voltage until the deviation of the sensor output signal meets: |ΔS|<δ; Among them, ΔS represents the deviation of the sensor output signal, and δ represents the allowable range of the signal deviation.
2. The Gsensor automated testing method for IC environmental deviation according to claim 1, characterized in that: The average value of the sensor output signal in the sliding window in S1 The specific calculation formula is: in, represents the average value of the sensor output signal within the sliding window, N represents the size of the sliding window, and R i Represents a single sample value of the sensor output signal within the sliding window, and i represents the sampling point index.
3. The Gsensor automated testing method for IC environmental deviation according to claim 1, characterized in that: The S4 includes: Model the fluctuation of the supply voltage. The specific formula is: V(t)=V0e -λt ; Wherein, V(t) represents the fluctuation amplitude of the power supply voltage at the current time point, t represents time, V0 represents the initial fluctuation amplitude, e represents the base of the natural logarithm, and λ represents the attenuation factor of the fluctuation; Monitor the changes in voltage fluctuations in real time, record the fluctuation value at the current time point, and calculate the impact of the predicted power supply voltage fluctuation on the sensor output signal. The specific formula is: ΔS = α × V (t); Among them, ΔS represents the deviation of the sensor output signal, α represents the fluctuation influence coefficient, and V(t) represents the fluctuation amplitude of the power supply voltage at the current time point; Dynamically adjust the compensation voltage, the specific formula is: V comp =V base -ΔS; Among them, V comp Indicates the adjusted compensation supply voltage value, V base represents the reference supply voltage value, ΔS represents the deviation of the sensor output signal; Continue to monitor the effectiveness of adjustments.
4. The Gsensor automated testing method for IC environmental deviation according to claim 1, characterized in that: The S2 also includes recording the sensor output values under multiple power supply voltages, establishing a linear or nonlinear correction model based on the recorded data, analyzing the parameters in the correction model, determining the degree of influence of voltage fluctuations on the output, and presetting a voltage deviation threshold. When |V-V0|>θ, a compensation value D=k×|V-V0| is calculated, where V represents the power supply voltage, V0 represents the standard voltage, θ represents the preset voltage deviation threshold, k represents the proportional constant, and D represents the compensation value of the output offset.
5. The Gsensor automated testing method for IC environmental deviation according to claim 4, characterized in that: The preset voltage deviation threshold θ is determined based on the statistical analysis of historical fluctuation data by calculating the standard deviation of the power supply voltage fluctuation. The specific formula is: θ=μ+ng; Wherein, θ represents a preset voltage deviation threshold, μ represents the mean value of the supply voltage, n represents an adjustment coefficient, and g represents the standard deviation of the supply voltage fluctuation.
6. The Gsensor automated testing method for IC environmental deviation according to claim 1, characterized in that: The parameters K and S in the calibration model are described in S2 max The acquisition is based on the output data of the sensor under different supply voltages and is determined by least squares fitting.
7. The Gsensor automated testing method for IC environmental deviation according to claim 1, characterized in that: When the mathematical model in S2 is fitted with parameters, a segmented fitting method is used to divide the supply voltage into multiple intervals, and each interval is fitted with model parameters K and S respectively. max .
8. The Gsensor automated testing method for IC environmental deviation according to claim 2, characterized in that: The calculation formula for the size N of the sliding window in S1 is: Wherein, N represents the size of the sliding window, ΔR represents the fluctuation amplitude of the signal in the current sliding window, and c represents the preset signal stability threshold.
Citation Information
Patent Citations
Miniature attitude reference system
CN202002653U