Fuzzy Control System Based on 80C196 Microcontroller
2026-04-06 06:00:57··#1
Abstract: Taking a heating furnace as the controlled object, this paper introduces an intelligent temperature fuzzy control system. The fuzzy controller is implemented using an 80C196 microcontroller and has functions such as data acquisition, furnace temperature control, and fault detection. A rule-based self-optimization control algorithm is used for process control. The algorithm is studied in depth, and simulation results show that the system has good control effect, high steady-state accuracy, and small overshoot. Keywords: Fuzzy control, microcontroller, rule-based self-optimization algorithm 1. Introduction Fuzzy control is a branch of intelligent control. It has the following characteristics: It is a nonlinear control method with a wide operating range and broad applicability, especially suitable for the control of nonlinear systems; it does not depend on the mathematical model of the object. For complex objects that are difficult or impossible to model, human experience and knowledge can be used to design a fuzzy controller to complete the control task, while traditional control methods require knowledge of the mathematical model of the controlled object to design the controller; it has an inherent parallel processing mechanism, exhibiting strong robustness and insensitivity to changes in the characteristics of the controlled object; the design parameters of the fuzzy controller are easy to select and adjust; the algorithm is simple, fast, and easy to implement, requiring little knowledge of control theory. Heating furnaces are widely used in industrial production processes such as metallurgy and chemical engineering. The temperature of the heating furnace is a crucial indicator of the production process, and the quality of temperature control directly affects product quality. Heat treatment furnaces are a process for improving the properties of metallic materials and their products (such as machine parts and tools). Depending on the purpose, materials and products are heated to a suitable temperature, held at that temperature, and then cooled using different methods to alter their internal structure and obtain the desired properties. Heat treatment is one of the important means to improve the quality of metallic materials and their products. Heat treatment furnaces exhibit nonlinear characteristics such as large inertia and pure time lag, as well as time-varying properties. Factors such as opening and closing the furnace door, the heating material, ambient temperature, and power grid voltage all affect the control process. Conventional control methods based on precise mathematical models, such as PID control, are insufficient to guarantee the heating process curve requirements. As a major branch of nonlinear control, fuzzy control can be well applied in the aforementioned temperature control systems. This paper introduces a fuzzy control system for a heating furnace based on the 80C196 microcontroller. 2. Design of Fuzzy Controller This control system mainly performs functions such as data acquisition, temperature display, furnace temperature control, fault detection, and alarm. The intelligent fuzzy controller is implemented by a microcontroller and uses a rule-based self-optimizing control algorithm for process control. The heating furnace adopts bidirectional thyristor control, with the microcontroller outputting an on/off rate control signal to generate a zero-crossing trigger pulse for the thyristor. The core of the entire system is the fuzzy controller, with the 80C196 microcontroller as its main body. It, along with several expansion circuits (program memory, data memory, address latch, address decoder, etc.), constitutes the processor module. The mV signal output by the temperature measuring thermocouple is converted into a 0-10V standard signal by the transmitter chip, and then this signal is converted by an A/D converter before entering the microcontroller. The microcontroller calculates the control quantity according to various input commands through the fuzzy control algorithm, outputs a pulse trigger signal, and drives the bidirectional thyristor through the zero-crossing trigger circuit, thereby controlling the heat treatment heating furnace. In addition, the intelligent controller also includes a hardware watchdog circuit, a fault detection circuit, a digital display circuit, and a power supply. The hardware block diagram of the intelligent fuzzy controller is shown in Figure 1. Figure 1 Hardware block diagram of temperature fuzzy controller The main program of the fuzzy controller includes initialization, keyboard management and calling of the control module and display module. The implementation of functions such as temperature signal acquisition, digital filtering, scaling transformation, control algorithm and temperature display is completed by each subroutine. The main flow of the software is: the sampling period is generated by the timer T0 of the 80C196 microcontroller and the software counter. When the period is up, the program switches to the control module, calls the A/D conversion, digital filtering and scaling transformation module to obtain the furnace temperature feedback signal, calculates the control quantity according to the deviation and the rate of change of the deviation, and outputs the pulse signal to control the zero-crossing trigger. Start, stop and setpoint are generated by external interrupt through the keyboard. When there is key input, the interrupt service program is called. The program flowchart is shown in Figure 2. (1) Main program flowchart (2) Control algorithm module flowchart Figure 2 Temperature fuzzy controller program flowchart 3. Research on fuzzy control algorithm The object of this system, the heat treatment heating furnace, is a large inertial system with pure time delay. It is difficult to guarantee the heating process curve requirements by using conventional control based on accurate mathematical model. Therefore, the rule self-optimization algorithm in fuzzy control algorithm is selected. The basic principle of the algorithm is to use the control rules described by analytical expressions, which is simple, convenient and easy to process. The two-dimensional control rule self-optimization algorithm can be summarized by the analytical expression: U=-[αE+(1-α)C] (1) Where: E, C, and U are fuzzy variables after quantization and fuzzification, and the corresponding domains of discourse are error, error rate of change and control quantity, respectively. α is the adjustment factor. It can be seen from the control rule described by equation (1) that the control action depends on the error and error rate of change, and by adjusting the size of α, the different weighting degrees of error and error change can be changed. Once the value of α is determined, it will not change in the whole control process. However, in the actual system, the weighting degree of error E and error C in the control rule has different requirements under different states. For example, when the error is large, the main task of the control system is to eliminate the error, and the weighting of the error should be larger at this time; when the error is small, the main task of the control system is to stabilize the system as soon as possible and reduce overshoot, and the weighting of the error rate of change in the control rule should be larger at this time. In order to obtain good control performance, the value of α is required to be adjustable in the control process, that is, the control rule can be corrected online in the control process. The online correction of α is carried out by the optimization design method, as shown in equation (2). α(k+1)=α(k)+0.618[1-α(k)] |E|≥3 0.618α(k) |E|<3 (2) The control principle diagram of the system is shown below. Figure 3 Schematic diagram of the fuzzy control system for heating furnace temperature 4. Performance analysis After simulation, the system works stably and is easy to operate. All indicators meet the design requirements. Figure 4 is the temperature curve of a heating furnace. It can be seen from the figure that the curve has good tracking performance, high steady-state accuracy, and small overshoot. Figure 4 Temperature curve of a heating furnace 5. Conclusion This paper introduces the temperature control system of a heat treatment heating furnace implemented by a single-chip microcomputer. Since the controlled object is a large inertial link with pure time delay, the intelligent fuzzy controller can achieve the ideal control effect. The experimental results show that the system has the following characteristics: (1) The control scheme is reasonable, the steady-state accuracy is high, and the overshoot is small. (2) The structure is simple, the debugging is convenient, the anti-interference is strong, and the robustness is good.