第1个回答 2019-11-20
clearall
rolloff=0.25;
span=4;
sps=40;
b=rcosdesign(rolloff,span,sps);
d=2*randi([01],20,1)-1;
x=upfirdn(d,b,sps);
r=x+randn(size(x))*0.01;
y=upfirdn(r,b,40,sps);
fvtool(y,'Analysis','impulse');
fc=0.1;
t=[1:length(y)];
carrier=cos(2*pi*fc*t);
z=20*y.*carrier';
plot(z)
扩展资料
rcosine函数的定义
b=rcosdesign(beta,span,sps,shape)
beta:滚降系数,取值0~1之间,决定频宽和陡峭程度。取值一般大于0.2。
span:表示截断的符号范围。
sps:单个符号范围的采样个数。
shape:可选参数。可不加,可加上’normal’,可加上’sqrt’。
当选择’sqrt’时,返回一个平方根升余弦滤波器。
本回答被网友采纳
第2个回答 2015-12-30
【 在 viryu (viryu) 的大作中提到: 】
: [num,den] = rcosine(Fd,Fs,type_flag,r,delay)
: 设计升余弦滤波器的函数
: 截止频率是不是就是对应的Fd?
截止频率是Fd/2
: Fs/Fd就是上采样率?
不知道是不是叫上采样率,反正就是内插倍数
: 但是,像阻带的衰减多少dB应该如何设置?似乎没有对应的参数,难道不需要设置么?
比如FIR的话,其频响可以由滚降系数和窗长(FIR阶数)确定。
: 另外,num的长度是不是
: delay * (Fs / Fd) * 2 + 1?
是,就是阶数
第3个回答 2017-01-20
rcosine Design raised cosine filter.
WARNING: rcosine is not recommended. Use RCOSDESIGN instead.
NUM = rcosine(Fd, Fs) designs an FIR raised cosine filter to filter a
digital signal with the digital transfer sampling frequency Fd. The
filter sampling frequency is Fs. Fs/Fd must be a positive integer.
The default roll-off factor is 0.5, and the default filter delay
is 3/Fd seconds.
[NUM, DEN] = rcosine(Fd, Fs, TYPE_FLAG) gives specific filter design
instructions. TYPE_FLAG can be 'iir', 'sqrt', or a combination
such as 'iir/sqrt'. The order of the arguments is not important.
'fir' Design FIR raised cosine filter (default).
'iir' Design an IIR approximation to the FIR raised cosine filter.
'normal' Design the regular raised cosine filter (default).
'sqrt' Design square root raised cosine filter.
'default' Use the default (FIR, Normal raised cosine filter).
[NUM, DEN] = rcosine(Fd, Fs, TYPE_FLAG, R) specifies the
roll-off factor in R, which is a real number in the range [0, 1].
[NUM, DEN] = rcosine(Fd, Fs, TYPE_FLAG, R, DELAY) specifies the filter
delay in DELAY, which must be a positive integer. DELAY/Fd is the
filter delay in seconds.
[NUM, DEN] = rcosine(Fd, Fs, TYPE_FLAG, R, DELAY, TOL) specifies the
tolerance in TOL for IIR filter design. The default value is 0.01.
When the designed filter is an FIR filter, the output in DEN is 1.
See also rcosdesign, rcosdemo.
在MATLAB中实现升余弦滚降滤波器的冲激响应例程程序通过调用rcosine函数实现的,以下是我对在MATLAB中查询这个函数的一些理解:
[NUM,DEN] = rcosine(Fd, Fs, TYPE_FLAG, R, DELAY)
NUM是用来接收升余弦滚降滤波器的冲击响应的数组序列,DEN查询不得,Fs指采样频率,R指的是滚降系数,这两个参数可以理解,Fd翻译过来的指转移频率,不是很理解它的作用,这三个值似乎可以决定FIR或IIR滤波器的阶数,Delay/Fd决定滚降滤波器的延迟,相对于时域中的0。TYPE_FLAG参数可以取'fir' 设计FIR滤波器,'iir'设计IIR滤波器,'normal'设计正常的升余弦滚降滤波器,'sqrt'设计平方根的升余弦滚降滤波器,'default' 指使用’fir/normal’。