Week - 4
1.AIM: To Implement control logic of a washing machine using State flow 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
STATEFLOW: Stateflow is a control logic tool used to model reactive systems via state machines and flow charts within a Simulink model. State flow uses a variant of the finite-state machine.
CHARTFLOW DIAGRAM:

Case-1
If the Power supply = OFF(0) the Machine will not be activated.

Case-2
If the Power supply =ON (1) & Water supply = ON (1) the Machine will start the process of washing the clothes except the no water lamp indicate RED signal.

Case-3
If the Power supply =ON (1) & Water supply = ON (1) the Machine will stop the process.

CONCLUSION:
Thus the control logic of a washing machine using Stateflow was processed as per given sequence.
2. AIM: To Make a Simulink chart for the Gear shift logic of a Car
Given Speed Conditions
Speed Range (km/hr) Gear
0 to 15 1
16 to 25 2
26 to 40 3
41 to 60 4
Above 61 5
Control Logic:

PROCEDURE TO RUN THE CONTROL LOGIC
Step1: Creating a Chart Block in the Simulink and providing the given inputs conditions for the Gear shifting Control Logic.
Step2: After inputs conditions are given open Symbols Pane option & here I have assign Input as Supply & Speed and Output as Gear, Engine ON&OFF variables.
Step3: Connect the Key (If Key=1) to the Supply which implies Engine is in ON Position and If Key=0 which implies Engine is in OFF Position.
Step4: Lamp Indicator is connected the ENGINE ON/OFF outputs which implies when the Engine of a car is in ON position lamp shows Green Indication & When the Engine is in OFF position lamp shows Red indication.
Step5: Acceleration Block is connected to the accelerating value here we can check the speed of a car and according to the speed the Gear position will be display in the output.
OUTPUT AS PER GIVEN CONDITIONS
Car is in OFF Position

Speed = 2km/hr & 1st Gear

Speed = 18km/hr & 2nd Gear

Speed = 40km/hr & 3rd Gear

Speed = 50km/hr & 4th Gear

Speed = 70km/hr & 5th Gear

Conclusion: Learnt the Simulink chart for the Gear shift logic of a Car.