Challenge

Week - 4

1.Control logic of a washing machine using Stateflow

  1. If the power supply is available, the system gets activated
  2. If the Water supply is not available, stop the process & indicate through LED
  3. Soaking time should be 200s followed by Washing time of 100s.
  4. Then rinsing happens for next 20s & dryer runs for 50s

Input: Power and Water supply are the input to the chart

Output: All washing condition + input status are shown as output

Model logic:

Inputs are given as a constant value like 1 is ON condition and 0 is off condition for both power and water supply which is input to the Chart.

Inside chart, State block are created.

The format for state block is state name followed by entry:value=X; & exist :value=X; & also empty state block with only name to start with.

We can change the state b/w the block by assigning the condition in forward as well as reverse way.

After completing all the process The LED light which connects to the Finish state block will get activated.

and the Red LED are showing the indication that all individual sub process are completed as an aditional information.

2. Simulink chart for the “Gear shift” logic as per below conditions

Speed Range(kmph) Gear

0 to 15 1

16 to 25 2

26 to 40 3

41 to 60 4

Above 61 5

Speed of the Vehicle VS Gear state

Inputs: Power & Speed are given as input to the charts and Gear state is taken as output.

Power : Constant block is used which goes as input to the chart and the contant block is connets to ON OFF switch for easy identificaiton

Speed: Ramp block is used to give the speed value to the chart

Inside chart: We have created block to start with Power then goes to speed.

gear numbers is decided based on spead which is givin as inputs to the state block.

The speed input is also connected to the digital speedometer for easy identificaiton.

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.

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.