最新日志

发表于:2008-5-28 14:43:22
标签:无标签

0

贴片电容,SMD贴片电容,无铅贴片电容的如何命名?

SMT: Surface Mounting Technology表面贴装技术

SMT包括表面贴装技术.表面贴装设备,表面元器件.及SMT管理

摘自南山半导体有限公司网站

贴片电容的命名,国内和国外的产家有一此区别但所包含的参数是一样的。

贴片电容的命名所包含的参数:

1、 贴片电容的尺寸(0201、0402、0603、0805、1206、1210、1808、1812、2220、2225)

2、 贴片电容的材质(COG、X7R、Y5V、Z5U、RH、SH)

3、 要求达到的精度(±0.1PF、±0.25PF、±0.5PF、5%、10%、20%)

4、 电压 (4V 、6.3V、10V、16V、25V、 50V、 100V、 250V、500V、1000V、2000V、3000V)

5、 容量 (0PF-47UF)

6、 端头的要求 (N表示三层电极)

7、 包装的要求 (T表示编带包装,P表示散包装)

例风华系列的贴片电容的命名:

0805CG102J500NT

0805:是指该贴片电容的尺寸大小,这是用英寸来表示的08表示长度是0.08英寸(换算成mm=0.08*24.50=1.96mm)、05表示宽度为0.05英寸(换算成mm=0.05*24.50=1.225ccm)

CG : 是表示生产电容要求用的材质,

102 : 是指电容容量,前面两位是有效数字、后面的2表示有多少个零102=10×102也就是=1000PF

J : 是要求电容的容量值达到的误差精度为5%,介质材料和误差精度是配对的

500 : 是要求电容承受的耐压为50V 同样500前面两位是有效数字,后面是指有多少个零。

N : 是指端头材料,现在一般的端头都是指三层电极(银/铜层)、镍、锡

T :是指包装方式,T表示编带包装,B表示塑料盒散包装

 

但封装尺寸与功率有关 通常来说

0201 1/20W

0402 1/16W

0603 1/10W

0805 1/8W

1206 1/4W

1210 1/3W

1812 1/2W

2010 3/4W

2512 1W

电容电阻外形尺寸与封装的对应关系是:

0402=1.0x0.5

0603=1.6x0.8

0805=2.0x1.2

1206=3.2x1.6

1210=3.2x2.5

1812=4.5x3.2

2010=5.0x2.5

2225=5.6x6.5

2512=6.5x3.2

点击此处查看原文 >>

系统分类: 电子制造   |    用户分类: 无分类    |    来源: 整理

评论(1) | 阅读(172)
发表于:2008-5-28 14:30:54
标签:无标签

0

电容精度与常用值

以下排列顺序为:

电容类别   

允许误差

容量范围

标 称 容 量 系 列

(容量单位uF)

1.纸介电容、金属化纸介电容、纸膜复合介质电容、低频(有极性)有机薄膜介质电容

±5%
±10%
±20%

100pF~1uF

1.0 1.5 2.2 3.3 4.7 6.8

1uF~100uF

1 2 4 6 8 10 15 20 30
50 60 80 100

2.高频(无极性)有机薄膜介质电容、瓷介电容、玻璃釉电容、云母电容

±5%

1.1 1.2 1.3 1.5 1.6 1.8 2.0
2.4 2.7 3.0 3.3 3.6 3.9 4.3
4.7 5.1 5.6 6.2 6.8 7.5 8.2 9.1

±10%

  

1.0 1.2 1.5 1.8 2.2 2.7
3.3 3.9 4.7 5.6 6.8 8.2

±20%

  

1.0 1.5 2.2 3.3 4.7 6.8

3.铝、钽、铌、钛电解电容

±10%
±20%
+50/-20%
+100/-10%

  

1.0 1.5 2.2 3.3 4.7 6.8


 

 

 

 

 

电容器标称电容值
E24---E12---E6----E24---E12---E6
1.0----1.0----1.0----3.3----3.3----3.3
1.1------------------3.6--------------
1.2----1.2-----------3.9----3.9-------
1.3------------------4.3--------------
1.5----1.5----1.5----4.7----4.7----4.7
1.6------------------5.1--------------
1.8----1.8-----------5.6----5.6-------
2.0------------------6.2--------------
2.2----2.2----2.2----6.8----6.8----6.8
2.4------------------7.5--------------
2.7----2.7-----------8.2----8.2-------
3.0------------------9.1--------------

注:用表中数值再乘以10n来表示电容器标称电容量,n为正或负整数.
主要参数的意义:标称容量以及允许偏差:目前我国采用的固定式标称容量系列是:E24,E12,E6系列.他们分别使用的允许
偏差是+-5% +-10% +-20%.

点击此处查看原文 >>

系统分类: 电子制造   |    用户分类: 无分类    |    来源: 无分类

评论(0) | 阅读(153)
发表于:2008-5-28 11:10:50
标签:无标签

0

电阻精度与常用阻值

国家标准规定了电阻的阻值按其精度分为两大系列,分别为E-24系列和E-96系列,E-24系列精度为5%,E-96系列为1%, 在这两种系列之外的电阻为非标电阻,较难采购。下面列出了常用的5%和1%精度电阻的标称值,供设计时参考。

  精度为5%的碳膜电阻,以欧姆为单位的标称值:

1.0    5.6    33     160     820      3.9K     20K     100K     510K     2.7M
1.1    6.2    36     180     910      4.3K     22K     110K     560K     3M
1.2    6.8    39     200     1K       4.7K     24K     120K     620K     3.3M
1.3    7.5    43     220     1.1K     5.1K     27K     130K     680K     3.6M
1.5    8.2    47     240     1.2K     5.6K     30K     150K     750K     3.9M
1.6    9.1    51     270     1.3K     6.2K     33K     160K     820K     4.3M
1.8    10     56     300     1.5K     6.6K     36K     180K     910K     4.7M
2.0    11     62     330     1.6K     7.5K     39K     200K     1M       5.1M
2.2    12     68     360     1.8K     8.2K     43K     220K     1.1M     5.6M
2.4    13     75     390     2K       9.1K     47K     240K     1.2M     6.2M
2.7    15     82     430     2.2K     10K      51K     270K     1.3M     6.8M
3.0    16     91     470     2.4K     11K      56K     300K     1.5M     7.5M
3.3    18     100    510     2.7K     12K      62K     330K     1.6M     8.2M
3.6    20     110    560     3K       13K      68K     360K     1.8M     9.1M
3.9    22     120    620     3.2K     15K      75K     390K     2M       10M
4.3    24     130    680     3.3K     16K      82K     430K     2.2M     15M
4.7    27     150    750     3.6K     18K      91K     470K     2.4M     22M
5.1    30  
  
  精度为1%的金属膜电阻,以欧姆为单位的标称值:

10      33      100    332    1K       3.32K    10.5K    34K      107K    357K
10.2    33.2    102    340    1.02K    3.4K     10.7K    34.8K    110K    360K
10.5    34      105    348    1.05K    3.48K    11K      35.7K    113K    365K
10.7    34.8    107    350    1.07K    3.57K    11.3K    36K      115K    374K
11      35.7    110    357    1.1K     3.6K     11.5K    36.5K    118K    383K
11.3    36      113    360    1.13K    3.65K    11.8K    37.4K    120K    390K
11.5    36.5    115    365    1.15K    3.74K    12K      38.3K    121K    392K
11.8    37.4    118    374    1.18K    3.83K    12.1K    39K      124K    402K
12      38.3    120    383    1.2K     3.9K     12.4K    39.2K    127K    412K
12.1    39      121    390    1.21K    3.92K    12.7K    40.2K    130K    422K
12.4    39.2    124    392    1.24K    4.02K    13K      41.2K    133K    430K
12.7    40.2    127    402    1.27K    4.12K    13.3K    42.2K    137K    432K
13      41.2    130    412    1.3K     4.22K    13.7K    43K      140K    442K
13.3    42.2    133    422    1.33K    4.32K    14K      43.2K    143K    453K
13.7    43      137    430    1.37K    4.42K    14.3K    44.2K    147K    464K
14      43.2    140    432    1.4K     4.53K    14.7K    45.3K    150K    470K
14.3    44.2    143    442    1.43K    4.64K    15K      46.4K    154K    475K
14.7    45.3    147    453    1.47K    4.7K     15.4K    47K      158K    487K
15      46.4    150    464    1.5K     4.75K    15.8K    47.5K    160K    499K
15.4    47      154    470    1.54K    4.87K    16K      48.7K    162K    511K
15.8    47.5    158    475    1.58K    4.99K    16.2K    49.9K    165K    523K
16      48.7    160    487    1.6K     5.1K     16.5K    51K      169K    536K
16.2    49.9    162    499    1.62K    5.11K    16.9K    51.1K    174K    549K
16.5    51      165    510    1.65K    5.23K    17.4K    52.3K    178K    560K
16.9    51.1    169    511    1.69K    5.36K    17.8K    53.6K    180K    562K
17.4    52.3    174    523    1.74K    5.49K    18K      54.9K    182K    576K
17.8    53.6    178    536    1.78K    5.6K     18.2K    56K      187K    590K
18      54.9    180    549    1.8K     5.62K    18.7K    56.2K    191K    604K
18.2    56      182    560    1.82K    5.76K    19.1K    57.6K    196K    619K
18.7    56.2    187    562    1.87K    5.9K     19.6K    59K      200K    620K
19.1    57.6    191    565    1.91K    6.04K    20K      60.4K    205K    634K
19.6    59      196    578    1.96K    6.19K    20.5K    61.9K    210K    649K
20      60.4    200    590    2K       6.2K     21K      62K      215K    665K
20.5    61.9    205    604    2.05K    6.34K    21.5K    63.4K    220K    680K
21      62      210    619    2.1K     6.49K    22K      64.9K    221K    681K
21.5    63.4    215    620    2.15K    6.65K    22.1K    66.5K    226K    698K
22      64.9    220    634    2.2K     6.8K     22.6K    68K      232K    715K
22.1    66.5    221    649    2.21K    6.81K    23.2K    68.1K    237K    732K
22.6    68      226    665    2.26K    6.98K    23.7K    69.8K    240K    750K
23.2    68.1    232    680    2.32K    7.15K    24K      71.5K    243K    768K
23.7    69.8    237    681    2.37     7.32K    24.3K    73.2K    249K    787K
24      71.5    240    698    2.4K     7.5K     24.9K    75K      255K    806K
24.3    73.2    243    715    2.43K    7.68K    25.5K    76.8K    261K    820K
24.7    75      249    732    2.49K    7.87K    26.1K    78.7K    267K    825K
24.9    75.5    255    750    2.55K    8.06K    26.7K    80.6K    270K    845K
25.5    76.8    261    768    2.61K    8.2K     27K      82K      274K    866K
26.1    78.7    267    787    2.67K    8.25K    27.4K    82.5K    280K    887K
26.7    80.6    270    806    2.7K     8.45K    28K      84.5K    287K    909K
27      82      274    820    2.74K    8.66K    28.7K    86.6K    294K    910K
27.4    82.5    280    825    2.8K     8.8K     29.4K    88.7K    300K    931K
28      84.5    287    845    2.87K    8.87K    30K      90.9K    301K    953K
28.7    86.6    294    866    2.94K    9.09K    30.1K    91K      309K    976K
29.4    88.7    300    887    3.0K     9.1K     30.9K    93.1K    316K    1.0M
30      90.9    301    909    3.01K    9.31K    31.6K    95.3K    324K    1.5M
30.1    91      309    910    3.09K    9.53K    32.4K    97.6K    330K    2.2M
30.9    93.1    316    931    3.16K    9.76K    33K      100K     332K    
31.6    95.3    324    953    3.24K    10K      33.2K    102K     340K    
32.4    97.6    330    976    3.3K     10.2K    33.6K    105K     348K 

点击此处查看原文 >>

系统分类: 电子制造   |    用户分类: 无分类    |    来源: 整理

评论(0) | 阅读(122)
发表于:2008-5-19 16:41:11
标签:无标签

0

电容是电压稳压器设计的关键部分(English)

Some 99 percent of the "design" problems associated with linear and switching regulators can be traced directly to the improper use of capacitors: wrong type, wrong value, or incorrect physical placement. Regulator designs sometimes diagnosed as "unstable" are often simply victims of bad layout or inadequate bypassing. Excessive EMI is frequently caused by poor bypassing and failing to snub high-frequency noise generators at the source. This article will cover some of the most common mistakes made and provide solutions.

Switching regulators

The switching regulator is inherently vulnerable to poor capacitor design methodology for the simple reason that all switching regulators draw high peak currents when they switch on. The fundamental question is: Where will that current come from? The answer is a capacitor, and that capacitor had better be a very good one with a minimum amount of inductance between itself and the switch or all kinds of problems will result.

Local bypassing

The basic buck regulator circuit in Figure 1 will be used to illustrate the single most common design mistake made in switching converters: inadequate input support capacitance (sometimes called "local bypassing" because the input capacitor CIN keeps the switch currents confined to a local area on the board). If the input support capacitor is either too small, too far away, or simply not good enough in high frequency performance to provide the switch peak current, there will be serious problems.

When the main switch Q1 turns ON, current must flow along the path shown by the arrows. For the regulator to operate efficiently, there must be a minimum of switching losses which requires a very fast rise time for the current. This current can only be provided by CIN, and that requires that it be a very good high-frequency capacitor with low impedance. Because a fairly large amount of capacitance would be required, this cap would likely be a Tantalum or Aluminum electrolytic designed for HF switching. Of course, the best capacitor in the world is useless if the trace inductance between it and the switch FET is large enough to cause limitations of the rise time of the current. For this reason, all of the power components in a switching converter must be kept physically close and trace inductance kept to a minimum.

 


RF noise bypassing

When a switch is used to chop a voltage provided by a DC source, a significant amount of noise will be put onto that DC line by the switching converter. To minimize the noise conducted back to the rest of the circuitry through this line, good bypass caps are essential. In Figure 1, it was shown that CIN was used to supply the high peak currents to the FET switch.

The Tantalums and aluminum electrolytics typically used for CIN become fairly reactive at higher frequencies (above a few MHz) because of relatively high ESR (equivalent series resistance) and ESL (equivalent series inductance), and are therefore poor RF bypass capacitors. As shown in Figure 1, CIN must be paralleled by a good ceramic capacitor CBYP for RF bypassing to reduce the amount of hash that will be conducted back on the DC source line to other circuitry. Amount and type of capacitor(s) used on the input line of the switching converter is basically application dependent. In some higher current converters, the amount of RF noise on the VIN line at the switching converter input is so high that simply bypassing to ground does not provide enough noise reduction. Then it becomes necessary to add an L-C filter as shown in Figure 2 to prevent this RF from causing problems in other circuitry powered from the same source. It is not always necessary to add a physical inductor to achieve noise reduction, sometimes trace inductance can be used effectively to reduce high frequency noise in conjunction with good ceramic bypass caps placed near the VIN pins of the devices which require clean power.

 


Snubbers

Without question, the best way to handle the problem of RF EMI is to minimize or reduce it at the source. In switching converters, the source of the nastiest EMI is usually the power switch (FET) and the worst EMI is usually when it turns OFF. To understand why, simply refer to figure 1: when QI is ON, current flows through the inductor. When Q1 is turned OFF, the voltage on the FET end of the inductor is forced to swing negative until the diode turns ON to hold the current through the inductor constant. A silicon ultra-fast diode can not turn ON in zero time, so the voltage can shoot negative beyond a diode drop and then ring as the diode turns ON.

Even if a Scottky diode is used, parasitic trace inductance will still cause some ringing to occur. This ringing is usually in the 20 MHz to 100 MHz range and generally seems to appear on every circuit node in the lab within ten feet of the board under test. It is “seen” everywhere because the EMI induces a signal directly into the scope probe''s ground lead. A good way to reduce this EMI is to add an R-C snubber as shown in Figure 3 (typically a ceramic capacitor and carbon film resistor). It works because when the FET stops sourcing current, the capacitor will source enough current so that the di/dt rate of current fall through the inductor is not as fast. The R-C also damps out the ringing if the component values are appropriately selected. Snubbers have the disadvantage that they reduce overall efficiency by a few percentage points. The loss of efficiency shows up most at light loads because the power they burn is basically constant and relatively independent of output load current, which means the percent of total converter input power consumed by the snubber increases at lighter loads.

 


Ripple current

The single most commonly made mistake in component selection for capacitors in switching regulators may be in the ripple current specification. Ripple current is the RMS value of the current flowing into and out of the capacitor each time the switch turns ON and OFF. Referring to Figure 1, there is a ripple current flowing in both CIN and COUT. Current flows into and out of CIN as the FET turns on and off, and current flows into and out of COUT as the inductor current charges it and then the capacitor discharges into the load. What must be understood is that the ripple current flows through the ESR (equivalent series resistance) of the capacitor and dissipates power as given by the well known term for power which is:

P = I(squared) * ESR.

Ripple current derivations are not trivial in many switching converters and some designers have been known to solder a 10 milli-Ohm resistor on the ground side of the capacitor in question and snap a scope photo to see what the ripple current actually looks like. Then, a graphical estimate of the RMS value gives a good approximation. The only definitive test of the capacitor selected is to check the temperature rise when operated at full output load current. What is most important to realize is that if you replace a good, high-frequency low-ESR switching cap with a generic aluminum electrolytic it will likely overheat and fail due to the increased power dissipation caused by the ripple current.

Linear regulators

A dangerous precedent was established by the first linear regulator semiconductors sold commercially like the LM7805 type devices: they require no input or output capacitor and are completely stable under virtually any operating conditions. Some of the newer LDO regulators require careful attention to external capacitors to operate in a stable mode. The main reason the 7805 is unconditionally stable is because the power pass transistor was made up of an NPN Darlington as shown in Figure 4. They are usually referred to as “NPN regulators” for this reason, and are comprised of an error amplifier, voltage reference, and NPN Darlington power transistor.

点击看大图

The NPN regulator drives the load off of the emitter of an NPN transistor in a configuration sometimes called “emitter follower” because the voltage gain from base to emitter is nearly unity, but the current gain is very high. The critical characteristic of the emitter follower is that it is very wide-band and does not introduce low-frequency poles into the loop gain. This makes compensation very easy: “dominant pole” compensation is used by putting a pole into the loop created by the capacitor around the error amplifier. The result is a very low frequency pole (typically around 10 - 100 Hz) causing a 20 dB/decade roll-off out to the unity gain crossover frequency which is typically between about 100kHz and 1 MHz. This shows why no external compensation is required for stability in an NPN regulator.

LDO regulators

NPN regulators are a great product, but as the voltages used in circuits have dropped lower, they have become less attractive because of one reason: dropout voltage. This is defined as the minimum voltage (input-to-output) which must be maintained for the regulator to hold the output in regulation. The standard NPN regulator requires about 2 - 2.5V minimum because of the 2 VBE''s + 1 SAT required to operate the NPN Darlington power transistor and PNP driver. The power dissipation caused by the voltage drop across the regulator becomes more and more significant as the regulated output voltage drops. This led directly to the development of the LDO (low dropout) regulator which can operate with as little as a few hundred millivolts across it (see Figure 5).

 点击看大图

 

The LDO regulator (sometimes called a “PNP” regulator) differs from the NPN regulator because the power transistor is a single PNP: the good news is that dropout voltage can be as low as the saturation voltage of the PNP (a few hundred millivolts). However, the single PNP has lower beta compared to the NPN Darlington, so the ground pin current of the LDO regulator is approximately equal to the load current divided by the beta of the PNP. To reduce this current, very good PNP devices have to be fabricated on the IC which have high current gain. The VIP devices used on our LP298X line have typical betas > 100 so the ground pin current is kept very low.

The major difference between the LDO and the NPN regulator is that the LDO must be compensated differently from an NPN regulator. The LDO requires an output capacitor, and the ESR (equivalent series resistance) of that capacitor is integral to stability. The reason for this is because the PNP drives the output off the collector (in a configuration called common-emitter) and has a fairly high output impedance. Because of this, the loop gain has a pole in it (I will refer to as the Load Pole) formed by the output capacitor and the load resistance. The load pole frequency is closely approximated by:

fLP = 1 / (2 * pi * RL * COUT).

The presence of a second low-frequency pole poses a problem: two poles can result in 180 degree phase shift which will cause oscillations. The solution is to introduce some positive phase lead to cancel out some of the shift from the two poles. This is accomplished using the ESR of the output capacitor. A zero is created by the ESR whose frequency is given by:

fz = 1 / (2 * pi * ESR * COUT)

If the ESR is in the correct range, stable operation will result because it will provide enough phase lead to get sufficient phase margin at the unity gain frequency. If the ESR is too low, the zero doesn''t kick in until well past the unity-gain frequency so it does no good. If the ESR is too high, the zero comes in at too low of a frequency and the loop bandwidth will get too wide (and that allows other high-frequency poles to add phase shift and cause oscillations). So, it has to be in the right range. The way we determine the range is to bench test the regulator using a capacitor which has pretty close to zero ESR (surface mount ceramic) and add series resistance values and plot ESR stability curves (Figure 6).

 

 

本文来自:我爱研发网(52RD.com) 详细出处:http://www.52rd.com/S_TXT/2005_9/TXT1901.htm

点击此处查看原文 >>

系统分类: 电源技术   |    用户分类: 无分类    |    来源: 转贴

评论(0) | 阅读(58)
发表于:2008-5-14 15:09:02
标签:无标签

0

仪表运放 RF INTERFERENCE

RF rectification is often a problem when amplifiers are used in
applications having strong RF signals. The disturbance can appear
as a small dc offset voltage. High frequency signals can be
filtered with a low-pass RC network placed at the input of the
instrumentation amplifier, as shown in Figure 47. The filter
limits the input signal bandwidth, according to the following
relationship:

点击此处查看原文 >>

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

评论(0) | 阅读(89)
发表于:2008-5-14 15:05:18
标签:无标签

0

仪表运放输入偏置电流回路

Input Bias Current Return Path
The input bias current of the AD8228 must have a return path
to common. When the source, such as a thermocouple, cannot
provide a return current path, one should be created, as shown
in Figure 46.

 

点击此处查看原文 >>

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

评论(0) | 阅读(94)
发表于:2008-5-9 17:11:42
标签:无标签

0

关于MaxII 在多电压系统中的应用

(1)当Vccio=3.3V时,MAX II能够驱动5V TTL电路,因为它在3.3V I/O供电时,输出高电平是2.4V,符合5V TTL器件的电平要求。

(2)当MAX II器件的输出接口直接驱动5V COMS器件时,将不能正确驱动。如果MAX II的Vout大于Vccio时,PMOS上拉晶体管将导通,防止外部上拉电阻将信号拉高到5V。为了使MAX II能够兼容5V CMOS电平,应使能PCI钳位二极管,同时配置输出引脚为开漏,并且使用外部上拉电阻。如下图所示

点击看大图

注:由于内内部的PCI钳位二极管只有在MAX II器件上电后才能起作用,故当MAXII被5V电平驱动时,在上电前在外部需要一个二极管。

引脚设置成开漏后将不能输出高电平,只有低电平和高阻状态。当开漏引脚使能,输出低电平,当开漏禁止,输出为高阻状态,由外部电阻拉高到5V。使能PCI钳位二极管的目的是为了保护MAXII 的I/O引脚。当Vccio为3.3V时,钳位二极管使A点钳位在4V,这是MAXII所允许的可靠的极限。

只在EPM1270和EPM2210的I/O Bank 3中有PCI钳位二极管,对EPM1270和EPM2210的其他Bank和EPM240 and EPM570的Bank,需要外部二极管。

上拉电阻应尽量小,以满足信号的上升时间要求,但又要足够大,以确保符合MAXII的IoL(输入电流)要求。电流要求见下表

点击看大图

Quartus使用最大的电流驱动设置。PCI I/O始终设置为20mA不能更改。

当外部串联电阻并且使用内部PCI钳位二极管(只有EPM1270和EPM2210具备)时MAX II具有5V的电压容限。

由于时间关系,具体参考Chapter 8. Using MAX II Devices in Multi-Voltage Systems

注意:因为5V驱动时用到了PCI钳位二极管,而钳位二极管只有在MAX II上电后才有效,故当与5V器件相连时应使MAX II先上电!!!

pdf

点击此处查看原文 >>

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

评论(0) | 阅读(190)
发表于:2008-4-18 21:50:48
标签:无标签

0

基于FPGA的分布式算法FIR滤波器设计

转自:http://user.qzone.qq.com/410505504

基于FPGA的分布式算法FIR滤波器设计

发表于:2007年12月16日 20时5分28秒阅读(8)1)特效:[图]本文链接:http://user.qzone.qq.com/410505504/blog/1197806728
基于FPGA的分布式算法FIR滤波器设计 2007.10.29   来自:电子测量技术    作者:赵岚 毕卫红等 0 引 言

FIR(finite impulse response)滤波器是数字信号处理系统中最基本的元件,它可以在保证任意幅频特性的同时具有严格的线性相频特性,同时其单位冲激响应是有限的,没有输入到输出的反馈,是稳定的系统。因此,FIR滤波器在通信、图像处理、模式识别等领域都有着广泛的应用。
目前FIR滤波器的硬件实现有以下几种方式:
一种是使用单片通用数字滤波器集成电路,这种电路使用简单,但是由于字长和阶数的规格较少,不易完全满足实际需要。虽然可采用多片扩展来满足要求,但会增加体积和功耗,因而在实际应用中受到限制。
另一种是使用DSP芯片。DSP芯片有专用的数字信号处理函数可调用,实现FIR滤波器相对简单,但是由于程序顺序执行,速度受到限制。而且,就是同一公司的不同系统的DSP芯片,其编程指令也会有所不同,开发周期较长。
还有一种是使用可编程逻辑器件,FPGA/CPLD。FPGA有着规整的内部逻辑块整列和丰富的连线资源,特别适合用于细粒度和高并行度结构的FIR滤波器的实现,相对于串行运算主导的通用DSP芯片来说,并行性和可扩展性都更好。
FIR滤波器的主要组成模块是乘累加单元(MAC),如果按照直观结构构造乘法器和系数寄存器来实现会占用大量的逻辑资源,显然不可取。本文采用基于分布式算法思想的方法来设计FIR滤波器,并在FPGA上实现。
1 分布式算法原理
分布式算法(distributed arithmetic,DA)最初是在1973年由Croisier提出的,但直到Xilinx发明FPGA的查找表以后,DA算法才在上世纪90年代初重新受到重视,并有效地应用在FIR滤波器的设计中。DA算法的原理如下。
一线性时不变网络的输出为:


假设c(n)为已知常系数,x(n)是变量,用(B+1)位2进制补码表示为:


函数f(c(n),xb(n))的实现方法是利用一个LUT(查找表)实现影射f(c(n),xb(n)),也就是说2N字宽、预先设定程序的LUT接收一个N位输入向量xb=[xb[0],xb[1]…xb[N-1]],输出为f(c(n),xb(n)),个个影射,f(c(n),xb(n))都由相应的二次幂加权并累加。对于固定系数,整数乘以2b即左移6位,可以通过硬连线实现,不占用逻辑资源,利用图1所示的移位加法器就能有效地实现累加。DA算法的主要特点是巧妙利用SRAM查找表将固定系数的MAC运算转化为查表操作,其运算速度不随系数和输入数据精度的增加而降低,而且相对直接实现乘法器和系数寄存器在逻辑资源占用上得到了极大的改善。缺点是查找表的大小随滤波器的阶数的增加呈指数增长,这时可以采用将大查找表分解为小查找表的方法来降低逻辑资源的消耗,如图2所示。


2 FIR滤波器的网络结构
N阶FIR滤波器相对于输入时间序列x(n)的输出表达式为:


即输出序列为单位脉冲相应h(n)与输入x(n)的卷积,由卷积关系可直接画出结构图,称之为直接型结构,如图3所示,该结构中共需要N个乘法器。


对于线性相位FIR滤波器,其单位取样响应是对称或反对称的,即:


利用对称性可以简化网络结构,当h(n)为偶对称且N为偶数时,


其线性网络结构如图4所示,仅需N/Z个乘法器。


3 FIR滤波器的硬件电路设计
下面以一个32阶FIR带通滤波器为例说明硬件电路设计的方法和过程。
3.1 设计指标
采用频率:200 Hz        类型:带通
上限截止频率:54.3 Hz     下限截止频率:46 Hz
阶数:32阶           系数数据宽度:16位
输入数据宽度:16位       输出数据宽度:16位
3.2 滤波器的设计
使用MATLAB 7.1软件中Filter Design&AnalysisTool,选取带通滤波器,Kaiser窗设计方法,设计出符合设计指标的32阶线性相位FIR滤波器,其幅频特性和相频特性如图5所示。


滤波器的特征参数用16位二进制补码表示如下:


3.3 硬件电路组成单元
FIR滤波器的硬件电路包括数据位扩展、并串转换器、移位寄存器组、预相加单元、查找表单元、查表结果相加单元、移位累加单元、锁存输出单元、控制单元等,总的结构如图6所示。


(1) 数据位扩展:由于输入数据要进行预相加,为了防止溢出,保证电路正常工作,采用符号位扩展,使输入数据由16位增加到17位。
(2) 并串转换器:由于电路以串行方式工作,须将并行输入的数据转换为串行数据输入,且顺序是先输入低位(LSB),后输入高位(MSB)。
(3) 移位寄存器组:其主要功能是用寄存器组存储输入序列,实现输入数据的延时输出,存储的级数等于FIR滤波器的阶数减1,即31。移位寄存器组输出的数据和并串转换器输出的数据一起形成如图1中所示的输入数据阵列形式。
(4) 预相加单元:利用FIR滤波器系数的对称性,按照图4所示的FIR滤波器线性网络结构,将相同滤波器系数相乘两个输入数据预先相加,这样相当于将滤波器的阶数减半,减小了硬件规模。预相加单元采用在位串行电路中广泛应用的串行加法器来实现。
(5) 查找表单元:如前所述,LUT的规模随滤波器阶数的增加呈指数增长,当滤波器的阶数很大时,查找表的规模过于庞大。为了减小规模,可以将1个有16位地址总线的LUT分割,产生4个4位地址总线部分LUT,先分别对4个部分表查表,再将结果相加。为防止相加时产生溢出,将16位查表输出经过1位符号扩展变为17位。
(6) 查表结果相加单元:加法器是影响FIR滤波器性能的主要部件,其工作速度决定了FIR滤波器的效率,因此采用具有超前进位功能的流水线加法器。
(7) 移位累加单元:得到的查表结果相当于一个部分积,移位累加单元将其与寄存器中的部分积相加,结果右移1位还放入寄存器中,直到所有的位数都查表结束。特别应注意,最高位查表得到的结果不是与上一个右移1位的部分积相加,而是相减。这里的加法器仍是采用具有超前进位功能的流水线加法器,作减法时,只需将被减数取补即可。
(8) 锁存输出单元:加法器的输出不稳定,将其结果经过一锁存器得到稳定的输出。
(9) 控制单元:产生复位,时序等控制信号,控制电路的总体运行。
3.4 电路仿真
在ALTERA公司的MAX+PLUS2软件环境下,用硬件描述语言VHDL对上述FIR滤波器的模块进行编程描述,并仿真各模块的波形,最后将各模块综合起来下载到器件FLEX10KE中形成FIR滤波器。
用MATLAB设计了一幅度为0.22的50 Hz的正弦波,用250 Hz的采样器对其采样,得到周期序列[0,0.209 2,0.129 3,—0.129 3,—0.209 2],用16位二进制补码表示为:[0000H,1ACBH,108DH,EF73H,E538H],将其输入到FIR滤波器的输入端,滤波器的输出如图6所示,实验结果与理论计算一致。并取32位以后的输出结果,在MATLAB里绘制波形,如图7所示,可见,FPGA仿真结果正确,50 Hz的正弦波通过了FIR滤波器。


4 结 论
本文所介绍的基于FPGA、采用分布式算法实现FIR滤波器的方法,在提高系统运行速度和节省硬件资源方面具有很大的优势。而且,通过改变阶数和查找表中的系数,还可以将此设计灵活地运用于实现高通、低通和带阻滤波器,可移植性较好。因此,这种方法在高速数字信号处理中将有很好的应用前景。

点击此处查看原文 >>

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

评论(0) | 阅读(201)
发表于:2008-4-18 10:26:40
标签:无标签

0

如何在SignalTAP II中保留特定节点 (verilog和VHDL禁止节点优化)

转自riple的:http://blog.ednchina.com/riple/2008/1/2.aspx
 
 
To be an Architect
发表于 2008-1-2 21:50:33

    一直以来,都觉得搭建一个SOPC系统很难。不是因为软件的使用存在问题——我可以阅读文档、咨询论坛上的高手、自己动手试试;而是因为搭建一个功能完备、结构自洽的SOPC系统太不易了——随便打开一个Altera提供的设计示例就会发现那么多的设备、那么多的DMA控制器、那么复杂的启动过程。 riple

    对我来说,看懂一个设计示例不难,照葫芦画瓢设计一个也不是难事。但是真的要自己定义需求,搭建一个SOPC系统——这个系统需要多个主设备协同工作,主设备之间需要竞争从设备的不可重入的使用权,需要自己定义从设备的操作接口,需要采用Scatter-Gather DMA,甚至不要采用Nios II......——我想了很久,一直还没有一个整体而清晰的轮廓。 riple

    回想最近一个项目,虽然我的工作FPGA设计是唱戏的主角,但搭台的是系统设计工作。由于外部器件和IP的限制,我们的系统还不是一个SOPC系统,而是一个“SOPCB”系统。系统设计和PCB布局工作是由我们硬件组的“老大”完成的,PCB上的总线用245搭建,还用CPLD完成Nor Flash换页和FPGA配置工作。“老大”就是老大,系统搭建得漂亮简洁。那么多器件,两层板搞定,尺寸还中规中矩。“老大”的功底让人不得不佩服。 riple

    工作快三年了,技术上一直在进步,不只是广度上的,我更看重的是深度上的。让我在FPGA内部设计一个工作稳定的模块基本上不是难事,可是让我像“老大”那样设计一个“自给自足”的PCB系统,还真是无从下手。模块设计和系统设计的差距是很大的,三年的技术积累还不足以让我跨入系统设计的门槛。 riple

    由于有了上面的思考,我决定要补一补系统设计的知识,在网上搜了搜,在书上查了查,大家都推荐Computer Architecture:A Quantitative Approach。到图书馆借来一本07年出的第四版,在前言中读到这样一段话: riple

The architect's role is not that of a scientist or inventor who will deeply study a particular phenomenon and create new basic materials or techniques. Nor is the architect the craftsman who masters the handling of tools to craft the finest details. The architect's role is to combine a thorough understanding of the state of the art of what is possible, a thorough understanding of the historical and current styles of what is desirable, a sense of design to conceive a harmonious total system, and the confidence and energy to marshal this knowledge and available resources to go out and get something built. To accomplish this, the architect needs a tremendous density of information with an in-depth understanding of the fundamentals and a quantitative approach to ground his thinking.

    由此恍然大悟——自己离Architect的目标还远着呢,充其量是个SOPC Builder。 riple

系统分类: CPLD/FPGA
用户分类: 数字之外
标签: SOPC Builder
来源: 原创
发表评论 阅读全文(354) | 回复(0)

7

关于投票
加快SignalTAP II编译过程的小技巧
发表于 2008-1-2 10:36:08

    使用Start Analysis & Elaboration代替Start Analysis & Synthesis可以显著缩短编译时间,对于添加节点来说,效果是相同的。原理如下: riple

Go to the Processing menu, point to Start and select Start Analysis & Elaboration to compile the design.
Before you can connect the ELA to signals in your design, you must first compile the design to build the node database. For this step, you do not need to fit the design completely. The Start Analysis & Elaboration command builds the node database, but stops before the fitting step.

    可以简单的认为:Start Analysis & Synthesis = Start Analysis & Elaboration + Mapping。Start Analysis & Elaboration可以建立未经过器件结构映射的设计数据库,而Start Analysis & Synthesis建立的是经过器件结构映射和优化的设计数据库。 riple

    同样,如果只需要观察一个设计的层次关系图,也可以使用这种方法加快速度。 riple

    同样,如果只需要观察一个设计的RTL视图,不需要观察Technology Map视图,也可以使用这种方法加快速度。 riple

 

背景资料:Using SignalTap II Embedded Logic Analyzers in SOPC Builder Systems riple

系统分类: CPLD/FPGA
用户分类: Signal Tap II
标签: SignalTAP 编译选项
来源: 原创
发表评论 阅读全文(1178) | 回复(0)

2

关于投票
使用SignalTAP II必须要关闭的编译选项
发表于 2008-1-2 10:21:41

    以前遇到过几次类似问题,只知道关闭一下就可以通过,但是没搞清原理。在Altera的一篇文档里找到了答案: riple

In the Settings dialog box, under the Compilation Process Settings section, select Incremental Compilation. Set the Incremental Compilation option to Off.
By turning off the Incremental Compilation option, pre-synthesis signals can be added to the SignalTap II ELA in the later sections. Pre-synthesis signals exist after design elaboration, but before any synthesis optimizations are done. This set of signals should reflect your register transfer level (RTL) signals.

 

背景资料:Using SignalTap II Embedded Logic Analyzers in SOPC Builder Systems riple

系统分类: CPLD/FPGA
用户分类: Signal Tap II
标签: signaltap 编译选项
来源: 原创
发表评论 阅读全文(494) | 回复(2)

2

关于投票
如何在SignalTAP II中保留特定节点
发表于 2008-1-2 10:11:27

    在使用SignalTAP II的过程中,我经常发现一些用于调试的逻辑(比如调试用的计数器)会被优化掉,不能出现在调试波形中。在Altera的一篇文档中,发现了以下关键信息: riple

In the logic synthesis stage, the Quartus II software may optimize away signals that you are trying to analyze with the SignalTap II Embedded Logic Analyzer. If this occurs, you will see a compilation error. You can force the Quartus II software to preserve these signals by adding the keep or preserve attribute in the source HDL to the signals you want to monitor.

The keep attribute is used for a wire or net node. For example:
In Verilog:
    wire my_wire /* synthesis keep = 1 */:
In VHDL:
    signal my_signal: bit;
    attribute syn_keep : boolean;
    attribute syn_keep of my_signal: signal is true;

The preserve attribute is used for a register. For example:
In Verilog:
    reg my_reg /* synthesis preserve = 1 */:
In VHDL:
    signal my_reg: stdlogic;
    attribute preserve : boolean;
    attribute preserve of my_signal: signal is true;

 

背景资料:Using SignalTap II Embedded Logic Analyzers in SOPC Builder Systems riple

系统分类: CPLD/FPGA
用户分类: Signal Tap II
标签: signaltap 保留节点
来源: 原创

点击此处查看原文 >>

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

评论(0) | 阅读(207)
发表于:2008-4-18 10:21:49
标签:无标签

0

关于verilog 和VHDL的语句优化问题1

转自:http://www.edacn.net/bbs/thread-94623-1-1.html

 

 

用 verilog 如何描述使quartus 编译不会把加的延时非门(功能上说无用的)优化掉

用 verilog 如何描述使quartus 编译不会把加的延时非门(功能上说无用的)优化掉

想对一个信号加门级延时(打算加若干非门),用 verilog 如何描述使quartus 编译不会把加的
延时非门(功能上说无用的)优化掉。

[ 本帖最后由 ntlnt 于 2007-7-23 09:20 编辑 ]

wire my_wire /* synthesis keep = 1 */;
/* synthesis keep = 1 */方法试过,
本打算加3个非门延时,结果仍然被优化为一个非门了