An Integrated Thermal-Electrical Model for Simulations of Battery Behavior in CubeSats

This work presents an integrated thermal-electrical simulation model, capable of taking into account the thermal and electrical effects of the battery and photovoltaic panels for each instant of time in a given orbit and attitude. Using the physical equations that govern the thermal and electrical models involved during a CubeSat operation, the proposed integrated model can estimate the temperature and energy conditions of the battery, not only in an isolated way but also in considering the mutual effects on the system. Besides, special attention is given to photovoltaic panels used in the energy harvesting process, whose performance is affected by irradiance and temperature along the orbit. The integrated model can be useful for engineers when developing the subsystems of their CubeSats, taking into account, for example, the battery temperature control through a heater. Simulations were performed to illustrate the functioning of the proposed model with variations in the power requirements of its modules and the temperature of the battery throughout the orbit, and a heater’s influence on it.


Introduction
As a result of electronic miniaturization, compact and light platforms were projected for space applications, including the CubeSat standard proposed in 1999 [1]. In parallel to that, the introduction of CubeSat standard and COTS components reduced the price to put a small satellite in orbit by sharing the costs of a launch with multiple CubeSats as piggyback payloads, enabling universities and private companies worldwide to undertake technology demonstration missions in outer space at affordable prices and sustainable business models dedicated to CubeSats. Ten CubeSats were launched in 2000 and 297 in 2017; 458 launches are expected in 2020, and 2500 new CubeSats expected by 2025. The projections are that around 49% of them will be from private initiatives, 32% from universities, 5% from space agencies, and 4% from militaries [2].
A CubeSat is usually covered by photovoltaic panels (PV) on its surface to recharge the batteries and power the subsystems. However, due to the solar panels' small size and volume, the energy harvesting capability heavily depends on its attitude concerning the Sun [3]. Additionally, as a consequence of the attitude, other parameters of great concern in CubeSats are PV and battery temperatures. While extreme cold and hot scenarios damage heater and visualizing the effects of the solar panels' varying temperatures during the orbit. It is also possible to assess the battery charge status due to the power to keep the heater activated.
Therefore, this work's main contribution is an integrated and self-contained model for orbit, attitude, irradiance, thermal, electrical, and battery models for CubeSat mission analysis, especially useful for readers without access to commercial software for simulation of satellites. The model is versatile enough to simulate the thermal and electrical behavior under diverse types of orbit and attitude, including user-defined control dynamics, and does not require external simulators.
This paper is divided as follows: Section 2 presents the methodology to calculate the thermal and electrical parameters along the orbit; those equations are used to compose an integrated model presented in Section 3; simulation results are described in Section 4; the final remarks about the paper are drawn in Section 5.

Methodology
Initially, this section introduces the equations employed to model the CubeSat position in orbit and the satellite orientation. The transient irradiance and thermal balance are then described for a CubeSat geometry with a battery inside the satellite and six photovoltaic panels (PV) covering the external surfaces. In the sequence, the adopted electrical model includes the architecture of the satellite's electrical power system (EPS), the solar panels, the battery, and its coupling with thermal parameters.
The models presented in this section are subjected to the following assumptions: • Circular orbit without perturbations; • One node is attributed for each part of the satellite, namely, six PV (w = [1, 2,3,4,5,6]) and a battery (w = 7); • One normal vector will represent the orientation of each PV; • PV does not generate heat; • Thermal resistance among the solar panels is infinite; • Every PV panel exchanges heat with the battery; • Gray surfaces (absorptivity equal to emissivity); • Constant material properties; • Perfect vacuum condition; • Experimental results regarding the battery internal losses are available.

Orbit Model
The orbit and the following attitude, irradiance, and thermal models generalize the previous work presented in [17]. An inertial Cartesian coordinate system called Earth Reference Frame (ERF) is centered on the Earth, and a non-inertial reference system named Orbit Reference Frame (ORF) is at the satellite's center of mass. The y-component of the ERF points to the Sun ( S = [0, 1, 0]), the z-component to the celestial north pole, and the x-component is the cross product between them. The vector R sat connects ORF to the origin of ERF, and defines the satellite's position as a function of the angles in Figure 1. The rotation matrix in Equation (1) is used to rotate a vector over one arbitrary axis.
θ is the angle of rotation around the unitary vector with components u = [u 1 , u 2 , u 3 ]. For a satellite with spin, θ = ωt, where ω and t are the angular speed and time, respectively. The satellite's position ( R sat ) results from the combination of different rotation matrices in sequence.
Two matrices will be used here, representing the orbit inclination ([M i ]) and the translational progress in the orbital plane ( M j ), respectively, as in the next equation: The subscript 0 represents the first satellite's position, given by R sat,0 = [0, h + R e , 0] in the ERF, where h is the altitude and R e the Earth's radius (6378 km). The unit vector inside the matrix M j must be perpendicular or co-linear to the solar vector S to reproduce orbits with or without eclipse, respectively. The angle to mimic the translation of the satellite around the Earth is given by: From this equation, valid for circular orbit, ω e is the satellite's angular speed around the Earth, K is the gravitational constant (6.674 × 10 −11 m 3 /kg s 2 ), and m e is the Earth's mass (5.972 × 10 24 kg) [26].

Attitude Model
There will be six main external surfaces in a CubeSat without deployable solar panels, whose orientations are described by their normal vectors ( n w ). Similarly to the previous section, their inclination may be defined by other two angles, now around the ORF. Figure 2 illustrates the axes of the rotational matrix, the position, and orientation of the CubeSat at the first step in orbit. Two rotational matrices will be used to simulate the attitude models of this work, as follows: In the first step, the six CubeSat's sides rotate around the axis u a at the angle ∆θ a . After that, the satellite suffers one more rotation, now around the axis u b , at the angle ∆θ b . The inclinations after this last rotation ( n w ) are n w,0 at the next iteration it + 1. For a spin in two axes, the first rotation will be around a fixed axis at the ERF, and the second will occur around the transient axis n * w (t) at the ORF.

Irradiance Model
The net radiation heat rate (Q r w ) expresses the radiation heat exchange of the CubeSat's external surfaces, which depends on the orientation of the surface w. For each surface w, except w = 7, there is incoming radiation (Q r w in ) given by the direct absorbed radiation from the Sun (Q Sun ), radiation absorbed from the reflections off the Earth's surface called albedo (Q alb ), and absorbed infrared radiation emitted by the Earth (Q IR ) [27]. There is still energy emission (Q r w out ) from the satellite's surfaces to outer space (Q sat→spa ), as shown in: Or: Equation (15) is a boundary condition of the thermal problem, which requires thermal parameters and also variables from the orbit and attitude models. The terms in Equations (16) and (17) are: Solar radiation: It is the primary heat source for satellites in Low Earth Orbit (LEO). In this work, the solar flux radiation (Q Sun ) is constant, and the solar rays are parallel. Equation (18) estimates the total radiation absorbed from the Sun. where: In these equations, α w is the surface's absorptivity of the satellite, A r w is the external area of each side w, F w→Sun is the view factor between the surface w and the Sun, and ξ is a step function to account for the eclipse, so it assumes the value 0 when the satellite is under the shadow of the Earth and 1 when it is outside. Both F w→Sun (t) and ξ(t) are functions of the attitude and orbit models, respectively. The view factor between the surface w and the Sun is calculated by Equation (20), which is basically the projection of that surface towards the Sun, while ξ is estimated by Equation (21), based on Figure 3.  Albedo radiation: defined by Equation (22), it is the amount of radiation from the Sun that hits the Earth's surface and reflects back to outer space.
The term a is the albedo coefficient, which is the solar radiation reflected by the Earth's surface, and F w→e (t) is the view factor between the satellite's surface w and the Earth's surface. The parameter U(t) projects the Earth's surface towards the solar radiation, therefore its peak coincides with the Equator's line and the Sun at the zenith, calculated through Equation (23).
To estimate the view factor F w→e (t), the Earth is idealized as a perfectly spherical emitter, much bigger than the satellite's dimensions [28]. Therefore, it depends on the satellite and Earth's distance, and so do the angles between each satellite and the Earth's surface. Figure 4 illustrates these parameters. The angle φ between the satellite's position and the Earth's border is: The angle γ w between the orientation of surface w and the center of the Earth is given by Equation (25), and Equation (26) is the expression for the view factor [28].
The terms in Equation (26) are: Infrared radiation: this source of thermal energy has its origin on Earth, which is always above absolute zero, and for this reason, emits radiation as: where Q e is the radiative heat flux emitted by the Earth, at the infrared wave-length. Satellite emission: the satellite's emission of radiation to outer space, in the infrared spectrum, is governed by: where ε w is the emissivity of the surface in the infrared spectrum, σ is the Stefan-Boltzmann constant (5.67 × 10 −8 W/m 2 K 4 ), T w is the temperature of PV w and T ∞ is the temperature of space. The parameters used in this work for the irradiance model are summarized in Table 1.

Parameter Value
The solar irradiance is constant and equal to 1360 W/m 2 in this model, as shown in Table 1. In reality, this parameter changes primarily with the Earth/Sun distance and the 11-year solar cycle. However, the impact of these variations are within the model's uncertainties.
As observed in Equation (30), the boundary condition is a function of the temperature at photovoltaic panels (T w (t)), a variable to be solved in the thermal model. More information on irradiance models can be found in [29].

Thermal Model
To simulate the heat transfer over the satellite, the classical energy balance is conducted along the CubeSat's full orbit, which is an environment where radiation and conduction are the main processes of heat transfer. In this work, the lumped parameter approach will be adopted, then parts of the satellite will be represented by nodes whose temperature gradient inside each node is negligible. To account for temperature gradients among the nodes is used the finite difference method. Therefore, the energy equation in each part of the satellite is indicated in Equation (31) (∀w = 1, . . . , 7): The sub-index w represents the main parts, or a node of the CubeSat, and each node has mass equal to m, specific heat v, temperature T, thermal radiation rate Q r , net heat transfer between internal parts Q T , and internal heat generation Q int . Notice from previous section that Q r 7 = 0. The system is solved by the Newton-Raphson method, and the time derivative in Equation (31) is discretized iteratively-by iterations "it"-at it and it − 1.
The net heat transfer between internal parts occurs by conduction and radiation processes. To keep the model simple, this term will be given by Equation (32), where R T w is a thermal resistance of node w.
The internal heat generation Q int (t) is non-zero only for the battery node, where an electrical heater with power P H (t) is introduced, ruled by Equation (33).
The remaining parameters used in the thermal model are summarized in Table 2. Except for the arbitrary value for R T w , these values are approximations of numbers found in the literature-for example, in [19,30,31]. 0.05 kg v w=1,..., 6 1000 J/(kg K) m w=7 0.06 kg v w=7 800 J/(kg K)

Heater Analysis
The heater in this work is a pure resistive load, so every power (P H (t)) produced on it is transformed into heat, given by: where V B (t) is the battery's voltage, D(t) is the duty cycle of a PWM (Pulse-width modulation) signal and R H is the electrical resistance of the heater. Thus, by assuming the thermal resistance to be equal to R T for every node of the satellite, as shown in Table 2, and applying the Laplace transform to Equation (31), the temperature at the battery (T 7 ) can be calculated by: Notice that the T 7 (s) has a time constant given by showing that the settling time of the battery temperature is proportional to its mass, specific heat and to the thermal resistance. Additionally, Equation (35) can be used to estimate T 7 (t) by means of an Inverse Laplace transform, as Given a certain D value, the steady-state value of T 7 is obtained by Equation (38).
The duty cycle D can be isolated from Equation (38): From Equation (39) it can be concluded that the cyclical ratio necessary to maintain a certain desired battery temperature is a ratio between its heat exchange and the maximum power input given by the heater.

Electrical Model
Electrical power system (EPS) architectures can have control in the solar panels, although the so-called direct energy transfer (DET) cannot [23,32]. In these architectures, the solar panels' voltage depends on the battery voltage, and this varies depending on the power budget. Therefore, heaters' power consumption affects battery voltage and energy harvesting, impacting the satellite's energy balance.
The directly coupled architecture is a DET topology, which is the simplest energy harvesting model [24]. Figure 5 shows a simplified directly coupled circuit diagram, where it has a single block representing solar panels. However, there are six solar panels, which are connected in parallel. This architecture requires that the solar panels, loads, and batteries have compatible voltage. As it was already exposed, the solar panels operate at almost the same voltage as the battery voltage, not always on their maximum power point. In this analysis, the passive components between the solar panels and the battery were not considered in the circuit. Figure 5 shows how to calculate the battery current I B : I L is the load current, I H is the heater current, and I PV is the photovoltaic panels' current. The heater current will be expressed in Equation (41) with a resistance for the heater R H and a duty cycle D of a PWM signal control, already introduced in Section 2.5.
The load current I L depends on the load power P L , defined as: The solar panel and battery models are required in the above expressions, and they will be evaluated in the following sections.

Solar Panel
The solar panel is composed of several photovoltaic cells, which ideally can be modeled by a diode DI (PN junction) in parallel with a current source I ph w (photovoltaic effect) [12]. A practical model includes a bypass resistor R p w with a series resistor R s w , the first one due to current leakage, spikes diffusion, or other effects. The second is the series resistance, mainly due to metal contacts with the semiconductor. Figure 6 shows the solar cell equivalent circuit, where I ph w is the photogenerated current, I DI w is the inverse saturation current of the diode, I R p w is the parallel resistor current, I PV w is the solar cell current, and V PV w is solar cell voltage. As mentioned previously, in this EPS model V PV w is the battery voltage V B . The current I PV w for a panel w is defined with the following equation: I ph w can be obtained from the solar panel short circuit current I sc w , for a given solar irradiance Q s w (given by Equation (19)), and solar cell temperature T w obtained with the proposed thermal model. I ph w for a panel w is described as: where Q s w 0 is the solar irradiance and T w 0 the temperature for which I sc w has been obtained, ∆I sc w is the coefficient that expresses the I sc w variation with temperature. These parameters are usually obtained from the solar cell datasheet.
The diode current is expressed by Equation (45) [24], where I S w is the saturation current, η w is the ideality factor of the diode, k being the Boltzmann constant and q the charge of the electron.
The saturation current of the diodes I S w in calculated by Equation (46), where V q is the voltage of the Crystaline Silicon.
where I S0 w is calculated using the open-circuit voltage V OC w and short circuit current I SC w of the solar panel at the temperature T w 0 (47).
Combining Equations (44), and (45) with Equation (43), the solar cell current is described in terms of circuit parameters, as shown in Equation (48).
Notice that in order to solve (48) for I PV w (t), one can rely on iterative methods like Newthon-Raphson [33]. The data presented in Table 3 are used in this paper for the solar panel model. The battery model used in this paper assumes that the voltage of the battery is considered equal to the battery's electromotive force EMF, which is firmly related to SoC in series for an internal resistance R BS and several resistor-capacitor blocks [7,34,35]. R BS includes all the resistances between electrodes, current collectors, and electrolytes [34]. Those resistor-capacitor blocks represent the charge transfer and diffusion process [7]. Figure 7 shows the model used in this paper. Where the RC 1 block has a more considerable time constant, therefore, corresponds to the slowest response, on the contrary, the RC 2 block resembles a quick answer.
The battery state of charge SoC is calculated as: where SoC(t 0 ) is the initial value of the SoC, C n is the nominal capacity of the battery (in ampere-hours). I B (t) is the instantaneous current (positive for discharge and negative for charge). As discussed earlier, the EMF is heavily associated with SoC. Analyzing the circuit of Figure 7 the battery voltage is defined by: where R BS (t)I B (t) is the voltage drop across resistor R BS , V RC 1 (t) and V RC 2 (t) are the voltage drop across resistor-capacitor blocks RC 1 and RC 2 respectively, given by: The values of internal parameters of the battery were approximated through look-up tables (LUTs), which were made through intermittent discharging experimental results [34] and are presented in the Appendix A.

Integrated Simulation Model
Considering the models introduced in the previous section, the proposed integrated model can be formulated as presented in Figure 8 in a flowchart. The problem is divided into the following main parts: orbit, attitude, irradiance, thermal, electrical, battery, and control model. To solve the satellite's transient temperature field, the energy equation was implemented in the satellite's main parts, here designed as the photovoltaic panels and battery, resulting in a total of seven equations. The irradiance in the boundary condition is transient to simulate different scenarios of spin and orbit.
The iterative process is performed until reaching the maximum desired simulation time. Overall, the simulation model consists of the following steps, contemplated in Figure 8.

•
Given an initial SoC value, battery voltage, and temperature values, the algorithm calculates the CubeSat parameters for each iteration it; • Given a time t, an iterative process takes place to calculate the new battery voltage; • The heater power is calculated considering a possible controller; • The load current is calculated based on the battery voltage and the maximum power drained (through tasks and/or payloads); • The maximum current supplied by the solar panels is calculated based on the voltage of the battery, its temperatures and the irradiance affecting them; • The battery parameters (SoC and current) are calculated based on the charging currents, heater and solar panels; • The power balance is calculated based on the difference between the current supplied by the panels and that drained by the CubeSat (optional to be used in the control procedure, not necessary for the algorithm convergence); • The battery voltage calculation is performed until convergence; • A control procedure defined by the operator is performed, aiming to control the heater power and the allocated tasks; • The calculation process is repeated for t + ∆t.

Init Simulation
Input t, ∆t, t max , h, θ i , spin, V B (t), SoC(t), T w (t), D(t) Orbit Model Calculate R sat (t) through Equation (11) Attitude Model Calculate n w (t) through Equation (14) Irradiance Model Calculate Q rw in (t) through Equation (16)

Results
In this paper, the case study is based on the CubeSat 1U FloripaSat-I, whose orbit is nearly-circular and Sun-synchronous, and has an altitude of 620 km [36]. For these reasons, the orbit's inclination is simplified to 90 • and perfectly circular. It is a condition that entails solar eclipse caused by the earth, so the unit vector inside [M i ] is u i = [0, 1, 0] and θ i = 90 • .
The parameters to perform this inclination and the translation of the orbit's satellite are summarized in Table 4.  (12) [0, 0, 1] It will be assumed that the orientation results from a passive attitude control based on magnets, which aligns the satellite with Earth's magnetic field. Therefore, the matrix [M a ] synchronizes one axis of the CubeSat with the Earth's magnetic field, simplified as a dipole pattern. This axes is still free to rotate around itself, so a second matrix [M b ] is used. The attitude scenario to be tested is summarized in Table 5. The CubeSat rotates twice per orbit around one axis to align with the Earth's magnetic field, and the free spin around the secondary axis has the arbitrary value of 10 rotations/per orbit, representative of a spin condition without any damping. We will also define the energy modes (L), in which the satellite will work, as presented in Table 6. The energy levels are related to CubeSat's maximum power consumption according to the battery's state of charge. The energy levels presented, which are based on the CubeSat FloripaSat-1 [36], are related only to the available energy level (SoC). However, they can be used, for example, to trigger energy-saving states, such as decreasing the energy usage in eclipse regions. A simple control algorithm was employed to illustrate the case scenarios. The process defines the satellite's maximum energy consumption according to the battery charge status and applies an on/off controller to the heater according to the defined temperature setpoint. To illustrate, a heater with R H = 10 Ω was used in the simulations. The timestep of the simulation was set to 1 s and the total time of the simulation was equivalent to 12 orbits.

Simulation Results
First, consider the temperature at the photovoltaic panels shown in Figure 9, which illustrates a scenario where no heater action is taken, that is, no temperature control. Sides 1 and 4 of the satellite become hotter because the attitude favors these surfaces towards the Sun. The decrease in the temperature in the middle of the figure results from the orbit's period under the Earth's shadow. Figure 10 shows the power input (P in ) of the satellite concerning the variables battery voltage (V B ), average temperature of solar panels (T PV ) for each instant, and average solar irradiation (Q ave ). All the parameters were normalized and valid for the portion of the orbit eclipse, and this behavior was captured for T set = 273 K. The integration of thermalelectrical parameters in this figure shows a temperature increase that should decrease the solar panels' efficiency. However, this loss in efficiency is compensated by the increase in battery voltage due to the energy input, resulting in a closer behavior for the available irradiance and the power generation when the V B is higher.

Fixed Temperature Setpoint
Under those considerations, initially, the behavior of the proposed model is illustrated under the following situations: no heater control, T set = 273 K, T set = 278 K, and T set = 283 K.
For the simulation process, we defined the initial SoC as 50%. The battery's state of charge, voltage, and temperature, and the energy levels (L) are shown respectively in Figures 11-14      As can be seen, in the case with no heater (no control) in Figure 13, despite the CubeSat attaining the highest energy levels, the temperature reaches 265 K in eclipse regions, which tends to impact its lifespan and functioning. The most intensive use of the heater in the defined setpoints occurs in the eclipse regions. Typically in these regions, the satellite's energy balance is negative, so tasks with high energy consumption should be avoided in those regions. As expected, a higher setpoint requires more energy from the system and keeps the satellite at lower energy levels (L) (Figure 14). In comparison, the cases with T set = 273 K, T set = 278 K and T set = 283 K have the heater on during the eclipse for 520, 916, and 1305 s, respectively.
For instance, consider the balance of energy shown in Figure 15, which zooms in on the satellite entering into an eclipse. Initially, the energy balance is close to 0 and constant as the heater is not activated, and CubeSat is in energy-saving mode L = 1. However, as the battery's temperature outside the eclipse was kept higher by the case with T set = 283 K, the activation of the heater suffers a delay, and its use is reduced when the satellite is within the eclipse. Maintaining a higher temperature outside the eclipse keeps the battery at a lower voltage and state levels as a negative point. Thus, a trade-off must be found between maintaining the battery temperature and its use.

Variant Setpoints
The previous situation can be mitigated, for example, with the use of setpoints that vary according to the satellite's energy level. Consider that for each energy level L, starting from 1 to 5, T set is now defined as follows: T set = [273, 278,281,283,288]. In other words, the setpoint will assume a different value depending on the level of energy available on the satellite. For example, if L = 1 the setpoint will be 273 K, if L = 2 the setpoint will be 278 K, and so on.
As can be seen in Figure 16, using different setpoints for different energy levels allows the battery's state of charge to recover faster, and also maintain a higher SoC during the orbit. This configuration results in the temperature behavior shown in Figure 17, in comparison with a constant T set = 283 K at the eclipse. The heater was kept on for 307 s during the variant case's eclipse, the lowest value among all the simulated scenarios. Its high temperature explains this before the shadow and low setpoint during the eclipse.

No Energy-Saving Mode in an Eclipse
The previous cases considered that the CubeSat entered an energy-saving mode during the eclipse (that is, L = 1). This subsection illustrates the same satellite behavior when no energy-saving actions are taken during the eclipse. For instance, Figures 18 and 19 present, respectively, the state of charge and energy levels for scenarios without energy savings. Note that in this way, the variations in the state of charge of the battery tend to be greater, decreasing its useful life. Another consequence is that the higher expenditure during the eclipse state does not allow the CubeSat to return to the energy level L = 5. From the presented results, it is possible to perceive that the framework can be used to better understand the behavior of the temperature and energy of the satellite during the orbit. This allows designers to adapt their control algorithms according to the needs and power available in the target CubeSat.

MPPT
Another possibility brought by the integrated simulation method is the addition of an MPPT algorithm in the user-defined control phase. The MPPT algorithm is usually employed to search for the optimal point of the photovoltaic panel's maximum power delivery. Figures 20 and 21 illustrate one of the forms of MPPT known as "perturb and observe" in the integrated simulation model [37]. In this method, small disturbances in power consumed by the target device are used, and whether the power delivered by the panel has increased or decreased is analyzed. For more information on this method, please refer to [24].

2UELW
>@ V B P TOTAL P IDEAL P LOAD Figure 20. The total input power of satellite (under the MPPT algorithm) compared with the ideal power that could be delivered in a given orbit.

2UELW
>@ P IDEAL P LOAD P H Figure 21. Total input power (under MPPT algorithm) compared with the ideal power that could be delivered in a given orbit. In this scenario, the heater is also considered as a task to be executed under the MPPT algorithm perturbations.
In Figure 20, the total input power of the satellite is compared with the ideal power that could be delivered for a given time. The control algorithm used selects the relevant tasks (P LOAD ) in order to try to reach the maximum theoretical power. Note that over the period shown, the battery voltage increases, making use of the difference in excess power (P TOTAL − P LOAD ). It is important to note that P IDEAL is based on the ideal power that would be achieved by the best possible combinations of battery voltage and current-not necessarily using the instant battery voltage. This phenomenon causes the difference between P TOTAL and P IDEAL .
Another interesting possibility in the use of MPPT is to take the surplus power of the execution of the tasks P TOTAL − P LOAD to supply the heater, as illustrated in Figure 21 for a slice of an orbit. Notice that while trying to follow the maximum power, the system balances between the heater and the execution of tasks. In the illustrated scenario, when the sum of P H and P LOAD exceeds the P IDEAL line, it means that the battery is being used.

Conclusions
Given one of the CubeSats' main challenges, which is proper energy management in a harsh environment, the platform's limitations must be taken into account by the engineers during the satellite's design. In this context, one of the challenges related to energy management is the need to keep the battery within acceptable temperature ranges, without wasting energy in the process.
To assist in this process, this paper proposes an integrated simulation model for the energy and temperature of CubeSats, taking into account aspects such as the electrical and thermal characteristics of the battery and the photovoltaic panels and their attitude dynamic in orbit.
Seven nodes idealize this integration of thermal and electrical models. While the model can support more nodes, such as different payloads, the heat transfer would still be limited to a simplified thermal resistance. Nevertheless, this simplification in the heat transfer by conduction and radiation among the main parts of the satellite is conducted at the expense of computational cost and simplicity for the user, a fundamental feature at the preliminary phases of development of a CubeSat, where the engineers may assess different configurations before proceeding into a much more complex model.
To illustrate the proposed model, a simulation scenario was generated for a 1U CubeSat in an orbit at 650 km with altitude and dynamics typical of CubeSats with passive attitude control. Tests were performed considering a heater with an on/off controller designed to keep the satellite temperature at an appropriate setpoint. The results presented the model's capacity to report the battery's thermal and electrical aspects, being able to help the designers with testing their own control system.
For future work, the search for a more accurate thermal model of solar panels is suggested, such as through the finite volumes method. The integrated model should be used for proposing new control systems and task-scheduling algorithms.  Acknowledgments: This work was supported by CNPq, the National Council for Scientific and Technological Development-Brazil, via grant number 141276/2018-5. We would like to thank to Seed Funding ILIND-Instituto Lusófono de Investigação e Desenvolvimento, COPELABS. Al Proyeto: Uso de algoritmos y protocolos de comunicación en dispositivos con énfasis en la privacidad de los datos.

Conflicts of Interest:
The authors declare no conflict of interest.

Appendix A
The look-up tables used in the battery model during the experiments presented in this paper are shown in Table A1.