Project 1 (Mini Project on Vehicle Direction Detection
Project - 1:
Aim:
To identify the direction of the vechicle based on camera and steating inputs. Signal and calibration data are given.
Vechicle_Direction_Detection_Madel:

It is the main model for vechicle direction detection, where the inputs are given as SteeringWHeel_YawDegreeInput and CameraInput_RoadDign.
Reqirement_1:

- In this Requirement1, the steering wheel yaw degree is given as input to the subsystem and this input value is compared against 3 angular values, one each for left turn, right turn & straight drive to tell the steering wheel is turning towards which direction. In this case, the output of the relational operator '==' is equal to 1 only when the 'SteeringWheel_YawDegreeInput' matches with any one of caliberation value then it will give logical 1 or true condition.
-
Three signal switch blocks are used to implement an if-else logic. The output from each relational operator(==) is given to second port of each switch block. The switch will pass input1 (calibration value) when the condition (input2>0) condition is satisfied, else input3 is passed as output.
- If 'SteeringWheel_YawDegreeInput' does not matches with any one of caliberation value then it will give logical 0 or false condition. Then, it will take the value mentioned in the third port of switch 3. In this case, at the third port, value mentioned is 0 hence, the same is given out as output i.e Vehicle_Turn_Status.
Requirement_2:

- In Requirement_2 subsystem, the local signal 'Vehicle_Turn_Status' is fed from 'Requirement1' subsystem and given as an input and is compared against calibration values using the relational operator '=='.
- If the value matches, then the relational operator (==) gives logical 1 or true value and same is compared in AND operation with input signal from camera i.e.CameraInput_RoadSign which states that when camera actually captures the road sign, then it is compared with caliberation value of road sign values and when it matches, then only output signal (i.e. Vehicle_Direction_Indicator) is provided in the form of boolean values.
- The output 'Vehicle_Direction_Indicator' will be a three dimension signal having three boolean elements, with the first element to indicate 'Right Turn', second element to indicate 'Left Turn' and third element to indicate 'Straight Drive'.
- Since, signals such as Vehicle_Turn_Status is already being used in this model hence we proporgate the same signal by clicking on signal and entered '<>' .
Developing SLDD:


All the inputs and parameters are saved in SLDD so while simulating the model it takes all the value and parameters from Simulink Data Dictionary.
Parameter updates:
Various configuration parameters are updated as per the code generation and solver type fixed for code generation.








Model Advisor report:

Code Generation:

File Code: