Temperature control technology not only plays a very important role in industrial production, but also plays a vital role in daily life. This paper designs the hardware and software of the system. On the basis of establishing the mathematical model of the temperature control system, the system controller is designed through the analysis of PID control, and the software and hardware debugging of the system is completed. The algorithm is simple, reliable, and robust, and the PID controller parameters directly affect the control effect.
1. System Overview
1.1 Overall system structure
The system uses the rich peripheral modules of AT89S51 to build the hardware platform. The hardware circuit of the system includes: analog part and digital part. The basic circuit consists of core processing module, temperature acquisition module, keyboard display module and control execution module.
1.2 System Workflow
When the system starts working, the single-chip control software first issues a temperature reading instruction, collects the current temperature value of the controlled object through the digital temperature sensor and sends it to the display screen for real-time display. Then, the temperature measurement value is compared with the set value T, and the difference is sent to the PID controller. After processing, the PID controller outputs a certain value of the control quantity, which is converted into an analog voltage by D/A to control the controlled object to heat.
1.3 System Software Design Method
The whole system software design includes two parts: management program and control program. The management program includes dynamic refresh of LED display, control indicator light, and keyboard scanning and response. The control program includes A/D conversion, median filtering, over-limit alarm processing, PID calculation, etc.
2. System hardware structure
2.1 Design of power supply circuit
The DC power supply used in the system is provided by a series DC regulated power supply composed of three-terminal integrated voltage regulators. The design uses three three-terminal integrated voltage regulators, LM7805, LM7815 and LM7915, to provide +5V DC voltage, and the output current is 1A. The transformer steps down the 220V mains power and then rectifies it through a rectifier bridge. A large-capacity electrolytic capacitor is used for filtering to reduce the output voltage ripple. The power supply circuit diagram is shown in Figure 1.
Figure 1 Power supply circuit diagram
2.2 Reset Circuit Design
The quality of the microcontroller reset circuit design directly affects the reliability of the entire system. Only a reliable reset circuit can prevent the system from "freezing" and "program failure". The circuit diagram is shown in Figure 2.
Figure 2 Reset circuit diagram
2.3 Clock Circuit Design
This controller uses an internal oscillation method to obtain the clock signal of the microcontroller. The clock signal obtained in this way is relatively stable. Figure 3 is a clock circuit.
Figure 3 Clock circuit diagram
2.4 SCR output circuit
Silicon controlled rectifier is a power semiconductor device, referred to as SCR, also known as thyristor. This part is a bidirectional silicon controlled rectifier drive circuit for controlling the power of the electric heating furnace, using MOC3041 as the drive circuit. As shown in Figure 4.
Figure 4 SCR output circuit 2.5 Sound and light alarm circuit module
When the temperature measurement value of a channel exceeds the preset upper or lower limit alarm value or the system fails, the system will issue an audible and visual alarm to alert the user, as shown in Figure 5.
Figure 5 Sound and light alarm circuit diagram
3. System software design
3.1 System main program design
In the reactor system, the main function of the main program is to set the relevant variables used in the program execution process, allocate registers, initialize the required parameters, call the corresponding functional modules according to the timer interrupt program, and complete certain tasks.
3.2 System subroutine design
3.2.1 Display subroutine
LED display modes include static and dynamic display. The dynamic scanning display circuit connects all the same field lines of each display together, which are controlled by an 8-bit I/O port, and the common end (common anode or common cathode COM) of each bit is controlled by another I/O port. Since this connection method connects the field lines of each same field together, when the field code is output, each bit will display the same content. Therefore, in order to display different content, it is necessary to adopt a rotation display method.
3.2.2 Timing subroutine
The timing program is mainly used to complete the duty cycle control of the table lookup. The overall idea is to use different timings to change the on and off of the relay according to the different values of the duty cycle control variable U in the control table. According to the characteristics of the relay, it is required not to be on and off frequently, so the on and off time must be a certain length of time, but it must also be considered that the control can take corresponding actions in time according to the changes in the new collected values and set values.
4. Control scheme
4.1 PID control
PID controller is a linear controller that forms a control deviation based on a given value and an actual output value, and controls the controlled object by linearly combining the deviation proportion, integral and differential to form a control quantity.
4.2 PID parameter tuning
Since the output of the PID controller is a linear combination of the proportional, differential and integral effects of the system deviation, adjusting the linear coefficients of each part is the key to the control performance of the PID controller. The PID controller parameters must be adjusted according to the specific controlled object, and the expanded critical proportionality method is adopted:
(a) Select a suitable sampling period T. The so-called suitable means that the period is small enough, generally it should be selected to be less than 1/10 of the pure lag time of the object;
(b) Allow the controller to perform pure proportional control only, gradually increase the proportional coefficient Kp from small to large, until the system has critical oscillation, and record the critical oscillation period Ts and critical oscillation gain Ks at this time;
(c) Select the appropriate control degree. The so-called control degree is the ratio of the integral of the square of the error of the transition process corresponding to the digital controller and the analog regulator;
(d) Look up the table based on the control degree.
4.3 Matlab simulation
Through the comprehensive application of the above tuning methods, the parameters of the PID controller are: Kp=1.75, Ki=0.0125, Kd=3. The simulation model of the temperature control system is established in the MATLAB/Simulink environment, as shown in Figure 6. After simulation, the system step response curve is obtained.
Figure 6 Simulation model
The dynamic performance of the system step response obtained after simulation is still relatively ideal, with small overshoot (peak response value is 1.017, overshoot Q%=1.7%). The system response error is also relatively small (steady-state error is 0.005), which is within the accuracy range required by the system.
5. Summary
The system adopts modular design and has strong expansibility. The modular design makes the controller universal and safe and reliable. It has low cost, simple operation, small size, easy installation, sensitive response and high control accuracy.
Previous article:Software Design of Pulse/Data Generator Based on Embedded WinCE 6.0
Next article:Open FPGA increases test flexibility
Recommended ReadingLatest update time:2024-11-15 15:49
- Popular Resources
- Popular amplifiers
- MathWorks and NXP Collaborate to Launch Model-Based Design Toolbox for Battery Management Systems
- STMicroelectronics' advanced galvanically isolated gate driver STGAP3S provides flexible protection for IGBTs and SiC MOSFETs
- New diaphragm-free solid-state lithium battery technology is launched: the distance between the positive and negative electrodes is less than 0.000001 meters
- [“Source” Observe the Autumn Series] Application and testing of the next generation of semiconductor gallium oxide device photodetectors
- 采用自主设计封装,绝缘电阻显著提高!ROHM开发出更高电压xEV系统的SiC肖特基势垒二极管
- Will GaN replace SiC? PI's disruptive 1700V InnoMux2 is here to demonstrate
- From Isolation to the Third and a Half Generation: Understanding Naxinwei's Gate Driver IC in One Article
- The appeal of 48 V technology: importance, benefits and key factors in system-level applications
- Important breakthrough in recycling of used lithium-ion batteries
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- [RISC-V MCU CH32V103 Review] Real-time marking of file creation time
- Ultrasound imaging technology
- Use itop4412 development board to compile driver module separately
- Diodes and Potentials
- Problems with making the digital tubes flash simultaneously
- EEWORLD University ----TI Precision Labs - Operational Amplifiers: 15 Comparator Applications
- system console
- STM32MP157A-DK1 Evaluation (5) STM32MP Linux System Boot Process
- How to combine the main program + boot program into one configuration for the programmer when programming Renesas chip with PG-FP5
- E220-400TBL-01 lora module wireless test board + 02Lora learning