Challenge

Week - 4

AIM 1:

To 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 of 100s.
  • Then rinsing happens for next 20s & dryer runs for 50s.

After all the processes have completed turn on the finished LED.

METHODOLOGY :-

A chart block is used here in order to draw a washing machine working process as per the given question. So as in the Chart block Input blocks are Power_supply and Water_supply. Output bloks are Dryer,Finish,Rinse,Power,Wash,Soak and water.

2constant blocks are used and at the output of charts 7 displays are added in order to display the output given by chart block, after that LED (lamp block) are placed to see weather the specific block is ON or OFF and '1' represents as 'ON' whereas '0' represents as 'OFF'

RESULT :-

As a result; firstly input given was 1 as power_supply and 0 as water_supply, so as a result we got Power as in green light in LED and display displays 1 which indicates it as ON

The rest are, red light in LED and 0 as output on display, which indicates them as OFF .

Snapshot and a file copy is attached below for reference;

AIM 2:-

To 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.

METHODOLOGY :-

While solving the question we need to first add a chart block in simulink model then; first is the input block giving input to start the engine then in second block engine is OFF and in third block as input is given so engine turns ON.

Now the First condition of Gear1, in this the forward speed is geater than or equal to 15 and reverse speed is less than or equal to 0.

Second condition of Gear2, in this the forward speed is geater than or equal to 16 and reverse speed is less than or equal to 15.

Third condition of Gear3, in this the forward speed is geater than or equal to 26 and reverse speed is less than or equal to 25.

Fourth condition of Gear4, in this the forward speed is geater than or equal to 41 and reverse speed is less than or equal to 40.

Fifth condition of Gear5, the forward speed is more than all the gears, in this the forward speed is geater than or equal to 60 and reverse speed is less than or equal to 61.

After completion of chart block, we need to add inputs as two constant block, a Slider to increase/decrease speed and output as display to see the output to each gear and lastly lamps for each display to see the gear being shifted and which gear is meshed.

RESULT :-

As a result, as shown in snapshot beow red shows that the engine is not in that specific gear, green shows it may mesh with those gears and grey shows as the engine is running in that gear.

SNAPSHOT:

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.