OurModel.tex 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. \section{Detailed Intermittent Execution Model}
  2. In this Section, we provide a detailed description of our execution model for intermittent systems and its implications for software design.
  3. In Sec.~\ref{sec:system_description}, we introduce the target hardware setup of our model and the reference system used for evaluations.
  4. Sec.~\ref{sec:execution_model} presents our proposed execution model, designed based on the key observations from our measurements.
  5. In the following three sections, we discuss how this model affects both the power efficiency and correctness of software design.
  6. Finally, in Sec.~\ref{sec:other_architectures}, we evaluate the effectiveness of our model across systems with different architectural configurations.
  7. \subsection{System Description}
  8. \label{sec:system_description}
  9. \begin{figure}
  10. \centering
  11. \includegraphics[width=\linewidth]{figs/cropped/system.pdf}
  12. \caption{A typical hardware setup of intermittent systems.}
  13. \label{fig:hardware_setup}
  14. \end{figure}
  15. A typical intermittent system consists of two main components: a power management system and a computing system, as illustrated in Fig.~\ref{fig:hardware_setup}.
  16. The power management system is responsible for accumulating the incoming energy into storage and providing a stable-voltage current to the computing system.
  17. The computing system equips NVMs along with the MCU and peripherals, and utilize the NVMs for state retention between power failures.
  18. This setup includes two notable decoupling capacitors that affect the execution model of intermittent systems.
  19. The first one (C1 in the figure) is placed at the power management system as voltage regulators require a capacitor larger than the device-specific minimum capacitance for stable operation.
  20. Also, the computing system has its own decoupling capacitor (C2) to stabilize operating voltage.
  21. Recent studies increasingly consider use of 32-bit architectures for the computation system~\cite{shihIntermittent2024,wuIntOS2024,kimRapid2024,akhunovEnabling2023,kimLACT2024,kimLivenessAware2023,parkEnergyHarvestingAware2023,kortbeekWARio2022,khanDaCapo2023}, as emerging applications on intermittent systems, such as DNNs, demand more computing capability~\cite{bakarProtean2023a,carontiFinegrained2023}.
  22. % Emerging intermittent applications demand increasing computing capability~\cite{bakarProtean2023a} due to computat
  23. To this end, we use a custom-built board equipped with an ARM Cortex-M33 running at 16MHz and 512KB of FRAM as a reference system for validation and evaluation.
  24. For power management system, we use TI BQ25570 based system.
  25. We empirically choose XXuF and 220uF capacitors for C1 and C2, respectively, as minimum capacitor sizes for stable execution of checkpoint and recovery.
  26. Sec.~\ref{sec:other_architectures} evaluates our model in different architectures, such as systems with MRAM and 16-bit core.
  27. % In this work, our goal is to model the buffering effects of these capacitors and evaluate their implications on software designs.
  28. % (Recent studies present the need for better computing capability~\cite{bakarProtean2023a})
  29. % For model validation and evaluation, we use a custom-built board equipped with an ARM Cortex-M33 core and 512KB of FRAM.
  30. % Our setup requires XXuF and 220uF capacitors for C1 and C2, respectively, for stable execution of checkpoint and recovery.
  31. % Sec.~\ref{sec:other_architectures} evaluates our model in different architectures.
  32. \subsection{Execution Model}
  33. \label{sec:execution_model}
  34. \begin{figure}
  35. \centering
  36. \begin{subfigure}{\linewidth}
  37. \includegraphics[width=\textwidth]{figs/plot_expr_8a_cropped.pdf}
  38. \caption{Trace of one power cycle.}
  39. \label{fig:execution_trace_one_cycle}
  40. \vspace{5pt}
  41. \end{subfigure}
  42. \begin{subfigure}{\linewidth}
  43. \includegraphics[width=\textwidth]{figs/plot_expr_8b_cropped.pdf}
  44. \caption{Detailed trace.}
  45. \label{fig:execution_trace_detailed}
  46. \end{subfigure}
  47. \caption{Voltage measurement of capacitor and Vdd (470uF, 1.5mA current supply).}
  48. \label{fig:execution_trace}
  49. \end{figure}
  50. Fig.~\ref{fig:execution_trace} shows the voltage trace of the energy storage and the Vdd of the computing system.
  51. A 470uF capacitor is used for the energy storage to generate execution of about 48 ms under 1.5mA current supply.
  52. Fig.~\ref{fig:execution_trace_one_cycle} shows the trace during one power cycle, and Fig.~\ref{fig:execution_trace_detailed} presents the first execution cycle in more detail.
  53. Three key observations that affect software designer's decision.
  54. \begin{itemize}
  55. \item \textbf{O1}: The capacitor voltage drops quickly to charge decoupling capacitor when system wakes-up ($t1$--$t2$).
  56. \item \textbf{O2}: The system executes at sub-voltage using the decoupling capacitor, even after power supply stops ($t4$--$t5$).
  57. \item \textbf{O3}: The decoupling capacitor discharges while the system is powered-off (after $t5$).
  58. \end{itemize}
  59. \begin{figure}
  60. \centering
  61. \includegraphics[width=\linewidth]{figs/cropped/detailed_execution_model.pdf}
  62. \caption{Detailed execution model of intermittent systems.}
  63. \label{fig:detailed_execution_model}
  64. \end{figure}
  65. Fig.~\ref{fig:detailed_execution_model} shows our detailed execution model, which reflects all the key observations.
  66. In the following sections, we discuss how this model benefits the software design.
  67. \subsection{Impact on Power Efficiency}
  68. The traditional model implies that power consumed between power-on and power-off thresholds are entirely used for the computing system (including hardware initialization and recovery).
  69. However, our model reveals that huge energy is used for charging the decaps (\textbf{O1}) and discharged during power-off durations (\textbf{O3}).
  70. This implies that much smaller energy is used for the useful computation compared to the designer's expectation.
  71. \begin{figure}
  72. \centering
  73. \includegraphics[width=\linewidth]{figs/plot_expr_5_cropped.pdf}
  74. \caption{Distribution of energy consumed in a power cycle in different capacitor sizes (1mA current supply).}
  75. \label{fig:power_distribution}
  76. \end{figure}
  77. Fig.~\ref{fig:power_distribution} shows the distribution of the energy consumed for each stage of intermittent execution within one power cycle, averaged over 50 executions, in various capacitor sizes.
  78. The line represents the average time of useful computation.
  79. The checkpoint is executed by the interrupt from the power management system, which is generated when the capacitor voltage reaches the power-off threshold (3.4V).
  80. Note that this is the last point for checkpoint execution according to the traditional model.
  81. The results shows that significant energy is wasted in decoupling capacitor.
  82. 60.7\% of power is wasted in 470uF, 28.5\% in 1320uF case.
  83. The cost is more expensive when the capacitor size is small since the decaps discharge rate follows the RC-discharging circuits.
  84. While using smaller capacitors shortens the power-off durations, the discharging behavior penalizes them most since RC-discharging circuits discharge exponential (in our case, 50\% of energy is discharged at the first 161 ms).
  85. More importantly, this wasted energy is expected to be used for the computation in traditional execution model, as all the energy except for the initialization and checkpoint/recovery is expected to be used in computations.
  86. It brings significant errors between the two models in available energy for the execution.
  87. In 470uF case, the actual energy efficiency (Execution) and the expectation from the traditional model (Execution and Discharged) differs by 4.99 times.
  88. (Limitations of power failure injection and simulation based evaluations).
  89. \subsection{Impact on Predicting Power Failures}
  90. \begin{figure}
  91. \centering
  92. \begin{subfigure}{\linewidth}
  93. \includegraphics[width=\textwidth]{figs/plot_expr_6a_cropped.pdf}
  94. \caption{Input current is 1mA.}
  95. % \label{fig:eval_voltage_trace}
  96. \vspace{5pt}
  97. \end{subfigure}
  98. \begin{subfigure}{\linewidth}
  99. \includegraphics[width=\textwidth]{figs/plot_expr_6b_cropped.pdf}
  100. \caption{Input current is 3mA.}
  101. % \label{fig:eval_adaptivenss_finished_tasks}
  102. \end{subfigure}
  103. \caption{Ratio of sub-voltage operations in total execution time.}
  104. % \label{fig:}
  105. \end{figure}
  106. According to the traditional model, the system states should be saved to NVM before power-off threshold.
  107. Our model shows that the system may operate after this point using the energy stored in the decaps (\textbf{O2}).
  108. As a result, the energy storage voltage is not a good approximate of the remaining time that system can execute.
  109. \subsection{Impact of Sub-normal Voltage Execution}
  110. The traditional model makes the software designers assume the system is executed under stable voltage.
  111. However, the execution after the power-off threshold (\textbf{O3}) happens in sub-normal voltage.
  112. Being aware of this is important to the software designers since the peripherals and analog components may function differently.
  113. The two most critical examples are Analog-Digital Converter (ADC) and external memory.
  114. \begin{figure}
  115. \centering
  116. \begin{subfigure}{0.45\linewidth}
  117. \includegraphics[width=\textwidth]{figs/plot_expr_2_cropped.pdf}
  118. \caption{Trace of one power cycle.}
  119. % \label{fig:eval_voltage_trace}
  120. \end{subfigure}
  121. \hfill
  122. \begin{subfigure}{0.52\linewidth}
  123. \includegraphics[width=\textwidth]{figs/plot_expr_3_cropped.pdf}
  124. \caption{Detailed trace.}
  125. % \label{fig:eval_adaptivenss_finished_tasks}
  126. \end{subfigure}
  127. \caption{Voltage of the capacitor and Vdd, sampled 470uF and 1.5mA.}
  128. % \label{fig:}
  129. \end{figure}
  130. \subsection{Sensitivity to Architectural Designs}
  131. \label{sec:other_architectures}
  132. Finally, we evaluate our model against two different architectural setups: MSP430 and Cortex-M33 with MRAM.
  133. MSP430 has less computational capability than Cortex-M33 cores.
  134. But it is a most popular platform for intermittent system researches, since it is a low-power system having on-chip FRAM.
  135. We used MSP430FR5994 evaluation board, having 10uF of onboard decap.
  136. For the second setup, we put MRAM to our evaluation platform instead of FRAM.
  137. Core frequencies, capacitance of power management system, input power targeting about 50 ms execution.
  138. \begin{figure}
  139. \centering
  140. \includegraphics[width=\linewidth]{figs/plot_expr_9_cropped.pdf}
  141. \caption{Energy breakdown and the ratio of sub-voltage operations in different architectures.}
  142. \label{fig:other_architectures}
  143. \end{figure}
  144. Fig.~\ref{fig:other_architectures} shows the results in different power-off voltage.
  145. The bar in the left shows the energy breakdown in one power cycle, and the one in the right represents the ratio of the execution time operated in sub-voltage.