【正文】
法有兩種:硬件方法和軟件方法。 鍵盤(pán)掃描子程序 在第二章的方案選擇中,我們已經(jīng)確定了使用獨(dú)立式鍵盤(pán)。 26 5 系統(tǒng)軟件設(shè)計(jì) 主程序 本設(shè)計(jì)的單片機(jī)控制程序采用 51 匯編語(yǔ)言編寫(xiě),在編寫(xiě)的過(guò)程中,盡量向結(jié)構(gòu)化、模塊化的方向編寫(xiě),整個(gè)程序的清單見(jiàn)附錄 A。 ,觸發(fā)器總是在 B 脈沖為高電平時(shí)觸發(fā),這時(shí) D 觸發(fā)器的輸出端Q 輸出為高電平。此外,為判斷旋轉(zhuǎn)方向,碼盤(pán)還提供相位相差 90176。電機(jī)驅(qū)動(dòng)電路如圖 410所示。此時(shí),直流電機(jī)反轉(zhuǎn)。同理,此時(shí) IC2的 HO為低電平而 LO為高電平, Q3截止, C3上的電壓經(jīng)過(guò) VB、 IC內(nèi)部電路和 HO端加在 Q4的柵極上,從而使得 Q4導(dǎo)通。兩路匹配傳輸導(dǎo)通延時(shí)為 120ns,關(guān)斷延時(shí)為 94ns。應(yīng)用中,接用戶脈沖形成部分的對(duì)應(yīng)兩路輸出,對(duì)此兩個(gè)信號(hào)的限制為 Vcc+,這里 Vss 與 Vcc分別為連接到 IR2110的引腳 13( Vss)與引腳 9( VDD)端的電壓值。降低了產(chǎn)品成本和減少體積。啟動(dòng)信號(hào)為脈沖啟動(dòng)形式。 18 圖 46 8253 邏輯結(jié)構(gòu)圖 8279 可編程鍵盤(pán)、顯示接口芯片 8279 是一種通用的可編程鍵盤(pán) /顯示器接口芯片。方案三在可操作性與實(shí)時(shí)性方面都都結(jié)合了本專業(yè)特點(diǎn),從控制理論與控制技術(shù)出發(fā),充分發(fā)揮與應(yīng)用本學(xué)科特點(diǎn)。輸出速度的調(diào)節(jié)是通過(guò)鍵操作,顯示速度。 圖 42 系統(tǒng)硬件結(jié)構(gòu)圖 系統(tǒng)方案論證 系統(tǒng)總方案論證與選擇 方案一:直接加直流電源來(lái)控制電機(jī)的轉(zhuǎn)動(dòng)速度;根據(jù)電動(dòng)機(jī)在其額定電壓時(shí),電動(dòng)機(jī)有一定的額定轉(zhuǎn)速。 PWM 采用 AT89C51 單片機(jī)實(shí)現(xiàn) ,驅(qū)動(dòng)電路采用了IR2110 集成芯片,具有較強(qiáng)的驅(qū)動(dòng)能力和保護(hù)功能 [7]。 ③ 在轉(zhuǎn)速動(dòng)態(tài)過(guò)程中,保證獲得電機(jī)允許的最大電流,從而加快動(dòng)態(tài)過(guò)程。此后,電動(dòng)機(jī)開(kāi)始在負(fù)載的阻力下減速,與此相應(yīng),在 43~tt 時(shí)間內(nèi), dI dLI? ,直到穩(wěn)定。 第 II 階段( 21~tt )是恒流升速階段 , ASR 飽和,轉(zhuǎn)速環(huán)相當(dāng)于開(kāi)環(huán),在恒值電流給定 *imU 下的電流調(diào)節(jié)系統(tǒng),基本上保持電流 dI 恒定,因而系統(tǒng)的加速度恒定,轉(zhuǎn)速呈線性增長(zhǎng)。圖中 )(sWASR 和 )(sWACR 分別表示轉(zhuǎn)速調(diào)節(jié)器和電流調(diào)節(jié)器的傳遞函數(shù) 。 這就是靜特性的運(yùn)行段,它是水平的特性 。兩個(gè)調(diào)節(jié)器的輸出都是 10 帶限幅作用的,轉(zhuǎn)速調(diào)節(jié)器 ASR 的輸出限幅電壓 *imU 決定了電流給定電壓的最大值,電流調(diào)節(jié)器 ACR 的輸出限幅電壓 cmU 限制了電力電子變換器的最大輸出電壓 dmU 。 為了實(shí)現(xiàn)在允許條件下的最快起動(dòng),關(guān)鍵是要獲得一段使電流保持為最大值 dmI的恒流過(guò)程。故改變?chǔ)林稻涂梢赃_(dá)到調(diào)壓的目的。如果要求快速克服電網(wǎng)的干擾,必須對(duì)電樞電流進(jìn)行調(diào)節(jié)。因此,它具有抑制干擾的能力,對(duì)元件特性變化不敏感,并能改善系統(tǒng)的響應(yīng)特性。 PWM系統(tǒng)在很多方面具有較大的優(yōu)越性: ( 1) PWM 調(diào)速系統(tǒng)主電路線路簡(jiǎn)單,需用的功率器件少。 ( 3) 晶閘管的控制原理決定了只能滯后觸發(fā),因此,晶閘管可控制整流器對(duì)交流電源來(lái)說(shuō)相當(dāng)于一個(gè)感性負(fù)載,吸取滯后的無(wú)功電流,因此功率因素低,特別是在深調(diào)速狀態(tài),即系統(tǒng)在較低速運(yùn)行時(shí),晶閘管的導(dǎo)通角很小,使得系統(tǒng)的功率因素很低,并產(chǎn)生較大的高次諧波電流,引起電網(wǎng)電壓波形畸變,殃及附近的用 電設(shè)備。 ( 3) 直流斬波器或脈寬調(diào)制變換器。 改變電阻調(diào)速缺點(diǎn)很多,目前很少采用,僅在有些起重機(jī)、卷?yè)P(yáng)機(jī)及電車等調(diào)速性能要求不高或低速運(yùn)轉(zhuǎn)時(shí)間不長(zhǎng)的傳動(dòng)系統(tǒng)中采用。對(duì)于要求在一定范圍內(nèi)無(wú)級(jí)平滑調(diào)速的系統(tǒng)來(lái)說(shuō),這種方法最好。全數(shù)字化直流調(diào)速裝置作為最新控制水平的傳動(dòng)方式更顯示了強(qiáng)大優(yōu)勢(shì)。 ( 4) 計(jì)算機(jī)的運(yùn)算速度快,精度高。目前,交流電機(jī)廣泛應(yīng)用于數(shù)控機(jī)床等自動(dòng)化設(shè)備的數(shù)控位置伺服系統(tǒng) 。 2 微機(jī)控制電機(jī)的發(fā)展和現(xiàn)狀 微機(jī),出現(xiàn)于 20 世紀(jì) 70 年代,隨著大規(guī)模及超大規(guī)模集成電路制造工藝的迅速發(fā)展,微機(jī)的性能越來(lái)越高,價(jià)格越來(lái)越便宜。鑒于增加啟動(dòng)電阻就可增大啟動(dòng)轉(zhuǎn)矩,異步電動(dòng)機(jī)定子常采用雙籠或深槽結(jié)構(gòu)。交流傳動(dòng)一般采用交 — 直 — 交變頻。 關(guān)鍵字 : AT89C51 單片機(jī) PWM 技術(shù) 直流電動(dòng)機(jī) II Abstract In the national production, along with the development of modern technology, electronic technology has been a prehensive development, the technology has been applied in various fields. In all kinds of mechanical system, due to the dc motor has a good start, brake and the performance of speed, dc motor control system has been widely used in industry, spaceflight, most monly used dc speed control technology is a pulse width modulation (PWM) dc speed control technology, which has a high precision, fast response time, high speed range and width of the low loss characteristics and use of puter digital control has bee a kind of method of dc speed control system, the hardware circuit of a high degree of standardization, control software to carry out plex operation can be realized, different from the general linear optimization and adjustment of the adaptive, nonlinear, intelligent controllaw, also have information storage, data muni cation and fault diagnosis cannot achieve such simulation system. This paper studied the use of the MCS51 series singlechip control of the PWM signal in order to achieve the DC motor Speed control method. Article uses a specialized chip posed of a PWM signalgeneration system, and the principle of the PWM signal, the method and softwareprogramming the PWM signal duty cycle adjust, in order to control the input signalwaveform and so detailed elaboration. In addition, this article also uses the chip IR2110 forward as a DC motor speed control power amplification circuit of the drive module, andwith the delay circuit bination of plete control of DC motor in the main circuit. In addition, the system uses the tachogenerator to measure the speed of the DC motor,after a filter circuit, the measured values to the A/D converter, and finally as a feedback value input to the MCU PI calculations, in order to achieve DC motor speed article details the PI operation program, the initialization procedure of writingideas and specific procedures. Key words: AT89C51 microcontroller PWM control Doubleloop III 目 錄 摘要 ............................................................................................................................... 1 Abstract ........................................................................................................................ II 1 概述 ......................................................................................................................... 1 電氣傳動(dòng)技術(shù)發(fā)展現(xiàn)狀及展望 .......................................................................... 1 微機(jī)控制電機(jī)的發(fā)展和現(xiàn)狀 .............................................................................. 2 電機(jī)微機(jī)控制系統(tǒng)的特點(diǎn) .................................................................................. 2 本課題在實(shí)際應(yīng)用方面的意義和價(jià)值 .............................................................. 3 2 直流電機(jī)調(diào)速 原理 ................................................................................................. 5 直流電機(jī)調(diào)速 ...................................................................................................... 5 選擇 PWM 控制系統(tǒng)的理由 ............................................................................... 6 采用轉(zhuǎn)速電流雙閉環(huán)的理由 .............................................................................. 7 直流電機(jī) PWM 控制原理 ................................................................................... 8 3 雙閉環(huán)直流調(diào)速系統(tǒng)和調(diào)節(jié)器的設(shè)計(jì) ................................................................. 9 轉(zhuǎn)速、電流雙 閉環(huán)直流調(diào)速系統(tǒng)及其靜特性 .................................................. 9 轉(zhuǎn)速、電流雙閉環(huán)直流調(diào)速系統(tǒng)的組成 ....................................................... 9 穩(wěn)態(tài)結(jié)構(gòu)圖和靜特性 ..................................................................................... 10 雙閉環(huán)直流調(diào)速系統(tǒng)的數(shù)學(xué)模型和動(dòng)態(tài)性能分析 ........................................ 11 雙閉環(huán)直流調(diào)速系統(tǒng)的動(dòng)態(tài)數(shù)學(xué)模型 ......................................................... 11 起動(dòng)過(guò)程分析 .