## 3 Results
### Processor-in-the-Loop and Simulations Comparison  
In this section, a comparative analysis of the obtained results using PIL architectures with respect to the MIL one is discussed. Vehicle main states extracted from the PIL architecture with the Raspberry Pi 4B board and Speedgoat real-time target machine are compared and validated employing the same real acquisition dataset. This dataset includes the maneuvers illustrated in the previous section. The vehicle main states are reported in Figures 14-16 for the maneuvers performed in Figures 8-10, respectively. In Figures 14-16, the front wheel steering angle \(\delta\) extracted from PIL architecture with the Raspberry Pi 4B board (magenta, solid) and Speedgoat real-time target machine (black, solid) is compared with respect to the MIL configuration output (black, dashed) in subfigure a. The longitudinal acceleration \(a_{x}\) command from MIL architecture (black, dashed) is shown in subfigure b along with the acceleration command resulting from both PIL architectures, Raspberry Pi 4B board (magenta, solid) and Speedgoat real-time target machine (black, solid), respectively. Subfigure c illustrates the reference longitudinal speed \(V_{ref}\) (black, dashed) with respect to the actual vehicle speed in PIL configurations \(V_{x}\). The lateral velocity \(V_{y}\) is shown in subfigure d, while the crosstrack error \(e_{1}\) (black, solid for Speedgoat real-time target machine and black, dotted for Raspberry Pi 4B board) and the angle \(e_{2}\) (blue, solid for Speedgoat real-time target machine and blue, dotted for Raspberry Pi 4B board) are shown in subfigure e, for each maneuver comparing MIL/PIL architectures. Figure 14: Results obtained during the straight road portion in PIL configuration (see Figure 8). Measured vehicle states for Speedgoat (black) and for Raspberry Pi 4B (magenta): (**a**) Front wheels steering angle \(\delta\); (**b**) Longitudinal acceleration \(a_{x}\); (**c**) Longitudinal speed reference \(V_{ref}\) (black, dashed) vs. Actual longitudinal speed \(V_{x}\); (**d**) Lateral speed \(V_{y}\); (**e**) Cross track \(e_{1}\) for Speedgoat (black, solid) and Raspberry Pi 4B (black, dotted) and Relative yaw angle \(e_{2}\) for Speedgoat (blue, solid) and Raspberry Pi 4B (blue, dotted). Figure 16: Results obtained during the right turn maneuver in PIL configuration (see Figure 10). Measured vehicle states for Speedgoat (black) and for Raspberry Pi 4B (magenta): (**a**) Front wheels steering angle \(\delta\); (**b**) Longitudinal acceleration \(a_{x}\); (**c**) Longitudinal speed reference \(V_{ref}\) (black, dashed) vs. Actual longitudinal speed \(V_{x}\); (**d**) Lateral speed \(V_{y}\); (**e**) Cross track \(e_{1}\) for Speedgoat (black, solid) and Raspberry Pi 4B (black, dotted) and Relative yaw angle \(e_{2}\) for Speedgoat (blue, Figure 4. B (blue, dotted). Figure 15: Results obtained during the left turn maneuver in PIL configuration (see Figure 9). Measured vehicle states for Speedgoat (black) and for Raspberry Pi 4B (magenta): (**a**) Front wheels steering angle \(\delta\); (**b**) Longitudinal acceleration \(a_{x}\); (**c**) Longitudinal speed reference \(V_{ref}\) (black, dashed) vs. Actual longitudinal speed \(V_{x}\); (**d**) Lateral speed \(V_{y}\); (**e**) Cross track \(e_{1}\) for Speedgoat (black, solid) and Raspberry Pi 4B (black, dotted) and Relative yaw angle \(e_{2}\) for Speedgoat (blue, solid) and Raspberry Pi 4B (blue, dotted). Considering the comparison between MIL and PIL configurations, the vehicle states and the control variables are comparable, thus proving the consistency of the proposed PIL architecture. In Table 3, Root Mean Square Error (RMSE) and the Mean Absolute Error (MAE) for the controlled variables calculated in both PIL configurations, \(a_{x}\) and \(\delta\), are reported. The performances of both PIL layout are also reported in terms of driving Scenarios performed by the retained self-driving vehicle.