Challenge

Project 1 (Mini Project on Vehicle Direction Detection

AIM OF THE PROJECT:

To identify the direction of the vehicle, by using the camera input and stores in the memory and gives signal to driver to identify whether is he going in correct direction or not.

DESCRIPTION:

In this project the direction of vehicle to be identified by using camera. firstly the camera reads the road sign and by the movement of steering angle it calculates and throws the output whether the driver is going in correct 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.

here are the some requirements for the development of the project,

Objective of Mini Project:

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 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

Blocks used:

Blocks used to create a model are

Input Blocks: To provide the input signals

Output Blocks: To send the output signals

Constant Blocks: To define the calibration values

Logical operator Blocks: OR blocks are used to compare and the road signs with camera input and to get the Boolean output.

Switch Blocks: To compare the input with the calibration values.

Mux Block: To combine the signals

Display Block: To display the results

STEP 1 :

Open a blank simulink model and save it with the project.

Now create a simulink data dictionary and save it with the sldd file.

now enter all the requirements in the sldd file.


Link the file to the simulink model. now sldd file is linked to a model. In an blank model open the subsystem from the simulink library and name it as vehicle direction detection. and given two inputs and one output. The model is shown below.


STEP 2:

In this step open the subsystem and create two subsystems which are for the requirement 1 and requirement 2. and connect the steering wheel angle to requirement 1 sub system and camera input and output from req1 is connected to the requirement 2.

The model is shown below.


STEP 3:

In this the the sub system requirement 1 is solved based on the requirements

Steering wheel input as yaw rate (Signal name: SteeringWheel_YawDegreeInput) is the input for this system.

This is compared against 3 angular values, one each for left turn, right turn & straight drive (Calibration Values: Right_Turn_AngularLimit, Left_Turn_AngularLimit, Straight_Drive_Steering_Angle) to say which specific direction the steering wheel is turning towards.

Step 4:

The output from req1 is given to req2 and the camera input is given and the output is obtained. Here the signal is compared the steering angle is compared with the camera angle and the final output is given.

Keep this requirement as a separate subsystem. Inputs to this requirement are local signal from requirement 1 (Signal Name: Vehicle_Turn_Status) & an input signal from camera (Signal Name: CameraInput_RoadSign), which confirms the occurrence of a road sign.

Signal Vehicle_Turn_Status is compared against calibration values (Calibration Values: RightTurn_RoadSign, LeftTurn_RoadSign, Straight_RoadSign), if each of them is found equal, then each of the three corresponding output is compared against the camera input signal,

Using a logical operator block, only one among them is finally given as output signal (Signal Name: Vehicle_Direction_Indicator).


The system is now tagged to requirements and the sldd file is attached.

PROCEDURE:

Save the model before going to run.

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 indication.

After comparison 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.

RESULT:

The result is obtained below after running the program, here are some images of the result.

The output is based on boolean type so the (1, 0, 0) so the right turn of vehicle.


The output is based on boolean type so the (1, 0, 1) so the left turn of vehicle.


The output is based on boolean type so the (0, 0, 1) so the straight drive of vehicle.


The above is the direction of the vehicle obtained by the requirements given in the question the result is obtained based on the assumptions.

CONCLUSION:

The vehicle direction detection is the advanced feature of the ADAS technology and by the following data dictionary and the requirements we have created the vehicle direction detection model and given some inputs and the output is obtained after the running of the model there are some screenshots are attached and simulink model, simulink data dictionary are also attached below.

therefore, below is the simulink model of vehicle direction detection based on the given required data.

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.