## 3 Experimental Setup of the Adopted Robot Hardware and Software
### Hardware Components and Architecture  
The robot has many hardware components. However, for ease of reading, this paper focuses on explaining the elements related in some way to the emotional model. The hardware consists of three computers (a Lenovo TB3-710F Tablet with Android 5.0.1, a Raspberry Pi 3 model B, and an Arduino Micro), drivers to control the inputs and outputs, and actuators to generate the emotional responses. Figure 3 shows a general schematic of the main components of the robot and the connections between them. Specifically, the functions performed by each of them are as follows:  
* Raspberry (Raspberry Pi 3 model B): this runs both the emotional model and the conversational agent. It is constantly connected, via WiFi, with the tablet to transmit the text to be communicated by the robot, as well as the facial expressions to be shown depending on the robot's mood. It is also responsible for analyzing and managing the texts obtained from the tablet's voice recognition. It also has a wired connection with the Arduino to receive the measurements of the different sensors and send the outputs produced by the emotional model. * Arduino (Arduino Micro): Arduino is an open-source development platform capable of communicating with sensors and actuators. It conducts a constant reading of the sensors. Then, when there is a variation in any measurement, it is sent to the Raspberry. In the same way, it receives the output of the emotional model that generates a particular outcome in the actuators. * Tablet (Lenovo TB3-710F): the tablet runs Android 5.0.1 as it facilitates implementation, thanks to Google's text-to-speech and speech-to-text features. As well as taking care of these functions, the developed application shows different facial expressions depending on the mood, which will be described in more detail at the end of Section 5. In regards to the sensors and inputs used by the emotional model:  
* Two light-dependent resistors of 5 mm: used to check the room's luminosity where the robot is. The final value considered is the average of both sensors. The values  
Figure 2: UPM-CSIC CAR personal assistance robot. obtained by these sensors range from 0 to 1000, where 0 is complete darkness and 1000 is the brightest value. * Antennas or crests (red-colored parts on the top of the robot in Figure 2) are used as touch sensors, which, when touched, close a shelf-developed electronic circuit. It is possible to differentiate whether it is touched a lot, a little, or not, so it is used to check if the user careses the robot. The sensor values range from 0 (there is no caress) to 3 (the user is caressing the robot a lot). * Battery level: the system uses the battery level as an input. The range of values is from 0 (no battery) to 100 (full battery). In the implemented version, this measure is not used, since the evolution of the battery is very slow, so it does not offer perceptible responses by users if they do not interact with the robot for long periods of time. Each of these sensors is directly connected to the Arduino, which periodically reads them and sends them to the Raspberry, where the fuzzy logic module is located and which translates them into fuzzy labels (this process will be better explained in Section 5). These labels are then sent to the emotional model, also located on the Raspberry, to modify the emotional state of the robot. The serial connection between the Arduino and the Raspberry is through a USB cable. Changes in the emotional state of the robot produce output reactions. These are sent to the fuzzy logic translator that finally sends the numerical values to the actuators connected to the Arduino via USB or to the facial expression software of the tablet through a WiFi connection. The actuators and output of the robot are the following:  
* A series of heart-shaped LEDs, simple red light-emitting diodes that blink at a specific frequency simulating the heartbeat. This frequency can be a value from 0 to 300 Hz.