State detection method, self-moving device and storage medium
By acquiring acceleration and angular velocity data of self-moving devices and calculating the composite acceleration and attitude angle change rate, the problem of detection failure and false alarm caused by environmental corrosion of mechanical push switches and Hall sensors after long-term use of self-moving devices is solved, and more accurate status detection is achieved.
Patent Information
- Application Number
- CN202511117424.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-08
- Publication Date
- 2025-11-07
AI Technical Summary
After prolonged use, mechanical push-button switches and Hall sensors in self-moving devices are susceptible to environmental corrosion, leading to status detection failures or false alarms.
By acquiring acceleration and angular velocity data of the self-moving device, the composite acceleration and attitude angle change rate are calculated. Inertial measurement units and filtering technology are used to determine whether the device has lifted, avoiding the need for detection using mechanical structural components.
It effectively solves the problem of detection failure and false alarm caused by environmental corrosion of mechanical structural components, and improves the accuracy and reliability of condition monitoring.
Smart Images

Figure CN120907871A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of self-moving devices, and in particular to a state detection method, a self-moving device and a storage medium. BACKGROUND
[0002] Lifting detection is one of the important functions of a self-moving device. Lifting detection can avoid dangerous movement behavior of the self-moving device and can avoid the working components of the self-moving device from causing harm to a user when the self-moving device is lifted.
[0003] In related technologies, a mechanical push switch or a Hall sensor can be used to detect lifting of a self-moving device. However, the mechanical push switch and the Hall sensor are easily corroded by the environment, which causes the self-moving device to fail to detect or to report false information after long-term use. SUMMARY
[0004] The present application provides a state detection method, a self-moving device and a storage medium, which can solve the technical problem of state detection failure or false information of a self-moving device after long-term use.
[0005] In one aspect, the present application provides a state detection method applied to a self-moving device, and the method comprises: obtaining acceleration data and angular velocity data of the self-moving device; calculating a resultant acceleration based on the acceleration data; determining a rate of change of an attitude angle of the self-moving device based on the angular velocity data if the resultant acceleration is outside a preset interval in a plurality of preset periods; and determining that the self-moving device is in a lifted state if the rate of change of the attitude angle is greater than a preset change rate in the plurality of preset periods.
[0006] In some embodiments of the present application, the angular velocity data comprises angular velocity components of the self-moving device in three-axis directions, and the method further comprises: determining a total angular velocity intensity based on the angular velocity components; and determining that a body and a wheel set of the self-moving device are in a lifted state if the total angular velocity intensity is less than an angular velocity threshold or the angular velocity components are all less than the angular velocity threshold.
[0007] In some embodiments of the present application, the method further comprises: determining a standard deviation of the resultant acceleration of the self-moving device based on historical acceleration data of the self-moving device when performing a work task; and adjusting the preset interval according to the standard deviation of the resultant acceleration.
[0008] In some embodiments of the present application, the adjusting the preset interval according to the synthesized acceleration standard deviation comprises: if the synthesized acceleration standard deviation is less than or equal to a first threshold, determining an upper limit value in the preset interval as a first preset acceleration; if the synthesized acceleration standard deviation is greater than the first threshold and less than or equal to a second threshold, determining the upper limit value in the preset interval as a second preset acceleration, the second preset acceleration being greater than the first preset acceleration; if the synthesized acceleration standard deviation is greater than the second threshold, determining the upper limit value in the preset interval as a third preset acceleration, the third preset acceleration being greater than the second preset acceleration; and if the synthesized acceleration standard deviation is greater than the second threshold and the self-moving device performs a task on a non-flat lawn, determining the upper limit value in the preset interval as the third preset acceleration when it is detected that the energy proportion of the self-moving device in a preset frequency band is greater than a preset proportion.
[0009] In some embodiments of the present application, the method further comprises: determining the upper limit value in the preset interval as the third preset acceleration when the self-moving device is on a slope with a slope greater than a preset angle or a region with a gravel coverage greater than a preset proportion.
[0010] In some embodiments of the present application, the self-moving device comprises a body, and the method further comprises: increasing the preset change rate based on an inclination angle of the body when the self-moving device works on a slope.
[0011] In some embodiments of the present application, the calculating the synthesized acceleration based on the acceleration data comprises: performing filtering processing on the acceleration data to obtain filtered acceleration data; removing a gravity component in the filtered acceleration data to obtain processed acceleration data, the processed acceleration data comprising acceleration components of the self-moving device in three-axis directions; and determining the synthesized acceleration based on the acceleration components.
[0012] In some embodiments of the present application, the performing filtering processing on the acceleration data to obtain filtered acceleration data comprises: adjusting a window length of a preset window when it is detected that a change value of the acceleration data is greater than a preset change value, and performing weighted filtering on the acceleration data based on the adjusted preset window to obtain the filtered acceleration data, a weight corresponding to the preset window being in a Gaussian distribution.
[0013] In some embodiments of the present application, the determining the attitude angle change rate of the self-moving device based on the angular velocity data comprises: determining the attitude angle of the self-moving device corresponding to each preset time based on the angular velocity data; and determining at least one attitude angle change rate based on the plurality of attitude angles and the preset times corresponding to the plurality of attitude angles.
[0014] In some embodiments of the present application, after determining that the self-moving device is in the lifted state, the method further comprises: stopping running the motor of the self-moving device, and sending prompt information in a preset manner, the preset manner comprising at least one of an audible and visual alarm manner and a wireless broadcast manner, the prompt information being used to prompt that the self-moving device is in the lifted state.
[0015] In another aspect, the present application provides a self-moving device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to enable the self-moving device to implement the state detection method. In another aspect, the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program, when executed by a processor in a self-moving device, implements the state detection method.
[0016] In the state detection scheme of the present embodiment, during the movement of the self-moving device, if the resultant acceleration is outside the preset interval in a plurality of preset periods, it is further detected whether the attitude angle change rate is greater than a preset change rate, and if the attitude angle change rate is greater than the preset change rate in the plurality of preset periods, it is determined that the self-moving device is in the lifted state, which can effectively solve the problem of false positives in the lifted detection. In addition, the present embodiment does not need to rely on mechanical structural parts in the process of state detection, and thus can effectively solve the problem of detection failure caused by environmental corrosion of mechanical structural parts. BRIEF DESCRIPTION OF DRAWINGS
[0017] Figure 1 is an application scenario diagram of the state detection method provided by an embodiment of the present application.
[0018] Figure 2 is a flowchart of the state detection method provided by an embodiment of the present application.
[0019] Figure 3 is a flowchart of the calculation method of the resultant acceleration provided by an embodiment of the present application.
[0020] Figure 4 is a flowchart of the adjustment method of the preset interval provided by an embodiment of the present application.
[0021] Figure 5is a flowchart of a state detection method provided by another embodiment of the present application.
[0022] Figure 6 is a flowchart of a state detection method provided by another embodiment of the present application.
[0023] Figure 7 is a structural schematic diagram of a self-moving device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application is described in detail below with reference to the drawings and specific embodiments.
[0025] It should be noted that "at least one" in the present application means one or more, and "multiple" means two or more than two. "And / or" describes the association between the associated objects, which means that there can be three relationships, for example, A and / or B can represent the following three cases: A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural. The terms "first", "second", "third", "fourth" and the like (if any) in the specification and claims of the present application and the drawings are used to distinguish similar objects, and are not used to describe a specific order or sequence.
[0026] In the embodiments of the present application, the words such as "exemplary" or "for example" are used to mean an example, illustration, or description. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, the use of "exemplary" or "for example" and the like is intended to present the relevant concept in a specific manner.
[0027] Lifting detection is one of the important functions of a self-moving device. Lifting detection can avoid dangerous moving behavior of the self-moving device on the one hand, and can avoid the working components of the self-moving device from causing harm to the user when the self-moving device is lifted on the other hand.
[0028] In the related art, a mechanical push switch can generally be used to achieve lifting detection of the self-moving device. Specifically, when the self-moving device is lifted, the wheel set of the self-moving device will be depressed to press the mechanical push switch, and thus lifting detection can be achieved by detecting the pressing state of the mechanical push switch.
[0029] In another way, a Hall sensor can generally be used to achieve lifting detection of the self-moving device. Specifically, when the self-moving device is lifted, the wheel set of the self-moving device will be depressed to move the Hall magnet on the wheel shaft away from the Hall sensor, and thus lifting detection can be achieved by detecting the Hall sensor.
[0030] However, the mechanical push switch and the Hall sensor are prone to environmental corrosion, resulting in detection failure or false positives of the self-moving device after long-term use. In addition, the self-moving device is prone to generate a large friction force when working, thereby causing detection failure or false positives.
[0031] To this end, an embodiment of the present application provides a state detection method. In the process of state detection, no mechanical structure is needed, thereby effectively solving the problem of detection failure caused by environmental corrosion of the mechanical structure. First, the application scenario of the control method of the present application is described.
[0032] Figure 1 is an application diagram of the state detection method provided by an embodiment of the present application. As shown in Figure 1 The state detection method can be applied to a self-moving device 100, and the self-moving device 100 can be in communication connection with an electronic device 200. After determining that the self-moving device 100 is in a lifted state, the self-moving device 100 can send prompt information to the electronic device 200, and the prompt information is used to prompt that the self-moving device is in a lifted state. The number of devices of the self-moving device and the electronic device is not limited in the present application.
[0033] In some embodiments, the communication connection manner can include a wireless communication connection manner. The wireless communication connection manner can include one or more of a wireless fidelity (Wi-Fi), Bluetooth (BT), a mobile communication network, frequency modulation (FM), near field communication (NFC), infrared technology (IR), and the like. The communication connection manner of the self-moving device 100 and the electronic device 200 can also include a wired communication connection manner. The wired communication connection manner can include one or more of a universal serial bus (USB), a controller area network bus (CAN), and the like.
[0034] In some embodiments, the self-moving device 100 can be a semi-self-moving device or a fully autonomous moving device, which can be any one of a lawn mower robot, a sweeping robot, a snowplow, a cleaning robot, and the like. The specific type of the self-moving device is not limited in the present application.
[0035] In some embodiments, the electronic device 200 can be a standalone server or a server cluster, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication security services, content distribution networks, and other basic cloud computing services. The electronic device 200 can also be a mobile phone, a tablet computer, a smart wearable device, an augmented reality (AR) / virtual reality (VR) device, a notebook computer, a netbook, a power storage device, a power distribution device, a vehicle-mounted device, a self-moving device, etc. The specific type of the self-moving device is not limited in the embodiments of the present application.
[0036] It should be noted that the self-moving device 100 and the electronic device 200 are only examples, and other existing or future electronic products can also be applicable to the present application and should be included in the protection scope of the present application.
[0037] The schematic diagram Figure 1 is only an example of application scenarios, and does not constitute a limitation on application scenarios, and can include more or fewer components, or combine certain components, or different components.
[0038] As Figure 2 shown, it is a flowchart of a state detection method provided by an embodiment of the present application. The state detection method is applied in a self-moving device (for example, the self-moving device 100 of the self-moving device 100). Figure 1 The order of the steps in the flowchart can be adjusted according to actual requirements, and some steps can be omitted.
[0039] S201, acceleration data and angular velocity data of the self-moving device are obtained.
[0040] In some embodiments of the present application, an inertial measurement unit (IMU) can be installed at the chassis center of gravity position of the self-moving device. The inertial measurement unit can include a three-axis accelerometer and a three-axis gyroscope. The three-axis accelerometer can be used to collect acceleration data of the self-moving device in three-axis directions, and the three-axis gyroscope can be used to collect angular velocity data of the self-moving device in three-axis directions.
[0041] In some embodiments of the present application, a preset sampling frequency can be set. The preset sampling frequency can be set and adjusted according to actual requirements. For example, the preset sampling frequency can be any frequency between 50Hz and 100Hz. The electronic device can obtain the acceleration data and the angular velocity data of the self-moving device at the preset sampling frequency.
[0042] In some embodiments of the present application, the acceleration data and the angular velocity data collected by the inertial measurement unit can be transmitted to the processor of the self-moving device through a serial peripheral interface (SPI).
[0043] In S202, the synthetic acceleration is calculated based on the acceleration data.
[0044] In some embodiments of the present application, the self-moving device can calculate the synthetic acceleration based on the acceleration data, and the synthetic acceleration can be used to measure the impact strength or the acceleration strength of the self-moving device.
[0045] In some embodiments of the present application, the specific process of calculating the synthetic acceleration by the self-moving device can refer to the detailed description of the flowchart shown in Figure 3
[0046] In S2021, the acceleration data is filtered to obtain filtered acceleration data.
[0047] In the embodiments of the present application, a preset window can be set in the process of filtering the acceleration data, and the window length of the preset window can be dynamically adjusted.
[0048] In the embodiments of the present application, a preset change value can be set in the process of adjusting the window length of the preset window to detect whether the acceleration data is mutated. The preset change value can be set and adjusted according to actual needs. When the change value of the acceleration data is greater than the preset change value, the self-moving device can adjust the window length of the preset window. In order to improve the response sensitivity, the window length of the preset window can be shortened.
[0049] In the embodiments of the present application, the self-moving device performs weighted filtering on the acceleration data based on the adjusted preset window to obtain the filtered acceleration data.
[0050] Specifically, in the process of weighted filtering the acceleration data, the self-moving device performs weighted moving calculation on the acceleration data based on the adjusted preset window to obtain the filtered acceleration data. In order to suppress high-frequency vibration noise, the weights corresponding to the preset window are set to be in Gaussian distribution.
[0051] For example, the acceleration data of the self-moving device includes acceleration data v1 to acceleration data v10. Assuming that the change value of acceleration data v5 and acceleration data v6 is greater than a preset change value, the window length of the preset window at the initial time is 3, and the window length of the adjusted preset window is 2, the weighted moving average calculation of the acceleration data v1 to the acceleration data v4 can be performed based on the preset window at the initial time. For example, the weighted average calculation of the acceleration data v1 to the acceleration data v3 is performed, and the obtained weighted value can be used as the filtered acceleration data v3. The weighted average calculation of the acceleration data v2 to the acceleration data v4 is performed, and the obtained weighted value can be used as the filtered acceleration data v4. The weighted moving average calculation of the acceleration data v5 to the acceleration data v10 is performed based on the adjusted preset window.
[0052] The embodiment can improve the response sensitivity by dynamically adjusting the window length of the preset window, and can effectively suppress the high-frequency vibration noise by setting the weight corresponding to the preset window in a Gaussian distribution, thereby improving the filtering rationality of the acceleration data.
[0053] S2022, removing the gravity component in the filtered acceleration data to obtain processed acceleration data.
[0054] In the embodiment of the present application, the self-moving device can calculate the gravity component of the filtered acceleration data in the direction of the gravity vector based on the quaternion attitude solution. The self-moving device removes the gravity component in the filtered acceleration data to obtain processed acceleration data. The processed acceleration data includes the acceleration component of the self-moving device in the three-axis direction. The embodiment can remove the influence of the gravity component on the synthesized acceleration by removing the gravity component in the filtered acceleration data.
[0055] S2023, determining the synthesized acceleration based on the acceleration component in the processed acceleration data.
[0056] In the embodiment of the present application, the determination formula of the synthesized acceleration can be expressed as wherein, the synthesized acceleration can be expressed as the acceleration component of the self-moving device in the x-axis direction can be expressed as the acceleration component of the self-moving device in the y-axis direction can be expressed as the acceleration component of the self-moving device in the z-axis direction can be expressed as the acceleration component of the self-moving device in the z-axis direction can be expressed as the acceleration component of the self-moving device in the z-axis direction can be expressed as the acceleration component of the self-moving device in the z-axis direction can be expressed as the acceleration component of the self-moving device in the z-axis direction can be expressed as the acceleration component of the self-moving device in the z-axis direction can be expressed as
[0057] S203, if the synthetic acceleration is outside the preset range in multiple preset periods, determining a posture angle change rate of the mobile device based on the angular velocity data.
[0058] In some embodiments of the present application, in order to avoid false positives, it can be detected whether the synthetic acceleration of the mobile device is outside the preset range in multiple preset periods. The length of the preset period and the total number of the multiple preset periods can be set and adjusted according to actual needs, for example, the total number of the multiple preset periods can be set to 3.
[0059] The preset range can include a first configuration value and a second configuration value, and the second configuration value is greater than the first configuration value, for example, the first configuration value can be set to 1.5g, and the second configuration value can be set to 2.5g. The adjustment method of the preset range can refer to Figure 4 Step.
[0060] Generally, in the case of the mobile device being lifted, the mobile device appears weightlessness or overweight phenomenon, and the synthetic acceleration of the mobile device is usually less than the first configuration value or greater than the second configuration value. If the synthetic acceleration is less than the first configuration value, or the synthetic acceleration is greater than the second configuration value, it is determined that the synthetic acceleration is outside the preset range. If the synthetic acceleration is greater than or equal to the first configuration value, and the synthetic acceleration is greater than or equal to the second configuration value, it is determined that the synthetic acceleration is within the preset range.
[0061] In some embodiments of the present application, in the case that the synthetic acceleration is outside the preset range in multiple preset periods, in order to further determine whether the mobile device is lifted, the posture angle change rate of the mobile device can be determined based on the angular velocity data.
[0062] In some embodiments of the present application, the mobile device determines the posture angle change rate of the mobile device based on the angular velocity data, including: determining the posture angle corresponding to each preset time of the mobile device based on the angular velocity data; determining at least one posture angle change rate based on the multiple posture angles and the preset time corresponding to the multiple posture angles.
[0063] In an embodiment of the present application, the mobile device can use Euler integration to integrate the angular velocity data to obtain the posture angle corresponding to each preset time of the mobile device. The posture angle can include but is not limited to the pitch angle of the mobile device and the roll angle of the mobile device.
[0064] In an embodiment of the present application, the mobile device calculates the ratio of the difference between any two posture angles and the time difference of the preset time corresponding to any two posture angles to obtain at least one posture angle change rate. In an example, the posture angle change rate can be calculated based on any two pitch angles of the mobile device, for example, the posture angle change rate can be represented as wherein, may represent the difference between any two pitch angles, may represent the time difference of the preset time corresponding to any two pitch angles. In another example, the attitude angle change rate can be calculated based on any two roll angles, for example, the attitude angle change rate can be represented as wherein, may represent the difference between any two roll angles, may represent the time difference of the preset time corresponding to any two roll angles.
[0065] Embodiments of the present application can determine the attitude angle of the mobile device corresponding to each preset time through the angular velocity data, and further quantize the attitude angle change rate of the mobile device through the plurality of attitude angles and the preset time corresponding to the plurality of attitude angles.
[0066] In S204, if the attitude angle change rate is greater than the preset change rate in the plurality of preset periods, it is determined that the mobile device is in the lifted state.
[0067] In some embodiments of the present application, in order to verify whether the attitude angle change rate is out of limit, a preset change rate can be set, which can be set and adjusted according to actual needs, for example, the preset change rate can be adjusted according to the terrain features of the working area of the mobile device.
[0068] In some embodiments of the present application, the mobile device includes a body, and in the case that the mobile device works along the slope, the preset change rate is increased based on the inclination angle of the body.
[0069] For example, assuming that the preset change rate is set to 30 degrees per second, and the inclination angle of the body is greater than 15 degrees, the preset change rate can be adjusted to 45 degrees per second.
[0070] In some embodiments of the present application, in order to avoid single-point interference, in the case that the attitude angle change rate of the mobile device is greater than the preset change rate in the plurality of preset periods, it is determined that the mobile device is in the lifted state.
[0071] In some embodiments of the present application, after it is determined that the mobile device is in the lifted state, the motor of the mobile device is stopped, and prompt information is sent in a preset manner, the preset manner including at least one of an audible and visual alarm manner, a wireless broadcast manner, the prompt information being used to prompt that the mobile device is in the lifted state.
[0072] Embodiments of the present application can avoid the invalid operation of the motor of the mobile device by stopping the motor of the mobile device, and can timely improve that the mobile device is in the lifted state by sending the prompt information in the preset manner.
[0073] In the embodiments of the present application, during the movement of the self-moving device, if the synthetic acceleration is outside the preset range for a plurality of preset periods, it is further detected whether the attitude angle change rate is greater than a preset change rate, and if the attitude angle change rate is greater than the preset change rate for a plurality of preset periods, it is determined that the self-moving device is in the lifted state, which can effectively solve the problem of false positives in lifting detection. In addition, in the process of state detection, the present application does not need to rely on mechanical structural parts, so it can effectively solve the problem of detection failure caused by environmental corrosion of mechanical structural parts.
[0074] As shown in Figure 4 , it is a flow chart of the preset range adjustment method provided by an embodiment of the present application, and the preset range adjustment method is applied to a self-moving device. As shown in Figure 5 , it specifically includes the following steps: S401, determining the standard deviation of the synthetic acceleration of the self-moving device based on the historical acceleration data of the self-moving device when performing a work task.
[0075] In some embodiments of the present application, the self-moving device can determine the synthetic acceleration corresponding to the historical acceleration data based on the historical acceleration data, and the determination method of the synthetic acceleration corresponding to the historical acceleration data can refer to the related description of step S202. Figure 2 The related description of step S202 is not repeated here.
[0076] In some embodiments of the present application, the self-moving device calculates the standard deviation of the synthetic acceleration according to the synthetic acceleration corresponding to the historical acceleration data based on the standard deviation calculation formula.
[0077] S402, adjusting the preset range according to the standard deviation of the synthetic acceleration.
[0078] In some embodiments of the present application, in order to reasonably adjust the preset range, a first threshold and a second threshold can be set, the second threshold is greater than the first threshold, and the first threshold and the second threshold can be set and adjusted according to actual needs. For example, the first threshold can be set to 0.1g, and the second threshold can be set to 0.2g.
[0079] In some embodiments of the present application, if the standard deviation of the synthetic acceleration is less than or equal to the first threshold, the upper limit value in the preset range is determined as a first preset acceleration, and the first preset acceleration can be set and adjusted according to actual needs. For example, the first preset acceleration can be set to 2g.
[0080] In some embodiments of the present application, if the standard deviation of the synthetic acceleration is greater than the first threshold and less than or equal to the second threshold, the upper limit value in the preset range is determined as a second preset acceleration, and the second preset acceleration is greater than the first preset acceleration. For example, the second preset acceleration can be set to 2.3g.
[0081] In some embodiments of this application, if the standard deviation of the synthesized acceleration is greater than a second threshold, the upper limit of the preset interval is determined to be a third preset acceleration, which is greater than the second preset acceleration. For example, the third preset acceleration can be set to 2.5g.
[0082] In some embodiments of this application, to prevent the standard deviation of the composite acceleration from exceeding a second threshold within a short period due to slippery lawn, the relationship between the energy percentage of the self-moving device in a preset frequency band and a preset percentage can be detected. The preset frequency band and preset percentage can be set and adjusted according to actual needs; for example, the preset frequency band can be set to 0.5Hz-10Hz, and the preset percentage can be set to 40%. If the standard deviation of the composite acceleration exceeds the second threshold, and the self-moving device performs the task along a non-flat lawn, and the energy percentage of the self-moving device in the preset frequency band is detected to be greater than the preset percentage, the upper limit of the preset interval is determined to be a third preset acceleration.
[0083] In other embodiments, the self-moving device does not detect the percentage of its energy in a preset frequency band while performing a task along a flat lawn.
[0084] In some embodiments of this application, when the slope of the self-moving device is greater than a preset angle, or when the gravel coverage of the area where the self-moving device is located is greater than a preset proportion, the upper limit value in the preset range is determined to be a third preset acceleration. The preset angle and preset proportion can be set and adjusted according to actual needs, and are not limited thereto.
[0085] This application embodiment, through the relationship between the standard deviation of synthetic acceleration and a first threshold, and the relationship between the standard deviation of synthetic acceleration and a second threshold, can reasonably adjust the preset interval. Furthermore, when the standard deviation of synthetic acceleration is greater than the second threshold, and the self-moving device performs the task along a non-flat lawn, by combining the relationship between the energy proportion of the self-moving device in the preset frequency band and the preset proportion, it can avoid the standard deviation of synthetic acceleration from exceeding the second threshold for a short period due to slippery lawn, thus preventing unreasonable adjustments to the preset interval and further improving the rationality of the preset interval. In addition, by using the relationship between the slope of the self-moving device and the preset angle, and the relationship between the gravel coverage rate of the area where the self-moving device is located and the preset proportion, the preset interval can be adjusted, further improving its rationality.
[0086] like Figure 5 The diagram shown is a flowchart of a state detection method provided in another embodiment of this application. The state detection method is applied to self-moving devices (e.g., mobile devices). Figure 1 In the self-moving device 100). Depending on different needs, the order of each step in this flowchart can be adjusted according to actual requirements, and some steps can be omitted.
[0087] S501, obtaining acceleration data and angular velocity data from the mobile device.
[0088] In some embodiments of the present application, the way of obtaining the acceleration data and the angular velocity data from the mobile device can refer to the related description of step S201 in Figure 2
[0089] In some embodiments of the present application, the angular velocity data comprises angular velocity components of the mobile device in three-axis directions.
[0090] S502, calculating a resultant acceleration based on the acceleration data.
[0091] S503, determining a rate of change of the attitude angle of the mobile device based on the angular velocity data, if the resultant acceleration is out of a preset range in a plurality of preset periods.
[0092] The detailed contents of steps S502-S503 can refer to the detailed description of steps S202-S203 in the above Figure 2
[0093] S504, determining a total angular velocity intensity based on the angular velocity components in the angular velocity data, if the rate of change of the attitude angle is greater than a preset rate of change in a plurality of preset periods.
[0094] In some embodiments of the present application, the mobile device can determine the total angular velocity intensity according to the angular velocity components in the three-axis directions, and the formula of the total angular velocity intensity can be represented as may represent the total angular velocity intensity, may represent the acceleration component of the mobile device in the axis direction, may represent the angular velocity component of the mobile device in the axis direction, may represent the angular velocity component of the mobile device in the axis direction, may represent the angular velocity component of the mobile device in the axis direction.
[0095] S505, determining that the body and the wheel set of the mobile device are in the lifted state, if the total angular velocity intensity is less than an angular velocity threshold or the angular velocity components are all less than the angular velocity threshold.
[0096] In some embodiments of the present application, when the body and the wheel set of the self-moving device are both in the raised state, the wheel set does not appear to be in the drooping state, and the angular velocity zero detection can be performed by setting an angular velocity threshold value. The angular velocity threshold value can be set and adjusted according to the sensitivity of the actual self-moving device. For example, the angular velocity threshold value can be set to 3 degrees per second.
[0097] In some embodiments of the present application, when the total angular velocity intensity is less than the angular velocity threshold value or the angular velocity components are both less than the angular velocity threshold value, it is determined that the body and the wheel set of the self-moving device are both in the raised state.
[0098] In some embodiments of the present application, during the movement of the self-moving device, if the combined acceleration is outside the preset range in a plurality of preset periods, it is further detected whether the attitude angle change rate is greater than a preset change rate. If the attitude angle change rate is greater than the preset change rate in a plurality of preset periods, in combination with the angular velocity components of the self-moving device in the three-axis direction, the problem that the body and the wheel set are simultaneously raised and cannot be detected can be solved.
[0099] As shown in FIG. 6, it is a flow chart of a state detection method provided by another embodiment of the present application. The state detection method is applied in a self-moving device (for example, the self-moving device 100 of FIG. 1). According to different requirements, the order of each step in the flow chart can be adjusted according to actual requirements, and some steps can be omitted. Figure 6 Figure 1 S601, acceleration data and angular velocity data of the self-moving device are obtained.
[0100] S602, a combined acceleration is calculated based on the acceleration data.
[0101] S602, a combined acceleration is calculated based on the acceleration data.
[0102] The details of steps S601-S602 can refer to the detailed description of steps S201-S202 in the foregoing Figure 2
[0103] S603, it is detected whether the combined acceleration is outside a preset range in a plurality of preset periods.
[0104] In some embodiments of the present application, in order to avoid single-point interference, it can be detected whether the combined acceleration of the self-moving device in a plurality of preset periods is outside the preset range. The preset range can include a first configuration value and a second configuration value, and the second configuration value is greater than the first configuration value.
[0105] In some embodiments of the present application, if the resultant acceleration is less than the first configured value or greater than the second configured value, it is determined that the resultant acceleration is outside the preset interval. If the resultant acceleration is greater than or equal to the first configured value and greater than or equal to the second configured value, it is determined that the resultant acceleration is inside the preset interval.
[0106] In some embodiments of the present application, if the resultant acceleration is inside the preset interval in any of the preset periods, step S601 is re-executed; if the resultant acceleration is outside the preset interval in all of the preset periods, step S604 is executed.
[0107] S604, determining the rate of change of the attitude angle of the mobile device based on the angular velocity data.
[0108] The details of step S604 can refer to the detailed description of step S203 in the foregoing Figure 2 , which will not be described herein again.
[0109] S605, detecting whether the rate of change of the attitude angle is greater than a preset rate of change in all of the preset periods.
[0110] In some embodiments of the present application, in order to verify whether the rate of change of the attitude angle is out of limit, a preset rate of change can be set, which can be set and adjusted according to actual requirements.
[0111] In some embodiments of the present application, if the rate of change of the attitude angle is less than or equal to the preset rate of change in any of the preset periods, step S601 is re-executed; if the rate of change of the attitude angle is greater than the preset rate of change in all of the preset periods, step S606 is executed.
[0112] S606, determining that the mobile device is in the raised state.
[0113] In some embodiments of the present application, if the resultant acceleration is outside the preset interval in all of the preset periods during the movement of the mobile device, it is further detected whether the rate of change of the attitude angle is greater than the preset rate of change, and only if the rate of change of the attitude angle is greater than the preset rate of change in all of the preset periods, it is determined that the mobile device is in the raised state, which can effectively solve the problem of false positives in the raised state detection. In addition, the embodiments of the present application do not need to rely on mechanical structural parts in the process of state detection, and thus can effectively solve the problem of detection failure caused by environmental corrosion of the mechanical structural parts.
[0114] For example, Figure 7Fig. 1 shows a structural schematic diagram of a self-moving device according to an embodiment of the present application. In the embodiment of the present application, the self-moving device 100 can include a body, and a storage device 710, a processing device 720, a power supply 730, a camera 740, a sensor 750, a working device 760, a communication module 770, a positioning module 780, a driving wheel 790 and a bus 700 arranged on the body. The processing device 720 is coupled to the storage device 710, the power supply 730, the camera 740, the sensor 750, the working device 760, the communication module 770, the positioning module 780 and the driving wheel 790 respectively through the bus 700.
[0115] The storage device 710 can include one or more random access memories (RAMs) and one or more non-volatile memories (NVMs). The random access memory can be directly read and written by the processing device 720, and can be used to store executable programs (for example, machine instructions) of an operating system or other programs running in the background, and can also be used to store data of users and applications, etc. The random access memory can include static random access memories (SRAMs), dynamic random access memories (DRAMs), synchronous dynamic random access memories (SDRAMs), double data rate synchronous dynamic random access memories (DDR SDRAMs), etc.
[0116] The non-volatile memory can also store executable programs and store data of users and applications, etc., and can be loaded into the random access memory in advance for direct reading and writing by the processing device 720. The non-volatile memory can include magnetic disk storage devices, flash memories.
[0117] The storage device 710 is configured to store one or more computer programs. The one or more computer programs are configured to be executed by the processing device 720. The one or more computer programs include a plurality of instructions, which, when executed by the processing device 720, can implement a state detection method or other method executed on the self-moving device 100.
[0118] In other embodiments, the self-moving device 100 further includes an external memory interface for connecting an external memory to expand the storage capacity of the self-moving device 100.
[0119] The processing device 720 can 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, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units can be independent devices or integrated in one or more processors.
[0120] The processing device 720 provides computing and control capabilities, for example, the processing device 720 is configured to execute computer programs stored in the storage device 710 to implement the state detection method described above.
[0121] The power supply 730 is configured to supply power to the self-moving device 100. In an embodiment of the present application, the power supply 730 can include any one or more of a battery, a fuel generator, a solar power module, a wind power module, etc.
[0122] The camera 740 is configured to capture still images or videos. An object generates an optical image through a lens and projects the optical image to a photosensitive element. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then converts the electrical signal into a digital image signal. In an embodiment of the present application, the self-moving device 100 can include one or N cameras 740, where N is a positive integer greater than 1.
[0123] The sensor 750 is configured to obtain data for the self-moving device 100, such as acceleration data and angular velocity data of the self-moving device 100. In an embodiment of the present application, the sensor 750 can include one or more of a collision sensor, a current sensor, a voltage sensor, a rain detection sensor, a laser radar, a camera, and an ultrasonic sensor.
[0124] The work device 760 is configured to implement corresponding work functions, such as mowing, deicing, cruising, cleaning, and spraying pesticides, etc. In an embodiment of the present application, the work device 760 can include a driving mechanism such as a motor, a hydraulic cylinder, and a device such as a cutter head including a blade. In an embodiment of the present application, the motor can drive the blade to move to complete the mowing operation. The motor can adjust the height and speed of mowing by controlling the movement of the blade.
[0125] The communication module 770 is configured to implement communication between the self-moving device 100 and other devices. In an embodiment of the present application, the communication module 770 can interact with other devices based on wired communication and / or wireless communication. The wireless communication can include one or a combination of Bluetooth communication, Wi-Fi communication, Near Field Communication (NFC), etc.
[0126] The positioning module 780 is configured to determine the position and moving direction of the self-moving device 100. In an embodiment of the present application, the positioning module 780 can include one or more of a Global Positioning System (GPS), an inertial navigation system, a Real-time kinematic (RTK) positioning device, etc.
[0127] The driving wheel 790 is configured to implement movement of the self-moving device 100. In an embodiment of the present application, the driving wheel 790 can implement movement of the self-moving device 100 on the target planning track. In an embodiment of the present application, the self-moving device 100 can include a driving wheel and a passive wheel, and the driving wheel can further include a left driving wheel and a right driving wheel.
[0128] The bus 700 is configured to provide a communication channel between the storage device 710, the processing device 720, the power supply 730, the camera 740, the sensor 750, the work device 760, the communication module 770, the positioning module 780, and the driving wheel 790 in the self-moving device 100.
[0129] In other embodiments of the present application, the self-moving device 100 can further include a collision avoidance part and a steering assembly, etc. The collision avoidance part can be configured to prevent the driving wheel 790 from colliding with obstacles in front of the self-moving device, etc. The steering assembly can be configured to adjust the driving direction of the driving wheel 790.
[0130] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the self-moving device 100. In other embodiments of the present application, the self-moving device 100 can include more or fewer components than illustrated, or combine certain components, or split certain components, or different component arrangements. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
[0131] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the self-moving device 100. In other embodiments of the present application, the self-moving device 100 can include more or fewer components than illustrated, or combine certain components, or split certain components, or different component arrangements. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
[0132] The embodiments of the present application also provide a computer readable storage medium, and the computer readable storage medium stores a computer program. The computer program includes program instructions, and the method implemented when the program instructions are executed can refer to the method in each of the above embodiments of the present application.
[0133] The computer readable storage medium can be an internal memory of the self-moving device or the base station device in the above embodiments, for example, a hard disk or a memory of the self-moving device or the base station device. The computer readable storage medium can also be an external storage device of the self-moving device or the base station device, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc.
[0134] In some embodiments, the computer readable storage medium can include a program storage area and a data storage area. The program storage area can store an operating system, an application required by at least one function, etc. The data storage area can store data created according to the use of the self-moving device or the base station device, etc.
[0135] In the above embodiments, the description of each embodiment has its own focus, and the parts not described or recorded in detail in a certain embodiment can refer to the related description of other embodiments.
[0136] Those skilled in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. A person 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 the present application.
[0137] The above examples are only used to illustrate the technical solutions of the present application, but not to limit the present application; although the present application has been described in detail with reference to the foregoing examples, those ordinarily skilled in the art should understand: the technical solutions recorded in the foregoing examples can still be modified, or some technical features can be replaced equivalently; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A state detection method characterized by, The method is applied to a self-moving device, and comprises: obtaining acceleration data and angular velocity data of the self-moving device; calculating a resultant acceleration based on the acceleration data; if the resultant acceleration is outside a preset range in a plurality of preset periods, determining a rate of change of an attitude angle of the self-moving device based on the angular velocity data; if the rate of change of the attitude angle is greater than a preset rate of change in the plurality of preset periods, determining that the self-moving device is in a lifted state.
2. The state detection method according to claim 1, wherein The angular velocity data comprises angular velocity components of the self-moving device in three-axis directions, and the method further comprises: determining a total angular velocity intensity based on the angular velocity components; if the total angular velocity intensity is less than an angular velocity threshold or the angular velocity components are all less than the angular velocity threshold, determining that a body of the self-moving device and a wheel set are both in a lifted state.
3. The state detection method according to claim 1, wherein The method further comprises: determining a standard deviation of the resultant acceleration of the self-moving device based on historical acceleration data of the self-moving device when performing a work task; and adjusting the preset range according to the standard deviation of the resultant acceleration.
4. The state detection method according to claim 3, wherein The adjusting the preset range according to the standard deviation of the resultant acceleration comprises: if the standard deviation of the resultant acceleration is less than or equal to a first threshold, determining that an upper limit value in the preset range is a first preset acceleration; if the standard deviation of the resultant acceleration is greater than the first threshold and less than or equal to a second threshold, determining that the upper limit value in the preset range is a second preset acceleration, the second preset acceleration being greater than the first preset acceleration; if the standard deviation of the resultant acceleration is greater than the second threshold, determining that the upper limit value in the preset range is a third preset acceleration, the third preset acceleration being greater than the second preset acceleration; if the standard deviation of the resultant acceleration is greater than the second threshold and the self-moving device performs a task on a non-flat lawn, in a case where it is detected that an energy proportion of the self-moving device in a preset frequency band is greater than a preset proportion, determining that the upper limit value in the preset range is the third preset acceleration.
5. The state detection method according to claim 4, wherein The method further comprises: in a case where a slope where the self-moving device is located is greater than a preset angle or a gravel coverage rate of an area where the self-moving device is located is greater than a preset proportion, determining that the upper limit value in the preset range is the third preset acceleration.
6. The state detection method according to Claim 1, wherein The self-moving device comprises a body, and the method further comprises: in a case where the self-moving device performs a task on an inclined slope, increasing the preset rate of change based on an inclination angle of the body.
7. The state detection method according to Claim 1, wherein The calculating the resultant acceleration based on the acceleration data comprises: filtering the acceleration data to obtain filtered acceleration data; removing a gravity component in the filtered acceleration data to obtain processed acceleration data, the processed acceleration data comprising acceleration components of the self-moving device in three-axis directions; and determining the resultant acceleration based on the acceleration components.
8. The state detection method according to claim 7, wherein The filtering the acceleration data to obtain filtered acceleration data comprises: In a case where the change value of the acceleration data is greater than a preset change value, a window length of a preset window is adjusted, and the acceleration data is weighted filtered based on the adjusted preset window, to obtain the filtered acceleration data, and a weight corresponding to the preset window is in a Gaussian distribution.
9. The state detection method according to Claim 1, wherein The determining the attitude angle change rate of the self-moving device based on the angular velocity data comprises: determining, based on the angular velocity data, a plurality of attitude angles corresponding to a plurality of preset time points; determining at least one attitude angle change rate based on the plurality of attitude angles and the plurality of preset time points corresponding to the plurality of attitude angles.
10. The state detection method according to Claim 1, wherein After determining that the self-moving device is in the lifted state, the method further comprises: stopping running a motor of the self-moving device, and sending prompt information in a preset manner, the preset manner comprising at least one of an audible and visual alarm manner and a wireless broadcast manner, the prompt information being used to prompt that the self-moving device is in the lifted state.
11. A self-moving device, characterized in that The self-moving device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to enable the self-moving device to implement the state detection method according to any one of claims 1 to 10.
12. A computer-readable storage medium, characterized in that, The computer program is stored on the computer readable storage medium and is executable by the processor in the self-moving device to implement the state detection method according to any one of claims 1 to 10.