摘要
驱动彩色液晶显示器的图形生成技术是航空电子技术的一项关键技术,其核心内容包括图形的高速实时生成和图形的反走样等。国外航空座舱电子综合图形显示技术已相当成熟,上世纪90年代已大量应用。我国在机载图形综合显示系统领域曾经比较落后,近10年来加快了研究步伐,目前已经取得了一定成果。国内产品已应用在某些型号的国产飞机上,但技术与国际先进水平比还有差距。本文针对飞机座舱综合图形显示系统基本画面及其组合画面的特点,对图形生成、硬件加速技术和反走样技术展开研究,主要包括以下几方面:
根据图形显示画面的特点,提出了一套基于FPGA+DSP的飞机座舱综合图形显示系统实现方案:用FPGA作为主处理器,完成图形的生成;用DSP作为协处理器,完成少量参数计算;并使用双帧存保存待显示的图形。提出并开发了原理样机,该方案能实现高分辨率、大屏幕的显示,有效的提高了飞机座舱综合图形显示系统的性能,通过在DSP提供通用函数库,大大简化了软件的开发流程。
结合座舱图形显示系统画面的绘制,在分析现有的直线生成算法的基础上,针对经典的Bresenham算法一次只能生成一个像素,效率较低的缺点,提出新的改进算法。该算法通过递推运算,每次可以生成一个像素行,提高了算法效率。在此基础上,借鉴双步直线算法的思想,进一步提出多像素行直线算法,一次可以生成两个像素行,进一步提高了效率。这些算法仍保持了Bresenham算法计算简单的特点,可以由FPGA实现,提高了直线生成速度。
研究了直线、圆和字符的反走样算法。提出一种新的直线反走样算法,在保证反走样效果的基础上,简化计算,提高了算法的效率。针对飞机座舱图形显示中需要绘制三像素宽直线,把新的反走样算法应用到多像素宽的直线绘制,提出了多像素宽直线反走样绘制的方法。针对现有圆的反走样生成算法计算复杂,反走样效果一般的缺点,提出了一种基于中点画圆法的整数反走样算法,通过省略高次项来简化计算,并用简单的计算修正省略带来的误差以保证精度。为了简化计算,针对64级灰度的圆弧反走样,提出了相邻像素的灰度递推方法,利用整数移位、加法和比较来实现反走样。研究并设计了基于FPGA的字符的反走样方法。设计的几种反走样算法结构简单,反走样效果较好,由于避免了浮点和除法运算,便于FPGA实现。
在基于FPGA+DSP的平台上,实现了水平状态指示仪画面的生成。DSP计算直线和字符旋转后的位置,FPGA根据这些位置来生成整个画面。系统通过对称性减少了DSP的计算量;通过并行运算提高了效率;通过重画旧画面提高了消隐速度。理论分析和实际调试都证明,该方案提高了画面的生成速度,并简化了帧存的总线设计。
针对全姿态指示仪画面的特点,提出了一种基于FPGA+DSP的生成方法,该方法预测地平线各像素行的像素数量,使用水平线作为扫描线进行填充,并在填充的过程中适时的计算地平线上那些作为扫描线端点的像素和边界点的坐标,简化了填充前的初始化计算,减少了帧存访问量,提高了画面的生成速度。
The design of graphics generator for driving LCD is a key technology of avionic system andrun-time generation and antialiasing of graphics are main contents of it. Foreign technology ofcombined graphics display system was researched and used on aircraft from90decade last century. Inthis field, our country once dropped behind and fast grown up in last10years. Now, products in homeare used on some aircrafts, but the technology still drops behind. In this paper, according to thecharacteristics of the combined graphics display system in aircraft cockpit, graphics generation,accelerating and anti-aliasing techniques were discussed. Furthermore, some novel design methodswere researched and advanced.
Researching on the graphics generation in aircraft cockpit’s combined graphics display system, anew design method for the graphics system based on FPGA and DSP was proposed and a prototypemachine was developed, according to the characteristics of the graphics. In order to improve theperformance of the system, FPGA was used as main processor to generate graphics and DSP was usedas coprocessor to count few parameters while double frame buffers were used. The system acceleratedthe graphics drawn by FPGA, and the resolution was improved. Software development waspredigested using general functions library on DSP.
According to the generation of the graphics in aircraft cockpit, a new algorithm was developedfor line generating after reaching on fundamental algorithms. Canonical Bresenham algorithm canonly generate one pixel of a line each time. The new algorithm can generate pixels of a line row byrow and inherit the advantages of Bresenham algorithm without division and decimal fraction, so itsefficiency was proved to be better. Using for referent of two-step algorithm, a novel method wasproposed to gengeate two rows of a line each time. These algorithms can be realized by FPGA toincrease the speed of lines drawing.
Researching on the antialiasing algorithms for line, character and circle, a new algorithm waspresent for line antialiasing using integer shift, addition and compare to find the grayscale of eachpixel, and the antialiasing speed was improved. Because the graphics in aircraft cockpit include threepixels wide lines, a new method for arbitrary wide line generation wae proposed based on the newline antialiasing algorithm. Antialiasing for circle was complex and the effect of algorithms inexistence was not satisfactory. To improve efficiency and effect, an integral algorithm was present forcircle anti-aliasing based on midpoint generating algorithm. The new algorithm found the grayscale ofeach pixel according to the distance between the center of a pixel and the circle. The algorithm abandoned the high-order epsilon and corrected the error by simple calculation. A method was built todraw a circle with64levels of grayscale by forecasting the grayscale change between neighbouringpixels using integer shift, addition and compare without floating-point and division. The algorithm forcharacter antialiasing was also researched. The new algorithms were convenient to realize onhardware. The algorithms proved to be efficiently and effective.
A project was present based on FPGA for horizontal Indicator in Aircraft Cockpit. Graphics weregenerated, memory and LCD were controled by FPGA according to the positions of words and linescounted by DSP. Less calculation and time were needed by utilizing the symmetry of graphics,parallel counting and old graphics regenerating. The project was proved to be better and faster withsimply bus.
Attitude Indicator in Aircraft Cockpit spends much time on generating graphics and a newalgorithm based on FPGA was present. The algorithm got the coordinate of a scanning beam point ofthe horizon and used level line to fill. The horizon and profile were counted while filling. Lesscalculation was needed before filling to generate the graphics with less memory accessing, so thegraphics of attitude Indicator were generated faster.
引文
[1]罗志强.航空电子综合化系统.北京:北京航空航天大学出版社,1990:213~214.
[2]D. H.米德尔顿.航空电子系统.北京:航空工业出版社,1992:39~67.
[3]Cary R. Spitzer.数字式航空电子系统.北京:航空工业出版社,1992:117~136.
[4]王道荫.迈向21世纪的航空科学技术.北京:航空工业出版社,1994:186~198.
[5]以光衢,刘惠彬,关德新.航空机载电子系统与设备.北京:北京航空航天大学出版社,1997:77~103.
[6]范天慈.机载综合显示系统.北京:国防工业出版社,2008:64~61.
[7]王苏滨.显示控制系统技术基础.北京:人民邮电出版社,2006.12:32~35.
[8]Herman, R. Using the cockpit display to improve on-aircraft maintenance. Orlando:TheInternational Society for Optical Engineering,2006:204~210.
[9]Sarma, K.R.Prospects for development of AMLEDs for cockpit display applications. Orlando: TheInternational Society for Optical Engineering,2002:250~261.
[10]Mark B. US Air Force Relies on Computer Graphics Evaluate Combat Aircraft Performance,IEEE Computer Graphics and Applications,1989:10~11.
[11]Terry T. Integrated Avionics, Aircraft Engineering and Aerospace Technology,1994,66(2):2~4.
[12]Scott V. Thomsen, William R. Hancock, High-performance, AMLCD-based Smart Design for theSpace Shuttle Glass Cockpit. IEEE SPIE Proceedings,1994:281~288.
[13]周德俭,周军.电致发光显示屏在飞机座舱仪表中的应用.液晶与显示,2000(4):283~287.
[14]Scott V. Thomsen, William R. Hancock, Extending AMLCD technology into the Space Shuttlecockpit, SPIE Proceedings,1994:118~129.
[15]Bailey, David C., F-22cockpit display system, AIAA/IEEE Digital Avionics Systems Conference,13th, phoenix, AZ,1994:459~464.
[16]陈德煌,陈万美.F-22战斗机的综合航空电子系统.电光与控制,2003(2):50~53.
[17]Michael, Gunter Endres.简氏飞机鉴赏指南.北京:人民邮电出版社,2009:101~102.
[18]Mc Cartney Richard., Haim Elias, Kucera Kurt. Performance testing of the primary flightinstruments for the Boeing777airplane, SPIE Proceeding,1996:86~93.
[19]Mc Cartney Richard, Ackerman James. The primary flight instruments for the Boeing777airplane, Cockpit displays. SPIE Proceedings.1994:98~107.
[20]胡问鸣.世界民用飞机工业概览.北京:航空工业出版社,2008:98~99.
[21]张庆伟,林左鸣.世界民用飞机手册.北京:航空工业出版社,2009:221~222.
[22]柯林斯公司.罗克韦尔柯林斯MFD-255显示系统产品说明书.美国:柯林斯公司,2000:44~48.
[23]吴铭望.我国航空电子发展的趋向.航空电子技术,2000(1):1~4.
[24]杜海涛.现代飞机座舱显示系统研究[博士学位论文].南京:南京航空航天大学,1998.
[25]杜海涛,经亚枝,张焕春.基于TMS34010的图形显示系统.微小型计算机开发与应用,1998(1):9~12.
[26]朱耀东.飞机座舱综合图形显示系统关键技术研究[博士学位论文].南京:南京航空航天大学,2003.
[27]江修.飞机座舱综合图形显示系统研究[博士学位论文].南京:南京航空航天大学,2004.
[28]张波,张焕春,经亚枝.基于DSP和FPGA的座舱图形显示系统关键技术研究.信息与控制.2003,32(6):548~552.
[29]孔全存,李成贵,张凤卿.主飞行仪表图形加速显示系统的FPGA设计.电子技术应用,2007,33(4):93~97.
[30]胡小龙,周俊明,夏显忠.飞机座舱图形显示加速系统设计及FPGA实现.中南大学学报(自然科学版),2008,39(5):1042~1047.
[31]刘方,赵忠,马烽.基于AMLCD的飞机综合显示系统.电光与控制,2008,15(9):91~93.
[32]侯亮,李成贵.飞机综合显示系统中图形填充与字符显示.火力与指挥控制,2009,34(1):35~38.
[33]詹于杭.新一代军用飞机显示系统综合字符发生器的研究[硕士学位论文].西安:西北工业大学,2000.
[34]康旭红.机载电子综合显示系统的图形产生技术[硕士学位论文].南京:南京航空航天大学,2000.
[35]刘书明.TigerSHARC DSP应用系统设计.北京:电子工业出版社,2004:43~46.
[36]冯小平,罗勇江,罗明.ADSP技术与应用.北京:机械工业出版社,2008:13~16.
[37]刘书明,罗军辉.ADSP SHARC系列DSP应用系统设计.北京:电子工业出版社,2003:113~114.
[38]李昳垚,李红兵,金惠华.ADSP-2106X SHARC DSPs软件仿真器的构架与实现.微计算机信息,2005,21(07Z):125~127.
[39]王守辉,胡波,陈敬军.基于ADSP21060的C语言程序设计.光电技术应用,2005,20(1):60~63.
[40]黄智伟.FPGA系统设计与实践.北京:电子工业出版社,2005:93~96.
[41]孟宪元.FPGA嵌入式系统设计.北京:电子工业出版社,2007:22~26.
[42]侯伯亨,顾新.VHDL硬件描述语言与数字逻辑电路设计.西安:西安电子科技大学出版社,2004:4~9.
[43]江思敏.VHDL数字电路及系统设计.北京:机械工业出版社,2006:121~122.
[44]杨昕欣,张晓林,徐广毅.嵌入式电子飞行仪表系统软件设计.航空学报,2005,26(1):74~78.
[45]汤晓安,郝建新,蔡宣平.一种高速图形系统帧存的体系结构.计算机工程与设计,2001,22(1):48~50.
[46]Xilinx Inc. The programmable Logic Data Book. San Jose, California, Xilinx Inc,2001:20~46.
[47]Xilinx Inc., Spartan-Ш2.5V FPGA Family: Functional Description. San Jose, California, XilinxInc,2001:7~20.
[48]李维缇,郭强.液晶显示应用技术.北京:电子工业出版社,2005:35~38.
[49]黄平,吴景东.基于DRAM、FPGA的专用LCD显示接口设计与实现.微计算机信息,2007,05z:191~192.
[50]肖炀,卿粼波,罗代升.基于FPGA的多显示模式VGA接口研究与设计.计算机工程与科学,2008,29(5):62~65.
[51]Pele, Samardzic. One application of FPGA integrated circuits CMOS camera and LCD displaycontroller design.6th Interna-tional Conference on Telecommunications, Piscataway: IEEE,2003:137~138.
[52]Castillo,Perez. Electronic-generated holograms by FPGA and monochromatic LCD. FifthSymposium Optics in Industry, United States: International Society for Optical Engineering,2006:604~610.
[53]朱耀东,经亚枝,张焕春.基于FPGA的LCD&VGA控制器设计.电子技术应用,2002,28(11):44~46.
[54]柳朝阳,周晓平.计算机图形学:图形的计算与显示原理.西安:西安电子科技大学出版社,2005:42~50.
[55]James D.Foley.计算机图形学导论.北京:机械工业出版社,2004:48~166.
[56]Mel Slater.计算机图形学与虚拟环境.北京:机械工业出版社,2004:270~272.
[57]唐泽圣,周嘉玉,李新友.计算机图形学基础.北京:清华大学出版社,1996:125~127.
[58]孙立隽.计算机图形学.哈尔滨:哈尔滨工业大学出版社,2000:10~39.
[59]刘勇奎.计算机图形学的基础算法.北京:科学出版社,2002:7~34.
[60]罗振东,廖光裕.计算机图示学原理与方法.上海:复旦大学出版社,1993:28~37.
[61]刘勇奎.一个对称的快速直线生成算法.微计算机应用,1993(2):42~51.
[62]Yao C. F, Rokne J. G. Bi-directional Incremental Linear Interpolation. Computer&Graphics,2006,20(2):295~305
[63]Pitteway M. L. V. and Green A. J. R. Bresenham’s Algorothms with Run Line Coding Shortcut.Computer Journal,2004,25(1):114~115.
[64]Bresenham J. E. Run Length Slice Algorithm for Incremental Lines in Fundamental Algorithmsfor Computer Graphics. Springer-Verlag. Berlin.1985:59~104.
[65]Asif-ul Haque, Mohammad Saifur Rahman, Mehedi Bakht. Drawing lines by uniform packing.Computers&Graphics,2006,30(2):207~212.
[66]Ramon Molla, Roberto Vivo. The stair algorithm. Journal of Graphics Tools,2002,6(2):17~25.
[67]Riemersma, T. Image scaling with Bresenham.Dr. Dobb's Journal,2002.27(5):21~26.
[68]Felsner, Liotta, Wismath. Straight-line drawings on restricted integer grids in two and threedimensions. Journal of Graph Algorithms and Applications,2003,7(4):126~130.
[69]Boyer V. Auto-adaptive step straight-line algorithm. Computer Graphics and Applications,2000,20(5):67~69.
[70]郑宏珍.改进的Bresenham直线生成算法.中国图像图形学报,1999,4(7):606~608.
[71]柳士俊,郑北胜,徐怀刚.对称扫描四步增量画线算法.中国图像图形学报,2002(10):1054~1057.
[72]林笠.基于Bresenham算法的四步画直线算法.暨南大学学报:自然科学版,2003,24(5):19-22.
[73]韩玫瑰.基于并行填充模式的直线生成算法.济南大学学报:自然科学版,2004,18(3):212~214.
[74]章立亮,周琼.光栅图形反走样的加权区域采样算法.宁德师专学报(自然科学版),Vol.14(1):1~3.
[75]沈强,张波,陈淑珍.计算机图形学反走样技术及实现.武汉大学学报(自然科学版),1997,43(1):113~118.
[76]Kvetny, R.N., Kostrova, C. Bogatch,Anti-aliasing algorithms based on self-similar multitudes.Proceedings of SPIE-The International Society for Optical Engineering,2001:83~88.
[77]Olson, Eric M. Using programmable graphics to improve zoom window anti-aliasing.Proceedingsof SPIE. The International Society for Optical Engineering,2004:164~172.
[78] Max N. L. Antialiasing Scan-line Data, IEEE Computer Graphics and Applications,1990:18~30.
[79] NVIDIA Inc., Technical Brief-HRAA: High-Resolution Antialiasing through Multisampling,NVIDIA Corporation,2002:37~41.
[80] Feibush E. A., Levoy M., and Cook R.L. Synthetic texturing using digital filters, Comput. Graph.,1980,14:294~301.
[81] Warnock J. E. The display of characters using gray level sample arrays, Comput. Graph.,1980,14:302~307.
[82] Gupta S., Sproull R.F. Filtering edges for gray-scale displays, Comput. Graph.,1981,15:1~6.
[83] Wu X.. An efficient antialiasing technique. Computer Graphics,1991,25(4):143~152.
[84] Michael A., A Fast Antialiasing [EB/OL]. http://www.whisqu.se/per/docs/graphics75.htm
[85]舒若,张焕春,经亚枝.一种基于Bresenham算法的直线快速反走样技术.机械制造与研究,2002,(5):15~17.
[86]刘涛,高青伟,赵国荣.一种新的基于圆锥滤波的直线反走样生成技术.工程图学学报,2006,3(1):61~64.
[87]李成贵,闫智武,张望远.罗盘仪表绘制中高斯积分法反走样算法的研究.中国测试技术,2006,32(1):16~18.
[88]杜晨辉,经亚枝.全罗盘画面反走样算法的研究和实现.南京航空航天大学学报,200234(4):391~393.
[89]张波,张焕春,经亚枝.罗盘刻度线反走样快速绘制算法的改进研究.计算机辅助设计与图形学学报,2003,15(1):71~75.
[90]李震霄,何援军.任意宽度直线的绘制与反走样.武汉大学学报(上学版),2006,39(4):130~133.
[91]江修,张焕春,经亚枝.三像素宽反走样直线的绘制算法研究.南京航空航天大学学报,200335(2):148~151.
[92] Field D. Algorithms for drawing anti aliased circles and ellipses. Computer Vision, Graphics, andImage Processing,1986,33(1):1~15.
[93] Schilling A. A new simple and efficient antialiasing with subpixel masks. Computer Graphics,1991,25(4):133~141.
[94] Chang S L, Shantz M, Rocchetti R. Rendering cubic curves and surfaces with integer adaptiveforward differencing. Computer Graphics,1989,23(3):157~166.
[95]Crow F C. The aliasing problem in computer generated shaded images. Communications of theACM,1977,20(11):799~805.
[96]Wu X L, Rokne J G. Double step incremental generation of lines and circles. Computer Vision,Graphics, and Image Processing,1987,37(3):331~344.
[97]刘勇奎,石教英.圆的像素级生成及反走样算法.计算机辅助设计与图形学学报,2005,17(1):34~41.
[98]牛玉静,唐棣.双步圆的反走样生成算法.计算机工程与应用,2010,46(23):175~178.
[99]牛连强,邵中.直线与典型曲线的统一反走样整数生成算法.计算机辅助设计与图形学学报,2010,22(8):1293~1299.
[100]杜海涛,康旭红,经亚枝.小号汉字反走样旋转算法的研究与实现.数据采集与处理,1999,14(4):480~484.
[101]Handley S. J. and Allerton D J. The Designed of an EFIS Attitude Indicator for A FlightSimulator. ICAS-94-8.1.4,282~292.
[102]Smiths Aerospace Limited.5ATI Flat Panel Displays Technical Overview.2002:1-4~1-11.
[103]江修,张焕春,经亚枝.直线生成算法在飞机座舱全罗盘画面绘制中的应用.计算机辅助设计与图形学学报,2003,15(11):1448~1451.
[104]孙燮华.扫描线种子填充算法的改进.计算机工程,2000,26(12):142~143.
[105]陈炳发,廖文和.自适应扫描线的简单多边形核填充算法.南京航空航天大学学报,2004,36(4):477~481.
[106]Heckbert P. S. A seed fill algorithm. in Graphic Gems, Glassner, A.S., Ed., San Diego: AcademicPress,1990:275~277.
[107]Fishkin K. P., Filling a region in a frame buffer, Graphic Gems, Glassner, A. S.,Ed., San Diego:Academic Press,1990:278~286.
[108]张波,张焕春,经亚枝.一种采用数学形态学方法的姿态指示器填充算法.南京航空航天大学学报,2003,35(2):152~156.
[109]杜海涛,经亚枝,张焕春.飞机座舱全姿态指示器的填充算法研究.计算机辅助设计与图形学学报,1999,11(2):120~124.
[110]李开宇.用FPGA实现机载全姿态指示仪图形硬件填充.计算机辅助设计与图形学学报,2004,16(2):248~251.
[111]李雷鸣.基于DSP和FGPA的全姿态指示器填充算法研究及硬件实现技术[硕士学位论文].南京:南京航空航天大学,2004.