Project 1 (Mini Project on Vehicle Direction Detection
Aim:
To create the Vehicle Direction Determination model according to the given requirements.
Signals & Calibration Data List:
|
Signal / Calibration Name |
Signal Type |
Data Type |
Dimension |
Min |
Max |
Initial Value |
Units |
|
SteeringWheel_YawDegreeInput |
Input |
Int16 |
1 |
-180 |
180 |
- |
Deg |
|
CameraInput_RoadSign |
Input |
Boolean |
1 |
0 |
1 |
- |
- |
|
Vehicle_Turn_Status |
Local |
Int16 |
1 |
-180 |
180 |
- |
Deg |
|
Right_Turn_AngularLimit |
Calibration |
Int16 |
[1 1] |
-180 |
180 |
30 |
Deg |
|
Left_Turn_AngularLimit |
Calibration |
Int16 |
[1 1] |
-180 |
180 |
-120 |
Deg |
|
Straight_Drive_Steering_Angle |
Calibration |
Int16 |
[1 1] |
-180 |
180 |
0 |
Deg |
|
RightTurn_RoadSign |
Calibration |
Int16 |
[1 1] |
-180 |
180 |
30 |
|
|
LeftTurn_RoadSign |
Calibration |
Int16 |
[1 1] |
-180 |
180 |
-120 |
|
|
Straight_RoadSign |
Calibration |
Int16 |
[1 1] |
-180 |
180 |
0 |
|
|
Vehicle_Direction_Indicator |
Output |
Boolean |
1 |
0 |
1 |
- |
- |
Objective:
- Development of MATLAB Simulink model as per requirement.
- Tag the requirements to the Simulink model; tagging requirement 1 & requirement 2 to their corresponding subsystems is fine.
- MBD compliant changes, Data Dictionary creation & code generation is added advantage, and that is not the scope of this project.
- 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.
- Choose sample time for all signals as 0.01s
Theory:
Identifying the direction of the vehicle is one of the important & diverse features in Autonomous driving & Advanced Driver Assistance Features. This particular sub-feature of identifying the direction of the vehicle is basically identifying the direction the vehicle is taking based on the camera input.
The camera reads the road signs & stores them into its memory with unique values for a left turn, right turn & straight drive. Depending on the direction it is taking, the final indication is given to the driver – as an indication if he is driving in the recommended direction or not.
Camera reads the road signs & stores into its memory with unique values for left turn, right turn & straight drive. Depending on the direction it is taking, final indication is given to the driver – as an indication if he is driving in the recommended direction or not.
We development simulink model:

The inputs are 'steering wheel_yawdegreeinput'-camerainput_roadside'
Vehicle direction Subsystem:

The Requirement 1:
In the Requirement 1 subsystem the steering wheel yaw degree as a input to the subsystem and this values one each for a left turn ,right turn ,straight in drive .
The input signal steering wheel is compared against three angular value using the relational operator one each for left turn,right turn& straight drive
The signal vehicle-turn -status ,obtained at the output of the first switch will be a calibration angular value /right turn angular limit or lsft turn angular limt,if none of the condition gte satisfied zero is passed as the output from the last switch the signal
Requirement 2:
In the Requirement 2 subsystem the local signal vehicle status fed from the R1 subsystem is taken as input and is compared against calibration value / right turn road sign ,left turn -roadsign using the realtional operator
The boolean value obtained at the output of the relational operator is compared against a boolean input signal from the camera signal which confirms the occurrence of aroad signal operator
The subsystem to its requirement in word document is simulink data dictionary file #SLDD:
An creat the SLDD file ,to created the contains input output signal and calibration an parameters used in the model. file of SLDD
The signal calibration parameters is show is the top,

The output is model adviser,
An make the Embedded coder

An finally we billed the code:



The code is generated successfully.
The outputs are:
vehicle turn right side:

vehicle turn left side:

vehicle turn straight drive:

Result:
The vehicle direction detection is completed and the outputs are shown in the figure.