Design of chain ladder speed reduction control system based on single chip microcomputer

Publisher:bemaiiLatest update time:2011-10-29 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The high-rise building emergency non-powered circulating chain ladder escape device is very necessary for people living in high-rise buildings to escape from fire. The non-powered fire chain ladder is a typical variable load nonlinear system. As the load increases, the current in the generator winding increases, the magnetic field is enhanced, the speed is accelerated, and the chain ladder's descent speed also increases. The system requires that no matter how the load changes, the stable descent speed of the chain ladder must be maintained at 0.4 m/s~0.5 m/s. For this reason, this paper designs a parameter adaptive fuzzy PID controller based on a single-chip microcomputer. According to the actual response of the chain ladder, it automatically adjusts, modifies and improves the control rules and parameters during the control process, so that the control performance of the system is continuously improved to achieve the best control effect.
1 Main hardware circuit design of the system
The hardware of the control system mainly consists of three parts: sensors, controllers and actuators. The sensor is used as the input part to measure the speed of the generator and convert it into an electrical signal; the controller is used to receive the input signal of the sensor, calculate and process it according to the set program, and output the result; the actuator drives the actuator according to the signal output by the control unit to change it as required. The structural block diagram of the control system is shown in Figure 1.

The speed sensor continuously collects the generator speed and enters the MCU for fuzzy-PID algorithm processing. The MCU processes the collected speed deviation e and deviation change value ec through fuzzy algorithm (lookup table), adjusts KP, KI, KD online, and finally calculates the control output u through PID formula. The output u controls the on and off of the thyristor to control the size of the load resistance.
This control system is based on the ATMEL89C52 MCU. AT89C52 is an improved version of the MCS-51 MCU and is a high-performance CMOS 8-bit microcontroller. Because it has a built-in 8 KB Flash memory, the structure of the MCU system is greatly simplified [1].
1.1 Speed ​​detection circuit
The sensor outputs a relatively weak pulse signal, which needs to be converted into a standard input signal of the MCU with an amplitude of +5 V, which is implemented using the LM311 comparator. The actual circuit is shown in Figure 2. R2 and R3 are used to adjust the reference voltage of the comparator, which is set to 0.25 V. When the output voltage of the sensor is higher than the reference voltage, the comparator outputs a high level of +5 V, otherwise it outputs a low level of 0 V. The size of the comparator pull-up resistor will affect the output amplitude. After changing from 500 Ω to 15 kΩ, the output amplitude increases. This circuit outputs a stable and regular waveform.

1.2 Drive execution circuit
In the single-chip microcomputer system, each resistor corresponds to an interface. When the personnel changes, as long as the corresponding port outputs a high level according to the control amount, the thyristor is turned on, and the load resistance can be changed to adjust the speed of the generator.
Since the signal output by the single-chip microcomputer is not enough to trigger the thyristor, the trigger power must be amplified. The trigger pulse is output from the port of the single-chip microcomputer, and the trigger pulse must pass through the optoelectronic isolator and the transistor. The optoelectronic isolator is used to improve the system's anti-interference ability, and the transistor is used to increase the drive current. This circuit consists of a buffer, an optoelectronic isolator, a transformer and other components, as shown in Figure 3.

When there is no pulse signal at the MCU AT89C52 port, the opto-isolator TIL117 is turned off and the transformer has no pulse output. When there is a pulse signal at the MCU port, the opto-isolator TIL117 is turned on, thereby turning on the corresponding transistor BG. In this way, the trigger pulse is output through the pulse transformer T, prompting the thyristor to trigger and turn on. 1.3 Watchdog hardware circuit In order to ensure the reliable and stable operation of the MCU in the chain ladder system, a "watchdog" monitor is required [2]. Since the AT89C52 used in this control system does not have a watchdog function, once the system is disturbed on site and the program runs away, the MCU has no self-protection ability and cannot make the system work again. For this reason, this system uses a "watchdog" hardware circuit composed of MAX706 and AT89C52, as shown in Figure 4. MAX706 is a low-power CMOS monitoring circuit chip with excellent performance. Its internal circuit consists of power-on reset, a repeatable triggerable "watchdog" timer and a voltage comparator [3].

When the CPU is working normally, the circuit does not interfere with it. When the CPU malfunctions for a period of time, the watchdog circuit will be activated to reset the system and restart it. [page]

2 System software design
The software design of the entire speed control system includes the main program design and the subprogram design of various functions. The main program is mainly responsible for the power-on initialization of the entire system, as well as the status setting of functional registers and port registers. The flow charts of the main program and several main processing subprograms are given below.
2.1 Main program
The main program is the management-level program, which mainly completes the initialization of the system and waits for interrupt signals. Its flow chart is shown in Figure 5.

2.2 Speed ​​measurement subroutine
The speed measurement of the generator in this system is implemented using the M/T method [4]. Timer T0 counts external pulses and records the number of pulses m1 output by the sensor. Timer T1 counts internal pulses and records the number of clock pulses m2. Timer T2 determines the sampling period T. The start time of the timer is always consistent with the first pulse leading edge of the sensor. The number of pulses m1 is obtained within the time T. At the same time, another counter counts the standard clock pulses. When the timing T ends, only the external pulse counting stops. After the timing ends, when the sensor outputs the first pulse leading edge, the standard clock counting stops and m2 is obtained. Its duration Td=T+ΔT, the speed

2.3 Fuzzy PID control program
In order to reduce the complexity of online calculation and improve the implementation speed of the algorithm as much as possible, this system uses a table lookup method to realize the fuzzy real-time adjustment of PID parameters. The control program flow chart is shown in Figure 7.

This system controls the speed of the generator by adjusting the load current of the generator, that is, changing the load resistance, so as to control the descending speed of the chain ladder, which is a major innovation of this paper. The system takes the AT89C52 single-chip microcomputer as the core, and designs the hardware and software of the chain ladder speed reduction control system. The hardware part mainly designs the speed detection circuit and the drive execution circuit. In addition, in order to ensure the normal operation of the system, a watchdog circuit is designed. The software part mainly designs the main program and some subroutines. In addition, the fuzzy PID control algorithm is adopted. On the basis of retaining the advantages of the conventional PID control algorithm, it also has strong adaptability and good anti-interference performance when the parameters change, so that the stable descending speed of the chain ladder is always maintained at 0.4 m/s 0.5 m/s.
References
[1] Yu Yongquan. Application technology of ATMEL89 series single-chip microcomputer [M]. Beijing: Beijing University of Aeronautics and Astronautics Press, 2002.
[2] Li Weiguo, Yu Xiaohong. A new software design method for single-chip microcomputer "watchdog" circuit [J]. Foreign Electronic Components, 2000 (10).
[3] MAXIM. Product Selector Guide. 2000.
[4] Li Yongdong. AC motor digital control system [M]. Beijing: Machinery Industry Press, 2002.

Reference address:Design of chain ladder speed reduction control system based on single chip microcomputer

Previous article:Design of electronic password lock based on STC89C52 single chip microcomputer
Next article:Design and implementation of a multi-computer peripheral sharing controller based on single chip microcomputer

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号