Challenge

Project 1 (Mini Project on Vehicle Direction Detection

What is ADAS?

Almost all vehicle accidents are caused by human error, which can be avoided with Advanced Driver Assistance Systems (ADAS). The role of ADAS is to prevent deaths and injuries by reducing the number of car accidents and the serious impact of those that cannot be avoided.

Essential safety-critical ADAS applications include:

  • Pedestrian detection/avoidance
  • Lane departure warning/correction
  • Traffic sign recognition
  • Automatic emergency braking
  • Blind spot detection

These lifesaving systems are key to ensuring the success of ADAS applications, incorporating the latest interface standards and running multiple vision-based algorithms to support real-time multimedia, vision co-processing, and sensor fusion subsystems.

How does ADAS work?

Automobiles are the foundation of the next generation of mobile-connected devices, with rapid advances being made in autonomous vehicles. Autonomous application solutions are partitioned into various chips, called System on chip. These chips connect sensors to actuators through interfaces and high-performance ECUs (electronic controller units).

Self-driving cars use a variety of these applications and technologies to gain 360-degree vision, both near (in the vehicle’s immediate vicinity) and far. That means hardware designs are using more advanced process nodes to meet ever-higher performance targets while simultaneously reducing demands on power and footprint.

Some of the most common ADAS applications are:

1. Adaptive Cruise Control

Adaptive cruise control (ACC) is particularly helpful on the highway, where drivers can find it difficult to monitor their speed and other cars over a long period of time. Advanced cruise control can automatically accelerate, slow down, and at times stop the vehicle, depending on the actions other objects in the immediate area.

2. Glare-Free High Beam and Pixel Light

Glare-free high beam and pixel light uses sensors to adjust to darkness and the vehicle’s surroundings without disturbing oncoming traffic. This new headlight application detects the lights of other vehicles and redirects the vehicle’s lights away to prevent other road users from being temporarily blinded.

3. Adaptive Light Control

Adaptive light control adapts the vehicle’s headlights to external lighting conditions. It changes the strength, direction, and rotation of the headlights depending on the vehicle’s environment and darkness.

4. Automatic Parking

Automatic parking helps inform drivers of blind spots so they know when to turn the steering wheel and stop. Vehicles equipped with rearview cameras have a better view of their surroundings than traditional side mirrors. Some systems can even complete parking automatically without the driver’s help by combining the input of multiple sensors.

5. Autonomous Valet Parking

Autonomous valet parking is a new technology that works via vehicle sensor meshing, 5G network communication, with cloud services that manage autonomous vehicles in parking areas. The vehicles sensors provide the vehicle with information about where it is, where it needs to go, and how to get there safely. All this information is methodically evaluated and used to perform drive acceleration, braking, and steering until the vehicle is safely parked.

6. Navigation System

Car navigation systems provide on-screen instructions and voice prompts to help drivers follow a route while concentrating on the road. Some navigation systems can display exact traffic data and, if necessary, plan a new route to avoid traffic jams. Advanced systems may even offer Heads Up Displays (HuD) to reduce driver distraction.

Level of Automation
Vehicle Direction Detection can be done alongside the GPS system in order to optimize the range direction.
Objective
1. To develop the Matlab Simulink Model
2. Requirement to be tagged to the Simulink model with requirement tagger.
3. Changing the MBD Complaint along with code generation and data dictionary.
4. Samole time 0.01s
First Requirement
a. Steering wheel input is considered as yaw rate is taken input to the system.
b. The input is compared to the three angular output, namely left turn , right turn and round turn.
c. Calibaration values- left_turn angular limit, Right_turn angular limit, Round_turn limit.
d. Switch is used to compare and develop the requirement.

Requirement – 2:

  • 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).

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

-

Design of Matlab model
This is the main model subsytem which have two inputs. Steeringwheel_Yawdegreeinput and camera_inputroadsign which is taken as Vehicle Direction Detection subsystem.
The Vehicle direction detection Subsystem consist of two different subsystem namely Vehicle turn status subsystem and Vehicle direction Indicator subsystem.
Requirement 1
Vehicle turn status subsystem
Steering wheel input as yaw rate is taken as input to the system.
This input is compared with three angular values Left turn angular limit , Right turn Angular limit and Straight drive Angular limit.
Switch is used to compare and develop the requirement and output is local signal.
Requirement 2
Input taken here is a local signal from the requirement 1 ie the signal from the Vehicle turn status.
Signal from the Vehicle turn status is compared with calibration values of left turn , right turn and straight road sign.
If all of them found equal then output is compared with the camera input road sign.
2. Requirement Tagging
General subsystem
Deloping SLDD
3. Signal Resolution
5. Model Update
Model can be updated by clicking CTRLD
6. Simulation
Model is simulated for checking errors and warnings
7. Configuartion Parameters
8. Model Advisory Report
Model Advisory Report
Tracebility Report
9. Code Generation
Code generation can bedone by clicking Emmbeded code option from Toolbar
/*
 * File: project_Vehicle_Direction_Detection.c
 *
 * Code generated for Simulink model 'project_Vehicle_Direction_Detection'.
 *
 * Model version                  : 1.2
 * Simulink Coder version         : 9.5 (R2021a) 14-Nov-2020
 * C/C++ source code generated on : Tue Dec  7 11:59:39 2021
 *
 * Target selection: ert.tlc
 * Embedded hardware selection: Intel->x86-64 (Windows64)
 * Code generation objectives: Unspecified
 * Validation result: Not run
 */

#include "project_Vehicle_Direction_Detection.h"
#include "project_Vehicle_Direction_Detection_private.h"

/* Exported data definition */

/* Definition for custom storage class: ExportToFile */
boolean_T Vehicledirection_indicator;  /* '/Logical Operator3' */

/* Real-time model */
static RT_MODEL_project_Vehicle_Dire_T project_Vehicle_Direction_De_M_;
RT_MODEL_project_Vehicle_Dire_T *const project_Vehicle_Direction_De_M =
  &project_Vehicle_Direction_De_M_;

/* Model step function */
void project_Vehicle_Direction_Detection_step(void)
{
  int16_T rtb_Switch;

  /* Switch: '/Switch' incorporates:
   *  Constant: '/Leftturn_Angularlimit'
   *  Constant: '/Rightturn_Angularlimit'
   *  Inport: '/Steeringwheel_Yawdegreeinput'
   *  Switch: '/Switch1'
   */
  if (Steeringwheel_Yawdegreeinput > 25) {
    rtb_Switch = 30;
  } else if (Steeringwheel_Yawdegreeinput > 0) {
    /* Switch: '/Switch1' incorporates:
     *  Constant: '/Straightdrive_Steeringangle'
     */
    rtb_Switch = 0;
  } else {
    rtb_Switch = 120;
  }

  /* End of Switch: '/Switch' */

  /* Logic: '/Logical Operator3' incorporates:
   *  Constant: '/Leftturn_roadsign'
   *  Constant: '/Rightturn_roadsign'
   *  Inport: '/camerainput_roadsign'
   *  Logic: '/Logical Operator'
   *  Logic: '/Logical Operator2'
   *  RelationalOperator: '/Equal'
   *  RelationalOperator: '/Equal2'
   */
  Vehicledirection_indicator = ((camerainput_roadsign && (rtb_Switch == 30)) ||
    (camerainput_roadsign && (rtb_Switch == 0)));
}

/* Model initialize function */
void project_Vehicle_Direction_Detection_initialize(void)
{
  /* (no initialization code required) */
}

/* Model terminate function */
void project_Vehicle_Direction_Detection_terminate(void)
{
  /* (no terminate code required) */
}

/*
 * File trailer for generated code.
 *
 * [EOF]
 */

Conclusion
1.The Vehicle Direction Detection has been Modelled acccording to the requiremnet.
2.All the signal has been modelled in simulink data dictionary.
3.All input and output signal are resolved and propogated.
4.Model is updated and checked for static errors.
5.Model advisor report has also been generated.
6.Lastly code generation has also been performed.
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.