Charger baby and robot mutual charging method
By realizing two-way intelligent mutual charging between the robot and the power bank, dynamically switching the charging direction, and adopting multi-stage threshold and real-time power monitoring mechanisms, the problems of one-way charging and lack of intelligent power management in the existing technology are solved, the system flexibility and resource utilization efficiency are improved, and the normal operation and battery life of the equipment are ensured.
Patent Information
- Application Number
- CN202411814387.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-03-18
AI Technical Summary
In the prior art, the mutual charging solution between robots and power banks only realizes one-way charging, and cannot achieve two-way mutual charging, resulting in the power banks being unable to obtain electricity from the robot when the power is insufficient, affecting the normal operation of the robot, and lacking intelligent power management mechanisms, resulting in low resource utilization efficiency.
By detecting the connection status between the robot and the power bank, and starting the power detection module, dynamically judge the power value, automatically switch the charging direction, and realize two-way mutual charging. Multi-stage threshold and real-time power monitoring mechanism are adopted to ensure that the robot's operating needs can be guaranteed under any circumstances and to avoid the power supply of power banks due to exhaustion.
It realizes two-way intelligent mutual charging between power banks and robots, improves the flexibility and reliability of the system, ensures that both robots and power banks can obtain sufficient power when needed, improves resource utilization efficiency, and extends the battery life of the system.
Smart Images

Figure CN119651841A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of shared power banks, and in particular relates to a method for mutual charging between a power bank and a robot. Background Art
[0002] The shared power bank delivery robot is an innovative product that combines the sharing economy and automation technology, aiming to provide users with a more convenient mobile power rental service. Existing solutions for mutual charging between robots and power banks usually adopt a one-way charging method, that is, the power bank can only supply power to the robot, or the robot can supply power to the power bank, but two-way charging is not possible. This one-way charging method has some obvious limitations:
[0003] One-way charging limits flexibility: In existing solutions, the power bank can only serve as a single power output device and cannot obtain power from the robot when the battery is low. As a result, in some cases, the power bank may be unable to continue to power the robot due to depletion of power, thus affecting the normal operation of the robot.
[0004] Lack of intelligent power management: Existing solutions usually do not have an effective power management mechanism and cannot dynamically adjust the charging direction according to actual conditions, resulting in inefficient resource utilization and easy waste of power. Summary of the invention
[0005] The purpose of the present invention is to provide a method for mutual charging between a power bank and a robot, aiming to achieve two-way intelligent mutual charging, improve resource utilization efficiency, ensure that both the robot and the power bank can obtain sufficient power when needed, so as to solve the problems of unidirectional charging and lack of intelligent power management in the prior art.
[0006] To achieve the above purpose, the present invention adopts the following technical solution: a method for charging a power bank and a robot, comprising the following steps:
[0007] Step 1: Check the connection status between the robot and the power bank to confirm that the two have established an effective connection through the physical interface;
[0008] Step 2: In the connected state of step 1, start the power detection module to read the current power values of the robot and the power bank respectively;
[0009] Step 3: According to the power value obtained in step 2, determine whether the power of the power bank is lower than a preset first threshold;
[0010] Step 4: If the power of the power bank in step 3 is lower than the first threshold, the robot is controlled to start supplying power to the power bank while monitoring the power change of the power bank;
[0011] Step 5: During the execution of step 4, continuously detect the power of the robot to determine whether the power of the robot drops below a preset second threshold;
[0012] Step 6: If the power level of the robot in step 5 drops below the second threshold, the robot immediately stops supplying power to the power bank, giving priority to the operation needs of the robot;
[0013] Step 7: After step 6, go back to step 2 and check the power of the robot and the power bank again;
[0014] Step 8: If the power level of the power bank in step 3 is not lower than the first threshold, determine whether the power level of the robot is lower than a preset third threshold;
[0015] Step nine: If the power level of the robot in step eight is lower than the third threshold, control the power bank to supply power to the robot until the power level of the robot returns to a safe level or the power bank's power level drops to the first threshold.
[0016] Preferably, the detection of the connection status between the robot and the power bank includes the following sub-process steps:
[0017] Send a handshake signal through the physical interface to verify the validity of the connection, where the strength S of the handshake signal satisfies the formula S=A*e^(-Bd), A is the initial signal strength, B is the attenuation coefficient, and d is the signal transmission distance;
[0018] If the received handshake signal strength S is greater than or equal to the predetermined threshold T1, the connection is considered valid, otherwise the connection is retried;
[0019] After confirming that the connection is valid, the identity information of both parties is exchanged through the physical interface, where identity authentication is performed by calculating HMAC, the calculation formula is HMAC(K,m)=H((K'⊕opad)∥H((K'⊕i pad)∥m)), where K is the key, m is the message, opad and i pad are specific padding values, and H represents the hash function;
[0020] After successfully verifying the identity, record the connection status as established and prepare to enter the power detection phase of step 2.
[0021] Preferably, the startup power detection module reads the current power values of the robot and the power bank respectively, including the following sub-process steps:
[0022] After confirming that the connection status is established, activate the power detection module and prepare to read the power;
[0023] Through the activated power detection module, the linear regression method is used to predict the current power value of the robot and the power bank. The prediction model is E=α+β*t, where E represents the power value, α is the intercept term, β is the slope term, and t is the total time from the last charging to the present;
[0024] Based on the predicted power values, the actual power values Qr and Qb of the robot and power bank are directly read through the physical interface, where Qr is the power of the robot and Qb is the power of the power bank;
[0025] The actual power values Qr and Qb read are compared with the predicted power value E, and the error ΔE=|EQ| is calculated, where Q represents the actual power value. If ΔE exceeds the preset error range R, the parameters α and β of the power prediction model are updated.
[0026] Preferably, the step of determining whether the power level of the power bank is lower than a preset first threshold value comprises the following sub-process steps:
[0027] After reading the actual power value Qb of the power bank, the preset first threshold T1 is called to calculate the difference ΔQ=T1-Qb between the power value Qb of the power bank and the first threshold T1;
[0028] Determine whether the calculated difference ΔQ is greater than zero. If ΔQ>0, it means that the power bank's power Qb is lower than the first threshold T1, and proceed to the next step; if ΔQ≤0, it means that the power bank has sufficient power, and return to step 2 to continue monitoring the power;
[0029] When it is determined that the power bank's power level is lower than the first threshold, the result of the power check is recorded, and the robot is prepared to be controlled to supply power to the power bank.
[0030] Preferably, the controlling robot starts supplying power to the power bank and monitors the power change of the power bank, including the following sub-process steps:
[0031] After determining that the power bank power Qb is lower than the first threshold T1, the power supply control unit of the robot is started, and the power supply control unit controls the robot to supply power to the power bank with a constant current I, and the power supply current I satisfies the formula I=(Qb-T1) / R, where R is the internal resistance of the power bank;
[0032] While supplying power, start the power bank's power monitoring module, read the power bank's power value Qb(t) every time interval Δt, and record the power change ΔQb=Qb(t)-Qb(t-Δt);
[0033] The recorded power change ΔQb is compared with the preset minimum effective charging capacity ΔQmin. If ΔQb≥ΔQmin, the charging is considered effective and power supply continues; if ΔQb<ΔQmin, power supply is stopped and the process returns to step 2 to re-check the power.
[0034] Preferably, the step of continuously detecting the power of the robot to determine whether the power of the robot drops below a preset second threshold value comprises the following sub-process steps:
[0035] When the robot supplies power to the power bank, the power monitoring module of the robot is started, and the current power value Qr(t) of the robot is read once every fixed time interval Δt, and the read power value Qr(t) is compared with the preset second threshold value T2, and the difference ΔQr=T2-Qr(t) is calculated;
[0036] Determine whether the calculated difference ΔQr is greater than zero. If ΔQr>0, it means that the robot's power Qr has dropped below the second threshold T2, and proceed to the next step; if ΔQr≤0, continue to execute the power supply process;
[0037] When it is determined that the power level Qr of the robot is lower than the second threshold value T2, the robot is immediately stopped from supplying power to the power bank, and the result of the power level check is recorded.
[0038] Preferably, when the power level of the robot drops below the second threshold, the process of the robot supplying power to the power bank is immediately stopped, including the following sub-process steps:
[0039] After determining that the power Qr of the robot drops below the second threshold value T2, a stop power supply instruction is immediately sent to the power supply control unit. After receiving the stop power supply instruction, the power supply control unit cuts off the circuit for the robot to supply power to the power bank to ensure that the robot no longer outputs current I;
[0040] Then start the robot's power recovery module, calculate the difference ΔQr=Qmin-Qr between the robot's remaining power Qr and the minimum operating power requirement Qmin, and compare the calculated difference ΔQr with the preset power replenishment threshold ΔQs. If ΔQr>ΔQs, start the robot's internal energy-saving mode; if ΔQr≤ΔQs, maintain the current operating state and continue to monitor the power.
[0041] Preferably, the re-detecting the power levels of the robot and the power bank includes the following sub-process steps:
[0042] After the robot stops supplying power to the power bank, a delay of Δt is performed. After the delay time is over, the power detection module is reactivated to prepare to read the current power values of the robot and the power bank;
[0043] Through the activated power detection module, read the actual power values Qr and Qb of the robot and power bank, where Qr is the power of the robot and Qb is the power of the power bank;
[0044] Compare the actual power values Qr and Qb read with the power values Qr(t-1) and Qb(t-1) read last time, calculate the power changes ΔQr=Qr-Qr(t-1) and ΔQb=Qb-Qb(t-1), and record the changes.
[0045] Preferably, if the power level of the power bank is not lower than the first threshold, determining whether the power level of the robot is lower than a preset third threshold includes the following sub-process steps:
[0046] After determining that the power bank power Qb is not lower than the first threshold T1, the preset third threshold T3 is called to calculate the difference ΔQr=T3-Qr between the robot power value Qr and the third threshold T3;
[0047] Determine whether the calculated difference ΔQr is greater than zero. If ΔQr>0, it means that the robot's power Qr is lower than the third threshold T3, and go to the next step; if ΔQr≤0, it means that the robot has sufficient power, and return to step 2 to continue monitoring the power;
[0048] When it is determined that the robot power Qr is lower than the third threshold value T3, the result of the power check is recorded, and preparation is made to control the power bank to supply power to the robot.
[0049] Preferably, when the power level of the robot is lower than the third threshold, the power bank is controlled to supply power to the robot until the power level of the robot returns to a safe level or the power bank's power level drops to the first threshold, including the following sub-process steps:
[0050] After determining in step eight that the power Qr of the robot is lower than the third threshold value T3, the power supply control unit of the power bank is started, and the power supply control unit controls the power bank to supply power to the robot with a constant current I, and the power supply current I satisfies the formula I=(T3-Qr) / R, where R is the internal resistance of the robot;
[0051] While supplying power, start the power monitoring module of the robot, read the power value Qr(t) of the robot every time interval Δt, and record the power change ΔQr=Qr(t)-Qr(t-Δt);
[0052] Compare the recorded power change ΔQr with the preset safe power level Qsafe. If Qr(t)≥Qsafe or the power bank power Qb(t)≤T1, stop the power bank from supplying power to the robot, record the result of the charging process, and return to step 2 to recheck the power.
[0053] Technical effects and advantages of the present invention: Compared with the prior art, the method for charging a power bank and a robot provided by the present invention has the following advantages:
[0054] The present invention dynamically detects the power levels of the robot and the power bank, and automatically switches the charging direction according to a preset threshold, thereby realizing two-way mutual charging between the power bank and the robot, and improving the flexibility and reliability of the system; a multi-level threshold and real-time power monitoring mechanism are introduced to ensure that the operation needs of the robot can be prioritized under any circumstances, while preventing the power bank from being unable to continue supplying power due to exhaustion of power, thereby improving resource utilization efficiency; through real-time monitoring and dynamic adjustment of the charging direction, the present invention can achieve intelligent power balance between the robot and the power bank, ensuring that both can work in the best state, extending the battery life of the overall system, providing an efficient and flexible method for mutual charging between the power bank and the robot, and significantly improving the intelligence level and resource utilization efficiency of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 The present invention is a flow chart of a method for charging a power bank and a robot mutually. DETAILED DESCRIPTION
[0056] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. The specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0057] The present invention provides a method for charging a power bank and a robot. Figure 1 As shown, the following steps are included:
[0058] Step 1: Detect the connection status between the robot and the power bank, and confirm that the two have established an effective connection through the physical interface; further, the following sub-process steps are included:
[0059] Send a handshake signal through a physical interface (such as a USB-C interface) to verify the validity of the connection, where the strength S of the handshake signal satisfies the formula S=A*e^(-Bd), where A is the initial signal strength, B is the attenuation coefficient, and d is the signal transmission distance;
[0060] If the received handshake signal strength S is greater than or equal to the predetermined threshold T1, the connection is considered valid, otherwise the connection is retried; the reliability of the physical connection is ensured by verifying the strength of the handshake signal. The connection is considered valid only when the handshake signal strength SS is greater than or equal to the predetermined threshold T1, which avoids misjudgment caused by signal attenuation or other interference.
[0061] After confirming that the connection is valid, the identity information of both parties is exchanged through the physical interface, where identity authentication is performed by calculating HMAC, and the calculation formula is HMAC(K,m)=H((K'⊕opad)∥H((K'⊕ipad)∥m)), where K is the key, m is the message, opad and ipad are specific padding values, and H represents the hash function; identity authentication is performed through HMAC to ensure the authenticity and security of the identities of both parties in the connection. The HMAC algorithm effectively prevents the access of illegal devices and improves the security of the system through dual verification of keys and messages. When the connection is invalid, the robot will automatically retry to send a handshake signal to ensure the stability of the connection. This mechanism enables the system to automatically recover when the connection is interrupted, improving the robustness of the system.
[0062] After successfully verifying the identity, the system records the connection status as established and prepares to enter the power detection phase of step 2. After successfully verifying the identity, the system records the connection status as established and prepares to enter the power detection phase. This lays the foundation for subsequent power detection and mutual charging operations, ensuring that the power management between the robot and the power bank is more intelligent and efficient.
[0063] Through the above specific implementation methods, this method not only ensures that the connection between the robot and the power bank is both reliable and safe, but also provides a solid foundation for subsequent power management and mutual charging operations, significantly improving the overall performance of the system and user experience.
[0064] Step 2: In the connected state of step 1, start the power detection module to read the current power values of the robot and the power bank respectively; further, the following sub-process steps are included:
[0065] After confirming that the connection status is established, activate the power detection module and prepare to read the power;
[0066] Through the activated power detection module, the current power value of the robot and the power bank is prepared to be read, and the linear regression method is used to predict the current power value of the robot and the power bank. The prediction model is E=α+β*t, where E represents the power value, α is the intercept term, β is the slope term, and t is the total time from the last charging to the present; this model can be trained based on historical data and used to preliminarily estimate the current power value. Predicting the power value through the linear regression method can provide a preliminary estimate before actually reading the power. This helps to understand the power status in advance and provide a reference for subsequent power management.
[0067] Based on the predicted power value, the actual power values Qr and Qb of the robot and power bank are directly read through the physical interface, where Qr is the robot power and Qb is the power bank power. Directly reading the actual power value through the physical interface ensures that the read power data is accurate and reliable. This step is the basis of power management and directly affects subsequent charging decisions.
[0068] Compare the actual power values Qr and Qb read with the predicted power value E, and calculate the error ΔE = |EQ|, where Q represents the actual power value. If ΔE exceeds the preset error range R, update the parameters α and β of the power prediction model. The least squares method or other optimization algorithms can be used to update the model parameters to ensure that the model reflects the actual power changes more accurately. By comparing the errors between the predicted values and the actual values, the parameters of the power prediction model are dynamically updated. This enables the model to continuously adapt to changes in actual power and improve the accuracy of the prediction. The dynamic update mechanism ensures the long-term effectiveness of the model and reduces errors caused by model aging.
[0069] Combining the predicted and actual power readings, the system can more accurately determine the power status and make more reasonable charging decisions. This not only improves the efficiency of power management, but also extends the service life of the robot and power bank.
[0070] Step 3: According to the power value obtained in step 2, determine whether the power of the power bank is lower than a preset first threshold; further, including the following sub-process steps:
[0071] After reading the actual power value Qb of the power bank, the preset first threshold T1 is called to calculate the difference ΔQ between the power value Qb of the power bank and the first threshold T1 = T1-Qb; by calculating the difference ΔQ between the power value Qb of the power bank and the first threshold T1T1, it is possible to accurately determine whether the power of the power bank is lower than the preset threshold. This method avoids the subjectivity and error of human judgment and ensures the objectivity and accuracy of power judgment.
[0072] Determine whether the calculated difference ΔQ is greater than zero. If ΔQ>0, it means that the power bank's power Qb is lower than the first threshold T1, and proceed to the next step; if ΔQ≤0, it means that the power bank has sufficient power, and return to step 2 to continue monitoring the power; when the power bank's power is lower than the first threshold, the system will immediately record the power check result and prepare to enter the step of controlling the robot to supply power to the power bank. This dynamic management mechanism ensures that the power bank can be replenished in time when the power is low, avoiding equipment shutdown or performance degradation due to low power. If the power bank has sufficient power (that is, ΔQ≤0), the system will return to step 2 to continue monitoring the power and avoid unnecessary charging operations. This strategy not only saves energy, but also extends the service life of the power bank and the robot.
[0073] When it is determined that the power bank's power level is lower than the first threshold, the result of the power check is recorded, and the robot is prepared to control the power bank to supply power. Through regular monitoring and dynamic adjustment, the system can ensure that the power bank and the robot are always in the best working condition. This reliable power management mechanism improves the overall stability and reliability of the system and ensures the normal operation of the equipment under various working conditions.
[0074] Through the above specific implementation methods, this method not only ensures the accurate judgment and dynamic management of the power bank's power level, but also improves the resource utilization efficiency and operational reliability of the system, and significantly improves the user experience and device performance.
[0075] Step 4: If the power of the power bank in step 3 is lower than the first threshold, the robot is controlled to start supplying power to the power bank, while monitoring the power change of the power bank; further, the following sub-process steps are included:
[0076] After determining that the power bank's power Qb is lower than the first threshold T1, the robot's power supply control unit is started, and the robot is controlled by the power supply control unit to supply power to the power bank with a constant current I. The power supply current I satisfies the formula I = (Qb-T1) / R, where R is the internal resistance of the power bank; the constant current I is calculated by the formula I = (Qb-T1) / R, ensuring that the current supplied by the robot to the power bank is appropriate. This can not only improve the charging efficiency, but also avoid charging problems caused by excessive or insufficient current, and protect the battery health of the power bank and the robot.
[0077] While supplying power, start the power bank's power monitoring module, read the power bank's power value Qb(t) every time interval Δt, and record the power change ΔQb=Qb(t)-Qb(t-Δt); by reading the power bank's power value Qb(t) every time interval Δt and recording the power change ΔQb, the system can monitor the power change during the charging process in real time. This helps to detect charging anomalies in a timely manner and ensure the stability and safety of the charging process.
[0078] Compare the recorded power change ΔQb with the preset minimum effective charge ΔQmin. If ΔQb≥ΔQmin, the charging is considered valid and the power supply continues; if ΔQb<ΔQmin, the power supply is stopped and the system returns to step 2 to recheck the power. By comparing the recorded power change ΔQb with the preset minimum effective charge ΔQmin, the system can evaluate whether the charging is effective. If the charging is effective, the power supply continues; if the charging is not effective, the power supply is stopped and the power is rechecked. This evaluation mechanism ensures the efficiency and reliability of the charging process and avoids unnecessary energy waste.
[0079] During the charging process, the system will dynamically adjust the charging strategy based on the real-time monitored power changes. If charging is ineffective, the system will stop supplying power and re-check the power to ensure that the power bank and the robot are always in the best working condition. This dynamic management mechanism improves the flexibility and response speed of the system and extends the service life of the equipment.
[0080] Step 5: During the execution of step 4, the power of the robot is continuously detected to determine whether the power of the robot drops below a preset second threshold; further, the following sub-process steps are included:
[0081] When the robot supplies power to the power bank, the power monitoring module of the robot is started, and the current power value Qr(t) of the robot is read every fixed time interval Δt, and the read power value Qr(t) is compared with the preset second threshold value T2, and the difference ΔQr=T2-Qr(t) is calculated; by reading the current power value Qr(t) of the robot every fixed time interval Δt, the system can monitor the power changes of the robot in real time. This ensures that the power shortage can be discovered in time during the power supply process, and avoids the robot from being unable to work normally due to low power.
[0082] By calculating the difference ΔQr=T2-Qr(t) and judging whether it is greater than zero, the system can accurately judge whether the robot's power level has dropped below the preset second threshold T2. This method avoids the subjectivity and error of human judgment and ensures the objectivity and accuracy of power level judgment.
[0083] Determine whether the calculated difference ΔQr is greater than zero. If ΔQr>0, it means that the robot's power Qr has dropped below the second threshold T2, and proceed to the next step; if ΔQr≤0, continue the power supply process; if it is determined that the robot's power Qr is lower than the second threshold T2, the system will immediately stop the robot from supplying power to the power bank. This not only protects the robot's battery and avoids battery damage caused by excessive discharge, but also ensures that the robot can prioritize its own operating needs when the battery is low.
[0084] When it is determined that the robot's power Qr is lower than the second threshold T2, the robot immediately stops supplying power to the power bank and records the result of this power check. By recording the results of each power check, the system can track the changes in the robot's power and provide data support for subsequent power management and decision-making. This reliable power management mechanism improves the overall stability and reliability of the system and ensures the normal operation of the equipment under various working conditions.
[0085] Through the above specific implementation methods, this method not only ensures the real-time power monitoring and accurate judgment of the robot in the process of supplying power to the power bank, but also improves the overall performance and reliability of the system through timely power supply stop and reliable power management mechanism, and significantly improves the user experience and device performance.
[0086] Step 6: If the power of the robot in step 5 drops below the second threshold, the robot immediately stops supplying power to the power bank, giving priority to the operation needs of the robot; further, the following sub-process steps are included:
[0087] After determining that the robot's power Qr drops below the second threshold value T2, a stop power supply instruction is immediately sent to the power supply control unit. After receiving the stop power supply instruction, the power supply control unit cuts off the circuit that the robot supplies power to the power bank to ensure that the robot no longer outputs current I; by immediately sending a stop power supply instruction to the power supply control unit, it is ensured that when the robot's power drops below the second threshold value T2, the power supply circuit can be quickly cut off. This not only protects the robot's battery and avoids battery damage caused by excessive discharge, but also ensures that the robot can prioritize its own operating needs when the power is low.
[0088] Then start the robot's power recovery module, calculate the difference ΔQr=Qmin-Qr between the robot's remaining power Qr and the minimum operating power requirement Qmin, and compare the calculated difference ΔQr with the preset power replenishment threshold ΔQs. If ΔQr>ΔQs, start the robot's internal energy-saving mode; if ΔQr≤ΔQs, maintain the current operating state and continue to monitor the power.
[0089] Start the power recovery module of the robot and calculate the difference ΔQr between the remaining power Qr and the minimum required power Qmin. This step helps to evaluate the power status of the robot and provide a basis for subsequent power management.
[0090] The calculated difference ΔQr is compared with the preset power replenishment threshold ΔQs. If ΔQr>ΔQs, the energy-saving mode inside the robot is activated to reduce unnecessary energy consumption and extend the robot's operating time. This intelligent energy-saving mode ensures that the robot can continue to complete critical tasks when the power is low. If ΔQr≤ΔQs, the current operating state is maintained and the power continues to be monitored. This ensures that the system can operate normally when the power is sufficient, while providing continuous data support for future power management.
[0091] Step 7: After step 6, re-enter step 2 to check the power of the robot and the power bank again; further, the following sub-process steps are included:
[0092] After the robot stops supplying power to the power bank, it delays for a period of time Δt. After the delay time is over, the power detection module is reactivated to prepare to read the current power values of the robot and the power bank. By delaying for a period of time Δt after stopping the power supply, the power supply circuit is completely disconnected, avoiding the influence of current reflux or transient voltage fluctuations on power detection. This improves the stability and reliability of the system.
[0093] Through the activated power detection module, the actual power values Qr and Qb of the robot and power bank are read, where Qr is the power of the robot and Qb is the power of the power bank; after reactivating the power detection module, the system can accurately read the current power values of the robot and power bank. This ensures that the system can obtain the latest power information at each detection, providing accurate data support for subsequent power management.
[0094] Compare the actual power values Qr and Qb read with the power values Qr(t-1) and Qb(t-1) read last time, calculate the power changes ΔQr=Qr-Qr(t-1) and ΔQb=Qb-Qb(t-1), and record the change values. By comparing the actual power values read with the power values read last time, calculating the power changes ΔQr and ΔQb, the system can monitor the power change trend in real time. This helps to detect power anomalies in a timely manner and ensure that the system can take appropriate measures when the power is low.
[0095] By recording the power change value, the system can track the power change trend and provide data support for subsequent power management and decision-making. This continuous power management mechanism ensures that the robot and power bank can maintain the best working condition under various working conditions and extend the service life of the equipment.
[0096] Step 8: If the power of the power bank in step 3 is not lower than the first threshold, determine whether the power of the robot is lower than a preset third threshold; further, the following sub-process steps are included:
[0097] After determining that the power bank's power Qb is not lower than the first threshold T1, the preset third threshold T3 is called to calculate the difference ΔQr=T3-Qr between the robot's power value Qr and the third threshold T3; by calculating the difference ΔQr between the robot's power value Qr and the third threshold T3, the system can accurately determine whether the robot's power is lower than the preset third threshold. This method avoids the subjectivity and error of human judgment and ensures the objectivity and accuracy of power judgment.
[0098] Determine whether the calculated difference ΔQr is greater than zero. If ΔQr>0, it means that the robot's power Qr is lower than the third threshold T3, and proceed to the next step; if ΔQr≤0, it means that the robot has sufficient power, and return to step 2 to continue monitoring the power; if the robot's power Qr is lower than the third threshold T3, the system will record the result of this power check and prepare to enter the step of controlling the power bank to supply power to the robot. This dynamic management mechanism ensures that the robot can be charged in time when the power is low, avoiding equipment shutdown or performance degradation due to low power. If the robot has sufficient power (that is, ΔQr≤0), the system will return to step 2 to continue monitoring the power and avoid unnecessary charging operations. This strategy not only saves energy, but also extends the service life of the power bank and the robot.
[0099] When it is determined that the robot's power Qr is lower than the third threshold T3, the result of the power check is recorded and the control power bank is ready to supply power to the robot. Through regular monitoring and dynamic adjustment, the system can ensure that the robot and the power bank are always in the best working state. This reliable power management mechanism improves the overall stability and reliability of the system and ensures the normal operation of the equipment under various working conditions.
[0100] Step 9: If the power of the robot in step 8 is lower than the third threshold, control the power bank to supply power to the robot until the power of the robot returns to a safe level or the power of the power bank drops to the first threshold; further, the following sub-process steps are included:
[0101] After determining in step eight that the robot's power Qr is lower than the third threshold value T3, the power supply control unit of the power bank is started, and the power supply control unit controls the power bank to supply power to the robot with a constant current I, and the power supply current I satisfies the formula I = (T3-Qr) / R, where R is the internal resistance of the robot; the constant current I is calculated by the formula I = (T3-Qr) / R, ensuring that the current size of the power bank supplying power to the robot is appropriate. This can not only improve the charging efficiency, but also avoid charging problems caused by excessive or insufficient current, and protect the battery health of the power bank and the robot.
[0102] While supplying power, start the robot's power monitoring module, read the robot's power value Qr(t) every time interval Δt, and record the power change ΔQr=Qr(t)-Qr(t-Δt); by reading the robot's power value Qr(t) every time interval Δt and recording the power change ΔQr, the system can monitor the power change during the charging process in real time. This helps to detect charging anomalies in a timely manner and ensure the stability and safety of the charging process.
[0103] Compare the recorded power change ΔQr with the preset safe power level Qsafe. If Qr(t)≥Qsafe or the power bank power Qb(t)≤T1, stop the power bank from supplying power to the robot, record the result of the charging process, and return to step 2 to recheck the power.
[0104] By comparing the recorded power change ΔQr with the preset safe power level Qsafe, the system can intelligently decide when to stop charging. If the robot's power Qr(t) reaches or exceeds the safe power level Qsafe, or the power bank's power Qb(t) drops to the first threshold T1, the system will stop charging immediately. This ensures that the robot can work normally when it is fully charged, while avoiding the power bank's inability to continue supplying power due to low power.
[0105] By recording the results of each charging process, the system can track the changes in the robot's power and provide data support for subsequent power management and decision-making. This reliable power management mechanism improves the overall stability and reliability of the system and ensures the normal operation of the equipment under various working conditions.
[0106] In summary, the present invention realizes bidirectional mutual charging between the power bank and the robot by dynamically detecting the power levels of the robot and the power bank, and automatically switching the charging direction according to a preset threshold, thereby improving the flexibility and reliability of the system.
[0107] The introduction of multi-level thresholds and real-time power monitoring mechanisms ensures that the robot's operating needs are prioritized in any situation, while preventing the power bank from running out of power and being unable to continue supplying power, thereby improving resource utilization efficiency;
[0108] By real-time monitoring and dynamic adjustment of the charging direction, the present invention can achieve intelligent power balance between the robot and the power bank, ensuring that both can work in the best condition, extending the battery life of the overall system, and providing an efficient and flexible method for charging the power bank and the robot, which significantly improves the intelligence level of the system and the resource utilization efficiency.
[0109] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for charging a power bank and a robot, characterized in that: The following steps are involved: Step 1: Check the connection status between the robot and the power bank to confirm that the two have established an effective connection through the physical interface; Step 2: In the connected state of step 1, start the power detection module to read the current power values of the robot and the power bank respectively; Step 3: According to the power value obtained in step 2, determine whether the power of the power bank is lower than a preset first threshold; Step 4: If the power of the power bank in step 3 is lower than the first threshold, the robot is controlled to start supplying power to the power bank while monitoring the power change of the power bank; Step 5: During the execution of step 4, continuously detect the power of the robot to determine whether the power of the robot drops below a preset second threshold; Step 6: If the power level of the robot in step 5 drops below the second threshold, the robot immediately stops supplying power to the power bank, giving priority to the operation needs of the robot; Step 7: After step 6, go back to step 2 and check the power of the robot and the power bank again; Step 8: If the power level of the power bank in step 3 is not lower than the first threshold, determine whether the power level of the robot is lower than a preset third threshold; Step nine: If the power level of the robot in step eight is lower than the third threshold, control the power bank to supply power to the robot until the power level of the robot returns to a safe level or the power bank's power level drops to the first threshold.
2. A method for charging a power bank and a robot according to claim 1, characterized in that: The detection of the connection status between the robot and the power bank includes the following sub-process steps: Send a handshake signal through the physical interface to verify the validity of the connection, where the strength S of the handshake signal satisfies the formula S=A*e^(-Bd), A is the initial signal strength, B is the attenuation coefficient, and d is the signal transmission distance; If the received handshake signal strength S is greater than or equal to the predetermined threshold T1, the connection is considered valid, otherwise the connection is retried; After confirming that the connection is valid, the identity information of both parties is exchanged through the physical interface, where identity authentication is performed by calculating HMAC, the calculation formula is HMAC(K,m)=H((K'⊕opad)∥H((K'⊕ipad)∥m)), where K is the key, m is the message, opad and ipad are specific padding values, and H represents the hash function; After successfully verifying the identity, record the connection status as established and prepare to enter the power detection phase of step 2.
3. A method for charging a power bank and a robot according to claim 2, characterized in that: The startup power detection module reads the current power values of the robot and the power bank respectively, including the following sub-process steps: After confirming that the connection status is established, activate the power detection module and prepare to read the power; Through the activated power detection module, the linear regression method is used to predict the current power value of the robot and the power bank. The prediction model is E=α+β*t, where E represents the power value, α is the intercept term, β is the slope term, and t is the total time from the last charging to the present; Based on the predicted power values, the actual power values Qr and Qb of the robot and power bank are directly read through the physical interface, where Qr is the power of the robot and Qb is the power of the power bank; The actual power values Qr and Qb read are compared with the predicted power value E, and the error ΔE=|EQ| is calculated, where Q represents the actual power value. If ΔE exceeds the preset error range R, the parameters α and β of the power prediction model are updated.
4. A method for charging a power bank and a robot according to claim 3, characterized in that: The step of determining whether the power level of the power bank is lower than a preset first threshold value includes the following sub-process steps: After reading the actual power value Qb of the power bank, the preset first threshold T1 is called to calculate the difference ΔQ=T1-Qb between the power value Qb of the power bank and the first threshold T1; Determine whether the calculated difference ΔQ is greater than zero. If ΔQ>0, it means that the power bank's power Qb is lower than the first threshold T1, and proceed to the next step; if ΔQ≤0, it means that the power bank has sufficient power, and return to step 2 to continue monitoring the power; When it is determined that the power bank's power level is lower than the first threshold, the result of the power check is recorded, and the robot is prepared to be controlled to supply power to the power bank.
5. A method for charging a power bank and a robot according to claim 4, characterized in that: The control robot starts to supply power to the power bank and monitors the power change of the power bank, including the following sub-process steps: After determining that the power bank power Qb is lower than the first threshold T1, the power supply control unit of the robot is started, and the power supply control unit controls the robot to supply power to the power bank with a constant current I, and the power supply current I satisfies the formula I=(Qb-T1) / R, where R is the internal resistance of the power bank; While supplying power, start the power bank's power monitoring module, read the power bank's power value Qb(t) every time interval Δt, and record the power change ΔQb=Qb(t)-Qb(t-Δt); The recorded power change ΔQb is compared with the preset minimum effective charging capacity ΔQmin. If ΔQb≥ΔQmin, the charging is considered effective and power supply continues; if ΔQb<ΔQmin, power supply is stopped and the process returns to step 2 to re-check the power.
6. A method for charging a power bank and a robot according to claim 5, characterized in that: The method of continuously detecting the battery level of the robot to determine whether the battery level of the robot drops below a preset second threshold value includes the following sub-process steps: When the robot supplies power to the power bank, the power monitoring module of the robot is started, and the current power value Qr(t) of the robot is read once every fixed time interval Δt, and the read power value Qr(t) is compared with the preset second threshold value T2, and the difference ΔQr=T2-Qr(t) is calculated; Determine whether the calculated difference ΔQr is greater than zero. If ΔQr>0, it means that the robot's power Qr has dropped below the second threshold T2, and proceed to the next step; if ΔQr≤0, continue to execute the power supply process; When it is determined that the power level Qr of the robot is lower than the second threshold value T2, the robot is immediately stopped from supplying power to the power bank, and the result of the power level check is recorded.
7. A method for charging a power bank and a robot according to claim 6, characterized in that: When the power level of the robot drops below the second threshold, the robot immediately stops supplying power to the power bank, including the following sub-process steps: After determining that the power Qr of the robot drops below the second threshold value T2, a stop power supply instruction is immediately sent to the power supply control unit. After receiving the stop power supply instruction, the power supply control unit cuts off the circuit for the robot to supply power to the power bank to ensure that the robot no longer outputs current I; Then start the robot's power recovery module, calculate the difference ΔQr=Qmin-Qr between the robot's remaining power Qr and the minimum operating power requirement Qmin, and compare the calculated difference ΔQr with the preset power replenishment threshold ΔQs. If ΔQr>ΔQs, start the robot's internal energy-saving mode; if ΔQr≤ΔQs, maintain the current operating state and continue to monitor the power.
8. A method for charging a power bank and a robot according to claim 7, characterized in that: The process of detecting the power of the robot and the power bank again includes the following sub-process steps: After the robot stops supplying power to the power bank, a delay of Δt is performed. After the delay time is over, the power detection module is reactivated to prepare to read the current power values of the robot and the power bank; Through the activated power detection module, read the actual power values Qr and Qb of the robot and power bank, where Qr is the power of the robot and Qb is the power of the power bank; Compare the actual power values Qr and Qb read with the power values Qr(t-1) and Qb(t-1) read last time, calculate the power changes ΔQr=Qr-Qr(t-1) and ΔQb=Qb-Qb(t-1), and record the changes.
9. A method for charging a power bank and a robot according to claim 8, characterized in that: If the power of the power bank is not lower than the first threshold, then judging whether the power of the robot is lower than a preset third threshold includes the following sub-process steps: After determining that the power bank power Qb is not lower than the first threshold T1, the preset third threshold T3 is called to calculate the difference ΔQr=T3-Qr between the robot power value Qr and the third threshold T3; Determine whether the calculated difference ΔQr is greater than zero. If ΔQr>0, it means that the robot's power Qr is lower than the third threshold T3, and go to the next step; if ΔQr≤0, it means that the robot has sufficient power, and return to step 2 to continue monitoring the power; When it is determined that the robot power Qr is lower than the third threshold value T3, the result of the power check is recorded, and preparation is made to control the power bank to supply power to the robot.
10. A method for charging a power bank and a robot according to claim 9, characterized in that: When the power of the robot is lower than the third threshold, the power bank is controlled to supply power to the robot until the power of the robot returns to a safe level or the power bank drops to the first threshold, including the following sub-process steps: After determining in step eight that the power Qr of the robot is lower than the third threshold value T3, the power supply control unit of the power bank is started, and the power supply control unit controls the power bank to supply power to the robot with a constant current I, and the power supply current I satisfies the formula I=(T3-Qr) / R, where R is the internal resistance of the robot; While supplying power, start the power monitoring module of the robot, read the power value Qr(t) of the robot every time interval Δt, and record the power change ΔQr=Qr(t)-Qr(t-Δt); Compare the recorded power change ΔQr with the preset safe power level Qsafe. If Qr(t)≥Qsafe or the power bank power Qb(t)≤T1, stop the power bank from supplying power to the robot, record the result of the charging process, and return to step 2 to recheck the power.