Design of Dual Fuzzy Temperature Controller Based on AT89S52 Single Chip Microcomputer

Publisher:疯狂小马Latest update time:2013-02-27 Source: 21IC Keywords:AT89S52 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

In modern industrial control, temperature control is very important and increasingly complex. Due to the characteristics of temperature control such as nonlinearity, large lag, time-varying, and unidirectional temperature rise, it is difficult to establish an accurate mathematical model in practical applications, and it is impossible to use classical control theory and modern control theory to solve the temperature control effect. At present, fuzzy control in modern intelligent control that does not rely on the mathematical model of the object and can effectively control time-varying and nonlinear systems has been widely used in industrial temperature control. Through basic fuzzy control of temperature, a good control effect can be achieved, but there is a certain steady-state error, and it is difficult to achieve a high control accuracy. If different temperature fuzzy controls are used according to different working states of the system, that is, dual fuzzy control, the steady-state error can be greatly improved and the control accuracy can be improved. At the same time, using a single-chip microcomputer as the main control chip can effectively complete temperature fuzzy processing and real-time temperature control with high reliability.

1 Controller Function and Hardware Design

The dual fuzzy temperature controller mainly uses a single-chip microcomputer as the main control chip, which is mainly responsible for the fuzzy processing of temperature, the implementation of fuzzy control algorithm, and the size control processing of output temperature. The industrial field temperature is collected by a temperature sensor, and the sensor output signal is converted into a standard signal of 0-5 V by a transmitter. After A/D conversion, it is compared with the temperature setting value to obtain the temperature error signal e and the temperature change rate ec. In the initial stage and steady state stage of the system, both are sent to different single fuzzy controllers for fuzzy processing to obtain the output control quantity u. After isolation and amplification, the power thyristor is controlled to change the power of the heating element, thereby completing the temperature adjustment. The principle block diagram of its temperature control system is shown in Figure 1.

 

The main control chip of the temperature controller uses the AT89S52 microcontroller from ATMEL, which is a low-power, high-performance CMOS 8-bit microcontroller with 8 kB in-system programmable Flash memory and 256B RAM, 32-bit I/O lines, 3 16-bit timers, 6 interrupt sources and a watchdog timer, etc., which can meet the basic design and extended design requirements of the temperature controller.

The temperature sensor uses nickel-chromium/nickel-silicon thermocouples, which have the characteristics of good linearity, large thermoelectric potential, high sensitivity, good stability and uniformity. Its operating temperature is 0~1300℃, and the corresponding output is 0~52.37 mV[1]. The temperature transmitter uses DBW type to convert the millivolt signal output by the thermocouple into a 0~5 V standard analog signal. The signal is input through the IN0 channel of the A/D converter ADC0809 and converted into a digital signal. The AT89S52 microcontroller uses the control program to input its internal RAM unit from the P0 port to compare with the temperature setting value[2]. The fuzzy controller outputs the control quantity through P1.0 output, and drives the power thyristor through the photoelectric bidirectional thyristor driver MOC3051, thereby changing the heating power of the heating element to achieve the purpose of temperature regulation.

Considering the human-computer interaction of the system, the parallel interface chip 8155 is used to expand the I/O port to complete the design of keyboard input and display output. The keyboard adopts a matrix keyboard, which is responsible for parameter setting and some switch input, such as: start, stop, reset, temperature setting, set value modification, temperature numeric keys, etc.; and the display adopts an LED display to display the system set temperature and actual temperature at the same time.

2 Dual fuzzy control algorithm design

2.1 Dual fuzzy controller structure design

This fuzzy controller adopts a dual fuzzy control structure and a typical dual-input, single-output method, as shown in Figure 2. The error e and the rate of change ec between the temperature set value and the temperature feedback value are used as input quantities, and the temperature control quantity u is used as the output quantity. Since the system has errors of different sizes under different control states, if a single fuzzy controller is considered, there will be a contradiction between the system's rapid response and control accuracy [3], and the two cannot be taken into account. For this reason, a dual fuzzy controller is designed, and an error critical value is artificially set to complete the dual-mode control switching [4]. In the initial stage of the system, the system error is large, and a fuzzy controller with relatively small system factors Kec and Ku (such as Kec1, Ku1) is used to achieve rapid response and eliminate the purpose of error; in the steady-state stage of the system, the system error is small, and a fuzzy controller with appropriately increased system factors Kec and Ku (such as Kec2, Ku2) is used to improve the steady-state performance of the system.

[page]

2.2 Dual fuzzy control strategy

Considering the characteristics of temperature control, the domain of error e, change rate ec and output u is set to [-6, 6], which is quantified into 13 levels, and 7 language values ​​are selected for error e, change rate ec and output u, namely {NL, NM, NS, ZO, PS, PM, PL}. The membership functions of the three all adopt trapezoidal distribution [5], as shown in Figure 3. Based on the experience summary of industrial process control, the corresponding fuzzy control rule table is formulated as shown in Table 1.

In order to improve the real-time response speed of the system, the fuzzy control master table is calculated offline in advance according to the fuzzy control rule table and the language variable assignment table as shown in Table 2. The table is stored in the program memory of the single-chip computer after strict practical testing and repeated modifications. Then, according to the actual change range and domain of the input quantities e and ec in different working states, the quantization factors Ke1, Kec1 and Ke2, Kec2 are calculated, and the proportional factors Ku1 and Ku2 are determined. In actual control, the fuzzy controller multiplies the input quantities e and ec of the system in different working states by the corresponding Ke and Kec respectively, and quantizes them into the language variable domain of the input quantity. Then, according to the quantization result, it is compared with the fuzzy control master table, and the required output quantity U is obtained through the table lookup program. Finally, it is multiplied by Ku to obtain the actual output control quantity u of the system in different working states.

3 Controller Software Design

The software of the dual fuzzy temperature controller adopts a modular design concept, which mainly includes the main program, temperature acquisition program, keyboard/display control program, fuzzy control algorithm program, etc. The following mainly gives the flow charts of the main program and fuzzy control algorithm program, as shown in Figure 4 and Figure 5 respectively [6].

4 Conclusion

The dual fuzzy temperature controller with single chip microcomputer as the control core proposed in this paper is based on the proportional factor self-tuning fuzzy control theory. It uses two fuzzy controllers with different system factors to control the temperature according to the size of the system error. It has a simple structure, is easy to implement, has strong adaptability, can greatly improve the steady-state accuracy, can achieve good control effect for temperature control, and can be widely used in industrial production.

Keywords:AT89S52 Reference address:Design of Dual Fuzzy Temperature Controller Based on AT89S52 Single Chip Microcomputer

Previous article:Design of a wireless portable animal EEG telemetry system based on single chip microcomputer
Next article:Design of wireless ward call system based on AT89C51 single chip microcomputer

Recommended ReadingLatest update time:2024-11-16 16:19

Circuit Design of Ultrasonic Distance Measurement System Based on AT89S52 Single Chip Microcomputer
  Ultrasonic waves are mechanical waves with a frequency of more than 20KHz, and their propagation speed in the air is about 340 m/s (at 20°C). Ultrasonic waves can be generated by ultrasonic sensors. There are two common types of ultrasonic sensors: one is to generate ultrasonic waves electrically, and the other is t
[Power Management]
Circuit Design of Ultrasonic Distance Measurement System Based on AT89S52 Single Chip Microcomputer
Design and implementation of intelligent fast charger control system based on AT89S52
1. Introduction    This control system is designed for a 120w intelligent fast voltage-stabilized power supply.    This fast charger is developed for troops working under field conditions, so it is required to have the advantages of small size, light weight, high intelligence, and easy operation. At the same time,
[Microcontroller]
Design and implementation of intelligent fast charger control system based on AT89S52
Design of real-time display control system for stepper motor using AT89S52 and VC++
1 Introduction Stepper motor is an open-loop control component that converts electrical pulse signals into angular displacement or linear displacement. Under non-overload conditions, the motor's speed and stopping position only depend on the frequency and number of pulses of the pulse signal, and are not affected by l
[Microcontroller]
Design of real-time display control system for stepper motor using AT89S52 and VC++
Design of Remote Power Supply Monitoring System Based on AT89S52
1 Introduction In the past two years, with the development of power supply technology, the continuous improvement of the reliability and intelligence of various power supply equipment, and the rapid development of computer technology, the technical foundation for realizing centralized monitoring and
[Power Management]
Design of Remote Power Supply Monitoring System Based on AT89S52
Schematic diagram of ultrasonic distance measurement based on AT89S52 single chip microcomputer
The ultrasonic distance measurement system has simple circuit, stable operation, no debugging required, and high production success rate. It uses AT89S52 single-chip microcomputer as processor, and the working power supply is AC6V and computer USB port. The distance measurement range is 40cm~700cm (blind area 40cm). Th
[Microcontroller]
A digital and speech transmission controller designed with AT89S52 and EPLD chips
There are many schemes for simultaneous voice and data transmission. Most of these schemes digitize the voice signal first, and then transmit it in a package together with external data after compression. The main difference lies in the time occupied by sending a package of voice data and external data, and the divisi
[Microcontroller]
A digital and speech transmission controller designed with AT89S52 and EPLD chips
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号