EDN首页   博客首页

最新日志

发表于:2007-12-2 10:34:35
标签:无标签

1

如何选用滤波电容

如何选用滤波电容
   滤波电容在开关电源中起着非常重要的作用,如何正确选择滤波电容,尤其是输出滤波电容的选择则是每个工程技术人员都十分关心的问题。50Hz工频电路中使用的普通电解电容器,其脉动电压频率仅为100Hz,充放电时间是毫秒数量级。

    为获得更小的脉动系数,所需的电容量高达数十万μF,因此普通低频铝电解电容器的目标是以提高电容量为主,电容器的电容量、损耗角正切值以及漏电流是鉴别其优劣的主要参数。而开关电源中的输出滤波电解电容器,其锯齿波电压频率高达数十kHz,甚至是数十MHz,这时电容量并不是其主要指标,衡量高频铝电解电容优劣的标准是“阻抗-频率”特性,要求在开关电源的工作频率内要有较低的等效阻抗,同时对于半导体器件工作时产生的高频尖峰信号具有良好的滤波作用。

    普通的低频电解电容器在10kHz左右便开始呈现感性,无法满足开关电源的使用要求。而开关电源专用的高频铝电解电容器有四个端子,正极铝片的两端分别引出作为电容器的正极,负极铝片的两端也分别引出作为负极。电流从四端电容的一个正端流入,经过电容内部,再从另一个正端流向负载;从负载返回的电流也从电容的一个负端流入,再从另一个负端流向电源负端。由于四端电容具有良好的高频特性,为减小电压的脉动分量以及抑制开关尖峰噪声提供了极为有利的手段。高频铝电解电容器还有多芯的形式,即将铝箔分成较短的若干段,用多引出片并联连接以减小容抗中的阻抗成份。并且采用低电阻率的材料作为引出端子,提高了电容器承受大电流的能力

点击此处查看原文 >>

系统分类: 模拟技术   |    用户分类: 无分类    |    来源: 整理

评论(0) | 阅读(545)
发表于:2007-12-2 10:32:20
标签:无标签

1

大电容并小电容解析

大电容由于容量大,所以体积一般也比较大,且通常使用多层卷绕的方式制作,这就导致了大电容的分布电感比较大(也叫等效串联电感,英文简称ESL)。
 
      电感对高频信号的阻抗是很大的,所以,大电容的高频性能不好。而一些小容量电容则刚刚相反,由于容量小,因此体积可以做得很小(缩短了引线,就减小了ESL,因为一段导线也可以看成是一个电感的),而且常使用平板电容的结构,这样小容量电容就有很小ESL这样它就具有了很好的高频性能,但由于容量小的缘故,对低频信号的阻抗大。
 
      所以,如果我们为了让低频、高频信号都可以很好的通过,就采用一个大电容再并上一个小电容的方式。
 
       常使用的小电容为 0.1uF的瓷片电容,当频率更高时,还可并联更小的电容,例如几pF,几百pF的。而在数字电路中,一般要给每个芯片的电源引脚上并联一个0.1uF的电容到地(这个电容叫做退耦电容,当然也可以理解为电源滤波电容,越靠近芯片越好),因为在这些地方的信号主要是高频信号,使用较小的电容滤波就可以了。

点击此处查看原文 >>

系统分类: 模拟技术   |    用户分类: 无分类    |    来源: 整理

评论(0) | 阅读(518)
发表于:2007-12-2 10:28:24
标签:无标签

1

阻抗匹配

输入阻抗是指一个电路输入端的等效阻抗。在输入端上加上一个电压源U,测量输入端的电流I,则输入阻抗Rin就是U/I。你可以把输入端想象成一个电阻的两端,这个电阻的阻值,就是输入阻抗。

输入阻抗跟一个普通的电抗元件没什么两样,它反映了对电流阻碍作用的大小。对于电压驱动的电路,输入阻抗越大,则对电压源的负载就越轻,因而就越容易驱动,也不会对信号源有影响;而对于电流驱动型的电路,输入阻抗越小,则对电流源的负载就越轻。因此,我们可以这样认为:如果是用电压源来驱动的,则输入阻抗越大越好;如果是用电流源来驱动的,则阻抗越小越好(注:只适合于低频电路,在高频电路中,还要考虑阻抗匹配问题。另外如果要获取最大输出功率时,也要考虑 阻抗匹配问题

二、输出阻抗

无论信号源或放大器还有电源,都有输出阻抗的问题。输出阻抗就是一个信号源的内阻。本来,对于一个理想的电压源(包括电源),内阻应该为0,或理想电流源的阻抗应当为无穷大。输出阻抗在电路设计最特别需要注意

但现实中的电压源,则不能做到这一点。我们常用一个理想电压源串联一个电阻r的方式来等效一个实际的电压源。这个跟理想电压源串联的电阻r,就是(信号源/放大器输出/电源)的内阻了。当这个电压源给负载供电时,就会有电流I从这个负载上流过,并在这个电阻上产生I×r的电压降。这将导致电源输出电压的下降,从而限制了最大输出功率(关于为什么会限制最大输出功率,请看后面的“阻抗匹配”一问)。同样的,一个理想的电流源,输出阻抗应该是无穷大,但实际的电路是不可能的

 三、阻抗匹配

阻抗匹配是指信号源或者传输线跟负载之间的一种合适的搭配方式。阻抗匹配分为低频和高频两种情况讨论。 我们先从直流电压源驱动一个负载入手。由于实际的电压源,总是有内阻的(请参看输出阻抗一问),我们可以把一个实际电压源,等效成一个理想的电压源跟一个电阻r串联的模型。假设负载电阻为R,电源电动势为U,内阻为r,那么我们可以计算出流过电阻R的电流为:I=U/(R+r),可以看出,负载电阻R越小,则输出电流越大。负载R上的电压为:Uo=IR=U/[1+(r/R)],可以看出,负载电阻R越大,则输出电压Uo越高。再来计算一下电阻R消耗的功率为:

P=I2×R=[U/(R+r)]2×R=U2×R/(R2+2×R×r+r2)

                                   =U2×R/[(R-r)2+4×R×r]

                                   =U2/{[(R-r)2/R]+4×r}

对于一个给定的信号源,其内阻r是固定的,而负载电阻R则是由我们来选择的。注意式中[(R-r)2/R],当R=r时,[(R-r)2/R]可取得最小值0,这时负载电阻R上可获得最大输出功率Pmax=U2/(4×r)。即,当负载电阻跟信号源内阻相等时,负载可获得最大输出功率,这就是我们常说的阻抗匹配之一对于纯电阻电路,此结论同样适用于低频电路及高频电路。当交流电路中含有容性或感性阻抗时,结论有所改变,就是需要信号源与负载阻抗的的实部相等,虚部互为相反数,这叫做共扼匹配。在低频电路中,我们一般不考虑传输线的匹配问题,只考虑信号源跟负载之间的情况,因为低频信号的波长相对于传输线来说很长,传输线可以看成是“短线”,反射可以不考虑(可以这么理解:因为线短,即使反射回来,跟原信号还是一样的)。从以上分析我们可以得出结论:如果我们需要输出电流大,则选择小的负载R;如果我们需要输出电压大,则选择大的负载R;如果我们需要输出功率最大,则选择跟信号源内阻匹配的电阻R。有时阻抗不匹配还有另外一层意思,例如一些仪器输出端是在特定的负载条件下设计的,如果负载条件改变了,则可能达不到原来的性能,这时我们也会叫做阻抗失配。

  

在高频电路中,我们还必须考虑反射的问题。当信号的频率很高时,则信号的波长就很短,当波长短得跟传输线长度可以比拟时,反射信号叠加在原信号上将会改变原信号的形状。如果传输线的特征阻抗跟负载阻抗不相等(即不匹配)时,在负载端就会产生反射。为什么阻抗不匹配时会产生反射以及特征阻抗的求解方法,牵涉到二阶偏微分方程的求解,在这里我们不细说了,有兴趣的可参看电磁场与微波方面书籍中的传输线理论。传输线的特征阻抗(也叫做特性阻抗)是由传输线的结构以及材料决定的,而与传输线的长度,以及信号的幅度、频率等均无关。

例如,常用的闭路电视同轴电缆特性阻抗为75Ω,而一些射频设备上则常用特征阻抗为50Ω的同轴电缆。另外还有一种常见的传输线是特性阻抗为300Ω的扁平平行线,这在农村使用的电视天线架上比较常见,用来做八木天线的馈线。因为电视机的射频输入端输入阻抗为75Ω,所以300Ω的馈线将与其不能匹配。实际中是如何解决这个问题的呢?不知道大家有没有留意到,电视机的附件中,有一个300Ω75Ω的阻抗转换器(一个塑料封装的,一端有一个圆形的插头的那个东东,大概有两个大拇指那么大)。它里面其实就是一个传输线变压器,将300Ω的阻抗,变换成75Ω的,这样就可以匹配起来了。这里需要强调一点的是,特性阻抗跟我们通常理解的电阻不是一个概念,它与传输线的长度无关,也不能通过使用欧姆表来测量。为了不产生反射,负载阻抗跟传输线的特征阻抗应该相等,这就是传输线的阻抗匹配,如果阻抗不匹配会有什么不良后果呢?如果不匹配,则会形成反射,能量传递不过去,降低效率;会在传输线上形成驻波(简单的理解,就是有些地方信号强,有些地方信号弱),导致传输线的有效功率容量降低;功率发射不出去,甚至会损坏发射设备。如果是电路板上的高速信号线与负载阻抗不匹配时,会产生震荡,辐射干扰等。

当阻抗不匹配时,有哪些办法让它匹配呢?第一,可以考虑使用变压器来做阻抗转换,就像上面所说的电视机中的那个例子那样。第二,可以考虑使用串联/并联电容或电感的办法,这在调试射频电路时常使用。第三,可以考虑使用串联/并联电阻的办法。一些驱动器的阻抗比较低,可以串联一个合适的电阻来跟传输线匹配,例如高速信号线,有时会串联一个几十欧的电阻。而一些接收器的输入阻抗则比较高,可以使用并联电阻的方法,来跟传输线匹配,例如,485总线接收器,常在数据线终端并联120欧的匹配电阻。

    为了帮助大家理解阻抗不匹配时的反射问题,我来举两个例子:假设你在练习拳击——打沙包。如果是一个重量合适的、硬度合适的沙包,你打上去会感觉很舒服。但是,如果哪一天我把沙包做了手脚,例如,里面换成了铁沙,你还是用以前的力打上去,你的手可能就会受不了了——这就是负载过重的情况,会产生很大的反弹力。相反,如果我把里面换成了很轻很轻的东西,你一出拳,则可能会扑空,手也可能会受不了——这就是负载过轻的情况。另一个例子,不知道大家有没有过这样的经历:就是看不清楼梯时上/下楼梯,当你以为还有楼梯时,就会出现“负载不匹配”这样的感觉了。当然,也许这样的例子不太恰当,但我们可以拿它来理解负载不匹配时的反射情况

点击此处查看原文 >>

系统分类: 模拟技术   |    用户分类: 无分类    |    来源: 整理

评论(0) | 阅读(587)
发表于:2007-12-2 10:23:41
标签:无标签

1

LED灯光系统设计方法

LED作为显示器件,由于其发光效率高、使用寿命长、易于控制等优点已经日益被更多的领域所使用。尤其在2005年开始被大量用于城市/舞台灯光系统中。本文主要介绍LED灯光的种类、LED灯光控制专用芯片介绍,硬件设计思路以及软件设计思路。

名词解释

彩色像点:为了让LED灯光呈现彩色显示,需要由至少2个以上的不同颜色LED组成一个像素点。红绿蓝LED搭配根据亮度和灰度级别的需求可以有多种搭配方式,如:

a) 1个红色LED+1个绿色LED+1个蓝色LED ,3个LED显示256级灰度彩色。


b) 2个红色LED+1个绿色LED+1个蓝色LED,4个LED组成

RGB:是指红色、绿色、蓝色3种LED。

LPD6803:是“拓彩科技”专门为LED灯光系统设计的驱动芯片,内置SUPER-PWM,可以产生三路恒流驱动和灰度调制输出。

LED灯光的种类

点光源

点击看大图

技术特点:应用LED彩色屏的显示原理,将其像素放大降低整体造价成本。每个模块为一个彩色像点(RGB)。

应用环境:酒吧、KTV、舞台、商场、展厅。作为音乐韵律显示,背景墙装饰等。

LED彩虹管

点击看大图

技术特点:每条灯管由多个彩色像点(RGB)组成,每个像素点可独立产生256级颜色的变化。应用环境:立交桥,河道护栏,建筑外墙等不同场所的装饰照明。

LED地板砖

点击看大图

技术特点:每个模块由多个彩色像素点(RGB)组成,可以独立控制每个像素点。应用环境:酒吧、KTV、舞台。作为地板或者墙壁的装饰照明。

LED灯光控制专用芯片介绍

LPD6803是专门用于LED灯光驱动芯片,控制简单。

点击看大图

功能描述:
a. 内置振荡器,扫描不需要依靠控制板提供扫描时钟。
b. 2根控制线,控制和布线简单。
c. 数据时钟最高可达到25MHz,可以拥有更多的级联输出。

LED灯光控制系统硬件设计思路

LED灯光控制系统主要包含像素点驱动单元和控制板设计两部分。

1. 显示点驱动单元设计

如何实现让像素点呈现出不同颜色,主要依靠人的视觉间歇惰性原理,利用对于每个像素点产生不同占空比实现颜色的混合。本设计案例的LED颜色显示主要依靠LPD6803自动输出3路256级灰度颜色来实现彩色显示。控制器只需要传送每个像素点的扫描占空比数据就可以了。

下图驱动单元设计,适合于LED彩色护栏管、LED地砖应用。其中红绿蓝3色LED的个数可以是多个。单路LED级联方式可以采用串联或者并联方式实现,在设计是你需要考虑电压/电流的外接驱动方式。数据输出级联到下一个模块的输入就实现了一个系统的级联。

LED灯光系统设计方法

如下图驱动单元设计,适合于LED彩虹管应用。一个模块的级联个数按照设计需要调整。

点击看大图

2. 控制板设计

点击看大图

该硬件只是提供给各位一个控制系统设计的参考,基本说明满足一个普通的LED灯光系统所需要的一些基本条件。根据实际系统的需要,可以选择ARM,CPLD等加快显示数据传输的速度以及USB通讯,SD卡存储方面的要求。

硬件设计目的说明:

U1: 使用通用的MCU51单片机,如果系统拖动像素点级联数不多以及不需要做太复杂的图象动画显示情况下。该MCU甚至于可以选择2051这样管脚少、价格低的MCU。

JP1: 为输出符合LPD6803串行时序的接口,只用DATA、CLOCK、GND即可满足显示数据传送要求。

U4:为SPI FLASH,用于存储节目数据。根据系统需要可以利用片选方式设计多片FLASH存储。SPI FLASH现在比较高容量可以做到4M bits。

U6: 为通讯接口,用于于系统主机通讯控制节目播放的内容和下传节目数据。以及用于程序升级。

3. 软件驱动设计

以下以驱动单个像素点来说明数据传送的方式。LPD6803是一个可以自动产生128级别

LED_SendData(BYTE Rdt, BYTE Gdt, BYTE Bdt)


{
......
SCLK = 0;
SDO = 0;
for(i=0;i<32;i++) {SCLK=1;SCLK=0} //送起始32bits 0
SDO=1;SCLK=1;SCLK=0; //送起始位'1'
//输出5位红色
mask = 0x10;
for(j=0;j<5;j++)
{
if(mask&Rdt) SDO = 1;
else SDO = 0;
SCLK=1;SCLK=0;
mask>>=1;
}
//输出5位绿色
mask = 0x10;
for(j=0;j<5;j++)
{
if(mask&Bdt) SDO = 1;
else SDO = 0;
SCLK=1;SCLK=0;
mask>>=1;
}
//输出5位蓝色
mask = 0x10;
for(j=0;j<5;j++)
{
if(mask&Bdt) SDO = 1;
else SDO = 0;
SCLK=1;SCLK=0;
mask>>=1;
}
SDO=0;
SCLK=1;SCLK=0; //补1个CLOCK,如果一次送出了n个点的数据,则需要补n个Clock.
......
}

点击此处查看原文 >>

系统分类: 显示光电   |    用户分类: 无分类    |    来源: 转贴

评论(0) | 阅读(641)
发表于:2007-7-20 21:39:22
标签:电子大赛培训经验  

1

电子竞赛培训

    2007第八届全国大学生电子设计竞赛快要开始了!由于最近确实太忙了!也好久没有更新过自己的日志!我被分到了高频组!大家都知道搞高频的确实有难度!因为有的时候实际做出来的东西不是像想象当中的那样就能出来结果的 !受到各个方面的干扰!所以高频这场仗不好打~但是不管怎样我们队都在尽着自己最大的努力来备战希望在今年的大赛中能够取得好的成绩!

     最近这几天我们一直在做实验箱上的一个系统!利用乘法器MC1496做混频,调幅,检波.鉴频,调制信号用ILC8038产生.导师说先拿这套东西练练手熟悉下制作的过程!虽然1496和8038这两片芯片技术很成熟也通用但是我们做的时候还是遇到了好多麻烦!

     我们先做的单电源供电1496检波但是板子焊接好后信号就是出不来!用示波器观察1496的12脚输出波形是个明显的被拓宽的正弦波!但是经过pi型滤波器后信号失真幅度更大.信号被拓的更宽!无奈下只好检查板子哪出问题!后经过仔细排查!发现实验箱上的12脚输出并没有加Pi型滤波器,只是简单的用个RC滤波器滤波!于是我们马上改动板子信号经过简单RC滤波后达到了理想正弦信号且不失真状态!搞笑吧!理论上来将经过Pi型滤波出来的信号要比RC滤波信号好的多!可是实际上却不然!呵呵!!(滤波器参数的选择肯定没问题)

    之后我们开始做下一个单元1496的混频!这个混频出来的信号更搞笑!做出来后由于我的焊接的疏忽1496静态工作点都不对!后经排查发现漏洞.修正后上电加信号测量!最郁闷的是信号没有出来理想的中频455KHz而是介于200~600之间跳动!波形杂乱.反复调试静态工作点也无济于事!后来我无意间将带通滤波器的电感拔掉发现示波器上显示很清晰的455kHz的波形!并用示波器观察1496上12脚输出波形!发现也是明显的455频率!纳闷的是理论上应该是通过1496本振信号和载波信号相乘后产生的和频和差频信号二次谐波等信号通过12脚输出,然后经过带通滤波器取出差频成分才是所需要的中频455KHz的频率!现在我把带通滤波器的电感拿掉后就等于带通滤波器就没加!直接出来455KHz!!呵呵!我想这就是理论和实际的差别吧!经过验证发现实验箱上的1496的12脚输出也直接是个455KHz!

        先总结这些吧!明天还要有新的任务!但愿明天板子焊接好后能够直接出来理想的波形于频率!!

点击此处查看原文 >>

系统分类: 自由话题   |    用户分类: 无分类    |    来源: 原创

评论(7) | 阅读(1414)
发表于:2007-7-16 1:24:17
标签:无标签

1

基于FPGA的四阶IIR数字滤波器


基于FPGA的四阶IIR数字滤波器

 

    摘要:采用FPGA实现四阶IIR数字滤波器,通过两个二阶节级联构成数字椭圆低通滤波器。通带内波纹小于0.1dB,阻带衰减大于32dB。

    关键词:四阶 IIR 椭圆滤波器 补码阵列乘法器

常用的数字滤波器有FIR数字滤波器和IIR数字滤波器。FIR数字滤波器具有精确的线性相位特性,在信号处理方面应用极为广泛,而且可以采用事先设计调试好的FIR数字滤波器IP Core来完成设计,例如Altera公司提供的针对Altera系列可编程器件的MegaCore,但是需要向Altera公司购买或申请试用版。另外,对于相同的设计指标,FIR滤波器所要求的阶数比IIR滤波器高5~10倍,成本较高,而且信号的延迟也较大。IIR滤波器所要求的阶数不仅比FIR滤波器低,而且可以利用模拟滤波器的设计成果,设计工作量相对较小,采用FPGA实现的IIR滤波器同样具有多种优越性。

IIR滤波器主要有巴特沃斯滤波器、切比雪夫滤波器和椭圆滤波器几种。给出了以上三种滤波器实现同样性能指标所需的阶数及阻带衰减的比较,如表1所示。

表1 三种滤波器的性能比较

原  型 阶  数 阻带衰减/dB
巴特沃斯 6 15
切比雪夫I型 4 25
椭圆函数 3 27

由表1可见,椭圆滤波器给出的设计阶数比前两种低,而且频率特性较好,过渡带较窄,但是椭圆滤波器在通带上的非线性相位响应最明显。本系统选用椭圆函数滤波器进行设计。

1 原理分析

数字滤波器实际上是一个采用有限精度算法实现的线性非时变离散系统,它的设计步骤为:首先根据实际需要确定其性能指标,再求得系统函数H(z),最后采用有限精度算法实现。
点击看大图
根据需要,本系统的设计指标为:模拟信号采样频率为2MHz,每周期最少采样20点,即模拟信号的通带边缘频率为fp=100kHz,阻带边缘频率fs=1MHz,通带波动Rp不大于0.1dB(通带误差不大于5%),阻带衰减As不小于32dB。换算为数字域指标为:Wp=0.1π,Ws=0.2π,Rp=0.1dB,As=32dB。系统函数H(z)的计算采用Matlab软件比较方便,其中有两个现成的函数可以使用:ellipord(wp/pi,ws/pi,Rp,As)函数用来计算数字椭圆滤波器的阶次N和3dB截止频率wn,而ellip(N,Rp,As,wn)函数可以求得直接型椭圆IIR滤波器的各个系数。通过调用以上两个函数计算得到的系统函数H(z)为:

点击看大图

这是一个四阶IIR系统,Matlab计算出该系统的频率响应如图1所示,可见满足设计要求。

如果采用直接型结构实现,需用的乘法器和延迟单元相对较多,而且分子和分母的系数相差较大,需要较多的二进制位数才能实现相应的精度要求。

如果采用二阶节级联实现,一来各基本节的零点、极点可以很方便地单独进行调整,二来可以降低对二进制数位数的要求。给出了一个直接型结构转为级联型结构的dir2cas.m文件,利用该函数求得系统函数的级联表达形式为:

H(z)=H1(z)×H2(z)=(0.11-0.1041z -1+0.11z -2)/(1-1.58z -1+0.6469z -2)×(0.2464-0.426z -1+0.2464z -2)/(1-1.7753z -1+0.892z -2)

由上式可以看出,每个二阶节的分子、分母系数差异减少了。值得注意的是,在分配二阶节的增益时,要保证每个节不会发生运算溢出,可以先用Matlab软件分析计算来合理安排各节的增益。经过计算,本文采用第一级分配0.11,第二级分配0.2464,可以保证在要求的输入范围,没有数据溢出发生。
点击看大图
2 系统实现

将第一个二阶节的系统函数表示为差分方程:

y1(n)=a0x(n)-a1x(n-1)+a2x(n)+b0y(n-1)-b1y(n-2)

=0.11x(n)-0.1041x(n-1)+0.11x(n)+1.58y(n-1)-0.6469y(n-2)

可以看出,一个二阶节的实现需要五次乘法运算、四次加法运算(采用二进制补码将减法运算变为加法运算)。两个二阶节共需要十次乘法运算。虽然现在已有上千万门的FPGA产品可供选用,但是一般应用时全部采用硬件阵列乘法器毕竟不太合适,而如果采用串行乘法器进行分时复用,其工作速度也不太理想。

本文采用一个折中的方法实现,即乘加单元(MAC)的乘法器采用阵列乘法器,而不使用串行乘法器,以提高运算速度。需要注意的是,MAX+plusⅡ的LPM库中乘法运算为无符号数的阵列乘法,所以使用时需要先将两个补码乘数转换为无符号数相乘后,再将乘积转换为补码乘积输出。每个二阶节完成一次运算共需要6个时钟周期,而且需采用各自独立的MAC实现两级流水线结构,即每个数据经过两个二阶节输出只需要6个时钟周期。

2.1 系统原理框图

系统原理框图如图2所示,模拟信号经过TLC5510转换为00H~FFH的二进制数后,送入四阶IIR低通滤波器,处理后输出10位二进制数送AD7520得到双极性的模拟电压输出。

图3 四阶IIR滤波器的顶层原理图

    2.2 顶层IIR模块

顶层IIR模块如图3所示。主要由一个时序控制模块IIRC、两个IIR二阶节模块(IIR1和IIR2)构成。IIR模块设计为10位二进制补码输入,最高位ad9为补码符号位,次高位ad8用于防止运算时的溢出。可见该IIR模块实际可以输入9位二进制补码数,但TLC5510的输出数据为8位,输入到IIR模块时,将ad9和ad8引脚均接地,即输入为正极性电压。

clr输入端为异步清零端,高电平有效。当输入时钟clk为12MHz时,IIR模块产生一个频率为2MHz的clk_ad输出时钟提供给TLC5510。输出数据dout为10位二进制补码。IIR1和IIR2模块构成级联结构。

2.3 IIR1和IIR2模块

IIR1、IIR2模块主要由两个模块构成,一个是数据移位模块,在CLK_R时钟作用下将差分方程的各x、y值延迟一个时钟;另一个模块是补码乘加单元,用VHDL语言编写,两个乘数先取补后再进行阵列乘法,在CLK_B时钟控制下完成一次乘加运算,乘积取补后输出,共需要6个时钟。

差分方程的各系数如表2所示,采用10位定点纯小数补码表示。

表2 二阶差分方程的系数

系  数 a0 a1 a2 b0 b1
IIR1 01CH 3E6H 01CH 194H 35BH
IIR2 03FH 393H 03FH 1C6H 31CH

另外?熏模块中的五个系数定义为常数,以节省硬件资源,并且采用0舍1入法进行数据处理,尽量提高数据运算精度。VHDL程序如下:

entity smultadd1 is

port (clk_regbt,clk_reg: in std_logic:

x0,x1,x2,y0,y1:in std_logic_vector(9 downto 0);

yout: out std_logic_vector(9 downto 0));

end smultadd1;

architecture behav of smultadd1 is

signal tan,tbn,tp2n:std_logic;

signal cnt: std_logic_vector(2 downto 0);

signal ta,tb,taa,tbb:std_logic_vector(8 downto 0);

signal tmpa,tmpb:std_logic_vector(9 downto 0);

signal tp:std_logic_vector(18 downto 0);

signal tpp:std_logic_vector,22 downto 0);

signal ytmp,p:std_logic_vector(23 downto 0);

constant a0:std_logic_vector(9 downto 0:=“0000011100”

(其余常数说明略)

begin

tp2n<=tan xor tbn;--求补后送阵列乘法器

taa<=not ta +‘1’ when (tan=‘1’) else ta;

tbb<=not tb +‘1’ when (tbn=‘1’) else tb;

tpp<=‘1’&‘1’&‘1’&‘1’& not tp +‘1’ when(tp2n=‘1’) else tp;

tmpa<=a0 when cnt=0 else

a1 when cnt=1 else

a2 when cnt=2 else

b0 when cnt=3 else

b1 when cnt=4 else (others=>‘0’);

tmpb<=x0 when cnt=0 else

x1 when cnt=1 else

x2 when cnt=2 else

y0 when cnt=3 else

y1 when cnt=4 else (others=>‘0’);

ta<=tmpa(8 downto 0);tb<=tmpb(8 downto 0);

tan<=tmpa(9);tbn<=tmpb(9);

tp<=taa*tbb;

p<=(others=>‘0’) when (tmpb=“0000000000”) else

tp2n & tpp;

process (clk_reg,clk_regbt)

begin

if clk_reg=‘1’ then cnt<=“000”;ytmp<=(others=>‘0’);

elsif (clk_regbt’event and clk_regbt=‘1’) then

if cnt<5 then cnt<=cnt+1;ytmp<=ytmp+p;

elsif (cnt=5) then

if ytmp(7)=‘1’ then

yout(8 downto 0)<=ytmp(16 downto 8)+1;

yout(9)<=ytmp(23);

else yout(8 downto 0)<=ytmp(16 downto 8);

yout(9)<=ytmp(23); end if;

end if;

end if;

end process;

end behav;

IIR2模块的输出数据采用将补码最高符号位直接取反转换为移码后,就可以送到DAC7520实现双极性信号输出。
点击看大图
3 系统性能测试

系统性能的测试采用单极性方波周期信号作为输入信号。信号的频率为100kHz,在采样频率为2MHz时,每个周期采样20个点,换算成数字域频率为0.1π,其二次谐波的数字频率为0.2π。输入到TLC5510的信号电压幅度为0~2V,则经过A/D转换后的输出为00H~FFH。由于低通滤波器的阻带截止频率选在200kHz,衰减32dB,由信号理论分析可知,周期方波信号没有二次谐波,所以对三次谐波的衰减经过IIR滤波器后输出有直流分量的基波(频率为100kHz)正弦信号。理论计算给出的方波周期信号基波幅度为:

2E/π=(2×255)/π=162.34

输入一个周期的数据,Matlab的计算值与MAX+plusⅡ的仿真值如表3所示。

表3 滤波后输出的数据

输入数据 255 255 255 255 255 255 255 255 255 255
计算值 28.7 -8.2 -29.4 -34.9 -25.2 -1.3 34.8 80.0 130.5 182.0
仿真值 32 1020 999 993 1002 1 36 80 129 179
输入数据 0 0 0 0 0 0 0 0 0 0
计算值 223.4 260.2 281.4 286.9 277.2 253.2 217.1 172.0 121.5 70.1
仿真值 219 255 276 282 273 250 215 171 122 72

由表3可见,仿真输出值为补码,谷点输出值993换算成符号数为993-1024=-31。Matlab软件计算的满度输出值为286.9,其基波幅度为[286.9-(-34.9)]/2=160.9,与理论值的误差为:

(160.9-162.34)/162.34=-0.87%

四阶IIR滤波器实现的满度输出值为[282-(-31)]/2=156.5,与理论值的误差为:

(156.5-162.34)/162.34=-3.6%

这是由于有限精度算法所引起的误差,可以通过增加二进制位数来提高系统的运算精度。图4给出单极性方波信号的前三个周期经过滤波后得到的含直流分量的输出波形,其中实线为Matlab的计算值,“*”为MAX+plusⅡ的仿真输出。可见,该四阶级联IIR滤波器达到了设计要求。

如果改变滤波器的输入时钟频率,则可以改变滤波器的截止频率。另外如果输入无直流分量的周期信号,而且其频率为采样频率的1/20,则该低通滤波器可以直接得到基波分量输出。其实,要将TLC5510输出的直流分量滤出很容易,只需利用FPGA做一个减法运算即可。

点击此处查看原文 >>

系统分类: CPLD/FPGA   |    用户分类: 无分类    |    来源: 无分类

评论(0) | 阅读(624)
发表于:2007-6-16 17:59:01
标签:无标签

0

基于IP网络的语音传输系统—VoIP

我是通信工程的学生,这是我前一阵子写的一篇关于VoIP的论文.现在发上来供大家参考下~rar

点击此处查看原文 >>

系统分类: 通信网络   |    用户分类: 无分类    |    来源: 原创

评论(0) | 阅读(703)
发表于:2007-6-16 17:35:56
标签:无标签

0

一款优秀的分立元件发射机电路(英文)

WBFM TX V7
by Harry Lythall

点击看大图

Introduction

Ok, so I have done a lot of playing around with the domestic FM band. This will probably be one of the last transmitters for the 88MHz to 108MHz band. This particular TX is of special interest to those wishing to build low power Power Amplifiers for the VHF bands since it used impedance matching, power amplifier and antenna filtering, all of which should be used by radio constructors, whether it be for amateur radio or any other form of radio. The features of this project are:
  • Higher output power - 150mW min (at 9v) and 300mW+ (at 12.5v)
  • Very pure output signal due to carefull design and filtering
  • VARICAP modulation - possiblity to add a synthesiser
  • Single sided Printed Circuit Board, only 40mm x 72mm
  • Covers the domestic FM band - 88MHz to 108MHz
  • Easy to build, but coil winding experience IS required
NOTE - This project is illegal to use or build in many countries. I accept no responsibility what-so-ever for any ilegal use. This circuit is provided solely as an educational project. Now I have got that off my chest, let me get on with the project.
点击看大图

The Circuit

The circuit itself is fairly conventional, with a couple of small refinements. It all begins with TR1 (BC547) in an inverted Hartley oscillator configuration. The feedback to the Base of TR1 is via a small 4.7pf capacitor to help keep the oscillations as weak as possible whilst allowing the oscillator to be a reliable starter. The frequency of the oscillator is determined by L1 and the 22pf trimmer capacitor and functions in the range of about 76MHz to 119MHz using the PCB I have made.
点击看大图
TR1 = BC547 TR2 = BC547 TR3 = 2N3866 or 2N4427
The 15pf capacitor couples the top of L1 to the varicap diode which serves to add more capacitance to the tuned circuit to alter the frequency. R1 adds the supply voltage to the varicap, with a little noise decoupling (the 0.1uf capacitor). If you are to use synthesiser control then it is important to remove R1 from the circuit, then connect the synthesiser loop filter output to the terminal marked "Ctrl". Audio is coupled to the BB105 via a 47K resistor. There is only 47pf of decoupling in order not to restrict the AF bandwidth of the complete transmitter. The AF bandwidth is flat from 3Hz to about 72KHz, but if we look beyond these limits, there is an increase of +6dB at DC. This is because the two 47K resistors divide the AF input voltage by 2, but at DC the 0.1uf capacitor has time to charge, the two 47K resistors do not therefore divide.TR2 (BC547) is both biassed and directly connected to the Emitter of TR1, which is a little unconventional in a VHF circuit. I needed to get a good input to TR2 and cut down on components. There are already far too many coils as it is in this circuit. Remember that the BC547 is an audio transistor but works well at VHF. The inductor in the Emitter of TR2 helps to extend the response a little to give a bit more signal to drive the final power amplifier transistor (TR3). TR2 gives no voltage gain; it is current we need to drive TR3. We already have enough volts from the oscillator.22pf and L3 couple TR2 output into the Base of TR3. These components match the impedances so we get the maximum power possible into TR3 Base. The signal level, however is still quite low, so some DC biasing has been added to turn TR3 ON a bit. The transistor should draw about 5mA with no signal. This is not enough to make it become linear, but it is operating around class "B". This would make a very poor frequency multiplier, so harmonics are also reduced a little by the DC bias. Note that NO emitter resistor has been used. The prototype units all worked well without one and the drive level is not enough to cause the transistor to conduct very much. The small standing DC bias of 5mA doesn磘 even "tickle" TR3. In operation the DC voltage on the Base of TR1 will be negative due to the drive level, conduction of TR3 Base/Emitter junction and the 22pf capacitor. TR3 does NOT need a heatsink.If you want to use a different transistor in place of TR3 then I suggest you remove L3 and substitute a current meter in place of L4. Apply volts to the transmitter. The current should be about 5mA. Select the value of the 47K resistor if required. Any current reading between about 2mA to 8mA "will do nicely sir" (even without your American Express card!)The collector of TR3 (2N4427) has a big (by QRP standards) choke to pass the supply DC, but presents a high impedance to RF. The RF signal is then matched to 50-Ohms with the 15p, L5 and 56p. The 1nf cap simply blocks the supply voltage that would otherwise pass to the antenna. L5 and 56pf form a low-pass filter that helps to block harmonics present in the output signal. L6 and 47pf are added to further reduce the harmonic levels. This filter is an absolute MUST for all transmitters if one does not wish to offend every other user of the radio spectrum. L5 and L6 have also been positioned on the PCB so that there is a little coupling between them. This coupling serves to cancel out any residual signals, not within the passband of the filter, that may be present at the input to L5. It is this effect that was responsible for the unexpected cleanliness of the first prototype, and a little layout experimenting has now reduced the 2nd and 3rd harmonics to -60dBc at all supply voltages. With 150mW output, this corresponds to 3rd harmonic of 150 nano-watts and a 2nd harmonic level of just 50 nano-watts.I have "played around" with the values and taken a few liberties. If you want to try adjusting the coils then then will be able to get another 2 to 3dB out of the TX. I have deliberately mis-tuned a couple of times in order that impedances and resonances will improve at the edges of the band. The result is that the performance of the transmitter does NOT vary (much) no-matter which end of the band you are operating at.
点击看大图

Coils

As you will apreciate, L1 and the tuning capacitors all affect the frequency of the complete transmitter. Winding L1 has therefore NOT been considered. This would result in a spring-like affair that would cause instability, or more precisely, "microphony". This is an effect where the coil wobbles about with very small mechanical movements. In severe cases you can even talk to the the circuit, as any owner of a Marconi TF995 signal generator will testify. By using a coil etched on the PCB you will find that microphony has been eliminated. So has coil expansion with temperature. It must be remembered, however, that this circuit is STILL based upon an LC circuit and therefore subject to changes of frequency with changes of supply voltage and "hand capacitance", etc. I will cover the supply voltage changes shortly.L2 is wound on small ferrite beads. L2 is placed in series with the emitter of the buffer transistor, TR2. In the interests of stability it is very important that this coil does NOT radiate like a loop antenna. It is composed of 4 turns of 0.15mm Dia. enamelled wire (magnet wire in the US). The grade of ferrite is unimportant, as long as it is a grey one. One complete turn is formed when the wire passes through the hole in the middle once. The ferrite is mounted vertically in the same manner as a resistor. The ferrite is 3mm outside diameter and the assembled coil looks like this:
L3 is wound using 3 turns of 0.8mm Dia enamelled copper wire with a 6mm inside diameter. Wind it on a drill bit to get the inside diameter correct. The coil is close-wound, that is to say that the turns are just about touching and shall not be spaced. Form the ends of the coil, bending them out then down so that the leads are 5mm apart. The coil should look like this:
L4 comprises 6 turns of 0.15mm Dia. enamelled wire (magnet wire in the US) wound on TWO ferrite beads, the same beads that were used for L2. The beads are placed side-by-side as a pair of biniculars. One complete turn is when the wire is threaded once though both beads.
L5 is 5 turns of 0.8mm Dia. enamelled copper wire with a 6mm inside diameter. Just as L3, wind it on a drill bit to get the inside diameter correct. The coil is also close-wound. Form the ends of the coil, bending them out then down so that the leads are 5mm apart.L6 is 3 turns of 0.8mm Dia. enamelled copper wire with a 6mm inside diameter. Just as L3 and L5 the coil is also close-wound. Form the ends of the coil, bending them out then down so that the leads are 5mm apart. You can get a closer view of L5 and L6 in this picture. The position of the capacitor between them is very important, equal distance from both coils keeps the 2nd harmonic at the lowest level.NOTE - L5 and L6 MUST be wound in the same direction. If you try to wind one of them backwards or in the other direction then the spurious outputs will increase.
点击看大图

Construction

The transmitter is constructed on a single-sided printed circuit board. I will place the PCB foil pattern on my DOWNLOAD section of the homepages. The board is only 40mm x 72mm. If you use any other construction method then you will need to change a few component values. If you use veroboard, prototype board then the project will probably not work. The board has been designed to compensate for the lack of a second copper ground land and has also "thermal breaks" around some of the component connections. This makes it easier to solder for new beginners (for me too, but I should not admit that!).There are two wire links on the board, fit these first. I try to make my links and components as neat as possible with as short leads as possible. Look at the photograph of the finished transmitter to see how they lay. Form the leads and use a bit of masking tape to hold them in position when soldering. The link wires are made using off-cuts from the resistors.
You will note that the 15pf capacitor coupling L1 to the BB105 varicap diode is laying on the board. It磗 legs are so formed that it acts as a link. Assembly order is not particularly important, but it is easier if all horisontal components are mounted first, then the passive components (resistors/caps), transistors and the coils last. Neatness and attention to detail is particularly important. The vertically mounted resistors should all be mounted as shown on the component overlay. It DOES matter which way round they are. This is one of the prices for using a cheap single-sided board.
点击看大图

Testing

When all the components have been fitted, check your work thoroughly. I reccomend you shine a strong lamp behind the board component side and compare the tracks with the PCB foil pattern. This will allow you to check for solder bridges between tracks. Assuming all is well, connect a 50-Ohm resistor to the antenna (ANT) terminals. Two 100-Ohms in parallel will be fine. Now connect the board to a 9v supply in series with a 12v 3W torch lamp. If the lamp glows brightly then switch OFF and check your wiring because you have a fault. If there is no fault then the lamp should only glow dimly, if it glows at all. The complete transmitter should draw less than 100mA.If all is well, switch ON an FM radio set tuned to somewhere around 108MHz. Adjust the tuning capacitor on the board so the plates are at around minimum capacitance and you will hear the transmitter on the radio. With the capacitor plates near maximum capacitance you should be able to tune the transmitter to 88MHz.Now couple the AF IN terminals of the transmitter to the LINE OUT of a stereo ststem, your computer, or even the headphone terminals of your Sony Walkman. I prefer to use headphine terminals since the volume control will give you some control over the modulation depth. You can set the modulation depth by comparing it with another radio channel. Set your transmitter A LITTLE LOWER IN VOLUME than other channels, unless you have access to a modulation meter. Note that you may have to use a capacitor in series with the AF input wire. See the application data further down.If your transmitter is working then you can remove the test lamp and connect the battery supply directly to the transmitter. Check that nothing is burning. TR3 should get a little warm, but comfortable to the touch. All other components should remain stone cold. TR3 may get a little warmer if you increase the supply voltage to 13.8v but in this case the transmitter will be delivering almost half a watt of output power.
点击看大图

Performance

I think that here I should give a little information about the actual measured values of the prototype. The target was to achiece a clean 100mW of output power at 9v. I also indended the transmitter to be equally stable at 13.8v DC since this is what most constructors seem to want. The target was exceeded on all counts. There are no spurious outputs visible from 500MHz upwards, so this spectrum analyser view is only from DC to 500MHz. It shows that there is a little 2nd and 3rd harmonic outputs, but the levels are so low that they are quite negligible. I could hardly believe my eyes when I built the first prototype, but after cleaning up the PCB the output was even better! The vertical scale is 10dB per division and the horisontal scale is 50MHz per division:
As you can see, the worst case is the 3rd harmonic at -60dBc. The carrier level was +23dBm (200mW) at 10v supply. This falls off a little to about 160mW at the ends of the bands. Brief specifications are given below. I have not been all that meticulous with the figures. When I got a reading of 73mA I rounded it up to 75mA to keep the figures simple. The figures are only a guide anyway.
Freq range76 - 116MHz77 - 119MHz78 - 121MHzSupply Current (98MHz)75mA85mA95mAOutput power (88MHz)160mW310mW370mWOutput power (98MHz)180mW360mW420mWOutput power (108MHz)165mW320mW380mWSpurious Outputs (DC - 1GHz)-60dBc-60dBc-60dBcRMS AF for +/-75KHz deviation210mV200mV195mVAF response +0/-3dB3Hz - 70KHz3Hz - 70KHz3Hz - 70KHz
Parameter Supply=9v Supply=12.5v Supply=13.8v
点击看大图

Alignment

Adjust the variable capacitor to get the transmitter on the frequency you want. Is that simple enough?
点击看大图

Applications

There are several different applications since the unit will modulate from DC to several thousand kilohetrz, the most obvious being music. It may be, however, that you wish to change the frequency (to somewhere legal?) and use FSK data for moving information between computers. Perhaps you even want to convey DC changes or just stabilise the TX frequency. Let us now cover these items, beginning with a recap of the circuit diagram:
点击看大图

Frequency Control

(Not to be used with synthesiser)As you can see from the original circuit, the varicap voltage is kept high by R1. Without this resistor the DC voltage on the diode will be zero, causing the oscillator to stop. R1 shall be removed if using external synthesiser control. We can, however, use the CTRL terminal to have a preset "frequency" potentiometer on the outside of the box. All we need is a 500K Linear potentiometer. Nothing else! no capacitors, nothing. This will give typically 10MHz tuning range

Frequency Stabiliser

(Not to be used with synthesiser)Given that R1 is connected directly to the battery supply voltage, if the battery voltage were to vary then so would the TX frequency. You should really be using a stabilised power supply, or a high-current battery that has a fairly constant supply voltage. If this is NOT the case then you can use the CTRL terminal to bypass R1, without making any modifications to the TX. All we need is an external zener diode and a 6K8 resistor. The Zener diode should be as high as possible. If you have a 12.5v supply, for example, then a 10v diode would be great. With a 9v battery then a 6v8 diode is about the maximum practical. 8v2 would be Ok until the battery voltage went down a bit. We will asume that +VE is a 9v battery.

Frequency Modulation

If you are using DC modulation then the AF input will allow this. This can be used to give low frequency Frequency Shift Keying. This should only be done in conjunction with the voltage regulator above. If you are NOT wanting to have a DC shift, and your input source has a "DC Continuity" (resistance) then there is problem. If you were to connect a magnetic microphone or CD player, for example, to the AF input then the TX frequency would jump. You therefore need to add a capacitor to block the DC shift at the input. 10uF will do nicely. A 4K7 resistor should also be added to give a load to the audio source and to help prevent "hum" or "pickup" from 50Hz (60Hz) wiring. The value of the resistor should be selected to match the audio source impedance of the device. 4K7 is normal for computer and CD LINE-OUT signals.

Frequency Modulation Pre-emphasis

If you wished to use audio directly from a PC or CD-Player, then you should add some form of pre-emphasis. If you are using a stereo encoder or FSK applications then you should NOT use pre-emphasis. Pre-emphasis increases treble a little so that when it is received and turned down again, added noise is also turned down. Select Cx(nf) to be 10x the number of Microseconds of pre-emphasis you want. If you wanted 50uS pre-emphasis then Cx = 50 x 10 nf = 500nf.
点击看大图

Possibilities

The resistor R1 may be removed from the circuit and the loop voltage from a synthesiser added to "Ctrl" on the circuit board. This will give the synthesiser a 10MHz tuning range, the preset capacitor determining the centre frequency. The loop frequency control voltage can be increased to about 20v but it should be maintained somewhere around 9v to get repeatable modulation characteristics.The coil of the tuned circuit can be reduced and TR1/TR2 replaced for more suitable RF devices, then the TX can be increased to the 144MHz band and modulated with NBFM. In this situation one MUST use synthesiser control to stabilise the frequency.The transmitter is clean enough to drive larger power amplifiers to get much higher powers. I will be working on both 5-Watts and 25-Watts amplifiers at some time in the future, but exactly when is another question. The more e-mail I get then the longer it will take. My work will be primarily for the 144-146MHz amateur radio band.
点击看大图

Conclusion

I hope that you learn a lot from this project. It demonstrates Varicap diode tuning, decoupling and control. It also shows how to amplify low level signals from the 10mW level to the 150mW level and how DC bias can be applied to make compensations for low signal levels. Have fun with the project. If you have any questions then please do NOT e-mail me. I have a message board where you may post questions to many, some of whom have far more experience than I.Finally, is there any interest in my producing a kit for this project? I would include the input cap, pre-emphasis and Zener on the kit PCB, but there would be details showing how to bypass this for those who wish to do more than just send music. Please let me know at mailto:harryvpo@hotmail.com?subject=v7_kit keeping your mail short as possible, thanks.Very best regards from Harry - SM0VPO, Lunda, Sweden.

点击此处查看原文 >>

系统分类: 通信网络   |    用户分类: 无分类    |    来源: 转贴

评论(1) | 阅读(780)