# Efficient Secure Mechanisms for In-Vehicle Ethernet in Autonomous Vehicles
## 4 Simulation Experiment and Result Analysis
### Simulation of Network Traffic and Attacks
#### 4.1.1 Generation of Normal Network Traffic  
We begin by simulating normal network traffic to establish a baseline for network behavior. This involves mimicking the typical data exchange between electronic control units (ECUs) within a vehicle, such as those related to engine control, braking systems, and multimedia entertainment. The simulation encompasses a variety of data types, including real-time sensor data, control signals, and entertainment system communications. The normal traffic is designed to reflect the standard operation of a vehicle's network without any malicious interference. We simulated vehicle acceleration control, deceleration control, lamp control, and multimedia signals separately. 1. Acceleration control: Figure 8 shows the analog acceleration control simulation results, where the vehicle's speed is regulated by the gas pedal and an acceleration control lever. The simulation illustrates that increased pressure on the gas pedal proportionally boosts acceleration, as indicated by a real-time speed dial on the dashboard. Additionally, moving the acceleration control lever to the left decreases speed, while moving it to the right increases speed. This setup provides precise control over the vehicle's acceleration, emulating real-world driving conditions and offering a comprehensive understanding of the vehicle's response to inputs. 2. Deceleration control: Figure 9 illustrates the results of the deceleration control simulation. As the car reaches a certain speed, pressing the brake pedal triggers a braking signal, resulting in a reduction in speed. The simulation showcases a direct correlation between the force applied to the brake pedal and the vehicle's deceleration rate. On the virtual dashboard of the simulated car, the speed value on the odometer decreases accordingly, accurately reflecting the actual speed change in real-time. This setup offers a realistic portrayal of braking dynamics, providing users with immediate feedback on how the vehicle responds to braking inputs. Furthermore, the simulation captures the progressive decrease in speed as more pressure is applied to the brake pedal, mimicking real-world deceleration behavior and enhancing the user's understanding of the vehicle's braking performance. 3. Lamp control: Figure 10 depicts the results of the headlight control simulation, showcasing various functions such as running light signals, turn-signal signals, hazard light signals, and brake light signals, among others. These functionalities are implemented  
Figure 7: (**a**) Overall network topology architecture of Ethernet; (**b**) system variables for simulating car functions. by integrating lights on the simulated car. When the corresponding control buttons are pressed, the respective lights illuminate, thereby achieving visual control of the lights. It ensures that when control buttons are engaged, the corresponding lights illuminate accurately, providing essential visual cues for driving scenarios. 2. Multimedia signals: The in-vehicle multimedia module successfully plays video on the designed HeadUnit analog video player. In this paper, we have tested this by intercepting a clip from the classic movie \"Titanic\" and verifying that it can be played normally and smoothly through the simulation player, as shown in Figure 11.  
Figure 8: Simulated acceleration signal simulation results. Figure 10: Simulation results of running car headlights. Figure 9: Simulation result of the simulated braking signal. As shown in Figure 12, the characteristics of data transmitted on the in-vehicle Ethernet bus can be intuitively analyzed using CANoe's trace, statistics, and graphics functions. The figure comprehensively analyzes data transmission characteristics, displaying the connection status of devices like AMP, HU, IC, and VGW at a link speed of 1000.0 Mbit/s. Crucial metrics such as bus load, packet rates, bit rates, peak rates, and byte rates for both reception (Rx) and transmission (Tx) are visually presented.