CN114153305A - Intelligent ammeter based on light-weight real-time operating system and low-power-consumption management method - Google Patents

Intelligent ammeter based on light-weight real-time operating system and low-power-consumption management method Download PDF

Info

Publication number
CN114153305A
CN114153305A CN202111409094.4A CN202111409094A CN114153305A CN 114153305 A CN114153305 A CN 114153305A CN 202111409094 A CN202111409094 A CN 202111409094A CN 114153305 A CN114153305 A CN 114153305A
Authority
CN
China
Prior art keywords
task module
task
cpu
module
time
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.)
Pending
Application number
CN202111409094.4A
Other languages
Chinese (zh)
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.)
Jiangsu Linyang Energy Co ltd
Original Assignee
Jiangsu Linyang Energy 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 Jiangsu Linyang Energy Co ltd filed Critical Jiangsu Linyang Energy Co ltd
Priority to CN202111409094.4A priority Critical patent/CN114153305A/en
Publication of CN114153305A publication Critical patent/CN114153305A/en
Pending legal-status Critical Current

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
    • G06F1/329Power saving characterised by the action undertaken by task scheduling
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R22/00Arrangements for measuring time integral of electric power or current, e.g. electricity meters
    • G01R22/06Arrangements for measuring time integral of electric power or current, e.g. electricity meters by electronic methods
    • G01R22/10Arrangements for measuring time integral of electric power or current, e.g. electricity meters by electronic methods using digital techniques
    • 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
    • G06F1/324Power saving characterised by the action undertaken by lowering clock frequency
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4418Suspend and resume; Hibernate and awake
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Computer Security & Cryptography (AREA)
  • Power Sources (AREA)

Abstract

A smart meter and a low power consumption management method based on a lightweight real-time operating system are provided, the meter comprising: the task management system comprises an idle task module and a plurality of user task modules, wherein the user task modules comprise: one or more of a system management task module, a metering task module, a display task module, a communication task module and an electric meter service task module; the clock of the idle task module is in a waiting or executing state, when all the user task modules do not run, the idle task module obtains CPU resource running, and at the moment, if any user task module enters a ready state, the idle task module immediately releases the CPU and enters a waiting state. According to the intelligent ammeter and the low-power-consumption management method, the consumption of electric energy of a power grid is reduced and the operation efficiency of the power grid is improved under the normal power supply state of the ammeter, so that the intelligent ammeter has good practical and economic values.

Description

Intelligent ammeter based on light-weight real-time operating system and low-power-consumption management method
Technical Field
The invention is applied to the field of intelligent electric meters, and particularly relates to an intelligent electric meter based on a light-weight real-time operating system and a low-power-consumption management method.
Background
With the increasing complexity of the functions of the smart electric meter, the performance of the MCU adopted in the design is also more and more powerful, but the higher the performance is, the higher the energy consumption is, and the wider the application of the smart electric meter in the power grid is, the reduction of the energy consumption of the smart electric meter becomes a problem that must be considered, and the low power consumption also plays a positive role in the reliability of the long-term continuous operation of the smart electric meter.
The general low-power design of the smart meter mainly considers how to reduce the energy consumption of the battery when the power grid is powered off, and is an effective method in the aspect of prolonging the service life of the battery. In fact, the electric meter has the mains supply running normally in most of the whole life cycle, and the reduction of the power consumption in normal running has more practical and economic values for the whole energy consumption of the power grid.
Disclosure of Invention
The invention aims to solve the problem of how to reduce power consumption of a smart meter, and provides a low-power-consumption management method of the smart meter based on a light-weight real-time operating system, which can effectively reduce power consumption of the electric energy meter during normal operation.
The technical scheme of the invention is as follows:
the invention provides a low-power consumption management method of a smart meter based on a light-weight real-time operating system, wherein the smart meter comprises the following steps: the method comprises an idle task module and a plurality of user task modules, and comprises the following steps:
s1, configuring the operation mode and priority of each user task module and the idle task module, wherein the priority of the idle task module is the lowest; setting the minimum sleep time Smin and the maximum sleep time Smax of the intelligent electric meter;
s2, when each user task module is suspended or blocked at a certain moment, the idle task module acquires CPU resources and reduces the running frequency of the CPU;
s3, the idle task module acquires the current predicted blocking duration of each user task module, then takes the minimum value as the current sleep time S, and executes the following judgment;
if S is less than Smin, the CPU does not sleep and keeps running at low frequency;
if Smin is less than or equal to S and less than Smax, the CPU enters sleep low-power-consumption operation and closes task scheduling; configuring the current sleep time S to a timer, triggering interruption to wake up the full-speed running frequency of the CPU after the timer reaches the set time, and recovering task scheduling;
if Smax is less than or equal to S, the CPU enters sleep low-power-consumption operation and closes task scheduling; and configuring the maximum sleep time Smax to a timer, triggering interruption to wake up the full-speed running frequency of the CPU after the timer reaches the set time, and recovering task scheduling.
Further, in step S2, the user task module is suspended or blocked in response to a waiting event or a delay event.
Further, in step S3, the current predicted blocking duration obtaining manner of the user task module is as follows: and taking the corresponding residual periodic event and delay time for the periodic task and the delay task which are configured by the user task module, and taking the maximum value for the accidental task which is configured by the user task module.
Further, the method further comprises:
configuring an emergency CPU wake-up source;
responding to an event in an emergent event CPU wake-up source, and immediately waking up the CPU in the sleep period of the CPU so as to ensure that the real-time performance of the system is not influenced by the sleep;
the emergency events include power outage, key press, and external communication events.
A smart meter based on a lightweight real-time operating system, which adopts a low-power management method of the smart meter based on the lightweight real-time operating system, and comprises the following steps: the task management system comprises an idle task module and a plurality of user task modules, wherein the user task modules comprise: the system comprises one or more of a system management task module, a metering task module, a display task module, a communication task module and an electric meter service task module.
Further, the system management task module is used for processing the burst transaction with high real-time requirement and responding to the external request or change in real time;
the metering task module is used for maintaining a communication channel between the metering task module and the metering core, requesting the receiving and analyzing processing of data, and responding the framing and sending of the data;
the display task module is used for processing relevant data to be displayed on the liquid crystal screen, and the relevant data comprises the state of an electric meter, electric quantity and time information;
the communication task module is used for maintaining a communication channel with the outside of the electric meter, requesting the receiving and analyzing processing of data and responding the framing and sending of the data;
the ammeter service task module is used for processing ammeter data and maintaining the data;
and the idle task module is used for managing power consumption of the system in idle, adjusting the running frequency of the CPU and switching the running modes.
Furthermore, the system management task module is configured as an accidental task, when power failure occurs, key data are stored, other task modules are closed after the data are stored, deep sleep is started, the system is awakened periodically to feed a watchdog, and system operation can be recovered in time when power is on;
the metering task module is configured as a periodic task, periodically acquires metering original data of the metering core, and synchronously configures the metering original data into the metering core;
the display task module is configured as a delay task, and after a round of display information is executed, the display task module is executed again after a fixed period of time is delayed;
the communication task module is configured as an accidental task, receives a communication request from an external burst, and enters a waiting state after communication is completed until new data is received on a channel;
the electric meter service module is configured to be a periodic task and periodically process basic data of electric quantity, demand, load curve and event record.
Furthermore, the clock of the idle task module is in a waiting or executing state, when all the user task modules are not operated, the idle task module obtains the CPU resource to operate, and at the moment, if any user task module enters a ready state, the idle task module immediately releases the CPU and enters a waiting state.
The invention has the beneficial effects that:
the invention provides the smart electric meter based on the light-weight real-time operating system and the low-power consumption management method, so that the electric meter can reduce the consumption of electric energy of a power grid and improve the operation efficiency of the power grid in a normal power supply state, and the smart electric meter has good practical and economic values.
Additional features and advantages of the invention will be set forth in the detailed description which follows.
Drawings
The above and other objects, features and advantages of the present invention will become more apparent by describing in more detail exemplary embodiments thereof with reference to the attached drawings, in which like reference numerals generally represent like parts throughout.
FIG. 1 is a flow chart of the low power management of idle task modules of the present invention
Detailed Description
Preferred embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While the preferred embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be limited to the embodiments set forth herein.
The invention aims to provide a low-power consumption management method of a smart electric meter based on a light-weight real-time operating system, which reduces the consumption of electric energy of a power grid and improves the operation efficiency of the power grid when the electric meter is in a normal power supply state; the electric energy meter mainly comprises a system management task module, a metering task module, a display task module, a communication task module, an electric meter service task module and an idle task module.
The system management task module is mainly used for processing burst transactions with high real-time requirements, so that the system can respond to external requests or changes in real time.
And the metering task module is mainly responsible for maintaining a communication channel between the metering task module and a metering core, receiving and analyzing and processing request data, and framing and sending response data.
And the display task module is mainly used for processing relevant data to be displayed on a liquid crystal screen, such as information of electric meter state, electric quantity, time and the like.
And the communication task module is mainly responsible for maintaining an external communication channel of the electric meter, receiving and analyzing the request data, and framing and sending the response data.
The electric meter service task module is mainly used for processing affairs with low real-time requirement and maintaining data.
And the idle task module is mainly responsible for power consumption management during idle of the system, adjustment of CPU running frequency and switching of running modes.
Referring to fig. 1, a low power consumption management method for a smart meter based on a lightweight real-time operating system includes the following steps:
and configuring the running mode and the priority of each task module, wherein the idle task has the lowest priority among all the tasks.
When the user task module is suspended or blocked due to waiting events or delays at a certain moment, the idle task immediately acquires the CPU resource.
And immediately reducing the running frequency of the CPU after the idle task starts to execute.
The idle task then determines whether conditions are present to further reduce power consumption to cause the CPU to sleep. And calculating the current estimated blocking time of each user task, taking the residual delay time for the periodic task and the delay task, taking the maximum value of 32 bits for the accidental task, and taking the minimum value as the sleep time.
If the sleep time is less than the limited minimum value, the CPU does not go to sleep; the sleep time is greater than a defined maximum value, which is then taken to the maximum value, which is configured to the timer. When the timer is timed out, the timer triggers an interrupt to wake up the CPU.
And closing the task scheduler, maintaining the normal work of the peripheral equipment, enabling the CPU to enter a sleep state, and waiting for interruption and awakening.
And after the timer is timed out and awakened, the CPU exits from the low power consumption state, the task scheduler is opened, and the task scheduling is recovered. And restoring the full-speed running frequency of the CPU before exiting the idle task.
The peripheral equipment used by power failure, key press, external communication and other emergencies is configured in the awakening source of the CPU, and when the emergencies occur during the sleep period of the CPU, the CPU can be immediately awakened, thereby ensuring that the real-time performance of the system is not influenced by the sleep.
Having described embodiments of the present invention, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments.

Claims (8)

1. A low power consumption management method for a smart meter based on a lightweight real-time operating system is characterized in that the smart meter comprises the following steps: the method comprises an idle task module and a plurality of user task modules, and comprises the following steps:
s1, configuring the operation mode and priority of each user task module and the idle task module, wherein the priority of the idle task module is the lowest; setting the minimum sleep time Smin and the maximum sleep time Smax of the intelligent electric meter;
s2, when each user task module is suspended or blocked at a certain moment, the idle task module acquires CPU resources and reduces the running frequency of the CPU;
s3, the idle task module acquires the current predicted blocking duration of each user task module, then takes the minimum value as the current sleep time S, and executes the following judgment;
if S is less than Smin, the CPU does not sleep and keeps running at low frequency;
if Smin is less than or equal to S and less than Smax, the CPU enters sleep low-power-consumption operation and closes task scheduling; configuring the current sleep time S to a timer, triggering interruption to wake up the full-speed running frequency of the CPU after the timer reaches the set time, and recovering task scheduling;
if Smax is less than or equal to S, the CPU enters sleep low-power-consumption operation and closes task scheduling; and configuring the maximum sleep time Smax to a timer, triggering interruption to wake up the full-speed running frequency of the CPU after the timer reaches the set time, and recovering task scheduling.
2. The method for managing low power consumption of smart meters based on lightweight real-time operating system of claim 1, wherein in step S2, the user task module is suspended or blocked in response to a waiting event or a delay event.
3. The method for managing low power consumption of a smart meter based on a lightweight real-time operating system of claim 1, wherein in step S3, the obtaining manner of the current predicted blocking duration of the user task module is as follows: and taking the corresponding residual periodic event and delay time for the periodic task and the delay task which are configured by the user task module, and taking the maximum value for the accidental task which is configured by the user task module.
4. The method for managing low power consumption of a smart meter based on a lightweight real-time operating system according to claim 1, wherein: the method further comprises the following steps:
configuring an emergency CPU wake-up source;
responding to an event in an emergent event CPU wake-up source, and immediately waking up the CPU in the sleep period of the CPU so as to ensure that the real-time performance of the system is not influenced by the sleep;
the emergency events include power outage, key press, and external communication events.
5. A smart meter based on a lightweight real-time operating system, wherein the method for managing low power consumption of the smart meter based on a lightweight real-time operating system as claimed in any one of claims 1 to 4 is characterized in that: this ammeter includes: the task management system comprises an idle task module and a plurality of user task modules, wherein the user task modules comprise: the system comprises one or more of a system management task module, a metering task module, a display task module, a communication task module and an electric meter service task module.
6. A smart meter based on a lightweight real-time operating system according to claim 5, wherein:
the system management task module is used for processing the burst transaction with high real-time requirement and responding to the external request or change in real time;
the metering task module is used for maintaining a communication channel between the metering task module and the metering core, requesting the receiving and analyzing processing of data, and responding the framing and sending of the data;
the display task module is used for processing relevant data to be displayed on the liquid crystal screen, and the relevant data comprises the state of an electric meter, electric quantity and time information;
the communication task module is used for maintaining a communication channel with the outside of the electric meter, requesting the receiving and analyzing processing of data and responding the framing and sending of the data;
the ammeter service task module is used for processing ammeter data and maintaining the data;
and the idle task module is used for managing power consumption of the system in idle, adjusting the running frequency of the CPU and switching the running modes.
7. A smart meter based on a lightweight real-time operating system according to claim 5 or 6, characterized in that:
the system management task module is configured as an accidental task, when power failure occurs, key data are stored, other task modules are closed after the data are stored, deep sleep is carried out, the system is awakened periodically to feed a watchdog, and the system can be recovered to run in time when power is on;
the metering task module is configured as a periodic task, periodically acquires metering original data of the metering core, and synchronously configures the metering original data into the metering core;
the display task module is configured as a delay task, and after a round of display information is executed, the display task module is executed again after a fixed period of time is delayed;
the communication task module is configured as an accidental task, receives a communication request from an external burst, and enters a waiting state after communication is completed until new data is received on a channel;
the electric meter service module is configured to be a periodic task and periodically process basic data of electric quantity, demand, load curve and event record.
8. A smart meter based on a lightweight real-time operating system according to claim 5 or 6, characterized in that: the clock of the idle task module is in a waiting or executing state, when all the user task modules do not run, the idle task module obtains CPU resource running, and at the moment, if any user task module enters a ready state, the idle task module immediately releases the CPU and enters a waiting state.
CN202111409094.4A 2021-11-19 2021-11-19 Intelligent ammeter based on light-weight real-time operating system and low-power-consumption management method Pending CN114153305A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111409094.4A CN114153305A (en) 2021-11-19 2021-11-19 Intelligent ammeter based on light-weight real-time operating system and low-power-consumption management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111409094.4A CN114153305A (en) 2021-11-19 2021-11-19 Intelligent ammeter based on light-weight real-time operating system and low-power-consumption management method

Publications (1)

Publication Number Publication Date
CN114153305A true CN114153305A (en) 2022-03-08

Family

ID=80457716

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111409094.4A Pending CN114153305A (en) 2021-11-19 2021-11-19 Intelligent ammeter based on light-weight real-time operating system and low-power-consumption management method

Country Status (1)

Country Link
CN (1) CN114153305A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030105983A1 (en) * 2001-12-03 2003-06-05 Brakmo Lawrence Sivert Power reduction in computing devices using micro-sleep intervals
US20070240163A1 (en) * 2006-04-05 2007-10-11 Maxwell Technologies, Inc. Processor power and thermal management
CN101727171A (en) * 2008-10-14 2010-06-09 上海摩波彼克半导体有限公司 Method for reducing CPU power consumption in embedded system
CN104111850A (en) * 2014-07-17 2014-10-22 上海庆科信息技术有限公司 Method and system for reducing power consumption of MCU (Micro-Control Unit)
CN207123559U (en) * 2017-07-19 2018-03-20 重庆大恒电器有限公司 A kind of intelligent electric meter
CN107885306A (en) * 2016-09-29 2018-04-06 联芯科技有限公司 The dormancy control method and equipment of central processing unit
CN112530056A (en) * 2020-11-18 2021-03-19 深圳Tcl新技术有限公司 Method for reducing power consumption of intelligent door lock, intelligent door lock and storage medium
CN113535356A (en) * 2021-07-01 2021-10-22 中国科学院软件研究所 Energy-aware hierarchical task scheduling method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030105983A1 (en) * 2001-12-03 2003-06-05 Brakmo Lawrence Sivert Power reduction in computing devices using micro-sleep intervals
US20070240163A1 (en) * 2006-04-05 2007-10-11 Maxwell Technologies, Inc. Processor power and thermal management
CN101727171A (en) * 2008-10-14 2010-06-09 上海摩波彼克半导体有限公司 Method for reducing CPU power consumption in embedded system
CN104111850A (en) * 2014-07-17 2014-10-22 上海庆科信息技术有限公司 Method and system for reducing power consumption of MCU (Micro-Control Unit)
CN107885306A (en) * 2016-09-29 2018-04-06 联芯科技有限公司 The dormancy control method and equipment of central processing unit
CN207123559U (en) * 2017-07-19 2018-03-20 重庆大恒电器有限公司 A kind of intelligent electric meter
CN112530056A (en) * 2020-11-18 2021-03-19 深圳Tcl新技术有限公司 Method for reducing power consumption of intelligent door lock, intelligent door lock and storage medium
CN113535356A (en) * 2021-07-01 2021-10-22 中国科学院软件研究所 Energy-aware hierarchical task scheduling method and device

Similar Documents

Publication Publication Date Title
US7272730B1 (en) Application-driven method and apparatus for limiting power consumption in a processor-controlled hardware platform
US9329671B2 (en) Power-efficient inter processor communication scheduling
US9239605B1 (en) Computing device power state transitions
CN101916137B (en) Platform and processor power management
WO2016041468A1 (en) Wakeup method, device and terminal
CN102117114B (en) Electricity-saving method for embedded equipment
TWI441083B (en) Apparatus for performing timer management and associated method
US20120210150A1 (en) Method And Apparatus Of Smart Power Management For Mobile Communication Terminals
CN112530056B (en) Method for reducing power consumption of intelligent door lock, intelligent door lock and storage medium
CN106059835B (en) A kind of High-reliability Control method of low energy consumption computer set group node
CN103814342A (en) Dynamic sleep for multicore computing devices
CN105573460A (en) Application program wakeup time adjusting method and device
CN105373207A (en) Standby method of wireless communication terminal
CN103345415A (en) Terminal energy-saving method and device for management timer
CN110568921B (en) Method for reducing chip power consumption
CN101661327A (en) Method for adjusting basic frequency of central processing unit (CPU) and device thereof
CN102929381B (en) Electronic system and method for managing power supply thereof
CN112235742A (en) Gas meter with NB-IoT communication module embedded with program and data processing method
CN101414212A (en) Method for performing booking work
CN113721751A (en) Low-power-consumption management method and system based on event and dormancy timer
CN101441508A (en) Control method of equipment operation mode, equipment and system
CN114153305A (en) Intelligent ammeter based on light-weight real-time operating system and low-power-consumption management method
CN111857841A (en) Awakening method of main control chip, storage medium and intelligent terminal
CN111352796A (en) Method and device for acquiring electric quantity by intelligent wearable equipment
CN1322396C (en) Method for auto-power-off according to user's habit

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20220308