Challenge

Project 1 (Mini Project on Vehicle Direction Detection

Aim :

  • Mini Project on Vehicle Direction Detection

Objective :

  1. Development of MATLAB Simulink model as per requirement.
  2. Tag the requirements to the Simulink model; tagging requirement 1 & requirement 2 to their corresponding subsystems is fine.
  3. MBD compliant changes, Data Dictionary creation & code generation is added advantage, and that is not the scope of this project.
  4. If choosing code generation, Storage class for Input signals: ImportedExtern; Storage class for Output signal: Export to File; Storage class for local signals: localizable; Storage class for calibration signals: Const.
  5. Choose sample time for all signals as 0.01s

Vehicle Direction Determination Simulink model :

This is the topmost system of the Vehicle determination model. The model takes two inputs SteeringWheel_YawDegreeInput  and CameraInput_RoadSign and gives the output as Vehicle_Direction_Indicator.

we resolve the Simulink signal at the connected line for two input signals and propagated the signal at the output of a model 

 

next, we created the two subsystems for two requirements. Then created input and output ports for the two subsystems.

for the first requirement, SteeringWheel_YawDegreeInput is input and Vehicle_Turn_Status is output. Then  for requirement 2

Vehicle_Turn_Status and CameraInput_RoadSign are the two inputs and Vehicle_Direction_Indicator is the output.

Then we resolve all signals for input and output connecting lines. also propagated the signals.

first requirement:

In this system vehicle turning status, logic is created using the switch blocks.SteeringWheel_YawDegreeInput is in degrees. if SteeringWheel_YawDegreeInput is greater than 30 then Vehicle_Turn_Status is Right_Turn_AngularLimit or if SteeringWheel_YawDegreeInput is not equal to zero and lesser than 30 then Left_Turn_AngularLimit is Vehicle_Turn_Status. Otherwise, Straight_Drive_Steering_Angle is Vehicle_Turn_Status

Second Requirement:

Here for the second two-input are there one is vehicle turn status and the other camera road sign. Using the compare to constant block first RightTurn road sign, LeftTurn road sign compared with vehicle status input if both are equal return true.

also, all those compared signal is connected to the OR block with an actual camera road sign if one of them is true then it returns one other return false or zero as vehicle direction. Then all those signals are connected to the MUX block. The Mux block combines inputs with the same data type and complexity into a vector output as Vehicle_Direction_Indicator value which is 1 or 0.

Creating the Simulink Data Dictionary for the model.

Then we created the sldd file named "Vehicle_Direction_Detection_Data"

Created the data of signals, calibrated values, local signals.

SteeringWheel_YawDegreeInput signal with Data type int16, Dimensions as 1, min -180 max 180 in unit degrees with the sample time as 0.01 sec.

CameraInput_RoadSign is an input signal with the boolean data type. The input storage class is importExtern.

Then Vehicle_Turn_Status as Localize storage class with int 16 data type.

Then for calibration signal parameter is added with int16 data types, initial value, min -180 max 180 value, unit degrees with sample time 0.01 for all calibration value storage class is constant.

Vehicle_Direction_Indicator is output signal with boolean data type for that ExportToFile is storage class

tagging the two requirements to the word file 

setting that required for the generation of C code :

solver setting 

code generation setting

 Results :

signs for display are in the way Right turn, left turn, straight respectively 

Right turn If Vehicle_Direction_Indicator detects (1,0,0) value.

Left turn If Vehicle_Direction_Indicator detects (0,1,0) value.

Straight If Vehicle_Direction_Indicator detects (0,0,1) value.

Here in result Vehicle_Direction_Indicator shows (0,0,1) value means straight turn

Conclusion:

Advanced Driving Assistance System has a lot of features and one of the features is Vehicle Direction Detection.

Identifying the direction of the vehicle is one of the important & diverse features in Autonomous driving & Advanced Driver Assistance Features

we model this feature using Simulink.

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.