Project 1 (Mini Project on Vehicle Direction Detection
Answer
Aim:-To create a Simulink model of Vehicle Direction Detection as per the Requirement1 and Requirement2 data.
Creation of SLDD file

Description:
The logic in the Requirement_1 is, 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 threshold value then the switch will takes 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 takes 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 is to compare the "Vehicle_Turn_Status" (Output of Requirement_1) with "RoadSign" and an input signal from camera to get the Vehicle Direction indicaton.
After comparision with "Vehicle_Turn_Status" if each of them is found equal, then each of the three corresponding output is compared against the camera input signal, by using the 'logical OR' Blocks will get the true case and to take only one among them as output, the 'Mux' block is used.
And the final output from the Vehicle_Detection Model will indicates 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.
By running the simulation will get the vehicle direction.
Simulink Model for Requirement1

Simulink Model for Requirement2

Subsystems for Requirement1 and Requiremen2


Results:
- The signs are in the way that 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 as (1,0,0), Then the vehicle is taking in the Right turn.
- If the output is (1,0,1), Then the vehicle is taking the Left turn.
