遺傳算法,模擬達爾文進化論的自然選擇和遺傳學機理的生物進化過程的計算模型,一種選擇不斷選擇優良個體的算法。談到遺傳,想想自然界動物遺傳是怎么來的,自然主要過程包括染色體的選擇,交叉,變異(不明白這個的可以去看看生物學),這些操作后,保證了以后的個體基本上是最優的,那么以后再繼續這樣下去就可以一直最優了。
上傳時間: 2017-06-12
上傳用戶:tian610115
LED 一般是恒流操作的,如何改變 LED 的亮度呢?答案就是 PWM 控制。在一定的 頻率的方波中,調整高電平和低電平的占空比,即可實現。比如我們用低電平點亮一個 LED 燈,我們假設把一個頻率周期分為 10 個時間等份,如果方波中的高低電平占空比是 9:1, 這是就是一個比較暗的亮度,如果方波中高低電平占空比是 10:0,這時,全部是高電平, 燈是滅的。如果占空比是 5:5,就是一個中間亮度,如果高低比是 1:9,是一個比較亮的 亮度,如果高低是 0:10,這時全部是低電平,就是最亮的。 實際上應用中,電視屏幕墻中的幾十百萬 LED 象素都是這樣控制的,而且每一個象素 都有紅綠藍 3 個 LED,每個 LED 可以變化的亮度是幾百到幾萬或者更多的級別,以實現真 彩色的顯示。還有在您的手機中,背光燈的亮度如果是可以變化的,也應該是這種工作方式。 目前的城市彩燈也有很多都使用了 LED,需要控制亮度是也是 PWM 控制。 下面來分析我們的例程,在這個例程中,我們將定時器 2 溢出定為 1/1200 秒。每 10 次脈沖輸出一個 120HZ 頻率。這每 10 次脈沖再用來控制高低電平的 10 個比值。這樣,在 每個 1/120 秒的方波周期中,我們都可以改變方波的輸出占空比,從而控制 LED 燈的 10 個 級別的亮度。 為什么輸出方波的頻率要 120HZ 這么高?因為如果頻率太低,人眼就會看到閃爍感 覺。一般起碼要在 60HZ 以上才感覺好點,120HZ 就基本上看不到閃爍,只能看到亮度的變 化了。 下面請看程序,程序中有比較多的注釋: ――――――――――――――――――――――― #define uchar unsigned char //定義一下方便使用 #define uint unsigned int #define ulong unsigned long #include <reg52.h> //包括一個 52 標準內核的頭文件 sbit P10 = P1^0; //要控制的 LED 燈 sbit K1= P3^2; //按鍵 K1 uchar scale;//用于保存占空比的輸出 0 的時間份額,總共 10 份 char code dx516[3] _at_ 0x003b;//這是為了仿真設置的 //模擬 PWM 輸出控制燈的 10 個亮度級別 void main(void) // 主程序 { uint n; RCAP2H =0xF3; //賦 T2 的預置值,溢出 1 次是 1/1200 秒鐘 RCAP2L =0x98; TR2=1; //啟動定時器 ET2=1; //打開定時器 2 中斷 EA=1; //打開總中斷 while(1) //程序循環 { ;//主程序在這里就不斷自循環,實際應用中,這里是做主要工作 for(n=0;n<50000;n++); //每過一會兒就自動加一個檔次的亮度 scale++; if(scale==10)scale=0; } } //1/1200 秒定時器 2 中斷 timer2() interrupt 5 { static uchar tt; //tt 用來保存當前時間在一秒中的比例位置 TF2=0; tt++; if(tt==10) //每 1/120 秒整開始輸出低電平 { tt=0; if(scale!=0) //這里加這一句是為了消除滅燈狀態產生的鬼影 P10=0; } if(scale==tt) //按照當前占空比切換輸出高電平 P10=1; } ―――――――――――――――――― 在主程序中,每延時一段時間,就自動換一個占空比,以使亮度自動變化,方便觀察。 編譯,運行,看結果。 可以看到,LED 的亮度以每種亮度 1 秒左右不斷變化,共有 10 個級別。
上傳時間: 2017-11-06
上傳用戶:szcyclone
全功能考試練習軟件,批量導入導出試卷,隨機抽題考試,自動評分,自動形成錯題。VB加EXCELL加ACESSS開發 ,自由替換內容,自動生成錯題集,防復制,防破解。多重加密。完全免費。
上傳時間: 2018-01-06
上傳用戶:natesc
貼片鋁電解電容封裝庫 SMD Aluminum Electrolytic Capacitors VE Features ? 3 ~ 16φ, 85℃, 2,000 hours assured ? Chip type large capacitance capacitors ? Designed for surface mounting on high density PC board. ? RoHS Compliance
上傳時間: 2018-05-09
上傳用戶:angel20041401
這個一個jsp招聘系統源代碼簡單的東西啊
上傳時間: 2019-10-15
上傳用戶:15039064019
原作者已經將全部設計資料開源,但程序功能還不完善,很多功能沒有實現,僅供參考。
標簽: 遙控器
上傳時間: 2020-02-26
上傳用戶:8547576
In this paper, we consider the channel estimation problem in Millimeter wave (mmWave) wireless systems with large antenna arrays. By exploiting the inherent sparse nature of the mmWave channel, we develop a novel rate-adaptive channel estimation (RACE) algorithm, which can adaptively adjust the number of required channel measurements based on an expected probability of estimation error (PEE).
標簽: Estimation Millimeter Adaptive Approach Channel Systems Rate MIMO Wave for
上傳時間: 2020-05-26
上傳用戶:shancjb
This book examines the technologies underlying the compression and trans- mission of digital video sequences over networking platforms. The incorporated study covers a large spectrum of topics related to compressed video communica- tions. It presents to readers a comprehensive and structured analysis of the issues encountered in the transmission of compressed video streams over networking environments.
標簽: Compressed Video Communications
上傳時間: 2020-05-26
上傳用戶:shancjb
Cellular communications is one of the fastest growing and most challenging telecom- munication applications ever. Today, it represents a large and continuously increasing percentage of all new telephone subscribers around the world. In the long term, cellular digital technology may become the universal way of communication.
標簽: Engineering System GSM
上傳時間: 2020-05-27
上傳用戶:shancjb
The wireless market has experienced a phenomenal growth since the first second- generation (2G) digital cellular networks, based on global system for mobile communications (GSM) technology, were introduced in the early 1990s. Since then, GSM has become the dominant global 2G radio access standard. Almost 80% of today’s new subscriptions take place in one of the more than 460 cellular networks that use GSM technology. This growth has taken place simultaneously with the large experienced expansion of access to the Internet and its related multimedia services.
標簽: Performance Evolution GPRS EDGE GSM and
上傳時間: 2020-05-27
上傳用戶:shancjb