A data detection and recording system based on adaptive range switching technology

CN122084005APending Publication Date: 2026-05-26SHUICE (SHANGHAI) TESTING TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHUICE (SHANGHAI) TESTING TECH CO LTD
Filing Date
2026-01-07
Publication Date
2026-05-26

Smart Images

  • Figure CN122084005A_ABST
    Figure CN122084005A_ABST
Patent Text Reader

Abstract

This application relates to the field of electronic measurement technology, specifically disclosing a data detection and recording system based on adaptive range switching technology. It aims to solve the problems of range switching inaccuracies and the disconnect between calibration and operation caused by analog front-end parameter drift. The system includes a sensor interface, analog signal conditioning, analog-to-digital conversion, digital signal processing and control, and calibration signal generation and storage modules. The core technology lies in acquiring gain and bias calibration coefficients in real time through an online calibration mechanism, and dynamically calculating the range switching threshold accordingly. This allows the system to adaptively complete range switching decisions and data compensation during operation, achieving continuous high-precision data acquisition and recording.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of electronic measurement technology, specifically relating to a data detection and recording system based on adaptive range switching technology. Background Technology

[0002] In fields such as industrial monitoring and scientific research, wide dynamic range and high-precision data acquisition and recording are crucial. Data loggers typically employ a multi-range design combined with automatic range switching technology to adapt to changes in signal amplitude. The principle behind this is to determine whether to switch ranges by comparing the acquired signal with a preset threshold.

[0003] However, existing range switching methods based on fixed thresholds have significant drawbacks. The gain and bias parameters of devices such as amplifiers and reference sources in analog front-end circuits drift with temperature and time, causing changes in the actual system gain, while the range switching threshold is not adjusted accordingly. This leads to a mismatch between the threshold and the circuit state, resulting in erroneous switching, manifested as premature switching before the signal is overloaded, or failure to switch when overloaded, severely affecting data continuity and accuracy.

[0004] While system errors can be corrected through offline or periodic calibration, these methods cannot respond to parameter changes in real time during continuous equipment operation. Furthermore, the calibration and range switching processes are independent of each other, making it difficult to maintain long-term measurement accuracy. Therefore, developing an adaptive range switching system that can automatically calibrate during operation and adjust the switching threshold in real time has become a key technical problem that needs to be solved in this field. Summary of the Invention

[0005] The present invention aims to provide a data detection and recording system based on adaptive range switching technology to solve the problems in the prior art, such as inaccurate range switching threshold and frequent erroneous switching caused by time-varying drift of analog front-end parameters, as well as the disconnect between calibration and range switching processes, which makes it impossible to maintain the system accuracy continuously during operation.

[0006] The technical solution of the present invention is a data detection and recording system based on adaptive range switching technology, the system comprising:

[0007] The sensor interface module is used to receive raw analog signals from external sensors;

[0008] An analog signal conditioning module, connected to the sensor interface module, is used to adjust the gain and select the path of the raw analog signal according to control commands.

[0009] An analog-to-digital converter module is connected to the output of the analog signal conditioning module and is used to convert the conditioned analog signal into a digital signal.

[0010] The digital signal processing and control module connects to and controls the sensor interface module, analog signal conditioning module, analog-to-digital conversion module, calibration signal generation module, and non-volatile storage module. The digital signal processing and control module internally includes a dynamic threshold calculation unit, an online calibration triggering and execution unit, a range switching decision unit, and a data recording unit.

[0011] The calibration signal generation module, controlled by the digital signal processing and control module, is used to generate a high-precision DC reference voltage and a standard sine wave signal, and inject the DC reference voltage and the standard sine wave signal into the input terminal of the analog signal conditioning module.

[0012] The non-volatile storage module is used to store system configuration parameters, calibration coefficients, historical operating data, and range switching logs;

[0013] The dynamic threshold calculation unit is used to calculate the decision threshold for range switching in real time based on the currently effective calibration coefficient; the online calibration triggering and execution unit is used to autonomously initiate and complete the calibration of the gain and bias error of the analog signal conditioning module during system operation; the range switching decision unit is used to generate a range switching command based on the real-time dynamic threshold provided by the dynamic threshold calculation unit; and the data recording unit is used to compensate, calibrate, and record the digital signal output by the analog-to-digital conversion module.

[0014] Furthermore, the dynamic threshold calculation unit maintains a mapping table containing the nominal gain value of each gain channel and the current effective gain calibration coefficient;

[0015] For the currently active range, the dynamic threshold calculation unit obtains the nominal gain value of the programmable gain amplifier under that range, and queries the mapping table for the current effective gain calibration coefficient corresponding to the nominal gain value;

[0016] The dynamic threshold calculation unit divides the preset base threshold voltage, which is set based on the full-scale percentage of the analog-to-digital converter, by the product of the nominal gain value and the gain calibration coefficient to obtain a dynamic decision threshold applicable to the current actual state of the analog front end.

[0017] Furthermore, the online calibration triggering and execution unit initiates the calibration process based on at least two independent triggering conditions;

[0018] The first trigger condition is when the system's cumulative running time reaches the preset periodic calibration interval; the second trigger condition is when the temperature change detected by the system's internal temperature sensor exceeds the preset temperature drift threshold.

[0019] When any trigger condition is met, the online calibration trigger and execution unit pauses the normal data acquisition process, controls the calibration signal generation module to output at least two DC reference voltages of different amplitudes in sequence, and controls the analog signal conditioning module to switch to the gain channel to be calibrated.

[0020] Furthermore, for each gain channel and each calibration voltage, the online calibration trigger and execution unit records the digital code value output by the analog-to-digital conversion module;

[0021] The online calibration triggering and execution unit fits the actual gain curve and zero-point offset of the channel using the least squares method, and then calculates the gain calibration coefficient and offset compensation value.

[0022] The online calibration triggering and execution unit immediately updates the calculated gain calibration coefficient and bias compensation value to the mapping table of the dynamic threshold calculation unit and the real-time compensation algorithm of the data recording unit.

[0023] Furthermore, the range switching decision unit continuously monitors the effective sampled values ​​after real-time bias compensation;

[0024] The decision-making process of the range switching decision unit follows the principle of lag comparison and is equipped with high threshold and low threshold.

[0025] When the effective sampled value continuously exceeds the high threshold corresponding to the current range for 3 sampling cycles, the range switching decision unit generates an increase range instruction; when the effective sampled value continuously falls below the low threshold corresponding to the current range for 5 sampling cycles, the range switching decision unit generates a decrease range instruction.

[0026] Furthermore, before any range switching command is issued, the range switching decision unit records the current time, the reason for switching, and the relevant dynamic thresholds in the range switching log of the non-volatile storage module.

[0027] Furthermore, the process by which the data recording unit processes and records the raw digital signal output by the analog-to-digital conversion module in real time includes:

[0028] The original data is zero-point corrected using the latest bias compensation value; the amplitude is calibrated using the gain calibration coefficient corresponding to the current gain channel; the calibrated engineering unit data, along with the timestamp, current range identifier, and gain calibration coefficient version number, are packaged and stored in the non-volatile storage module.

[0029] Furthermore, the programmable gain amplifier array of the analog signal conditioning module includes at least four independent gain channels, and the gain value of each channel is set in a power of 2 relationship.

[0030] The multi-channel analog switch employs a first-off-then-on switching logic and is configured on the input and output sides of the programmable gain amplifier array to achieve glitch-free reconstruction of the signal path during range switching and calibration.

[0031] Furthermore, the system operates in a state-aware adaptive control loop;

[0032] The adaptive control loop uses a fixed sampling period as the basic cycle, and performs data acquisition and compensation, dynamic threshold comparison, and operation status evaluation sequentially in each cycle.

[0033] The operational status evaluation unit comprehensively analyzes the recent frequency of range switching, the fulfillment of calibration trigger conditions, and the statistical characteristics of signal amplitude. If it finds abnormally frequent range switching or that the signal has been in the boundary region of a certain range for a long time, it adaptively adjusts the periodic calibration interval or the temperature drift threshold. Furthermore,

[0034] Furthermore, the calibration signal generation module is constructed using a low-temperature drift, high-stability reference voltage source and direct digital frequency synthesis technology;

[0035] The DC reference voltage output by the calibration signal generation module has an accuracy better than 0.01%, and the total harmonic distortion of the standard sine wave signal is less than 0.1%.

[0036] The calibration signal generation module is connected to the input terminal of the analog signal conditioning module via a high-precision analog switch.

[0037] In summary, this application includes at least one of the following beneficial technical effects:

[0038] I. This invention fundamentally solves the problem of interference from analog front-end parameter drift on range switching by introducing a dynamic threshold calculation unit and an online calibration triggering and execution unit. The dynamic threshold is calculated based on real-time calibration results, enabling the decision-making benchmark for range switching to adaptively follow changes in hardware status, ensuring the accuracy and timeliness of switching actions, effectively avoiding erroneous switching, data jumps, or loss caused by threshold inaccuracies, and achieving continuous and stable high-precision measurement during wide dynamic range signal acquisition.

[0039] Second, the online calibration mechanism designed in this invention possesses the ability to be triggered under multiple conditions and executed seamlessly during operation, breaking the limitation of traditional calibration requiring system shutdown or offline operation. The system can autonomously and imperceptibly complete calibration based on changes in running time or ambient temperature, and immediately feed back the calibration results to the range switching decision and data compensation stages, forming a closed-loop correction. This design significantly improves the system's ability to autonomously maintain accuracy and reliability under long-term continuous operation or harsh conditions, and greatly reduces maintenance costs and operational complexity.

[0040] Third, this invention adds system calibration status and range context information to all stored data through a data recording unit, and combines this with non-volatile range switching logs to provide a high-confidence traceability basis for subsequent data analysis. This allows users to clearly understand the actual system performance status at each data acquisition point, which is of great value for fault diagnosis, process analysis, and measurement uncertainty assessment, improving the reliability and usability of the entire data acquisition chain. Attached Figure Description

[0041] Figure 1 This is a schematic diagram of the overall technical solution of the data detection and recording system proposed in this invention. Detailed Implementation

[0042] Example 1

[0043] The data detection and recording system based on adaptive range switching technology proposed in this invention consists of a sensor interface module, an analog signal conditioning module, an analog-to-digital conversion module, a digital signal processing and control module, a calibration signal generation module, and a non-volatile storage module. These modules communicate with each other via an internal bus and dedicated control signal lines to achieve highly reliable data interaction and command synchronization. The entire system is centered on the digital signal processing and control module, which coordinates the entire closed-loop control process from raw signal acquisition, dynamic range adaptation, online accuracy calibration to high-confidence data recording.

[0044] First is the sensor interface module, located at the very beginning of the system's signal chain. This module is responsible for receiving raw analog electrical signals from various external physical quantity sensors. To achieve reliable and flexible signal input, the module employs the following technical methods in its design:

[0045] Module positioning and interface function definition. This module serves as the electrical and signal interface between the system and external sensors. Its core function is to receive analog voltage, current, or resistance signals output by the sensors and transmit them to the subsequent conditioning circuitry.

[0046] The module is designed as a universal multi-channel input structure, capable of simultaneously receiving multiple sensor signals. Its input circuit is specially designed to adapt to various common sensor signal types, including voltage output, current output, and resistance variation (which typically requires a constant current source or voltage divider circuit), thereby improving the system's applicability.

[0047] To ensure input signal quality, the module integrates a configurable filter network and overvoltage protection circuitry. The filter network is used to suppress high-frequency noise and power frequency interference.

[0048] The overvoltage protection circuit employs a transient voltage suppressor or clamping circuit to prevent high-voltage pulses caused by sensor malfunction or field interference from damaging subsequent precision circuits. Together, they perform preliminary noise suppression and electrical isolation before the signal enters the core conditioning stage.

[0049] The pre-processed analog signal is directly connected from the output of this module to the input port of the analog signal conditioning module, reducing intermediate steps, which helps maintain signal integrity and ensures that the conditioning module can receive a relatively "clean" and safe input signal.

[0050] In summary, the sensor interface module, through its universal input design and built-in preprocessing and protection circuits, enables reliable reception and initial purification of various sensor signals, laying the foundation for subsequent high-precision signal conditioning and analog-to-digital conversion.

[0051] Regarding the analog signal conditioning module, as mentioned above, the sensor interface module completes the reliable access and initial purification of external signals. The analog signal conditioning module, located downstream, is a key hardware unit for achieving accurate acquisition and adaptation of wide dynamic range signals. Specifically:

[0052] The core function of the analog signal conditioning module is to scale the amplitude of the analog signal from the sensor interface module to fit the optimal input range of the analog-to-digital converter module. To achieve this, its core component is a programmable gain amplifier (PGA) array.

[0053] The PGA array consists of four independent gain channels. Each channel uses a low-noise, low-temperature-drift operational amplifier as its core amplification device and is equipped with an independent, highly stable precision feedback resistor network to ensure the accuracy, stability, and repeatability of the gain settings for each channel.

[0054] The nominal gain values ​​for the four gain channels are set to 1x, 8x, 64x, and 512x, respectively. This range of gain values ​​is designed to cover signals ranging from weak millivolts to strong signals close to the full-scale voltage of the analog-to-digital converter, thus providing the system with a wide dynamic range of signal acquisition capabilities.

[0055] To enable switching between channels with different gains, multiple analog switches are configured on both the input side (connected to the signal source) and the output side (connected to the analog-to-digital converter) of the PGA array. These switches form a programmable connection network for the signal paths.

[0056] All analog switches are controlled using a "break-before-connect" switching logic. When the system needs to switch ranges, the digital signal processing and control module issues the following control commands in sequence: First, it controls the input-side switch to disconnect the current signal source from the PGA array; then, it controls the output-side switch to switch to the output of the target gain channel; finally, it controls the input-side switch to close, connecting the signal source to the input of the target gain channel.

[0057] In summary, the analog signal conditioning module, through its PGA array with multiple fixed gains, provides the hardware capability for the system to process signals with a wide dynamic range; and through a controlled analog switch network and specific switching timing, it achieves signal integrity protection during range switching. This reliable hardware design and bumpless switching mechanism lay a solid physical foundation for the subsequent digital control section (such as dynamic threshold calculation and decision-making) to achieve fast and accurate adaptive range switching.

[0058] For the analog-to-digital converter (ADC) module, after the analog signal conditioning module adapts the signal amplitude, it needs to convert the analog voltage into a digital signal for processing. The ADC module undertakes this core conversion function, and its specific implementation is as follows:

[0059] The analog-to-digital converter module is located after the analog signal conditioning module. It directly receives the analog voltage signal after gain adjustment and converts it into high-resolution digital code values, completing the key transformation from the analog domain to the digital domain.

[0060] To achieve high-precision conversion, this embodiment uses a 24-bit Σ-Δ analog-to-digital converter as the core component. This converter provides an effective resolution of at least 22 bits, ensuring accurate capture of minute signal changes. Its sampling rate can be configured in multiple preset ranges from 10 Hz to 10 kHz to adapt to the dynamic characteristics of various measured signals, ranging from slowly changing to rapidly changing.

[0061] The reference voltage of the analog-to-digital converter (ADC) is provided by a highly stable, low-temperature-drift voltage reference source, either internally or externally. This design ensures that the reference point of the ADC remains stable throughout the entire system operating temperature range, thereby guaranteeing long-term reliability and temperature stability of the conversion accuracy.

[0062] The converted digital code value is transmitted in real time to the digital signal processing and control module via a high-speed serial interface (such as SPI or I2C). This interface is responsible for ensuring reliable and timely data upload for subsequent digital signal processing, range decision-making, and data recording.

[0063] In summary, the analog-to-digital conversion module achieves high-precision and reliable digitization of conditioned analog signals by employing a high-resolution Σ-Δ converter, configuring an adjustable sampling rate, using a stable voltage reference, and defining a well-defined data interface. The stable digital code stream it provides forms the raw data foundation for all subsequent digital processing, adaptive range decision-making, and online calibration algorithms.

[0064] For the digital signal processing and control module, the analog-to-digital conversion module provides the raw digital signal code values, while the central unit that performs real-time processing, decision-making, and control of these digital signals is the digital signal processing and control module. As the "brain" of the entire system, the digital signal processing and control module's specific functional architecture and operating mechanism are as follows:

[0065] The digital signal processing and control module is responsible for receiving the digital code values ​​uploaded by the analog-to-digital conversion module and executing a series of real-time digital signal processing, control decision-making, and data management tasks. It is the intelligent control core of the system to realize adaptive range switching and online calibration.

[0066] To achieve the above comprehensive functions, this module is logically divided into four core functional sub-units: dynamic threshold calculation unit, online calibration triggering and execution unit, range switching decision unit, and data recording unit.

[0067] The four functional sub-units mentioned above do not operate independently, but rather coordinate and work in an orderly manner under the scheduling of a unified timing controller, using the system's fixed sampling period as the basic beat. Together, they constitute a "state-aware adaptive control loop".

[0068] Within each sampling period, the control loop typically performs the following core operations in sequence: First, it completes a full processing cycle from signal acquisition to data compensation; then, it compares and analyzes the compensated data with dynamically calculated thresholds to determine whether the current range is appropriate and decides whether to switch; finally, it integrates historical and current status information to perform an operational status assessment to optimize the system's long-term control strategy (such as adjusting the calibration frequency).

[0069] Regarding the dynamic threshold calculation unit, as mentioned above, the digital signal processing and control module operates on a collaborative, division-of-labor basis. Specifically, the dynamic threshold calculation unit transforms the real-time system performance parameters obtained from online calibration into an accurate voltage judgment benchmark upon which range switching decisions are based. Its specific implementation process is as follows:

[0070] The dynamic threshold calculation unit calculates the range switching decision threshold applicable to the current hardware state in real time based on the currently valid calibration coefficients. To accomplish this task, the unit maintains a "gain channel parameter mapping table".

[0071] In the mapping table, each entry corresponds to a gain channel in the analog signal conditioning module, recording three key parameters of that channel: the nominal gain value of the channel (e.g., 1, 8, 64, 512), the currently valid gain calibration coefficient, and so on. ), and the currently valid zero-point offset compensation value ( ).

[0072] The mapping table is updated immediately after each successful calibration by the online calibration triggering and execution unit using newly calculated calibration coefficients and bias values. This ensures that the parameters used for threshold calculations are always up-to-date and best reflect the current system state.

[0073] Range switching essentially involves determining whether the input signal voltage exceeds the optimal measurement range of the current range. This range is defined by a pair of high and low thresholds. The full-scale input voltage of the analog-to-digital converter is set to... Preset a base threshold ratio, for example, set the high threshold point to... Low threshold point set These two voltage values ​​are fixed voltage reference points defined at the input of the analog-to-digital converter.

[0074] Since the signal has already been amplified by the current gain channel before reaching the analog-to-digital converter (ADC), it is necessary to convert the fixed threshold at the ADC input back to the input of the analog signal conditioning module (i.e., the physical signal voltage actually sensed by the system). Let the nominal gain of the currently active gain channel be... The currently effective gain calibration coefficient is Then, under the current range, the corresponding dynamic high threshold at the input end. and dynamic low threshold The calculation formulas are as follows:

[0075]

[0076]

[0077] The calculation process for the aforementioned dynamic threshold is completed at the beginning of each sampling period, before processing new data. The calculated real-time threshold result is immediately transmitted to the range switching decision unit for comparison and decision-making.

[0078] In summary, the dynamic threshold calculation unit maintains and updates the mapping table containing calibration parameters for each channel in real time. Based on a clear conversion formula, it converts the fixed back-end voltage threshold into a front-end physical voltage threshold that adapts to the system gain error. This ensures that the decision-making benchmark for range switching can track and compensate for gain changes in the analog front-end caused by temperature drift, aging, etc., in real time, thereby solving the core problem of inaccuracy caused by parameter drift in the fixed threshold scheme.

[0079] For the range switching decision unit, the dynamic threshold calculation unit provides adaptively adjusted high and low thresholds in real time. The range switching decision unit then makes a final judgment on whether to switch ranges based on these dynamic thresholds and real-time acquired signals. The specific decision logic and process are as follows:

[0080] The signal continuously monitored by the range switching decision unit is the "effective sampled value" after real-time bias compensation. This value is calculated by subtracting the zero-point bias compensation value corresponding to the current gain channel from the original analog-to-digital conversion result in the mapping table maintained by the dynamic threshold calculation unit. This is obtained to eliminate the impact of channel zero-point error on decision-making.

[0081] To prevent frequent range switching caused by minor fluctuations in the input signal near the threshold voltage, the decision unit employs a hysteresis comparison mechanism. This mechanism requires the signal to "continuously" exceed the threshold for a certain period before triggering a switching action, rather than triggering it upon a single exceedance.

[0082] When the effective sample value is greater than the dynamic high threshold corresponding to the current range for 3 consecutive sampling periods ( When the signal is overloaded, the decision unit determines that the signal may be overloaded and needs to switch to a higher gain level (i.e., a larger range) to avoid clipping distortion, and then generates a "range increase" command.

[0083] When the effective sample value is less than the dynamic low threshold corresponding to the current range for 5 consecutive sampling periods ( When the signal is too small and the signal-to-noise ratio of the current range is not good, the decision unit determines that the signal can be switched to a lower gain level (i.e., a smaller range) to improve the resolution, and then generates a "reduce range" command.

[0084] The shorter range increment determination period (3 cycles) compared to the range decrement determination period (5 cycles) is an asymmetric design. The purpose is to prioritize ensuring that the signal is not clipped due to switching delay (rapid response to range increment requirements), while avoiding a sudden drop in signal-to-noise ratio caused by premature switching to a smaller range due to brief fluctuations when the signal is slowly attenuating (careful execution of range decrement).

[0085] Before formally issuing the range switching control command to the analog signal conditioning module, the decision unit triggers a log recording operation. The recorded information includes at least: the current precise system time, the switching direction (up / down), the specific value of the dynamic threshold used for triggering, the current gain channel identifier, and the version number of the calibration coefficient currently being used. This information is written to a dedicated log area in the non-volatile storage module, providing crucial contextual information for subsequent data playback and analysis.

[0086] In summary, the range switching decision unit processes the bias-corrected valid signal and applies a threshold comparison rule with hysteresis and asymmetric period design to achieve stable and reliable automatic range switching judgment. Its design strikes a balance between preventing erroneous switching and ensuring signal quality. Meanwhile, detailed logging functionality supports data reliability. The switching command generated by this unit ultimately drives the hardware switching action in the analog signal conditioning module, completing a full adaptive range switching closed loop.

[0087] For the online calibration triggering and execution unit, the range switching decision relies on accurate dynamic thresholds, which in turn are based on calibration coefficients that reflect the true state of the system. The online calibration triggering and execution unit, a key module that autonomously updates these calibration coefficients during system operation, operates as follows:

[0088] During normal system operation, the online calibration triggering and execution unit autonomously initiates and completes the accuracy correction of the analog signal conditioning module. Its design goal is to achieve "seamless" online calibration without external intervention and with minimal impact on the main data acquisition function.

[0089] The line calibration trigger and execution unit maintains an internal runtime counter. One of the trigger conditions is met when the cumulative runtime since the last calibration reaches a preset periodic calibration interval (e.g., 24 hours).

[0090] The system's integrated high-precision temperature sensor continuously monitors the junction temperature of key chips. When the detected temperature change (relative to the temperature at the time of the last calibration or a temperature baseline within a certain period) exceeds a preset drift threshold (e.g., ±5 degrees Celsius), the second trigger condition is met.

[0091] When any of the above triggering conditions are met, the line calibration triggering and execution unit immediately enters the calibration mode. In this mode, the digital signal processing and control module first controls the calibration signal generation module to output a known and accurate first DC reference voltage (e.g., +1.0000V). This voltage is injected into the input of the analog signal conditioning module through a high-precision analog switch, replacing the normal sensor signal at this time.

[0092] The system controls the analog signal conditioning module to sequentially switch to each gain channel (e.g., 1x, 8x, 64x, 512x) in its programmable gain amplifier array. On each channel, after the circuit stabilizes, the corresponding digital code value output by the analog-to-digital converter is recorded. This completes the sampling of the outputs of all gain channels at the first calibration voltage point.

[0093] After completing the first data acquisition, the calibration signal generation module switches to output a second known and accurate DC reference voltage (e.g., -0.5000V). The system repeats the previous process, iterating through all gain channels again and recording the corresponding output digital code values.

[0094] For each gain channel, the online calibration trigger and execution unit uses the two sets of input-output data pairs obtained above (inputs are known voltages V1 and V2, and outputs are the corresponding digital code values ​​D1 and D2) to perform a two-point linear fit using the least squares method. The fitted result is the actual input-output relationship for that channel: digital code value = a × input voltage + b. Here, the slope a reflects the actual gain of the channel, and the intercept b reflects the zero-point bias of the channel.

[0095] Based on the fitting results, the gain calibration coefficient of this channel is calculated. =Channel nominal gain / a. Simultaneously, calculate the zero-point offset compensation value for this channel. These two parameters are the new calibration coefficients used to correct the channel error.

[0096] After the calculation is completed, these new gain calibration coefficients ( ) and bias compensation value ( The new values ​​are immediately written into the "gain channel parameter mapping table" maintained by the dynamic threshold calculation unit, replacing the old values. At the same time, these new parameters are also synchronously updated in the real-time compensation algorithm of the data recording unit.

[0097] The entire online calibration process, from triggering to completing parameter updates, typically takes only a few hundred milliseconds. Due to this short time frame, its impact on the continuity of master data acquisition is negligible, achieving the design goal of "seamless" calibration.

[0098] In summary, the online calibration triggering and execution unit intelligently initiates calibration through a "time and temperature dual triggering" mechanism, acquires raw data through "injecting a known standard signal - full-channel scan acquisition," and uses a defined algorithm to calculate and update calibration coefficients in real time. This closed-loop process enables the system to autonomously track and compensate for the gain and zero-point drift of the analog front end without relying on external devices or interrupting normal measurements, thus providing a continuous and reliable parameter basis for dynamic threshold calculation and accurate data compensation.

[0099] Regarding the calibration signal generation module, the online calibration triggering and execution unit is responsible for decision-making and calculation, while the high-precision, programmable standard signal upon which it relies for calibration is generated by the calibration signal generation module. The calibration signal generation module is the hardware foundation of the online calibration function, and its specific structure and characteristics are as follows:

[0100] The core function of the calibration signal generation module is to generate a high-precision, highly stable known analog signal, which is used to excite and test the analog signal conditioning module during online calibration.

[0101] Internally, it employs a bandgap reference voltage source as the basis for its accuracy. This reference source has an initial accuracy better than 0.01%, and its output voltage temperature coefficient is less than 5 ppm / °C. This provides a long-term stable voltage reference for the entire calibration signal that is minimally affected by temperature.

[0102] This reference voltage source drives a 16-bit high-resolution digital-to-analog converter (DAC). The DAC converts digital control words into analog voltages, and its high resolution ensures finely adjustable output calibration signal amplitude with very low quantization error.

[0103] By incorporating direct digital frequency synthesis technology, this module can not only output a highly stable DC voltage, but also generate a standard sine wave signal with adjustable frequency and amplitude. This functional extension allows the system to verify the AC frequency response characteristics of the entire acquisition channel (including conditioning and conversion) when necessary, enabling a more comprehensive performance evaluation.

[0104] The calibration signal generated by the module is connected to the input of the analog signal conditioning module via a dedicated analog switch matrix. This switch matrix features ultra-low on-resistance and high turn-off isolation.

[0105] The design of the switch matrix ensures two things: first, the calibration signal injection path is electrically isolated from the normal sensor signal path, preventing interference; second, at the moment of switch switching, no significant charge injection or voltage spikes or other transient interference are introduced into the signal path. This design ensures that the calibration signal can be injected into the system "cleanly," thereby ensuring the authenticity and reliability of the subsequently acquired calibration data.

[0106] In summary, the calibration signal generation module provides an accurate and reliable standard signal source through a combination of a high-precision reference source and a high-resolution DAC; it expands the types of test signals through DDS technology; and it achieves safe and uninterrupted injection into the main signal chain through a low-noise, high-isolation switching interface. It provides a reliable "benchmark" for the online calibration process, and its performance directly determines the accuracy of the calibration results, thus affecting the final accuracy of the entire system's adaptive range switching and data compensation.

[0107] For the data logging unit, online calibration and range switching decisions jointly ensure the accuracy and adaptability of the acquisition process, while the final high-confidence archiving of data is completed by the data logging unit. The data logging unit is responsible for the final processing and persistent storage of the raw digital code values ​​output by the analog-to-digital converter module. Its processing flow is as follows:

[0108] The data recording unit receives the raw digital code value from the analog-to-digital conversion module, processes it through a series of steps, and then stores it. This processing relies strictly on the latest calibration parameters in the "gain channel parameter mapping table" maintained by the dynamic threshold calculation unit.

[0109] First, based on the currently active gain channel identifier, read the zero-point offset compensation value corresponding to that channel from the mapping table. Then, the offset compensation value is subtracted from the original digital code value to obtain intermediate data after zero-point correction, thereby eliminating the DC offset error of the analog front end.

[0110] Next, the gain calibration coefficient of the current gain channel is read from the mapping table. The zero-point calibrated data obtained in step 902 is then calibrated using this coefficient, converting it into a physical quantity value with actual engineering units (such as volts, amperes, degrees Celsius, etc.). The conversion relationship is usually: Physical quantity value = (zero-point calibrated data × nominal full-scale physical quantity) / (nominal gain × ... ).

[0111] The physical quantity values ​​are packaged with the following metadata to form a complete data record structure:

[0112] Absolute timestamps provided by high-precision real-time clocks.

[0113] The currently active gain channel identifier (e.g., " (”).

[0114] The calibration coefficient version number (a monotonically increasing 32-bit integer that increments during calibration updates) is used as the basis for this data processing.

[0115] The packaged structured data records are stored in the main data area of ​​the non-volatile storage module through a reliable write protocol (such as a protocol that ensures atomicity of writes).

[0116] The non-volatile storage module uses industrial-grade SPI NAND flash memory. This module has power-loss data retention capability and incorporates bad block management and wear leveling algorithms. These mechanisms work together to ensure that the storage medium lifespan can reach more than 10 years under long-term, frequent write operations, guaranteeing long-term data reliability.

[0117] In addition to the master measurement data, all critical system events, including range switching events, online calibration execution records, and system operation anomaly alarms, are formatted as independent log entries and stored in a dedicated log partition of the non-volatile storage module. This separate management from the master data facilitates later tracing, diagnosis, and auditing of system behavior.

[0118] In summary, the data recording unit, through a standardized process of "calibration—standardization—packaging—storage," not only outputs high-precision physical quantity data, but more importantly, it attaches a complete spatiotemporal and state context (time, range, calibration version) to each data point. Combined with highly reliable non-volatile storage and detailed system logs, this unit ultimately achieves persistent high-confidence data, ensuring that the recorded data is not only accurate but also fully traceable in terms of its generation conditions, greatly enhancing the reliability and availability of the entire data acquisition chain.

[0119] The data recording unit ensures the complete storage of historical operational data, providing a data foundation for system self-evaluation and optimization. The operational status evaluation unit utilizes this data to enable the system to operate in a "state-aware adaptive control loop," with the specific strategy adjustment mechanism as follows:

[0120] The operational status assessment unit continuously analyzes historical operational data and dynamically optimizes the system's long-term control strategy to improve overall adaptability and efficiency. This unit automatically runs an assessment process periodically.

[0121] Strategy Adjustment 1 – Calibration Interval Optimization Based on Signal Stability. The unit first counts the total number of range switches that occurred within a past evaluation period (e.g., 1 hour). If the count reveals an abnormally high switching frequency, such as exceeding a preset threshold (e.g., 10 times per minute on average), the evaluation unit determines that the current measured signal may be fluctuating near the critical boundary between two ranges for an extended period. This condition places higher demands on the accuracy of the range switching threshold.

[0122] Adjustment 1 is implemented. Based on the above determination, the evaluation unit will automatically shorten the system's periodic calibration interval. For example, the original 24-hour calibration interval will be dynamically adjusted to 12 hours. The aim is to update the gain and bias coefficients through more frequent online calibration, thereby ensuring that the dynamic threshold calculation can more closely track minute changes in hardware status and improve the accuracy of range switching decisions in critical regions.

[0123] Strategy Adjustment 2 – Threshold Optimization Based on Sensitivity to Environmental Changes. The unit also counts the number of times the system triggers environmental calibration due to temperature changes exceeding a threshold within a short period (e.g., the last 24 hours). If the number of triggers is found to be too frequent (e.g., more than 3 times), the evaluation unit determines that the current operating environment temperature fluctuates drastically, or that the originally set temperature drift threshold (ΔT_th) is too lenient.

[0124] Adjustment 2 is performed. Based on the above determination, the evaluation unit will appropriately lower the temperature drift threshold used to trigger environmental calibration. For example, the original threshold will be adjusted from ±5°C to ±3°C. This makes the system more sensitive to changes in ambient temperature, enabling it to initiate calibration compensation earlier when hardware parameters experience smaller deviations due to temperature, thereby more proactively maintaining accuracy and avoiding error accumulation.

[0125] The aforementioned two (or more) adaptive adjustment mechanisms enable the system to go beyond fixed parameter settings and dynamically adjust its core behavioral parameters (calibration interval, trigger threshold) based on the actual monitored signal characteristics and environmental conditions. Its core objective is to intelligently find the optimal balance between "ensuring the highest measurement accuracy" and "reducing unnecessary calibration operations, extending hardware lifespan, and lowering system power consumption" under complex and changing operating conditions.

[0126] In summary, the operational status assessment unit analyzes range switching logs and calibration trigger records to transform the system's historical behavior into a basis for optimizing future strategies, thereby achieving a higher level of closed-loop intelligent control.

[0127] In summary, this embodiment deeply couples four major functions—dynamic threshold calculation, online calibration execution, hysteresis range decision-making, and data recording with status tags—to construct a high-precision data detection and recording system capable of continuous self-correction and adaptive adjustment during operation. This system not only solves the fundamental flaw of the separation between range switching and calibration in traditional solutions but also achieves real-time compensation for time-varying errors in the analog front end through a closed-loop feedback mechanism. Therefore, it maintains excellent measurement accuracy and data reliability even under wide dynamic range, long-term continuous operation, and harsh environmental conditions.

[0128] Example 2

[0129] Based on Example 1, this example further expands the functionality of the calibration signal generation module and enhances the fault diagnosis capability in the digital signal processing and control module to meet the more stringent industrial field application requirements.

[0130] Based on Example 1, this example further expands the functionality of the calibration signal generation module and enhances the system's self-diagnosis and fault-tolerant operation capabilities. The specific implementation is as follows:

[0131] In addition to its existing DC and sine wave output capabilities, the calibration signal generation module adds a third calibration signal output capability: a precisely controllable step signal. This signal is generated by a high-speed digital-to-analog converter in conjunction with a precision voltage comparator circuit, and its performance specifications are: rise time less than 1 microsecond and step amplitude accuracy better than 0.02%.

[0132] This step signal is primarily used to evaluate the transient response characteristics of analog signal conditioning modules, especially their settling time. Settling time is a key parameter that measures the time required for an amplifier circuit to stabilize its output within a specified error band after a sudden change in the input signal, reflecting the bandwidth and stability of the channel.

[0133] When the system detects a specific anomaly during operation, the online calibration triggering and execution unit will automatically trigger a step response test. The triggering condition is based on the analysis of the data segment after the range switch:

[0134] Within a preset time window (e.g., 50 milliseconds) after the range switching is completed, the standard deviation of the effective sampled values ​​is calculated. If the standard deviation exceeds the preset oscillation threshold, it is determined to be "abnormal oscillation".

[0135] Record the time taken for the signal to stabilize within ±1% of the final value after the most recent range switch. If this time exceeds the preset setup time threshold (e.g., 20 milliseconds), it is determined as "setup time exceeded".

[0136] The step response test is triggered when any of the above conditions are met.

[0137] Upon test triggering, the calibration signal generation module outputs a positive step signal that jumps from 0 volts to 50% of the full-scale voltage of the analog-to-digital converter. The digital signal processing and control module continuously acquires 100 sampling points at the system's highest sampling rate (e.g., 10 kHz).

[0138] The system analyzes the collected data and calculates the time it takes for the step signal to rise from the 10% amplitude point to the 90% amplitude point, which is taken as the measured settling time of the channel. If the measured settling time exceeds the preset settling time threshold (e.g., 20 milliseconds), the system determines that the currently active gain channel has bandwidth degradation or stability issues.

[0139] To achieve fault tolerance, the system adds a "health status" flag to each channel in the gain channel parameter mapping table maintained by the dynamic threshold calculation unit. When a channel is determined to be performing poorly according to the aforementioned method, the system updates the status flag of that channel in the mapping table to "restricted use," and simultaneously records information such as the setup time and test time of this test in the log of the non-volatile storage module.

[0140] Subsequently, when the range switching decision unit executes its decision logic, it first needs to query the health status of each candidate channel in the mapping table. The decision logic is modified to: prioritize selecting the optimal target range channel from the channels with the status flag "normal" based on the comparison between the signal amplitude and the dynamic threshold. Only when all channels with higher or lower gains are marked as "restricted use" will the channel be considered for use. This achieves hardware-level fault isolation and continuous system operation.

[0141] In summary, through the aforementioned enhancements, the system can not only perform routine gain and bias calibrations but also proactively diagnose dynamic performance degradation in the analog front-end. Once a problem is detected, the system can automatically avoid hardware channels with degraded performance through a combination of software flagging and decision logic. This maximizes the maintenance of overall system functionality and measurement reliability even with partial hardware performance degradation, enhancing robustness for long-term operation in harsh industrial environments.

[0142] In addition, the digital signal processing and control module has added an analog front-end health assessment subunit. After each online calibration, this subunit not only records the gain calibration coefficient and offset compensation value, but also calculates and stores a comprehensive health index. This index is composed of three weighted components: the absolute value of the gain error (40% weight), the absolute value of the zero-point offset (30% weight), and the step response settling time deviation (30% weight). All components are normalized to the range of 0 to 1; the closer the health index is to 0, the better the channel performance. When the health index of a channel exceeds 0.7 for three consecutive calibrations, the system will generate a high-level alarm and recommend preventative maintenance. This health index, along with the calibration data, is stored in a non-volatile storage module, providing a quantitative basis for the entire lifecycle management of the equipment.

[0143] Regarding data recording, this embodiment introduces a data integrity verification mechanism. Each structured data record is appended with a 32-bit cyclic redundancy check (CRC) code before being written to the non-volatile storage module. During power-on self-test or data readback, the system recalculates the check code and compares it with the stored value. If an inconsistency is found, the record is deemed corrupted, and an attempt is made to recover it from the redundant backup area. If there is no backup, the data for that time period is marked as "unreliable" and highlighted in the user interface. This mechanism significantly improves data reliability under harsh operating conditions such as strong electromagnetic interference or power fluctuations.

[0144] Finally, the non-volatile storage module in this embodiment employs a dual-partition mirrored storage strategy. The primary data area and backup data area are written alternately. Each write operation first updates the backup area and then atomically switches the active partition pointer. Even if an unexpected power outage occurs during the write process, the system can recover data from the partition that was last fully written to after restarting, ensuring no data loss. This strategy, combined with the aforementioned cyclic redundancy check, constitutes a dual data security protection system.

[0145] Through the above enhancements, this embodiment retains all the advantages of embodiment 1 while further improving the system's robustness, maintainability, and data integrity in complex industrial environments. It is particularly suitable for application scenarios with extremely high reliability requirements, such as power monitoring, aerospace testing, and high-end manufacturing process control.

[0146] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention. Therefore, the embodiments should be regarded as exemplary and non-limiting in all respects.

[0147] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A data detection and recording system based on adaptive range switching technology, characterized in that, include: The sensor interface module is used to receive raw analog signals from external sensors; An analog signal conditioning module, connected to the sensor interface module, is used to adjust the gain and select the path of the raw analog signal according to control commands. An analog-to-digital converter module is connected to the output of the analog signal conditioning module and is used to convert the conditioned analog signal into a digital signal. The digital signal processing and control module connects to and controls the sensor interface module, analog signal conditioning module, analog-to-digital conversion module, calibration signal generation module, and non-volatile storage module. The digital signal processing and control module internally includes a dynamic threshold calculation unit, an online calibration triggering and execution unit, a range switching decision unit, and a data recording unit. The calibration signal generation module, controlled by the digital signal processing and control module, is used to generate a high-precision DC reference voltage and a standard sine wave signal, and inject the DC reference voltage and the standard sine wave signal into the input terminal of the analog signal conditioning module. The non-volatile storage module is used to store system configuration parameters, calibration coefficients, historical operating data, and range switching logs; The dynamic threshold calculation unit is used to calculate the decision threshold for range switching in real time based on the currently effective calibration coefficient; the online calibration triggering and execution unit is used to autonomously initiate and complete the calibration of the gain and bias error of the analog signal conditioning module during system operation; the range switching decision unit is used to generate a range switching command based on the real-time dynamic threshold provided by the dynamic threshold calculation unit; and the data recording unit is used to compensate, calibrate, and record the digital signal output by the analog-to-digital conversion module.

2. The data detection and recording system based on adaptive range switching technology according to claim 1, characterized in that, The dynamic threshold calculation unit maintains a mapping table containing the nominal gain value of each gain channel and the current effective gain calibration coefficient; For the currently active range, the dynamic threshold calculation unit obtains the nominal gain value of the programmable gain amplifier under that range, and queries the mapping table for the current effective gain calibration coefficient corresponding to the nominal gain value; The dynamic threshold calculation unit divides the preset base threshold voltage, which is set based on the full-scale percentage of the analog-to-digital converter, by the product of the nominal gain value and the gain calibration coefficient to obtain a dynamic decision threshold applicable to the current actual state of the analog front end.

3. A data detection and recording system based on adaptive range switching technology according to claim 2, characterized in that, The online calibration triggering and execution unit initiates the calibration process based on at least two independent triggering conditions; The first trigger condition is when the system's cumulative running time reaches the preset periodic calibration interval; the second trigger condition is when the temperature change detected by the system's internal temperature sensor exceeds the preset temperature drift threshold. When any trigger condition is met, the online calibration trigger and execution unit pauses the normal data acquisition process, controls the calibration signal generation module to output at least two DC reference voltages of different amplitudes in sequence, and controls the analog signal conditioning module to switch to the gain channel to be calibrated.

4. A data detection and recording system based on adaptive range switching technology according to claim 3, characterized in that, For each gain channel and each calibration voltage, the online calibration trigger and execution unit records the digital code value output by the analog-to-digital conversion module; The online calibration triggering and execution unit fits the actual gain curve and zero-point offset of the channel using the least squares method, and then calculates the gain calibration coefficient and offset compensation value. The online calibration triggering and execution unit immediately updates the calculated gain calibration coefficient and bias compensation value to the mapping table of the dynamic threshold calculation unit and the real-time compensation algorithm of the data recording unit.

5. A data detection and recording system based on adaptive range switching technology according to claim 2, characterized in that, The range switching decision unit continuously monitors the effective sampled values ​​after real-time bias compensation. The decision-making process of the range switching decision unit follows the principle of lag comparison and is equipped with high threshold and low threshold. When the effective sampled value continuously exceeds the high threshold corresponding to the current range for 3 sampling cycles, the range switching decision unit generates an increase range instruction; when the effective sampled value continuously falls below the low threshold corresponding to the current range for 5 sampling cycles, the range switching decision unit generates a decrease range instruction.

6. A data detection and recording system based on adaptive range switching technology according to claim 5, characterized in that, Before any range switching command is issued, the range switching decision unit records the current time, the reason for switching, and the relevant dynamic threshold in the range switching log of the non-volatile storage module.

7. A data detection and recording system based on adaptive range switching technology according to claim 1, characterized in that, The process by which the data recording unit processes and records the raw digital signal output by the analog-to-digital conversion module in real time includes: The original data is zero-point corrected using the latest bias compensation value; the amplitude is calibrated using the gain calibration coefficient corresponding to the current gain channel; the calibrated engineering unit data, along with the timestamp, current range identifier, and gain calibration coefficient version number, are packaged and stored in the non-volatile storage module.

8. A data detection and recording system based on adaptive range switching technology according to claim 1, characterized in that, The programmable gain amplifier array of the analog signal conditioning module contains at least four independent gain channels, and the gain value of each channel is set in a power of 2 relationship. The multi-channel analog switch employs a first-off-then-on switching logic and is configured on the input and output sides of the programmable gain amplifier array to achieve glitch-free reconstruction of the signal path during range switching and calibration.

9. A data detection and recording system based on adaptive range switching technology according to claim 1, characterized in that, The system operates in a state-aware adaptive control loop; The adaptive control loop uses a fixed sampling period as the basic cycle, and performs data acquisition and compensation, dynamic threshold comparison, and operation status evaluation sequentially in each cycle. The operational status evaluation unit comprehensively analyzes the frequency of recent range switching, the fulfillment of calibration trigger conditions, and the statistical characteristics of signal amplitude. If it finds that the range switching is abnormally frequent or the signal is in the boundary region of a certain range for a long time, it adaptively adjusts the periodic calibration interval or the temperature drift threshold.

10. A data detection and recording system based on adaptive range switching technology according to claim 1, characterized in that, The calibration signal generation module is constructed using a low-temperature drift, high-stability reference voltage source and direct digital frequency synthesis technology. The DC reference voltage output by the calibration signal generation module has an accuracy better than 0.01%, and the total harmonic distortion of the standard sine wave signal is less than 0.1%. The calibration signal generation module is connected to the input terminal of the analog signal conditioning module via a high-precision analog switch.