Project 1 - Development of TFT Cluster Speedmeter Software Component
Aim:
The project aims at designing a simulink model that calculates the speed value which is getting displayed via a cluster unit.
Tasks to do:
- Simulink Model Design
- Sldd creation & linking
- Requirement Tagging & Traceabillity
- Model Advisor JMAAB check
- Using Fixed point toolbox to convert the data types
- Auto code generation
- Simulink design verifier usage for design verification
- Writing functional test cases , developing MIL & SIL harness and doing validation and taking coverage reports
- Next stage is Polyspace Static Code Analysis
- Followingly we have to do test automation using Simulink Test Manager - baseline and back to back testing.
Procedure:
Step1: Open Matlab - new blank simulink model and save it as Project1vandv.slx model
Step2: As per the requirements given, design the cluster system with 4 subsystems that give final vehicle speed value output to the TFT display unit.Also open model explorer and create SLDD file and save it and link it with the model.
Step3: Now the requirements given in the description are turned into excel file with corresponding Id no’s and details are put in another column and saved for proceeding with the next requirement linking process.
Step4: Requirement toolbox usage procedure:
- In apps Open Requirement editor and keep your excel document also ready.
- Follow the given procedures to complete requirement adding & linking:
- Click the new requirement set option in the requirement editor window - give the file name same as model name and save as .slreqx file - now right click on model.slreqx and add 1st requirement index no:1 and similarly add 2nd,3rd,4th by copying the id and details and pasting it in corresponding properties of requirements 1 to 4 - save it.
- For linking: go to model and select 1st block - then come to requirement toolbox and and select 1st index and right click on it and select "link from CalculatingTFTDisplaySpeed subsystem" - now the link gets added to first subsystem - similarly do this for 2nd,3rd and 4th index requirements also [ view show links] - save all - Under Matlab model you will be able to see the .slmx and .slreqx files and then select export - generate report - modify the settings of reports if you want else click ok and get your tagging report ready.
Step5:JMAAB Guidance check
Now goto model advisor and select the project name and JMMAB standards under task and given run selected checks and generate the advisor report. If any failures found, goto the model, redo everything and check again.
Step6: Auto code Generation
Goto model settings - configuration parametsers - set solver as fixed step size 0.01, discrete and code generation is enabled and target is chosen and give build or generate code option. you will get your codes and also generate the reports for .c and .h files.
Step7:SLDV Usage procedure
- Goto apps and open design verifier toolbox and do the below mentioned procedure:
- Select Design Error Detection - open error detection settings - in configuration parameters, set mem array time as :300, under reports - enable it & under error detection you have to choose divide by zero and integer overflow and make solver settings as fixed step size of 0.01 and click on check compatibility - then run the detect design error option.
- Then again in design verifier tool select test generation - select advisor - in configuration parameters, set mem array time as :300, under reports - enable it & under error detection you have to choose divide by zero and integer overflow and make solver settings as fixed step size of 0.01 and click on test coverage enable, as well select MCDC coverage option and apply and click ok and run the advisor and after that advisor run, run the main test generator and generate the reports for error detection and test coverage report as well.
- The test generation process itself will self/auto generate the test cases and MIL environment, so we can get the harness model and coverage report for MIL as well.
Step8: MIL and Coverage Tests using Functional Test cases
As the result of running SLDV we will get ML harness and auto generated test cases so that we can run it again or take the coverage directly from SLDV tool.
Else write the functional test cases in excel and create MIL harness environment using signal builder and upload the test case and run the coverage and get the report.
Step9: SIL and Coverage Tests using Functional Test cases
Make configuration settings and right click on your model and select 's' function creation. You will get build s function - enable it and build - you will get a new harness model which is nothing but your SIL harness. To that add the signal builder and scope and other necessary data conversion blocks and inside signal builder, import the excel test cases and run the coverage for the SIL harness test. generate the report.
Step10: Go to polyspace tool and run the polyspace bug finder and polyphase code prover after making necessary configuration settings and get the reports.
Step11: Open Simulink test manager toolbox and select baseline testing first- open new test file - make necessary requirements linkings and other settings and run the test and get the report. Also again select back to back testing and make necessary settings changes and run the test to get the comparison of MIL vs SIL coverage report via back to back testing.
Simulation model:
The main simulink model of the TFT cluster system is shown below:

The inner level 1 subsystem holds the four main input processing units as shown below

Level 2 subsystems:




Results & Outputs:
The following section shows the various results obtained while doing requirement tagging, SLDV verification, MIL&SIL testing, Test manager analysis.
The image below shows the SLDD file created using model explorer in simulink for the above model:

The image below shows the linking of SLDD file with the main model

The requirements are added and linked to the model using requirement editor as shown below:

This image below shows the requirement traceability in the model

The image below shows running of JMAAB compliance tests & final test results of model advisor:

Auto Code generation using MatLab:

Code sample is shown below:

This below image shows the final - analysis run, results of SLDV - test generation part.

MIL harness model generated out of SLDV :

MIL functional test cases are imported into signal builder and its output are as shown below:

SIL test harness model:

Test sequence subsystem holding signal builder inside SIL system:

SIL coverage run 100% successfully

Scope output for SIL test:

Sample of coverage report of SIL

Functional test cases written in Excel:

SIL signal builders test case plotted in signal builder:

Polysapce Outputs:

Note: Unable to take the report as it gets hanged up while processing fro report generation
Simulink Test Manager outputs: Baseline testings are shown beow:


Simulink Test Manager outputs: Back to Back testings are shown beow:

SIL Model developed via Back to back testing:

Conclusion:
The project to display the speed value in display using cluster unit processing the inputs is thus designed via a simulink model. And the following things were achieved.
- Simulink Model Design
- Sldd creation & linking
- Requirement Tagging & Traceabillity
- Model Advisor JMAAB check
- Auto code genertion
- Simulink design verifier usage for design test verification
- Writing functional test cases , developing MIL & SIL harness and doing validation and taking coverage reports
- Polyspace Static Code Analysis
- Followingly we have done the test automation using Simulink Test Manager - baseline and back to back testing.
Stage by stage images were shown above and the attachments hold the corresponding reports.