A method, device, equipment and medium for collecting battery power based on a UWB positioning card
By combining initial total capacity and real-time voltage detection, the problem of inaccurate battery power assessment of UWB positioning cards was solved, enabling accurate calculation of battery power and extending battery life, reducing the maintenance cost of positioning cards, and ensuring the safety of underground workers.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING BESTWAY AUTOMATION SYST
- Filing Date
- 2026-02-10
- Publication Date
- 2026-06-19
AI Technical Summary
Traditional UWB positioning cards have high and inaccurate battery power assessment costs, resulting in short battery life and large errors in power calculation, which affect the safety of underground workers.
The method combines the initial total capacity minus the accumulated power consumption with real-time voltage detection. The battery power is determined by comparing the difference between the two power values. A voltage divider detection circuit and MOSFET control are used to reduce static power consumption.
It enables accurate calculation of battery power, extends battery life, reduces the maintenance cost of positioning cards, and ensures the safety of underground workers.
Smart Images

Figure CN122246307A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of map drawing technology, and in particular to a method, apparatus, device, and medium for collecting battery power based on a UWB positioning card. Background Technology
[0002] With the continuous development of China's industrial level, the number of people engaged in fields such as coal mining, chemical industry, petroleum, and metallurgy is constantly increasing. Positioning cards are crucial to the personal safety of underground workers; therefore, the operational stability of the positioning cards is extremely important, especially the stability of their main power supply components. Lithium-manganese batteries, as disposable non-rechargeable batteries, are widely used in the power supply field of UWB positioning cards.
[0003] Currently, there are two main methods for assessing battery power using a positioning card: Method 1 assesses battery power using a dedicated power metering chip (coulomb counter). This approach has high hardware costs, high static power consumption of the positioning card, and short battery life.
[0004] Method 2 involves a simple voltage division using resistors to assess battery power. Because lithium-manganese batteries have stable voltage performance, the voltage drop throughout the entire discharge cycle is only about 0.3V. However, the UWB positioning card consumes extremely high power (around 300mA) when transmitting and receiving data, making the method of calculating battery power by collecting battery voltage highly inaccurate. On the one hand, premature battery replacement leads to underutilization of the battery, increasing costs. On the other hand, overestimating the battery power can result in the battery suddenly failing to support the UWB positioning card after personnel are deployed underground, causing loss of the personnel's location and threatening their lives in emergencies. Summary of the Invention
[0005] This application provides a method, apparatus, device, and medium for collecting battery power based on a UWB positioning card, which solves the problems of high cost and inaccuracy in traditional UWB positioning card power collection.
[0006] The first aspect of this application provides a method for collecting battery power based on a UWB positioning card, comprising: The first power value is obtained by subtracting the total accumulated power consumption of UWB positioning from the initial total capacity; Simultaneously with the above steps, the real-time voltage is detected, and a second electrical quantity value is obtained based on the pre-determined relationship between voltage and electrical quantity. Compare the difference between the first power value and the second power value. If the difference is less than a preset range, take the average of the first power value and the second power value as the battery power. Otherwise, take the second power value as the battery power.
[0007] Preferably, the method further includes identifying that the reset reason for the UWB positioning card's power failure and restart is power-on, determining that the UWB positioning card has had its battery replaced, and then starting to synchronously perform the above-mentioned calculation of the first power value and the second power value.
[0008] Preferably, obtaining the first power value by subtracting the sum of accumulated UWB positioning power consumption from the initial total capacity includes: The number of times the UWB positioning card is used is counted, and the power consumption of a single UWB positioning is multiplied by the number of positioning times to obtain the current cumulative power consumption of UWB positioning.
[0009] Preferably, the pre-determined power consumption for a single UWB positioning operation is obtained through the following method: Connect the UWB positioning card to the power consumption tester, and use the power consumption tester to perform real-time power consumption statistics on the UWB positioning card to obtain the single power consumption of the UWB positioning card. The pre-determined power consumption for a single UWB positioning operation is obtained by averaging the power consumption of multiple UWB positioning cards in a single operation.
[0010] Preferably, the real-time voltage detection includes: setting a voltage divider detection circuit across the battery terminals in the UWB positioning card, and the voltage divider detection circuit includes a MOS transistor. The switching of the MOS transistor is controlled according to a preset voltage detection cycle, so that the voltage divider detection circuit is connected to the battery during voltage detection and disconnected from the battery at other times.
[0011] Preferably, the real-time voltage detection includes: The voltage of the battery in the current voltage detection cycle is the first voltage; The second voltage is obtained by reading the battery voltage stored in the previous voltage detection cycle. Compare the first voltage and the second voltage. If the difference between the first voltage and the second voltage is less than 0.001V, take the smaller of the first voltage and the second voltage as the real-time voltage detected in the current voltage detection cycle and store it.
[0012] Preferably, the voltage of the battery in the current voltage detection cycle is a first voltage, including: The real-time ambient temperature is measured in T. The voltage of the battery during the current voltage detection cycle is U1. If the real-time ambient temperature is below 10℃, the first voltage is U1 + 0.005V; otherwise, the first voltage is U1.
[0013] A second aspect of this application provides a device for collecting battery power based on a UWB positioning card, comprising: The first power module is used to obtain the first power value by subtracting the total power consumed by UWB positioning from the initial total capacity; The second power module is used to synchronously perform real-time voltage detection with the first power module and obtain a second power value based on the pre-determined relationship between voltage and power. The comparison output module is used to compare the difference between the first power value and the second power value. When the difference is less than a preset range, the average of the first power value and the second power value is taken as the battery power. Otherwise, the second power value is taken as the battery power.
[0014] A third aspect of this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it causes the electronic device to perform the method described in the first aspect of this application.
[0015] A fourth aspect of this application provides a computer-readable storage medium for storing a computer program that, when run on a computer, causes the computer to perform the method described in the first aspect of this application.
[0016] In this embodiment, two methods for calculating battery power are used each time the battery level is measured, and the difference between the two power values is compared to determine the battery level value each time. By using a scientific algorithm to calculate the remaining battery capacity of the UWB positioning card, the problem of miners being unable to measure distances properly after wearing the positioning card underground due to inaccurate power calculation is solved, thus posing a life-threatening risk to miners. This invention achieves extremely low static power consumption in the battery power acquisition circuit through simple circuit design and low-cost components by turning the MOSFET on and off, thereby extending battery life and reducing the maintenance cost of the positioning card. Attached Figure Description
[0017] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a flowchart of a method for collecting battery power based on a UWB positioning card according to an embodiment of this application.
[0018] Figure 2 This is a schematic diagram of a voltage divider circuit according to an embodiment of this application.
[0019] Figure 3 This is a schematic diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0020] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0021] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0022] Embodiments of the present invention provide a method for collecting battery power based on a UWB positioning card, such as... Figure 1 The diagram illustrates a flowchart of a method for collecting battery power based on a UWB positioning card, as described in this application. The process begins with replacing the battery and continues throughout the new battery's discharge cycle, thereby detecting the new battery's power level. Specifically, when the battery is replaced, the UWB positioning card is powered off and restarted. After the system restarts, the processor reads the reset reason. If the reset reason is power-on, the UWB positioning card records the current state as battery replacement. The detection of a battery replacement by the UWB positioning card signifies the start of a new discharge cycle.
[0023] Depend on Figure 1 It is understood that with the use of UWB positioning cards, the method includes: Step S101: Obtain the first power value by subtracting the sum of accumulated UWB positioning power consumption from the initial total capacity.
[0024] Step S102: Detect the real-time voltage simultaneously with the above steps, and obtain the second electrical quantity value based on the pre-determined relationship between voltage and quantity.
[0025] Step S103: Compare the difference between the first power value and the second power value. If the difference is less than a preset range, take the average of the first power value and the second power value as the battery power. Otherwise, take the second power value as the battery power.
[0026] In the above method, steps S101 and S102 are performed synchronously, that is, steps S101 and S102 are executed synchronously after the start of a new discharge cycle.
[0027] Step S101 calculates the remaining power by subtracting the total power consumption from the initial total capacity. Since the power consumption of each UWB positioning card during each positioning and signal transmission is basically consistent, this method can accurately calculate the total power consumption. The accuracy of this method also depends on the accuracy of the initial total capacity. For batteries with good consistency, their initial total capacity matches the nominal capacity. However, for batteries with poor consistency, their actual initial total capacity often falls short of the nominal capacity. Therefore, using the nominal capacity as the first power value to be included in the initial total capacity calculation in step S101 often results in a significant error.
[0028] Step S102 is based on the clear correspondence between voltage and charge, and obtains the remaining charge by measuring the real-time voltage. This method focuses on real-time voltage rather than the amount of charge consumed; therefore, this measurement principle will not be affected by falsely labeled batteries.
[0029] For batteries with good consistency in a batch of products, the remaining capacity calculated by the two methods mentioned above is almost the same. However, for batteries with poor consistency, the remaining capacity calculated by the two methods will differ significantly. Therefore, if the difference between the first capacity value and the second capacity value is found to be too large, the first capacity value is abandoned and only the second capacity value is used. In the embodiments of the present invention, when the difference between the first capacity value and the second capacity value is within 15% of the nominal capacity, the difference is considered small; otherwise, the difference is considered large.
[0030] The battery's charge can also be converted into a percentage using the following formula: Remaining charge (%) = [Battery charge / Initial total capacity] * 100%.
[0031] In some preferred embodiments, the method is performed for each battery after it has been used; therefore, the method includes: Step S100: Identify that the reason for the UWB positioning card's power failure and restart is power-on, and determine that the UWB positioning card has had its battery replaced. The above method uses power-on reset as the start of a new discharge cycle.
[0032] In some preferred embodiments, step S101, obtaining a first power value by subtracting the sum of accumulated UWB positioning power consumption from the initial total capacity, includes: Step S1011: After the UWB positioning card has been replaced with a battery, during the battery usage process, count the number of times the UWB positioning card is used, and multiply the pre-measured power consumption of a single UWB positioning by the number of positioning times to obtain the current cumulative power consumption of UWB positioning.
[0033] In some optional embodiments, since the ranging of the UWB positioning card is periodic, its positioning period is T1, for example, T1=1s, and each ranging signal transmission and reception takes 6ms. Therefore, the corresponding number of positioning times can be obtained by counting the total usage time T0 of the UWB positioning card after the start of a new discharge cycle and using T0 / T1.
[0034] In some alternative embodiments, the ranging based on the UWB positioning card is also periodic, and the total consumption can also be calculated by the formula: Total consumption = ∫ power consumption of a single ranging * time dt, that is, the power consumption of a single ranging is integrated over the total usage time T0 to obtain the total consumption, then the remaining power = initial total capacity - total consumption.
[0035] In some preferred embodiments, in step S102, the pre-determined power consumption for a single UWB positioning operation is obtained in the following manner: Step S1021: Connect the UWB positioning card to the power consumption tester, and use the power consumption tester to perform real-time power consumption statistics on the UWB positioning card to obtain the single power consumption of the UWB positioning card.
[0036] Step S1022: Take the average power consumption of multiple UWB positioning cards in a single operation to obtain the pre-measured power consumption of a single UWB positioning operation.
[0037] The above-mentioned average power consumption per operation requires multiple single-operation power consumption statistics for multiple UWB positioning cards. The average power consumption per UWB positioning operation obtained after averaging is more accurate.
[0038] In some preferred embodiments, step S102, the detection of real-time voltage, includes: setting a voltage divider detection circuit across the battery terminals in the UWB positioning card, and the voltage divider detection circuit includes a MOSFET. The switching of the MOSFET is controlled according to a preset voltage detection cycle. Specifically, the conduction state of the MOSFET can be adjusted by adjusting the voltage on the MOSFET, so that the voltage divider detection circuit is connected to the battery during voltage detection and disconnected from the battery at other times. Figure 2 The diagram shows a typical voltage divider detection circuit. It is positioned across the battery terminals and uses a 12-bit AD acquisition module to acquire the battery voltage. During voltage acquisition, the MOSFET is turned on via the I / O port on the left side of the diagram, and then the battery voltage is acquired using a resistor divider method. Once the battery voltage is successfully acquired, the I / O port is used to turn off the MOSFET. This circuit design can reduce the static power consumption of the positioning card and increase battery life.
[0039] In some preferred embodiments, because the working state of the UWB positioning card when transmitting and receiving positioning signals differs significantly from its working state when not positioning, the power is higher during each positioning operation, resulting in a large voltage drop. During non-positioning, the voltage recovers. Therefore, if step S102 happens to occur during positioning, it will cause a sudden voltage drop. If this voltage is used to estimate the power consumption based on the voltage-power relationship, the estimated power consumption will be lower than the actual value. Therefore, when executing step S102, it is necessary to avoid using the voltage detected during a voltage drop. Embodiments of the present invention determine whether the voltage detected in this round can be adopted by comparing the currently detected voltage with the previously stored voltage value, thereby avoiding the adoption of the voltage drop. Specifically, in step S102, the detection of real-time voltage includes: Step S1023: Detect the voltage of the battery in the current voltage detection cycle as the first voltage.
[0040] Step S1024: Read the battery voltage stored in the previous voltage detection cycle as the second voltage.
[0041] Step S1025: Compare the first voltage and the second voltage. If the difference between the first voltage and the second voltage is less than 0.001V, take the smaller of the first voltage and the second voltage as the real-time voltage detected in the current voltage detection cycle and store it.
[0042] In some optional embodiments, in step S1023, the first voltage and the second voltage are compared. If the difference between the first voltage and the second voltage is greater than or equal to 0.001V, then if the first voltage is greater than the second voltage, the first voltage is selected as the real-time voltage for storage; if the first voltage is less than the second voltage, the second voltage is selected as the real-time voltage for storage. In this way, the problem of severely inaccurate power measurement caused by using voltage drops can be avoided in the voltage detection cycle.
[0043] Since the voltage stored in each voltage detection cycle meets the above requirements, the voltage selected and stored under the above constraints can avoid selecting the voltage detected during a voltage drop.
[0044] In some optional embodiments, if the previously stored voltage positioning card cannot be read in step S1023, the current voltage is stored in memory as the first battery voltage to calculate the power.
[0045] In some preferred embodiments, since low temperatures can cause a voltage drop, leading to inaccurate voltage-based charge calculations, step S102, which detects the battery voltage as a first voltage during the current voltage detection cycle, includes: Step S1026: Detect the real-time ambient temperature as T.
[0046] Step S1027: Detect the voltage of the battery in the current voltage detection cycle as U1. If the real-time ambient temperature is below 10℃, the first voltage is U1+0.005V; otherwise, the first voltage is U1.
[0047] The implementation of the above process also depends on the setting of the voltage detection cycle. If the voltage detection cycle is too long, the battery will be consumed too much. Even if the detection does not happen to be during the UWB ranging period, the voltage difference between the two detections will be too large, for example, greater than 0.001V. Therefore, in this embodiment, multiple different UWB positioning cards are used to continuously detect the voltage with voltage detection cycles of different durations. For each detection cycle, the continuously measured voltage value can be obtained. By comparing the difference between two adjacent voltage values, the voltage detection cycle required to meet the condition that the difference is less than 0.001V can be obtained. Then, when executing the method of this embodiment, it can be implemented once per cycle according to the selected voltage detection cycle.
[0048] Based on the same inventive concept as the above-described method embodiments, this application also provides a device for collecting battery power based on a UWB positioning card, comprising: The first power module is used to obtain the first power value by subtracting the total power consumed by UWB positioning from the initial total capacity; The second power module is used to synchronously perform real-time voltage detection with the first power module and obtain a second power value based on the pre-determined relationship between voltage and power. The comparison output module is used to compare the difference between the first power value and the second power value. When the difference is less than a preset range, the average of the first power value and the second power value is taken as the battery power. Otherwise, the second power value is taken as the battery power.
[0049] It should be noted that although several units or sub-units of the device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units.
[0050] Based on the same inventive concept as the above method embodiments, this application also provides 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, it enables the electronic device to implement the control method described in the above embodiments.
[0051] In one embodiment, the electronic device may be a server, and in this embodiment, the structure of the electronic device may be as follows: Figure 3As shown, it includes a memory 2001, a communication module 2003, and one or more processors 2002.
[0052] The memory 2001 is used to store computer programs executed by the processor 2002. The memory 2001 may mainly include a program storage area and a data storage area. The program storage area may store the operating system and programs required to run instant messaging functions, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.
[0053] Memory 2001 may be volatile memory, such as random-access memory (RAM); memory 2001 may also be non-volatile memory, such as read-only memory, flash memory, hard disk drive (HDD), or solid-state drive (SSD); or memory 2001 may be any other medium capable of carrying or storing a desired computer program having the form of instructions or data structures and accessible by a computer, but is not limited thereto. Memory 2001 may be a combination of the above-mentioned memories.
[0054] Processor 2002 may include one or more central processing units (CPUs) or digital processing units, etc. Processor 2002 is used to implement the above-mentioned audio data processing method when calling computer programs stored in memory 2001.
[0055] The communication module 2003 is used to communicate with terminal devices and other servers.
[0056] This application embodiment does not limit the specific connection medium between the memory 2001, communication module 2003, and processor 2002. This application embodiment... Figure 3 The memory 2001 and the processor 2002 are connected via a bus 2004, which is in... Figure 3 The connections between other components are illustrated with arrows and are for illustrative purposes only, not as limiting information. The Bus 2004 can be divided into address bus, data bus, control bus, etc. For ease of description, Figure 3 The text uses only one arrow to describe it, but does not indicate that there is only one bus or one type of bus.
[0057] Based on the same inventive concept as the above-described method embodiments, embodiments of the present invention also provide a computer-readable storage medium for storing a computer program. When the computer program is run on a computer, it enables the electronic device to implement the control method described in the above embodiments. The computer-readable storage medium can be a readable signal medium or a readable storage medium. A readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.
[0058] Based on the same inventive concept as the above-described method embodiments, embodiments of the present invention also provide a computer program product, which includes a computer program that, when run on an electronic device, causes the electronic device to perform the steps of the control methods described above according to various exemplary embodiments of this application. The program product may take the form of any combination of one or more readable media. These computer program commands can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the commands executed by the processor of the computer or other programmable data processing device generate a process for implementing... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0059] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
Claims
1. A method for collecting battery power based on a UWB positioning card, characterized in that, include: The first power value is obtained by subtracting the total accumulated power consumption of UWB positioning from the initial total capacity; Simultaneously with the above steps, the real-time voltage is detected, and a second electrical quantity value is obtained based on the pre-determined relationship between voltage and electrical quantity. Compare the difference between the first power value and the second power value. If the difference is less than a preset range, take the average of the first power value and the second power value as the battery power. Otherwise, take the second power value as the battery power.
2. The method according to claim 1, characterized in that, It also includes identifying that the reset reason for the UWB positioning card's power failure and restart is power-on, determining that the UWB positioning card's battery has been replaced, and then starting to synchronously execute the above-mentioned calculation of the first and second power values.
3. The method according to claim 1, characterized in that, The method of obtaining the first power value by subtracting the sum of accumulated UWB positioning power consumption from the initial total capacity includes: The number of times the UWB positioning card is used is counted, and the power consumption of a single UWB positioning is multiplied by the number of positioning times to obtain the current cumulative power consumption of UWB positioning.
4. The method according to claim 1, characterized in that, The pre-determined power consumption for a single UWB positioning operation is obtained through the following method: Connect the UWB positioning card to the power consumption tester, and use the power consumption tester to perform real-time power consumption statistics on the UWB positioning card to obtain the single power consumption of the UWB positioning card. The pre-determined power consumption for a single UWB positioning operation is obtained by averaging the power consumption of multiple UWB positioning cards in a single operation.
5. The method according to claim 1, characterized in that, The real-time voltage detection includes: setting a voltage divider detection circuit across the battery terminals in the UWB positioning card, and setting a MOS transistor in the voltage divider detection circuit; controlling the switching of the MOS transistor according to a preset voltage detection cycle, so that the voltage divider detection circuit is connected to the battery during voltage detection and disconnected from the battery at other times.
6. The method according to claim 5, characterized in that, The detection of real-time voltage includes: The voltage of the battery in the current voltage detection cycle is the first voltage; The second voltage is obtained by reading the battery voltage stored in the previous voltage detection cycle. Compare the first voltage and the second voltage. If the difference between the first voltage and the second voltage is less than 0.001V, take the smaller of the first voltage and the second voltage as the real-time voltage detected in the current voltage detection cycle and store it.
7. The method according to claim 6, characterized in that, The voltage of the battery in the current voltage detection cycle is a first voltage, including: The real-time ambient temperature is measured in T. The voltage of the battery during the current voltage detection cycle is U1. If the real-time ambient temperature is below 10℃, the first voltage is U1 + 0.005V; otherwise, the first voltage is U1.
8. A device for collecting battery power based on a UWB positioning card, characterized in that: The first power module is used to obtain the first power value by subtracting the total power consumed by UWB positioning from the initial total capacity; The second power module is used to synchronously perform real-time voltage detection with the first power module and obtain a second power value based on the pre-determined relationship between voltage and power. The comparison output module is used to compare the difference between the first power value and the second power value. When the difference is less than a preset range, the average of the first power value and the second power value is taken as the battery power. Otherwise, the second power value is taken as the battery power.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it causes the electronic device to implement the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program that, when run on a computer, causes the computer to perform the method as described in any one of claims 1 to 7.