Parameter determination method of ADC acquisition system, terminal and storage medium

By automatically determining the offset error and gain error of the ADC acquisition system based on the forgetting factor, the problem of insufficient accuracy in the prior art is solved and higher measurement accuracy and efficiency are achieved.

CN120433772APending Publication Date: 2025-08-05ZHEJIANG LEAPMOTOR TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510301400.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-13
Publication Date
2025-08-05

AI Technical Summary

Technical Problem

In mass production, the output signal accuracy is reduced due to offset error and gain error. The existing ADC acquisition system is insufficient in accuracy, making it difficult to ensure the detection reliability of the sensor.

Method used

The least squares method based on the forget factor is used to automatically determine the offset error and gain error of the ADC acquisition module and the external circuit module. By providing the input voltage and calculating the error using the least squares method of the forget factor, the error is accurately determined.

Benefits of technology

The measurement accuracy of the ADC acquisition system is improved, manual participation is reduced, and the efficiency and accuracy of parameter determination is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120433772A_ABST
    Figure CN120433772A_ABST
Patent Text Reader

Abstract

The invention discloses a parameter determination method of an ADC acquisition system, a terminal and a storage medium, the ADC acquisition system comprises an ADC acquisition module and an external circuit module which are electrically connected, and the parameter determination method comprises the following steps: providing a first input voltage for the ADC acquisition module to obtain a first output voltage corresponding to the ADC acquisition module; determining a first offset error and a first gain error of the ADC acquisition module from the first input voltage and the first output voltage by using a forgetting factor-based least square method; and providing a second input voltage to the external circuit module to obtain a second output voltage corresponding to the ADC acquisition module, and determining an offset error and a gain error corresponding to the external circuit module by using the second input voltage and the second output voltage, the second output voltage being obtained by adjusting the first offset error and the first gain error. According to the scheme, the numerical value output by the ADC acquisition system is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a parameter determination method, terminal, and storage medium for an ADC acquisition system. Background Art

[0002] The ADC (Analog-to-Digital Converter) acquisition system converts the continuous analog signal collected by the sensor into a discrete digital signal. In real-world scenarios, due to non-ideal factors such as the mass production process and mechanical assembly of the ADC acquisition system, each ADC acquisition system has offset and gain errors, which in turn reduces the accuracy of its output functional signal and makes it difficult to ensure the detection reliability of the sensor. Therefore, it is necessary to determine the offset and gain errors of the ADC acquisition system during the production stage.

[0003] Related technologies primarily rely on manual testing. To improve test efficiency, two sets of known input voltages are often applied to the ADC acquisition module and external circuit module in the ADC acquisition system, resulting in two corresponding output voltages. These two sets of input and output voltages are then used to determine the aforementioned error. This approach suffers from low accuracy. Summary of the Invention

[0004] The present application provides a method, a terminal, and a storage medium for determining parameters of an ADC acquisition system.

[0005] A technical solution adopted by the present application is to provide a method for determining parameters of an ADC acquisition system, wherein the ADC acquisition system includes an external circuit module and an ADC acquisition module that are electrically connected. The method includes:

[0006] Providing a first input voltage to the ADC acquisition module to obtain a first output voltage corresponding to the ADC acquisition module;

[0007] Determine a first offset error and a first gain error of the ADC acquisition module from the first input voltage and the first output voltage using a least square method based on a forgetting factor;

[0008] A second input voltage is provided to the external circuit module to obtain a second output voltage corresponding to the ADC acquisition module, and the second output voltage is used to determine the offset error and gain error corresponding to the external circuit module, wherein the second output voltage is obtained by adjusting the first offset error and the first gain error.

[0009] Determining a first offset error and a first gain error of the ADC acquisition module from the first input voltage and the first output voltage by using a least square method based on a forgetting factor includes:

[0010] Determining an input vector using the first input voltage;

[0011] determining an output vector using the first output voltage;

[0012] Using the predicted output vector at the current moment, the actual output vector at the current moment, the gain matrix at the current moment, and the predicted parameter value at the previous moment, the predicted parameter value at the current moment is obtained;

[0013] The first offset error and the first gain error of the ADC acquisition module are determined using the predicted parameter values at the current moment.

[0014] Optionally, the predicted parameter value at the current moment is obtained by using the predicted output vector at the current moment, the actual output vector at the current moment, the gain matrix at the current moment, and the predicted parameter value at the previous moment, including:

[0015] Using the predicted output vector at the current moment and the actual output vector at the current moment, the prediction error is obtained;

[0016] Using the current moment's gain matrix and prediction error, the current moment's correction value is obtained;

[0017] The predicted parameter value at the current moment is obtained by using the corrected value at the current moment and the predicted parameter value at the previous moment.

[0018] Optionally, the gain matrix at the current moment is obtained in the following way:

[0019] It is calculated using the covariance matrix of the previous moment, the forgetting factor, and the input vector of the current moment.

[0020] Optionally, the covariance matrix at the current moment is obtained in the following way:

[0021] It is calculated using the covariance matrix of the previous moment, the forgetting factor, and the input vector of the current moment.

[0022] The external circuit module is the battery collection circuit.

[0023] Providing a second input voltage to the external circuit module to obtain a second output voltage corresponding to the ADC acquisition module, and using the second output voltage to determine an offset error and a gain error corresponding to the external circuit module, including:

[0024] A least square method based on a forgetting factor is used to determine a second offset error and a second gain error of the battery acquisition circuit from the second input voltage and the second output voltage.

[0025] Optionally, the external circuit module is a resistance acquisition circuit.

[0026] The external circuit module is a peripheral resistance acquisition circuit.

[0027] Providing a second input voltage to the external circuit module to obtain a second output voltage corresponding to the ADC acquisition module, and using the second output voltage to determine an offset error and a gain error corresponding to the external circuit module, including:

[0028] Providing a second input voltage to the peripheral resistance acquisition circuit;

[0029] Adjust the resistance value of the resistor connected to the peripheral resistor acquisition circuit to obtain the second output voltage corresponding to the ADC acquisition module;

[0030] The third offset error and the third gain error of the peripheral resistor acquisition circuit are determined from the resistance value and the second output voltage by using a least square method based on the forgetting factor.

[0031] Optionally, before the step of providing the first input voltage to the ADC acquisition module to obtain a first output voltage corresponding to the ADC acquisition module, the method includes:

[0032] Providing a third input voltage to the external circuit module to obtain a third output voltage corresponding to the ADC acquisition module;

[0033] In response to the third output voltage being outside a preset voltage interval, it is determined that the ADC acquisition system fails, wherein the preset voltage interval is determined based on the third input voltage.

[0034] Another technical solution adopted by the present application is to provide a terminal device, the terminal device including a memory and a processor connected to the memory;

[0035] The memory is used to store program data, and the processor is used to execute the program data to implement the parameter determination method of the ADC acquisition system as described above.

[0036] Another technical solution adopted by the present application is to provide a computer storage medium, which is used to store program data. When the program data is executed by a computer, it is used to implement the parameter determination method of the ADC acquisition system as described above.

[0037] The beneficial effects of the present application are as follows: providing a first input voltage to an ADC acquisition module to obtain a first output voltage corresponding to the ADC acquisition module; using a least squares method based on a forgetting factor to determine a first offset error and a first gain error of the ADC acquisition module from the first input voltage and the first output voltage; providing a second input voltage to an external circuit module to obtain a second output voltage corresponding to the ADC acquisition module, and using the second output voltage adjusted by the first offset error and the first gain error to determine the offset error and gain error corresponding to the external circuit module. The parameter determination method of the ADC acquisition system provided in the present application uses a least squares method based on a forgetting factor to more accurately determine the first offset error and the first gain error corresponding to the ADC acquisition module, and then uses the first offset error and the first gain error to adjust the second output voltage output by the ADC sampling module to determine the offset error and gain error of the external circuit module, thereby improving the measurement accuracy of the ADC acquisition system.

[0038] Furthermore, the parameter determination method of the ADC acquisition system provided in the present application does not require human intervention, further improving the efficiency of parameter determination. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0040] Figure 1 This is a structural diagram of an embodiment of an ADC acquisition system provided by the present application;

[0041] Figure 2 This is a flow chart of an embodiment of a method for determining parameters of an ADC acquisition system provided by the present application;

[0042] Figure 3 It is a structural diagram of an embodiment of a parameter determination device provided by the present application;

[0043] Figure 4 This is a structural diagram of an embodiment of an external circuit module provided by the present application;

[0044] Figure 5 This is a structural diagram of an embodiment of a battery collection circuit provided by the present application;

[0045] Figure 6 This is a structural diagram of an embodiment of a peripheral resistor acquisition circuit provided by the present application;

[0046] Figure 7This is a schematic structural diagram of an embodiment of a terminal device provided by this application;

[0047] Figure 8 It is a structural diagram of an embodiment of a computer storage medium provided by this application. DETAILED DESCRIPTION

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

[0049] The terms "first," "second," and the like in this application are used to distinguish between different objects, rather than to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to the process, method, or device.

[0050] In addition, although the terms "first" and "second" are frequently used in this application to describe various data (or various applications or various instructions or various operations), these data (or applications or instructions or operations) should not be limited by these terms. These terms are simply used to distinguish one type of data (or application or instruction or operation) from another type of data (or application or instruction or operation).

[0051] like Figure 1 As shown, the ADC acquisition system provided in this application is composed of an ADC acquisition module and an external circuit module, and the external circuit module and the ADC acquisition module are electrically connected.

[0052] In some possible embodiments, the external circuit module may be a step-down module, configured to step down the collected voltage to below 24V, or below 12V, or below 5V.

[0053] In some possible embodiments, the external circuit module may be a boost module, configured to boost the collected voltage to above 1V.

[0054] In some embodiments, the ADC acquisition module may be a device that performs analog-to-digital conversion, such as an MCU (microprocessing unit), an ADC acquisition chip, and the like.

[0055] To improve the efficiency of factory calibration of ADC acquisition systems, the prior art primarily relies on manual calibration, where two sets of known voltages are input to the ADC acquisition module and two sets of corresponding output voltages are obtained. The offset error and gain error of the ADC acquisition module are then determined based on these two sets of input and output voltages. This approach suffers from insufficient accuracy, making the ADC acquisition system unreliable in environments with high precision requirements.

[0056] Please refer to the following for details: Figure 2 , Figure 2 This is a flow chart of an embodiment of a method for determining parameters of an ADC acquisition system provided in this application.

[0057] like Figure 2 As shown, the parameter determination method of the ADC acquisition system in the embodiment of the present application may specifically include the following steps:

[0058] S1, providing a first input voltage to an ADC acquisition module to obtain a first output voltage corresponding to the ADC acquisition module.

[0059] The parameter determination method of the ADC acquisition system provided in the present application is mainly performed by a parameter determination device. In some possible embodiments, the parameter determination device can be a test fixture itself for testing the ADC acquisition system. In some possible embodiments, the parameter determination device can be a device that is communicatively connected to the test fixture, and the device can be a device for monitoring images, a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, and an autonomous vehicle, a robot, a security system, or any one or more products in glasses and helmets for augmented reality or virtual reality. In some possible implementations, the parameter determination method of the ADC acquisition system can be implemented by a processor calling computer-readable instructions stored in a memory.

[0060] Specifically, the parameter determination device provides a number of different first input voltages to the ADC acquisition module through the test fixture, and obtains a number of first output voltages corresponding to the ADC acquisition module.

[0061] In some embodiments, the parameter determination device is as follows: Figure 3As shown, the ADC acquisition system is installed on a test fixture, which provides an input voltage (e.g., a first input voltage) to the ADC acquisition system. The test fixture is communicatively connected to a host computer to receive control commands from the host computer. The host computer is also communicatively connected to the ADC acquisition system to receive voltage data fed back by the ADC acquisition system. Furthermore, the test fixture and the host computer form a parameter determination device.

[0062] In the technical solution provided in this application, the parameters of the ADC acquisition system are determined in an automated manner without manual intervention, which can effectively improve the accuracy of calibration.

[0063] In some application scenarios, the test fixture is electrically connected to the ADC acquisition module. More specifically, the test fixture is provided with at least two voltage measurement ports, one of which is connected to the input of the ADC acquisition module to measure the input voltage of the ADC acquisition module. The other voltage measurement port is connected to the input of the ADC acquisition module to measure the output voltage of the ADC acquisition module. In some possible embodiments, the first input voltage is the input voltage of the ADC acquisition module, and the first output voltage is the output voltage fed back by the ADC acquisition module after analog-to-digital conversion.

[0064] S2, using a least square method based on a forgetting factor, determining a first offset error and a first gain error of the ADC acquisition module from the first input voltage and the first output voltage.

[0065] Specifically, the parameter determination device uses a forgetting factor-based least squares method (FFRLS) to determine a first offset error and a first gain error of the ADC acquisition module from the first input voltage and the first output voltage.

[0066] In some embodiments, the first input voltage and the first output voltage satisfy the following relationship:

[0067] U D =k1U A +b1

[0068] Among them, U D is the first output voltage, U A is the first input voltage, k1 is the first gain error, and b1 is the first offset error.

[0069] It should be noted that in actual environments, since the ADC acquisition module and the external circuit module both have offset errors and gain errors, in order to improve the accuracy of the ADC acquisition system, it is necessary to determine the offset error (Offset) and gain error (Gain) of the ADC acquisition module and the external circuit module respectively.

[0070] In some possible embodiments, the parameter determination device sequentially determines the first offset error and the first gain error corresponding to each channel of the ADC acquisition module in the above manner.

[0071] S3, providing a second input voltage to the external circuit module to obtain a second output voltage corresponding to the ADC acquisition module, and using the second output voltage to determine the offset error and gain error corresponding to the external circuit module.

[0072] The second output voltage is obtained by adjusting the first offset error and the first gain error.

[0073] In some embodiments, the external circuit module is as follows Figure 4 shown.

[0074] Specifically, the parameter determination device provides a second input voltage to the external circuit module, obtains a second output voltage corresponding to the ADC acquisition module, and uses the second output voltage to determine the offset error and gain error corresponding to the external circuit module.

[0075] In some embodiments, the parameter determination device uses the second input voltage and the second output voltage to determine the offset error and gain error corresponding to the external circuit module.

[0076] The second output voltage is the output voltage fed back by the ADC acquisition module after analog-to-digital conversion.

[0077] In this embodiment, the parameter determination device uses the forgetting factor-based least squares method (FFRLS) to determine the first offset error and the first gain deviation of the ADC acquisition module, and then uses this to compensate and adjust the output voltage of the ADC acquisition module. Then, using the corrected output voltage, the corresponding offset error and gain error of the external circuit module are determined.

[0078] The above scheme provides a first input voltage to the ADC acquisition module to obtain a first output voltage corresponding to the ADC acquisition module; uses a least squares method based on a forgetting factor to determine a first offset error and a first gain error of the ADC acquisition module from the first input voltage and the first output voltage; provides a second input voltage to the external circuit module to obtain a second output voltage corresponding to the ADC acquisition module, and uses the second output voltage adjusted by the first offset error and the first gain error to determine the offset error and gain error corresponding to the external circuit module. The parameter determination method of the ADC acquisition system provided in the present application uses a least squares method based on a forgetting factor to more accurately determine the first offset error and the first gain error corresponding to the ADC acquisition module, and then uses the first offset error and the first gain error to adjust the second output voltage output by the ADC sampling module to determine the offset error and gain error of the external circuit module, thereby improving the measurement accuracy of the ADC acquisition system.

[0079] Furthermore, the parameter determination method of the ADC acquisition system provided in the present application does not require human intervention, further improving the efficiency of parameter determination.

[0080] Another embodiment of the method for determining parameters of the ADC acquisition system provided in the present application may specifically include the following steps:

[0081] S11, providing a first input voltage to an ADC acquisition module to obtain a first output voltage corresponding to the ADC acquisition module.

[0082] In some possible embodiments, the first input voltage is between 0.1V and 5V.

[0083] S12, determining an input vector using the first input voltage.

[0084] Specifically, the parameter determination device determines the input vector using the first input voltage.

[0085] In some embodiments, the input vector satisfies the following relationship:

[0086] X=[U A ,1]

[0087] Where X is the input vector, U A is the first input voltage.

[0088] In some embodiments, the first input voltage and the first output voltage satisfy the following relationship:

[0089] U D =k1U A +b1

[0090] Furthermore, the parameter determination device sets θ=[k1,b1] T The parameter value to be determined.

[0091] S13, determining an output vector using the first output voltage.

[0092] Specifically, the parameter determination device determines the output vector using the first output voltage.

[0093] In some embodiments, the output vector satisfies the following relationship:

[0094] Y=[U D ]

[0095] Among them, Y is the output vector, U D is the first output voltage.

[0096] S14, using the predicted output vector at the current moment, the actual output vector at the current moment, the gain matrix at the current moment, and the predicted parameter value at the previous moment, to obtain the predicted parameter value at the current moment.

[0097] Specifically, the parameter determination device uses the predicted output vector at the current moment, the actual output vector at the current moment, the gain matrix at the current moment, and the predicted parameter value at the previous moment to obtain the predicted parameter value at the current moment.

[0098] In some embodiments, the prediction parameter value at the current moment satisfies the following relationship:

[0099]

[0100] in, is the predicted parameter value at the current moment, is the predicted parameter value at the previous moment, L m+1 is the gain matrix at the current moment, Y m+1 is the actual output vector at the current moment.

[0101] It should be noted that the predicted output vector at the current moment is the vector product of the input vector at the current moment and the predicted parameter value at the previous moment.

[0102] Optionally, the parameter determination device uses the covariance matrix at the previous moment, the forgetting factor, and the input vector at the current moment to determine the gain matrix at the current moment.

[0103] In some embodiments, the gain matrix at the current moment satisfies the following relationship:

[0104]

[0105] Among them, L m+1 is the gain matrix at the current moment, P m is the covariance matrix of the previous moment, λ is the forgetting factor, X m+1 is the input vector at the current moment.

[0106] It should be noted that in order to avoid "filter saturation", the forgetting factor λ is introduced to weaken old data and enhance new data. The value of λ is between 0 and 1. The closer λ is to 1, the faster the weight of historical data decreases, and more emphasis is placed on recent data; the closer λ is to 0, the slower the weight of historical data decreases, and more emphasis is placed on past data.

[0107] In this embodiment, the parameter determination device can adjust the value of λ so that the determined parameter value is more consistent with the actual relationship of the ADC sampling module.

[0108] In some possible embodiments, the parameter determination device may use forgetting factors λ of different sizes to determine multiple sets of candidate first offset errors and candidate first gain errors, and then calculate the median or average of the multiple sets of candidate first offset errors as the first offset error. And / or calculate the median or average of the multiple sets of candidate first gain errors as the first gain error.

[0109] Exemplarily, the forgetting factor λ can take three different values.

[0110] Optionally, the parameter determination device uses the covariance matrix at the previous moment, the forgetting factor, and the input vector at the current moment to determine the covariance matrix at the current moment.

[0111] In some embodiments, the covariance matrix at the current moment satisfies the following relationship:

[0112]

[0113] Among them, P m+1 is the covariance matrix at the current moment, P m is the covariance matrix of the previous moment, λ is the forgetting factor, X m+1 is the input vector at the current moment.

[0114] S15 , using the predicted parameter values at the current moment, determining a first offset error and a first gain error of the ADC acquisition module.

[0115] Specifically, the parameter determination device determines the first offset error and the first gain error of the ADC acquisition module using the predicted parameter value at the current moment.

[0116] In some embodiments, the parameter determination device obtains the predicted parameter value at the current moment in, Corresponding to the first gain error k, Corresponding to the first offset error b.

[0117] S16, providing a second input voltage to the external circuit module to obtain a second output voltage corresponding to the ADC acquisition module, and using the second output voltage to determine the offset error and gain error corresponding to the external circuit module.

[0118] The second output voltage is obtained by adjusting the first offset error and the first gain error.

[0119] The above scheme provides a first input voltage to the ADC acquisition module to obtain a first output voltage corresponding to the ADC acquisition module; uses a least squares method based on a forgetting factor to determine a first offset error and a first gain error of the ADC acquisition module from the first input voltage and the first output voltage; provides a second input voltage to the external circuit module to obtain a second output voltage corresponding to the ADC acquisition module, and uses the second output voltage adjusted by the first offset error and the first gain error to determine the offset error and gain error corresponding to the external circuit module. The parameter determination method of the ADC acquisition system provided in the present application uses a least squares method based on a forgetting factor to more accurately determine the first offset error and the first gain error corresponding to the ADC acquisition module, and then uses the first offset error and the first gain error to adjust the second output voltage output by the ADC sampling module to determine the offset error and gain error of the external circuit module, thereby improving the measurement accuracy of the ADC acquisition system.

[0120] Furthermore, the parameter determination method of the ADC acquisition system provided in the present application does not require human intervention, further improving the efficiency of parameter determination.

[0121] Another embodiment of the method for determining parameters of the ADC acquisition system provided in the present application may specifically include the following steps:

[0122] S21, providing a first input voltage to an ADC acquisition module to obtain a first output voltage corresponding to the ADC acquisition module.

[0123] In some possible embodiments, the parameter determination device provides the first input voltage to the ADC acquisition module via a standard voltage source or a programmable voltage source. If the first input voltage is low, the voltage value of the first input voltage is increased, otherwise the voltage value of the first input voltage is decreased.

[0124] In some possible embodiments, S21 further includes the following sub-steps:

[0125] S211 , in response to the first output voltage being outside a first preset voltage range, not saving the first output voltage.

[0126] The first preset voltage range is determined by the first input voltage.

[0127] In some embodiments, the parameter determination device sends an acquisition and return value instruction, such as "LEFT_REARVIEW_MIRROR_SENSOR_CROSSWISE FB_ADC", to the ADC acquisition module. If the first output voltage is outside the first preset voltage range, the parameter determination device does not save the first input voltage and the corresponding first output voltage.

[0128] Exemplarily, the first input voltage is 4V, and the first preset voltage range is 4V±0.01V.

[0129] Exemplarily, the first input voltage is 4V, and the first preset voltage range is 1V±0.01V.

[0130] S212 , in response to the first output voltage being within a first preset voltage range, saving the first output voltage.

[0131] In some possible embodiments, the parameter determination device collects n groups of first input voltages and corresponding first output voltages. If the number of groups of first input voltages and first output voltages finally saved is less than n*p groups, the parameter determination device determines that the ADC acquisition system is faulty.

[0132] Optionally, p is any one of 60%, 65%, 70%, 75%, and 80%, which is not limited here.

[0133] In some possible embodiments, before step S21, the following steps are further included:

[0134] S2111: Provide a third input voltage to the external circuit module to obtain a third output voltage corresponding to the ADC acquisition module.

[0135] In some embodiments, the parameter determination device provides a plurality of third input voltages to the external circuit module, and reads corresponding voltage values, ie, third output voltages, through the ADC acquisition module.

[0136] Exemplarily, the third input voltage may be 1V or 4V.

[0137] S2112 : In response to the third output voltage being outside the preset voltage range, determine that the ADC acquisition system fails.

[0138] The preset voltage range is determined based on the third input voltage.

[0139] In some possible embodiments, the preset voltage range is between 90% and 110% of the third input voltage.

[0140] In some possible embodiments, the preset voltage range is between 95% and 105% of the third input voltage.

[0141] In some possible embodiments, the preset voltage range is between 92% and 108% of the third input voltage.

[0142] Exemplarily, the third input voltage is 1V, and the preset voltage range is 0.9V to 1.1V.

[0143] Exemplarily, the third input voltage is 4V, and the preset voltage range is 3.7V to 4.3V.

[0144] Specifically, in response to the third output voltage being outside the preset voltage range, the parameter determination device determines that the ADC acquisition system is faulty and needs to suspend calibration, and prompts that the sample to be tested needs to be repaired.

[0145] S22 , determining an input vector using the first input voltage.

[0146] S23 , determining an output vector using the first output voltage.

[0147] S24, using the predicted output vector at the current moment and the actual output vector at the current moment to obtain the prediction error.

[0148] Specifically, the parameter determination device obtains the prediction error using the predicted output vector at the current moment and the actual output vector at the current moment.

[0149] It can be understood that the following relationship is satisfied between the input vector and the output vector:

[0150] X T θ=Y

[0151] Among them, X is the input vector, θ is the prediction parameter, and Y is the output vector.

[0152] Furthermore, the predicted output vector at the current moment is the vector product of the input vector at the current moment and the prediction parameters at the previous moment.

[0153] In some embodiments, the predicted output vector at the current moment satisfies the following relationship:

[0154]

[0155] in, is the predicted output vector at the current moment.

[0156] In some embodiments, the prediction error is the difference between the actual output vector at the current moment and the predicted output vector at the current moment.

[0157] Among them, the prediction error at the current moment satisfies the following relationship:

[0158]

[0159] Among them, Δ m+1 is the prediction error at the current moment.

[0160] S25, using the gain matrix and prediction error at the current moment to obtain the correction value at the current moment.

[0161] Specifically, the parameter determination device uses the gain matrix and prediction error at the current moment to obtain the correction value at the current moment.

[0162] In some embodiments, the current moment correction value is the matrix product of the gain matrix and the prediction error at the current moment.

[0163] Among them, the correction value C at the current moment m+1 The following relations are satisfied:

[0164] C m+1 =L m+1 Δ m+1

[0165] S26, using the current correction value and the previous prediction parameter value to obtain the current prediction parameter value.

[0166] Specifically, the parameter determination device uses the current moment correction value and the previous moment prediction parameter value to obtain the current moment prediction parameter value.

[0167] In some embodiments, the predicted parameter value at the current moment is the sum of the corrected value at the current moment and the predicted parameter value at the previous moment.

[0168] Among them, the prediction parameter values at the current moment satisfy the following relationship:

[0169]

[0170] S27 , using the predicted parameter values at the current moment, determining a first offset error and a first gain error of the ADC acquisition module.

[0171] In some embodiments, the parameter determination device inputs the first offset error and the first gain error into a storage unit of the ADC acquisition module.

[0172] S28 , providing a second input voltage to the external circuit module to obtain a second output voltage corresponding to the ADC acquisition module, and using the second output voltage to determine an offset error and a gain error corresponding to the external circuit module.

[0173] The second output voltage is obtained by adjusting the first offset error and the first gain error.

[0174] In some possible embodiments, the parameter determination device provides the second input voltage to the external circuit module via a standard voltage source or a programmable voltage source. If the second input voltage is low, the voltage value of the second input voltage is increased, otherwise the voltage value of the second input voltage is decreased.

[0175] In some possible embodiments, S28 may further include the following sub-steps:

[0176] S211 , in response to the second output voltage being outside a second preset voltage range, not saving the second output voltage.

[0177] The first preset voltage range is determined by the second input voltage.

[0178] In some embodiments, the parameter determination device provides a second input voltage to the external circuit module and acquires a second output voltage through the ADC acquisition module, wherein the second output voltage is obtained by correcting the first offset error and the first gain error.

[0179] If the second output voltage is outside the second preset voltage range, the parameter determination device does not save the second input voltage and the corresponding second output voltage.

[0180] Exemplarily, the second input voltage is 9V, and the second preset voltage range is 9V±0.3V.

[0181] Exemplarily, the second input voltage is 16V, and the second preset voltage range is 16V±0.3V.

[0182] S212 , in response to the second output voltage being within a second preset voltage range, saving the second output voltage.

[0183] In some possible embodiments, the parameter determination device collects n groups of second input voltages and corresponding second output voltages. If the number of groups of second input voltages and second output voltages finally saved is less than n*p groups, the parameter determination device determines that the ADC acquisition system is faulty.

[0184] Optionally, p is any one of 60%, 65%, 70%, 75%, and 80%, which is not limited here.

[0185] S213 , using the plurality of sets of second input voltages and second output voltages, determining an offset error and a gain error corresponding to the external circuit module.

[0186] In some possible embodiments, the parameter determination device sets different forgetting factors λ, uses a least squares method based on the forgetting factors to determine multiple groups of candidate offset errors and candidate gain errors, and then takes the median or average of the multiple groups of candidate offset errors as the offset error corresponding to the external circuit module. And / or takes the median or average of the multiple groups of candidate gain errors as the gain error corresponding to the external circuit module.

[0187] Exemplarily, the forgetting factor λ can take three different values.

[0188] The above scheme provides a first input voltage to the ADC acquisition module to obtain a first output voltage corresponding to the ADC acquisition module; uses a least squares method based on a forgetting factor to determine a first offset error and a first gain error of the ADC acquisition module from the first input voltage and the first output voltage; provides a second input voltage to the external circuit module to obtain a second output voltage corresponding to the ADC acquisition module, and uses the second output voltage adjusted by the first offset error and the first gain error to determine the offset error and gain error corresponding to the external circuit module. The parameter determination method of the ADC acquisition system provided in the present application uses a least squares method based on a forgetting factor to more accurately determine the first offset error and the first gain error corresponding to the ADC acquisition module, and then uses the first offset error and the first gain error to adjust the second output voltage output by the ADC sampling module to determine the offset error and gain error of the external circuit module, thereby improving the measurement accuracy of the ADC acquisition system.

[0189] Furthermore, the parameter determination method of the ADC acquisition system provided in the present application does not require human intervention, further improving the efficiency of parameter determination.

[0190] Another embodiment of the method for determining parameters of the ADC acquisition system provided in the present application may specifically include the following steps:

[0191] S31 , providing a first input voltage to an ADC acquisition module to obtain a first output voltage corresponding to the ADC acquisition module.

[0192] S32 , using a least square method based on a forgetting factor, determining a first offset error and a first gain error of the ADC acquisition module from the first input voltage and the first output voltage.

[0193] S33 , using a least square method based on a forgetting factor, determining a second offset error and a second gain error of the battery acquisition circuit from the second input voltage and the second output voltage.

[0194] In some embodiments, the battery collection circuit is as follows: Figure 5 shown.

[0195] Specifically, the parameter determination device provides a second input voltage to the battery acquisition circuit, and reads the second output voltage through the ADC acquisition module, and then uses the least squares method based on the forgetting factor to determine the second offset error and second gain error corresponding to the battery acquisition circuit from the second input voltage and the second output voltage.

[0196] The second output voltage is obtained by adjusting the first offset error and the first gain error.

[0197] In some embodiments, the second offset error and the second gain error satisfy the following relationship:

[0198] Z=k2*V n +b2

[0199] Where Z is the second output voltage, V n is the second input voltage, k2 is the second gain error, and b2 is the second offset error.

[0200] The specific steps for calculating the offset error and gain error using the least squares method based on the forgetting factor are described above and will not be repeated here.

[0201] The above scheme provides a first input voltage to the ADC acquisition module to obtain a first output voltage corresponding to the ADC acquisition module; uses a least squares method based on a forgetting factor to determine a first offset error and a first gain error of the ADC acquisition module from the first input voltage and the first output voltage; provides a second input voltage to the external circuit module to obtain a second output voltage corresponding to the ADC acquisition module, and uses the second output voltage adjusted by the first offset error and the first gain error to determine the offset error and gain error corresponding to the external circuit module. The parameter determination method of the ADC acquisition system provided in the present application uses a least squares method based on a forgetting factor to more accurately determine the first offset error and the first gain error corresponding to the ADC acquisition module, and then uses the first offset error and the first gain error to adjust the second output voltage output by the ADC sampling module to determine the offset error and gain error of the external circuit module, thereby improving the measurement accuracy of the ADC acquisition system.

[0202] Furthermore, the parameter determination method of the ADC acquisition system provided in the present application does not require human intervention, further improving the efficiency of parameter determination.

[0203] Another embodiment of the method for determining parameters of the ADC acquisition system provided in the present application may specifically include the following steps:

[0204] S41 , providing a first input voltage to an ADC acquisition module to obtain a first output voltage corresponding to the ADC acquisition module.

[0205] S42 , using a least square method based on a forgetting factor, determining a first offset error and a first gain error of the ADC acquisition module from the first input voltage and the first output voltage.

[0206] S43, providing a second input voltage to the peripheral resistance acquisition circuit.

[0207] In some embodiments, the peripheral resistance acquisition circuit is as follows Figure 6 shown.

[0208] In some embodiments, the second input voltage is 5V.

[0209] S44, adjusting the resistance value of the resistor connected to the peripheral resistor acquisition circuit to obtain a second output voltage corresponding to the ADC acquisition module.

[0210] Specifically, the parameter determination device changes the resistance value of the resistor connected to the peripheral resistor acquisition circuit to obtain the second output voltage corresponding to the ADC acquisition module under each resistance value.

[0211] Optionally, the resistance value may be 10Ω, 22Ω, 44Ω, 100Ω, etc., which is not limited here.

[0212] In some embodiments, the second output voltage and the resistance value satisfy the following relationship:

[0213] R=k3*Z+b3

[0214] Wherein, R is the resistance value, Z is the second output voltage, k3 is the third gain error, and b3 is the third offset error.

[0215] S44 , using a least square method based on a forgetting factor, determine a third offset error and a third gain error of the peripheral resistor acquisition circuit from the resistor values and the second output voltage.

[0216] Specifically, the parameter determination device uses a least square method based on a forgetting factor to determine the third offset error and the third gain error of the peripheral resistor acquisition circuit from a plurality of groups of resistor values and corresponding second output voltages.

[0217] The specific steps for calculating the offset error and gain error using the least squares method based on the forgetting factor are described above and will not be repeated here.

[0218] The above scheme provides a first input voltage to the ADC acquisition module to obtain a first output voltage corresponding to the ADC acquisition module; uses a least squares method based on a forgetting factor to determine a first offset error and a first gain error of the ADC acquisition module from the first input voltage and the first output voltage; provides a second input voltage to the external circuit module to obtain a second output voltage corresponding to the ADC acquisition module, and uses the second output voltage adjusted by the first offset error and the first gain error to determine the offset error and gain error corresponding to the external circuit module. The parameter determination method of the ADC acquisition system provided in the present application uses a least squares method based on a forgetting factor to more accurately determine the first offset error and the first gain error corresponding to the ADC acquisition module, and then uses the first offset error and the first gain error to adjust the second output voltage output by the ADC sampling module to determine the offset error and gain error of the external circuit module, thereby improving the measurement accuracy of the ADC acquisition system.

[0219] Furthermore, the parameter determination method of the ADC acquisition system provided in the present application does not require human intervention, further improving the efficiency of parameter determination.

[0220] Please continue to see Figure 7 , Figure 7 The terminal device 500 of the embodiment of the present application includes a processor 51 and a memory 52 .

[0221] The processor 51 and the memory 52 are connected to a bus. The memory 52 stores program data. The processor 51 is used to execute the program data to implement the parameter determination method of the ADC acquisition system described in the above embodiment.

[0222] In the embodiment of the present application, the processor 51 may also be referred to as a CPU (Central Processing Unit). The processor 51 may be an integrated circuit chip having signal processing capabilities. The processor 51 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor, or the processor 51 may be any conventional processor.

[0223] This application also provides a computer storage medium, please continue to refer to Figure 8 , Figure 8 6 is a schematic diagram of the structure of an embodiment of a computer storage medium provided in the present application. The computer storage medium 600 stores program data 61. When the program data 61 is executed by the processor, it is used to implement the parameter determination method of the ADC acquisition system of the above embodiment.

[0224] When the embodiments of the present application are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0225] The above description is only an implementation method of the present application and does not limit the patent scope of the present application. Equivalent structures or equivalent process changes made by utilizing the contents of the description and drawings of this application, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for determining parameters of an ADC acquisition system, characterized in that: The ADC acquisition system includes an external circuit module and an ADC acquisition module that are electrically connected, and the method includes: Providing a first input voltage to the ADC acquisition module to obtain a first output voltage corresponding to the ADC acquisition module; Determining a first offset error and a first gain error of the ADC acquisition module from the first input voltage and the first output voltage by using a least squares method based on a forgetting factor; Using the first offset error and the first gain error, the A second input voltage is provided to the external circuit module to obtain a second output voltage corresponding to the ADC acquisition module, and the second output voltage is used to determine the offset error and gain error corresponding to the external circuit module, wherein the second output voltage is obtained by adjusting the first offset error and the first gain error.

2. The method according to claim 1, characterized in that Determining a first offset error and a first gain error of the ADC acquisition module from the first input voltage and the first output voltage by using a least squares method based on a forgetting factor includes: determining an input vector using the first input voltage; determining an output vector using the first output voltage; Using the predicted output vector at the current moment, the actual output vector at the current moment, the gain matrix at the current moment, and the predicted parameter value at the previous moment, the predicted parameter value at the current moment is obtained; The first offset error and the first gain error of the ADC acquisition module are determined by using the predicted parameter value at the current moment.

3. The method according to claim 2, characterized in that The method of obtaining the prediction parameter value at the current moment by using the prediction output vector at the current moment, the actual output vector at the current moment, the gain matrix at the current moment, and the prediction parameter value at the previous moment includes: Using the predicted output vector at the current moment and the actual output vector at the current moment, the prediction error is obtained; Using the gain matrix at the current moment and the prediction error, a correction value at the current moment is obtained; The predicted parameter value at the current moment is obtained by using the current moment correction value and the predicted parameter value at the previous moment.

4. The method according to claim 2, characterized in that The gain matrix at the current moment is obtained in the following manner: It is calculated using the covariance matrix of the previous moment, the forgetting factor, and the input vector of the current moment.

5. The method according to claim 4, characterized in that The covariance matrix at the current moment is obtained in the following way: It is calculated using the covariance matrix of the previous moment, the forgetting factor, and the input vector of the current moment.

6. The method according to claim 1, characterized in that The external circuit module is a battery collection circuit. Providing a second input voltage to the external circuit module to obtain a second output voltage corresponding to the ADC acquisition module, and using the second output voltage to determine an offset error and a gain error corresponding to the external circuit module, includes: A second offset error and a second gain error of the battery acquisition circuit are determined from the second input voltage and the second output voltage by using a least square method based on a forgetting factor.

7. The method according to claim 1, characterized in that The external circuit module is a peripheral resistance acquisition circuit. Providing a second input voltage to the external circuit module to obtain a second output voltage corresponding to the ADC acquisition module, and using the second output voltage to determine an offset error and a gain error corresponding to the external circuit module, includes: Providing a second input voltage to the peripheral resistance acquisition circuit; Adjusting the resistance value of the resistor connected to the peripheral resistor acquisition circuit to obtain a second output voltage corresponding to the ADC acquisition module; A least square method based on a forgetting factor is used to determine a third offset error and a third gain error of the peripheral resistor acquisition circuit from the resistance value and the second output voltage.

8. The method according to claim 1, characterized in that Before the step of providing a first input voltage to the ADC acquisition module to obtain a first output voltage corresponding to the ADC acquisition module, the method includes: Providing a third input voltage to the external circuit module to obtain a third output voltage corresponding to the ADC acquisition module; In response to the third output voltage being outside a preset voltage interval, it is determined that the ADC acquisition system fails, wherein the preset voltage interval is determined based on the third input voltage.

9. A terminal device, characterized in that: The terminal device includes a processor and a memory connected to the processor, wherein: The memory stores program instructions; The processor is configured to execute program instructions stored in the memory to implement the method according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that The storage medium stores program instructions, and when the program instructions are executed, the method according to any one of claims 1 to 8 is implemented.