Project 1 (Mini Project on Vehicle Direction Detection
Aim:
To develop a logic and create a Simulink model of Vehicle Direction Detection as per the Requirement data. Create a data dictionary and link it to the model. To simulate the model to check the output.
Blocks used:
Blocks used to create a model are
Input Blocks: To provide the input signals
Output Blocks: To send the output signals
Constant Blocks: To define the calibration values
Logical operator Blocks: OR blocks are used to compare the road signs with camera input and get the boolean output.
Switch Blocks: To compare the input with the calibration values.
Mux Block: To combine the signals
Display Block: To display the results
Procedure:
The logic in the Requirement_1
Here Switch1 will determine the right turn when the input angle is greater than or equal to 30deg. Whereas Switch 2 is used to determine either a left turn or a straight line. If the angle is equal to zero, it is a straight line, or else it is a left turn.
If the input is >=30 (because the initial value is 30) the vehicle will take the Right turn, else If the input is not equal to zero (~=0) the vehicle left_turn, else stright_drive (if the input is equal to zero).
The input yaw rate is given to the middle port of the switch, and the threshold value is 30. If the input is greater than the threshold value then the switch will take the True condition (Right_Turn_AngularLimit) else false condition. In the second switch, the threshold value is zero, if the threshold value is not equal to zero then the switch will take the true condition (Left_Turn_AngularLimit) else takes the false condition (Sitight_Drive steering_Angle). This output from the second switch is given as a false condition to the first switch. And the output for the Requirement_1 is "Vehicle_Turn_Status".

The logic in the Requirement_2
After comparison with "Vehicle_Turn_Status" if each of them is found equal, then each of the three corresponding outputs is compared against the camera input signal, by using the three 'logical OR' Blocks will get the true case and take only one among them as output, the 'Mux' block is used.
And the final output from the Vehicle_Detection Model will indicate the vehicle_Direction indication.
Next by adding the SLDD_file to the model and by loading the calibration values and input/output values are defined.
Running the simulation will get the vehicle direction.

Results:
- The signs are in the way Right, Left, and Straight respectively.
- As the output is boolean, If we get the output as (0,0,1), Then the vehicle is moving in the straight drive.
- If the output is (1,0,0), Then the vehicle is taking the Right turn.
- If the output is (1,0,1), Then the vehicle is taking a Left turn.
- After running the simulation, we can clearly see that the vehicle is moving in a straight direction.

Conclusion:
Autonomous vehicles consist of various Advance Driver-Assistance System (ADAS) features. Vehicle Direction Detection is one of the features of the vehicles.
Hence, created a Simulink model of Vehicle Direction Detection as per the Requirement data.