Challenge

Project 1 (Mini Project on Vehicle Direction Detection

Aim of the Project:

To develop a Simulink Model for Vehicle Direction Detection used in ADAS

Description:

1. Create the main Subsystem named Vehicle_Direction_Detection and feed the SteeringWheel_YawDegreeInput and CameraInput_RoadSign inputs to it

2. In the subsystem create two other subsystems namely Requirement_1 and Requirement_2 

3. In the Requirement_1 subsystem, feed the SteeringWheel_YawDegreeInput input and the below logic is used to ge the output Vehicle_Turn_Status

   i. We have three constants Right_Turn_AngularLimit, Left_Turn_AngularLimit and Straight_Drive_Steering_Angle 

   ii. We compare the SteeringWheel_YawDegreeInput with the three constants using Switch Blocks to get         the Vehicle_Turn_Status

   iii. In the 1st Switch block we check if the input is >=30, which if True the result will be Right_Turn_AngularLimit, since its value is 30

   iv. If the result is Flase then it moves to the 2nd Switch block where it checks if the input is ~=0, which if True then the result will be Left_Turn_AngularLimit, since its value is -120, else if the result is Flase then the output will be Straight_Drive_Steering_Angle as its value is 0

4. Then in the Requirement_2 subsystem we feed the output of the Requirement_1 subsystem, i.e. Vehicle_Turn_Status and also the CameraInput_RoadSign and perform the below calculation to ge the final result i.e Vehicle_Direction_Indicator

   i. Using Compare to constant blocks, we compare the Vehicle_Turn_Status input with 3 constants RightTurn_RoadSign, LeftTurn_RoadSign and Straight_RoadSign to find which one it is equal to

   ii. The output of each of the relation is then compare with the CameraInput_RoadSign input using an OR operator, this evaluates if the Vehicle Turn calculated in the 1st Requirement and checked with the Road Signs is same as the Road Signs read by the camera 

   iii. We then use a Mux signal block to get the output of all the 3 OR operations and give the output Vehicle_Direction_Indicator

5. We then Create the SLDD with the 4 signals and 6 constants

6. We run the Model Advisor Report for the following tasks and generate the report if there are no Fails and major warnings:

   i. Managing Data Store Managing Blocks

   ii. Modeling Standards for Misra C:2012

   iii. Modeling Standards for ISO 26262

   iv. Modeling Standards for MAB

   v. Modeling Standards for JMAAB

7. After that we generate the C code of the model

Simulink Model:

Main Model

Inside the 1st subsystem Vehicle_Direction_Detection

Inside the 2nd subsystem Requirement_1

Inside the 3rd subsystem Requirement_2

Simulink Data Dictionary:

Model Advisor Report:

C Code Generated:

Result:

1. The direction of the vehicle is displayed in the order of Right, Left and Straight

2. If the value displayed against the direction is 1, then it implies that the vehicle is turning in that specific direction

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.