## 2 Materials and Methods
### Proposed Cabin Thermal Model  
The thermal model described in this section is based on those introduced in [17] and [19] with several changes and simplifications in order to calculate the mean air temperatures and embed it into the proposed hybrid system for real-time simulation. The coach cabin was divided into two major thermal zones, driver (Zone 1) and passengers (Zone 2), the latter with an air volume much greater than the former. The main novelties of the model introduced in this work are, on the one hand, the existence of inputs (airflow and air temperature) from two different independent heating systems installed on each thermal zone and, on the other hand, the possibility of bidirectional air and heat exchange between such zones. The model is lumped, essentially considering them independent from a thermal point of view and assuming that the different involved temperatures in each zone are uniform, though with mass and energy exchange between them. It is based on energy balance equations primarily considering, in a simplified manner, the interior air volume in each zone, the characteristics of the surrounding window panes embedded into the vehicle body, the number of occupants, the outside temperature, the incident solar radiation and the dimensions of the vehicle, some of which are parameters or disturbances that can be modified for the thermal simulation of the cabin. The outputs of the model are the mean air temperatures of both zones. Figure 4 presents a diagram of the cabin's thermal model. It shows the two zones and the associated heat loads. Equations (1) and (2) describe the energy balance for Zone 1. \(T_{i1}\), \(T_{i2}\) and \(T_{w1}\) are the mean interior temperatures of both zones and the temperature of the windows in the driver's zone, respectively. \(C_{i1}\) and \(C_{w1}\) are the heat capacities of the air in Zone 1 and of the windowpanes of that zone, respectively, and are calculated using Equations (3) and (4). \(V_{i1}\) is the interior air volume in Zone 1, \(\rho_{i}\) is the air density, \(c_{pi}\) is the specific heat capacity of air, \(V_{w1}\) is the window pane volume surrounding the driver's zone, \(\rho_{glass}\) is the density of the glass and \(c_{pglass}\) is the specific heat capacity of the glass. The terms on the right-hand side of Equations (1) and (2) are the heat transfers and heat loads, which affect the temperature of the air in Zone 1. Constant parameter values from equations regarding the driver's zone are shown in Table 2.  
Figure 4: Diagram of the coach cabin. \[C_{i1}\frac{dT_{i1}}{dt}=\dot{Q}_{sup1}+\dot{Q}_{oc1}-\dot{Q}_{ inv1}-\dot{Q}_{12} \tag{1}\]  
\[C_{w1}\frac{dT_{w1}}{dt}=\dot{Q}_{inv1}+\dot{Q}_{ov1}+\dot{Q}_{sun1} \tag{2}\]  
\[C_{i1}=V_{i1}\cdot\rho_{i}\cdot c_{pi} \tag{3}\]  
\[C_{w1}=V_{w1}\cdot\rho_{glass}\cdot c_{pglass} \tag{4}\]  
\(\dot{Q}_{sup1}\) is the heat load from the air supplied by the heating system in Zone 1 and is calculated using Equation (5). \[\dot{Q}_{sup1}=\dot{V}_{H1}\cdot\rho_{i}\cdot c_{pi}\cdot(T_{H1}-\beta\cdot T _{i1}) \tag{5}\]  
where \(\dot{V}_{H1}\) is the supply volumetric airflow rate, \(T_{H1}\) is the temperature of the supplied air and \(\beta\) is the ratio of flow rate from recirculation air in Zone 1; both \(\dot{V}_{H1}\) and \(T_{H1}\) are two of the model inputs. \(\dot{Q}_{oc1}\) is the sensible heat load from the driver (the only occupant in Zone 1); its value is approximately 70 W per person [29]. \(\dot{Q}_{inv1}\) is the convective heat transfer between the interior air in Zone 1 and the windows embedded in the coach body in that zone. It is calculated using Equation (6),  
\[\dot{Q}_{inv1}=sign(T_{i1}-T_{w1})\cdot U_{inv}\cdot A_{w1}\cdot|T_{i1}-T_{w1}| \tag{6}\]  
where \(U_{inv}\) is the overall heat transfer coefficient between the air and the vehicle windows in Zone 1 and is usually empirically obtained [30], \(A_{w1}\) is the contact surface area and \(T_{w1}\) is the mean temperature of the windows in the driver's zone.