freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

畢業(yè)論文-采用matlab與單片機的模糊溫度控制(存儲版)

2025-07-16 13:38上一頁面

下一頁面
  

【正文】 得出最優(yōu)的控制算法,并運用與實際的對象模型上。Fuzzy control。 設(shè)計的主要難點 本次設(shè)計的難點和核心主要在于: ( 1)溫度傳感器 DS18B20 的使用 ; ( 2)軟件部分 PID 算法的設(shè)計 ; ( 3)水箱溫度的 MATLAB 模糊控制算法的設(shè)計 。在使用 FPGA 作為控制時,電路設(shè)計相對簡單,通過對應(yīng)的編程接口設(shè)計,也容易達到實現(xiàn)控制過程和顯示溫度數(shù)據(jù)、控制加熱器功率等功能,是一種可以選擇的設(shè)計方案?!?。 PWM 實現(xiàn)方案選擇 產(chǎn)生 PWM 脈寬信號的方法一般有兩種 :一種是通過軟件編程實現(xiàn);另一種方法是通過硬件電路的搭建來產(chǎn)生。 圖 PWM 電壓占空比示意圖 前面介紹的那兩種方法在 PWM 調(diào)壓時改變了 PWM 脈沖的周期 (或頻率 ),在改變PWM 脈沖的頻率的過程中,當控制系統(tǒng)本身的固有 頻率和 PWM 控制脈寬的頻率接近時,將會產(chǎn)生振蕩現(xiàn)象,所以通 常采用確定頻率(或者周期)改變 PWM 占空比的這種方法來達到改變加熱器兩端電壓的平均值,以實現(xiàn)控制加熱器 功率的目的。 在其芯片上具有 8 位處理器和可編程 FLASH, 令這款單片機能在很多控制系統(tǒng)中方便地 實現(xiàn)用戶所需的 控制功能, 如表 所示, 其引腳圖 如 圖 所示: 表 STC89C52 單片機功能參數(shù) 序號 特征參數(shù) 1 為 增強型 8051 單片機, 6 時鐘 /機器周期和 12 時鐘 /機器周期可以隨 意選擇,指令代碼 完全兼容 普通 8051 2 5V單片機 工作電壓 為 ~ , 3V 單片機工作電壓為 ~ 單片機 驅(qū)動電路 可控硅 水箱加熱器 水箱溫度傳感器 LCD1602 計算機 MATLAB 桂林電子科技大學(xué)畢業(yè)設(shè)計(論文)報告用紙 第 6 頁 共 48 頁 3 工作頻率范圍 工作頻率從 0 到 40MHz,速度為普通單片機的兩倍 4 用戶應(yīng)用程序空間為 8K 字節(jié) 5 片內(nèi) 集成 有 512byte RAM 存儲 6 通用 的 32 個 I/O 口 ,復(fù)位后 P0/P1/P2/P3 為 準雙向口 , P0 口 可作 為總線 擴展并無需 加上拉電阻, 在 作為 I/O 口用時要 加上拉電阻 7 為在系統(tǒng)可編程或者在應(yīng)用可編程),不 需 要專用編程器和仿真器,經(jīng)過相應(yīng)的 串口 引腳可以 直接下載用戶 的 程序 8 具有 EEPROM 功能 9 具有 T0、 T1 和 T2 一 共 3 個 16 位定時器 /計數(shù)器 10 外部中斷 4 路,可通過下降沿中斷或者低電平方式觸發(fā) , 低功耗 模式 下可以通過外部中斷低電平觸發(fā) 方式喚醒 11 通用異步串 口 12 工業(yè)級 工作溫度范圍 ,為 40~ +85℃ 13 其封裝形式為 PDIP 封裝 圖 STC89C52 單片機引腳圖 STC89C52 單片機定時 /計數(shù) 器 STC 單片機內(nèi)部具有 3 個定時器,分別是定時器 0,定時器 1 和定時器 2,都為 16位定時 /計數(shù)器, 可 根據(jù) 方式 寄存器的相應(yīng)位 M0 和 M1 來選擇其工作方式 ,有方式 0,方式 1,方式 2 和方式 3,而通過 控制寄存器來對定時器和計數(shù)器進行相應(yīng)的操作 ,完成用戶所需要實現(xiàn)的功能 。 它的串行輸入口是引腳 ,串行輸出口是引腳 ,內(nèi)部 有三個寄存器,即數(shù)據(jù)緩沖寄存器,串口控制寄存器和電源控制寄存器,分別用 SBUF, PCON和 SCON 表示 。 圖 DS18B20 讀時序 ( 2) 讀時序按照如下方式進行: 如圖 所示, 數(shù)據(jù)總線置到高電 平并且進行延時2us 的時間間隔;數(shù)據(jù)總線置到低電平并且進行延時 6us;數(shù)據(jù)總線置到高電平并且進行延時 4us;讀取數(shù)據(jù)總線的一個位信號,得到位信號后進行數(shù)據(jù)的處理操作并且延時 30us的時間間隔;最后循環(huán)重復(fù)以上的步驟,直到讀取完畢一個字節(jié)的所有位。 電源電路 本系統(tǒng)使用的是 5v 電源,可通過外接 5V電源或者 12V電源提供,當接入的是 12V電源時,通過 L7805 穩(wěn)壓芯片將其穩(wěn)壓到 5V 后輸出給單片機系統(tǒng),外加一些連接 5V桂林電子科技大學(xué)畢業(yè)設(shè)計(論文)報告用紙 第 11 頁 共 48 頁 電源的排針接口,以便作為電源擴展接口使用, 5V 或 12V 電源和地 之間接一個 的陶瓷電容和一個 470UF 的電解電容,用來濾除電源的干擾信號 ,電解電容濾除低頻干擾,陶瓷電容濾除高頻干擾 ,使電源輸出穩(wěn)定的電壓值??煽毓杩刂齐娐啡鐖D 所示: 桂林電子科技大學(xué)畢業(yè)設(shè)計(論文)報告用紙 第 15 頁 共 48 頁 圖 可控硅控制電路原理圖 5 軟件程序 設(shè)計 本次課題當中軟件設(shè)計是重 點,軟件是系統(tǒng)的大腦,只有編寫好了系統(tǒng)的程序,系統(tǒng)才能 按照 系統(tǒng) 要求去執(zhí)行每一步的操作,協(xié)調(diào)不同模塊的正常工作。通過這樣模糊的控制規(guī)則,可以達到較好的控制效果。本次設(shè)計采用的是在 MATLAB simulink 的環(huán) 境下進行溫度控制,故可以使用模糊控制工具箱進行模糊控制器的設(shè)計,原理為: (1)根據(jù)模糊控制輸入偏差 e,偏差變化率 de,輸出量 u 的實際取值范圍確定其系統(tǒng)的基本論域,每個實際變量的論域劃分為離散值的的集合,作為變量的模糊論域,本次設(shè)計取 e 和 de 的模糊論域均為 [6,6], u 的模糊論域為 [7,7]。 表 水溫控制偏差 e 的模糊集隸屬度表 6 5 4 3 2 1 0 +0 1 2 3 4 5 6 PB 0 0 0 0 0 0 0 0 0 0 1 PM 0 0 0 0 0 0 0 0 0 1 PS 0 0 0 0 0 0 0 1 0 0 PO 0 0 0 0 0 0 0 1 0 0 0 0 NO 0 0 0 0 1 0 0 0 0 0 0 0 NS 0 0 1 0 0 0 0 0 0 0 NM 1 0 0 0 0 0 0 0 0 0 NB 1 0 0 0 0 0 0 0 0 0 0 表 水溫控制偏差變化率 de 的模糊集隸屬度表 6 5 4 3 2 1 0 +0 1 2 3 4 5 6 PB 0 0 0 0 0 0 0 0 0 0 1 PM 0 0 0 0 0 0 0 0 0 1 PS 0 0 0 0 0 0 0 0 1 0 0 O 0 0 0 0 0 1 0 0 0 0 0 0 NS 0 0 1 0 0 0 0 0 0 0 NM 1 0 0 0 0 0 0 0 0 0 NB 1 0 0 0 0 0 0 0 0 0 0 表 水溫控輸出占空比 u 的模糊集隸 屬度表 6 5 4 3 2 1 0 +0 1 2 3 4 5 6 PB 0 0 0 0 0 0 0 0 0 0 1 PM 0 0 0 0 0 0 0 0 0 1 PS 0 0 0 0 0 0 0 0 1 0 0 O 0 0 0 0 0 1 0 0 0 0 0 0 NS 0 0 1 0 0 0 0 0 0 0 NM 1 0 0 0 0 0 0 0 0 0 NB 1 0 0 0 0 0 0 0 0 0 0 根據(jù)人們的經(jīng)驗和控溫系統(tǒng)的實際特性,可得到如下的控制規(guī)則 : 表 模糊控制規(guī)則 序號 控制規(guī)則 序號 控制規(guī)則 1 If (e is NB) and (de is NB) then (u is PB) 29 If (e is PO) and (de is NB) then (u is PM) 2 If (e is NB) and (de is NM) then (u is PB) 30 If (e is PO) and (de is NM) then (u is PM) 3 If (e is NB) and (de is NS) then (u is PB) 31 If (e is PO) and (de is NS) then (u is PS) 4 If (e is NB) and (de is 0) then (u is PB) 32 If (e is PO) and (de is 0) then (u is 0) 5 If (e is NB) and (de is PS) then (u is PM) 33 If (e is PO) and (de is PS) then (u is NS) 6 If (e is NB) and (de is PM) then (u is 0) 34 If (e is PO) and (de is PM) then (u is NM) 7 If (e is NB) and (de is PB) then (u is 0) 35 If (e is PO) and (de is PB) then (u is NM) 8 If (e is NM) and (de is NB) then (u is PB) 36 If (e is PS) and (de is NB) then (u is PS) 9 If (e is NM) and (de is NM) then (u is PB) 37 If (e is PS) and (de is NM) then (u is PS) 10 If (e is NM) and (de is NS) then (u is PB) 38 If (e is PS) and (de is NS) then (u is 0) 桂林電子科技大學(xué)畢業(yè)設(shè)計(論文)報告用紙 第 19 頁 共 48 頁 11 If (e is NM) and (de is 0) then (u is PB) 39 If (e is PS) and (de is 0) then (u is NS) 12 If (e is NM) and (de is PS) then (u is PM) 40 If (e is PS) and (de is PS) then (u is NM) 13 If (e is NM) and (de is PM) then (u is 0) 41 If (e is PS) and (de is PM) then (u is NM) 14 If (e is NS) and (de is NB) then (u is PM) 42 If (e is PS) and (de is PB) then (u is NM) 15 If (e is NS) and (de is NB) then (u is PM) 43 If (e is PM) and (de is NB) then (u is 0) 16 If (e is NS) and (de is NM) then (u is PM) 44 If (e is PM) and (de is NM) then (u is 0) 17 If (e is NS) and (de is NS) then (u is PM) 45 If (e is PM) and (de is NS) then (u is NM) 18 If (e is NS) and (de is 0) then (u is PS) 46 If (e is PM) and (de is 0) then (u is NB) 19 If (e is NS) and (de is PS) then (u is 0) 47 If (e is PM) and (de is PS) then (u is NB) 20 If (e is NS) and (de is PM) then (u is NS) 48 If (e is PM) and (de is PM) then (u is NB) 21 If (e is NS) and (de is PB) then (u is NS) 49 If (e is PM) and (de is PB) then (u is NB) 22 If (e is NO) and (de is NB) then (u is PM) 50 If (e is PB) and (de is NB) then (u is 0) 23 If (e is NO) and (de is NM) then (u is PM) 51 If (e is PB) and (de is NM) then (u is 0) 24 If (e is NO) and (de is NS) then (u is PS) 52 If (e is PB) and (de is NS) then (u is NM) 25 If (e is NO) and (de is 0) then (u is 0) 53 If (e is PB) and (de is 0) then (u is NB) 26 If (e is NO) and (de is PS) then (u is NS) 54 If (e is PB) and (de is PS) then (u is NB) 27 If (e is NO) and (de is PM) then (u is NM) 55 If (e is PB) and (de is PM) t
點擊復(fù)制文檔內(nèi)容
畢業(yè)設(shè)計相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1