Development of PROFIBUS bus-based intelligent temperature controller
2026-04-06 05:14:29··#1
Abstract: This paper introduces the design method of a common intelligent temperature control instrument slave station based on PROFIBUS-DP fieldbus. Fuzzy adaptive PID control is adopted here, enabling the instrument to have good control performance for systems with different parameter models. Due to the use of fieldbus communication technology, the controller slave station has good adaptability, flexible configuration, and is easy to expand and manage. Keywords: Adaptive fuzzy PID control; SPC3; PROFIBUS-DP fieldbus; Introduction Currently, the most commonly used control technology for various temperature control instruments is digital PID control technology. Furthermore , the model or structure of the controlled temperature system often changes during operation, making it difficult to achieve good control results without adjusting the controller parameters. Adjusting PID parameters is a complex process requiring considerable experience. Fuzzy adaptive PID control can detect and analyze uncertain conditions, parameters, delays, and disturbances during the control process. Employing fuzzy inference, it enables online self-adjustment of PID parameters, making temperature control instruments more convenient to use and improving control accuracy. While many temperature control instruments now have RS232 serial communication interfaces, allowing serial communication with PCs or other devices, this one-to-one communication method is unsuitable for the rapidly developing bus-based control systems and fails to meet the requirements of industrial production. PROFIBUS is one of the most widely used fieldbus protocols in the world, holding a significant market share. Therefore, designing and developing an intelligent temperature control instrument slave station with advanced control algorithms and a PROFIBUS-DP interface has both theoretical and practical significance. 1 System Hardware Design The temperature control instrument is designed as a slave station in a PROFIBUS-DP bus system. Its block diagram is shown in Figure 1, mainly composed of an SPC3 communication board and a temperature control instrument mainboard. The SPC3 is a dedicated protocol conversion chip from SIEMENS, Germany. It integrates the FDL layer of the DP protocol, enabling it to handle the microprocessor load for communication and independently complete all PROFIBUS-DP communication functions. The main tasks of the Intel 80C32 microprocessor are data acquisition, temperature control, organizing the acquired field data and sending it to the master station via the SPC3, and storing the output data received from the master station based on interrupts generated by the SPC3. [align=center] Figure 1. System Structure Block Diagram[/align] In this system, the temperature sensor used is the AD TMP03/04 time-output digital temperature sensor. This sensor outputs a modulated rectangular wave. In applications, only the actual time widths T1 and T2 of the output square wave duty cycle T1/T2 need to be measured to calculate the temperature of the measured object. When connected to the microprocessor, simply connecting the chip output to the microprocessor's timer/counter makes it easy to measure the time widths T1 and T2 and calculate the corresponding temperature values. Secondly, the 80C32 microprocessor has only 256 bytes of on-chip RAM. The system expands this with 64KB of EPROM and 32KB of RAM to store user-set parameters, station addresses, identification numbers, various messages, and parameters required for data acquisition and intelligent control. LED display and keyboard input further enhance the system, enabling on-site adjustment of control parameters and retrieval of relevant information. The system uses an 8155 as the interface for an 8-digit LED display and a 4-digit keyboard, simultaneously displaying the system's set temperature and detected temperature. The 4-digit keyboard includes digit selection keys, increment keys, decrement keys, and function keys. The PA and PB ports of the 8155 serve as row and column selection lines for the LED display, respectively, while the lower 4 bits of the PC port serve as the keyboard input. The circuit of the interface unit between the 80C32 and SPC3 is shown in Figure 2. Its main function is to use the SPC3 protocol chip to connect the slave instrument to the PROFIBUS-DP fieldbus, thereby enabling data transfer between the master and slave stations. The interface unit uses the 80C32 as the processor unit to manage communication transactions, while the protocol chip SPC3 handles the critical time frame portion. The SPC3's internal SRAM stores data, and the 80C32 initializes the protocol chip and handles data reception and transmission. Data is exchanged between the SPC3 and 80C32 via dual-port RAM; the SPC3's dual-port RAM should have addresses uniformly allocated within the 80C32's address space. Furthermore, the 80C32 expands its external memory (EPROM and RAM) through ports P0 and P2. Port P0 serves as the data line and the lower 8 bits of the address line, connected to the RAM via an address latch; port P2 serves as the higher 8 bits of the address line and can be directly connected to the RAM. The external 64K EPROM is controlled by the 80C32's external program memory read strobe. Pins 8, 9, and 10 of the SPC3's address bus are grounded via resistors. The clock pulse signal generated by the SPC3's baud rate generator, after frequency division, can simultaneously provide clock pulses to the 80C32, eliminating the need for an external crystal oscillator. [align=center] Figure 2 80C32 and SPC3 Interface Circuit Diagram 3 System Program Flowchart[/align] 2 System Software Design The main program schematic is shown in Figure 3. The main program includes initialization, data acquisition and intelligent control programs, and PROFIBUS-DP bus communication programs. The initialization program initializes the 80C32 microprocessor and the SPC3 protocol chip. The PROFIBUS-DP communication program realizes communication between the slave and master stations of the intelligent temperature controller by writing the PROFIBUS-DP protocol. The core part of the communication software development is to provide a macro interface for users to access SPC3 registers and a header file module for variable definition; an interrupt program for handling configuration data checks, slave parameter allocation, and slave address setting interrupt events; and external function modules for calculating input/output data lengths based on configuration data, allocating auxiliary buffers, initializing buffers, setting I/O data lengths, and updating functions for each buffer. Because the system uses the DPS2 software package provided by SIEMENS in its software design, the user's main work is simplified to the design of the user's main program. This mainly focuses on the initialization and startup of SPC3, external signal processing, sending and receiving data from the master station, handling diagnostic transactions, and the intelligent control program. This shortens development time while ensuring the implementation of various functions of the DP slave station and the reliability of the system development. 3. Fuzzy Adaptive PID Control The principle block diagram of the fuzzy adaptive PID control system is shown in Figure 4. It is an adaptive control system that adjusts PID parameters using fuzzy rules. Based on the ordinary PID control system, a fuzzy control rule link is added, thus providing the inference results of the PID parameters under different real-time states. [align=center] Figure 4 Principle Diagram of Fuzzy Adaptive PID Control System[/align] Table 1 Fuzzy Control Table 4 Summary This paper designs and discusses a general-purpose intelligent temperature control instrument from both hardware and software perspectives. The instrument uses the communication controller SPC3 and media access lines to realize data exchange between the instrument and the fieldbus network, improving the interoperability between instruments. The control algorithm adopts fuzzy adaptive PID control technology, enabling the instrument to be applied to a wider range of control objects and possessing a certain degree of versatility. References [1] Yang Xianhui, Wei Qingfu, Xu Yong'e. Fieldbus Technology and Its Applications [M], Beijing: Tsinghua University Press, 1999. [2] Liu Baokun. Computer Process Control System [M], Machinery Industry Press, 2000 [3] Yi Jikai, Hou Yuanbin. Intelligent Control Technology [M], Beijing University of Technology Press, 1999 [4] Fang Yanjun, Xue Fei. Development and Implementation of PROFIBUS-DP Intelligent Slave Station [J], Instrument Technology and Sensors, 2004.4