CN113849062B - Dynamic energy-saving method and device based on acceleration and attitude angle of embedded system - Google Patents

Dynamic energy-saving method and device based on acceleration and attitude angle of embedded system Download PDF

Info

Publication number
CN113849062B
CN113849062B CN202111403526.0A CN202111403526A CN113849062B CN 113849062 B CN113849062 B CN 113849062B CN 202111403526 A CN202111403526 A CN 202111403526A CN 113849062 B CN113849062 B CN 113849062B
Authority
CN
China
Prior art keywords
dynamic
level value
bus
value
high level
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111403526.0A
Other languages
Chinese (zh)
Other versions
CN113849062A (en
Inventor
易辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Witmotion Shenzhen Co ltd
Original Assignee
Witmotion Shenzhen Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Witmotion Shenzhen Co ltd filed Critical Witmotion Shenzhen Co ltd
Priority to CN202111403526.0A priority Critical patent/CN113849062B/en
Publication of CN113849062A publication Critical patent/CN113849062A/en
Application granted granted Critical
Publication of CN113849062B publication Critical patent/CN113849062B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/10Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration

Abstract

The invention relates to the technical field of computer equipment, in particular to a dynamic energy-saving method and a dynamic energy-saving device based on acceleration and attitude angles of an embedded system, wherein the dynamic energy-saving method based on the acceleration and attitude angles of the embedded system comprises the following steps: determining the dynamic offset degree of each direction of the acceleration sensor; determining a bidirectional serial dynamic energy-saving mode according to the dynamic offset degree of each direction of the acceleration sensor; determining the dynamic offset degree of each axis of the gyroscope; and determining an asynchronous transmission dynamic energy-saving mode according to the dynamic offset of each axis of the gyroscope. The method provided by the invention adjusts the transmission state of the bidirectional serial bus according to the offset condition of the acceleration sensor, adjusts the asynchronous transmission state according to the offset condition of the gyroscope, realizes dynamic energy saving of sensor detection, reduces the electric quantity consumption of the sensor, and has high intelligent degree and strong adaptability because the adjustment is dynamic and is carried out according to the change of the acquired data.

Description

Dynamic energy-saving method and device based on acceleration and attitude angle of embedded system
Technical Field
The invention relates to the technical field of computer equipment, in particular to a dynamic energy-saving method and device based on acceleration and attitude angles of an embedded system.
Background
An acceleration sensor is a sensor capable of measuring acceleration. The innovative use of the acceleration sensor in the shaking function in WeChat breaks through the constant of electronic products. This function is implemented from the characteristics of the sensor's orientation, accelerometer, light, magnetic field, proximity, temperature, etc. The principle is that an acceleration sensor is integrated in a mobile phone, the acceleration sensor can respectively measure X, Y, Z acceleration values in three aspects, wherein the X direction represents horizontal movement of the mobile phone, the Y direction represents vertical movement of the mobile phone, and the Z direction represents the spatial vertical direction of the mobile phone, the corresponding acceleration values are transmitted to an operating system, and friends playing with WeChat can be known by judging the change of the acceleration values.
The gyroscope sensor is a simple and easy-to-use orientation device based on space movement and gestures, is originally applied to a helicopter model, and is widely applied to mobile portable equipment such as mobile phones.
At present, the application scene of the embedded system is more and more popular, and the application of the acceleration sensor and the gyroscope is more and more extensive. One of the major challenges faced by the acceleration sensor and the gyroscope is the consumption of electric energy, which is increased by the application of the acceleration sensor and the gyroscope.
Disclosure of Invention
In view of the above, it is necessary to provide a dynamic energy saving method and apparatus based on the acceleration and attitude angle of the embedded system.
The embodiment of the invention is realized in such a way that the dynamic energy-saving method based on the acceleration and the attitude angle of the embedded system comprises the following steps:
determining the dynamic offset degree of each direction of the acceleration sensor;
determining a bidirectional serial dynamic energy-saving mode according to the dynamic offset degree of each direction of the acceleration sensor;
determining the dynamic offset degree of each axis of the gyroscope;
and determining an asynchronous transmission dynamic energy-saving mode according to the dynamic offset of each axis of the gyroscope.
In one embodiment, the present invention provides a dynamic energy saving device based on acceleration and attitude angle of an embedded system, including:
the acceleration deviation determining module is used for determining the dynamic deviation degree of each direction of the acceleration sensor;
the first adjusting module is used for determining a bidirectional serial dynamic energy-saving mode according to the dynamic offset degree of each direction of the acceleration sensor;
the gyroscope offset determining module is used for determining the dynamic offset of each axis of the gyroscope;
and the second adjusting module is used for determining the asynchronous transmission dynamic energy-saving mode according to the dynamic offset of each axis of the gyroscope.
The dynamic energy-saving method based on the acceleration and the attitude angle of the embedded system provided by the embodiment of the invention adjusts the transmission state of the bidirectional serial bus according to the offset condition of the acceleration sensor, and adjusts the asynchronous transmission state according to the offset condition of the gyroscope, thereby realizing the dynamic energy saving of the sensor detection, reducing the power consumption of the sensor, and having high intelligent degree and strong adaptability because the adjustment is dynamic and is carried out according to the change of the acquired data.
Drawings
Fig. 1 is a frame flowchart of a dynamic energy saving method based on acceleration and attitude angle of an embedded system according to an embodiment of the present invention;
fig. 2 is a block diagram of a dynamic energy saving device based on acceleration and attitude angle of an embedded system according to an embodiment of the present invention;
FIG. 3 is a block diagram showing an internal configuration of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements are not limited by these terms unless otherwise specified. These terms are only used to distinguish one element from another. For example, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script, without departing from the scope of the present disclosure.
In one embodiment, as shown in fig. 1, the present invention provides a dynamic energy saving method based on an acceleration and an attitude angle of an embedded system, where the dynamic energy saving method based on the acceleration and the attitude angle of the embedded system includes the following steps:
determining the dynamic offset degree of each direction of the acceleration sensor;
determining a bidirectional serial dynamic energy-saving mode according to the dynamic offset degree of each direction of the acceleration sensor;
determining the dynamic offset degree of each axis of the gyroscope;
and determining an asynchronous transmission dynamic energy-saving mode according to the dynamic offset of each axis of the gyroscope.
In the embodiment of the invention, the dynamic offset refers to the deviation degree of the data acquired at two acquisition time points, and can be used for measuring the fluctuation condition of the data acquired by the sensor. It is understood that the acceleration sensor and the gyroscope in the embodiment of the present invention are both a specific type of sensor, and the bidirectional serial and asynchronous transmission are two corresponding transmission modes. In addition, the dynamic offset degree in the invention means that the offset degree is calculated and updated in real time by the collected data and is in a dynamic change process, so that the dynamic offset degree can also reflect the fluctuation condition of an instantaneous value.
In the embodiment of the present invention, it should be noted that, in terms of the form, bidirectional serial dynamic energy saving or asynchronous transmission dynamic energy saving is to classify the transmission mode from the data volume or speed of transmission, and different fluctuation ranges correspond to different transmission classes.
The dynamic energy-saving method based on the acceleration and the attitude angle of the embedded system provided by the embodiment of the invention adjusts the transmission state of the bidirectional serial bus according to the offset condition of the acceleration sensor, and adjusts the asynchronous transmission state according to the offset condition of the gyroscope, thereby realizing the dynamic energy saving of the sensor detection, reducing the power consumption of the sensor, and having high intelligent degree and strong adaptability because the adjustment is dynamic and is carried out according to the change of the acquired data.
In an embodiment of the present invention, the determining the dynamic offset degree of each direction of the acceleration sensor specifically includes the following steps:
determining the dynamic offset degree of the acceleration sensor in the X direction;
determining the dynamic offset degree of the acceleration sensor in the Y direction;
and determining the dynamic offset degree of the acceleration sensor in the Z direction.
In the embodiment of the present invention, the acceleration sensor includes X, Y, Z directions that are perpendicular to each other two by two, specifically, taking a mobile phone as an example, when a screen of the mobile phone is laid flat upward, a horizontal direction is an X direction, a longitudinal direction is a Y direction, and an up-down direction is a Z direction under a normal use angle.
In one embodiment of the present invention, the degree of X, Y or Z-direction dynamic offset is determined by:
acquiring the dynamic deviation degree of a target direction within a first set time and calculating an average value to obtain a first average value;
acquiring the dynamic deviation degree of the target direction within second set time and calculating the average value to obtain a second average value, wherein the second set time is twice of the first set time;
determining a dynamic degree of offset of the target direction by:
Figure DEST_PATH_IMAGE001
wherein:
Figure DEST_PATH_IMAGE003
the dynamic offset degree of the acceleration sensor is obtained;
Figure DEST_PATH_IMAGE005
is a first mean value;
Figure 307160DEST_PATH_IMAGE007
is the second mean value.
In the embodiment of the present invention, specifically, the first setting time may be 3 seconds, and correspondingly, the second setting time may be 6 seconds, that is, data points acquired in the first 3 seconds are acquired, and an average value of the data points is obtained; and then acquiring data points in the first 6 seconds, averaging, and calculating the obtained value by the above formula to obtain the dynamic offset. As another specific implementation manner, the first average value may be calculated from the data of the first 3 seconds, and the second average value may be calculated from the data of 3 to 6 seconds, both of which belong to the specific implementation manners provided by the present invention.
In an embodiment of the present invention, the determining a bidirectional serial dynamic energy-saving mode according to the dynamic offset of the acceleration sensor in each direction includes the following steps:
if the dynamic deviation degree of the acceleration sensor in the X direction is less than 10%, starting a bidirectional serial low energy-saving mode;
if the dynamic deviation degree of the acceleration sensor in the Y direction is more than 10% and less than 50%, starting a bidirectional serial medium energy-saving mode;
and if the dynamic deviation degree of the acceleration sensor in the Z direction is more than 50% and less than 100%, starting a bidirectional serial high energy-saving mode.
In the embodiment of the invention, different data ranges are adopted in different directions as trigger ranges, which considers the probability of larger deviation in each direction when products such as mobile phones and the like are actually used, and the setting can reduce the switching frequency of the system between different energy-saving modes.
In an embodiment of the present invention, the bidirectional serial low power saving mode specifically includes:
acquiring the average value of the dynamic offset degrees of the acceleration sensor in three directions, the high level value and the low level value of an sda data bus of an IIC bus, and the high level value and the low level value of a scl clock bus of the IIC bus;
multiplying the obtained average value of the dynamic offset of the acceleration sensor by 1.2, and multiplying the obtained result by the high level value and the low level value of the sda data bus and the high level value and the low level value of the scl clock bus respectively;
if the product of the high levels is less than 2.4V, setting the high level of the sda data bus and/or the high level of the scl clock bus with the product less than 2.4V as 3V; if the product of the low levels is less than 0.7V, setting the low level of the sda data bus and/or the low level of the scl clock bus with the product less than 0.7V to 0.7V;
adjusting the transmission rate of the IIC bus according to the standard transmission rate of the IIC bus and the value obtained by dividing the average value of the dynamic offset degrees of the acceleration sensors by 8;
the energy-saving mode in the bidirectional serial is as follows:
acquiring the average value of the dynamic offset degrees of the acceleration sensor in three directions, the high level value and the low level value of an sda data bus of an IIC bus, and the high level value and the low level value of a scl clock bus of the IIC bus;
dividing the obtained dynamic deviation mean value of the acceleration sensor by 2, and multiplying the obtained result by the high level value and the low level value of the sda data bus and the high level value and the low level value of the scl clock bus respectively;
if the product of the high levels is less than 2.4V, setting the high level of the sda data bus and/or the high level of the scl clock bus with the product less than 2.4V as 2.4V; if the product of the low levels is less than 0.7V, setting the low level of the sda data bus and/or the low level of the scl clock bus with the product less than 0.7V to 0.7V;
adjusting the transmission rate of the IIC bus according to the standard transmission rate of the IIC bus and the value obtained by dividing the average value of the dynamic offset degrees of the acceleration sensors by 8;
the bidirectional serial high energy-saving mode specifically comprises the following steps:
acquiring the average value of the dynamic offset degrees of the acceleration sensor in three directions, the high level value and the low level value of an sda data bus of an IIC bus, and the high level value and the low level value of a scl clock bus of the IIC bus;
dividing the obtained dynamic deviation mean value of the acceleration sensor by 8, and multiplying the obtained result by the high level value and the low level value of the sda data bus and the high level value and the low level value of the scl clock bus respectively;
if the product of the high levels is less than 2.4V, setting the high level of the sda data bus and/or the high level of the scl clock bus with the product less than 2.4V as 2.4V; if the product of the low levels is less than 0.7V, setting the low level of the sda data bus and/or the low level of the scl clock bus with the product less than 0.7V to 0.7V;
and adjusting the transmission rate of the IIC bus according to the standard transmission rate of the IIC bus and the value obtained by dividing the average value of the dynamic offset degrees of the acceleration sensors by 8.
In the present embodiment, dividing by 8 or 2 reduces the efficiency of operation as a whole, while multiplying by 1.2 increases the efficiency of operation. The transmission rate of the IIC bus is adjusted according to the standard transmission rate of the IIC bus and the value obtained by dividing the average value of the dynamic deviation degree of the acceleration sensor by 8, wherein the standard transmission rate has different values in different modes, and is 100kbit/s in a high energy-saving mode, 400kbit/s in a medium energy-saving mode, and 3.4Mbit/s in a low energy-saving mode. Adjusting the transmission rate of the IIC bus according to the standard transmission rate of the IIC bus and a value obtained by dividing the average value of the dynamic offset of the acceleration sensor by 8, which may specifically be: and multiplying the value obtained by dividing the average value of the dynamic deviation degrees of the acceleration sensor by 8 by the standard transmission rate to obtain a new transmission rate.
In an embodiment of the present invention, the determining the dynamic offset of each axis of the gyroscope specifically includes:
determining the dynamic offset degree of the X axis of the gyroscope;
determining the dynamic offset degree of a Y axis of the gyroscope;
and determining the dynamic offset degree of the Z axis of the gyroscope.
In the embodiment of the present invention, the gyroscope includes X, Y, Z three directions which are two by two perpendicular to each other, specifically, taking the mobile phone as an example, when the mobile phone screen is laid flat upward, the horizontal direction is an X axis, the longitudinal direction is a Y axis, and the up-down direction is a Z axis under a normal use angle.
In one embodiment of the present invention, the degree of dynamic offset in the X, Y, or Z axis is determined by:
acquiring the dynamic offset of a target axis within a first set time and calculating an average value to obtain a third average value;
acquiring the dynamic offset of the target axis within a second set time and calculating an average value to obtain a fourth average value, wherein the second set time is twice of the first set time;
the degree of dynamic offset of the target axis is determined by:
Figure 119444DEST_PATH_IMAGE009
wherein:
Figure 105035DEST_PATH_IMAGE010
the degree of gyroscope dynamic offset;
Figure DEST_PATH_IMAGE011
is the third mean value;
Figure 874911DEST_PATH_IMAGE013
is the fourth mean value.
In the embodiment of the present invention, specifically, the first setting time may be 3 seconds, and correspondingly, the second setting time may be 6 seconds, that is, data points acquired in the first 3 seconds are acquired, and an average value of the data points is obtained; and then acquiring data points in the first 6 seconds, averaging, and calculating the obtained value by the above formula to obtain the dynamic offset. As another specific implementation manner, the first average value may be calculated from the data of the first 3 seconds, and the second average value may be calculated from the data of 3 to 6 seconds, both of which belong to the specific implementation manners provided by the present invention.
In an embodiment of the present invention, the determining the asynchronous transmission dynamic energy saving mode according to the dynamic offset of each axis of the gyroscope includes the following steps:
if the dynamic offset degree of the X axis of the gyroscope is less than 30%, starting an asynchronous transmission low energy-saving mode;
if the dynamic offset degree of the Y axis of the gyroscope is more than 30% and less than 50%, starting an energy-saving mode in asynchronous transmission;
and if the dynamic offset degree of the Z axis of the gyroscope is more than 50% and less than 100%, starting an asynchronous transmission high energy-saving mode.
In the embodiment of the invention, different data ranges are adopted in different directions as trigger ranges, which considers the probability of larger deviation in each direction when products such as mobile phones and the like are actually used, and the setting can reduce the switching frequency of the system between different energy-saving modes.
In an embodiment of the present invention, the asynchronous transmission low energy saving mode specifically includes:
obtaining the average value of the dynamic migration degrees of three axes of the gyroscope, wherein txd of the rs232 bus sends a high level value and a low level value of the data bus, and rxd of the rs232 bus receives the high level value and the low level value of the data bus;
multiplying the obtained dynamic offset average value of the gyroscope by 1.1, and multiplying the obtained result by a high level value and a low level value of a data bus sent by txd and a high level value and a low level value of a data bus received by rxd respectively;
if the product of the high level is less than-3V, setting txd sending data bus high level value and/or rxd receiving data bus high level value with the product less than-3V as-3V; if the product of the low level is less than 3V, setting the txd sending data bus low level value and/or rxd receiving data bus low level value with the product less than 3V as 3V;
adjusting the transmission rate of the rs232 bus according to the standard transmission rate of the rs232 bus and a value obtained by dividing the mean value of the dynamic offset of the gyroscope by 5;
the energy-saving mode in asynchronous transmission is specifically as follows:
obtaining the average value of the dynamic migration degrees of three axes of the gyroscope, wherein txd of the rs232 bus sends a high level value and a low level value of the data bus, and rxd of the rs232 bus receives the high level value and the low level value of the data bus;
dividing the obtained dynamic offset mean value of the gyroscope by 3, and multiplying the obtained result by a high level value and a low level value of a txd sending data bus and a high level value and a low level value of an rxd receiving data bus respectively;
if the product of the high level is less than-3V, setting txd sending data bus high level value and/or rxd receiving data bus high level value with the product less than-3V as-3V; if the product of the low level is less than 3V, setting txd sending data bus low level value and/or rxd receiving data bus low level value with the product less than 3V as 3V;
adjusting the transmission rate of the rs232 bus according to the standard transmission rate of the rs232 bus and a value obtained by dividing the mean value of the dynamic offset of the gyroscope by 5;
the asynchronous transmission high energy-saving mode specifically comprises the following steps:
obtaining the average value of the dynamic migration degrees of three axes of the gyroscope, wherein txd of the rs232 bus sends a high level value and a low level value of the data bus, and rxd of the rs232 bus receives the high level value and the low level value of the data bus;
dividing the obtained dynamic offset mean value of the gyroscope by 5, and multiplying the obtained result by a high level value and a low level value of a txd sending data bus and a high level value and a low level value of an rxd receiving data bus respectively;
if the product of the high level is less than-3V, setting txd sending data bus high level value and/or rxd receiving data bus high level value with the product less than-3V as-3V; if the product of the low level is less than 3V, setting txd sending data bus low level value and/or rxd receiving data bus low level value with the product less than 3V as 3V;
and adjusting the transmission rate of the rs232 bus according to the standard transmission rate of the rs232 bus and the value obtained by dividing the mean value of the dynamic offset of the gyroscope by 5.
In the present embodiment, dividing by 5 or 3 reduces the efficiency of operation as a whole, while multiplying by 1.1 increases the efficiency of operation. The transmission rate of the rs232 bus is adjusted according to a value obtained by dividing a standard transmission rate of the rs232 bus and a dynamic migration mean value of the gyroscope by 5, wherein the standard transmission rate has different values in different modes, namely 9600bps baud in a high-power-saving mode and 9600bps baud in a medium-power-saving mode, and 38400bps baud in a low-power-saving mode. Adjusting the transmission rate of the rs232 bus according to the standard transmission rate of the rs232 bus and a value obtained by dividing the mean value of the dynamic offset of the gyroscope by 5, which may specifically be: the new transmission rate is obtained by multiplying the value obtained by dividing the mean value of the dynamic shift of the gyroscope by 5 by the standard transmission rate.
In an embodiment of the present invention, as shown in fig. 2, an embodiment of the present invention further provides a dynamic energy saving device based on an acceleration and an attitude angle of an embedded system, where the dynamic energy saving device based on the acceleration and the attitude angle of the embedded system includes:
the acceleration deviation determining module is used for determining the dynamic deviation degree of each direction of the acceleration sensor;
the first adjusting module is used for determining a bidirectional serial dynamic energy-saving mode according to the dynamic offset degree of each direction of the acceleration sensor;
the gyroscope offset determining module is used for determining the dynamic offset of each axis of the gyroscope;
and the second adjusting module is used for determining the asynchronous transmission dynamic energy-saving mode according to the dynamic offset of each axis of the gyroscope.
In the embodiment of the present invention, please refer to the contents of the method part of the present invention for the description of each module of the above-mentioned apparatus, which is not described again in the embodiment of the present invention.
FIG. 3 is a diagram illustrating an internal structure of a computer device in one embodiment. As shown in fig. 3, the computer apparatus includes a processor, a memory, a network interface, an input device, and a display screen connected through a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The nonvolatile storage medium of the computer device stores an operating system and also stores a computer program, and when the computer program is executed by a processor, the processor can realize the dynamic energy-saving method based on the acceleration and the attitude angle of the embedded system provided by the embodiment of the invention. The internal memory may also store a computer program, and when the computer program is executed by the processor, the processor may execute the dynamic energy saving method based on the acceleration and the attitude angle of the embedded system according to the embodiment of the present invention. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the configuration shown in fig. 3 is a block diagram of only a portion of the configuration associated with aspects of the present invention and is not intended to limit the computing devices to which aspects of the present invention may be applied, and that a particular computing device may include more or less components than those shown in fig. 3, or may combine certain components, or have a different arrangement of components.
In one embodiment, the dynamic energy saving device based on the acceleration and attitude angle of the embedded system provided by the embodiment of the present invention can be implemented in the form of a computer program, and the computer program can be run on a computer device as shown in fig. 3. The memory of the computer equipment can store various program modules forming the dynamic energy-saving device based on the acceleration and the attitude angle of the embedded system. The computer program formed by the program modules enables the processor to execute the steps of the dynamic energy-saving method based on the acceleration and attitude angles of the embedded system in the embodiments of the invention described in the specification.
In one embodiment, a computer device is proposed, the computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
determining the dynamic offset degree of each direction of the acceleration sensor;
determining a bidirectional serial dynamic energy-saving mode according to the dynamic offset degree of each direction of the acceleration sensor;
determining the dynamic offset degree of each axis of the gyroscope;
and determining an asynchronous transmission dynamic energy-saving mode according to the dynamic offset of each axis of the gyroscope.
In one embodiment, a computer readable storage medium is provided, having a computer program stored thereon, which, when executed by a processor, causes the processor to perform the steps of:
determining the dynamic offset degree of each direction of the acceleration sensor;
determining a bidirectional serial dynamic energy-saving mode according to the dynamic offset degree of each direction of the acceleration sensor;
determining the dynamic offset degree of each axis of the gyroscope;
and determining an asynchronous transmission dynamic energy-saving mode according to the dynamic offset of each axis of the gyroscope.
It should be understood that, although the steps in the flowcharts of the embodiments of the present invention are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in various embodiments may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, databases, or other media used in embodiments provided herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (6)

1. A dynamic energy-saving method based on the acceleration and the attitude angle of an embedded system is characterized by comprising the following steps:
determining the dynamic offset degree of each direction of the acceleration sensor;
determining a bidirectional serial dynamic energy-saving mode according to the dynamic offset degree of each direction of the acceleration sensor;
determining the dynamic offset degree of each axis of the gyroscope;
determining an asynchronous transmission dynamic energy-saving mode according to the dynamic offset of each axis of the gyroscope;
the method for determining the dynamic offset degree of the acceleration sensor in each direction specifically comprises the following steps:
determining the dynamic offset degree of the acceleration sensor in the X direction;
determining the dynamic offset degree of the acceleration sensor in the Y direction;
determining the dynamic offset degree of the acceleration sensor in the Z direction;
x, Y or the degree of dynamic offset in the Z direction is determined by:
acquiring the dynamic deviation degree of a target direction within a first set time and calculating an average value to obtain a first average value;
acquiring the dynamic deviation degree of the target direction within second set time and calculating the average value to obtain a second average value, wherein the second set time is twice of the first set time;
determining a dynamic degree of offset of the target direction by:
Figure DEST_PATH_IMAGE002
wherein:
Figure DEST_PATH_IMAGE004
the dynamic offset degree of the acceleration sensor is obtained;
Figure DEST_PATH_IMAGE006
is a first mean value;
Figure DEST_PATH_IMAGE010
is a second mean value;
the method for determining the bidirectional serial dynamic energy-saving mode according to the dynamic offset degree of each direction of the acceleration sensor comprises the following steps:
if the dynamic deviation degree of the acceleration sensor in the X direction is less than 10%, starting a bidirectional serial low energy-saving mode;
if the dynamic deviation degree of the acceleration sensor in the Y direction is more than 10% and less than 50%, starting a bidirectional serial medium energy-saving mode;
if the dynamic deviation degree of the acceleration sensor in the Z direction is more than 50% and less than 100%, starting a bidirectional serial high energy-saving mode;
the bidirectional serial low energy-saving mode specifically comprises:
acquiring the average value of the dynamic offset degrees of the acceleration sensor in three directions, the high level value and the low level value of an sda data bus of an IIC bus, and the high level value and the low level value of a scl clock bus of the IIC bus;
multiplying the obtained average value of the dynamic offset of the acceleration sensor by 1.2, and multiplying the obtained result by the high level value and the low level value of the sda data bus and the high level value and the low level value of the scl clock bus respectively;
if the product of the high levels is less than 2.4V, setting the high level of the sda data bus and/or the high level of the scl clock bus with the product less than 2.4V as 3V; if the product of the low levels is less than 0.7V, setting the low level of the sda data bus and/or the low level of the scl clock bus with the product less than 0.7V to 0.7V;
adjusting the transmission rate of the IIC bus according to the standard transmission rate of the IIC bus and the value obtained by dividing the average value of the dynamic offset degrees of the acceleration sensors by 8;
the energy-saving mode in the bidirectional serial is as follows:
acquiring the average value of the dynamic offset degrees of the acceleration sensor in three directions, the high level value and the low level value of an sda data bus of an IIC bus, and the high level value and the low level value of a scl clock bus of the IIC bus;
dividing the obtained dynamic deviation mean value of the acceleration sensor by 2, and multiplying the obtained result by the high level value and the low level value of the sda data bus and the high level value and the low level value of the scl clock bus respectively;
if the product of the high levels is less than 2.4V, setting the high level of the sda data bus and/or the high level of the scl clock bus with the product less than 2.4V as 2.4V; if the product of the low levels is less than 0.7V, setting the low level of the sda data bus and/or the low level of the scl clock bus with the product less than 0.7V to 0.7V;
adjusting the transmission rate of the IIC bus according to the standard transmission rate of the IIC bus and the value obtained by dividing the average value of the dynamic offset degrees of the acceleration sensors by 8;
the bidirectional serial high energy-saving mode specifically comprises the following steps:
acquiring the average value of the dynamic offset degrees of the acceleration sensor in three directions, the high level value and the low level value of an sda data bus of an IIC bus, and the high level value and the low level value of a scl clock bus of the IIC bus;
dividing the obtained dynamic deviation mean value of the acceleration sensor by 8, and multiplying the obtained result by the high level value and the low level value of the sda data bus and the high level value and the low level value of the scl clock bus respectively;
if the product of the high levels is less than 2.4V, setting the high level of the sda data bus and/or the high level of the scl clock bus with the product less than 2.4V as 2.4V; if the product of the low levels is less than 0.7V, setting the low level of the sda data bus and/or the low level of the scl clock bus with the product less than 0.7V to 0.7V;
and adjusting the transmission rate of the IIC bus according to the standard transmission rate of the IIC bus and the value obtained by dividing the average value of the dynamic offset degrees of the acceleration sensors by 8.
2. The dynamic energy saving method based on the acceleration and attitude angle of the embedded system according to claim 1, wherein the determining the dynamic offset of each axis of the gyroscope specifically includes:
determining the dynamic offset degree of the X axis of the gyroscope;
determining the dynamic offset degree of a Y axis of the gyroscope;
and determining the dynamic offset degree of the Z axis of the gyroscope.
3. The dynamic energy-saving method based on the acceleration and attitude angle of the embedded system according to claim 2, wherein the dynamic offset degree of the X-axis, the Y-axis or the Z-axis is determined by the following steps:
acquiring the dynamic offset of a target axis within a first set time and calculating an average value to obtain a third average value;
acquiring the dynamic offset of the target axis within a second set time and calculating an average value to obtain a fourth average value, wherein the second set time is twice of the first set time;
the degree of dynamic offset of the target axis is determined by:
Figure DEST_PATH_IMAGE012
wherein:
Figure DEST_PATH_IMAGE014
the degree of gyroscope dynamic offset;
Figure DEST_PATH_IMAGE016
is the third mean value;
Figure DEST_PATH_IMAGE018
is the fourth mean value.
4. The dynamic energy-saving method based on the acceleration and attitude angle of the embedded system according to claim 3, wherein the determining the asynchronous transmission dynamic energy-saving mode according to the dynamic offset of each axis of the gyroscope comprises the following steps:
if the dynamic offset degree of the X axis of the gyroscope is less than 30%, starting an asynchronous transmission low energy-saving mode;
if the dynamic offset degree of the Y axis of the gyroscope is more than 30% and less than 50%, starting an energy-saving mode in asynchronous transmission;
and if the dynamic offset degree of the Z axis of the gyroscope is more than 50% and less than 100%, starting an asynchronous transmission high energy-saving mode.
5. The dynamic energy-saving method based on the acceleration and attitude angle of the embedded system according to claim 1, wherein:
the asynchronous transmission low energy-saving mode specifically comprises the following steps:
obtaining the average value of the dynamic migration degrees of three axes of the gyroscope, wherein txd of the rs232 bus sends a high level value and a low level value of the data bus, and rxd of the rs232 bus receives the high level value and the low level value of the data bus;
multiplying the obtained dynamic offset average value of the gyroscope by 1.1, and multiplying the obtained result by a high level value and a low level value of a data bus sent by txd and a high level value and a low level value of a data bus received by rxd respectively;
if the product of the high level is less than-3V, setting txd sending data bus high level value and/or rxd receiving data bus high level value with the product less than-3V as-3V; if the product of the low level is less than 3V, setting the txd sending data bus low level value and/or rxd receiving data bus low level value with the product less than 3V as 3V;
adjusting the transmission rate of the rs232 bus according to the standard transmission rate of the rs232 bus and a value obtained by dividing the mean value of the dynamic offset of the gyroscope by 5;
the energy-saving mode in asynchronous transmission is specifically as follows:
obtaining the average value of the dynamic migration degrees of three axes of the gyroscope, wherein txd of the rs232 bus sends a high level value and a low level value of the data bus, and rxd of the rs232 bus receives the high level value and the low level value of the data bus;
dividing the obtained dynamic offset mean value of the gyroscope by 3, and multiplying the obtained result by a high level value and a low level value of a txd sending data bus and a high level value and a low level value of an rxd receiving data bus respectively;
if the product of the high level is less than-3V, setting txd sending data bus high level value and/or rxd receiving data bus high level value with the product less than-3V as-3V; if the product of the low level is less than 3V, setting txd sending data bus low level value and/or rxd receiving data bus low level value with the product less than 3V as 3V;
adjusting the transmission rate of the rs232 bus according to the standard transmission rate of the rs232 bus and a value obtained by dividing the mean value of the dynamic offset of the gyroscope by 5;
the asynchronous transmission high energy-saving mode specifically comprises the following steps:
obtaining the average value of the dynamic migration degrees of three axes of the gyroscope, wherein txd of the rs232 bus sends a high level value and a low level value of the data bus, and rxd of the rs232 bus receives the high level value and the low level value of the data bus;
dividing the obtained dynamic offset mean value of the gyroscope by 5, and multiplying the obtained result by a high level value and a low level value of a txd sending data bus and a high level value and a low level value of an rxd receiving data bus respectively;
if the product of the high level is less than-3V, setting txd sending data bus high level value and/or rxd receiving data bus high level value with the product less than-3V as-3V; if the product of the low level is less than 3V, setting txd sending data bus low level value and/or rxd receiving data bus low level value with the product less than 3V as 3V;
and adjusting the transmission rate of the rs232 bus according to the standard transmission rate of the rs232 bus and the value obtained by dividing the mean value of the dynamic offset of the gyroscope by 5.
6. A dynamic energy-saving device based on the acceleration and the attitude angle of an embedded system is characterized by comprising:
the acceleration deviation determining module is used for determining the dynamic deviation degree of each direction of the acceleration sensor;
the first adjusting module is used for determining a bidirectional serial dynamic energy-saving mode according to the dynamic offset degree of each direction of the acceleration sensor;
the gyroscope offset determining module is used for determining the dynamic offset of each axis of the gyroscope;
the second adjusting module is used for determining an asynchronous transmission dynamic energy-saving mode according to the dynamic offset of each axis of the gyroscope;
the method for determining the dynamic offset degree of the acceleration sensor in each direction specifically comprises the following steps:
determining the dynamic offset degree of the acceleration sensor in the X direction;
determining the dynamic offset degree of the acceleration sensor in the Y direction;
determining the dynamic offset degree of the acceleration sensor in the Z direction;
x, Y or the degree of dynamic offset in the Z direction is determined by:
acquiring the dynamic deviation degree of a target direction within a first set time and calculating an average value to obtain a first average value;
acquiring the dynamic deviation degree of the target direction within second set time and calculating the average value to obtain a second average value, wherein the second set time is twice of the first set time;
determining a dynamic degree of offset of the target direction by:
Figure DEST_PATH_IMAGE020
wherein:
Figure DEST_PATH_IMAGE022
the dynamic offset degree of the acceleration sensor is obtained;
Figure DEST_PATH_IMAGE024
is a first mean value;
Figure DEST_PATH_IMAGE026
is a second mean value;
the method for determining the bidirectional serial dynamic energy-saving mode according to the dynamic offset degree of each direction of the acceleration sensor comprises the following steps:
if the dynamic deviation degree of the acceleration sensor in the X direction is less than 10%, starting a bidirectional serial low energy-saving mode;
if the dynamic deviation degree of the acceleration sensor in the Y direction is more than 10% and less than 50%, starting a bidirectional serial medium energy-saving mode;
if the dynamic deviation degree of the acceleration sensor in the Z direction is more than 50% and less than 100%, starting a bidirectional serial high energy-saving mode;
the bidirectional serial low energy-saving mode specifically comprises:
acquiring the average value of the dynamic offset degrees of the acceleration sensor in three directions, the high level value and the low level value of an sda data bus of an IIC bus, and the high level value and the low level value of a scl clock bus of the IIC bus;
multiplying the obtained average value of the dynamic offset of the acceleration sensor by 1.2, and multiplying the obtained result by the high level value and the low level value of the sda data bus and the high level value and the low level value of the scl clock bus respectively;
if the product of the high levels is less than 2.4V, setting the high level of the sda data bus and/or the high level of the scl clock bus with the product less than 2.4V as 3V; if the product of the low levels is less than 0.7V, setting the low level of the sda data bus and/or the low level of the scl clock bus with the product less than 0.7V to 0.7V;
adjusting the transmission rate of the IIC bus according to the standard transmission rate of the IIC bus and the value obtained by dividing the average value of the dynamic offset degrees of the acceleration sensors by 8;
the energy-saving mode in the bidirectional serial is as follows:
acquiring the average value of the dynamic offset degrees of the acceleration sensor in three directions, the high level value and the low level value of an sda data bus of an IIC bus, and the high level value and the low level value of a scl clock bus of the IIC bus;
dividing the obtained dynamic deviation mean value of the acceleration sensor by 2, and multiplying the obtained result by the high level value and the low level value of the sda data bus and the high level value and the low level value of the scl clock bus respectively;
if the product of the high levels is less than 2.4V, setting the high level of the sda data bus and/or the high level of the scl clock bus with the product less than 2.4V as 2.4V; if the product of the low levels is less than 0.7V, setting the low level of the sda data bus and/or the low level of the scl clock bus with the product less than 0.7V to 0.7V;
adjusting the transmission rate of the IIC bus according to the standard transmission rate of the IIC bus and the value obtained by dividing the average value of the dynamic offset degrees of the acceleration sensors by 8;
the bidirectional serial high energy-saving mode specifically comprises the following steps:
acquiring the average value of the dynamic offset degrees of the acceleration sensor in three directions, the high level value and the low level value of an sda data bus of an IIC bus, and the high level value and the low level value of a scl clock bus of the IIC bus;
dividing the obtained dynamic deviation mean value of the acceleration sensor by 8, and multiplying the obtained result by the high level value and the low level value of the sda data bus and the high level value and the low level value of the scl clock bus respectively;
if the product of the high levels is less than 2.4V, setting the high level of the sda data bus and/or the high level of the scl clock bus with the product less than 2.4V as 2.4V; if the product of the low levels is less than 0.7V, setting the low level of the sda data bus and/or the low level of the scl clock bus with the product less than 0.7V to 0.7V;
and adjusting the transmission rate of the IIC bus according to the standard transmission rate of the IIC bus and the value obtained by dividing the average value of the dynamic offset degrees of the acceleration sensors by 8.
CN202111403526.0A 2021-11-24 2021-11-24 Dynamic energy-saving method and device based on acceleration and attitude angle of embedded system Active CN113849062B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111403526.0A CN113849062B (en) 2021-11-24 2021-11-24 Dynamic energy-saving method and device based on acceleration and attitude angle of embedded system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111403526.0A CN113849062B (en) 2021-11-24 2021-11-24 Dynamic energy-saving method and device based on acceleration and attitude angle of embedded system

Publications (2)

Publication Number Publication Date
CN113849062A CN113849062A (en) 2021-12-28
CN113849062B true CN113849062B (en) 2022-03-04

Family

ID=78982206

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111403526.0A Active CN113849062B (en) 2021-11-24 2021-11-24 Dynamic energy-saving method and device based on acceleration and attitude angle of embedded system

Country Status (1)

Country Link
CN (1) CN113849062B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102918356A (en) * 2010-03-29 2013-02-06 高通股份有限公司 Power efficient way of operating motion sensors
CN107430426A (en) * 2015-03-25 2017-12-01 皇家飞利浦有限公司 Automatically change the healthy wearable thing that sensor reads timing
CN108021242A (en) * 2017-12-06 2018-05-11 广东欧珀移动通信有限公司 Gyro data processing method, mobile terminal and computer-readable recording medium
CN109240479A (en) * 2018-09-20 2019-01-18 Oppo广东移动通信有限公司 Air navigation aid, device, storage medium and electronic equipment
CN111214235A (en) * 2019-12-31 2020-06-02 河南科技大学 Human body activity monitoring method and device
CN111767003A (en) * 2020-06-05 2020-10-13 中国煤炭科工集团太原研究院有限公司 Mining equipment sensor data self-adaptive acquisition method based on different working conditions

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7392411B2 (en) * 2003-04-25 2008-06-24 Ati Technologies, Inc. Systems and methods for dynamic voltage scaling of communication bus to provide bandwidth based on whether an application is active
US9140590B2 (en) * 2011-02-09 2015-09-22 Texas Instruments Incorporated System and method of power-saving in MEMS sensor applications
KR20200091709A (en) * 2019-01-23 2020-07-31 삼성전자주식회사 Electronic apparatus and control method thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102918356A (en) * 2010-03-29 2013-02-06 高通股份有限公司 Power efficient way of operating motion sensors
CN107430426A (en) * 2015-03-25 2017-12-01 皇家飞利浦有限公司 Automatically change the healthy wearable thing that sensor reads timing
CN108021242A (en) * 2017-12-06 2018-05-11 广东欧珀移动通信有限公司 Gyro data processing method, mobile terminal and computer-readable recording medium
CN109240479A (en) * 2018-09-20 2019-01-18 Oppo广东移动通信有限公司 Air navigation aid, device, storage medium and electronic equipment
CN111214235A (en) * 2019-12-31 2020-06-02 河南科技大学 Human body activity monitoring method and device
CN111767003A (en) * 2020-06-05 2020-10-13 中国煤炭科工集团太原研究院有限公司 Mining equipment sensor data self-adaptive acquisition method based on different working conditions

Also Published As

Publication number Publication date
CN113849062A (en) 2021-12-28

Similar Documents

Publication Publication Date Title
US10235119B2 (en) Display controlling method and electronic device adapted to the same
US10943091B2 (en) Facial feature point tracking method, apparatus, storage medium, and device
CN111052035B (en) Electronic device and operation control method thereof
US9733083B2 (en) Motion sensing method and user equipment thereof
CN216435446U (en) Electronic device including display with variable screen size
CN109712224B (en) Virtual scene rendering method and device and intelligent device
WO2017113381A1 (en) Method for determining calibration parameter and mobile device
CN107144056B (en) The control method and computer readable storage medium of air conditioner and electric expansion valve
CN104461289A (en) Terminal and screen display method and device for terminal
CN109962514B (en) Charging method and mobile terminal
US11693558B2 (en) Method and apparatus for displaying content on display
WO2021212278A1 (en) Data processing method and apparatus, and mobile platform and wearable device
WO2017005070A1 (en) Display control method and device
US9619080B2 (en) Electronic apparatus and control method of electronic apparatus
CN113849062B (en) Dynamic energy-saving method and device based on acceleration and attitude angle of embedded system
US20170221225A1 (en) Systems and methods for drift correction
CN103246431B (en) A kind of regulation screen display direction method, Apparatus and system
CN114339686A (en) Communication method, device and system, computer device and readable storage medium
CN112929490B (en) Control method of electronic equipment and electronic equipment
CN112513795A (en) Electronic device for processing input event and operation method thereof
US9280724B2 (en) Pose classification apparatus and method
CN114252100A (en) Sensor on-line calibration method, device, equipment and storage medium
CN111510553A (en) Motion trail display method and device and readable storage medium
EP4322541A1 (en) Method and apparatus for displaying content on display
US11775026B1 (en) Mobile device fold detection

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant