Challenge

Week - 4

Week 4

1.

Aim: implementation of control logic of a washing machine using Stateflow.

Blocks used:

Rocker switch

Constant block

Lamp block

Display block

Character block (logic implementation)

Set up and working

State flow: there are 7 states starting with the power supply and ending with the process completion.

As the power is switched on the state goes to water supply and checks whether it is in state 1 (supplied) or not. If it is supplied it goes towards the subsequent states with pre defined delays such as soaking, washing etc.

Each state is also given a variable to show whether that state has been finished or not which would be specified with a lamp.

The state flow ends with a stop state with a variable designating it.

The inputs specified to the state flow are power and water supply.

Simulink model setup and working

The inputs namely power and water supply are designated with a constant block and they are in turn controlled by rocker switches which changes from on to off position as per requirements.

The inputs are also visualised with the help of lamps which turn green if they are in state 1 or ON or red otherwise.

Some variables declared in the state flow are designated as outputs in the symbols pane which are visualised with the help of lamps. The lamps tells the user whether a state has been completed or not.

2.

Aim: Make a Simulink chart for the gear shift logic as per conditions

Blocks used:

Slider switch

Constant block

Display block

Character block (logic implementation)

Set up and working

State flow: the chart has 6 states staring with the power on state 1.

Subsequent states are given with the speed condition. As a result five states for each gear is made as per the given speed conditions. It is also made sure that as speed decreases the gear goes down to 1.

In the symbol pane, speed is given as the input parameter and gear is made to be the output parameter.

Simulink model setup and working:

Slider block is connected with the constant block which in turn gives the speed value as input to the character block.

The output from the chart block which is the gear is displayed in a display block.

Time span for the simulation is given as infinite and during run time the slider is adjusted.

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.