Design of Elevator Controller System Based on FPGA

Publisher:mancozcLatest update time:2011-12-27 Source: 互联网Keywords:FPGA Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Abstract: This paper first proposes an elevator controller algorithm based on a finite state machine, and then designs a three-story elevator controller based on the algorithm. The correctness of the elevator controller has been verified by simulation and hardware platform. The elevator controller design in this paper combines the actual operation of the elevator of Shenzhen Information Vocational and Technical College, which is easy for students to understand and accept. It is a very good practical project for the teaching reform of combining work and study. In addition, the elevator controller algorithm proposed in this paper is suitable for any floor and has strong adaptability and practicality.

Electronic design automation technology is an emerging technology in the late 19th century and early 21st century. It has demonstrated powerful functions and advantages in digital circuit design and daily control systems . With the rapid development of EDA technology, electronic system design technology and tools have undergone profound changes. The emergence of large-scale programmable logic devices FPGA has brought many conveniences to designers. HDL (Hardware Description Language) developed with programmable logic devices ( PLD ). It is mainly used to describe the structure, behavior, function and interface of digital systems . It is one of the key technologies of electronic design automation (EDA). It usually adopts a top-down design method, that is, designing from the overall requirements of the system.

At present, some design articles on elevator control systems using FPGA are seen in journals and magazines. In these articles, controller algorithms for any number of floors are not seen, and controller algorithms for any number of floors are the key to ensuring the practicality and applicability of the controller. Therefore, this article attempts to use EDA technology to design an N-layer elevator control system. The specific idea is: first give the elevator controller algorithm, and then implement and verify it on the hardware platform.

1. Elevator control system requirements

The elevator control system usually includes the functions shown in Figure 1: elevator rise, fall, stop; elevator door opening and closing; request signal display, floor display; overload and fault alarm. Among them, overload and fault alarm require the use of sensors . This control is relatively simple, so this article will not discuss it in detail.

This article focuses on controller algorithms involving other functions.

For the elevator in the first teaching building of Shenzhen Information Vocational and Technical College, the elevator controller implements the following functions:

(1) Each floor of the elevator has a corresponding STOP button ; each floor except the top floor has an UP button, and each floor except the bottom floor has a DOWN button; when the UP button is pressed, it means that someone on that floor wants to go to the upper floor; when the DOWN button is pressed, it means that someone on that floor wants to go to the lower floor; when the STOP button is pressed, it means that someone on that floor wants to leave the elevator. For the STOP, UP, and DOWN buttons, when they are pressed, the corresponding indicator lights up, and the indicator lights will not go out until the request is met;

(2) During the operation of the elevator, the corresponding indicator lights should be on when the elevator is rising, descending or stopping, and the floor number should be displayed at any time;

(3) During the elevator's ascent, the upward demand is met first. For the demand for lower floors or downwards, the demand will be recorded during the elevator's ascent, and then met during the elevator's descent after all the upward demands have been met;

(4) When the elevator is descending, the downward demand is met first. For the demand for higher floors or upwards, the demand will be recorded during the elevator's descent, and then satisfied when the elevator rises again after all the downward demands have been met.

The basic requirement of the elevator controller designed in this paper is to meet the above requirements for actual elevator operation.

2 Elevator Control System Implementation

2.1 Overall solution design

The overall design consists of four modules, and the functions of each module are described as follows:

a. Frequency divider Module: This module realizes the function of arbitrary clock frequency input and arbitrary frequency output, and the output frequency accuracy is 1Hz; the module input is the system working clock clk, the system reset signal rst, and the output is the divided clock. The module definition is as follows:

module freq_div(reset,clk,keyclk,liftclk);

In the module, keyclk is the key processing clock, and liftclk is the elevator operation control clock.

b. Button request module: This module records and processes the pressing of the up, down and stop buttons on each floor. The module ports are as follows:

module key_req(

reset,keyclk,

stop, //Elevator interior buttons, each digit represents a floor. When the corresponding position is 1, it indicates that the button indicating the floor is pressed;

up, //Up buttons on each floor (none on the top floor), each bit represents a floor, when the corresponding position is 1, it means that the up button on that floor is pressed.

down, //Down button on each floor (none on the bottom floor), each bit represents a floor, when the corresponding bit is 1, it means the down button on that floor is pressed;

stop_r, //Elevator floor button information

up_r, //Up button information for each floor outside the elevator

down_r //Down button information for each floor outside the elevator

);

c. Elevator controller module and indicator module: This module controls the elevator operation and sets indicator lights according to the pressing of buttons on each floor. The module definition is as follows:

module Lift_c ON trol(

keyclk, //Process key clock

liftclk, //Elevator operation control clock

reset, //Elevator reset button, the elevator stops on the first floor after reset;

stop_r, //Elevator floor button information

up_r, //Up button information for each floor outside the elevator

down_r, //Down button information for each floor outside the elevator

position, //Current floor position, each digit represents a floor. When the corresponding position is 1, it means the elevator is running to that floor;

stoplight, //Internal layers Button indicator lights , each digit represents a layer, when the corresponding position is 1, it indicates that the indicator light of the layer is on;

uplight, //Except the top layer, each layer’s external button indicator light, each digit represents a layer. When the corresponding position is 1, it means the up light of the layer is on;

downlight, //Except the first floor, each floor's external button indicator light, each digit represents a floor, when the corresponding position is 1, it means the down indicator light of the floor is on;

doorlight); // used as door opening indicator light, 1 means door is open, 0 means door is closed

d. Display module : This module is used to decode and display the current elevator floor. The module definition is as follows:

module Display(liftclk,position,disp);

2.2 Module design and implementation

For the four modules of frequency divider module, key request module, elevator controller module, indication module and display module, the elevator controller module and indication module involve the processing of various elevator operation conditions, and their algorithms are the most complex and prone to errors. This paper uses a finite state machine to design this module, and the specific algorithm is described as follows.

The elevator operation is defined as 7 states, and the specific states are defined as follows:

S0: onfloor1, indicating on floor 1;

S1: dooropen_up, during the ascent, the elevator door opens for 5 seconds;

S2: doorclose_up, during the ascent, the elevator door closes;

S3: up_lift, indicating that the elevator goes up one floor;

S4: dooropen_down, during the descent, the elevator door opens for 5 seconds;

S5: doorclose_down, the elevator door closes during descent;

S6: down_lift, indicating that the elevator goes down one floor.

Each state is transformed under certain conditions. The specific state transformation is shown in Figure 2.

Figure 2 Elevator controller state transition diagram

Figure 2 Elevator controller state transition diagram

Table 1 Elevator controller state transition conditions

Table 1 Elevator controller state transition conditions

In the above table, pos indicates the current floor, up[pos], down[pos], and stop[pos] indicate the status of the up, down, and stop buttons of the current floor, respectively.

Obviously, the above algorithm does not limit the number of floors, that is to say, the algorithm is suitable for elevator controllers on any floor.

2.3 Simulation Verification

Based on the above algorithm, this paper uses Verilog HDL language to implement a three-story elevator controller on FPGA. For implementation, the controller of a three-story elevator or a multi-story elevator is just different in the number of Verilog codes, and its algorithm is completely the algorithm proposed in this paper. This paper only implements a three-story elevator controller because the resources of the hardware development environment (including the number of buttons and indicator lights) only meet the verification of a three-story elevator controller.

The simulation waveform of the three-story elevator controller is shown in Figure 3.

Figure 3 Simulation waveform of three-story elevator controller

Figure 3 Simulation waveform of three-story elevator controller

Simulation waveform description: The buttons inside and outside the elevator are pressed when their values ​​change from 0 to 1. In the figure, the buttons inside and outside the elevators on each floor are pressed randomly.

It can be seen from the simulation waveform that the operation of the elevator meets the design requirements.

2.4 Hardware Verification

The design in this article has been pin -locked and downloaded to the hardware development environment, and has been tested to be completely correct.

The specific hardware development environment is the GW48-PK2 experimental development system.

CLK selects clk0 and the frequency can be selected as 256Hz.

Keys 1, 2, and 3 correspond to the buttons of each floor in the elevator; keys 4 and 5 correspond to the up buttons outside the elevator on the first and second floors; keys 6 and 7 correspond to the down buttons outside the elevator on the second and third floors; key 8 corresponds to the system reset button; lights 1, 2, and 3 indicate that the buttons of each floor in the elevator are pressed; lights 4 and 5 indicate that the up buttons outside the elevator on the first and second floors are pressed; lights 6 and 7 indicate that the down buttons outside the elevator on the second and third floors are pressed; light 8 indicates opening the door.

The floor the elevator is on is indicated by digital tube 1.

3 Conclusion

The elevator controller design in this paper combines the actual operation of the elevator in Shenzhen Information Vocational and Technical College, which is easy for students to understand and accept. It is a very good practical project for the teaching reform of combining work and study. In addition, the elevator controller algorithm proposed in this paper is suitable for any floor and has been verified in the FPGA development environment. It has strong adaptability and practicality.

Keywords:FPGA Reference address:Design of Elevator Controller System Based on FPGA

Previous article:Design of multifunctional signal generator based on FPGA LPM
Next article:Implementation of FPGA in an Intelligent Pressure Sensor System

Recommended ReadingLatest update time:2024-11-16 23:52

Research and Application of FPGA Parallel Digital Serial Transmission and Interface Technology
1 Introduction After more than ten years of rapid development at home and abroad with hardware, system and application design as the main content, the development of FPGA technology in modern information processing and control technology has begun to rise. Obviously, a series of modern info
[Embedded]
Research and Application of FPGA Parallel Digital Serial Transmission and Interface Technology
Design and implementation of a solar tracker based on FPGA
0 Introduction Solar energy is a clean, pollution-free energy source that is inexhaustible and has broad development prospects. However, solar energy is intermittent and has uncertain intensity and direction, which makes it difficult to collect solar energy. The use of a solar tracking device can keep the s
[Embedded]
Design and implementation of a solar tracker based on FPGA
Application of Embedded Logic Analyzer in FPGA Timing Matching Design
introduction As FPGA devices continue to grow in size and packaging density, the use of traditional logic analyzers in FPGA board-level debugging is becoming increasingly difficult. To this end, mainstream FPGA manufacturers have added embedded logic analyzer (ELA) IP soft cores t
[Test Measurement]
Design of a simple digital storage oscilloscope based on single chip microcomputer and FPGA
1 Introduction   Compared with traditional analog oscilloscopes, digital storage oscilloscopes not only have the advantages of waveform storage, small size, low power consumption, and easy use, but also have powerful real-time signal processing and analysis functions. In the field of electronic measurement, digital st
[Test Measurement]
Design of a simple digital storage oscilloscope based on single chip microcomputer and FPGA
Design and implementation of remote monitoring system based on FPGA+DSP
  The purpose and main research content of the project   Research purposes   In order to remotely manage equipment and monitor the environment on site, simplify on-site monitoring equipment, and effectively improve the stability and security of the entire system, a remote controller is planned to be developed, referre
[Embedded]
Design and implementation of remote monitoring system based on FPGA+DSP
Design and verification of logic chip function test system using FPGA chip
In the most primitive testing process, the testing of integrated circuits (ICs) relied on experienced testers using instruments such as signal generators, multimeters, and oscilloscopes. This testing method has low testing efficiency and cannot achieve large-scale and large-volume testing. With the continuous increase
[Test Measurement]
Design and verification of logic chip function test system using FPGA chip
Design of a Simple Digital Storage Oscilloscope Based on FPGA
0 Introduction The development of high-speed digital acquisition technology and FPGA technology has had a profound impact on traditional test instruments. Digital storage oscilloscope (DSO) is a comprehensive product of analog oscilloscope technology, digital measurement technology, and computer technology. It is ma
[Test Measurement]
Design of a Simple Digital Storage Oscilloscope Based on FPGA
Strengthening the collaborative ecosystem: SoC FPGA becomes a powerful weapon
Altera intends to gradually strengthen FPGA co-processors through more advanced process technology and closer industry cooperation, significantly improve the overall performance of SoC FPGA, and create greater differentiation advantages for seizing the embedded system market. As the penetration rate of SoC FPGA in the
[Analog Electronics]
Strengthening the collaborative ecosystem: SoC FPGA becomes a powerful weapon
Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号