基于光纤通信的简易有线电报机的实现

上传人:仙*** 文档编号:154986040 上传时间:2022-09-22 格式:DOC 页数:127 大小:3.83MB
返回 下载 相关 举报
基于光纤通信的简易有线电报机的实现_第1页
第1页 / 共127页
基于光纤通信的简易有线电报机的实现_第2页
第2页 / 共127页
基于光纤通信的简易有线电报机的实现_第3页
第3页 / 共127页
点击查看更多>>
资源描述
基于光纤通信的简易有线电报机的实现【作者简介】 秦 晓 (1986- ) 男,物理电子学院电子信息科学与技术专业2004级本科生。侯德彬(1983- ) 男,物理电子学院电子信息科学与技术专业2003级本科生。戚 贺(1987- ) 男,物理电子学院电子信息科学与技术专业,2005级本科生。基于光纤通信的简易有线电报机的实现秦晓侯德彬戚贺(电子科技大学物理电子学院 成都 610054)【摘要】 本文介绍了一种基于光纤通信的简易有线电报机的设计与实现。发报机采用AT89S52单片机为中心控制器,对由两个按键输入的点、划信息进行编码,然后通过光端机调制成光强信号发送;收报机接收解调,再用AT89S52进行译码,其间对点、划信息进行声光显示,并在液晶显示器上显示所输入的数字、字母以及汉字。【关键词】 AT89S52 电文编译码 光纤通信 液晶显示Realization of telegraph based on optical communicationQIN Xiao HOU De-bin QI He (School of Physical Electronics of UESTC Chengdu 610054)Abstract A design and realization of telegraph based on the optical communication methods is introduced in this paper. The 8-bit microcontroller AT89S52 is used as the central controller of the transmitter, which is responsible for encoding the dot and hyphen information input through buttons, another AT89S52 is used in the receiver to decode these information and display it on the LCD. An optical fiber with correspondent interface is used to connect the transmitter and receiver.Key words AT89S52 Telegraph encoding/decoding Optical communication LCD1引言本文的提出基于2006年电子科技大学“亿利达”杯电子设计大赛,题目要求为:制作一个莫尔斯电报的收发机,点、划信息采用两个按键分别输入,并采用声和光的方式进行显示,其中声音可以用开关进行控制。载波频率不小于100kHz。制作一个莫尔斯电报的收发机,要求能够正确解调出点、划信息,并采用声和光的方式进行显示。由上述发、收报机构成最简莫尔斯有线电报系统,要求收发距离大于10米。系统能够输入和显示0至9的数字,并对数字进行自动编码和译码。系统能够输入和显示汉字电报,并对电报自动编码和译码。针对上述要求,我们提出了基于光纤通信的以单片机为控制单元的电报机的设计。2方案比较、设计与论证2.1硬件部分2.1.1控制系统模块方案1 基于AT89S52单片机的电文编码译码系统, AT89S52是ATMEL公司生产的8位单片机,具有性能良好、成本低、可靠性高等特点, 在实际应用中取得了良好效果。单片机外围电路简单,只需晶振与几个电容电阻即可让单片机开始工作。 方案2 采用德州仪器公司(TI)的MSP430系列超低功耗微控制器作为系统控制微处理器,适于在便携式设备中延长电池寿命,芯片具有的强大的16位CPU、16位的寄存器及常数发生器,能够最大限度地提高代码的效率,在捕获模拟信号转换为数字值、然后处理数据用于显示或者传送到主系统等领域具有典型应用。另在实时性和灵活性等性能上都有很大的提高。由于AT89S52单片机可接24MHz晶振,一个指令周期为0.5uS。相对本题目要求,该速度适合。且其内部有8K的Flash,对于该题目来说已经完全够用,MSP430F1610虽然比较高级,但AT89S52业已满足题目要求及发挥部分要求,且AT89S52价格较低,所以我们选择了方案1。2.1.2 调制,传输及解调模块方案1将微控制器的串行输口输出的数字信号传给光端机,光端机把光信号调制成光脉冲信号,然后采用光纤通信,(光导纤维传送信息容量大,质量高,保密性强,抗电磁干扰和抗辐射性能好,整体性能良好,与传统电缆相比重量轻,占用空间少,但是价格比较昂贵)信号接收端经过解调处理,对微控制器输入数字信号,即完成调制、传输和解调过程。方案2利用压控函数发生器的调制解调电路,并利用8038压控振荡的功能,将数据信号第8脚扫描控制端,振荡频率随着数据0电平和1电平而改变。以其制作的FSK调制电路,输出的正弦波的寄生调幅成分极小,其性能远比滤波法优越 。本方案以电线为传输导线,性能不若光纤通信。虽然光纤通信的成本较高,但考虑到其良好的性能和具有一定的创新意识,权衡考虑,我们决定采用方案12.1.3 键盘及显示模块方案1显示部分采用数码管(LED)动态显示,电路简单,但微控制器每次都要循环扫描,才能同时稳定显示,给程序设计带来麻烦。若结合静态显示,需要一些专用的芯片(8279)或利用单片机的串行口采用船并转换芯片(如74LS164),在增加了硬件的复杂度,即系统开发成本的前提下,却不能显示字母和汉字,对发挥部分造成了限制。键盘输入采用点、划输入,另加一确认键,即仅提供一小键盘输入。方案2采用液晶显示器(LCD)显示,虽然成本也较高,相对其能显示汉字和所有的字母的功能它具有体积小、功耗低、清晰度好等优点。键盘输入采用88矩阵键盘,可以完成输入字母数字,字符的任务。为了顺利完成题目的要求,我们选择方案2。2.2 软件部分方案1采用汇编语言。对硬件可直接操作,生成代码小,人机对话效果好,易于实现单片机的简单操作。但实现复杂数学运算较困难。方案2采用C语言。C语言直接操作硬件效果不佳,生成代码较长,编译软件不能很好的按我们预期的编译,不易找出错误。但C语言很容易实现各种复杂算法。由于该题目并不涉及到复杂的数学运算,故汇编语言和C语言并没有太大的优劣区分,根据我们的擅长我们选择方案1,采用汇编语言进行程序设计。3 系统方案的具体设计与实现3.1硬件部分3.1.1系统框图图1 总系统框图设定(The Diagram of System)以双AT89S52为控制核心, 并配以双键盘输入、液晶静态显示,使CPU有足够的时间做算法数据处理且可各自外接声光显示电路。3.1.2 AT89S52单片机控制系统(编码发送及译码接收)图2 单片机基本外围电路(Basic Circuit of Microcontroller)AT89S52单片机可接24MHz晶振,一个指令周期为0.5uS,外围电路简单,开发方便。3.1.3 矩阵键盘图3 88键盘字母、数字输入(8*8 keyboard circuit)采用88键盘可完整输入A-Z,0-9,以及结束键。另有输入点划信息的小键盘,当输入点划信息时,声光显示,在输入结束键后,液晶上显示所输入点信息代表的字母或数字;大键盘输入时,可直接输入数字或字母,点击结束键(由程序设定)后,可显示汉字。3.1.4 调制解调图4 基于MC10116的调制电路(coding circuit based on MC10116)图5 基于MAX435CPD的解调电路(decoding circuit based on MAX435CPD)集成化的IC芯片MC10116和MAX435CPD分别实现了电信号和光信号之间的互相转换。MC10116的输入是数字信号,根据输入的信号控制激光器的发光,从而实现了光强调制;相反,MAX435CPD解调出光强信号,并将其转换为对应的数字信号输出。3.1.5 声光显示模块图6 蜂鸣器、二极管声光显示电路(Speaker and LED circuit)输入点或划时,单片机控制使蜂鸣器接收到不同时长的高电平,发出不同时长的声音以区分点划,检测到点时发光二极管D1亮,划时D2、D3、D4同时亮。3.1.6 液晶显示模块采用点阵系列FYD12864-0402B型号的液晶模块,它包括了显示其本身及液晶的驱动电路,内部包括了X地址计数器、Y地址计数器和显示数据随机存储器(RAM)等 ,地址计数器用来记录显示RAM中哪个地址处于可操作状态,显示RAM中则存放着要显示的内容,这些内容是由字模提取软件自动生成的。模块提供了很方便的接口,我们只需要通过接口对驱动电路的内部寄存器进行操作即可。3.1.7完整的电路系统图7 发报机的电路原理图示(Schematic diagram of transmitter)图8 收报机的电路原理图示(Schematic diagram of receiver)3.2 软件部分3.2.1 程序流程图图9 程序流程图(flow chart)3.2.2 端口配置图10 发报端微控制器接口图例(Pin allocation of transmitter)图11 收报端微控制器接口图例(Pin allocation of receiver)3.2.3算法实现由于莫尔斯代码由点,划构成,我们要实现的基本功能是发报机的数据和控制信号传到收报机并在LCD上显示点,划信息,在这里我们利用用串行口通信,由于点、划信息必须及时传输到收端,所以串行通信每次只能传输一个点划信息,所以我们利用八位数据中最低位的高(即00000001)来表示点信息(信息0),用00000010表示划信息(信息1),我们另加了确定键,表示代表字符的点、划信息输入完毕,应该显示其代表的字符,传输信息用00000100表示发报机在工作时不断扫描键盘,当键盘按下,单片机响应,将信号通过串行口串出,收报机不断检测串行通信是否完成,当接收完一帧,执行中断程序,进而对收到的电码进行解调,如果收到的是非结束信号(点或划)则在LCD上显示出点划信息;否则对收到的点划解码,找出其对应的字母或数字并显示在LCD上。为了实现汉字的编码和显示,我们利用了LCD模块自带的汉字字库。FYD12864-0402B型号的LCD带有固化的汉字字库,我们只需要向其写入相应的地址,对应的汉字即会显示在液晶上。汉字地址是2BYTE的数据,由此,我们制作了一个大的键盘,包含AZ的字母和09的数字,当检测到有键按下时,查出该键值对应的莫尔斯码,然后调用上面的程序将其发送出去;每收到一个字母或数字,收报机将其存放在一个2BYTE的缓存中的低4位并左移四位,当检测到显示汉字的命令时,将这2BYTE输出到LCD,使对应的汉字显示出来。4 测试及结果:要求系统完成情况1、88键盘实现各种字符的输入,和控制键的设定。小键盘实现点,横的输入。键盘上41个功能键小键盘上3个键均可实现功能。2、上位机串行口输出数据被下位机完整接收。声光显示实现3、液晶(LCD)显示点划信息、数字、字母及汉字实现。4、莫尔斯代码转换LCD显示代码实现5、蜂鸣器和LED显示灯实现6、其他开机后系统全部由键盘控制,实现全自动控制,完成上述所有功能。 5 结论通过测试,我们所设计的简易电报机能够出色的完成题目所要求的任务,回顾该题目的制作过程,我们认为该题目的难点在于软件的设计,特别是编解码方法的设计与实现;我们通过观察莫尔斯码的特征,提出了一种新的编码方法,并利用单片机的串口资源进行数据传输,达到了较好的效果。参 考 文 献1 邓兴成 姜宝钧.单片机原理与实践指导讲义. 成都:电子科技大学,20052 胡汉才. 单片机原理及其接口技术. 北京:清华大学出版社,2004.2,第二版3 Unknown. FYD12864-0402Bsm.pdf. 4 MAXIM Semiconductor (美信半导体公司). MAX435-MAX436.pdf. available http:/www.maxim-5 ON Semiconductor.MC10116 Datasheet.7Correlation Analysis of Antennas Under Multipath FadingCorrelation Analysis of Antennas Under Multipath FadingNI Wei 【作者简介】倪威 (1984-) 男,电子科技大学应用数学学院信息与计算科学专业2003级学生,由 JASSO 奖学金资助。.(College of Applied Mathematics of UESTC Chengdu 610054)Abstract In wireless communication, the simulation and the experimental measurement of the performance (correlation) for portable antennas are extremely significant under multipath fading environment. In order to improve spectrum efficiency, a proper distance between antenna elements is crucial for portable terminals. This paper developed variety of models to simulate the correlation between antenna elements. Mutual coupling, which has significant effect on correlation, should be taken into account. The models with mutual coupling based on 2D and 3D were developed respectively. Besides, the simulation results of correlation had been compared with the experimental results.Key words Correlation, Antenna Multipath Fading Mutual Coupling.多径衰落环境中天线的相关性分析倪威(电子科技大学应用数学学院 成都 610054)【摘要】 在无线通信中,多径衰落下对移动式天线的相关系数做仿真和物理实验是非常有意义的。为了提高频谱效率,在天线之间设计合适的距离对移动式设备非常重要。本文建立了多种模型来仿真天线之间的相关系数。互耦作为影响相关系数的关键因子将被考虑。本文还分别建立了2维和3维的互耦模型,除此之外还将仿真结果和实验结果进行了比较。【关键词】 相关系数 天线 多径衰落 互耦1 IntroductionIn the field of wireless telecommunications, multipath results in radio signals reaching the receiving antennas by two or more paths. The signal generated by the user mobile device is omnidirectional in nature; therefore, it causes the signal to be reflected by obstacles, such as buildings. Multipath fading plays a role in reducing system capacity.Our objective is to improve spectrum efficiency. To realize it, we usually employ three methodologies - diversity, MIMO (Multiple Input and Multiple Output), adaptive array antennas. Diversity technique can dramatically improve the performance over fading channels. For employing such technologies, under the environment of multipath fading, we need to analyze the performance (correlation coefficient) on receiving levels. In the MIMO systems, mutual coupling causes both reduced correlation, which increases the capacity, and reduced radiation efficiency.Correlation with respect to antenna separation was investigated by many researchers. The correlation analysis will be performed by taking the effect angle-of-arrival (AoA) statistics, multipath scattering, mutual coupling, and near-field scatterers (NFS). Firstly, a valid model of the AoA distributions is the key parameter in the correlation analysis. Secondly, mutual coupling is another key parameter. With the effect of mutual coupling, the signal received through an antenna element does not reflect the magnitudeof the direct incoming signals but also some portion of the signals induced by the surrounding antenna elements or conducting objects. Mutual coupling between antenna elements depends on antenna element separation, geometry of array and antenna elements, the location of antenna elements in array, the frequency, the materials, NFS, and AoA. Since it is usually difficult to obtain an analytical formula, numerical methods are employed. The antenna patterns can be obtained using moment method by a simulation program software such as PLANC-MM.In this study, we started from the basic model based on 2-D, gradually to reach higher complicated models to simulate the correlation Another important work was to compare the simulation results with the experiment results, which is important to promote each other.2 Mathematical Theory2.1 Correlation CoefficientIn probability and statistics, correlation coefficient indicates the strength and direction of a linear relationship between two random variables based on a linear relationship.The basic mathematical definition is (1)where X, Y are random variables and E is the expected value of the variable.Similarly, the Correlation Coefficient between signal and signal is (2)where is the average of signal and is the average of signal .However, correlation does not imply causation. That is to say, correlation is 0 is the necessary but not sufficient condition of Independent. However, it is surely a hint. The paper employed correlation to measure the relationship among antennas.2.2 Gaussian DistributionGaussian distribution (also called normal distribution) is of great use in many fields. In general, Gaussian distribution is the most stochastic distribution. Many psychological measurements and physical can be approximated well by a Gaussian distribution due to Central Limit Theorem.The probability density function (pdf) of the Gaussian distribution is: (3)where is the mean value of X and is the variance. The curve of probability density function is shown in Fig.1Figure 1 The pdf of Gaussian distributionOne of the most useful application of Gaussian distribution is Three Principle. For a random variable X which obeys Gaussian distribution with the mean value of and the variance of, the probability is (4)3 Simple 2-D & 3-D Models3.1 2 Dimension ModelConsider two omnidirectional antennas. Firstly, we start from the analysis of 2 Dimension propagation (shown in Fig.2). Here, we suppose that the initial phases of waves (denoted as) are random; the Angle of Arrival (AoA) (denoted as ) obeys uniform distribution; antennas are moved during a distance of x.Figure 2 Wave propagation on 2-DThe signals received by two antennas are defined as (5) (6)respectively.where N is the number of incoming wave paths, l is the distance between Antenna#1 and Antenna#2 and k is the wave number.In order to obtain the correlation, just substitute Eq.(5) and (6) into Eq.(2). In the simulation, 10 random waves with uniformly random initial phases are selected. Repeat the simulation 100 times, and pick up the average value. The result with the numerical method is presented in Fig.3.Figure 3 Correlation based on 2-D without MCFrom the Fig.3, we can observe that the correlation is very high if the space is near, less than . Anyway, 2D model is so rough that 3D model should be created.3.2 3 Dimensional ModelExtend the previous 2 Dimensional model to 3 Dimension (shown in Fig.4). Correlation and AoA statistics are highly coupled. Different values are due to different assumptions of distribution of AoA. Usually, these distributions include uniform distribution, truncated Laplacian, Sinusoidal, and Gaussian distribution6.Figure 4 Wave propagation on 3-DAccording to 1 and 2, it can be assumed that has uniform distribution at and Gaussian distribution at. i.e. (7) (8)where is the mean of the AoA from azimuthal plane and is its standard deviation.Again, consider the omnidirectional radiation pattern of two antennas. In three dimensional coordinate, we recreate the descriptions of signals of Eq.(5) and (6), (9) (10)Repeat the similar steps implemented in previous 2D model, the simulation result without mutual coupling is shown in Fig.5Figure 5 Correlation based on 3-D without MCAs can be seen from Fig.5, correlation of 3-D for smaller antenna space is substantially bigger than 2-D. Besides, correlation with different distribution of AoA is different. However, the correlation is still very high if the space is near, less than . The result is different with the experiments which has a lower correlation even if the distance is small. Hence, the effect factors are not considered far from enough.Whats more, the problem about AoA still exists. According to 1, the incoming waves distribution has a standard deviation of 200 and the principal waves incident at 200 above the horizontal plane (). Obviously, some negative angles will appear in the simulation, which are not consistent with the practical situations. Three methods are proposed to solve it. (Assume that the mean value is always 200).l Regard the negative angles of the incoming waves as the waves which come from the opposite side, which are symmetric by z-axis.l Utilize principle According to principle with Eq.(4), we can easily obtain . Now it seems that the negative angles have been avoided. However, a new problem comes out. There is almost no any wave in the domain from 400 to 900. Hence, it is also a little far from practice.l Redevelop another new distribution Since negative angles need to be avoided, and there is possibility that the waves from 00 to 900 exists. Then we can apply Gaussian distribution likewise with the mean of 200 and find a proper standard deviation of such that. i.e. solve the following equation (11) Then, its easy to find the value of by solving the Eq.(11).4 Advanced Models4.1 Mutual CouplingFor MIMO antennas, limited by physical space, it will generate amount of mutual coupling between antenna elements. Mutual coupling is virtually the interchange of energy. As correlation analysis of antenna elements, mutual coupling (MC) should be taken into account. The effect of mutual coupling on spatial diversity and MIMO systems can be desirable depending on the antenna configuration and the environment.According to 5, there are some factors which will affect mutual coupling.l Distance between antennas It is the most important factor affecting mutual coupling. Some analytical studies showed that only if the distance between the antenna elements is more than half of the wavelength, there is minimal or almost no mutual coupling. Similarly, mutual coupling is also affected by the frequency since the signal is expressed in terms of wavelength.l Angle of Arrival (AoA)Even if mutual coupling is not taken into account, AoA is a critical parameter. Actually, AoA and mutual coupling are also strongly coupled. Different distribution of AoA will result in different mutual coupling.l Near-Field Scatterers (NFS) Besides, mutual coupling is strongly influenced by the surrounding objects in the near-field of antenna elements. The re-radiated signals from an antenna element could reflect back from the NFS and can be coupled back to other elements.Usually, we utilized numerical methods to measure mutual coupling. Naturally, its almost difficult for us to conclude all the factors. Hence, no wonder that the simulation results will be always a little bit different from real behaviors of antenna element.4.2 2-D with Mutual CouplingSince the coupling effect is significant due to the reradiation of antennas for antenna spacings smaller than, the expression for the antenna electricity field with mutual coupling is developed.Figure 6 Wave propagation on 2-D with MCThe electricity field part can be described as (12)whereand h is the length of an antenna.Its difficult to calculate the correlation using analytical equations. Hence, numerical method was employed. The equation (12) was rewritten into (13)The antenna pattern can be obtained using moment method by a simulation software called PLANC-MM.With mutual coupling, we rewrite the descriptions of signals in Eq.(5) and (6), (14) (15)The correlation of the simulation result was shown in Fig.7.Figure 7 correlation of the simulation Although only 2D model, its obviously different from the situation without mutual coupling. The correlation at low distance is lower than the previous results.4.3 3-D with Mutual CouplingNaturally, 3-D model with mutual coupling should be applied to simulate the correlation between antenna elements on the base of 2-D.The situations between 2-D and 3-D are different mainly due to geometrical analysis. The 3-D propagation model is shown in Fig.8Figure 8 Wave propagation on 3-D with MCCompared with 2-D model, in order to measure R1 and R2, we had designed a virtual plane. Suppose any point at Antenna #1 is z1, and any point at Antenna #2 is z2. This virtual plane which passes zero-point O, and the direction vector of wave is.And the analytic equation of the plane is,The distance between any point (x0,y0,z0) and the plain is (16)this point should be on the same side of the plane as normal vector and negative if it is on the opposite side.Hence, if we built a virtual plan, (17) (18)From the Eq.(12), the numerical calculation equation is(19)As the previous steps, the result is shown in Fig.9Figure 9 Correlation based on 3-D with MCCompared with 2D, the correlation of 3D is a little more lower.5 ComparisonThe validation by experiment is necessary. Some experiment showed that the correlation between antenna elements is under 0.5 for diversity and MIMO configurations even though the antenna spacing is very small. Different conditions, such as the surrounding environment and antenna configuration, will result in much different correlation results.6 ConclusionFrom the above research, mutual coupling is a very critical factor to affect the correlation between antenna elements. At some near distance, with the effect of mutual coupling, the correlation is reduced to very small. This theory is extremely significant for portable terminals.7 AcknowledgementI would like to thank Prof. Nobuo Nakajima and Ms. Wannipa Yadum for their kind help with my research in Nakajima Laboratory. Besides, thank the University of Electro-Communications for all the support provided through the JUSST program.References1 K.Tsunekawa and K.Kagoshima, Analysis of a correlation coefficient of built-in diversity antennas for a portable telephone, in Proc. IEEE AP-S Int. Symp., vol.1, Dallas, TX, May 1990, pp.543-546.2 R.Janaswamy, Angle of arrival statistics for a 3-D spheroid model, IEEE Trans. Veh. Technol., vol.51, no.3, pp.798-799, Aug.1997.3 R.G.Vaughan, Polarization diversity in mobile communications, IEEE Trans. Veh. Technol., vol.39, no.3, pp.177-186, Aug.1990.4 M.K.O zdemir, H.Arslan and E.arvas, On the Correlation Analysis of Antennas in Adaptive MIMO Systems with 3-D Multipath Scattering, IEEE Trans. Veh. Technol., vol.39, no.3, pp.295-299, Aug.2004.5 M.K.O zdemir, H
展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 管理文书 > 施工组织


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!