Simulink model of washing machine using state flow and chart block.
- Implement control logic of a “washing machine” using Stateflow as per given sequence:
- If the power supply is available, the system gets activated
- If the Water supply is not available, stop the process & indicate through LED
- Soaking time should be 200s followed by Washing time of 100s.
- Then rinsing happens for next 20s & dryer runs for 50s
After all the processes have completed turn on the finished LED
ANS:-
Following model shows the control logic of a “washing machine” using Stateflow:

To creat a automatci washing machin logic i used chart function from simulink and logic shown below:
Process:
1) I took chart block and creat a logic in it with the help of state which is shown above.
2) To chart input i gives the input from simulink and output to simulink.
3) For that input and output of chart gives the similink inputs and output.
4) And get the result by hit the run .
block used with ther functions:
1) Chart: A finite state machine is a representation of an event-driven (reactive) system. In an event-driven system, the system responds to an event by making a transition from one state (mode) to another.
2) Two constant: The Constant block generates a real or complex constant value signal.
3) Lamp: for indication.
4) scop: Fpr output.
When we get supply to our model lamp indicate green colour which is show in following pic:

when supply get to our model but water false then model indication in lamp which is shown in below pic:

when model is normally working then there is more opreations which is scaking, rising, drying etc. with interval of time which is shown in below pics:-
1)soaking: time: 200
colour: Pink
2)Rising: time:300
colour:purple

3) Drying: time:350
colour: orange

4) stop/end: time:400
colour: black

out of model:

2. Make a 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
Give speed input while the simulation is running & display the gear number.
ANS:
Chart for the “Gear shift” logic as per given condition:

model of gear shift:

block used and ther function:
1) Chart: A finite state machine is a representation of an event-driven (reactive) system. In an event-driven system, the system responds to an event by making a transition from one state (mode) to another.
2) Two constant: The Constant block generates a real or complex constant value signal.
3) Lamp: for indication.
4) display: For output.
5) Slider: for veriable speed.
As per conditions, gear with ther corsponding speed shown in below pics:
1) speed:0 to 15 with gear no on display and also indicater

2) speed:15 to 25 with gear no on display and also indicater

3) speed:25 to 40 with gear no on display and also indicater

4) speed:40 to 60 with gear no on display and also indicater

1) speed:60 to 100 with gear no on display and also indicater
