Error determination method for current acquisition and current acquisition method
By disconnecting the power supply to the zero-drift interference module or analyzing its interference when the chip is in a zero-current state, and by repeatedly collecting current values, determining and using the current measurement error value for correction, the problem of inaccurate current measurement in the zero-current state of the chip is solved, and the accuracy of current acquisition is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2026-04-07
AI Technical Summary
The chip still detects current values even when it is in a zero-current state, which leads to inaccurate current measurement results and affects chip performance and reliability.
When the chip is in a zero-current state, the current value is collected multiple times by disconnecting the power supply of the zero-drift interference module or analyzing its interference results, the current measurement error value is determined, and the error value is used for error correction.
This significantly improves the accuracy of chip current acquisition and ensures the precision of current measurement results.
Smart Images

Figure CN121805924A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of chip technology, and in particular to a method for determining the error of current acquisition and a current acquisition method. Background Technology
[0002] Due to external environmental interference and the chip's own acquisition errors, the chip's current measurement results may contain some errors. This is evident in the fact that even when the chip is in a zero-current state, it may still detect a certain current value. This phenomenon leads to inaccurate chip current measurement results, affecting the chip's performance and reliability. Summary of the Invention
[0003] This application provides a method for determining the error of current acquisition and a current acquisition method, which can improve the accuracy of chip current acquisition.
[0004] In a first aspect, embodiments of this application provide a method for determining the error of current acquisition. This method is applied to a chip to be calibrated, which includes at least one first module. The first module is a module that causes zero-drift interference in a first acquisition process, whereby the first acquisition process is a process of acquiring current while the chip is in a zero-current state. The method includes: upon receiving a calibration command, performing a first processing on each first module, wherein the first processing is used to eliminate the zero-drift interference of the first module on the first acquisition process; after all first modules have undergone the first processing, executing at least one first acquisition process to obtain the current value acquired in each first acquisition process; and determining a current measurement error value based on the current value acquired in each first acquisition process.
[0005] In this application's technical solution, the determination of current acquisition error considers not only interference from the external environment of the chip but also the chip's own current acquisition error. This chip-specific current acquisition error may originate from modules within the chip that are unrelated to current acquisition. These modules may introduce zero-drift polarization interference during operation. Therefore, this application eliminates the zero-drift interference caused by unrelated modules during the chip error determination process. Then, current is acquired multiple times with the chip in a zero-current state, and the final current measurement error value is analyzed and found to be relatively accurate. This current measurement error value is saved and used for subsequent chip current acquisition, significantly improving the accuracy of chip current acquisition.
[0006] It should be noted that the first module can be a zero-drift interference module.
[0007] Optionally, in one possible implementation of the first aspect, the first processing for each first module includes: shutting down each first module by disconnecting the power supply to it. Testing has shown that the first module, during normal operation, performs current shunting and generates polarized noise interference, affecting the accuracy of current acquisition. This may be because the power supply to the first module and the power supply to the current acquisition module belong to the same power domain. Therefore, to eliminate the error caused by current polarization transitions, the most direct method is to temporarily disconnect the power supply to each first module, shut down the first module, and then perform subsequent current calibration, which can reduce current acquisition errors during normal chip operation.
[0008] Optionally, in another possible implementation of the first aspect, determining the current measurement error value based on the current value acquired in each first acquisition process includes: determining the average value of the current values acquired in each first acquisition process as the current measurement error value. Wherein, to further eliminate noise interference from current acquisition, the current measurement error value can be determined by acquiring the current multiple times and averaging the results, which can improve the accuracy of the current measurement error value.
[0009] Optionally, in another possible implementation of the first aspect, after determining the current measurement error value based on the current value acquired in each first acquisition process, the method further includes: restoring power to each first module, thereby turning on each first module. Specifically, the first module needs to be turned on promptly after the chip determines the current measurement error value to avoid affecting the normal operation of subsequent chips.
[0010] Optionally, in another possible implementation of the first aspect, the first processing applied to each first module includes: determining the interference result of each first module on the first acquisition process. In practical applications, the chip to be calibrated may perform other services while executing the error determination method. If these other services have higher priority, the first module may not be able to be shut down, requiring the completion of other services before zero-drift calibration can be performed. Therefore, to improve the flexibility of this application's solution, the impact of each first module on chip current acquisition can be considered separately and statistically analyzed. The resulting interference result is then used to determine the error value of subsequent chip current measurements.
[0011] Optionally, in another possible implementation of the first aspect, determining the current measurement error value based on the current value acquired in each first acquisition process includes: determining the current measurement error value based on the current value acquired in each first acquisition process and the interference result of each first module on the first acquisition process. Since the aforementioned technical solution obtains the interference result of each first module on the first acquisition process, in determining the current measurement error value, in addition to analyzing the current value acquired in each first acquisition process, it is also necessary to consider the interference result of each first module on the first acquisition process, and comprehensively analyze and determine the final current measurement error value.
[0012] Optionally, in another possible implementation of the first aspect, the chip to be calibrated is a fuel gauge chip. In this case, if the current measured by the fuel gauge chip is inaccurate during normal use, it will affect the accuracy of the battery level display. Therefore, the current measurement error value of the fuel gauge chip can be determined through the technical solution of this application, and this error value can be used for subsequent current acquisition, thereby improving the accuracy of the battery level display of the electronic device.
[0013] Optionally, in another possible implementation of the first aspect, the chip to be calibrated includes at least one first module comprising a protection module and a voltage acquisition module. Generally, considering the hardware design of the chip to be calibrated, the current acquisition module, protection module, and voltage acquisition module are powered by the same power domain, and the current polarization interference generated by the protection module and voltage acquisition module is relatively significant. Therefore, during the chip error determination process, the protection module and voltage acquisition module can be identified as the first module, and a first processing step can be taken to eliminate polarization interference.
[0014] Secondly, embodiments of this application provide a current acquisition method. This method uses the error determination method of the first aspect to determine the current measurement error value corresponding to the chip to be calibrated. This method is also applied to the chip to be calibrated and specifically includes: acquiring current to obtain a current measurement value; calibrating the current measurement value using the current measurement error value to obtain the actual current value.
[0015] In the technical solution of this application, in determining the current acquisition error, in addition to considering the interference from the external environment of the chip, the chip's own current acquisition error is also considered. This chip's own current acquisition error may originate from modules within the chip to be calibrated that are unrelated to current acquisition. These modules may introduce zero-drift polarization interference problems into the chip's current acquisition during operation. Therefore, this application eliminates the zero-drift interference problem caused by unrelated modules during the chip error determination process. Then, the current is acquired multiple times when the chip is in a zero-current state, and the final analysis yields a relatively accurate current measurement error value. This current measurement error value is saved and used for subsequent error correction when the chip acquires current, significantly improving the accuracy of chip current acquisition.
[0016] Thirdly, embodiments of this application provide an error determination device for current acquisition, the device including a unit composed of software and / or hardware for performing the error determination method for current acquisition in the first aspect.
[0017] Fourthly, embodiments of this application provide a current acquisition device, which includes a unit composed of software and / or hardware for performing the current acquisition method of the second aspect.
[0018] Fifthly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the electronic device is able to implement any one of the methods described in the first or second aspect above.
[0019] Sixthly, embodiments of this application provide a chip system applied to an electronic device. The chip system includes one or more processors, which are used to invoke computer instructions to enable the electronic device to execute any of the methods described in the first or second aspect above.
[0020] Optionally, the chip system may also include a memory electrically connected to the processor.
[0021] Optionally, the chip system may also include a communication interface.
[0022] In a seventh aspect, embodiments of this application provide a computer-readable storage medium including instructions that, when executed on an electronic device, enable the electronic device to perform any of the methods described in the first or second aspect.
[0023] Eighthly, embodiments of this application provide a computer program product comprising a computer program, wherein when the computer program is executed by an electronic device, the electronic device is capable of implementing any of the methods described in the first or second aspect above. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 This is a schematic diagram illustrating an applicable scenario of an embodiment of this application;
[0026] Figure 2 This is a schematic diagram illustrating the effect of polarization current provided in an embodiment of this application;
[0027] Figure 3 This is a flowchart illustrating a method for determining the error of current acquisition provided in an embodiment of this application;
[0028] Figure 4 This is a schematic diagram of the software processing flow of a current acquisition error determination method provided in an embodiment of this application;
[0029] Figure 5 This is a schematic diagram of information interaction for a current acquisition error determination method provided in an embodiment of this application;
[0030] Figure 6 This is a schematic diagram of a calibrated current acquisition operating point provided in an embodiment of this application;
[0031] Figure 7 This is a schematic flowchart of a current acquisition method provided in an embodiment of this application;
[0032] Figure 8 This is a schematic diagram of the structure of a current acquisition error determination device provided in an embodiment of this application;
[0033] Figure 9 This is a schematic diagram of the structure of a current acquisition device provided in an embodiment of this application;
[0034] Figure 10 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0035] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the embodiments of this application will be further described in detail below with reference to the accompanying drawings.
[0036] Due to external environmental interference (such as electromagnetic noise, temperature changes, etc.) and the chip's own acquisition errors, the chip's current measurement results may contain some errors. This is evident in the fact that the chip may still detect a certain current value even when it is in a zero-current state. This phenomenon leads to inaccurate chip current measurement results, affecting the chip's performance and reliability.
[0037] To address the aforementioned issues, the chip's current acquisition function can be calibrated. This involves determining and saving the corresponding current measurement error value before the chip begins normal operation. Subsequently, during normal chip operation, the acquired current value is calibrated using the pre-saved current measurement error value, resulting in a more accurate current reading.
[0038] Figure 1 This is a schematic diagram illustrating an applicable scenario of an embodiment of this application. For example... Figure 1 As shown, the scenario includes at least one data processing device 110 and a device under test (DUT) 120, with the DUT 120 containing a chip 121 to be calibrated. Specifically, this scenario could be a production line testing scenario for the chip 121, or a scenario where testing is performed with the DUT 120 powered off. Testing with the DUT 120 powered off reduces interference and improves testing performance. The chip 121 receives calibration commands from the data processing device 110 to perform the relevant steps for current acquisition function calibration. The chip 121 can be any chip with current acquisition capabilities; this embodiment does not limit the specific type of the chip 121.
[0039] In this embodiment, the chip 121 to be calibrated includes a current acquisition module for current measurement. Ideally, when the current is zero, the current acquisition module should be able to accurately output a zero value, indicating that no current is flowing through it. However, in practical applications, this ideal situation is often affected by various factors, so measures need to be taken to ensure the accuracy and reliability of the measurement.
[0040] In one embodiment, the chip to be calibrated can be a fuel gauge chip. The fuel gauge chip is used to determine the battery's state of charge and health, and to estimate the battery's state of charge. A high-precision fuel gauge chip can accurately provide battery power information, enabling accurate estimation of the remaining usage time of the electronic device and avoiding problems such as unexpected shutdown and data loss due to inaccurate battery state of charge estimation. For electronic devices, the fuel gauge chip constantly monitors the health of the phone battery. When the battery is low, the fuel gauge chip will issue a timely warning to remind the user to charge, preventing the electronic device from suddenly shutting down. Furthermore, the fuel gauge chip can also have protection functions to prevent over-discharging or overcharging of the battery, which could shorten its lifespan.
[0041] It should be noted that if the current collected by the fuel gauge chip is inaccurate during normal use of an electronic device equipped with a fuel gauge chip, it will affect the accuracy of the battery level display. Therefore, the error determination method provided later in this application can be used to determine the current measurement error value of the fuel gauge chip, and then use the current measurement error value for subsequent current collection, thereby improving the accuracy of the battery level display of the electronic device.
[0042] Figure 1 The data processing device 110 is illustrated using a desktop computer as an example, and the device under test 120 is illustrated using a mobile phone as an example. It should be understood that the embodiments of this application do not limit the types of the data processing device 110 and the device under test 120. For example, in other embodiments of this application, the data processing device 110 or the device under test 120 may be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, laptop, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) device, virtual reality (VR) device, artificial intelligence (AI) device, wearable device, in-vehicle device, smart home device and / or smart city device, etc.
[0043] In another embodiment, the chip 121 to be calibrated can also directly receive calibration instructions sent from the device under test 120 and perform the relevant steps of current acquisition function calibration without going through the data processing device 110.
[0044] In related technologies, due to hardware defects in certain chips, zero-drift polarization anomalies can occur. Zero-drift polarization refers to the chip's ability to collect current even when it is in a zero-current state (i.e., no current flows in the chip circuitry), and the collected current randomly jumps between the positive and negative terminals. This polarization jump severely affects the accuracy of the current measurement error value. For ease of explanation, in the embodiments of this application, the module within the chip to be calibrated that exhibits zero-drift polarization interference in current collection will be referred to as the zero-drift interference module.
[0045] Reference Figure 2 This diagram illustrates the effect of polarization current according to an embodiment of this application. Current polarization includes positive zero bias and negative zero bias. Positive zero bias means that, ideally, the chip can acquire a positive current value when the current is zero. Conversely, negative zero bias means that, ideally, the chip can acquire a negative current value when the current is zero. During the chip's current acquisition process, if the aforementioned zero-drift polarization phenomenon occurs, it will severely affect the accuracy of current acquisition.
[0046] In view of this, this application discloses a method for determining current acquisition error and a current acquisition method. The main difference lies in the process of determining the current acquisition error. Besides considering interference from the external environment of the chip, the method also considers the chip's own current acquisition error. This chip's own current acquisition error may originate from modules within the chip that are unrelated to current acquisition. These modules may introduce zero-drift polarization interference during operation. Therefore, this application eliminates the zero-drift interference caused by unrelated modules during the chip error determination process. Then, by acquiring current multiple times while the chip is in a zero-current state, the current measurement error value is finally analyzed and found to be relatively accurate. This current measurement error value is saved and used for subsequent chip current acquisition, allowing for error correction and significantly improving the accuracy of chip current acquisition.
[0047] Reference Figure 3 The diagram illustrates a flowchart of a current acquisition error determination method provided in an embodiment of this application. This error determination method is applied to a chip to be calibrated. The following section discusses... Figure 3 The steps shown will be explained.
[0048] Step 301: Upon receiving a calibration instruction, perform the first processing on each zero-drift interference module.
[0049] It should be noted that the chip to be calibrated includes at least one zero-drift interference module. The zero-drift interference module is a module that causes zero-drift interference to the first acquisition process. The first acquisition process is the process of acquiring current when the chip to be calibrated is in a zero-current state. The first processing is used to eliminate or determine the zero-drift interference of the zero-drift interference module to the first acquisition process.
[0050] The calibration command can be sent by an external data processing device or by the device under test itself, and is used to instruct the chip to be calibrated to perform zero-drift calibration.
[0051] In one embodiment, the chip to be calibrated includes at least one zero-drift interference module comprising a protection module and a voltage acquisition module (also referred to as a power acquisition module). The protection module is typically used to protect the circuit from abnormal conditions such as overcurrent and overvoltage. Under certain circumstances, the protection module may shunt current to prevent chip damage. The voltage acquisition module can be used to monitor and manage the power supply status, ensuring that the chip to be calibrated operates under safe and efficient conditions. Considering the hardware design of the chip to be calibrated, generally, the power supplies of the current acquisition module, protection module, and voltage acquisition module belong to the same power domain, and the current polarization interference generated by the protection module and voltage acquisition module is relatively significant. A power domain refers to a group of circuits or modules sharing the same power supply, where the supply voltage and reference voltage of each module within that power domain are the same. This design approach has advantages such as simplified design, fewer components, and lower cost. Therefore, during the chip error determination process, the protection module and voltage acquisition module can be identified as zero-drift interference modules and subjected to initial processing to eliminate polarization interference.
[0052] It should be noted that, according to testing, the zero-drift interference module will shunt current and generate polarized noise interference when working normally, which affects the accuracy of current acquisition. The reason may be that the power supply of the zero-drift interference module and the power supply of the current acquisition module belong to the same power domain.
[0053] Taking a fuel gauge chip as an example, a fuel gauge chip typically includes a protection module and a voltage acquisition module. In the hardware design of the fuel gauge chip, the power supply of the current acquisition module shares the same power domain with the protection module and the power acquisition module. While this design simplifies the circuit and reduces costs in some aspects, it also introduces some potential problems, especially regarding the accuracy of current acquisition. When the protection module and the power acquisition module are operating, these modules may divert some current to other paths. This diversion causes changes in the current distribution within the power domain. When current is diverted, it may cause voltage fluctuations and instantaneous changes within the power domain. These changes generate noise, which can lead to instability in the output signal of the current acquisition module, thus affecting the readings of the current acquisition module. In addition, due to voltage fluctuations within the power domain, the reference voltage of the current acquisition module may also be affected, further reducing the accuracy of the measurement.
[0054] Therefore, in order to eliminate the error caused by current polarization jumps, this application provides two solutions.
[0055] The first method to eliminate current polarization jumps: This method is relatively direct. It temporarily disconnects the power supply to each zero-drift interference module, thereby shutting down the zero-drift interference module. Subsequent current calibration is then performed, which can reduce current acquisition errors during normal chip operation. That is, as a possible implementation of this application embodiment, the first processing in step 301 above may include: shutting down each zero-drift interference module by disconnecting the power supply to it.
[0056] It should be noted that if the first method is adopted, after all the steps are completed, the power supply to each zero-drift interference module should be restored in time and each zero-drift interference module should be turned on to avoid affecting the normal operation of the chip to be calibrated.
[0057] The second method to eliminate current polarization jumps: In practical applications, the chip to be calibrated may perform other services while executing the error determination method. If the priority of other services is high, the zero-drift interference module may not be able to be turned off. In this case, it is necessary to wait for the other services to complete before zero-drift calibration can be performed. Therefore, in order to improve the flexibility of the solution in this application, the impact of each zero-drift interference module on the chip current acquisition can be considered separately and statistical analysis can be performed. The final interference result is used to determine the error value of the chip's subsequent current measurement. That is, as a possible implementation of the embodiment of this application, the first processing adopted in step 301 above may include: determining the interference result of each zero-drift interference module on the first acquisition process.
[0058] In one embodiment, the on / off state of each zero-drift interference module can first be recorded. Based on the different on / off states of each zero-drift interference module, current values are collected multiple times. This current collection process should be performed when the chip to be calibrated is in a zero-current state. Next, the collected current values are grouped, with each group corresponding to a different combination of zero-drift interference modules being on or off. For each group of current data, linear regression or other suitable fitting methods can be used for processing. An interference curve is generated based on the fitting results to evaluate the stability and noise level of that group of data. The interference curve reflects the interference effect of the corresponding zero-drift interference module on the first collection process.
[0059] Step 302: After all zero-drift interference modules have undergone the first processing, execute at least one first acquisition process to obtain the current value acquired in each first acquisition process.
[0060] In this embodiment, the first acquisition process can be repeated until the number of times the first acquisition process is executed reaches a set acquisition number threshold. By acquiring current multiple times and using the results of the current acquisition for subsequent analysis and processing, noise interference from current acquisition can be eliminated to a certain extent.
[0061] In one embodiment, after current acquisition is performed on the chip to be calibrated in a zero-current state, the acquired current value can be filtered to further eliminate noise interference. Filtering involves processing the signal using a specific algorithm or mathematical model to eliminate or reduce unwanted frequency components while retaining the desired signal information. Since the current signal may be affected by electromagnetic interference, thermal noise, etc., during acquisition, filtering can effectively remove these interferences. Furthermore, filtering can smooth the current signal, facilitating subsequent analysis and processing.
[0062] Step 303: Determine the current measurement error value based on the current value acquired in each first acquisition process.
[0063] In one embodiment, if step 301 employs the aforementioned first method for eliminating current polarization jumps, then the average value of the current values acquired in each first acquisition process can be determined as the current measurement error value. Determining the current measurement error value by acquiring current multiple times and averaging the results can eliminate noise interference in current acquisition and improve the accuracy of the current measurement error value. Alternatively, the current measurement error value can be determined by averaging the remaining current values after discarding the largest and smallest current values.
[0064] In another embodiment, if step 302 employs the aforementioned second method for eliminating current polarization jumps, then in determining the current measurement error value, in addition to analyzing the current value acquired in each first acquisition process, it is also necessary to consider the interference results of each zero-drift interference module on the first acquisition process, and comprehensively analyze and determine the final current measurement error value. That is, the current measurement error value is determined based on the current value acquired in each first acquisition process and the interference results of each zero-drift interference module on the first acquisition process.
[0065] In one possible implementation, the interference result of each zero-drift interference module on the first acquisition process is presented in the form of an interference curve. Step 303 may specifically include: calibrating the current value acquired in each first acquisition process using the saved interference curve, and then using the aforementioned cumulative averaging method on the calibrated current values to finally determine the current measurement error value.
[0066] The current acquisition error determination method provided in this application mainly considers not only the interference from the external environment of the chip but also the chip's own current acquisition error during the current acquisition error determination process. The chip's own current acquisition error may originate from modules within the chip that are unrelated to current acquisition. These modules may introduce zero-drift polarization interference problems during operation. Therefore, this application eliminates the zero-drift interference problem caused by unrelated modules during the chip error determination process. Then, by acquiring current multiple times with the chip in a zero-current state, the final current measurement error value is analyzed and found to be relatively accurate. This current measurement error value is saved and used for subsequent chip current acquisition, allowing for error correction and significantly improving the accuracy of chip current acquisition.
[0067] Figure 4 This illustration shows a schematic diagram of the software processing flow for a chip to be calibrated to perform the aforementioned error determination method, according to an embodiment of this application. It should be noted that the chip to be calibrated, during the execution... Figure 4 The process shown requires a zero-current state. For example, the electronic device containing the chip to be calibrated can be powered off.
[0068] The following is about Figure 4 The steps shown will be explained.
[0069] Step 401, Zero Drift Calibration Begins.
[0070] The chip 121 to be calibrated can determine the start of zero-drift calibration upon receiving a calibration command. The calibration command can be sent by an external data processing device or by the electronic device itself containing the chip to be calibrated.
[0071] Step 402: Enter calibration mode.
[0072] It should be noted that when the chip to be calibrated is in calibration mode, you should first check its current operating status to ensure it is ready for calibration. You can also check that the external environment of the chip (such as temperature and humidity) is within acceptable ranges to avoid environmental factors affecting the calibration results.
[0073] Step 403: Turn off the protection module and voltage acquisition module.
[0074] Since the protection module and voltage acquisition module may cause zero-drift polarization interference to the chip current acquisition when they are working, the zero-drift interference module needs to be temporarily turned off during the zero-drift calibration process.
[0075] Step 404: Determine whether the current acquisition is complete. If yes, proceed to step 405; otherwise, repeat step 404.
[0076] In this embodiment, a threshold for the number of current acquisitions can be preset. The chip to be calibrated continuously acquires current until the number of current acquisitions reaches the preset threshold. By acquiring current multiple times and using the results for subsequent analysis and processing, noise interference from current acquisition can be eliminated to some extent.
[0077] Step 405: Current filtering, average value calculation, and current measurement error value obtained.
[0078] In one embodiment, the current collected multiple times can be filtered and averaged to obtain the current measurement error value.
[0079] Step 406: Save the current measurement error value.
[0080] In this process, after saving the current measurement error value, the current measurement error value is used to calibrate the current value collected by the chip in real time during the actual application of the chip, and the calibrated current value is more accurate.
[0081] Step 407: Exit calibration mode and turn on the protection module and voltage acquisition module.
[0082] Once the current measurement error value is determined, the protection module and voltage acquisition module need to be turned on in a timely manner to avoid affecting the normal operation of subsequent chips.
[0083] The software processing flow of the error determination method provided in the above embodiments of this application addresses the issue that the protection module and voltage acquisition module shunt current and generate polarization noise interference during normal operation, affecting the accuracy of current acquisition. Therefore, to eliminate the error caused by current polarization jumps, the most direct approach is adopted: temporarily shutting down the protection module and voltage acquisition module before performing subsequent current calibration. This reduces current acquisition errors during normal chip operation.
[0084] Figure 5 This diagram illustrates the information interaction of an error determination method for current acquisition provided in an embodiment of this application. It should be noted that the chip to be calibrated executes... Figure 5 The process shown requires a zero-current state; for example, the electronic device containing the chip to be calibrated can be powered off. Additionally, the communication module, analog service module, and analog-to-digital converter (ADC) interrupt are some of the functional modules included in the chip to be calibrated.
[0085] The following is about Figure 5 The steps shown will be explained.
[0086] Step 501: The data processing device sends a calibration command to the communication module of the chip to be calibrated.
[0087] The calibration command is used to instruct the chip to be calibrated to enter calibration mode. Optionally, the data processing device can be a host computer.
[0088] In some other embodiments, the calibration command may also be sent by the electronic device itself containing the chip to be calibrated.
[0089] Step 502: The communication module sends a calibration initialization message to the analog service module of the chip to be calibrated.
[0090] It should be noted that the communication module can send the constructed calibration initialization message to the analog service module of the chip to be calibrated through an applicable communication protocol. The calibration initialization message may include information such as the calibration type and parameters.
[0091] Step 503: The analog service module shuts down the protection module and voltage acquisition module, and turns on the current acquisition module.
[0092] Because the protection module and voltage acquisition module may introduce zero-drift polarization interference to the chip's current acquisition, the zero-drift interference module needs to be temporarily shut down during zero-drift calibration. Furthermore, by acquiring current data multiple times and using the results for subsequent analysis and processing, noise interference from the current acquisition can be reduced to some extent.
[0093] Step 504: The ADC interrupt of the chip to be calibrated reads the current value collected by the current acquisition module and accumulates it until the number of current acquisitions reaches the acquisition threshold. Then, the current measurement error value is determined and saved.
[0094] ADC interrupts are a mechanism used to notify the microcontroller unit (MCU) or processor when the ADC completes data conversion. ADC interrupts enable efficient data processing, avoid polling the ADC status, thereby saving system resources and improving response speed.
[0095] In one embodiment, the current sampling frequency can be preset, for example, configured to sample once per second. Then, an ADC interrupt will occur every second, resulting in a current value. These current values are then accumulated until the number of samplings reaches a threshold. Next, all sampled current values are calculated, for example, by taking the average, to obtain the final result, which is the current measurement error value.
[0096] Step 505: The analog service module obtains the message that the current measurement error value has been saved.
[0097] In one embodiment, the ADC interrupt can set a global variable or flag to indicate that the current measurement error value has been saved. The analog service module checks this flag in the ADC interrupt main loop, and if it finds that the current measurement error value has been saved, it performs the appropriate processing.
[0098] In another embodiment, a callback function can be registered during ADC interrupt initialization. When the ADC determines and saves the current measurement error value, this callback function will be automatically called to notify the analog service module.
[0099] Step 506: The analog service module turns on the protection module and voltage acquisition module, and exits the calibration.
[0100] Once the current measurement error value is determined, the protection module and voltage acquisition module need to be turned on in a timely manner to avoid affecting the normal operation of subsequent chips.
[0101] Step 507: The data processing device sends an exit calibration command to the communication module.
[0102] It should be noted that the data processing device can send an exit calibration command to the communication module when it receives a user instruction, and it can also automatically send an exit calibration command to the communication module after calculating and saving the current measurement error value.
[0103] In some other embodiments, the exit calibration command may also be sent by the electronic device itself containing the chip to be calibrated.
[0104] Step 508: The communication module clears calibration-related data.
[0105] It should be noted that after calibration, the communication module needs to clear all data related to this calibration, such as calibration initialization messages and acquired current values.
[0106] The current acquisition error determination method provided in the above embodiments of this application addresses the issue that the protection module and voltage acquisition module shunt current and generate polarization noise interference during normal operation, affecting the accuracy of current acquisition. Therefore, to eliminate the error caused by current polarization jumps, the most direct approach is adopted: temporarily shutting down the protection module and voltage acquisition module before performing subsequent current calibration. This reduces current acquisition errors during normal chip operation.
[0107] To make the effects of the above embodiments clearer, the following will be combined with... Figure 6 The effects achieved by the aforementioned method for determining the error of current acquisition are explained.
[0108] Figure 6 A schematic diagram of a calibrated current acquisition operating point provided in an embodiment of this application is shown. Figure 6 As shown, after adopting the error determination method in the embodiments of this application, the chip to be calibrated can reach a relatively stable operating point (i.e., Figure 6 Zero drift calibration is performed near the polarization current calibration point in the system, resulting in a more accurate current measurement error value.
[0109] Figure 7 A schematic flowchart of a current acquisition method according to an embodiment of this application is shown. This current acquisition method calibrates the current measurement value using a current measurement error value, which is the error value determined by the current acquisition error determination method in the aforementioned embodiments.
[0110] The following is about Figure 7 The steps shown will be explained.
[0111] Step 701: Collect the current and obtain the current measurement value.
[0112] This current acquisition method can be applied to chips with current acquisition capabilities, such as fuel gauge chips. The chip can include a current acquisition module, which can then acquire current to obtain a measured current value.
[0113] Step 702: Use the current measurement error value to calibrate the current measurement value to obtain the actual current value.
[0114] For example, if the chip under test stores a current measurement error value of +5mA, and the chip under test detects a current measurement value of +20mA, then the actual current value should be the difference between the current measurement value and the current measurement error value, which is +15mA.
[0115] The current acquisition method provided in the above embodiments of this application first obtains the accurate current measurement error value of the chip under test by using the current acquisition error determination method in the aforementioned embodiments. Then, during the actual current acquisition process, the chip under test can first acquire the current normally to obtain the current measurement value, and then use the current measurement error value to calibrate the current measurement value to obtain the actual current value, thereby improving the accuracy of chip current acquisition.
[0116] The methods of the embodiments of this application have been described above with reference to the accompanying drawings. It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially, these steps are not necessarily executed in the order shown in the figures. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the steps or stages of other steps. The apparatus of the embodiments of this application will now be described with reference to the accompanying drawings.
[0117] Reference Figure 8 This is a schematic diagram of a current acquisition error determination device provided in an embodiment of this application. For ease of explanation, only the parts related to the embodiment of this application are shown. Figure 8 As shown, the current acquisition error determination device 800 includes a receiving unit 801 and a processing unit 802. This current acquisition error determination device 800 can be integrated into an electronic device. For example, the current acquisition error determination device 800 can also be used to perform… Figure 3 The process is shown.
[0118] The current acquisition error determination device 800 can be used to execute any of the current acquisition error determination methods described above. For example, the receiving unit 801 can be used to execute step 301, and the processing unit 802 can be used to execute step 302 or step 303.
[0119] The current acquisition error determination device provided in this application mainly considers not only the interference from the external environment of the chip but also the chip's own current acquisition error during the current acquisition error determination process. The chip's own current acquisition error may originate from modules within the chip that are unrelated to current acquisition. These modules may introduce zero-drift polarization interference problems during operation. Therefore, this application eliminates the zero-drift interference problem caused by unrelated modules during the chip error determination process. Then, by acquiring current multiple times with the chip in a zero-current state, the final current measurement error value is analyzed and found to be relatively accurate. This current measurement error value is saved and used for subsequent chip current acquisition, allowing for error correction and significantly improving the accuracy of chip current acquisition.
[0120] It should be noted that the explanation of the aforementioned embodiment of the current acquisition error determination method also applies to the current acquisition error determination device 800 of this embodiment, and will not be repeated here.
[0121] Reference Figure 9 This is a schematic diagram of a current acquisition device provided in an embodiment of this application. For ease of explanation, only the parts related to the embodiment of this application are shown. Figure 9 As shown, the current acquisition device 900 includes an acquisition unit 901 and a processing unit 902. The current acquisition device 900 can be integrated into an electronic device. For example, the current acquisition device 900 can also be used to perform... Figure 7 The process is shown.
[0122] The current acquisition device 900 can be used to execute any of the current acquisition methods described above. For example, the acquisition unit 901 can be used to execute step 701, and the processing unit 902 can be used to execute step 702.
[0123] The current acquisition device provided in this application first obtains the accurate current measurement error value of the chip under test by using the current acquisition error determination method in the aforementioned embodiments. Then, during the actual current acquisition process, the chip under test can first acquire the current normally to obtain the current measurement value, and then use the current measurement error value to calibrate the current measurement value to obtain the actual current value, thereby improving the accuracy of chip current acquisition.
[0124] It should be noted that the foregoing explanation of the current acquisition method embodiment also applies to the current acquisition device of this embodiment, and will not be repeated here.
[0125] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0126] Figure 10 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. The electronic device may include the aforementioned chip to be calibrated, such as... Figure 10 As shown, the electronic device 1000 may include a central processing unit (CPU) 1010, an external memory interface 1020, an internal memory 1021, a universal serial bus (USB) interface 1030, a charging management module 1040, a power management module 1041, a battery 1042, antenna 1, antenna 2, a mobile communication module 1050, a wireless communication module 1060, an audio module 1070, a speaker 1070A, a receiver 1070B, a microphone 1070C, a headphone jack 1070D, a sensor module 1080, buttons 1090, a motor 1091, an indicator 1092, a camera 1093, a display screen 1094, and a subscriber identification module (SIM) card interface 1095, etc. The sensor module 1080 may include a pressure sensor 1080A, a gyroscope sensor 1080B, a barometric pressure sensor 1080C, a magnetic sensor 1080D, an accelerometer sensor 1080E, a distance sensor 1080F, a proximity sensor 1080G, a fingerprint sensor 1080H, a temperature sensor 1080J, a touch sensor 1080K, an ambient light sensor 1080L, a bone conduction sensor 1080M, etc. It should be understood that the steps in the foregoing method embodiments are executed by the processor 1010 of the electronic device.
[0127] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 1000. In other embodiments of this application, the electronic device 1000 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0128] For example, Figure 10 The processor 1010 shown may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.
[0129] The controller can be the nerve center and command center of the electronic device 1000. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of instruction fetching and execution.
[0130] The processor 1010 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 1010 is a cache memory. This memory can store instructions or data that the processor 1010 has just used or that are used repeatedly. If the processor 1010 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 1010, and thus improves the efficiency of the system.
[0131] In some embodiments, the MIPI interface can be used to connect the processor 1010 to peripheral devices such as the display screen 1094 and the camera 1093. The MIPI interface includes a camera serial interface (CSI) and a display serial interface (DSI). The processor 1010 and the display screen 1094 communicate through the DSI interface to realize the display function of the electronic device 1000.
[0132] In some embodiments, the GPIO interface can be configured via software. The GPIO interface can be configured as a control signal or a data signal. The GPIO interface can be used to connect the processor 1010 to a camera 1093, a display screen 1094, a wireless communication module 1060, an audio module 1070, a sensor module 1080, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0133] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the electronic device 1000. In other embodiments of this application, the electronic device 1000 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0134] Electronic device 1000 implements display functions through a GPU, a display screen 1094, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 1094 and the application processor. The GPU performs mathematical and geometric calculations and is used for graphics rendering. Processor 1010 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0135] The display screen 1094 is used to display images, videos, etc. The display screen 1094 includes a display panel. In some embodiments, the electronic device 1000 may include one or N display screens 1094, where N is a positive integer greater than 1.
[0136] Internal memory 1021 can be used to store computer executable program code, which includes instructions. Processor 1010 executes various functional applications and data processing of electronic device 1000 by running the instructions stored in internal memory 1021. Internal memory 1021 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 1000 (such as audio data, phonebook, etc.). Furthermore, internal memory 1021 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0137] Pressure sensor 1080A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 1080A can be disposed on display screen 1094. There are many types of pressure sensors 1080A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 1080A, the capacitance between the electrodes changes. Electronic device 1000 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 1094, electronic device 1000 detects the intensity of the touch operation based on pressure sensor 1080A. Electronic device 1000 can also calculate the touch position based on the detection signal from pressure sensor 1080A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands. For example, when a touch operation with a touch operation intensity less than a first pressure threshold is applied to the SMS application icon, a command to view SMS messages is executed. When a touch operation with a strength greater than or equal to the first pressure threshold is applied to the SMS application icon, the instruction to create a new SMS message is executed.
[0138] The touch sensor 1080K, also known as a "touch panel," can be located on the display screen 1094. The touch sensor 1080K and the display screen 1094 together form a touchscreen, also known as a "touch screen." The touch sensor 1080K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 1094. In other embodiments, the touch sensor 1080K may also be located on the surface of the electronic device 1000, in a different position than the display screen 1094.
[0139] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0140] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0141] This application also provides an electronic device comprising: one or more processors, a memory, and a computer program stored in the memory and executable on the one or more processors. When the one or more processors execute the computer program, the electronic device can perform the steps in any of the methods described above. This application also provides a computer-readable storage medium storing a computer program, which, when executed by an electronic device, can perform the steps in the various method embodiments described above.
[0142] The computer-readable medium may include at least: any entity or device capable of carrying computer program code to a photographic / electronic device, recording media, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media. Examples include USB flash drives, portable hard drives, magnetic disks, or optical discs. In some jurisdictions, according to legislation and patent practice, computer-readable media may not be electrical carrier signals or telecommunication signals.
[0143] This application provides a computer program product, which includes a computer program that, when executed by an electronic device, can implement the steps described in the various method embodiments above. The computer program includes computer program code, which may be in the form of source code, object code, executable file, or some intermediate form.
[0144] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0145] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0146] In the embodiments provided in this application, it should be understood that the disclosed apparatus / devices and methods can be implemented in other ways. For example, the apparatus / device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0147] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0148] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0149] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0150] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0151] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0152] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for determining the error of current acquisition, characterized in that, The method is applied to a chip to be calibrated, the chip including at least one first module, the first module being a module subject to zero-drift interference in a first acquisition process, the first acquisition process being a process of acquiring current when the chip to be calibrated is in a zero-current state; the method includes: Upon receiving a calibration instruction, a first process is performed on each of the first modules, wherein the first process is used to eliminate or determine the zero-drift interference of the first module on the first acquisition process; After performing the first processing on all the first modules, the first acquisition process is executed at least once to obtain the current value acquired in each of the first acquisition processes; The current measurement error value is determined based on the current value acquired in each of the first acquisition processes.
2. The method for determining the error of current acquisition according to claim 1, characterized in that, The first processing performed on each of the first modules includes: Disconnect the power supply to each of the first modules.
3. The method for determining the error of current acquisition according to claim 1 or 2, characterized in that, The step of determining the current measurement error value based on the current value acquired in each of the first acquisition processes includes: The average value of the current values acquired in each of the first acquisition processes is determined as the current measurement error value.
4. The method for determining the error of current acquisition according to any one of claims 1-3, characterized in that, After determining the current measurement error value based on the current value acquired in each of the first acquisition processes, the method further includes: Power is restored to each of the first modules.
5. The method for determining the error of current acquisition according to claim 1, characterized in that, The first processing performed on each of the first modules includes: The interference results of each of the first modules on the first acquisition process are determined respectively.
6. The method for determining the error of current acquisition according to claim 5, characterized in that, The step of determining the current measurement error value based on the current value acquired in each of the first acquisition processes includes: The current measurement error value is determined based on the current value acquired in each of the first acquisition processes and the interference result of each of the first modules on the first acquisition process.
7. The method for determining the error of current acquisition according to any one of claims 1-6, characterized in that, The chip to be calibrated is a fuel gauge chip.
8. The method for determining the error of current acquisition according to any one of claims 1-7, characterized in that, The chip to be calibrated includes at least one first module, which includes a protection module and a voltage acquisition module.
9. A current acquisition method, characterized in that, The method is applied to the chip to be calibrated, including: The current is collected to obtain the measured current value; The current measurement value is calibrated using the current measurement error value to obtain the actual current value, wherein the current measurement error value is the error value determined by the method according to any one of claims 1-8.
10. An electronic device, characterized in that, The electronic device includes: one or more processors, and memory; The memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, the one or more processors invoking the computer instructions to cause the electronic device to perform the method as described in any one of claims 1 to 8, or to perform the method as described in claim 9.
11. A chip system, characterized in that, The chip system is applied to an electronic device, the chip system including one or more processors, the one or more processors being configured to invoke computer instructions to cause the electronic device to perform the method as described in any one of claims 1 to 8, or to perform the method as described in claim 9.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes instructions that, when executed on an electronic device, cause the electronic device to perform the method as claimed in any one of claims 1 to 8, or to perform the method as claimed in claim 9.
13. A computer program product, characterized in that, The computer program product includes a computer program that, when run on an electronic device, causes the electronic device to perform the method as claimed in any one of claims 1 to 8, or to perform the method as claimed in claim 9.