Challenge

Week - 4

Q1: 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 100 s
  • Then Rinsing happens for next 20s & dryer runs for 50s

After all the proceses have completed turn on the finished LED

Q2: 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.

Q1: A:

Stateflow :

Stateflow provide a graphical language that includes state transmission diagrams, flow charts, state transition tables, and truth tables. By using stateflow to describe how 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 StateFlow:

Stateflow is a simulink tool to implement the state machine. Here model system logic of a Washing Machine using Stateflow has been done.

Step 1: Create a chart and enter the given input conditions.

In simulink, implement the control logic of a Washing Machine using StateFLow 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.

Step 2: After entering the input conditions in the chart, Go to Symbols panel ans assign the given variable.(ex; i/p data, O/p 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.

Q2: Gear Shift Logic:

Mechanical devices that enable the driver to engage gears in such a way as to obtain the desired transmission ratio are called shifting mechanisms.

Explanation for Gear Shifting Mechanism using simulink:

Step 1: Create a chart and enter the given conditions for gear shifting.

Step 2: After entering the input conditions in the chart, Go to symbols panel and assign the given variable.(ex ; I/p data, O/p data, etc........)

Step 3: Connect 'Slider Gain' to vary the speed while simulation is running.

Step 4: Create constant and giving value 1 and 0 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.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.