【正文】
年 月 日備注:[摘要]現(xiàn)在人們越來越喜歡安全、節(jié)能、環(huán)保、智能化和信息化的汽車了,在智能汽車新時代,無人駕駛技術(shù),得到了飛越的發(fā)展,成為了智能車時代的新標志。智能小車不但逐步提高了車輛的控制水平和駕駛水平,而且也保障了車輛行駛的安全、暢通、高效特性。 [關(guān)鍵詞]智能車;圖像處理;比例積分微分[Abstract]Now more and more like safety, energy conservation, environmental protection, intelligence and information of vehicles in the new era of smart cars, unmanned technology, has been flying over the development, became the new logo of the smart car era. The smart car has gradually increased the level of control and the standard of driving of the vehicle, but also to protect the safe and smooth traffic, efficient performance. The article focuses on the design of intelligent vehicle systems, and smart car independent driving the decisionmaking system and control algorithms were also studied. Thesis designs the mechanical hardware structure of the intelligent vehicle hardware to control the core Cortexm3, other ancillary modules include: the power supply module, the image sensor module, the speed control module and other functional modules to carry out assisted, and thus to plete the smart hardware design of the car. Does not match the smart car a more plicated runway, control algorithms in the control parameters of the smart car has been unable to solve plex runway case. Therefore, this paper has to do improvements, the present theory with reality, we have adopted a fuzzy PID control algorithm to achieve control of the smart car, and carry out certain experiments.In this system, the CMOS camera head path identification, closedloop control of the car, car tracking smoothly in accordance with the black guide lines given. The system is able to meet the requirements of the intelligent vehicle path recognition performance and antijamming capability, small steady state error and adjust the response time is faster, has better dynamic performance and good stability.The experiments show that the design of intelligent vehicle speed adaptability.[Keywords]Intelligent Car, Image Processing, PID Control 目 錄目 錄 3緒 論 11 智能車系統(tǒng)總體介紹 2 整體設(shè)計概述 2 關(guān)于直流電機的簡要介紹 3 CMOS圖像傳感器的特點 3 CMOS圖像傳感器的特性 3 OV7670的性能特點與工作方式 4 OV7670的性能和參數(shù) 4 OV7670的功能 4 OV7670的數(shù)字圖像輸出 4 OV7670的輸出信號時序 42 方案論證 6 控制模塊的介紹 6 車身車體的介紹 6 電機選擇與驅(qū)動模塊的介紹 6 路徑識別的方案設(shè)計與論證 73 智能車系統(tǒng)硬件設(shè)計 9 智能車系統(tǒng)硬件設(shè)計總體結(jié)構(gòu) 9 STM32最小系統(tǒng)的設(shè)計 10 方案總結(jié) 10 方案框圖 10 電路設(shè)計與原理 10 直流電機應(yīng)用 10 電源分配電路設(shè)計 11 H橋電機的驅(qū)動 124 智能車系統(tǒng)軟件設(shè)計 13 控制算法的簡要介紹 13 速度控制算法 14 圖像采集 18 圖像處理 18 動態(tài)閾值法介紹 195 系統(tǒng)的測試 21 系統(tǒng)測試的目的 21 系統(tǒng)測試的原則 21 系統(tǒng)測試的結(jié)果 21 測試結(jié)果誤差分析 216 結(jié) 論 22 工作總結(jié) 22致 謝 23參考文獻 24附錄一:電路原理圖 25附錄二:程序流程圖 26附錄三:源程序部分代碼 27緒 論隨著智能小車技術(shù)的不斷提高和增強;智能化,安全化,環(huán)保性逐漸得到了人們的親睞,在當今這個公路等級不斷改善的情景下,特別是飛速發(fā)展的高速公路,人們對汽車的行駛速度有了更高的要求;同時,在人們的物質(zhì)生活水平和消費水平不斷飛速提高的情況下,汽車的數(shù)量也隨之逐漸快速的增加,車流量越來越大,汽車碰撞的發(fā)生幾率也越來越大,然而這些情況,在智能車出現(xiàn)以后,在很大情況下大大減少了因駕駛疏忽而造成交通事故的可能,也使得交通更加暢通,從而很大程度上保證了車輛 行駛的安全,同時也保證了其他的人的人身和財產(chǎn)安全,因此發(fā)展智能小車是很重要的。同時也作為識別道路狀況的標志、該論文的整體智能車可以看作是一個自動控制的系統(tǒng)。另外,要實現(xiàn)對該智能小車的控制達到閉環(huán)控制的效果,要有對該智能小車的速度有一定的控制,這就需要測速模塊來提供一個速度反饋回來的信息給處理器STM32。 圖[單極直流電機原理示意]示一臺圓筒形電樞單極直流電機的原理結(jié)構(gòu)。 要提高單極直流電機電壓,就必須提高氣隙磁通密度和轉(zhuǎn)速。也是CCD傳感器所無法辦到的。 OV7670的功能1. 高靈敏度特性適合低照度的應(yīng)用場合。P為幀消隱區(qū),A為有效數(shù)據(jù)區(qū),Q為行消隱區(qū)。但小車實時處理要求高,處理速度應(yīng)盡量快。小車功耗較低,運動靈活,車速較快。 電機選擇與驅(qū)動模塊的介紹方案一,使用直流電機。用于提供小車行駛的動力,速度快,靈敏度高,使之滿足題目要求。這樣就能夠在一定程度上避免由外部光線引起的路線識別不正確的問題。這樣不僅能夠克服傳統(tǒng)光電傳感器的缺點,又能夠精確的感知黑色引導(dǎo)線的位置,為智能車的穩(wěn)定運行提供保障。3 智能車系統(tǒng)硬件設(shè)計 智能車系統(tǒng)硬件設(shè)計總體結(jié)構(gòu)本系統(tǒng)是利用了市面上很流行的處理器STM32作為本系統(tǒng)的主要控制模塊,我們采用了CMOS攝像頭作為識別路面信息的傳感器,通過控制器STM32對攝像頭采集過來的信息進行分析和判別,才實現(xiàn)對智能小車直流電機的控制從而達到實現(xiàn)自動循跡的目的。該芯片采用15腳封裝。 在對驅(qū)動電機和舵機控制之前,需要利用道路檢測信息來制定各種路況下的控制策略,道路路況不外乎4種。 2. 對于一些實際系統(tǒng),需要系統(tǒng)建立一些數(shù)學模型,而模糊控制算法則不需要根據(jù)機理與分析建立數(shù)學模型,從而簡化了處理的復(fù)雜度。 輸出量ΔKiΔKpΔKd的論域、語言變量取值、隸屬度函數(shù)的選擇與E和EC相同。 視頻信號示意圖由于我們所采用的攝像頭OV7670像素為625X582,如果逐行逐點掃描的話數(shù)據(jù)的信息量很大。所以由迭代算法計算的最佳值不受噪聲干擾的影響。通過系統(tǒng)測試找出問題并解決問題,本畢設(shè)的智能小車系統(tǒng)在相關(guān)功能和穩(wěn)定性方面能夠達到設(shè)計初的性能要求。實際測量結(jié)果碼盤轉(zhuǎn)動67個碼值。建立系統(tǒng)模型的過程需要我們了解各個方面相關(guān)的東西,從系統(tǒng)的穩(wěn)定性的角度出發(fā),根據(jù)用戶的需要設(shè)計出合理的產(chǎn)品。2.要經(jīng)常和別人進行交流,同時也要充分利用現(xiàn)有的資源。// LCD_Init()。 lRX_Mode()。 FIFO_RRST_H。 FIFO_RD_H。 delay_us(10)。 delay_us(10)。 if((a/10)%2==0) { for(b=0。 } bb=0。 } } if(a%400==0amp。a_i4amp。a1200。amp。0X0001)//溢出中斷 { if(num_10speed) { switch(control) { case ZUO: moto_A1=0。moto_B1=0。turn_way=0。 case TING: moto_A1=0。moto_B1=1。turn_way=64。 //主界面 // case NI_ZAI_KAN_SHEN_ME: break。 //減速 default:。moto_B2=0。 if(num_10==10)num_10=0。moto_A2=0。 //關(guān)閉 // case XING_XING: break。 case DIAO_TOU: moto_A1=0。turn_way=32。moto_B1=0。 //前進 case HOU_TUI: moto_A1=0。turn_way=16。moto_B1=1。// switch(control)// {// case K