Sampling Technique in Control System for Room Temperature Control Hany Ferdinando, Handy Wicaksono, Darmawan Wangsadiharja Dept. of Electrical Engineering, Petra Christian University, Surabaya - Indonesia hanyf@petra.ac.id Abstract: A control system uses sampling frequency (or time) to set the time interval between two consecutive processes. At least there are two alternatives for this sequence. First, the controller reads the present value from sensor and calculates the control action then sends actuation signal. The other alternative is the controller reads the present value, send the actuation signal based on the previous calculation and calculates the present control action. Both techniques have their own advantages and disadvantages. This paper evaluates which the best alternative for slow response plant, i.e. room control system. It is controlled by AVR microcontroller connected to PC via RS-232 for data acquisition. The experiment shows that the order of processes has no effect for the slow response plant. Keywords: sampling, temperature, control 1 INTRODUCTION Sampling frequency is used to set the time interval between two consecutive actions. For 1 kHz, the time interval is 1ms. This time interval must be less than the dynamic behavior of the plant. Good control system must choose appropriate sampling frequency in order to get good performance but this is not enough. The order of the action on one sampling time must be considered also. This paper evaluates the idea in [1]. The goal of the experiment is to implement the idea in [1] and compare it with the ordinary order. The sampling time might be disturbed by the delay for some reasons. This makes the system has sampling jitter, control latency jitter, etc. When the delay is equal to the sampling time then we have a problem [2]. If the processes inside one sampling time have periods, then we discuss the multirate sampling control [3]. Here, each process has its own sampling time so we can insert acceptable delay time to compensate the control action. But what if the delay time exceeds the limit? Since sampling time and processes give a lot of influences, we have to choose the sampling time appropriately and consider the processes and the possibility of delay in the system. Considering this delay and all processes within one sampling time, [1] proposes another idea to keep the interval between the processes constant. 1.1 Alternative I This alternative is shown in figure 1. The first alternative sends the current control action for the current situation. It makes the control action is relevant to the present value. This is the advantage of this method. Unfortunately, this technique cannot guarantee, that the time interval between two control actions is constant. This is due to the fact that the controller can receive interrupt signal and it makes the time consumes for control action calculation is longer than the normal way and this is the disadvantage of this alternative. 1.2 Alternative II This alternative uses little bit different order, i.e. the controller reads the present value and sends the previous result of control action calculation [1]. After sending the previous result, the controller calculates the control action and keep the result until the next „tick‟. Figure 2 shows the timing diagram for this alternative. This alternative guarantees that the time interval as discussed in above section is constant for all processes. But the controller uses previous result of control action calculation for current situation. It looks like it does not make sense for the current situation is handled with calculation which is made based from previous situation. 2 DESIGN OF THE SYSTEM The incubator was made of acrylic with dimension 40x30x30 cm. It uses LM35 [4 as temperature sensor and three bulbs controlled via TRIAC [5,6] as heaters. The AVR microcontroller [7] is used to read the LM35 voltage with its internal ADC and actuates the heaters. The control algorithm used in the AVR is parallel PID controller tuned with Ziegler-Nichols method [8]. The AVR (programmed with BASCOM AVR) [9] communicates with PC (programmed with Visual Basic 5) via serial communication for data acquisition. The PC also initiates the start command.