A temperature controller for passenger car drying room based on fuzzy control based on single chip microcomputer

Publisher:睿智之光Latest update time:2009-12-23 Source: 现代电子技术 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

0 Introduction

At present, domestic passenger car drying rooms include fuel oil, gas (natural gas), electric heating, and steam drying rooms. The temperature of the drying room is an important indicator of the production process. The type of drying room studied in this project is a hot air convection drying room. The heat source is 200℃ superheated steam. The temperature control adopts a more traditional PID type regulator. The steam flow is adjusted by the temperature control valve to control the drying room temperature. Due to the advantages of simple principle and easy implementation, PID type regulators are widely used in process control. It always occupies a dominant position in process control, but its robust performance is not ideal, and it shows obvious deficiencies in processes with large lags and strong interference. Fuzzy control is a nonlinear control technology that does not require modeling, is easy to understand, simple to execute, and has low development cost. Due to these advantages, this paper intends to apply fuzzy control technology to the temperature control of passenger car drying rooms, and makes some attempts.

1 Temperature controller block diagram

The prototype is based on the AT89C55WD single-chip microcomputer, and consists of a keyboard and LED display circuit, a single-chip microcomputer system, a control signal isolation output circuit, a thermal resistor, an A/D conversion circuit, and other parts. The principle block diagram is shown in Figure 1. When the system is working, the temperature setting value is input through the keyboard and displayed on the LED. Then the single-chip microcomputer outputs a pulse width modulation (PWM) signal through an optical coupler control, which forms a 0-10 mA current after rectification and filtering to control the opening and closing of the temperature control valve and heat the drying room. The machine also has high and low limit outputs, and the output relay contacts can withstand 5 A current, which enhances the control function of the machine.

2 Hardware Circuit Design

2.1 Temperature measurement

Since the current domestic passenger car painting adopts low temperature technology and the temperature control range is within 100℃, the thermal resistor PT100 with high temperature measurement accuracy and temperature measurement range can be used as the temperature measurement element. It has good linear relationship with temperature, good stability, and can be used for a long time at 200℃, which is enough to meet the control requirements.

The prototype uses the more common ICL7135 for A/D conversion. The thermal resistance signal is connected to the DC unbalanced bridge through a three-wire connection method and converted into a voltage signal. After the signal is amplified and filtered by the differential amplifier, it becomes a level signal that matches the ICL7135 converter. See Figure 2 for details.

ICL7135 is a common dual-integral digital converter chip. In order to save the I/O port of the single-chip microcomputer, this machine uses the BUSY and POLAR pins of ICL7135 to connect to the two I/O ports of the single-chip microcomputer respectively. The high-level width of the BUSY output terminal is equal to the sum of the integral and anti-integral time. The internal fixed integral time of ICL7135 is 10,001 clock pulses, and the anti-integral time is proportional to the measured voltage. Therefore, the pulse width of the BUSY pin can be measured by a timer of the single-chip microcomputer. After subtracting 10,001 clock pulses, a value proportional to the measured parameter is obtained.

This program design adopts the method of numerical filtering. After multiple conversions by ICL7135, the maximum and minimum values ​​are discarded, and the remaining values ​​are arithmetic averaged to ensure the accuracy of the measurement.

2.2 Temperature control

The heating temperature is controlled by a fuzzy integral algorithm. After the inverse fuzzy operation of the single-chip computer, the output value is obtained. The PWM signal output by the optocoupler is rectified and filtered to form a 0-10 mA constant current signal to control the opening and closing of the temperature control valve and adjust the steam to achieve heating of the heater and achieve the ideal temperature control effect.

2.3 Human-machine interface

This machine has 4 touch buttons and 8-bit common anode display digital tubes. You can adjust various control parameters through buttons, and realize disturbance-free switching between automatic and manual operation. It uses AT93C66 SPI bus E2PROM, which can be erased and written 1 million times, to save the set temperature value, alarm temperature, temperature error and quantization factor of temperature difference change rate, as well as output function table, KI integral coefficient, etc., which can be adjusted through the keyboard, which is convenient for manual adjustment on the production site.

3 Algorithm Design and Implementation

In the temperature control of this system, the heat is dissipated naturally, so the establishment of the fuzzy table in fuzzy control should be determined according to the actual speed of the heater's heat dissipation.

3.1 Fuzzification

Let e ​​be the temperature error, that is, the deviation between the actual temperature and the given temperature. The initial setting range of this machine is -40~+40℃, divided into 5 variable levels (PB, PS, O, NS, NB), ec is the temperature error change rate, the initial setting range is -5~+5℃/min, divided into 4 variable levels (PB, PS, NS, NB), the input signals e and ec of this system use trapezoidal membership function, in order to obtain the speed improvement, this prototype stores 256 data points within the input range in ROM for the fuzzy operation program to look up the table, so as to avoid numerical calculation. This machine can adjust the quantitative factors of temperature error and temperature error change rate through buttons, which is convenient for on-site adjustment.

3.2 Fuzzy Reasoning

According to the operator's manual control experience, this machine adopts the following form to formulate rules, such as: "if A and B then C". A control rule consisting of 20 fuzzy statements can be obtained. This system adopts the maximum and minimum reasoning method, and the operation process is: corresponding to a certain control rule, when analyzing the conditions, compare the size of the two membership values ​​​​e and ec in the current rule, and take the smaller value. The smaller value is stored in a variable named "val". After the condition detection is completed, the result is estimated. The fuzzy control function compares "val" with the reference output value of the current output to obtain the result, and takes the larger value as the output value. Once the result analysis is completed, a new rule query is started. Estimation is performed by traversing the rule base array. After traversing all the rules, the corresponding output is saved in the corresponding array for defuzzification.

3.3 Defuzzification

For the single-chip microcomputer system, considering simplifying the mathematical process of inverse fuzzy processing, the centroid method is used for defuzzification. The temperature output control is U, which is divided into 5 variable levels (PB, PS, O, NS, NB). The output U membership function is expressed by the single-point method. Each output membership function uses a single-point value of one byte, which is stored in AT93C66 and used as a parameter to adjust the output of the system.

3.4 Fuzzy and integral hybrid control

Since the above basic fuzzy controller only considers the output error and error change rate of the object, which is equivalent to a nonlinear PD regulator, coupled with its own multi-stage relay characteristics, it is essentially unable to eliminate the steady-state residual and is prone to limit cycle oscillation. This system adds an integral link.

Considering that the control parameters of this system have a small range of variation, a dual-mode segmented control algorithm can be used for control, that is, when the deviation is greater than a certain threshold, fuzzy control is used to improve the system damping performance and reduce response overshoot. When the deviation is less than a certain threshold, an integral link is introduced. Generally, the integrator should be added after the system enters the "steady state".

The introduction of the integral link should not only consider the structural method of introduction, but also the timing of introduction, because the conventional integral control has a big disadvantage, which is the hysteresis effect of the integral action. When the deviation changes in the direction of reduction, the introduction of integral is not good for the dynamic quality of the system, and it is easy to produce small-scale continuous oscillation and integral saturation phenomena, which are essentially caused by inappropriate timing of addition. In view of the above defects and the root causes of the conventional integral control, an integrator should be added after the system enters the "steady state". The role of the integrator can be changed according to the deviation and the deviation change trend. Only when the deviation changes in the direction of increase, the integral takes effect, suppressing the continued increase of the deviation and improving the stability performance. The introduction method of fuzzy integral is shown in Figure 3, which is composed of a conventional integrator associated with a two-dimensional fuzzy controller.

The conventional integral controller output Ui=KI∑ei and the two-dimensional fuzzy controller output Uf are superimposed as their total output, that is: Un=Ui+Uf. Due to the introduction of the integral link, this controller can eliminate steady-state errors and limit cycle oscillations.

4 Conclusion

The temperature control system has a simple structure, and the main chips used are AT89C55WD, ICL7135, AT93C66, and CD4512. The software is easy to implement, the programming amount is small, the control accuracy is high, and the performance is stable. Due to the use of a single-chip microcomputer with in-system programmable technology, the system can be debugged under normal working conditions, and can be applied to different working environments by simply setting different parameters. The temperature controller prototype was tested in the drying room of Yangzhou Asiastar Bus, and the results showed that it can improve the coating surface quality and production efficiency of the product to a certain extent.

Reference address:A temperature controller for passenger car drying room based on fuzzy control based on single chip microcomputer

Previous article:Temperature Control System Based on PID Algorithm and 89C52 Single Chip Microcomputer
Next article:Realization of LED display screen based on single chip microcomputer and programmable logic device

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号