- Wiper control system
Develop the Simulink model based on the given descriptions for the below challenges and also create SLDD file and link the same to the model. Perform the complete V and V workflow for the obtained models.
- Wiper control system
Develop Simulink/state flow model for wiper control system based on the given conditions.
Description of Challenge:
- If the density of the rain is low, then wiper rotates with low speed & the output signal should be 100rpm
- If the density of the rain is medium, then wiper rotates with medium speed & the output signal should be 200rpm
- If the density of the rain is high, then wiper rotates with high speed & the output signal should be 500rpm





sldd creation

MAB Advisory checks
.Requirement tagging







JMAAB CHECKS

FIXED POINT TOOL:
















MIL testing






code generation





SIL testing




sldv tool
solver settings




a-Design error detection






b-Test generation mode
















Polyspace Analysis Report/ Output :
Procedure to Analysis the Polyspace Report
Bug Finder :
- Firstly Generated the .C code
- Initially, open the Polyspace in that new project click on start new project.
- The Project Properties dialogue box will open in that give the project name as we saved in the MATLAB,then select the location where it we need to save after that click Next or use the default location.
- Then ,it asks for the Projrct source,click on browserand select the folder where th .c file are generated then optionally we can add the include folder then clock on finish,the polyspace environment will open.
- In the configuraton settings option called Target & compiler select the source code language as c,change the target processor as X86_64.
- In the coding standards & code Metrics in that enable the check MISRA C:2004 also select the calculate the code metrics option
- After that go to bug finder analysis under that select the default one.
- Go to reporting enable the generate report option and ouput formet as PDF or any file we need
- Finally save the polyspace and run the Bug Finder.
Code Prover :
- Befour going to the Code Prover First setup the Configration setting.
- In Configuration go to the Code prover verification and under code prover verification option.
- Click on the Check Behavior and Enable the option (i,e Allow Negative Operand for left shifts).
- and also click on the Consider Non-Finite floats.
- Then After you go to the Precision
- In Precision Select the Precision level -2 and Verification Level is Software Safety Analysis Level-2.
then After Click on Save Botton the Configration setting will be save.
then After We Run the Code Prover.
- And After Click on the Dashboard option and see the Results.

















Back to Back testing
















\











Ques-2
sol-2
2.Vehicle speed calculation for ABS using Wheel Speed sensor
Develop Simulink/state flow model for the vehicle speed calculation unit inside the ABS system for the below conditions.
Description of Challenge:
fl, fr, rl and rr are the wheel speeds of front left, front right, rear left and rear right respectively.













JMAAB CHECKS

Fixed point toolbox















MIL Testing




SIL Testing



Code
* Event Support License -- for demonstration use and event support. Not
* for government, research, commercial, or other organizational use.
* File: vehiclespeedrlrfrrrl.c
* Code generated for Simulink model 'vehiclespeedrlrfrrrl'.
* Simulink Coder version : 9.9 (R2023a) 19-Nov-2022
* C/C++ source code generated on : Sat Jun 17 22:57:29 2023
* Target selection: ert.tlc
* Embedded hardware selection: Intel->x86-64 (Windows64)
* Code generation objectives: Unspecified
* Validation result: Not run
#include "vehiclespeedrlrfrrrl.h"
#include "vehiclespeedrlrfrrrl_private.h"
/* Named constants for Chart: '/Chart' */
#define vehiclespeedrlrfrrrl_IN_state ((uint8_T)1U)
#define vehiclespeedrlrfrrrl_IN_state1 ((uint8_T)2U)
#define vehiclespeedrlrfrrrl_IN_state10 ((uint8_T)3U)
#define vehiclespeedrlrfrrrl_IN_state11 ((uint8_T)4U)
#define vehiclespeedrlrfrrrl_IN_state12 ((uint8_T)5U)
#define vehiclespeedrlrfrrrl_IN_state13 ((uint8_T)6U)
#define vehiclespeedrlrfrrrl_IN_state14 ((uint8_T)7U)
#define vehiclespeedrlrfrrrl_IN_state15 ((uint8_T)8U)
#define vehiclespeedrlrfrrrl_IN_state2 ((uint8_T)9U)
#define vehiclespeedrlrfrrrl_IN_state3 ((uint8_T)10U)
#define vehiclespeedrlrfrrrl_IN_state4 ((uint8_T)11U)
#define vehiclespeedrlrfrrrl_IN_state5 ((uint8_T)12U)
#define vehiclespeedrlrfrrrl_IN_state6 ((uint8_T)13U)
#define vehiclespeedrlrfrrrl_IN_state7 ((uint8_T)14U)
#define vehiclespeedrlrfrrrl_IN_state8 ((uint8_T)15U)
#define vehiclespeedrlrfrrrl_IN_state9 ((uint8_T)16U)
/* Exported data definition */
/* Definition for custom storage class: ExportToFile */
real_T speed; /* '/Chart' */
/* Block states (default storage) */
DW_vehiclespeedrlrfrrrl_T vehiclespeedrlrfrrrl_DW;
static RT_MODEL_vehiclespeedrlrfrrrl_T vehiclespeedrlrfrrrl_M_;
RT_MODEL_vehiclespeedrlrfrrrl_T *const vehiclespeedrlrfrrrl_M =
&vehiclespeedrlrfrrrl_M_;
/* Model step function */
void vehiclespeedrlrfrrrl_step(void)
/* Outputs for Atomic SubSystem: '/Vehicle speed calculation for ABS using Wheel Speed sensor' */
/* Chart: '/Chart' incorporates:
if (vehiclespeedrlrfrrrl_DW.is_active_c1_vehiclespeedrlrfrr == 0U) {
vehiclespeedrlrfrrrl_DW.is_active_c1_vehiclespeedrlrfrr = 1U;
vehiclespeedrlrfrrrl_DW.is_c1_vehiclespeedrlrfrrrl =
vehiclespeedrlrfrrrl_IN_state;
switch (vehiclespeedrlrfrrrl_DW.is_c1_vehiclespeedrlrfrrrl) {
case vehiclespeedrlrfrrrl_IN_state:
tmp = ((front_left > 0.0) && (front_right > 0.0));
tmp_0 = (tmp && (rear_left > 0.0));
if (tmp_0 && (rear_right > 0.0)) {
vehiclespeedrlrfrrrl_DW.is_c1_vehiclespeedrlrfrrrl =
vehiclespeedrlrfrrrl_IN_state1;
speed = (((front_left + front_right) + rear_left) + rear_right) / 4.0;
} else if ((front_left == 0.0) && (front_right > 0.0) && (rear_left > 0.0)
vehiclespeedrlrfrrrl_DW.is_c1_vehiclespeedrlrfrrrl =
vehiclespeedrlrfrrrl_IN_state2;
speed = ((front_right + rear_left) + rear_right) / 3.0;
tmp_1 = ((front_left > 0.0) && (front_right == 0.0) && (rear_left > 0.0));
if (tmp_1 && (rear_right > 0.0)) {
vehiclespeedrlrfrrrl_DW.is_c1_vehiclespeedrlrfrrrl =
vehiclespeedrlrfrrrl_IN_state3;
speed = ((front_left + rear_left) + rear_right) / 3.0;
tmp = (tmp && (rear_left == 0.0));
if (tmp && (rear_right > 0.0)) {
vehiclespeedrlrfrrrl_DW.is_c1_vehiclespeedrlrfrrrl =
vehiclespeedrlrfrrrl_IN_state4;
speed = ((front_left + front_right) + rear_right) / 3.0;
} else if (tmp_0 && (rear_right == 0.0)) {
vehiclespeedrlrfrrrl_DW.is_c1_vehiclespeedrlrfrrrl =
vehiclespeedrlrfrrrl_IN_state5;
speed = ((front_left + front_right) + rear_left) / 3.0;
} else if (tmp && (rear_right == 0.0)) {
vehiclespeedrlrfrrrl_DW.is_c1_vehiclespeedrlrfrrrl =
vehiclespeedrlrfrrrl_IN_state6;
speed = (front_left + front_right) / 2.0;
} else if (tmp_1 && (rear_right == 0.0)) {
vehiclespeedrlrfrrrl_DW.is_c1_vehiclespeedrlrfrrrl =
vehiclespeedrlrfrrrl_IN_state7;
speed = (front_left + rear_left) / 2.0;
} else if ((front_left == 0.0) && (rear_left == 0.0) && (front_right >
0.0) && (rear_right > 0.0)) {
vehiclespeedrlrfrrrl_DW.is_c1_vehiclespeedrlrfrrrl =
vehiclespeedrlrfrrrl_IN_state8;
speed = (front_right + rear_right) / 2.0;
} else if ((front_left == 0.0) && (rear_right == 0.0) && (front_right >
0.0) && (rear_left > 0.0)) {
vehiclespeedrlrfrrrl_DW.is_c1_vehiclespeedrlrfrrrl =
vehiclespeedrlrfrrrl_IN_state9;
speed = (front_right + rear_left) / 2.0;
tmp = ((front_right == 0.0) && (rear_left == 0.0));
if (tmp && (front_left > 0.0) && (rear_right > 0.0)) {
vehiclespeedrlrfrrrl_DW.is_c1_vehiclespeedrlrfrrrl =
vehiclespeedrlrfrrrl_IN_state10;
speed = (front_left + rear_right) / 2.0;
} else if ((front_right == 0.0) && (front_left == 0.0) && (rear_left
> 0.0) && (rear_right > 0.0)) {
vehiclespeedrlrfrrrl_DW.is_c1_vehiclespeedrlrfrrrl =
vehiclespeedrlrfrrrl_IN_state11;
speed = (rear_left + rear_right) / 2.0;
} else if (tmp && (rear_right == 0.0) && (front_left > 0.0)) {
vehiclespeedrlrfrrrl_DW.is_c1_vehiclespeedrlrfrrrl =
vehiclespeedrlrfrrrl_IN_state15;
} else if ((front_right > 0.0) && (front_left == 0.0) && (rear_left ==
0.0) && (rear_right == 0.0)) {
vehiclespeedrlrfrrrl_DW.is_c1_vehiclespeedrlrfrrrl =
vehiclespeedrlrfrrrl_IN_state14;
} else if ((rear_left > 0.0) && (front_left == 0.0) && (front_right ==
0.0) && (rear_right == 0.0)) {
vehiclespeedrlrfrrrl_DW.is_c1_vehiclespeedrlrfrrrl =
vehiclespeedrlrfrrrl_IN_state13;
} else if ((rear_right > 0.0) && (front_right == 0.0) && (rear_left ==
0.0) && (front_left == 0.0)) {
vehiclespeedrlrfrrrl_DW.is_c1_vehiclespeedrlrfrrrl =
vehiclespeedrlrfrrrl_IN_state12;
case vehiclespeedrlrfrrrl_IN_state1:
case vehiclespeedrlrfrrrl_IN_state10:
case vehiclespeedrlrfrrrl_IN_state11:
case vehiclespeedrlrfrrrl_IN_state12:
case vehiclespeedrlrfrrrl_IN_state13:
case vehiclespeedrlrfrrrl_IN_state14:
case vehiclespeedrlrfrrrl_IN_state15:
case vehiclespeedrlrfrrrl_IN_state2:
case vehiclespeedrlrfrrrl_IN_state3:
case vehiclespeedrlrfrrrl_IN_state4:
case vehiclespeedrlrfrrrl_IN_state5:
case vehiclespeedrlrfrrrl_IN_state7:
case vehiclespeedrlrfrrrl_IN_state8:
case vehiclespeedrlrfrrrl_IN_state6:
speed = (front_left + front_right) / 2.0;
/* End of Chart: '/Chart' */
/* End of Outputs for SubSystem: '/Vehicle speed calculation for ABS using Wheel Speed sensor' */
/* Model initialize function */
void vehiclespeedrlrfrrrl_initialize(void)
/* (no initialization code required) */
/* Model terminate function */
void vehiclespeedrlrfrrrl_terminate(void)
/* (no terminate code required) */
* File trailer for generated code.
*/
sldv
Test generation mode
Baseline testing












B2B Testing


]










'

'

