## 5 Energy Consumption and System Optimization in WBSNs  
WBSNs need to carry out processes that are energy efficient, therefore, it is important to develop a model of energy consumption that is suitable to be optimized. The variables of the model can be compared according to the needs and behavior of the WBSN at any given moment (adaptive algorithm). We consider having a WBSN with \(N\) sensor nodes and a base station, which is able to compress, gather and process information received from each node in the network. The nodes are able to wirelessly communicate among themselves and also with the base station [18]. Nodes in the WBSN have mainly three different subsystems to operate, the first for vital parameter measurement, the second for sensor data recording, and the third for data sensor communications. Considering tradeoffs between latency and power consumption, we can formulate a model that can beused for performance optimization of the WBSN. Since energy efficiency is a main concern, the objective function represents the energy consumed in the WBSN. The decision variables of the optimization problem are the time intervals for each of the \(N\) sensors to carry out their sensing and communication tasks. For this, we consider that a sensor \(I=1\), \(2\),..., \(N\), consumes \(E_{ss_{i}}(b)\) energy in the sensing activity during which a one packet of \(b\) bits of length is produced. It also consumes \(E_{reg_{i}}(b)\) energy for reading and storing into memory those \(b\) bits of information, and it consumes \(E_{tx_{i}}(b,d_{ij})\) energy for the transmission or reception of a packet of \(b\) bits of length in a link with sensor \(j\) with separation distance \(d_{ij}\). \(E_{sh_{i}}\) denotes the energy consumed by each sensor node's state transition (active mode or sleep mode). The function that quantifies the energy consumed in the entire \(N\) sensor network, _i.e._, \(E\)[18, 49], is given by:  
\[E=\sum_{l=1}^{N}\left[E_{ss_{l}}(b)+E_{reg_{l}}(b)+E_{tx_{i}}(b,d_{ij})+E_{sh_{ l}}\right] \tag{2}\]  
Table 4 provides an expression for each of the energy consumption terms in Equation (2). All the terms are based on the concept of energy as the product of power and time duration. We define \(V_{inp}\) as the voltage supply, \(T_{ss}\) as the time needed for sensing and producing one bit of information, \(I_{ss}\) as the sensing current for one bit of duration. We also define \(I_{wr}\) as the current used during the storing process of one bit of information, \(T_{wr}\) as the time needed to store such bit of information, \(I_{rd}\) as the current used during the reading of one bit of information produced and \(T_{rd}\) as the time needed to read one bit of information. \(bE_{circ}\) is the energy consumed by the transmission or reception of \(b\) bits of information, \(n\) is the path loss exponent of the environment, and \(E_{pamp}\) is the energy consumed by the power amplifier. Finally, \(T_{A}\) is the active time of the sensor; \(C_{N}<1\) is referred to as Duty Cycle; \(I_{A}\) represents the active mode current consumed; \(I_{S}\) is the sleep mode current consumed. From the subsystems belonging to each node, the highest energy consumption is in the subsystem responsible for the transmission and reception of data. The term \(E_{pamp}\) cannot be optimized since the energy expenditure in the power amplifier, is determined by the manufacturer and will only vary depending on the distance between the network components trying to communicate.