You are on page 1of 7

LIFT CONTROLLER

Submitted by Sandesh.N.S,
1st Mtech, CEDT, S.R.NO 461 !"1 ! 41! ##4$.

%&'b(em) Design a lift controller for 2 lifts with the following specifications. 1. If one goes up the other goes down. *. Call a lift . #. Select to stop at a floor. 4. Open time for the door. ". Emergency exit. +LOC, DI-.R-M OF T/E LIFT CONTROLLER) Ca((0112) 3 C'unt011#) 3 Se(ect0112) 3 C'unt0*1#) 3 Ca((0*12) 3 M'de01 Se(ect0*12) 3 Eme&4ency0e5it01 Eme&4ency0e5it0* C('c7 Sta&t01 Reset Sta&t0* LIFT CONTROLLER M'de0* O6en01 O6en0*

De8inin4 the in6ut si4na(s) Separate call and select buttons are used for each lift. Each floor has has two call buttons , which is specific for each lift. ift!" responds only to select!" and call!" buttons and the same assumption is made for lift!2 also. #ut the mo$ements of the lifts is restricted by the fact that both ha$e to mo$e in the opposite direction.%ere it is assumed that there are "& floors in the building. %ence to represent each floor we re'uire ( bits. De8inin4 the 'ut6ut si4na(s) C'unt ) )sed to indicate the position of the lift i.e the floor number. M'de ) *his is used to indicate the direction of the lifts. 1 +, Indicates the lift is mo$ing up. +, Indicates the lift is mo$ing down. O6en 1 +, Indicates that the door is open. +, Indicates the door is closed. Sta&t ) *his signal ma.es the lift mo$e from its current position or stop the lift at a floor. 1 9: /o$e the lift 9: Stop the lift. -66&'ach used in desi4nin4 the c'nt&'((e& ) 0s the specification demands that both the lifts should mo$e in the opposite direction, the logic implemented uses toggling of the modes of the 2 lifts. *o ma.e this more clear let us see an e5am6(e . 0ssume that both the lifts are starting from the ground floor. One lift is assigned mode up and the other mode down.

ift!2

/ode down

ift!"

/ode up

1nd floor

1nd floor

ets say that a person from 2th floor calls the lift!" . 0fter some time another person calls lift!2 from the "st floor before the lift!" reaches the 2 th floor. 3ow lift!2 cannot go up as lift!" is already mo$ing up. Only when the lift!" comes to idle state4i.e it has no more calls from the floors abo$e it5 lift!2 can go up in response to the caller at "st floor. 0t this point the modes of the 2 lifts ha$e to be changed.

ift!2

ift!"

1nd floor

2th floor

0fter the modes of the lifts ha$e been changed lift!2 can go to the first floor.

ift!2

ift!"

"st floor

2th floor

-ssum6ti'ns made". *o chec. whether a lift has reached a particular floor or not, a position sensor is used. *his can be simulated by generating an interrupt when a lift reaches a particular floor. *o generate the interrupt it is assumed that the time the lift ta.es to tra$el between two successi$e floors is a constant once the lift starts mo$ing. 2. 6hen the lift reaches a particular floor an open signal is asserted high to open the door. If the lift has no more callers the door remains open, otherwise the door closes after a fixed amount of time. *he lift can mo$e only when the door is closed.

Inte&na( b('c7 dia4&am '8 the (i8t c'nt&'((e&)


&eset0se(0112) 3 &eset0ca((12) 3 se(ect0112) 3 ca((0112) 3 L'4ic F'& .ene&atin4 c'nt&'( si4na(s F'& FSM01

se(0112) 3 ca(0112) 3 c'unt011#) 3 int&01 d''&0c('sed01


FSM01

&eset0se(0112) 3 &eset0ca((0112) 3

'6en01 '6en0id(e1 id(e0st1 sta&t01 cen01 m'de01

'6en01

ca(0se(01
m'de01

ca(0se(0*
cen01

c(7 &eset0se(0*12) 3 &eset0ca((0*12) 3 se(ect0*12) 3 ca((0*12) 3 '6en0* m'de0* cen0* c(7

&eset c(7 &eset

ca(0se(0# ca(0se(04
L'4ic F'& .ene&atin4 c'nt&'( si4na(s F'& FSM0*

m'de0* cen0* sta&t0*


FSM0*

int&0* d''&0c('sed0*

'6en0* '6en0id(e* id(e0st*


&eset0se(0*12) 3 &eset0ca((0*12) 3

sel!247-&5 cal!247-&5
c'unt0*12) 3
&eset c(7 &eset

Desc&i6ti'n '8 the inte&na( c'nt&'( si4na(s used) M'de01,M'de0*) *his signal indicates whether the lift is mo$ing up or down for the 2 lifts. Int&01,Int&0*- 1enerates an interrupt when the lift reaches a particular floor. Se(01,Se(0*,Ca(01,Ca(0*- *hese are the flip flop outputs for the call and select switches. Ca(0se(01,Ca(0se(0#- 0 high on this signal indicates that there is a re'uest for the lift from the floors abo$e the current floor .*he re'uest may be due to call or select buttons. Ca(0se(0*,Ca(0se(04- 0 high on this signal indicates that there is a re'uest for the lift from the floors below the current floor. *he re'uest may be due to call or select buttons . Reset0se( -6hen a lift reaches a particular floor this signal goes high after the lift has ser$iced the select re'uest. *his resets the select flipflop for that floor .*his ascertains that any re'uest coming after that is recogni8ed by the lift. Reset0ca(( -6hen a lift reaches a particular floor this signal goes high after the lift has ser$iced the call re'uest. *his resets the call flipflop for that floor .*his ascertains that any re'uest coming after that is recogni8ed by the lift. D''&0c('sed) 1oes high when the door is closed. O6en,O6en0id(e) *he open signal goes high when the lift stops at a intermediate floor and has to further ser$ice re'uests, whereas the the open!idle signal goes high when the lift stops at a particular floor and has no more re'uests.*hese to separate signals are needed as the logic to to close the door at these two states are different. Cen- *his enables the counter when the lift starts mo$ing to .eep trac. of the current position of the lift.

State machine 8'& the (i8t c'nt&'((e&) *he state machine for one of the lift is shown below. *he state machine for the other lift is similar e5ce6t that u6'n &eset the initia( state is m'de d';n. &eset if tog!2+" M'de9d';n
Id(e0*

M'de9u6
Id(e01

If cal!sel!2+" If tog!"+" if 99 em!exit+" door!closed+"


M'<0*

If cal!sel!"+" 99 door!closed+"

if em !exit +"

M'<01

If4 sel4cnt5 or Cal4cnt5 5 +" intr!"+" If cal!sel!2+" 9 if door!closed +" cal!sel!2+&


/a(t0*

If4 sel4cnt5 or If cal!sel!"+" cal4cnt5 5 +" 9 door!closed+" 9 intr!"+" if cal!sel!"+&


/a(t01

Desc&i6ti'n '8 the states)*he important part of the state diagram is the toggling of the modes between idle!" and idle!2 states.*he lift can change states only in these states.

M'de u6 Id(e1 ) %ere the lift is waiting for a re'uest from the floors abo$e the current floor.)pon a re'uest it waits for the door to be closed and it goes to the mo$ing state. If there is no re'uest and the other lift has a re'uest from the floors abo$e then it goes to the idle!2 state where the mode of the lift is down. *his is re'uired as the 2 lifts must operate in opposite modes. *he lift can also go to idle!2 state when there is a re'uest from the floors below the current floor, wherin the lift has to change the direction .It can start mo$ing down only when the other lift is not mo$ing downwards and is in the idle state. M'<01- In this state the the lift is mo$ing upwards .If there is a emergency exit button pressed then the lift goes bac. to the idle!" state. )pon reaching a floor as indicated by intr signal if there is a call or select re'uest from that floor it goes to the halt state. /a(t01- In this state the door is open and the lift waits for the door closed signal.If there are further calls abo$e it goes to the mo$!" state otherwise it goes to the idle!" state wherin the lift waits for the re'uests. M'de d';n Id(e0*) %ere the lift is waiting for re'uests below the current floor.If there is a re'uest below then it goes to the mo$!2 state. It goes to the idle!" state for reasons similar as gi$en in idle!" state. M'<01 and ha(t0* states ha$e similar explanations as that of mo$!" and halt!" except that the lift is in mode down. De<ice uti(i=ati'n summa&y:0;* *<:E) 5c*s* e S:EED 1;0DE!6 :0C=01E6>* $ 3umber of S ICEs 3umber of External IO#s 1? 'ut '8 *#"* ?@ "4 'ut '8 14* #$@

/aximum operating fre'uency- 4 .? # Mh=.

You might also like