Study on time-sharing control of temperature and humidity

Publisher:SparklingRiverLatest update time:2014-03-21 Source: elecfans Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

In the project "Correlation Analysis of Temperature/Humidity Factors and Yunyan Baking Quality", we need an environment where the temperature and humidity change in different time periods. For this purpose, we designed a temperature and humidity time period control system with PIC microcontroller as the core, installed it in a climate chamber, replaced its original control system and used the box and most of the actuators to build a temperature and humidity time period change environment. This system can divide the entire control process into multiple (up to 12) time periods, and set different temperatures and humidity for each time period. The temperature range is room temperature ~ 90oC, and the humidity range is 20~90%RH. However, since it is a dual variable, wide range change system, the variable change range is large, and there are coincidences between variables, which is much more complicated than in the past, so some new problems have been encountered.

Design of temperature control algorithm and simulation test
Since temperature is a long-delay inertial object, after analysis and comparison, the incremental PID control algorithm is used to control the temperature. The sampling period T = 20s is taken, and the control parameters are adjusted by the transient response method to obtain the control equation:
△Ui = 0.69△ei - 0.04ei + 3.1(△ei - △ei-1) (1)
In the formula, △UI: the difference between the current and last control values; ei: the current measurement value; △ei: the difference between the current and last measurement values.
In order to determine the regulation effect of formula (1), we conducted a simulation test: the temperature control is divided into two periods. The temperature is set to 30oC in the first period and the running time is 30 minutes. The temperature is set to 45oC in the second period. In the experiment, the temperature value is recorded every 10s, and then the corresponding values ​​of time-temperature are marked on the coordinate paper and connected into a temperature curve, as shown in Figure 1. Obviously, there are obvious overshoot and wide oscillation phenomena during the temperature transition (the measured amplitude is up to 7 oC). After analysis, it was found that overshoot and oscillation were caused by the hysteresis characteristics of the heater temperature, the saturation effect of the control algorithm and the improper selection of the sampling period. After repeated research, the following correction measures were finally taken: at the beginning of the transition period, the control quantity U was
output according to the maximum value Umax; the sampling period was revised to 10s; when the temperature >40 oC, it was determined to enter the 45 oC insulation stage. Accordingly, formula (1) was modified as follows:
△Ui = 0.35△ei - 0.023ei + 1.57(△ei - △ei-1) (2)
The temperature curves before and after correction are shown in Figure 1. It can be seen that the overshoot and oscillation phenomena have been basically suppressed. The simulation results show that: in the insulation stage, the temperature control accuracy is stable within ±1 oC, and the deviation mainly comes from the transition period from the natural heating stage to the insulation stage.
Figure 1 Transition period temperature curve (the segment with 'Х' is the curve segment after correction)

Humidity measurement design
At present, there are two main humidity measurement methods based on single-chip microcomputers: one is to use the dry-bulb method, and the other is to use a humidity sensor.
Dry-bulb hygrometry test and conclusion
We first tested the dry-bulb method. The principle of dry-bulb hygrometry is: use a thermistor sensor to detect the air temperature (dry-bulb temperature), and use another identical sensor to detect the temperature of the veil soaked in distilled water (wet-bulb temperature). According to the detected temperature difference, the following formula is used for calculation [6]: Relative humidity = {[humidity saturated water vapor pressure-AP (dry-bulb temperature-wet-bulb temperature)]/dry-bulb saturated water vapor pressure}*100%
(A: constant, related to wind speed; P: atmospheric force.)
The calculation of saturated water vapor pressure is the key. We use LOWE polynomial to approximate the saturated water vapor pressure:
       E = C0 + C1T + C2T2 + ┄ + C6T6
(E: saturated water vapor pressure of pure horizontal liquid surface (dry bulb or wet bulb); T: temperature (dry bulb or wet bulb); C0_C6: constant.)
In the experiment, the results of the comparison with the high-precision dual polymer humidity measuring instrument developed by Beijing Great Wall Aerospace Measurement and Control Technology Research Institute are: in the humidity range of 20~90%, when the temperature is low, the comparison deviation is small, and the deviation increases with the increase of temperature. At about 70oC, it has reached 8%. The experiment shows that the dry-wet-bulb hygrometry method is not suitable for high temperature occasions. This conclusion raises objections to the statements in some research papers. Because the ideal calculation formula under high temperature environment is difficult to derive for a while, we finally gave up this hygrometry scheme, but proposed a new research topic.
Polymer film capacitive sensor humidity measurement design The
most commonly used humidity sensors are the following: ceramic humidity sensor, polymer humidity sensor, condensation humidity sensor and capacitive humidity sensor. Among them, capacitive humidity sensor has good linearity, fast response and reliable operation, which is the main trend of humidity sensor development. In particular, the newly launched polymer film humidity sensitive capacitor is the leader in this type of product. In the design of the system, we selected the MSR1 polymer film humidity sensitive capacitor of Qiqihar Keda Sensitive Instrument Factory.

Figure 1 Temperature curve during transition period (the segment with “Х” is the curve segment after correction)

Figure 2 Hardware system composition

Figure 3 Interrupt service program block diagram

After the humidity sensor is converted from wet to electric by the operational amplifier circuit, it enters the microcontroller through the A/D converter. First, according to the characteristic curve and the actual calibration value, a corresponding table of A/D conversion value and humidity value at a specific temperature (20oC) is established at an interval of 1%. Because it is an environment with a large temperature change, in order to ensure the measurement accuracy, the temperature must be compensated. To this end, the above measurement and data processing process is repeated at temperatures of 30oC, 40oC, 50oC, 60oC, 70oC, 80oC, and 90oC to form 8 corresponding tables of A/D conversion value and humidity value, and then linear interpolation is used to finally obtain the temperature compensation value every 1oC. All tables and data are written into EPROM, and the humidity value is obtained by looking up the table during measurement. In the above design, the software advantages of the computer are fully utilized, so that the humidity measurement error does not exceed ±2% within the allowable temperature change range. Due to the rapid change of humidity and small inertia, a direct adaptive control algorithm is used to control humidity.
In the design process of humidity measurement above, different types of capacitive sensors produced by several manufacturers were tested, which deepened their understanding. It is necessary to make some explanations for reference when peers develop similar products: ① Each sensor is given two calibration data (such as 0% output voltage value and 50% output voltage value). Since the sensor has good linearity, the output characteristic curve corresponding to the temperature of 25 oC can be drawn based on these two points, and no calibration is required. The manufacturer also gave a temperature compensation calculation formula: true output voltage value = sensor output voltage value/(a+bT) (a and b are determined data, T is the ambient temperature, when T is equal to 25 oC, a+bT=1). Therefore, according to this formula, the output characteristic curve at different temperatures can be obtained. Many manufacturers claim that the adaptability range of the sensor is -10 oC~90oC and 20~90% full humidity and full temperature area. In fact, we have found through experiments that with the increase of temperature and humidity, the error of the characteristic curve obtained above is getting bigger and bigger, especially in the high temperature and high humidity area with temperature>80oC and humidity>80%, the error will reach an unacceptable level. Therefore, the characteristic curve of the high temperature and high humidity area should be obtained through actual calibration rather than through the method given by the manufacturer. ② In the microscopic environment where the sensor is placed, the wind speed should be kept constant, otherwise it will cause measurement instability. If necessary, simulated wind can be added.
Hardware system composition
The system control core uses the PIC16C72 single-chip microcomputer. Since the chip has its own EPROM and A/D circuit, and the 22 I/O ports have strong load capacity (can directly drive LEDs), this hardware circuit only requires a few peripheral components. The hardware system composition is shown in Figure 2. The five-way execution modules respectively realize the control of each parameter, among which the temperature rise is continuous control. The pulse width modulated pulse output by the single-chip microcomputer is isolated and driven by the photoelectric thyristor to control the heating power of the electric heater. Since the temperature rise control is the most used control in the working process, its high precision and high stability improve the control performance of the entire system. Humidity control is switch control. Ultrasonic electric humidifier is used for humidification, and dehumidification fan is used for dehumidification.
Figure 2 Hardware system composition

In addition to the main program, the software design
also includes interrupt service, measurement, keyboard, display, control algorithm, A/D conversion, temperature compensation and table lookup function modules. Since the system control process is implemented by the interrupt service program, this article gives the interrupt service program flow chart (see Figure 3), from which we can see the idea and overview of the entire program design.

Conclusion
This system has been successfully developed and put into operation for more than one year. The results show that the system is stable and reliable and has good effects. In addition, although this system is developed for scientific research, it is also suitable for baking and drying of agricultural and sideline products, production and processing of food, artificial climate chambers and other application fields.
Figure 3 Interrupt service program flowchart.

Reference address:Study on time-sharing control of temperature and humidity

Previous article:Implementation of 4-level intelligent dimmable electronic ballast circuit
Next article:Design and application of low-power wireless digital transmission module

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号