Analog-to-digital conversion device and analog-to-digital conversion method

By using parallel high-sampling-rate low-precision and low-sampling-rate high-precision analog-to-digital converters in the coulomb counter, and using differential calculations and learning algorithms to adjust the threshold, the problem of balancing accuracy and speed of traditional analog-to-digital converters in the coulomb counter is solved. problem, improving the accuracy and adaptability of battery SOC estimation.

CN118801893APending Publication Date: 2024-10-18XINXIANG TECH (HEFEI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410769395.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-14
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

It is difficult for traditional analog-to-digital converters to simultaneously achieve high accuracy and high speed in coulomb counters, resulting in inaccurate accuracy at low load currents and insufficient sampling during load surges, resulting in large battery SOC estimation errors.

Method used

Two analog-to-digital converters are used to work in parallel, one with high sampling rate and low precision, and one with low sampling rate and high precision. The output result is selected through differential calculation and threshold comparison, and the threshold is adjusted through a learning algorithm to dynamically adjust the sampling rate.

Benefits of technology

It achieves flexible adjustment of accuracy and speed under different working conditions, improves the accuracy and adaptability of battery SOC estimation, and reduces errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118801893A_ABST
    Figure CN118801893A_ABST
Patent Text Reader

Abstract

The invention provides analog-to-digital conversion equipment and an analog-to-digital conversion method. The analog-to-digital conversion equipment comprises a first analog-to-digital converter; the sampling rate of the second analog-to-digital converter is greater than that of the first analog-to-digital converter; a threshold comparator configured to receive an output result of the second analog-to-digital converter and compare the output result with a threshold; and a selector configured to receive a comparison result of the threshold comparator to select an output result of the first analog-to-digital converter or the second analog-to-digital converter as an output result of the analog-to-digital conversion device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of signal processing, in particular, to an analog-to-digital conversion device and an analog-to-digital conversion method. Background Art

[0002] In many electronic applications, analog input signals are converted to digital output signals for further digital signal processing. For example, in a system that measures battery charge, the electronic device can be equipped with one or more sensors (such as current, voltage, temperature sensors) for measurement, which can generate analog signals. The analog signal can then be provided to an analog-to-digital converter (ADC) as input to generate a digital output signal for further processing.

[0003] In systems that measure battery charge, a coulomb counter is used to sense the voltage drop caused by the load current. The accuracy of the coulomb counter is very important for estimating the battery's state of charge (SOC). In coulomb counter applications, there are two situations that require both accuracy and speed from the ADC in the coulomb counter. The first situation is when the load current is very small, the input voltage signal is also very small, so any small error will result in a large degree of error. In particular, when the error accumulates over a long period of time, this makes the battery's SOC estimate very inaccurate. The second situation is when the load current changes rapidly, such as when the battery is powering an electric car and the driver is accelerating, or when the battery is powering a server and the user is running a large computing program. These transient load surges require fast sampling of the ADC. If the sampling speed is not fast enough to capture these transient events, the coulomb counter will miss the charge loss. When such transient load surges occur repeatedly between long sampling periods, the error in the charge state estimation becomes large.

[0004] Typically, conventional ADCs sacrifice speed to achieve high accuracy, or sacrifice accuracy to achieve high speed. Also, in the ADC used in the coulomb counter, a fixed slow sampling speed is set to achieve better accuracy.

[0005] Therefore, there is a need for an analog-to-digital conversion device and an analog-to-digital conversion method that can resolve the contradiction between high precision and high speed of ADC and can adjust the user's demand for high precision and high speed in real time to have better adaptability under various working conditions. The present application is suitable for resolving this demand. Summary of the invention

[0006] In response to the above-mentioned problem of balancing high precision and high sampling speed in an analog-to-digital converter, in a first aspect of the present application, according to an embodiment, an analog-to-digital conversion device is provided, comprising: a first analog-to-digital converter; a second analog-to-digital converter, the sampling rate of the second analog-to-digital converter being greater than the sampling rate of the first analog-to-digital converter; a threshold comparator, configured to receive an output result of the second analog-to-digital converter and compare it with a threshold; and a selector, configured to receive the comparison result of the threshold comparator to select the output result of the first analog-to-digital converter or the second analog-to-digital converter as the output result of the analog-to-digital conversion device.

[0007] Furthermore, the analog-to-digital conversion device also includes: a differentiator connected between the second analog-to-digital converter and the threshold comparator, configured to perform differential calculation on the output result of the second analog-to-digital converter, and input the differential calculation result into the threshold comparator for comparison with the threshold.

[0008] Further, the selector is configured to select the output result of the second analog-to-digital converter as the output result of the analog-to-digital conversion device when the differential calculation result is greater than or equal to the threshold; and to select the output result of the first analog-to-digital converter as the output result of the analog-to-digital conversion device when the differential calculation result is less than the threshold.

[0009] Furthermore, the analog-to-digital conversion device also includes: a threshold adjuster configured to output an adjustment result to the threshold comparator to adjust the threshold based on the output result of the first analog-to-digital converter, the output result of the second analog-to-digital converter and a learning algorithm.

[0010] Further, the learning algorithm includes the probability of currently selecting the output result of the second analog-to-digital converter as the output result of the analog-to-digital conversion device, and the probability is calculated based on the probability of previously selecting the output result of the second analog-to-digital converter as the output result of the analog-to-digital conversion device, the total number of times the output result of the first analog-to-digital converter is selected as the output result of the analog-to-digital conversion device, and the total number of times the output result of the second analog-to-digital converter is selected as the output result of the analog-to-digital conversion device.

[0011] In a second aspect of the present application, according to an embodiment, an analog-to-digital conversion method is provided, comprising: providing a first analog-to-digital converter for converting a first analog input signal into a first digital output signal; providing a second analog-to-digital converter for converting the first analog input signal into a second digital output signal, wherein a sampling rate of the second analog-to-digital conversion is greater than a sampling rate of the first analog-to-digital converter; performing a differential calculation on the second digital output signal, and comparing the differential calculation result with a threshold; and based on the comparison result, selecting the first digital output signal or the second digital output signal as the output signal.

[0012] Further, the step of selecting the first digital output signal or the second digital output signal as the output signal based on the comparison result includes: when the differential calculation result is greater than or equal to the threshold, selecting the second digital output signal output by the second analog-to-digital converter as the output signal; when the differential calculation result is less than the threshold, selecting the first digital output signal output by the first analog-to-digital converter as the output signal.

[0013] Further, a threshold adjustment step is included before the step of performing a differential calculation on the second digital output signal and comparing the differential calculation result with the threshold, and the threshold adjustment step includes: calculating the probability of currently selecting the second digital output signal output by the second analog-to-digital converter as the output signal, and when the probability of currently selecting the second digital output signal output by the second analog-to-digital converter as the output signal is greater than or equal to the first probability, lowering the threshold in the threshold comparator; and when the probability of currently selecting the second digital output signal output by the second analog-to-digital converter as the output signal is less than the first probability, increasing the threshold in the threshold comparator.

[0014] Further, the calculation of the probability of currently selecting the second digital output signal output by the second analog-to-digital converter as the output signal includes: storing the probability of each previous selection of the second digital output signal as the output signal, storing a second total number of times the second digital output signal is selected as the output signal, storing a first total number of times the first digital output signal output by the first analog-to-digital converter is selected as the output signal, and obtaining the probability of currently selecting the second digital output signal as the output signal based on the probability of each previous selection, the first total number of times and the second total number of times.

[0015] In a third aspect of the present application, according to an embodiment, an electronic device is provided, comprising: a memory; and a processor connected to the memory, wherein instructions are stored in the memory, and when the instructions are executed by the processor, the electronic device executes the above method.

[0016] In a fourth aspect of the present application, according to an embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and the program implements the above method when executed by a processor.

[0017] In a fifth aspect of the present application, according to one embodiment, a computer program product is provided, comprising instructions, which, when executed by a processor, lead to the implementation of the above method.

[0018] The above is a fairly broad overview of the features and technical advantages of the present application, so that the following detailed description of the present application can be better understood. The additional features and advantages of the present application will be described below, and they form the subject matter of the claims of the present application. It will be appreciated by those skilled in the art that the disclosed concepts and specific embodiments can be easily utilized as the basis for modifying or designing other structures or processes for realizing the same purpose of the present application. It will also be appreciated by those skilled in the art that such equivalent constructions do not depart from the spirit and scope of the present application as set forth in the appended claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more fully understand the present application and its advantages, reference is now made to the following description in conjunction with the accompanying drawings, in which:

[0020] Figure 1 shows a schematic block diagram of a first-order Σ-Δ ADC;

[0021] Figure 2 A schematic diagram of the structure of an analog-to-digital conversion device provided in an embodiment of the present application is shown;

[0022] Figure 3 A structural block diagram of an analog-to-digital conversion device provided by another embodiment of the present application is shown;

[0023] Figure 4 A schematic flow chart of an analog-to-digital conversion method provided by an embodiment of the present application is shown; and

[0024] Figure 5 A schematic flowchart of a threshold adjustment method provided in an embodiment of the present application is shown.

[0025] Corresponding numerals and symbols in the different figures generally refer to corresponding parts unless otherwise indicated.The figures are drawn to clearly illustrate the relevant aspects of the various embodiments and are not necessarily drawn to scale. DETAILED DESCRIPTION

[0026] The following will be combined with the accompanying drawings to clearly and completely describe the technical solutions in this application. Obviously, the described embodiments are part of the embodiments of this application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0027] The system for measuring battery power generally includes sensors, analog front end (AFE) and analog-to-digital converter (ADC). The sensor is used to obtain input signals representing the physical state of the outside world and convert them into analog signals. For example, the temperature sensor obtains input signals representing the temperature state and converts them into temperature analog signals, and the voltage sensor obtains input signals representing voltage and converts them into voltage analog signals.

[0028] The AFE processes the analog signal received from the sensor appropriately so that the processed analog signal is within the acceptable range of the ADC. The AFE can amplify, filter, attenuate and / or perform other processing operations on the analog signal. The AFE can act as an interface between the sensor and the analog-to-digital converter, providing the processed analog signal to the ADC for conversion. The ADC outputs a digital signal converted into digital form. The digital signal represents the physical quantity received by the sensor through the input signal.

[0029] The ADC converts the analog signal pre-processed by the AFE into a stable digital stream. It is an important link and design key in battery fuel measurement applications. Generally, analog-to-digital converters include two categories: Nyquist ADCs and oversampling ADCs. The sampling frequency of the Nyquist ADC is generally 1.5-10 times the Nyquist rate, that is, 3-20 times the input signal frequency. An oversampling ADC is a converter that runs faster than the Nyquist rate of the input signal (usually 10-512 times faster) and improves the output signal-to-noise ratio (SNR) by filtering out quantization noise that is not within the signal bandwidth. Oversampling ADCs have the characteristics of high precision and low speed, while Nyquist ADCs run faster sampling speeds but have lower precision. Common Nyquist ADCs include successive approximation register (SAR) ADCs, Flash ADCs, and Pipeline ADCs. Oversampling ADCs include Sigma-Delta ADCs (Σ-ΔADCs).

[0030] Figure 1 An example block diagram of a first-order Σ-Δ ADC is shown. The first-order Σ-Δ ADC includes an adder, an integrator, a quantizer, a sampling filter, and a digital-to-analog converter (DAC). The Σ-Δ ADC can convert an input signal Vin into a continuous digital signal Dout of 1s and 0s at a rate determined by a sampling clock frequency.

[0031] In this ADC, the adder is input by the input signal and the feedback signal, and the output of the DAC is subtracted from the input signal. The DAC is driven by the serial output data stream to generate the feedback signal. The integrator can integrate the output of the adder, and the output of the integrator goes to the quantizer.

[0032] The integrator plays the role of providing quantization noise shaping. The quantization noise of the analog-to-digital conversion is modulated and shaped, moving from low frequency to high frequency.

[0033] Quantizers of different bit numbers compare the signal and convert it into a data stream. Specifically, for a zero input signal, the quantizer output can include approximately equal numbers of 1s and 0s. For positive input voltages, the quantizer output contains more 1s than 0s. For negative input voltages, the quantizer output contains more 0s than 1s. The output of the quantizer is applied to a decimation filter for averaging.

[0034] The decimation filter filters the data stream to obtain a relatively high conversion resolution and reduces the effective sampling rate at the output to the sampling rate.

[0035] In one embodiment, the integrator may be composed of a switched capacitor filter and an operational amplifier, the quantizer may be composed of a trigger and a comparator, and the outputs of the switched capacitor filter and the operational amplifier are sampled and then first-order differential is performed to generate a digital output.

[0036] In order to resolve the contradiction between high precision and high speed of analog-to-digital converters, the present application introduces a mechanism to couple two analog-to-digital converters to achieve fast sampling with medium precision and slow sampling with high precision.

[0037] According to an embodiment of the present application, Figure 2 FIG. 1 shows a schematic diagram of the structure of an analog-to-digital conversion device. Figure 2 As shown, the analog-to-digital conversion device 10 may have a first input terminal Vinp and a second input terminal Vinn, and include two analog-to-digital converters 101, 102 operating simultaneously with a combined input and output. The first analog-to-digital converter 101 is configured to receive an analog input signal from the first input terminal Vinp and the second input terminal Vinn and generate a corresponding first digital output signal. The first analog-to-digital converter may be a low sampling rate high-precision analog-to-digital converter.

[0038] A second analog-to-digital converter 102, which is independent of the first analog-to-digital converter 101 (the two analog-to-digital converters 101, 102 can operate independently of each other), has a second input coupled to the first input terminal Vinp and the second input terminal Vinn, and is configured to receive an analog input signal from the first input terminal Vinp and the second input terminal Vinn and generate a corresponding second digital output signal independent of the first digital output signal. The second analog-to-digital converter can be an analog-to-digital converter with a high sampling rate and low precision. In some examples, the analog-to-digital converters 101, 102 operate simultaneously, and the sampling rate of the second analog-to-digital converter is greater than the sampling rate of the first analog-to-digital converter.

[0039] As an example, the first analog-to-digital converter is an oversampling analog-to-digital converter or an integrating analog-to-digital converter. The second analog-to-digital converter may be a SAR analog-to-digital converter, a Flash analog-to-digital converter, or a Pipeline analog-to-digital converter.

[0040] Further, the analog-to-digital converter 200 also includes a differentiator 104, a threshold comparator 106, and a selector 108. The differentiator 104 is configured to receive the output result of the second analog-to-digital converter 102, that is, the second digital output signal, and perform differential calculation on the current digital output signal and the previous digital output signal, and then output the calculation result to the threshold comparator 106. It should be pointed out that the arrangement of the differentiator shown in the figure is only exemplary, and the differentiator can also be arranged at other positions in the circuit, or connected to the second analog-to-digital converter in other ways, as long as it can perform relevant calculations on the digital output signal.

[0041] The threshold comparator 106 is configured to compare the differential calculation result with a set threshold value, and output the comparison result to the selector 108. The selector 108 is configured to select the first digital output signal or the second digital output signal as the output signal Dout at the output end of the analog-to-digital conversion device 10 based on the comparison result. Specifically, in one embodiment, when the differential calculation result is greater than or equal to the set threshold value, the selector 108 selects the second digital output signal of the second analog-to-digital converter as the output signal Dout of the analog-to-digital conversion device; when the differential calculation result is less than the threshold value, the selector 108 selects the first digital output signal of the first analog-to-digital converter as the output signal Dout of the analog-to-digital conversion device.

[0042] In this embodiment, the threshold may be a preset threshold, and the threshold remains unchanged during the entire sampling process of analog-to-digital conversion. However, the user may manually set to change the threshold.

[0043] In other embodiments, the analog-to-digital conversion device 10 can also set the threshold value through a self-learning algorithm built into the digital circuit. The circuit will store historical data from the slow and fast ADCs and dynamically change the threshold value in combination with user preferences.

[0044] The analog-to-digital conversion device 10 also includes a threshold adjuster 200. The threshold adjuster 200 is configured to receive the first digital output signal and the second digital output signal, and store the historical data of the first and second digital output signals being used as the output signal Dout. Based on the historical data and the built-in learning algorithm, the threshold adjuster 200 outputs the threshold adjustment signal to the threshold comparator 106 to adjust the set threshold.

[0045] In one embodiment, the learning algorithm in the threshold adjuster 200 is represented by the following formula:

[0046]

[0047] Wherein, p(k) is the probability of selecting the second analog-to-digital converter in the kth (current) sampling, nf and ns are the total number of times the second analog-to-digital converter and the first analog-to-digital converter are selected in the 1st to k-1th sampling, nf is the second total number of times the second digital output signal output by the second analog-to-digital converter was selected as the output signal, ns is the first total number of times the first digital output signal output by the first analog-to-digital converter was selected as the output signal, α is the coefficient for adjusting the strength of historical dependence, and p(0)=1, and α ranges from 0 to 1.

[0048] After the probability p(k) of selecting the second analog-to-digital converter is calculated according to formula (1), the threshold adjustment can be expressed as follows:

[0049] t(k)=t(k-1)+{p(k)>0.5-1:+1}, (2)

[0050] Wherein, t(k) is the threshold value for the kth sampling, and t(k-1) is the threshold value for the k-1th sampling. If the value of p(k) is greater than the first probability (50%), it may be decided to lower or increase the threshold value. The threshold value is recalculated after each sampling. In this embodiment, the first probability is 50%. In other embodiments, the first probability may be set according to user preference, such as 40%, 60%, 65%, etc.

[0051] In one embodiment, the threshold adjuster 200 is configured to lower the threshold in the threshold comparator 106 when the probability of currently selecting the second analog-to-digital converter is greater than or equal to 50%; and to increase the threshold in the threshold comparator 106 when the probability of currently selecting the second analog-to-digital converter is less than 50%.

[0052] Furthermore, the first analog-to-digital converter 101 and the second analog-to-digital converter 102 may also have a timer interface connected to the timer CLK. When the differential calculation result is greater than or equal to the set threshold value, the selector 108 selects the second digital output signal of the second analog-to-digital converter as the output signal Dout of the analog-to-digital conversion device, and the timer is started. During the entire timing process, the selector 108 keeps selecting the second digital output signal as the output signal Dout until the timer ends.

[0053] Compared to conventional high-precision, low-speed oversampling analog-to-digital converters and low-precision, high-speed SAR analog-to-digital converters, Flash analog-to-digital converters or Pipeline analog-to-digital converters, in an embodiment of the present application, two analog-to-digital converters are coupled, and the sampling rate can be dynamically changed according to the input signal characteristics and user input to achieve medium-precision fast sampling and high-precision slow sampling. In addition, the user or the circuit itself can decide which type of analog-to-digital converter to use. The decision is made by the threshold comparator based on the differential result. The user can manually set the threshold, or the threshold can be determined by the built-in learning algorithm of the threshold adjuster. Such flexible configuration can make the analog-to-digital conversion device of the present application more intelligent and have better adaptability under various working conditions.

[0054] Figure 3 FIG. 2 shows a schematic diagram of the structure of an analog-to-digital conversion device according to another embodiment of the present application. Figure 3 As shown, the analog-to-digital conversion device 20 includes a first analog-to-digital converter 101 and a second analog-to-digital converter 102, a differentiator 104 and a threshold comparator 106 that operate independently. Their functions are similar to those of Figure 1 The analog-to-digital conversion device 10 described in the above is the same as that described in the above, and will not be described in detail here. The selector can be implemented as various appropriate components, such as Figure 3 The selection switch S0 is shown in FIG. The selection switch S0 is in different selection states according to the comparison result output by the threshold comparator 106 , thereby realizing the switching of the output signal Dout between the first digital output signal and the second digital output signal.

[0055] The analog-to-digital conversion device 20 further includes a calibration device for calibrating the output result of the analog-to-digital converter. The calibration device includes a calibration switch S2, a first compensation calibrator 108, and a second compensation calibrator 110. Figure 3 As shown, the switch S2 is connected between the first input terminal Vinp and the second input terminal Vinn of the analog-to-digital conversion device 20, the first compensation calibrator 108 is connected between the first analog-to-digital converter 101 and the first digital signal output terminal 204, and the second compensation calibrator 110 is connected between the second analog-to-digital converter 102 and the second digital signal output terminal 206. The calibration device uses the calibrated or compensated output signal of the first analog-to-digital converter 101 as the first output digital signal, and uses the calibrated or compensated output signal of the second analog-to-digital converter 102 as the second output digital signal, so as to improve the data conversion accuracy of the analog-to-digital conversion device 20.

[0056] Further, if Figure 3As shown, the analog-to-digital conversion device 20 further includes a first switch S1A connected between the first input terminal Vinp and the first signal input terminal of the first analog-to-digital converter 101 (or the first signal input terminal of the second analog-to-digital converter 102), and a second switch S1B connected between the second input terminal Vinn and the second signal input terminal of the first analog-to-digital converter 101 (the second signal input terminal of the second analog-to-digital converter 102). The switches S1A and S1B are used to turn on or off the analog input signal from the first input terminal Vinp and the second input terminal Vinn.

[0057] Figure 4 A schematic flow chart of an analog-to-digital conversion method provided in an embodiment of the present application is shown. Figure 4 The flowchart shown is only an example, which should not unduly limit the scope of the claims. Those skilled in the art will recognize many variations, substitutions, and modifications. For example, Figure 4 The various steps shown in the drawings may be added, removed, substituted, rearranged, and repeated.

[0058] Return to reference Figure 2 The analog-to-digital conversion device shown in the figure comprises a first analog-to-digital converter 101, a second analog-to-digital converter 102, a differentiator 104, a threshold comparator 106 and a selector 108. In one embodiment, the analog-to-digital conversion method comprises the following steps:

[0059] In step 402, a first analog-to-digital converter is provided for converting a first analog input signal into a first digital output signal.

[0060] At step 404, a second analog-to-digital converter is provided for converting the first analog input signal into a second digital output signal.

[0061] In step 406, a differentiator is used to perform a differential calculation on the second digital output signal, and the differential calculation result is compared with a threshold value.

[0062] In step 408 , the selector selects the first digital output signal or the second digital output signal as the output signal based on the comparison result.

[0063] In one embodiment, the sampling rate of the second analog-to-digital converter is greater than the sampling rate of the first analog-to-digital converter. In some embodiments, the first analog-to-digital converter is an oversampling analog-to-digital converter or an integrating analog-to-digital converter. The second analog-to-digital converter can be a SAR analog-to-digital converter, a Flash analog-to-digital converter, or a Pipeline analog-to-digital converter.

[0064] By using the above method, the two analog-to-digital converters are coupled, so that the analog-to-digital conversion device can achieve medium-precision fast sampling and high-precision slow sampling. In addition, the sampling rate of the analog-to-digital conversion device can be dynamically changed according to a set threshold.

[0065] In one embodiment, step 408 includes: when the differential calculation result is greater than or equal to the threshold, selecting the second digital output signal output by the second analog-to-digital converter as the output signal; when the differential calculation result is less than the threshold, selecting the first digital output signal output by the first analog-to-digital converter as the output signal.

[0066] In one embodiment, the method further includes step 410. After selecting the second digital output signal output by the second analog-to-digital converter as the output signal in step 408, step 410 is performed. In step 410, a timer is started, and during the timing, the second digital output signal is maintained as the output signal until the timing ends.

[0067] Return to reference Figure 3 The analog-to-digital conversion device shown in the figure comprises a first analog-to-digital converter 101, a second analog-to-digital converter 102, a differentiator 104, a threshold comparator 106 and a selection switch S0. The analog-to-digital conversion device also comprises a first switch S1A, a second switch S1B, a calibration switch S2, a first compensation calibrator 108 and a second compensation calibrator 110.

[0068] In one embodiment, the method further includes step 405 before step 406 and after step 404. Step 405 includes: calibrating the first analog-to-digital converter and using the calibrated digital output signal as the first digital output signal, and calibrating the second analog-to-digital converter and using the calibrated digital output signal as the second digital output signal.

[0069] Specifically, as an example, refer to Figure 3 First, open the first switch S1A and the second switch S1B, and close the calibration switch S2. Run the first and second analog-to-digital converters, and store the output signals of the first and second analog-to-digital converters in the first compensation calibrator and the second compensation calibrator as the first compensation signal and the second compensation signal. Secondly, close the first switch S1A and the second switch S1B, and open the calibration switch S2. Run the first and second analog-to-digital converters again, and subtract the first compensation signal from the output signal of the first analog-to-digital converter as the first digital output signal, and subtract the second compensation signal from the output signal of the second analog-to-digital converter as the second digital output signal.

[0070] In addition to being preset by the user, the threshold in the threshold comparator 106 can also be determined by a learning algorithm based on historical data and decide which type of analog-to-digital converter to use. Learning from historical data can make better decisions in the future. Figure 5 A method for adjusting a threshold value provided by an embodiment of the present application is shown. Figure 5 The flowchart shown is only an example, which should not unduly limit the scope of the claims. Those skilled in the art will recognize many variations, substitutions, and modifications. For example, Figure 5 The various steps shown in the drawings may be added, removed, replaced, rearranged and repeated. Return to Reference Figure 2 or Figure 3 In one embodiment, the threshold adjustment method includes the following steps:

[0071] In step 502, the probability of currently selecting the second digital output signal output by the second analog-to-digital converter as the output signal is calculated.

[0072] In step 504, when the probability of currently selecting the second digital output signal output by the second analog-to-digital converter as the output signal is greater than or equal to the first probability, the threshold in the threshold comparator is lowered.

[0073] In step 506, when the probability of currently selecting the second digital output signal output by the second analog-to-digital converter as the output signal is less than the first probability, the threshold in the threshold comparator is increased.

[0074] In one embodiment, steps 502 to 506 are performed in Figure 4 The process is shown as being performed before step 406 and after step 404 .

[0075] In one embodiment, step 502 further includes the following steps:

[0076] In step 5022, the probability of selecting the second digital output signal as the output signal each time before is stored.

[0077] In step 5024, a second total number of times the second digital output signal is previously selected as the output signal is stored.

[0078] In step 5026, a first total number of times that the first digital output signal output by the first analog-to-digital converter is previously selected as the output signal is stored.

[0079] In step 5028, based on the probability of each previous time, the first total number of times and the second total number of times, the probability of currently selecting the second digital output signal as the output signal is obtained.

[0080] According to some embodiments of the present disclosure, an electronic device is provided, comprising: a processor, a memory, and computer instructions stored in the memory and executable on the processor, such as analog-to-digital conversion operation instructions. When the processor executes the instructions, the method of any embodiment described in the present application is implemented.

[0081] According to some embodiments of the present disclosure, a computer-readable storage medium is provided, on which instructions or computer programs are stored. When the instructions or computer programs are executed by a processor, the method of any embodiment described in the present application is implemented.

[0082] According to some embodiments of the present disclosure, a computer program product is provided, comprising instructions, which, when executed by a processor, implement the method of any embodiment described in the present disclosure.

[0083] Although the embodiments of the present application and its advantages have been described in detail, it should be understood that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the application as defined by the appended claims.

[0084] In addition, the scope of the present application is not limited to the specific embodiments of the processes, machines, manufactures, material compositions, modes, methods, and steps described in this specification. Those skilled in the art will readily understand from the disclosure of the present application that, according to the present application, currently existing or later to be developed processes, machines, manufactures, material compositions, modes, methods, or steps that perform substantially the same functions or achieve substantially the same results as the corresponding embodiments described herein may be utilized. Therefore, it is intended that the appended claims include such processes, machines, manufactures, material compositions, modes, methods, or steps within their scope.

Claims

1. An analog-to-digital conversion device, characterized in that: include: a first analog-to-digital converter; a second analog-to-digital converter, wherein a sampling rate of the second analog-to-digital converter is greater than a sampling rate of the first analog-to-digital converter; a threshold comparator, configured to receive an output result of the second analog-to-digital converter and compare it with a threshold; as well as The selector is configured to receive a comparison result of the threshold comparator to select an output result of the first analog-to-digital converter or the second analog-to-digital converter as an output result of the analog-to-digital conversion device.

2. The analog-to-digital conversion device according to claim 1, characterized in that: Also includes: The differentiator is connected between the second analog-to-digital converter and the threshold comparator, and is configured to perform a differential calculation on the output result of the second analog-to-digital converter, and input the differential calculation result into the threshold comparator to compare with the threshold.

3. The analog-to-digital conversion device according to claim 1, characterized in that: The selector is configured to select the output result of the second analog-to-digital converter as the output result of the analog-to-digital conversion device when the differential calculation result is greater than or equal to the threshold; and to select the output result of the first analog-to-digital converter as the output result of the analog-to-digital conversion device when the differential calculation result is less than the threshold.

4. The analog-to-digital conversion device according to any one of claims 1 to 3, characterized in that: Also includes: The threshold adjuster is configured to output an adjustment result to the threshold comparator to adjust the threshold based on the output result of the first analog-to-digital converter, the output result of the second analog-to-digital converter and a learning algorithm.

5. The analog-to-digital conversion device according to claim 4, characterized in that: The learning algorithm includes the probability of currently selecting the output result of the second analog-to-digital converter as the output result of the analog-to-digital conversion device, and the probability is calculated based on the probability of previously selecting the output result of the second analog-to-digital converter as the output result of the analog-to-digital conversion device, the total number of times the output result of the first analog-to-digital converter is selected as the output result of the analog-to-digital conversion device, and the total number of times the output result of the second analog-to-digital converter is selected as the output result of the analog-to-digital conversion device.

6. The analog-to-digital conversion device according to claim 5, characterized in that: The threshold adjuster is configured to lower the threshold in the threshold comparator when the probability of currently selecting the output result of the second analog-to-digital converter as the output result of the analog-to-digital conversion device is greater than or equal to the first probability; and to increase the threshold in the threshold comparator when the probability of currently selecting the output result of the second analog-to-digital converter as the output result of the analog-to-digital conversion device is less than the first probability.

7. The analog-to-digital conversion device according to any one of claims 1-3, 5-6, characterized in that: Also includes: A first compensation calibrator, connected to the output end of the first analog-to-digital converter, and used to compensate for the output result of the first analog-to-digital converter; as well as The second compensation calibrator is connected to the output end of the second analog-to-digital converter and is used to compensate the output result of the second analog-to-digital converter.

8. The analog-to-digital conversion device according to claim 1, characterized in that: Also includes: A calibration switch is connected between the first input terminal and the second input terminal of the analog-to-digital conversion device.

9. An analog-to-digital conversion method, characterized in that: include: providing a first analog-to-digital converter for converting a first analog input signal into a first digital output signal; Providing a second analog-to-digital converter for converting the first analog input signal into a second digital output signal, wherein a sampling rate of the second analog-to-digital conversion is greater than a sampling rate of the first analog-to-digital converter; performing a differential calculation on the second digital output signal, and comparing the differential calculation result with a threshold value; and Based on the comparison result, the first digital output signal or the second digital output signal is selected as the output signal.

10. The analog-to-digital conversion method according to claim 9, characterized in that: The step of selecting the first digital output signal or the second digital output signal as the output signal based on the comparison result comprises: When the differential calculation result is greater than or equal to the threshold, selecting the second digital output signal output by the second analog-to-digital converter as the output signal; When the differential calculation result is less than the threshold, the first digital output signal output by the first analog-to-digital converter is selected as the output signal.

11. The analog-to-digital conversion method according to claim 9, characterized in that: Before the step of performing differential calculation on the second digital output signal and comparing the differential calculation result with the threshold, a threshold adjustment step is also included, and the threshold adjustment step includes: Calculating the probability of currently selecting the second digital output signal output by the second analog-to-digital converter as the output signal, and when the probability of currently selecting the second digital output signal output by the second analog-to-digital converter as the output signal is greater than or equal to the first probability, lowering the threshold in the threshold comparator, and When the probability of currently selecting the second digital output signal output by the second analog-to-digital converter as the output signal is less than the first probability, the threshold in the threshold comparator is increased.

12. The analog-to-digital conversion method according to claim 11, characterized in that: The calculating of the probability of currently selecting the second digital output signal output by the second analog-to-digital converter as the output signal comprises: storing the probability of selecting the second digital output signal as the output signal each time before, storing a second total number of times the second digital output signal was previously selected as an output signal, storing a first total number of times the first digital output signal output by the first analog-to-digital converter was previously selected as the output signal, and Based on the probability of each previous time, the first total number of times and the second total number of times, the probability of currently selecting the second digital output signal as the output signal is obtained.

13. The analog-to-digital conversion method according to any one of claims 10 to 12, characterized in that: After the step of selecting the second digital output signal output by the second analog-to-digital converter as the output signal when the differential calculation result is greater than or equal to the threshold, the method further includes: The timer is started, and during the timing period, the second digital output signal is maintained as the output signal until the timing ends.

14. The analog-to-digital conversion method according to any one of claims 9 to 12, characterized in that: Before the step of performing differential calculation on the second digital output signal and comparing the differential calculation result with the threshold, the method further includes: The first analog-to-digital converter is calibrated and the calibrated digital output signal is used as the first digital output signal, and the second analog-to-digital converter is calibrated and the calibrated digital output signal is used as the second digital output signal.

15. An electronic device, characterized in that: include: Memory; as well as A processor connected to a memory, wherein instructions are stored in the memory, and when the instructions are executed by the processor, the electronic device executes the analog-to-digital conversion method as described in any one of claims 9 to 14.

16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the analog-to-digital conversion method according to any one of claims 9 to 14 is implemented.

17. A computer program product, characterized in that: The method comprises instructions which, when executed by a processor, implement the analog-to-digital conversion method according to any one of claims 9 to 14.