SAR ADC calibration method, module and device
Through the analog annealing algorithm, the signal-to-noise distortion ratio and capacitance weight are optimized, and the accuracy reduction problem of SAR ADC due to capacitance error is solved, an efficient calibration process is achieved, and the performance and accuracy of SAR ADC are improved.
Patent Information
- Application Number
- CN202410883715.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-03
- Publication Date
- 2024-11-15
AI Technical Summary
The accuracy reduction of SAR ADC is mainly due to capacitance errors caused by process deviations, which causes the capacitor array to fail to achieve the ideal capacitance weight, which in turn affects its performance.
Using analog annealing algorithm to optimize signal-to-noise distortion ratio (SNDR), through time-frequency conversion and INL testing, the optimal capacitance weight is solved, and internal cycles are performed at each temperature to ensure calibration effect. OTP or eFuse is used for one-time use. Memory writes calibration results.
It greatly reduces the hardware resources required for calibration, avoids complex algorithms and circuit changes, improves the static and dynamic performance of SAR ADC, and can be used for calibration of other frequencies after data is collected at a single frequency point, improving accuracy.
Smart Images

Figure CN118971879A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of SAR ADC, and in particular to a SAR ADC calibration method, module and device. Background Art
[0002] Many signals in nature, such as sound, temperature, and pressure signals, exist in analog form. Analog signals are susceptible to noise interference during transmission, while digital signals have strong anti-interference capabilities and are easily stored, transmitted, and processed by computers and digital dedicated chips. In the process of signal processing, the analog-to-digital converter (ADC) is a key device that converts analog signals into digital signals.
[0003] SAR ADC (SAR ADC, Successive Approximation Register ADC) uses a binary approximation algorithm to approximate the input analog value to obtain the output digital code, which is suitable for medium-speed, medium-to-high-precision applications. SAR ADC is mainly composed of a sample-and-hold circuit, a comparator, a digital-to-analog converter (DAC, Digital-to-Analog Converter), control logic and registers, such as Figure 1 As shown. SAR ADC has many digital structures and a high degree of digitization, so its power consumption is low, which has attracted a lot of research. However, although SAR ADC has a simple structure and low power consumption, it is difficult to achieve a higher number of effective bits or a better figure of merit. This is due to the influence of various non-ideal factors in the SAR ADC structure, which reduces the accuracy of the ADC. The main reason for the reduction in SAR ADC accuracy is that the process deviation causes capacitance error, which makes the capacitor array unable to achieve the ideal capacitance weight. Therefore, a SAR ADC calibration method is needed to solve the problem of SAR ADC performance degradation caused by capacitance error. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a SAR ADC calibration method, module and device, which can specifically solve the problem of SAR ADC performance degradation caused by capacitance error.
[0005] The technical solution adopted by the present invention to solve the technical problem is: to provide a SAR ADC calibration method, comprising the following steps:
[0006] S0 samples the output code of the SAR ADC to obtain a code value sequence;
[0007] S1 performs time-frequency transformation on the code value sequence, and calculates an initial signal-to-noise-distortion ratio based on the obtained spectrum data;
[0008] S2 uses a simulated annealing algorithm to solve the optimal capacitance weight that enables the SARADC to obtain the optimal signal-to-noise-distortion ratio based on the ideal capacitance weight and the initial signal-to-noise-distortion ratio, and performs an INL test on the optimal capacitance weight obtained at the current temperature after the inner loop at each temperature is completed.
[0009] Further, step S2 includes:
[0010] S201 sets the initial temperature, end temperature, cooling rate and number of internal cycles;
[0011] S202: setting the current optimal capacitance weight as the ideal capacitance weight, setting the current optimal signal-to-noise-distortion ratio as the initial signal-to-noise-distortion ratio, and setting the current temperature as the initial temperature;
[0012] S203 for any current temperature:
[0013] The neighborhood perturbation formula is used to calculate the new solution capacitance weight, and then the new solution signal-to-noise distortion ratio is calculated;
[0014] Comparing the newly solved signal-to-noise-distortion ratio with the currently solved optimal signal-to-noise-distortion ratio, if the newly solved signal-to-noise-distortion ratio is greater than the currently solved optimal signal-to-noise-distortion ratio, updating the currently solved optimal capacitance weight and the currently solved optimal signal-to-noise-distortion ratio to the newly solved capacitance weight and the newly solved signal-to-noise-distortion ratio, respectively; otherwise, updating the currently solved optimal capacitance weight and the currently solved optimal signal-to-noise-distortion ratio based on the metropolis criterion;
[0015] Based on the current optimal capacitance weight, calculating the INL of the SAR ADC and determining whether a preset condition is met, and if so, saving the current optimal capacitance weight as an alternative optimal capacitance weight;
[0016] Determine whether the inner loop times are reached, if not, return to the step of using the neighborhood perturbation formula to calculate and obtain a new solution capacitance weight, otherwise, execute step S204;
[0017] S204 causes the temperature to decrease according to the cooling rate. If the temperature after the decrease is greater than the end temperature, the process returns to step S203. Otherwise, one of the candidate optimal capacitance weights is selected as the optimal capacitance weight.
[0018] Furthermore, the neighborhood perturbation formula is:
[0019] W_new=W_current*(1+search_step*(2*rand(1)-1))
[0020] Wherein, W_new is the newly solved capacitance weight, W_current is the current capacitance weight, serach_step is the search step length, and rand(1) is a random number between 0 and 1.
[0021] Further, the updating the current optimal capacitance weight and the current optimal signal-to-noise-distortion ratio based on the metropolis criterion includes:
[0022] The update probability P is calculated according to the following formula:
[0023]
[0024] Among them, SNDR_current is the current optimal signal-to-noise-distortion ratio, SNDR_new is the new signal-to-noise-distortion ratio, and T is the current temperature.
[0025] Furthermore, the signal-to-noise-distortion ratio of the SAR ADC is calculated by the following formula:
[0026]
[0027] Wherein, SNDR is the signal-to-noise-distortion ratio, P signal is the signal power, P noise is the noise power, P distortion is the distortion power.
[0028] Furthermore, the code value sequence corresponds to a SAR ADC input signal of the same frequency.
[0029] Furthermore, the method further includes repeating step S2 to obtain a plurality of the optimal capacitance weights, and taking the optimal capacitance weight that makes the signal-to-noise distortion ratio the highest as the optimal capacitance weight of the SAR ADC.
[0030] Furthermore, the time-frequency transformation is achieved by fast Fourier transformation.
[0031] The present invention also provides a SAR ADC calibration module, comprising:
[0032] The acquisition module is used to sample the output code of the SAR ADC to obtain a code value sequence;
[0033] A processing module, used for performing time-frequency transformation on the code value sequence and calculating an initial signal-to-noise-distortion ratio based on the obtained spectrum data;
[0034] The calibration module is used to solve the optimal capacitance weight for obtaining the optimal signal-to-noise-distortion ratio of the SAR ADC based on the ideal capacitance weight and the initial signal-to-noise-distortion ratio by using a simulated annealing algorithm, and perform an INL test on the optimal capacitance weight obtained at the current temperature after the inner loop at each temperature is completed.
[0035] The present invention also provides a SAR ADC calibration device, comprising a SAR ADC, the calibration module as described above, and a writing module for calibrating the SAR ADC through OTP or eFuse according to the optimal capacitance weight generated by the calibration module.
[0036] Beneficial Effects
[0037] Due to the adoption of the above technical solution, the present invention has the following advantages and positive effects compared with the prior art:
[0038] (1) The present invention greatly reduces the calibration circuit hardware resources required in the traditional algorithm, avoids the complex algorithm and circuit in the background calibration algorithm, does not require any changes to the analog circuit structure, and does not require the slow and accurate ramp signal of the traditional foreground calibration method. It only requires a small-capacity one-time memory, and calibration only needs to be performed when the chip is powered on for the first time;
[0039] (2) The present invention applies a simulated annealing algorithm to calibration, and after the inner loop at each temperature is completed, an INL test is performed on the optimal capacitance weight obtained at the current temperature, which has a higher probability of finding a global optimal weight solution with excellent static and dynamic performance, rather than a local optimum;
[0040] (3) The calibration process of the present invention only needs to collect data at a single frequency point to extract the weight, and the extracted weight can be used for data calibration at other different frequency points. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 is a flow chart of a first embodiment of the present invention;
[0042] Figure 2 is a simulation diagram of the first embodiment of the present invention;
[0043] Figure 3 is a schematic diagram of SNDR and SFDR calibration according to the first embodiment of the present invention;
[0044] Figure 4 It is a schematic structural diagram of a third embodiment of the present invention. DETAILED DESCRIPTION
[0045] The present invention will be further described below in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms fall within the scope limited by the appended claims of the application equally.
[0046] The first embodiment of the present invention relates to a SAR ADC capacitance weight calibration method based on a simulated annealing algorithm. When there is an error in the capacitor, it exhibits non-ideal dynamic and static characteristics, and the performance of the analog-to-digital converter deteriorates. Therefore, the capacitance weight can be adjusted to improve the performance caused by the capacitance error. This can be abstracted as an optimization problem. By continuously optimizing the capacitance weight to optimize the performance, the effect of performance improvement can be achieved, thereby realizing the extraction and calibration of the capacitance error. This scheme chooses to optimize the dynamic performance parameter signal-to-noise-and-Distortion Ratio (SNDR), and writes SNDR as a function of the capacitance weight as shown in formula (1), where W 1 ,W 2 …W n The capacitance weight is optimized for each bit so that the SNDR gradually searches for a good value to achieve a calibration effect.
[0047] SNDR = f(W 1 ,W 2 …W n )#(1)
[0048] code=(W 1 ,W 2 …W n )·(x 1 ,x 2 ,…x n ) T #(2)
[0049] spect_out = FFT(code_N) # (3)
[0050]
[0051] The functional relationship between SNDR and capacitance weight is very complex. The specific relationship is: First, according to the weight W 1 ,W 2 …W n Calculate the original output code code, as shown in formula (2), where x 1 ,x 2 ,…x nis the 1 to n bit value of a single code value obtained by a single conversion; then, the N code values code_N are analyzed and calculated by fast Fourier transform (FFT, Fast Fourier Transform), as shown in formula (3); after obtaining the spectrum, the signal power P is calculated by formula (4) signal , noise power P noise and distortion power P distortion Get the SNDR value.
[0052] It is very difficult to explicitly analyze the functional relationship. At the same time, the optimization of multiple weight numbers also makes the solution space huge. Therefore, this scheme uses a heuristic algorithm to search for weights so that SNDR can be optimized to a relatively good value of merit. This scheme selects a simulated annealing algorithm with good global search capabilities. The algorithm is derived from the principle of solid annealing. During the annealing process, starting from a given initial temperature, it is reduced to the end temperature according to a specific cooling rate. At each temperature, a new solution is generated through neighborhood perturbation, and the current function value is calculated using the new solution and compared with the current optimal solution. Then, the new solution is accepted according to a specific Metropolis criterion to complete a cycle at this temperature. In order to search a larger solution space, multiple cycles are performed at each temperature, with a greater probability of searching for the optimal solution.
[0053] like Figure 1 As shown, the specific steps are as follows:
[0054] First, N data points are sampled at any single frequency point. N should not be too small, otherwise the error information of each capacitor weight cannot be reflected.
[0055] Then, these N data points are put into the simulated annealing weight search algorithm for calculation to obtain the calibrated estimated weights. This step is divided into:
[0056] (1) Initial data acquisition and algorithm parameter initialization. Perform FFT analysis on the N sampled data points and calculate the initial SNDR value. Set the ideal weight as the current weight, record the current weight array as W_current, and use the calculated SNDR as the current SNDR value, record it as SNDR_current, input it into the calibration calculation engine. At the same time, give the initial temperature, record it as T_start, the end temperature, record it as T_end, the cooling rate, record it as α, the number of inner loops, record iter_time, and other parameters for initialization.
[0057] (2) Neighborhood perturbation generates new solutions and Metropolis judgments. Optimization is performed at each temperature, which is the outer loop of the optimization algorithm. Iteration is performed iter_time times at each temperature, which is the inner loop of the optimization algorithm. In each inner loop, a new solution for this inner loop is first obtained through a specific neighborhood perturbation method. When a new solution is generated, only the weight values with a high weight ratio are searched, which can reduce the search time while ensuring the calibration effect. The method used to generate a new solution for neighborhood perturbation is shown in formula (2):
[0058] W_new=W_current*(1+search_step*(2*rand(1)-1))#(5)
[0059] Among them, W_new represents the newly generated solution array, W_current represents the current optimal solution array, the value of serach_step affects the step size of the weighted random search, and rand(1) represents a random number between 0 and 1.
[0060] Then, the SNDR value SNDR_new of the current new solution is calculated by FFT and compared with the SNDR value obtained by the previous optimization. If the newly generated SNDR is larger, the new solution is unconditionally accepted as SNDR_current. If the newly generated SNDR is smaller, the new solution is accepted according to the probability calculated by the metropolis criterion, such as (6), so as to avoid falling into the local optimum as much as possible and search a larger solution space range. Where T is the current temperature.
[0061]
[0062] (3) After the number of inner loops at the same temperature is completed, an INL (Integral Non-Linearity) test is performed. The reason for this is that since the simulated annealing optimization process is performed for the SNDR value, the dynamic performance of the SAR ADC is taken into account. However, when the SNDR is optimized to a larger value, good static performance cannot be guaranteed. In other words, the simulated annealing optimization process for SNDR may cause the optimized weights to "overfit", resulting in poor static performance, even if the SNDR is large. Therefore, at each temperature in the simulated annealing optimization process, when all inner loops are completed, the set of weights that make the SNDR optimal at that temperature is used for INL testing and evaluation. The INL value needs to be calculated during the evaluation. Generally, the INL value within plus or minus 1 indicates good performance. If it is not ideal (the absolute value is greater than 1), the solution is discarded. Otherwise, it is saved as an alternative optimal solution, and then the subsequent loop process is continued. When the inner and outer loops of the entire annealing algorithm are constructed, a set of solutions with good SNDR and good INL are selected from the alternative optimal solutions to make both static performance and dynamic performance better. Due to the randomness of the solution process, an ideal solution may not be found. In this case, as described below, the entire annealing process can be repeated to find a solution.
[0063] (4) Cool down according to the set cooling rate, obtain the next temperature and perform external circulation again until the temperature is lower than the end temperature, completing the optimization process.
[0064] Finally, the weights with excellent static and dynamic performance are optimized and fixed-pointed reasonably, and then burned into the chip through a one-time memory such as OTP (One Time Programmable) or eFuse (electronic fuse), completing the error weight extraction and calibration of the SAR ADC. The output after calibration is shown in formula (7). After calibration, all n weights are W_cali (1*n vector), and the original output is Output_original (1*n vector), where n is the adc resolution.
[0065] Output_cali=W_cali*Output_original T #(7)
[0066] Since the simulated annealing weight search process is a random process, when the temperature is low in a single search, it is easy to fall into a local optimal solution. Therefore, the above process can be repeated and multiple optimizations can be performed to obtain the capacitor weight value that results in the best result.
[0067] like Figure 2As shown in the figure, a 12-bit SAR ADC with 2-bit redundancy is modeled and simulated, and the weights of the first 8 bits of capacitance are optimized and solved, and both the dynamic performance and the static performance are significantly improved. Figure 2 In the figure, Figure (a) and Figure (b) are the spectrum results before and after calibration, SNDR increased from 58.62dB to 73.02dB, SFDR increased from 64.82dB to 92.37dB; Figure (c) and Figure (d) are the static performance DNL / INL test diagrams before and after calibration, DNL increased from 1.1 / -1LSB to 0.41 / 0.54LSB, INL increased from 4.9 / -4.9LSB to 0.79 / -0.79LSB. Figure 3 As shown in the figure, the input signal is sampled at 0 to 0.5 times the sampling frequency, and the SNDR and SFDR are greatly improved at each frequency point.
[0068] The second embodiment of the present invention relates to a SAR ADC capacitance weight calibration module based on a simulated annealing algorithm, which is used to implement the method described in the first embodiment, and specifically includes:
[0069] The acquisition module is used to sample the output code of the SAR ADC to obtain a code value sequence;
[0070] A processing module, used for performing time-frequency transformation on the code value sequence and calculating an initial signal-to-noise-distortion ratio based on the obtained spectrum data;
[0071] The calibration module is used to solve the optimal capacitance weight for the SAR ADC to obtain the optimal signal-to-noise-distortion ratio based on the ideal capacitance weight and the initial signal-to-noise-distortion ratio by using the simulated annealing algorithm, and after the inner loop at each temperature is completed, the INL test is performed on the optimal capacitance weight obtained at the current temperature.
[0072] Among them, the specific steps of the simulated annealing algorithm are as follows:
[0073] First, N data points are sampled at any single frequency point. N should not be too small, otherwise the error information of each capacitor weight cannot be reflected.
[0074] Then, these N data points are put into the simulated annealing weight search algorithm for calculation to obtain the calibrated estimated weights. This step is divided into:
[0075] (1) Initial data acquisition and algorithm parameter initialization. Perform FFT analysis on the N sampled data points and calculate the initial SNDR value. Set the ideal weight as the current weight, record the current weight array as W_current, and use the calculated SNDR as the current SNDR value, record it as SNDR_current, input it into the calibration calculation engine. At the same time, give the initial temperature, record it as T_start, the end temperature, record it as T_end, the cooling rate, record it as α, the number of inner loops, record iter_time, and other parameters for initialization.
[0076] (2) Neighborhood perturbation generates new solutions and Metropolis judgments. Optimization is performed at each temperature, which is the outer loop of the optimization algorithm. Iteration is performed iter_time times at each temperature, which is the inner loop of the optimization algorithm. In each inner loop, a new solution for this inner loop is first obtained through a specific neighborhood perturbation method. When a new solution is generated, only the weight values with a high weight ratio are searched, which can reduce the search time while ensuring the calibration effect. The method used to generate a new solution for neighborhood perturbation is shown in formula (2):
[0077] W_new=W_current*(1+search_step*(2*rand(1)-1))#(5)
[0078] Among them, W_new represents the newly generated solution array, W_current represents the current optimal solution array, the value of serach_step affects the step size of the weighted random search, and rand(1) represents a random number between 0 and 1.
[0079] Then, the SNDR value SNDR_new of the current new solution is calculated by FFT and compared with the SNDR value obtained by the previous optimization. If the newly generated SNDR is larger, the new solution is unconditionally accepted as SNDR_current. If the newly generated SNDR is smaller, the new solution is accepted according to the probability calculated by the metropolis criterion, such as (6), so as to avoid falling into the local optimum as much as possible and search a larger solution space range. Where T is the current temperature.
[0080]
[0081] (3) After the inner loops are completed at the same temperature, an INL (Integral Non-Linearity) test is performed. The reason for this is that since the simulated annealing optimization process is performed for the SNDR value, the dynamic performance of the SAR ADC is taken into account. However, when the SNDR is optimized to a larger value, good static performance cannot be guaranteed. In other words, the simulated annealing optimization process for SNDR may cause the optimized weights to "overfit", resulting in poor static performance, even if the SNDR is large. Therefore, at each temperature of the simulated annealing optimization process, when all the inner loops are completed, an INL test is performed using a set of weights that optimize the SNDR at that temperature, and the test is evaluated to obtain a set of weights obtained during the optimization process with relatively good dynamic and static performance, rather than the final weights obtained after the algorithm ends.
[0082] (4) Cool down according to the set cooling rate, obtain the next temperature and perform external circulation again until the temperature is lower than the end temperature, completing the optimization process.
[0083] A third embodiment of the present invention relates to a SAR ADC capacitance weight calibration device based on a simulated annealing algorithm, such as Figure 4 As shown, it includes a SAR ADC, a calibration module (ie, a simulated annealing calibration engine), and a writing module (ie, otp / eFuse) for calibrating the SAR ADC through OTP or eFuse according to the optimal capacitance weight generated by the calibration module.
[0084] The simulated annealing calibration engine is used to implement the method in the first embodiment, specifically including:
[0085] The acquisition module is used to sample the output code of the SAR ADC to obtain a code value sequence;
[0086] A processing module, used for performing time-frequency transformation on the code value sequence and calculating an initial signal-to-noise-distortion ratio based on the obtained spectrum data;
[0087] The calibration module is used to solve the optimal capacitance weight for the SAR ADC to obtain the optimal signal-to-noise-distortion ratio based on the ideal capacitance weight and the initial signal-to-noise-distortion ratio by using the simulated annealing algorithm, and after the inner loop at each temperature is completed, the INL test is performed on the optimal capacitance weight obtained at the current temperature.
[0088] Among them, the specific steps of the simulated annealing algorithm are as follows:
[0089] First, N data points are sampled at any single frequency point. N should not be too small, otherwise the error information of each capacitor weight cannot be reflected.
[0090] Then, these N data points are put into the simulated annealing weight search algorithm for calculation to obtain the calibrated estimated weights. This step is divided into:
[0091] (1) Initial data acquisition and algorithm parameter initialization. Perform FFT analysis on the N sampled data points and calculate the initial SNDR value. Set the ideal weight as the current weight, record the current weight array as W_current, and use the calculated SNDR as the current SNDR value, record it as SNDR_current, input it into the calibration calculation engine. At the same time, give the initial temperature, record it as T_start, the end temperature, record it as T_end, the cooling rate, record it as α, the number of inner loops, record iter_time, and other parameters for initialization.
[0092] (2) Neighborhood perturbation generates new solutions and Metropolis judgments. Optimization is performed at each temperature, which is the outer loop of the optimization algorithm. Iteration is performed iter_time times at each temperature, which is the inner loop of the optimization algorithm. In each inner loop, a new solution for this inner loop is first obtained through a specific neighborhood perturbation method. When a new solution is generated, only the weight values with a high weight ratio are searched, which can reduce the search time while ensuring the calibration effect. The method used to generate a new solution for neighborhood perturbation is shown in formula (2):
[0093] W_new=W_current*(1+search_step*(2*rand(1)-1))#(5)
[0094] Among them, W_new represents the newly generated solution array, W_current represents the current optimal solution array, the value of serach_step affects the step size of the weighted random search, and rand(1) represents a random number between 0 and 1.
[0095] Then, the SNDR value SNDR_new of the current new solution is calculated by FFT and compared with the SNDR value obtained by the previous optimization. If the newly generated SNDR is larger, the new solution is unconditionally accepted as SNDR_current. If the newly generated SNDR is smaller, the new solution is accepted according to the probability calculated by the metropolis criterion, such as (6), so as to avoid falling into the local optimum as much as possible and search a larger solution space range. Where T is the current temperature.
[0096]
[0097] (3) After the inner loops are completed at the same temperature, an INL (Integral Non-Linearity) test is performed. The reason for this is that since the simulated annealing optimization process is performed for the SNDR value, the dynamic performance of the SAR ADC is taken into account. However, when the SNDR is optimized to a larger value, good static performance cannot be guaranteed. In other words, the simulated annealing optimization process for SNDR may cause the optimized weights to "overfit", resulting in poor static performance, even if the SNDR is large. Therefore, at each temperature of the simulated annealing optimization process, when all the inner loops are completed, an INL test is performed using a set of weights that optimize the SNDR at that temperature, and the test is evaluated to obtain a set of weights obtained during the optimization process with relatively good dynamic and static performance, rather than the final weights obtained after the algorithm ends.
[0098] (4) Cool down according to the set cooling rate, obtain the next temperature and perform external circulation again until the temperature is lower than the end temperature, completing the optimization process.
[0099] Finally, the weights with excellent static and dynamic performance are optimized and fixed-pointed reasonably, and then burned into the chip through a one-time memory such as OTP (One Time Programmable) or eFuse (electronic fuse), completing the error weight extraction and calibration of the SAR ADC. The output after calibration is shown in formula (7). After calibration, all n weights are W_cali (1*n vector), and the original output is Output_original (1*n vector), where n is the adc resolution.
[0100] Output_cali=W_cali*Output_original T #(7)
[0101] Since the simulated annealing weight search process is a random process, when the temperature is low in a single search, it is easy to fall into a local optimal solution. Therefore, the above process can be repeated and multiple optimizations can be performed to obtain the capacitor weight value that results in the best result.
Claims
1. A SAR ADC calibration method, characterized in that: The following steps are involved: S0 samples the output code of SARADC to obtain a code value sequence; S1 performs time-frequency transformation on the code value sequence, and calculates an initial signal-to-noise-distortion ratio based on the obtained spectrum data; S2 uses a simulated annealing algorithm to solve the optimal capacitance weight that enables the SARADC to obtain the optimal signal-to-noise-distortion ratio based on the ideal capacitance weight and the initial signal-to-noise-distortion ratio, and performs an INL test on the optimal capacitance weight obtained at the current temperature after the inner loop at each temperature is completed.
2. The method according to claim 1, characterized in that Step S2 includes: S201 sets the initial temperature, end temperature, cooling rate and number of internal cycles; S202: setting the current optimal capacitance weight as the ideal capacitance weight, setting the current optimal signal-to-noise-distortion ratio as the initial signal-to-noise-distortion ratio, and setting the current temperature as the initial temperature; S203 for any current temperature: The neighborhood perturbation formula is used to calculate the new solution capacitance weight, and then the new solution signal-to-noise distortion ratio is calculated; Comparing the newly solved signal-to-noise-distortion ratio with the currently solved optimal signal-to-noise-distortion ratio, if the newly solved signal-to-noise-distortion ratio is greater than the currently solved optimal signal-to-noise-distortion ratio, updating the currently solved optimal capacitance weight and the currently solved optimal signal-to-noise-distortion ratio to the newly solved capacitance weight and the newly solved signal-to-noise-distortion ratio, respectively; otherwise, updating the currently solved optimal capacitance weight and the currently solved optimal signal-to-noise-distortion ratio based on the metropolis criterion; Based on the current optimal capacitance weight, the INL of the SARADC is calculated and it is determined whether a preset condition is met, and if so, the current optimal capacitance weight is saved as an alternative optimal capacitance weight; Determine whether the inner loop times are reached, if not, return to the step of using the neighborhood perturbation formula to calculate and obtain a new solution capacitance weight, otherwise, execute step S204; S204: The temperature is lowered according to the cooling rate. If the temperature after the temperature decreases is greater than the end temperature, the process returns to step S203: Otherwise, select one of the candidate optimal capacitance weights as the optimal capacitance weight.
3. The method according to claim 2, characterized in that The neighborhood perturbation formula is: W_new=W_current*(1+search_step*(2*rand(1)-1)) Wherein, W_new is the newly solved capacitance weight, W_currecnt is the current capacitance weight, serach_step is the search step length, and rand(1) is a random number between 0 and 1.
4. The method according to claim 2, characterized in that: The updating of the current optimal capacitance weight and the current optimal signal-to-noise-distortion ratio based on the metropolis criterion includes: The update probability P is calculated according to the following formula: Among them, SNDR_current is the current optimal signal-to-noise-distortion ratio, SNDR_new is the new signal-to-noise-distortion ratio, and T is the current temperature.
5. The method according to claim 1, characterized in that The signal-to-noise-distortion ratio of the SARADC is calculated by the following formula: Wherein, SNDR is the signal-to-noise-distortion ratio, P signal is the signal power, P noise is the noise power, P distortion is the distortion power.
6. The method according to claim 1, characterized in that The code value sequence corresponds to a SARADC input signal of the same frequency.
7. The method according to claim 1, characterized in that The method further includes repeating step S2 to obtain a plurality of the optimal capacitance weights, and taking the optimal capacitance weight that makes the signal-to-noise distortion ratio the highest as the optimal capacitance weight of the SAR ADC.
8. The method according to claim 1, characterized in that The time-frequency transformation is achieved by fast Fourier transformation.
9. A SARADC calibration module, characterized in that: include: The acquisition module is used to sample the output code of the SARADC to obtain a code value sequence; A processing module, used for performing time-frequency transformation on the code value sequence and calculating an initial signal-to-noise-distortion ratio based on the obtained spectrum data; The calibration module is used to solve the optimal capacitance weight for obtaining the optimal signal-to-noise-distortion ratio of the SARADC based on the ideal capacitance weight and the initial signal-to-noise-distortion ratio by using a simulated annealing algorithm, and to perform an INL test on the optimal capacitance weight obtained at the current temperature after the inner cycle at each temperature is completed.
10. A SARADC calibration device, characterized in that: The method comprises a SARADC, a calibration module as claimed in claim 9, and a writing module for calibrating the SARADC through OTP or eFuse according to the optimal capacitance weight generated by the calibration module.
Citation Information
Cited By
Foreground mismatch calibration method applied to noise shaping SAR ADC
CN119853689A
