找回密码
 注册
查看: 812|回复: 0

R语言 signal包 kaiserord()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 02:10:13 | 显示全部楼层 |阅读模式
kaiserord(signal)
kaiserord()所属R语言包:signal

                                         Parameters for an FIR filter from a Kaiser window
                                         从Kaiser窗FIR滤波器的参数

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Returns the parameters needed for fir1 to produce a filter of the desired specification from a Kaiser window.
返回FIR1以产生所需的规格的过滤器从Kaiser窗口所需要的参数。


用法----------Usage----------


kaiserord(f, m, dev, Fs = 2)



参数----------Arguments----------

参数:f
frequency bands, given as pairs, with the first half of the first pair assumed to start at 0 and the last half of the last pair assumed to end at 1.  It is important to separate the band edges, since narrow transition regions require large order filters.  
作为对给定的,与所述第一半的第一对的频带,假设从在0和1的最后一对的最后一半假设结束。重要的是要分离的频带边缘的狭窄的过渡区,因为需要大的阶滤波器。


参数:m
magnitude within each band.  Should be non-zero for pass band and zero for stop band.  All passbands must have the same magnitude, or you will get the error that pass and stop bands must be strictly alternating.  
在每个波段的幅度。如果是非零的通带和阻带的零。所有的通带必须有相同的大小,或通和阻带必须严格交替,你会得到错误。


参数:dev
deviation within each band.  Since all bands in the resulting filter have the same deviation, only the minimum deviation is used.  In this version, a single scalar will work just as well.  
每个频段的偏差范围内。由于所有频带中的结果过滤器有相同的偏差,只有最小偏差使用。在这个版本中,一个标会工作得很好。


参数:Fs
sampling rate.  Used to convert the frequency specification into the [0, 1], where 1 corresponds to the Nyquist frequency, Fs/2.  
采样率。用于转换的频率规格为[0,1],其中1对应的奈奎斯特频率,Fs / 2的。


值----------Value----------

An object of class FilterOfOrder with the following list elements:
对象的类FilterOfOrder下面的列表元素:


参数:n
filter order  
滤波器的阶数


参数:Wc
cutoff frequency  
截止频率


参数:type
filter type, one of "low", "high", "stop", "pass", "DC-0", or "DC-1"  
过滤器类型,一个"low","high","stop","pass","DC-0"或"DC-1"


参数:beta
shape parameter  
形状参数


(作者)----------Author(s)----------


Original Octave version by Paul Kienzle
<a href="mailto:pkienzle@users.sf.net">pkienzle@users.sf.net</a>. Conversion to R by Tom Short.



参考文献----------References----------

Discrete-time signal processing. Upper Saddle River, N.J.: Prentice Hall.



参见----------See Also----------

hamming, kaiser
hamming,kaiser


实例----------Examples----------


Fs <- 11025
op <- par(mfrow = c(2, 2), mar = c(3, 3, 1, 1))
for (i in 1:4) {
  switch(i,
    "1" = {
        bands <- c(1200, 1500)
        mag <- c(1, 0)
        dev <- c(0.1, 0.1)
    },
    "2" = {
        bands <- c(1000, 1500)
        mag <- c(0, 1)
        dev <- c(0.1, 0.1)
    },
    "3" = {
        bands <- c(1000, 1200, 3000, 3500)
        mag <- c(0, 1, 0)
        dev <- 0.1
    },
    "4" = {
        bands <- 100 * c(10, 13, 15, 20, 30, 33, 35, 40)
        mag <- c(1, 0, 1, 0, 1)
        dev <- 0.05
    })
}

  kaisprm <- kaiserord(bands, mag, dev, Fs)
  with(kaisprm, {
    d <<- max(1, trunc(n/10))
    if (mag[length(mag)]==1 &amp;&amp; (d %% 2) == 1)
      d <<- d+1
    f1 <<- freqz(fir1(n, Wc, type, kaiser(n+1, beta), 'noscale'),
        Fs = Fs)
    f2 <<- freqz(fir1(n-d, Wc, type, kaiser(n-d+1, beta), 'noscale'),
        Fs = Fs)
  })                                                               
  plot(f1$f,abs(f1$h), col = "blue", type = "l",
       xlab = "", ylab = "")
  lines(f2$f,abs(f2$h), col = "red")
  legend("right", paste("order", c(kaisprm$n-d, kaisprm$n)),
         col = c("red", "blue"), lty = 1, bty = "n")
  b <- c(0, bands, Fs/2)
  for (i in seq(2, length(b), by=2)) {
    hi <- mag[i/2] + dev[1]
    lo <- max(mag[i/2] - dev[1], 0)
    lines(c(b[i-1], b[i], b[i], b[i-1], b[i-1]), c(hi, hi, lo, lo, hi))
  }
par(op)

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-5-22 19:23 , Processed in 0.020408 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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