Project 1 (Mini Project on Vehicle Direction Detection
Ans:'
OBSERVATION::
Here seen the Question of this mini-project what they are in Mini Project on Vehicle Direction Detection
Mini Project - Vehicle Direction Determination General Overview:Objective of Mini Project:
in this project over view what they ask and given precautions rules should be follow
in this they have given full information of wheel steering ,signals calibrations we should take precautions as per guidelines and as given requirements 1,2,& 3 should be careful of each requirements as doing project
EXPLAINATION ::
first creating sldd File:
First go to matlab and open simulink next go to blank model
1.To create a sldd file after that go to model explorer and click the link to the data dictionary select see the below figure
1 is modeling tab there is a slide bar to open and click link to data dictionary

there is open a dialogue box see the below in this it is already created then go to browse setting , or create a new one then select new and create a SLDD File
create a name Vehicle_direction_sldd file and save
inthis project we have create a path /Add to path because we have save the files in order to a folder to files in one order way .
See the below we creating A SLDD file after saving like this:

CREATING SLDD FILE:
SEE the below figuare we can understood
1. here create the Signals and calibration of data sets
2. create as a manual type add signals one by one here
here given in INPUT signal given a chart import extern
OUTPUT signal is export extern
calibration = Add constant option in tool bar (simulink parameter) here and give the values in this chart as well other properties

in this given signal and calibration chart 4 signals and 6 constant in SlDD file
NEXT SAVE THE SLDD FILE SHOWN IN BELOW FIGURE

NEXT WE HAVE GO TO MODEL REQUIREMENTS 1,2&3
here first go to file and add subsystems and add another two subsystems First subsystem is requirement 1 purposes and second one is requirement 2 purposes
see the subsystem design :
Here see the main subsystem for vehicle direction

here see the inner they have two subsystems is there for requirement 1 and 2nd subsystem is used for requirement2 see the below figure we can easily understood
here adding one inport is added to requirement and another in port is added to another requirement2 block .And first requirement1 block output to added second requirement subsystem 2 finally one output port of these two subsystem requirements blocks:

here given signal namees and port names should copy and paste these names because we cant required errors and those no missing any signal names
in this we have a required to show the block of subsystem for requirement 1
see here we shown subsystem of requirement1

Explaination:
here switch condition NAB guidelines because we are given to threshold is notequal to zero u2~=0 because we are going to model advisior check

there is showing an error thats y im using switch condition threshold is not equal to zero
here your giving any positive value it goes to 1 True . it goes to output. If given value its equal to zero its go to false it goes to another switch
here comparision of logical switch compare to conditionsand given value steeringwheel_yawDegree input is comparision conditions here it is the value irst condition is greater than zero '>0' it goes to switch value 1 it goes to output not equal to zero its goes and again switch operation will be there these condition apply as ' ==0' its go to
+1 degree to 180 degree vehicle is go to right turn angular limit
its`~>0 it will be false switch is connected to another switch here
condition is ==0 the straight _Drive_steeribng_angle its go to switch and its applicable
if here these two condition is false its go to third condition Left_Turn_Angularlimit send to the output
Here REQUIREMENT2:
first Requirement1 output is connected to Requirement 2

here the circuit shows vehicle turn status again here three component values they are 1.Rightturn_Road sign,2.Leftturn_Road sign,and3.Straight_Roadsign
here the vehicle turn right the value =30
its left turn its value=-120
and=0 its go to straight condition
here again relational operates =1 and it goes And gate camera input also 1 its go to shows to right
2.here similarly other two sign roads also straight and left condition
if camera input is =0 all three signals =0 value camperainput is on is to go to output
here we using the block mux its shows output here
and add signal input block is used inbetween mux and output because
signal conversion : here it is ussed to all signals output is copy and same output shows in output
shown in below figure

when signal conversion is not their in between them we get an error while run the circuit as shown in below
see the below the use of signal converter:

With out signal converter when we run the simulation of the circuit its shows an error
shown in below without a signal converter:

After run the simulation we dont get any errors this is the first condition after go to modelling tab and go to model advisor select

After open a new dialogue box shown in figure

in this model advisor has two categories my project and my task

here we use products it can be so multiple options like codes these is using for code generating which option you want select that one
here we useans select the by task we are checking of all types of iso 's here mab guidelines under task
See the below figure::
here see the below dialogue box see the we have underline

in this we select the modeling standard of MAB see the right side we have pass fail, warnings, not run conditions in this condition we dont have any failed conditions
and modifi erros and warning as well as rectifing warnings and finally it will be maximum all well correct errors here finally go to run select checks it can be shown the rectifieng warning after you check the files and run this condition
totally they are 144 checks done on the model
it is on model settings are block settings it is any in correct its shows warning condition or error message and failed condition
here go to model advisior checks
here we can rectify and eliminate maximum no of warnings
here select the modeling standards of MAB block tick and run selected clicks

here to click continue it takes some time because there are 144 checks can be checked

here checking our complete module according to guidelines
here checking the condition there is an errors in block conversation block names etc

and folders also specific characters numbers its also shown error under naming conventions
HOW TO CHECK ERRORS :
here below shown figuare there is underline see the left side there is a block showing error symbol it is in yellow colour in that we open that ewe have see the right window there is showin errors in blue colour underlined see the we underline we see the read carefully and go to blue colour warning and click there it can be take direct to design your circuit block and shown an yellow colour and rectify the option after that you will select the runthis check it is be disappear in that block lists
here see the model settings its go to direct setting parameter block also


Finally maximum no of reducing errors

Finally after run this checks we go to generate the report

here generate the report were is the folder in current directory save in path way
here we generatee report in HTML in saving MAAB_REPORT
the report is shown in below figure

write the test cases in below
take a excel give the input to you design a circuit give the test condistion and make a excel report and save it Test_signals.slxs

here we use any signal but i preffered step wave is input to test case
we gives value in step wave form
1st case : 0-1sec time positive value=30 , camera input on its turn on right
2nd case: here we give time 1-2 sec, negative value is=-120 in this camera input =1 its turn on and its turn to left
in 3rd case: we given time 2-3 sec,value=0 its turn on camera=1 its go to straight
4th case: we give time 3-4 sec, positive 50 camera input sign is =0,its turn off the signal mode
TEST HARNESS::
here dont change in main block system
here create a test harness go to main block and right click to the sub system see the below figure to understand easily

there is another block is open input source using signal builder in this option

in this block we go to advance settings in this

in this the advantage setting to verification mode is in normal it is used a mill test harness is created
In this there is open a new window be like this shown in below Figure

here we use the signal builder go to signal builder and double click and import input test cases excel sheet to signal builder

After import test cases of excel file in to a Signal builder here select all cases shown in below figure import all test cases we have done

see the below after importing test keys in excel the signal input of a signal builder has two inputs three outputs
here streeing wheel angle is 0 to 1 second the graph shows 30 camera is on 1-0-0 ( Right turn)
2. here 1-2 second the graph shows steering value is negative ,camera input is on it goes to left turn (0-1-0)
3. here 2-3 seconds the graph shows steering value is zero(0) ,camera input is on (1) it goes straight (0-0-1)
4. here 3-4 seconds the graph shows steering value is 50 camera input 0 it becames(0-0-0)
these are 4 test keys in the excel
here the circuit we are using Mux block because we see the actual output and excepted outputs we are given the mux in to three connections because
1. left turn
2.right turn
and 3.straight
see the below figure given the three numper of outputs

here see the below circuit to use sum for using actual and add scope using three sum blocks
here 1 sum block is used to left turn and another
second sum block is used to right turn and
third sum block is used to straigh connections in these finally connected to scope for output

here we use the sum because ecxcepted output- actuall output
in above there is a another scope is used because to see the actuall output
SCopE input and output
NOTE: here shownn below Excepted output ,actual output As shown similar in scope

FINAL CIRCUIT OF MILL TEST HARNESS ;:
shown in below circuit

After mill test harness go to main circuit block
seen in below circuit after finish of mill test harness it will be save as like this

CELL TEST HARNESS:;
first we go to change subsystem in to Automatic subsystem
After that subsystem right click and Go to block parameter sub system shown in below

next there is aanother dialogue box is open and select option next go to Apply and ok here change the sample time 0.01 or -1

After go to subsystem again right click go to test harness and select create vehicle direction

here same as previously doing same process again here the bassic property we use inport as a signal builder and go to

go to advance property here see the highlighted circle here verification mode: normal mode changes in software in the loop (SIL)

next see the programming file in a new window

After containing generating c-code the file is generating like this inn your current path folder is saved

After software loop system it is masked the subsystem shown in below figure represents

In this go to subsystem under mask see the below circuit you can understand easily there is a red mark under line it is already done software in loop generating c code

same as previously we import file test keys of excel sheet in to a signal builder select all signals see below

After that see the below diagram we have mux block and sum block and 2 scopes look like this same
here also this is same condtion excepted value and outpul value is similar are not shown in scopes see the below circuit

same output given exceptep value is similarly as output values by see in scope 1 and scope 2 b shown in below
here the circuit run in 4 seconds finally output in software Test in loop

Go to our main block system here we see as do right 1. Mill harness system and 2. software test in the loop seen in a main block of subsystem

EMBEDDED C CODER:
here we cannot do any tests here its a direct option to convert in to a code see below direction option we can see in the below figure

after than we see in a ribbon bar c-code option then click to confirm to build

previously we build a c-code and now only we will show the direct process there is no changes in code generation similarly in the same way files are also save name in same current folder path see the below figuare

Afterr building and generating c-code we have a view option is there see the code configurations after select the view option

TAGGING REQUIREMENTS:
here we copy the question in to a MS-word file and save in amini project file in that we use a requirement tagging in a subsystem block
here open Ms Word file open scroll down to Requirement 1 Select and minimize ms word file go to main block system go to requirement 1 give to right click go to requirements and select link to selection word see the below figure

1. select requirement be like this

After that give right click and select and tagging like this after tagging requirements we will confirmation we can see the tagging or not see this and check the which one we tagging

And see the requirement 2 also tagging another subsystem requirement 2 also like this we see the above figure there is showing requirement is taging we open and click there its direct to go ms word file see that option were we requirement tagging