摘 要:使用EDA設計電子電路已經成為時代潮流,EWB是目前各種電子電路輔助分析與設計軟件中最優秀的軟件之一,該軟件具有模擬和數字電路的設計、分析、仿真功能。介紹一種基于電子工作臺(EWB)軟件設計交通信號燈自動定時控制系統的方法,說明計算機仿真軟件在電子實驗中的效用,它改變了傳統的設計方法,為電子虛擬實驗室的建設打下基礎。
關鍵詞:EDA; EWB; 交通信號燈; 控制系統
中圖分類號:TP274 文獻標識碼:A
文章編號:1004-373X(2010)13-0181-02
Design and Simulation of Control System of City Traffic Lights Based on EWB
DUAN Yong-xia1, LI Jun1, ZHOU Jian-bo2
(1. Bengbu Tank University, Bengbu 233050, China; 2. Unit 66220 of PLA, Xingtai 054000, China)
Abstract: The design of the electronic circuits with EDA technique has become the trend of the development, in which EWB is one of the best softwares in all kinds of assistant analysis and design for electronic circuits. The software has the functions of design, analysis and simulation in analog or digital circuit. A method to design the auto-timing control system of traffic lights based on EWB is presented, which has changed the traditional design method,and embodied the effect of the computer simulation software in electronic experiments.
Keywords: EDA; EWB; traffic lights; control system
0 引 言
EWB(Electronics Workbench)軟件是加拿大 Interactive Image Technologies公司推出的專門用于電子電路仿真的虛擬電子工作臺軟件,該軟件采用圖形方式創建電路,形象逼真、操作方便,非常適合電子信息專業課程的教學和仿真實驗[1],目前已在電子設計和各大學的電工電子類課程的教學領域內取得了廣泛的應用。本文就城市交通信號燈的電路設計,用EWB搭建完善的、能自動定時、紅黃綠三色交替顯示的電路,并對其進行仿真驗證。
1 整體規劃
1.1 系統工作要求
假設十字路口的兩條道路,四個路口均有紅黃綠三色交通燈,并且有數字顯示還剩余多少時間將改變信號燈。要求:兩條干道交替通行,初始時間由預置數電路設置;綠燈跳變成紅燈時,黃燈亮幾秒鐘,用以緩沖滯留車輛。當計數器跳變到零時,要能立即進行信號燈的轉換(時間可在0~99 s內任意控制)[2-3]。
1.2 系統工作流程圖
設主干道綠燈時間為T11,黃燈時間T12,紅燈時間為T13;支干道綠燈時間為T21,黃燈時間均為T22,紅燈時間為T23,則T11 + T12 = T23 ,T13 = T21 + T22 ,T12 = T22 ,一般3燈顯示時間中,設置為T11> T21 > T12。……