Week - 4
AIM:
1. To Implement control logic of a "washing machine" using State flow as per given sequence.
2. Make a Simulink chart for the "Gear shift" logic as per given conditions.
OBJECTIVE:
1. In Simulink, Implement the Control Logic of a Washing Machine using State Flow as per given input conditions. Create a model and Operate the model logic system and Display the Output of the results by using Lamp Indicator.
2 Create a model for Gear Shifting logic as per given conditions. Give the Speed input while simulation is running and Display the gear number
EXPLANATION:
STUDY -
1: STATE FLOW:
State flow provides a graphical language that includes state transition diagrams flow charts, state transition tables, and truth tables. By using State flow to describe haw MATLAB algorithms and Simulink models react to input signals, events, and time based conditions.
CONTROL LOGIC: Control Logic is model system logic using State machines, Flowchart and Truth tables.
EXPLANATION FOR CONTROL LOGIC OF A WASHING MACHINE USING STATE FLOW:
State Flow is a Simulink tool to implement the state machine. Here model system logic of a Washing Machine using State flow has been done,
Step 1: Create a chart and enter the given input conditions.
Given Input Conditions:
- 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
Step 2: After entering the input conditions in the chart, Go to Symbols pane and assign the given variable. (Example input data, Output data, etc.)
Step 3: Give the Input values for turning on or off for the Power Supply and Water Supply.
Condition
- if value =1, Power and water Supply will turn On.
- if value = 0, Power and water Supply will turn off.
Step 4: Use 'display block and 'Lamp' indicator to display the results.
Case 1: If the Power supply=0,system remains off

Case 2: If the Power supply=1, water supply=0

Case 2: If the Power supply=1, water supply=1.

EXPLANATION FOR CONTROL LOGIC OF A GEAR SHIFT USING STATE FLOW:
Mechanical devices that enable the driver to engage gears in such a way as to obtain the desired transmission ratio are called shifting mechanisms
Step 1:Create a chart and enter the given conditions for gear shifting .
Given Conditions: Speed Range(kmph) Gear
O to 15 1
16 to 25 2
26 to 40 3.
41 to 60 4
Above 60 5
Step 2: After entering the input conditions In the chart, Go to Symbols pane and assign the given variable. (Example input data, Output data, etc.)
Step 3:Connect the Slider to vary the speed while simulation is running.
Step 4:Create Constant and giving value I and o for turning on & off.
Step 5:Create 'Lamp' to Indicate the power is on or off.
Step 6: Use 'display' Block to display the Gear position.

Model:
At above 60 speed, display showing 5th gear to be shifted
