以下是从Matlab的帮助文档里摘来的滤波器Demo。
滤波器、均衡器,我就不多说了。
前面有系列文章,滤波器的设计。如LMS滤波器、经典FIR滤波器等。
这里直接使用Matlab的工具箱。
Choose an Adaptive Algorithm.Configuring an equalizer involves choosing an adaptive algorithm and indicating your choice when creating an equalizer object in the MATLAB environment.
Although the best choice of adaptive algorithm might depend on your individual situation,here are some generalizations that might influence your choice:
The LMSalgorithm executes quickly but converges slowly, and its complexity grows linearly with the number of weights.
The RLSalgorithm converges quickly, but its complexity grows with the square of the number of weights, roughly speaking. This algorithm can also be unstable when the number of weights is large.
The varioustypes of signed LMSalgorithms simplify hardware implementation.
The normalized LMS and variable-step-size LMS algorithms are more robust to variability of the input signal's statistics (such as power).
The constant modulus algorithm is useful when no training signal is available, andworks best for constant modulus modulationssuch as PSK.
However, if CMA has no additional side information, it can introduce phase ambiguity. For example, CMA might find weights that produce a perfect QPSK constellation but might introduce a phase rotation of 90, 180, or 270 degrees. Alternatively, differential modulation can be used to avoid phase ambiguity.
基本步骤
% Build a set of test data.
hMod = comm.BPSKModulator; % BPSKModulator System object
x = step(hMod,randi([0 1],1000,1)); % BPSK symbols
rxsig = conv(x,[1 0.8 0.3]); % Received signal
% Create an equalizer object.
eqlms = lineareq(8,lms(0.03));
% Change the reference tap index in the equalizer.
eqlms.RefTap = 4;
% Apply the equalizer object to a signal.
y = equalize(eqlms,r