声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 2576|回复: 0

[Fortran] 设计切比雪夫I型模拟低通滤波器求出转移函数

[复制链接]
发表于 2006-8-6 07:29 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
设计切比雪夫I型模拟低通滤波器,求出转移函数G(p)

  1.       subroutine chebsh(l,k,ln,d,c,phi2,ierror)
  2. c----------------------------------------------------------------------
  3. c    routine CHEBSH: To design low-pass Chebyshev analog filter:
  4. c                    H(s)=D(s)/C(s)
  5. c       If IERROR=0: no errors detected
  6. c                =1: invalid filter order l and k
  7. c                                       in Chapter 7
  8. c--------------------------------------------------------------------
  9.         dimension d(0:4),c(0:4)
  10.         pi=4.*atan(1.)
  11.         ierror=1
  12.         if(l.le.0.or.k.gt.int((l+1)/2)) return
  13.         ierror=0
  14.         do 10 i=1,ln
  15.            d(i)=0.
  16.            c(i)=0.
  17. 10      continue
  18.         d(0)=1.0
  19.         c(0)=1.0
  20.         orderk=k-(l+1.)/2.
  21.         if(orderk.eq.0) goto 20
  22.         c(0)=(sin((2*k-1)*pi/(2*l))*(exp(phi2)-exp(-phi2))/2.0)**2 +
  23.      $       (cos((2*k-1)*pi/(2*l))*(exp(phi2)+exp(-phi2))/2.0)**2
  24.         c(1)=2.*sin((2*k-1)*pi/(2*l))*(exp(phi2)-exp(-phi2))/2.0
  25.         c(2)=1.
  26.         return
  27. 20      c(0)=(exp(phi2)-exp(-phi2))/2.0
  28.         c(1)=1.0
  29.         return
  30.         end
复制代码

本帖被以下淘专辑推荐:

回复
分享到:

使用道具 举报

您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-5-18 17:20 , Processed in 0.060359 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表