[Eng-Spa] Energy Consumption of Tasks in Embedded Systems

avatar

Titulo.jpg

Hello, Friends of Hive and dear readers, it is a pleasure to be with you presenting topics of science, research, technology, and innovation.
Hola Amigos de Hive y apreciados lectores, un gusto estar con ustedes presentándoles temas de la ciencia, investigación, tecnología e innovación.

Separador AA.jpg

In the previous post, I pointed out that I would address the issue of adjusting the power consumed by the tasks of an embedded system without violating its temporal characteristics. To do this we must be careful because we rely on the characteristics of the processor and those that must have the system that hosts it or the application. Therefore, this post is dedicated to the Power Consumption of Tasks in Embedded Systems.

En el post anterior, señalé que abordaría el tema de ajustar la potencia consumida por las tareas de un sistema embebido sin violar sus características temporales. Para ello debemos ser cuidadosos porque nos basamos en las características del procesador y en las que debe tener el sistema que lo aloja o la aplicación. Por ello, este post está dedicado al Consumo de Energía de las Tareas en los Sistemas Empotrados.


It is worth mentioning that we are talking about devices and instruments that depend on batteries for their operation. Also, in large data centers or processing systems, you want to lower energy consumption. That are issues currently addressed in topics related to technology for Sustainable Development, a subject that I will return to in later posts.

Vale la pena mencionar, que estamos hablando de dispositivos e instrumentos que dependen de baterías para su operación. También, de grandes sistemas de centros de datos o procesamiento donde se desea bajar el consumo de energía. Es decir, asuntos tratados actualmente en tópicos relacionados a la tecnología favorecedora del Desarrollo Sostenible, asunto que retomaré en post posteriores.

Separador 2.jpg

In the previous post, Tasks-with-speed-adjustment-in-real-time-embedded-systems I defined the normalized scaling factor of the j processor frequencies αi, given by fi/fmax∀j∈(1,2, …, M). It is important to mention that this expression corresponds to the linear characteristics of some processors, however, there are others whose behavior is not. It will be sufficient to assume linearity for this factor.

En el post anterior, Tareas con Ajuste de Velocidad en los Sistemas Empotrados de Tiempo Real definí el factor de escalamiento normalizado de las j frecuencias del procesador αi, dada por fi/fmax∀j∈(1,2, …, M). Es importante mencionar que esta expresión, corresponde a características lineales de algunos procesadores, no obstante, existen otros cuyo comportamiento no lo es. Será suficiente, con asumir la linealidad para este factor.


Then, αi will be used to denote the normalized processor speed or scaling factor.

Entonces, αi será usado para denotar la velocidad de procesador normalizada o factor de escalamiento.


Also, in the post Processor Power Consumption it was established that the reduction of the supply voltage implies a drop in the clock frequency. Due to the nonlinearity between frequency and voltage, both voltage and frequency scaling will produce a quadratic saving of power, and therefore, also of energy.

También, en el post Consumo de Energía en Procesadores se estableció que la reducción del voltaje de alimentación implica una baja en la frecuencia del reloj. Debido a la no linealidad entre la frecuencia y el voltaje, tanto el escalamiento del voltaje como el frecuencia producirá un ahorro cuadrático de potencia, y por tanto, también de energía.


Then, the normalized power consumed by the processor is calculated with the expression:

Entonces, la energía consumida normalizada del procesador se calcula con la expresión:


E(α)= α2,


used in the specialized literature. This equation indicates that the Normalized Energy Consumption (EC) is proportional to the square of the speed at which each task is performed.

utilizada en la literatura especializada. Dicha ecuación indica que la Energía Consumida Normalizada (EC) es proporcional al cuadrado de la velocidad a la cual se ejecuta en cada tarea.


However, the total power consumption in a processor, operating for a finite time (TF) is approximately equal to:

No obstante, el consumo de energía total en un procesador, operando durante un tiempo finito (TF) es aproximadamente igual a:


EC=Pdin.TF,


Where Pdin represents the largest source of power dissipation. Esta ecuación, indica que la energía consumida normalizada por una tarea es proporcional a su tiempo de ejecución actual multiplicado por la velocidad a la que se ejecuta al cuadrado.

Donde Pdin representa la mayor fuente de disipación de potencia. Esta ecuación, indica que la energía consumida normalizada por una tarea es proporcional a su tiempo de ejecución actual multiplicado por la velocidad a la que se ejecuta al cuadrado.


An example // Un ejemplo

Separador 2.jpg

An application has three (3) periodic tasks defined that run on a hypothetical processor capable of varying its operating frequency by 96 MHz and 48 MHz, 5 V (supply voltage) at room temperature ≈ 22 ºC. The computation times are C1=2 ms and C2= 4 ms. Task 3 is a waiting process until tasks 1 and 2 are activated, therefore, its C3 is variable and its value is determined by the activation delay. The period of the tasks is P= 14 ms. In its first activation, the processor is working at maximum speed, switching to low speed for its second instance. Calculate the Energy consumed by the application in each instance.

Una aplicación tiene definidas tres (3) tareas periódicas que se ejecutan en un procesador hipotético capaz de variar su frecuencia de operación en 96 MHz y 48 MHz, 5 V (voltaje de alimentación) a temperatura ambiente ≈ 22 ºC. Los tiempos de cómputo son C1=2 ms y C2= 4 ms. La tarea 3 es un proceso de espera hasta que se activen las tareas 1 y 2, por tanto, su C3 es variable y su valor está determinado por el retardo de activación. El periodo de las tareas es de P= 14 ms. En su primera activación el procesador está trabajando a máxima velocidad, conmutándose a baja velocidad para su segunda instancia. Calcular la Energía que consume la aplicación en cada instancia.


Fig1.jpg
Figura 1. Resultado de planificación de tareas ajustando la energía consumida.


Figure 1 shows what happens in the two instances of the application tasks.

En la Figura 1 se muestra lo que sucede en las dos instancias de las tareas de la aplicación.


For the 1st instance, we have, at fmax= 96 MHz and the operating frequency fi= 96 MHz, therefore αi= 1.

Para la 1era instancia, tenemos, a fmax= 96 MHz y la frecuencia de operación fi= 96 MHz, por tanto αi=1.


E(α)= α2=1,


Then,

Entonces,


E1,1(α)= E2,1(α)= E3,1(α)= 1,


It is interpreted that there is maximum power consumption in 14 ms (C1+C2+C3), being C3= 8 ms.

Se interpreta que hay un consumo de energía máximo en 14 ms (C1+C2+C3), siendo C3= 8 ms.


Now let us calculate with the electrical power formula P=V.I, where V is the supply voltage and I is the electrical currents consumed. For this case the current we take from the data sheet of the hypothetical processor because it is the maximum consumption current reported equal to 39 mA.

Ahora calculemos con la fórmula de potencia eléctrica P=V.I, donde V es el voltaje de alimentación e I las corrientes eléctricas consumidas. Para este caso la I la tomamos de la ficha técnica del procesador hipotético, porque es la corriente de consumo máxima reportada igual a 39 mA.


Then, the Power of tasks 1, 2, and 3 are

Entonces, Potencia de la tarea 1, 2 y 3 es:


P=5,00 V.39,00 mA= 0,195 W


Energy consumed by the tasks:

La Energía consumida por las tareas:


E1max=P.C1=0,195 W.2 ms= 0,39 mJ
E2max=P.C2=0,195 W.4 ms= 0,78 mJ
E3max=P.C3=0,195 W.8 ms=1,56 mJ


The maximum energy (Emax) consumed in the first instances was 2.73 mJ in a time of 14 ms.

Siendo la Energía máxima (Emax) consumida en las primeras instancias de 2,73 mJ en un tiempo de 14 ms.


Separador 2.jpg

For the 2nd instance, we have, a fmax= 96 MHz and the operating frequency fi= 48 MHz, therefore αi= 0,5.

Para la 2da instancia, tenemos, a fmax= 96 MHz y la frecuencia de operación fi= 48 MHz, por tanto αi= 0,5.


Then,

Entonces,


E1,2(α)= E2,2(α)= E3,2(α)= 0,25,


It is interpreted that there is the normalized power consumption of 0.25 in the next 14 ms (C1+C2+C3), with C3= 2 ms.

Se interpreta que hay un consumo de energía normalizado de 0,25 en los siguientes 14 ms (C1+C2+C3), siendo C3= 2 ms.


Now, let's calculate with the electrical power formula P=V.I, for this case we take the current from the data sheet of the hypothetical processor because it is the maximum consumption current reported equal to 9.75 mA.

Ahora, calculemos con la fórmula de potencia eléctrica P=V.I, para este caso la corriente la tomamos de la ficha técnica del procesador hipotético, porque es la corriente de consumo máxima reportada igual a 9,75 mA.


Then, the Power of tasks 1, 2, and 3 is

Entonces, Potencia de la tarea 1, 2 y 3 es


P=5,00 V*9,75 mA= 0,04875 W


Doing the procedure for the calculation of the energy results that the Energy (E) consumed in the second instance of 0,6825 mJin a time of 14 ms.

Haciendo el procedimiento para el cálculo de la energía, da como resultado que la Energía (E) consumida en la segunda instancia de 0,6825 mJ en un tiempo de 14 ms.


With the above, it can be obtained that the Energy Savings (ES) is 75%.

Con lo anterior, se puede obtener que el Ahorro de Energía (AE) es de 75%.


Separador 2.jpg

Cierre.jpg


The first calculation with α allows having a tuning parameter on the scale presented by processors varying voltage and frequency because they help to implement scheduling techniques from the middle software layer (cores, micro-cores of operating systems).

El primer cálculo con α permite tener un parámetro de ajuste en la escala que presentan los procesadores que varían el voltaje y la frecuencia, porque ayudan a implementar técnicas de planificación desde la capa intermedia de software (núcleos, micronúcleos de los sistemas operativos).


The second calculation quantitatively approximates the values of the quantities involved: voltage, current, temperature, time, and power. In addition, they can be contrasted in a practical way, using suitable measuring instruments, such as a multimeter.

El segundo cálculo, aproxima cuantitativamente los valores de las magnitudes que entran en juego, voltaje, corriente, temperatura, tiempo y potencia. Además, pueden ser contrastados de forma práctica, usando instrumentos de medida adecuados, como el multímetro.


It is worth noting that the example presented here assumes the linear characteristic of the processor with respect to the variation of its voltage and frequency, in order to calculate the parameters.

Vale la pena destacar, que el ejemplo que se presentó se asumió la característica lineal del procesador respecto a la variación de su voltaje y frecuencia, para calcular los parámetros.


Separador AA.jpg

See you soon, I hope the reading has been enriching.

Nos vemos pronto, espero que la lectura haya sido enriquecedora.


I invite you to visit me and follow me @alfonsoalfonsi.

Los invito a visitarme y seguirme en @alfonsoalfonsi.

Separador AA.jpg

Referencias.jpg


Alfonsi A., Yánez R. y Pérez J. (2017). Distribución del Tiempo Ocioso Orientado al Ahorro de Energía en Tareas de Control de Tiempo Real. Revista Ciencia e Ingeniería, 38(2), 159-166.
https://www.redalyc.org/journal/5075/507555007008/html/

Alsheikhy, A. (2021). Dynamic approach to minimize overhead and response time in scheduling
periodic real-time tasks. International Journal of Advanced and Applied Sciences, 8(4), 75-8.
https://doi.org/10.21833/ijaas.2021.04.009

Herrera, C., Hajek, D. & Narciso F. (2020). Principles of Operating Systems (2020 ed.). Amazon Digital Services LLC - KDP Print US.


Figure and Image Credits / Créditos a Figuras e Imágenes


Title image was made by @alfonsoalfonsi using CANVAS and PxHere image.

La imagen del Título fue realizado por @alfonsoalfonsi usando CANVAS e imagen de PxHere.


The separator is my property made with CANVAS and klipartz.

El separador es de mi propiedad realizado con CANVAS e imagen de klipartz.


The banner and photographs are my property. Made with Power Point, Paint and Linerock Investment LTD ToonMe application.

El banner y las fotografías son de mi propiedad. Realizado con PowerPoint, Paint y Linerock Investment LTD Aplicación ToonMe.

Baner ENG SPN.jpg



0
0
0.000
5 comments
avatar

Thanks for your contribution to the STEMsocial community. Feel free to join us on discord to get to know the rest of us!

Please consider delegating to the @stemsocial account (85% of the curation rewards are returned).

You may also include @stemsocial as a beneficiary of the rewards of this post to get a stronger support. 
 

0
0
0.000
avatar

@alfonsoalfonsi
Tus post sobre sistemas empotrados aportan conocimientos al área de tecnologías, gracias por compartir
Aprovecho la oportunidad de invitarte a unirte al Discord para este sábado 20 de Agosto al Ciencia en Vivo
https://discord.gg/sZJ7BUcg

0
0
0.000