Week - 4
Ans 1: In washing machine state flow following Simulink Blocks are used:
Chart - in chart, state block is used for showing various stages included in washing machine.
Inputs are Power Supply and Water Supply it is given by toggle switches and constant, Outputs is shown in the display as 1 On and 0 Off and indicating through LED, Red indicates OFF and Other Colors indicate ON state.
The image below indicates when Power supply and water supply is 0 red color

- If the power supply is available, the system gets activated

- After Finishing all the processes Finish LED is On indicating Green Color,
- Soaking time should be 200s followed by Washing time of 100s.
- Then rinsing happens for next 20s & dryer runs for 50s

Soaking takes place for 200 sec after that it moves to washing state for 100 sec, then Rinsing state for 20 sec, till rinsing state we need water after that water is given exit . Drying takes place for 50 sec after that all the processes are completed and hence Finish LED will be ON.
Image Below shows when Power supply is on but Water supply is OFF.

The Logic Analyzer shows the transitions clearly of each process in the state flow

Ans 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 :
Following the model of Gear shifting

Speed is varied by the slider block in simulink it is the Input provided, and Gear no displayed accordingly is the output of the system modeled.
The chart state flow of model is as shown below, the ranges of speed is allocated with a gear number.

The input speed is varied and the gear shifting is observed in the display and the LED indicating different colors,
Gear 1: Speed 0 to 15

Gear 2: Speed 16 to 25

Gear 3: Speed 26 to 40

Gear 4: Speed 40 to 60
Gear 5: Speed above 60

The gear shifting simulation was performed and the observations were observed, the comments in the chart wer mentioned and entry comand range was also given.
The Matlab Files of washing machine model and gear shifting is attached.