【正文】
這種溫度控制器 有相配套的實(shí)驗(yàn)手冊(cè),它能夠幫助學(xué)生運(yùn)用正確的方法做實(shí)驗(yàn)。在這個(gè)例子中,給定的溫度值為 30 攝氏度,并且溫度達(dá)到該值而沒有超越設(shè)定值和沒有出現(xiàn)錯(cuò)誤。 ZieglerNichols 圖是用來辨認(rèn)系統(tǒng)的一種好方法,如圖 5 所示。 實(shí)驗(yàn)例子: 系統(tǒng)的驗(yàn)證 系統(tǒng)的動(dòng)態(tài)特性不以模型的參數(shù)特性來驗(yàn)證的,而是用反應(yīng)曲線的方法來進(jìn)行驗(yàn)證。這波形通常是用來控制 MOSFET 電源開關(guān),這加熱器與整個(gè)設(shè)計(jì)的工作量密切相關(guān)。 模型 這一系統(tǒng)和先前的系統(tǒng)幾乎是一樣的。 PIC16F877 微型控制器符合我們的所有要求。 圖 3:溫度控制器的電路原理圖 溫度傳感器: 試驗(yàn)中使用的溫度傳感器是 3 個(gè)引腳的半導(dǎo)體傳感器,它有一個(gè)直接與溫度相對(duì)應(yīng)的輸出電壓。溫度傳感器是用低成本的半導(dǎo)體元件做成的,它能夠被內(nèi)部的玻璃管保護(hù)。 圖 1 顯示的是數(shù)字溫度控制器的原理圖。這種單元可以直接與計(jì)算機(jī)相連接,并且由 PID 控制器,電源放大器和溫度傳感器組成。本文將詳細(xì)描述這種溫度控制器件的設(shè)計(jì),模型和數(shù)字控制。仿真器仍然會(huì)在分析的最初水平上被使 用但是這并不能取代現(xiàn)實(shí)中的物理實(shí)驗(yàn)。目前,像 TUTSIM,20sim, program CC, VisSim, Extend 和 MATLAB 這樣的軟件包在計(jì)算機(jī)的平臺(tái)上是非常有用的,絕大多數(shù)的大學(xué)院校都把這些軟件的花費(fèi)作為其中的一項(xiàng)預(yù)算。Modeling and identification of a real physical process Using the ZieglerNichols tuning method Using microcontrollers in process automation Developing and experimenting with digital PID controllers. Figure 2 shows a picture of the prototype experiment kit. The kit is rather simple, consisting of only low cost materials. A round plastic container is used to store the water. The heater element and the sensor are immersed in this container. The temperature is sensed using a low cost semiconductor sensor, which is protected inside a glass tube. The heating element is the type which is used in camping and other outdoor activities in order to warm up liquid in a cup, for example for making coffee. The heater operates with 12V, draws 10A of current and provides a power of 120W. A laboratory power supply to provide such high power is usually rather expensive so a standard 350W PC power supply is used instead, costing no more than ﹩ 50 .Using a low voltage in an experimental kit has the advantage that the system is safe as there is no risk of electric shock . Fig 2: The temperature control kit Figure 3 shows the electrical circuit diagram of the kit .The circuit is rather simple, consisting of only a few parts .LM35DZ is the analog semiconductor temperature sensor , PIC16F877 is the microcontroller ,and IRL1004 is a power MOSFET switch ,used to drive the heater element . The temperature sensor The temperature sensor used in the experiment is a 3pin semiconductor sensor with an output voltage directly proportional to the temperature. The output of the sensor is connected to one of the A/D converter inputs of the microcontroller. There was the option of using a digital output sensor ,but they are usually more expensive and it was also felt necessary to use an analog sensor and teach the students the practical applications of A/D converters. The microcontroller In order to lower costs ,we needed a microcontroller with a builtin A/D converter. Process control algorithms require the use of floatingpoint arithmetic and as a result,a microcontroller with a large date memory was also required. Author requirement to lower the cost was a builtin pulse width modulated (PWM) output ,which was used to drive the heater circuitry linearly .The development of floatingpoint arithmetic routines is very plex using the assembly language and it was decided to program the microcontroller in a highlevel language which also supported the floatingpoint arithmetic. The PIC16F877 microcontroller satisfied all of our requirements. This is one of the most popular microcontrollers used in industry and it offers the following features: 8K x14 flash program memory 368 bytes RAM memory 256 bytes EEPROM memory 8x10 bit A/D converters Pulse width modulated (PWM)output Highlevel language support The FEDC piler was used for program development. This is a Windowsbased lowcost piler for the PIC family of microcontrollers. The piler offers a large number of standard C library functions, including support for floatingpoint arithmetic. The heater driver An IRL1004 power MOSFET switch is used to drive the heater element. This MOSFET can dissipate up 200W when mounted on a suitable heat sink. The heating element is connected to the drain pin of the MOSFET and the gate input is controlled from the microcontroller (see ). Large industrial temperature control systems are based on . power control techniques using thyristors and triacs and appropriate theory is given to the students on this topic. Modelling The system can be approximated to a firstorder system with a time lag. A simplified mathematical model of the overall system can be derived as described here. Mathematical model of the tank The heatbalance equation for the tank can be written as: Heat input to the system=heat increase in the system +heat losses If we let m1=mass of water inside the tank m2=mass of the water c1=specific heat capacity of the water c2= specific heat capacity of the tank Ignoring the heat loss through the walls of the tank and the heat capacities of the heater element and the mixer ,we can write the following equation Heat increase in the tank=(m1*c1+m2*c2) dtdT Heat loss from the tank= h*A*(TTa) Where Ta is the ambient temperature, A is the tank top area, and h is a constant, which depends on the surface and the ambient temperature. Thus, the heat input to the system is