## 2 Materials and Methods
### Software and HMI  
To speed-up the research of the automatic control system for the articulated bus and to monitor its performance during the experiments, it is convenient to incorporate a Human Machine Interface (HMI). In this section the main characteristics of this HMI will be described. The environmental constraints are considered a key point for designing this HMI. First, the mobile system is a long vehicle, with multiple variables, working in tough conditions under a real-time operation system. Because it must cover large displacements, the operator's safety (and comfort whenever possible) is a priority. The HMI must display comprehensible and significant information, and the real-time requirements must be satisfied. The main purpose of the HMI is to establish friendly, remote and intuitive communications between the vehicle and the people who operate it, and it also includes an adaptable and open configuration. Thus, the HMI contains the following properties:  
* Multiple sensors and variables can be visualized; two and three dimensions are considered for some sensors. * Real-time visualization of the information. * Multiple and simultaneous clients connection can be accepted. * Adaptable according to the requirements/configuration of every client. * Data storage for every testing session. * The old session can be visualized: offline mode. * The TCP/IP communication protocol has been used to communicate between the vehicle and the users (researchers). The HMI client-server architecture is based on a server running on-board the vehicle, operated on the RTOS (real-time operating system) named QNX(r) [64] and a client that can run on any PC and that has been developed in MATLAB(r) [65]. A simultaneous connection of several clients, from \(i=1\,\dots\,\,n\), is possible, where each client is denoted as the \(i\)-client. Figure 8 shows the general diagram of the remote system communication between the server and the \(n\)-clients. The server consists of a \"Clients Manager\", whose purpose is to create and control the communication channels with every connected \(i\)-client. It also has to handle the clients' requests considering the clients' initial configuration. In order to communicate between the server and the main controller, an interface has been created called \"data_devices Manager\", which is in charge of acquiring the information of the active devices and variables of the system. The \(i\)-client consists of a graphical interface and a \"Configuration_Profile Manager\". The graphical environment is intended to display the multiple variables of the vehicle; the variables are classified and positioned in four groups or modules (see Figure 9). Module #1 displays the variables strongly associated with the steering control: the steering wheel position (angle) and the trajectory deviation angle. Module #2 shows the variables related to vehicle movement, i.e., the velocity and the interpretation of the brake and accelerator pedals. Module #3 is used for the depiction of the information acquired by the range sensor (LIDAR), whether it is displaying the data in 2D or 3D. Module #4 shows the bus trajectory. The Configuration_Profile Manager is in charge of supervising the execution of the \(i\)-client, according to the user's requirements. The remote communication begins by means of any \(i\)-client. The first action is the \(i\)-client identification; then, it sends its initial configuration profile, previously established, where the user  
Figure 8: General diagram of the remote system communication. Figure 9: HMI graphical environment. chooses the variables of the system to be monitored. Once the configuration has been confirmed, the server starts the data sending procedure. This process will be performed until one of the linked parts breaks the connection. Due to the communication system being designed to operate with multiple and simultaneous clients/users, the server performance is not affected when an \(i\)-client is disconnected or a new \(i\)-client is connected.