All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
Vehicle Direction Determination : Aim of the Project: Develop a Simulink model (ADAS Feature) for given requirement Vehicle direction determination as Tag the requirements to the Simulink model; tagging requirement 1 & requirement 2 to their corresponding subsystems. Create a Simulink Data Dictionary(SLDD)…
Chandrakumar ADEPU
updated on 29 Sep 2022
Vehicle Direction Determination :
Aim of the Project:
Solution :
As per the given Requirement - 1:
REQUIREMENT MODEL-1 :
Description of Requirement-1 :
As per the Requirement – 2:
REQUIREMENT - 2 MODEL DESIGN :
Description of Requirement Model-2 :
Construction_of_Vehicle_direction_detection_Model_Design :
Vehicle_direction_detection_Subsystem :
Requirements were linked to subsystem 1 and subsystem 2:
Screenshot-1 :
Sceenshot-2 :
Given Parameters 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 |
- |
- |
Simulink data dictionary from given Signal and calibration values:
SLDD Creation:
Solver settings done per the requirements : Sample time for all signals as 0.01s was chosen
Model Advisor :
Model advisor as a tool is available in in core Simulink blockset that automatically enables the user to check for common modelling mistakes which we missed out to notice during model development
The Model Advisor can analyze the model throughly or a sub set of model upon selecting model advisor option as below, developer can choose which version we would like to test.
Model Advisory Report :
C Code Generation : Code Generation process will be executed by following steps. We have already done the settings required in the Configuration Settings shown below. Now, we simply have to go to Apps section and click on Embedded Coder. Further, we click on Generate Code and we can a window pop-up with our Code. Simulink will create .c and .h files in our model folder, which means our code is successfully generated.
Code Generation Report:
Code generated:
File: Week_11_data.c
1 /*
2 * Week_11_data.c
3 *
4 * Code generation for model "Week_11".
5 *
6 * Model version : 1.8
7 * Simulink Coder version : 9.1 (R2019a) 23-Nov-2018
8 * C source code generated on : Thu Sep 29 19:39:45 2022
9 *
10 * Target selection: grt.tlc
11 * Note: GRT includes extra infrastructure and instrumentation for prototyping
12 * Embedded hardware selection: Intel->x86-64 (Windows64)
13 * Code generation objectives: Unspecified
14 * Validation result: Not run
15 */
16
17 #include "Week_11.h"
18 #include "Week_11_private.h"
19
20 /* Block parameters (default storage) */
21 P_Week_11_T Week_11_P = {
22 /* Variable: LeftTurn_RoadSign
23 * Referenced by: '<S5>/Constant'
24 */
25 -120,
26
27 /* Variable: Left_Turn_AngularLimit
28 * Referenced by: '<S3>/left_Turn_AngulatLimit'
29 */
30 -120,
31
32 /* Variable: RightTurn_RoadSign
33 * Referenced by: '<S4>/Constant'
34 */
35 30,
36
37 /* Variable: Right_Turn_AngularLimit
38 * Referenced by: '<S3>/Right_Turn_AngulatLimit'
39 */
40 30,
41
42 /* Variable: Straight_Drive_Steering_Angle
43 * Referenced by: '<S3>/Straight_Drive_Steering_Angle'
44 */
45 0,
46
47 /* Variable: Straight_RoadSign
48 * Referenced by: '<S6>/Constant'
49 */
50 0
51 };
52
Conclusion:
Successfully created the model from the given requirement data and generated the code and advisor report.
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Week - 4
Implement control logic of a “washing machine” using Stateflow as per given sequence: If the power supply is available, the system gets activated If the Water supply is not available, stop the process & indicate through LED Soaking time should be 200s followed by Washing time of 100s. Then rinsing…
29 Sep 2023 07:17 AM IST
Project 2 - V&V SW Analysis II
Q:- 1. Perform Static Code Review Analysis for “C:\**\LDRA_workarea\Examples\C_Testbed_examples\Testrain\Testrain.c” Generate Code review report and upload them. Ans: Aim: To gernetate the code review report and upload them. Steps: Steps for White box testing:- Source ->…
18 Aug 2023 01:16 PM IST
Project 1 - V&V SW Analysis - I
Q:- Write a Test plan to test features of a new mobile phone (Blackbox test) that needs to be implemented based on the following requirements. (The product is still under development stage and is yet to be UA (User Acceptance ) tested…
12 Jul 2023 03:17 AM IST
Project 2 - Measuring distance of an object using ultrasonic sensor (HC-SR04)
PROJECT-2: Aim: To write a program to measure the distance using ultasonic sensot Schematic Diagram: Steps of Programming ATmega16 microcontroller needs to transmit at least 10 us trigger pulse to the HC-SR04 Trig Pin. After getting a trigger pulse, HC-SR04 automatically sends eight 40 kHz sound waves and the microcontroller…
24 Jun 2023 09:50 AM IST
Related Courses
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.