# 切比雪夫滤波器的特性分析和设计

1. 实验平台：Windows
2. 开发语言：Fortran

 卷积 递归 时域 移动平均滤波器 单极点滤波器 频域 加窗sinc滤波器 切比雪夫滤波器 任意频响 FIR任意频响滤波器 迭代设计滤波器

1. 切比雪夫的频率响应特性

（a） 低通频率响应

（b） 低通频率响应（dB）

（c） 高通频率响应

（d） 高通频率响应（dB）

2. 阶跃响应的过冲

3. 稳定性

 截止效率 0.02 0.05 0.1 0.25 0.4 045 0.48 最大极点数 4 6 10 20 10 6 4

（1）

（2）

   1: 100 'CHEBYSHEV FILTER- RECURSION COEFFICIENT CALCULATION
   2:
   3: 110 '
   4:
   5: 120 'INITIALIZE VARIABLES
   6:
   7: 130 DIM A[22] 'holds the "a" coefficients upon program completion
   8:
   9: 140 DIM B[22] 'holds the "b" coefficients upon program completion
  10:
  11: 150 DIM TA[22] 'internal use for combining stages
  12:
  13: 160 DIM TB[22] 'internal use for combining stages
  14:
  15: 170 '
  16:
  17: 180 FOR I% = 0 TO 22
  18:
  19: 190 A[I%] = 0
  20:
  21: 200 B[I%] = 0
  22:
  23: 210 NEXT I%
  24:
  25: 220 '
  26:
  27: 230 A[2] = 1
  28:
  29: 240 B[2] = 1
  30:
  31: 250 PI = 3.14159265
  32:
  33: 260 'ENTER THE FOUR FILTER PARAMETERS
  34:
  35: 270 INPUT "Enter cutoff frequency (0 to .5): ", FC
  36:
  37: 280 INPUT "Enter 0 for LP, 1 for HP filter: ", LH
  38:
  39: 290 INPUT "Enter percent ripple (0 to 29): ", PR
  40:
  41: 300 INPUT "Enter number of poles (2,4,...20): ", NP
  42:
  43: 310 '
  44:
  45: 320 FOR P% = 1 TO NP/2 'LOOP FOR EACH POLE-PAIR
  46:
  47: 330 '
  48:
  49: 340 GOSUB 1000 'The subroutine in TABLE 20-5
  50:
  51: 350 '
  52:
  53: 360 FOR I% = 0 TO 22 'Add coefficients to the cascade
  54:
  55: 370 TA[I%] = A[I%]
  56:
  57: 380 TB[I%] = B[I%]
  58:
  59: 390 NEXT I%
  60:
  61: 400 '
  62:
  63: 410 FOR I% = 2 TO 22
  64:
  65: 420 A[I%] = A0*TA[I%] + A1*TA[I%-1] + A2*TA[I%-2]
  66:
  67: 430 B[I%] = TB[I%] - B1*TB[I%-1] - B2*TB[I%-2]
  68:
  69: 440 NEXT I%
  70:
  71: 450 '
  72:
  73: 460 NEXT P%
  74:
  75: 470 '
  76:
  77: 480 B[2] = 0 'Finish combining coefficients
  78:
  79: 490 FOR I% = 0 TO 20
  80:
  81: 500 A[I%] = A[I%+2]
  82:
  83: 510 B[I%] = -B[I%+2]
  84:
  85: 520 NEXT I%
  86:
  87: 530 '
  88:
  89: 540 SA = 0 'NORMALIZE THE GAIN
  90:
  91: 550 SB = 0
  92:
  93: 560 FOR I% = 0 TO 20
  94:
  95: 570 IF LH = 0 THEN SA = SA + A[I%]
  96:
  97: 580 IF LH = 0 THEN SB = SB + B[I%]
  98:
  99: 590 IF LH = 1 THEN SA = SA + A[I%] * (-1)^I%
 100:
 101: 600 IF LH = 1 THEN SB = SB + B[I%] * (-1)^I%
 102:
 103: 610 NEXT I%
 104:
 105: 620 '
 106:
 107: 630 GAIN = SA / (1 - SB)
 108:
 109: 640 '
 110:
 111: 650 FOR I% = 0 TO 20
 112:
 113: 660 A[I%] = A[I%] / GAIN
 114:
 115: 670 NEXT I%
 116:
 117: 680 ' 'The final recursion coefficients are in A[ ] and B[ ]
 118:
 119: 690 END

（3）

（4）

   1: 100 'COMBINING RECURSION COEFFICIENTS OF CASCADE AND PARALLEL STAGES
   2:
   3: 110 '
   4:
   5: 120 ' 'INITIALIZE VARIABLES
   6:
   7: 130 DIM A1[8], B1[8] 'a and b coefficients for system 1, one of the stages
   8:
   9: 140 DIM A2[8], B2[8] 'a and b coefficients for system 2, one of the stages
  10:
  11: 150 DIM A3[16], B3[16] 'a and b coefficients for system 3, the combined system
  12:
  13: 160 '
  14:
  15: 170 'Indicate cascade or parallel combination
  16:
  17: 180 INPUT "Enter 0 for cascade, 1 for parallel: ", CP%
  18:
  19: 190 '
  20:
  21: 200 GOSUB XXXX 'Mythical subroutine to load: A1[ ], B1[ ], A2[ ], B2[ ]
  22:
  23: 210 '
  24:
  25: 220 FOR I% = 0 TO 8 'Convert the recursion coefficients into transfer functions
  26:
  27: 230 B2[I%] = -B2[I%]
  28:
  29: 240 B1[I%] = -B1[I%]
  30:
  31: 250 NEXT I%
  32:
  33: 260 B1[0] = 1
  34:
  35: 270 B2[0] = 1
  36:
  37: 280 '
  38:
  39: 290 FOR I% = 0 TO 16 'Multiply the polynomials by convolving
  40:
  41: 300 A3[I%] = 0
  42:
  43: 310 B3[I%] = 0
  44:
  45: 320 FOR J% = 0 TO 8
  46:
  47: 330 IF I%-J% < 0 OR I%-J% > 8 THEN GOTO 370
  48:
  49: 340 IF CP% = 0 THEN A3[I%] = A3[I%] + A1[J%] * A2[I%-J%]
  50:
  51: 350 IF CP% = 1 THEN A3[I%] = A3[I%] + A1[J%] * B2[I%-J%] + A2[J%] * B1[I%-J%]
  52:
  53: 360 B3[I%] = B3[I%] + B1[J%] * B2[I%-J%]
  54:
  55: 370 NEXT J%
  56:
  57: 380 NEXT I%
  58:
  59: 390 '
  60:
  61: 400 FOR I% = 0 TO 16 'Convert the transfer function into recursion coefficients.
  62:
  63: 410 B3[I%] = -B3[I%]
  64:
  65: 420 NEXT I%
  66:
  67: 430 B3[0] = 0
  68:
  69: 440 ' 'The recursion coefficients of the combined system now
  70:
  71: 450 END 'reside in A3[ ] & B3[ ]

 A B 0 9.684457e-07 0 1 6.779120e-06 -7.616874e+00 2 1.936891e-05 2.634041e+01 3 2.711648e-05 -5.424242e+01 4 1.355824e-05 7.325881e+01 5 -1.355824e-05 -6.726091e+01 6 -2.711648e-05 4.196424e+01 7 -1.936891e-05 -1.715111e+01 8 -6.779120e-06 4.166027e+00 9 -9.684457e-07 -4.581673e-01

[1] Steven W.Smith. Digital Signal Processing: A Practical Guide for Engineers and Scientists.[M] California Technical Publishing, 2003

Special thanks to Steven W.Smith for his great tutorial and craigeaton for the parameters data in his project.

posted @ 2011-03-26 20:29  Joseph Pan  阅读(8212)  评论(8编辑  收藏  举报