作者zxvc (修行)
看板comm_and_RF
标题[问题] MATLAB模拟Analog filter
时间Sun Mar 29 15:42:42 2009
我想要在MATLAB中模拟一个类比lowpass filtering的效果。
我的作法是把continuous-time的sine波作sampling与discrete-time filter
作convoultion。
以下是我的MATLAB code:
------------------------------------------------------------------
% Initialization
clear; clc;
% Channel bandwidth.
ChBw = 7.5e3;
% Continuous-time channel impulse response (low pass filter).
ChanResC = @(t) exp(-t*ChBw)*ChBw;
% Number of discrete-time filter taps.
Taps = 20;
% Frequency of the test wave.
fc = 300;
% Sampling frequency
fs = fc*64;
% Discrete-time channel impulse response.
ChanRes = ChanResC([0:Taps-1]/fs)/fs;
% Test wave.
x = sin(2*pi*fc*[0:1/fs:6/fc]);
% Filtering the test wave.
y = conv(x, ChanRes);
stem(y);
------------------------------------------------------------------
但convolution的绝对值最大值超过1,不知这是不是合理的现象?
或许是因为我没有把y转回continuous-time signal的缘故!?
那请问我要如何把y转回continuous-time?
(我用Simulink跑过这个analog filter,的确输出不会超过1。
其实可以把这个filter看作一个RC电路,它的gain不会超过1。)
--
西方三圣:
http://p8.p.pixnet.net/albums/userpics/8/3/553683/1193661731.jpg
《佛说阿弥陀经》
http://web.cc.ncu.edu.tw/~93501025/amtf.doc
十一面观音咒:
http://file.buda.idv.tw/music/DBZFY04.mp3
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.115.220.219
※ 编辑: zxvc 来自: 140.115.220.219 (03/29 16:15)
※ 编辑: zxvc 来自: 140.115.220.219 (03/29 16:16)
1F:→ paullai:原PO晚安 @@> 59.115.170.60 03/29 20:52
2F:→ zxvc:Hi,楼上。140.115.220.219 03/29 21:10