###### Abstract
In [22], the authors developed a HIL setup to validate the effectiveness of a robust fractional-order sliding mode control (RFOSMC) of a hybrid battery/supercapacitor fully active energy storage system (BS-HESS) used in electric vehicles. In [23], an ACC (Adaptive Cruise Control) control strategy is presented and a HIL setup is used, primarily composed of the real braking and driving systems and a dynamic model of an electric bus. However, none of these HIL test benches for vehicles focuses on the HVAC system. On the other hand, several papers can be found describing HIL test benches to evaluate HVAC performance in buildings [1, 24, 25, 26], but not in vehicles. In addition, in [27], the test bench is composed of a real controller and models of the HVAC and the vehicle. In the present work, a virtual controller is used since it provides more flexibility in the evaluation of possible control strategies and structures. In this research, a highly flexible HIL test bench consisting of the real components of the HVAC system connected to a real-time simulation of a coach cabin thermal model through a standard industrial communication protocol is proposed as the main contribution, making up a hybrid system in which hardware and software components interact with each other through bidirectional real-time data exchange between them. To the authors' knowledge, a HIL test bench specifically designed and built for public transport coaches that includes actual heating system equipment has not been previously developed. Additionally, the proposed control-oriented cabin thermal model and the validation of the whole system using actual experimental data can be also considered novelties of the work. All this allows for improving the development process of heating systems by reducing and enhancing validation steps, as well as testing the performance of control strategies for these systems at a low cost before their validation on a real coach. Two differentiated air zones (driver and passengers) with bidirectional heat exchange are considered, defining simple lumped models for each one, and OPC UA (Open Platform Communications Unified Architecture) [28] is the industrial protocol used for data communication. The proposed methodology allows for the flexibility of working under different conditions affecting the coach's thermal model simulation, such as cabin size, number of passengers, solar radiation, etc., so that different scenarios can be considered. The whole system can be used as a test bed to tune and check the performance of any control strategy to be designed, as it is software-implemented, but other potential uses can be also considered, including the assessment of components, optimisation or sensitivity analysis. The authors consider that the proposed methodology is a novelty approach not found in previous state-of-the-art tools for testing the control design of coach heating systems. The paper is organised as follows. The experimental setup designed for the driver's zone heating system is detailed in Section 2.1. The proposed model that implements the coach cabin's thermal behaviour is described in Section 2.2. Selected experiments carried out on a real coach are discussed in Section 2.3, and in Section 3.1, the cabin thermal model is validated. Results of replications of such experiments using the proposed hybrid test bench are detailed and discussed in Section 3.2. The description of results obtained from several illustrative test experiments focused on highlighting the usefulness of the proposed test bench for control system design is presented in Section 3.3. Finally, the conclusions of the work are summarised in Section 4.