基于pc的pid溫度測(cè)控系統(tǒng)設(shè)計(jì).doc
基于pc的pid溫度測(cè)控系統(tǒng)設(shè)計(jì),摘 要溫度控制是工業(yè)生產(chǎn)、科研活動(dòng)中一個(gè)舉足輕重的環(huán)節(jié),它直接關(guān)系到整個(gè)生產(chǎn)系統(tǒng)的控制系統(tǒng),因此溫度控制的研究具有重要的現(xiàn)實(shí)意義。本系統(tǒng)針對(duì)溫度控制的特點(diǎn),設(shè)計(jì)了一種基于pc的pid溫度測(cè)控系統(tǒng)。本系統(tǒng)包括遠(yuǎn)程控制終端(rtu)和人機(jī)接口(hmi)兩個(gè)部分。rtu主要作用于信號(hào)采集、測(cè)量和控制。hmi主要實(shí)現(xiàn)的是溫度數(shù)...


內(nèi)容介紹
此文檔由會(huì)員 jbn12357 發(fā)布摘 要
溫度控制是工業(yè)生產(chǎn)、科研活動(dòng)中一個(gè)舉足輕重的環(huán)節(jié),它直接關(guān)系到整個(gè)生產(chǎn)系統(tǒng)的控制系統(tǒng),因此溫度控制的研究具有重要的現(xiàn)實(shí)意義。
本系統(tǒng)針對(duì)溫度控制的特點(diǎn),設(shè)計(jì)了一種基于PC的PID溫度測(cè)控系統(tǒng)。本系統(tǒng)包括遠(yuǎn)程控制終端(RTU)和人機(jī)接口(HMI)兩個(gè)部分。RTU主要作用于信號(hào)采集、測(cè)量和控制。HMI主要實(shí)現(xiàn)的是溫度數(shù)據(jù)在上位機(jī)上的數(shù)據(jù)處理功能。
RTU硬件電路以51單片機(jī)為微處理器,分為溫度采集模塊、液晶顯示模塊、串行通信模塊和輸出控制模塊四個(gè)部分。軟件部分主要對(duì)PID算法進(jìn)行編程。系統(tǒng)利用單片機(jī)低功耗、處理能力強(qiáng)的特點(diǎn),使PC與單片機(jī)進(jìn)行串行通信,用數(shù)字溫度傳感器DS18B20采集溫度后,對(duì)設(shè)定溫度與采集溫度信號(hào)的偏差進(jìn)行PID控制,輸出的控制信號(hào)傳遞給溫度控制電路,從而實(shí)現(xiàn)升溫或降溫。系統(tǒng)具有人機(jī)交互良好、控溫精度高、自動(dòng)化程度高等特點(diǎn),有效地實(shí)現(xiàn)了水溫溫度的自動(dòng)控制,具有良好的實(shí)用價(jià)值和發(fā)展前景。
關(guān)鍵詞:DS18B20;PID控制;PWM控制;串行通信
Abstract
Temperature control takes a vital part in the industrial production and scientific research activities, it directly related to the control system of the entire production system, so the research of the temperature control has its important practical significance.
This issue designed a PC-based PID temperature control system featured for temperature control. The system includes two parts-- Remote Terminal Unit (RTU) and Human Machine Interface (HMI). RTU majors in signal acquisition, measurement and control. HMI mainly realizes the function of temperature data in the host computer's data processing.
The microprocessor of the RTU hardware circuit is 51 MCU; it divides into four parts: temperature acquisition module, temperature display module, serial communication module and data processing module. The software part is mainly program the PID algorithm. The system makes use of the future of the low power consumption and the processing capability of the SCM, which enables PC and SCM do serial communication. After acquire the temperature with digital temperature sensor DS18B20, do the PID control to the signal deviations between the setting temperature and the acquisition of the temperature, the output control signal transmits to the temperature control circuit, in order to heating or cooling the temperature. The system with good human-computer interaction, high precision temperature control, auto level, effectively realize the auto-control of the water temperature, it has good practical value and development prospects.
Key Words: DS18B20;PID control;PWM control;serial communication
目 錄
1 引言 1
2 系統(tǒng)方案設(shè)計(jì) 3
3 RTU硬件設(shè)計(jì) 5
3.1 微處理器系統(tǒng) 5
3.1.1 時(shí)鐘電路 5
3.1.2 復(fù)位電路 6
3.2溫度采集模塊 6
3.2.1 溫度傳感器選擇 6
3.2.2 溫度采集電路 6
3.3 液晶顯示模塊 7
3.3.1顯示模塊選擇 7
3.3.2 液晶顯示電路 7
3.4 串行通信模塊 8
3.5 輸出控制模塊 9
3.5.1 輸出控制方式選擇 9
3.5.2 輸出控制電路 10
4 RTU軟件設(shè)計(jì) 11
4.1 主程序 11
4.2 溫度采集模塊 12
4.2.1 初始化 12
4.2.2 讀操作 13
4.2.3 寫操作 14
4.2.4 溫度轉(zhuǎn)換 15
4.3 液晶顯示模塊 17
4.4 串行通信模塊 18
4.5 PID控制模塊 19
4.5.1 PID調(diào)節(jié)器控制原理 19
4.5.2 PID參數(shù)對(duì)系統(tǒng)性能的影響 20
4.5.3 PID計(jì)算程序 20
5 HMI設(shè)計(jì) 23
5.1 HMI硬件 23
5.2 HMI軟件 23
6 仿真和調(diào)試 25
6.1 調(diào)試工具與平臺(tái) 25
6.2 系統(tǒng)調(diào)試與仿真 26
6.3 測(cè)試結(jié)果與分析 28
6.3.1 設(shè)計(jì)所達(dá)到的性能指標(biāo) 28
6.3.2 結(jié)果分析論述 29
7 結(jié)論 30
致 謝 31
參考文獻(xiàn) 32
附錄1 實(shí)驗(yàn)原理圖 34