Design and Practice of an Elevator Control System Based on PLC Xiaoling Yang1, 2, Qunxiong Zhu1, Hong Xu11College of Information Science &Technology,Beijing University of Chemical Technology, Beijing 100029, China2 Automation College of Beijing Union University,Beijing,100101, Chinayxl_lmy@ , zhuqx@,AbstractThis paper describes the development of 2 nine-storey elevators control system for a residential building. The control system adopts PLC as controller, and uses a parallel connection dispatching rule based on "minimum waiting time" to run 2 elevators in parallel mode. The paper gives the basic structure, control principle and realization method of the PLC control system in detail. It also presents the ladder diagram of the key aspects of the system. The system has simple peripheral circuit and the operation result showed that it enhanced the reliability and performance of the elevators.1. IntroductionWith the development of architecture technology, the building is taller and taller and elevators become important vertical transportation vehicles in high-rise buildings. They are responsible to transport passengers, living, working or visiting in the building, comfortable and efficiently to their destinations. So the elevator control system is essential in the smooth and safe operation of each elevator. It tells the elevator in what order to stop at floors, when to open or close the door and if there is a safety-critical issue.The traditional electrical control system of elevators is a relay-controlled system. It has the disadvantages such as complicated circuits, high fault ratio and poor dependability; and greatly affects the elevator’s running quality. Therefore, entrusted by an enterprise, we have improved electrical control system of a relay-controlled elevator in a residential building by using PLC. The result showed that the reformed system is reliable in operation and easy for maintenance.This paper introduces the basic structure, control principle and realization method of the elevator PLC control system in detail.2. System structureThe purpose of the elevator control system is to manage movement of an elevator in response to user’s requests. It is mainly composed of 2 parts:2.1. Electric power driving systemThe electric power driving system includes: the elevator car, the traction motor, door motor, brake mechanism and relevant switch circuits.Here we adopted a new type of LC series AC contactors to replace the old ones, and used PLC’s contacts to substitute the plenty of intermediate relays. The circuits of traction motor are reserved. Thus the original control cabinet’s disadvantages, such as big volume and high noise are overcome efficiently.2.2. Signal control systemThe elevator’s control signals are mostly realized by PLC. The input signals are: operation modes, operation control signals, car-calls, hall-calls, safety/protect signals, door open/close signal and leveling signal, etc. All control functions of the elevator system are realized by PLC program, such as registration, display and elimination of hall-calls or car-calls, position judgment of elevator car, choose layer and direction selection of the elevator, etc. The PLC signal control system diagram of elevator is showed in Figure 1.Figure 1 PLC signal control system diagram2.3. RequirementsThe goal of the development of the control system is to control 2 elevators in a 9-storey residential building.For each elevator, there is a sensor located at every floor. We can use these sensors to locate the current2008 Workshop on Power Electronics and Intelligent Transportation Systemposition of the elevator car. The elevator car door can be opened and closed by a door motor. There are 2 sensors on the door that can inform the control system about the door’s position. There is another sensor on the door can detect objects when the door is closing. The elevator car’s up or down movement is controlled by a traction motor.Every floor, except the first and the top floor, has a pair of direction lamps indicating that the elevator is moving up or down.Every floor, has a seven segment LED to display the current location of the elevator car.The first step for the development of the elevator control is to define the basic requirements. Informally, the elevators behavior is defined as follows.(1) Running with a single elevatorGenerally, an elevator has three operation states: normal mode, fire-protection mode and maintenance mode. The maintenance mode has the highest priority. Only the maintenance mode is canceled can the other operation modes be implemented. The next is fire-protection mode, the elevator must return to the bottom floor or base station immediately when the fire switch acts. The elevator should turn to normal operation mode when the fire switch is reset. Under normal operation mode, the control system’s basic task is to command each elevator to move up or down, to stop or start and to open and close the door. But is has some constraints as follows:Each elevator has a set of 9 buttons on the car control panel, one for each floor. These buttons illuminate when they are pressed and cause the elevator to visit the corresponding floor. The illumination is canceled when the corresponding floor is visited by the elevator.Each floor, except the first and the top floor, has two buttons on the floor control panel, one to request an up- elevator, one to request a down-elevator. These buttons illuminate when they are pressed. The illumination is canceled when an elevator visits the floor, then moves in the desired direction.The buttons on the car control panel or the floor control panel are used to control the elevator’s motion.The elevator cannot pass a floor if a passenger wants to get off there.The elevator cannot stop at a floor unless someone wants to get off there.The elevator cannot change direction until it has served all onboard passengers traveling in the current direction, and a hall call cannot be served by a car going in the reverse direction.If an elevator has no requests, it remains at its current floor with its doors closed.(2) Parallel running with two elevatorsIn this situation, there are two elevators to serve the building simultaneously. It runs at 7am to 9am and 5pm to 7pm every day.When an elevator reaches a level, it will test if the stopis required or not. It will stop at this level when the stop is required.At the same time, to balance the number of stops, theoperation of two elevators will follow a certain dispatching principle.An elevator doesn’t stop at a floor if another car isalready stopping, or has been stopped there.The normal operation of elevators is implemented by cooperation of its electric power driving system and logiccontrol system.3. Software designDue to the random nature of call time, call locationsand the destination of passengers, the elevator controlsystem is a typical real-time, random logic control system.Here we adopted collective selective control method withsiemens PLC S7-200 CPU226 and its extension modules.There are 46 input points and 46 output points in thesystem. The I/O points are showed in Table1 and Table 2.Table 1 Input pointsdescription address 1-8 floor up hall-call I0.0-I0.72-9 floor down hall-call I1.0-I1.71-9 floor car-call I2.0-I2.7, I3.01-9 arrival sensor I3.1-I3.7, I4.0-I4.1door open button I4.2door close button I4.3door close location switch I4.4door open location switch I4.5up leveling sensor I4.6down leveling sensor I4.7fire switch I5.0driver operation switch I5.1touch panel switch of car door I5.2overload I5.3Forced speed changing switch I5.4full load I5.5Table 2 Output pointsdescription address 1-8 floor up hall-call lamp Q0.0-Q0.72-9 floor down hall-call lamp Q1.0-Q1.71-9 floor car-call lamp Q2.0-Q2.7, Q3.0up moving lamp Q3.1down moving lamp Q3.2Seven segment LED display ofelevator’s positionQ3.3-Q3.7Q4.0-4.1door opening Q4.2door closing Q4.3up moving Q4.4down moving Q4.5full load lamp Q4.6high speed operation Q4.7low speed operation Q5.0acceleration of starting Q5.1deceleration of braking Q5.2-Q5.4alarm beeper Q5.5About software designing, we adopt the modularizedmethod to write ladder diagram programs.The information transmission between modules is achieved by intermediate register bit of PLC.The whole program is mainly composed of10 modules:hall-call registration and display module, car-callregistration and display module, the signal combinationmodule,the hall-call cancel module, the elevator-locationdisplay module, the floor selection module, the movingdirection control module, the door open/close module, themaintenance operation module and the dispatchingmodule under parallel running mode.The design of the typical modules is described as follows:3.1. Hall-call registration and displayThere are two kinds of calls in an elevator: hall-calland car-call. When someone presses a button on the floorcontrol panel, the signal will be registered and thecorresponding lamp will illuminate. This is calledhall-call registration.When a passenger presses a button in the elevator car,the signal will be registered and with the correspondinglamp illuminated. This is called car-call registration.Figure2 shows the ladder diagram of up hall-callsregistration and display. The self-lock principle is used toguarantee the calls’ continuous display.Figure 2 up hall-call registration and display3.2. The collective selection of the callsHere the collective selection control rules are used. Asshowed in Figure3, M5.1-M5.7, M6.0 and M6.1 areauxiliary relays in PLC. They denote the stopping requestsignal of 1st to 9th floor respectively. The auxiliary relayM6.2 denotes the elevator driver’s operation signal. Whenthere is a call in a certain floor, the stopping signal ofcorresponding floor will output. When the elevator isoperated by the driver, the hall-calls will not be served.And the elevator cannot pass a floor at which a passengerwishes to alight.3.3. The cancellation of the callsThe program of this module can make the elevatorresponse the hall-calls which have the same direction asthe car’s current direction, and when a hall-call is served,its registration will be canceled. The ladder diagram of uphall-calls’ cancellation is showed in Figure4.Figure 3 The combination of the callsFigure 4 The cancellation of up callsIn Figure4, the auxiliary relay M4.0 is the up movingflag of the elevator. When the current direction of theelevator is up, M4.0’s contacts are closed; on the contrary,when the current direction of the elevator is down, M4.0’scontacts are opened. M0.1 to M0.7 denotes the car-calls’stopping request signal of floor 2 to floor 8 respectively.This program has two functions:(1) Make the elevator response the normal downhall-calls when it is moving down, and when a downhall-call is served, its registration is canceled.(2) When the elevator is moving up, the correspondingfloor’s down hall-call it passing by is not served and theregistration is remained.The cancellation of down hall-calls is reversed with up hall-calls.3.4. Elevator’s directionThe elevator may be moving up or down, depending on the combination of hall-calls and car-calls. The following ladder diagram in Fig.5 illustrates that the elevator will move up.Figure 5 Up moving of the elevatorFigure5 shows that when the calls corresponding floor is higher than the elevator’s current location, the elevator will go up. Here the auxiliary relay M4.0 is used as the up-moving flag. When the elevator is moving up, the up-moving lamp is illuminated, so the M4.0 is connected on. When the elevator arrives the top floor, the up-moving lamp is off and the timer starts. After 0.2s, the M4.0 is disconnected, the up-moving display is off. Here we used M4.0 to replace Q3.1 which can ensure the cancellation’s reliability.3.5. Elevator’s floor-stoppingFigure6 shows the ladder diagram of the elevator’s floor-stopping function.As showed in Figure6, M6.4 is the flag of floor-stopping signal. M6.6 is the floor-stopping signal sent by the driver. M7.0 is the fire signal sent by the fire switch. And M6.7 is the forced speed changing signal. When either of these contacts act, the system should send out the floor-stopping signal.4. Minimum waiting time algorithmIn traffic of elevator systems, there are two types of control task usually. The one is the basic control function to command each elevator to move up or down, to stop or start and to open and close the door. The other is the control of a group of elevators.The main requirements of a group control system in serving both, car and hall calls, should be: to provide even service to every floor in a building; to minimize the time spent by passengers waiting for service; to minimize the time spent by passengers to move from one floor to another; to serve as many passengers as possible in a given time[1].Figure 6 The elevator’s floor-stoppingThere are many dispatching algorithms for elevator’s group control. Such as Nearest-neighbor Algorithm[2], which the elevator always serve the closet request next; Zoning Algorithm[3] which by analyzing the traffic of elevator system with unequal floor and population demand to dispatch the elevator; and Odd-even rule, which an elevator only serves the odd floor and the other only serves the even floor.The Nearest-neighbor Algorithm minimizes the length of the elevator’s empty move to the next request. it usually has very small average waiting times, but individual waiting times can become quite large[2]. The Zoning Algorithm usually used in buildings which has heavy traffic situations, such as the office building at lunch time.Compared to the office building and shopping mall, the traffic flow of residential buildings is relatively lowand even in every floor. Secondly, people usually think of elevators as purely functional objects and the experience of riding an elevator is time waited for most of them. Furthermore, there exist immense problems when attempting to satisfy all requirements.Considering all of the reasons above, we adopted the “minimum waiting time” algorithm to realize the 2 elevators’ parallel running[4].4.1. Evaluation functionThe goal of the “minimum waiting time” algorithm is to predict the each elevator’s response time according to all calls, and select the elevator which has the shortest response time to serve.When there is a call, the system calculates out the function values of each elevator according the evaluation function showed in (1) and (2):J(*)=Min[J(1),J(2),…,J(n)] (1)J(i)=T r(i)+KT d(i)+KT o(i) i=1,2,...,n(2)J(i) is the evaluation index of each elevator; T r(i) denotes the time of the elevator directly moving to the destination corresponding the latest call from its current floor; T o(i) denotes the additional acceleration and deceleration time of a floor-stop of the elevator; T d(i) denotes the average time of the passenger boarding and alighting the elevator; and K is the sum of hall-calls and car-calls. But when a hall-call and a car call corresponds the same floor, the K is only calculated one time.4.2. Calculation of minimum waiting timeIn equation (2), K is a certain value, T o and T d can be obtained by means of statistics. T r = T*L, where T denotes the average time of the elevator passing by one floor; L denotes the desired floors of the elevator from current floor to the hall-call floor.In order to calculate the L value, we defined the 2 elevators are A and B respectively; Y A,Y B denotes the current floor of elevator A and B respectively. H is the corresponding key value when a hall-call button is pressed, and H=floor number of the hall-call.We defined 4 tables for the PLC realization: up hall-call registration table, down hall-call registration table, car-call registration table of A and car-call registration table of B. When a certain call button is pressed, its floor value is recorded in corresponding table.Here we take elevator A as an example. First, define the variable M A, M B and M W. Where M A, M B denotes the extreme value of car-calls with same direction of A or B’s movement respectively.When elevator A is up-moving, set M A is equal to the maximum value in car-call registration table A; when elevator A is down-moving, set M A is equal to the minimum value in car-call registration table A.M W denotes the extreme value of hall-calls with same direction of A’s movement.When elevator A is up-moving and up-hall-call value≥Y A, set M W=0; otherwise, set M W is equal to the minimum value in up-hall-call registration table A. When elevator A is down-moving and up-hall-call value≤Y A, set M W=0; otherwise, set M W is equal to the maximum value in down-hall-call registration table A .Thus, we can determine the L value according to Y A, H, M A and M W. There are 3 situations:(1) When the hall-call’s direction is opposite to elevator A’s movement:L=|Y A-M A|+|M A-H| (3)(2) When the hall-call’s direction is same as elevator A’s movement and it is in the front of elevator A:L=|Y A-H| (4)(3) When the hall-call’s direction is same as the elevator A’s movement and it is in the back of elevator A: L=|Y A-M A |+|M A-M W|+|H-M W| (5)So the i-th floor’s minimum waiting time can be calculated by (6) as follows:Time(i)=TL(i)+KT d(i)+KT o(i) i=1,2,...,n(6)When the calls change during the operation of elevators, the system calculates the minimum waiting time of each elevator. Then it allocates the current call to the elevator which has small value. When the each elevator has the same value, then the current call is prior to elevator A.When an elevator is wrong or not in service, the system can exit the dispatching algorithm and turns to a single elevator running mode.4.3. Algorithm realizationCompared with single elevator running mode, the parallel running mode is mainly different at the processing method about hall-calls. The former uses collective selective control method, and the latter uses dispatch rule combined with collective selective control method.Here the system is to control a 9-storey building, so we choose two Siemens S7-200 PLCs(CPU226) and its Extensive Modules to control the single elevator respectively. And by using PPI Protocol to realize the communication between 2 PLCs.The PPI Protocol adopts master-slave communication mode, so we defined elevator A as the master and elevator B as the slave. By communication program, the 2 PLCs can exchange the massage such as the current position, hall-calls or car-calls and moving direction. Then by using “minimum waiting time” algorithm, the system realizes the optimal operation of 2 elevators.Figure7 shows the ladder program of the car-calls extreme value calculation of elevator A.In Figure7, VB121~VB130 is the register address of elevator A’s car-call corresponding to each floor, Q3.1 isthe up-moving lamp of elevator A , and the car-calls extreme value is saved in VB120.Figure 7 The car-calls extreme value calculationof elevator A5. ConclusionsIn this paper, we have improved an old elevator control system by using PLC, and realized the group control of 2 elevators. The new control system has been operated for 1 year, and its operation scenarios are as follows: (1) Down–PeakThis traffic condition concerns people out of the building in the morning between 7am to 9am. (2) Up–PeakThis condition concerns people entering the building between 5pm to 7pm. (3) OtherIt covers the day from 6:00 to 0:00 except the two situations above. And in this situation, there is only one elevator running.The results are expressed via an average waiting time and maximum waiting time(both given in seconds) are collected in Tables 3 and 4.Table 3Average and maximum waiting time(before reformed)Average Maximum Down–peak 63.20 240.33 Up–peak 52.78 235.26 Other 43.25 215.43Table 4Average and maximum waiting time(reformed)Average Maximum Down–peak 30.12 203.33 Up–peak 27.81 195.20 Other 37.32 186.43Due to the nonparallel running before the reform, so the average waiting time and maximum waiting time of down–peak and the up–peak are very longer than the reformed. The practice results have showed the better performance of the improved control system.References[1] Ricardo Gudwin, Fernando Gomide, Marcio (1998). “AFuzzy Elevator Group Controller With Linear Context Adaptation”. IEEE World Congress on Computational Intelligence . Vol. 12, No. 5, pp.481-486.[2] Philipp Friese, Jorg Rambau (2006). “Online-optimizationof multi-elevator transport systems with reoptimization algorithms based on set-partitioning models”. Discrete Applied Mathematics .No. 154, pp.1908-1931.[3] Zheng Yanjun, Zhang Huiqiao, Ye Qingtai, ZhuChangming. (2001). “The Research on Elevator Dynamic Zoning Algorithm and It's Genetic Evolution”. Computer Engineering and Applications , No. 22, pp.58-61.[4] Xiaodong Zhu, Qingshan Zeng (2006). “A Elevator GroupControl Algorithm for Minimum Waiting Time Based On PLC”. Journal of Hoisting and Conveying Machiner , No. 6, pp.38-40。