Challenge

Project 1 - Wiper control system and Vehicle speed calculation for ABS using Wheel Speed sensor

Question

  1. Develop Simulink/state flow modules for wiper control system based on the given conditions.

Description of Challenge:

  1. If the density of the rain is low, then wiper rotates with low speed, the output signal should be 100rpm
  2. If the density of the rain is medium, then wiper rotates with low speed, the output signal should be 200rpm
  3. If the density of the rain is high, then wiper rotates with low speed, the output signal should be 500rpm

Note: Rain density input comes from the external sensor, for the simulation purpose constant block with knob can be taken.

2. Develop Simulink/state flow model for vehicle speed calculation unit inside the ABS system using given conditions.

Description of Challenge: fl, fr, rl and rr are the wheel speeds of front left, front right, rear left and rear right respectively.

Your Answers

Q

1. Simulink/state flow modules for the wiper control system

Aim:

To develop a Simulink/state flow module for the wiper control system based on the given conditions.

Conditions:

  1. If the density of the rain is low, then the wiper rotates at a low speed, the output signal should be 100rpm
  2. If the density of the rain is medium, then the wiper rotates at low speed, the output signal should be 200rpm
  3. If the density of the rain is high, then the wiper rotates at a low speed, the output signal should be 500rpm

1. Simulink model file

2. SLDD file

4. Model advisor - JMAAB compliance report

5.Fixed-point Tool

SLDV Design error detection report

Requirement tagging report

coverage Reports:-

MIL

Harness

input Signla :-

output:-

SIL:-

Wiper_control_system.c
/*
* File: Wiper_control_system.c
*
* Code generated for Simulink model 'Wiper_control_system'.
*
* Model version : 1.6
* Simulink Coder version : 9.5 (R2021a) 14-Nov-2020
* C/C++ source code generated on : Sun Jan 1 10:28:05 2023
*
* Target selection: ert.tlc
* Embedded hardware selection: Intel->x86-64 (Windows64)
* Code generation objectives: Unspecified
* Validation result: Not run
*/
#include "Wiper_control_system.h"
#include "Wiper_control_system_private.h"
/* Named constants for Chart: '/Wiper_Control_System' */
#define Wiper_control_system_IN_high ((uint8_T)1U)
#define Wiper_control_system_IN_low ((uint8_T)2U)
#define Wiper_control_system_IN_medium ((uint8_T)3U)
#define Wiper_control_system_IN_notrun ((uint8_T)4U)
/* Block states (default storage) */
DW_Wiper_control_system_T Wiper_control_system_DW;
/* External inputs (root inport signals with default storage) */
ExtU_Wiper_control_system_T Wiper_control_system_U;
/* External outputs (root outports fed by signals with default storage) */
ExtY_Wiper_control_system_T Wiper_control_system_Y;
/* Real-time model */
static RT_MODEL_Wiper_control_system_T Wiper_control_system_M_;
RT_MODEL_Wiper_control_system_T *const Wiper_control_system_M =
&Wiper_control_system_M_;
/* Model step function */
void Wiper_control_system_step(void)
{
/* Chart: '/Wiper_Control_System' incorporates:
* Inport: '/In1'
*/
if (Wiper_control_system_DW.is_active_c2_Wiper_control_syst == 0U) {
Wiper_control_system_DW.is_active_c2_Wiper_control_syst = 1U;
Wiper_control_system_DW.is_c2_Wiper_control_system =
Wiper_control_system_IN_notrun;
/* Outport: '/wiperspeed' */
Wiper_control_system_Y.wiperspeed = 0.0;
} else {
switch (Wiper_control_system_DW.is_c2_Wiper_control_system) {
case Wiper_control_system_IN_high:
/* Outport: '/wiperspeed' */
Wiper_control_system_Y.wiperspeed = 500.0;
if (Wiper_control_system_U.In1 == 0.0) {
Wiper_control_system_DW.is_c2_Wiper_control_system =
Wiper_control_system_IN_notrun;
/* Outport: '/wiperspeed' */
Wiper_control_system_Y.wiperspeed = 0.0;
}
break;
case Wiper_control_system_IN_low:
/* Outport: '/wiperspeed' */
Wiper_control_system_Y.wiperspeed = 100.0;
if (Wiper_control_system_U.In1 <= 600.0) {
Wiper_control_system_DW.is_c2_Wiper_control_system =
Wiper_control_system_IN_medium;
/* Outport: '/wiperspeed' */
Wiper_control_system_Y.wiperspeed = 200.0;
}
break;

Poly space analysis report / outputs

Steps to create a Polyspace Report:

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

test

Q

2. Develop Simulink/state flow model for vehicle speed calculation unit inside the ABS system using given conditions.

Description of Challenge: fl, fr, rl and rr are the wheel speeds of front left, front right, rear left and rear right respectively.

Ans:-

SLDD_file

Requirement tagging report

JMAAB":

FIXED point tool

mil coverge :-

MIL Harness test:-

SLDV test generation report

9. Poly space analysis report / outputs

Steps to create a Polyspace Report:

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

Test manager reports – baseline & back-to-back testing

Baseline Test Report

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.