Challenge

Week - 4

Ans1.

THEORY:

  • Implementing control logic of a “washing machine” using Stateflow.
  • Condition 1: If the power supply is available, the system gets activated
  • Condition 2: If the Water supply is not available, stop the process & indicate through LED
  • Condition 3: Soaking time should be 200s followed by Washing time of 100s.
  • Condition 4: Then rinsing happens for next 20s & dryer runs for 50s

BLOCK USED:

  • Chart: A finite state machine is a representation of an event-driven (reactive) system. In an event-driven system, the system responds to an event by making a transition from one state (mode) to another. This transition occurs if the condition defining the change is true.
  • Constant: Generates a real or complex constant value signal.
  • Display: Display input values.
  • Lamp: Display a color that reflects an input value.

MODEL OPERATION:

  • Basic constant block used to indicate power supply and water supply.
  • Above signals connected to chart.
  • Each output were connected to display and lamp accordingly.
  • Inside Chart the stateflow was made by applying the conditions given.

Ans2.

THEORY:

  • Making a Simulink chart for the “Gear shift” logic.
  • condition1: 0 to 15 Speed Range(kmph) 1(Gear)
  • condition2: 16 to 25 2
  • condition3: 26 to 40 3
  • condition4: 41 to 60 4
  • condition5: Above 61 5
  • Give speed input while the simulation is running & display the gear number.

BLOCK USED: Each block has been explained in previous question.

  • Constant
  • Display
  • Scope
  • Chart

MODEL OPERATION:

  • One constant block is connected to chart to varring the input speed.
  • Output of the chart is connected to Display to observe the gear change.
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.