Week - 4
Aim:-
1. 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
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.
#Solution1:-
Block used:-
- Constant:- To give the input value.Give two constant one will be connected to the water and another is connected to the power.
- Chart:- To set the control logic for Washing machine simulation.
- Lamp:- The lamp is used to give the display a color that reflects an input value.
- Display:- To give the output value.
Simulink Model:-
Output
1:- when both the water and power supply will be given.
The green indicate the model will ran through successfully.
2:- when either water and power are not provided.

The red light is glow the indicate the intruption the process.
Subsystem:-

This image shows the logic for the Washing machine phenomena.
Conclusion:-
- The logical control of thr same machine could be executed as per required.
- The real time changes in the simulation could also be observed if the simulation time is set to infinity.
- More features could be added like different modes of washing.
#Solution 2:-
Block used:-
- Constant:-To give the input gear range value.
- Chart:- To set the control logic for gear shift simulation
- Display:- To display the output value.
Simulink model:-

Subsystem:-

This image shows the logic for the gear shift phenomena.
Conclusion:-
- Many automobile system could be designed according to the user with the help of state machine.
- The above simulation is represent the real-time representation the vehicle's gear shift paradigm.