我正在研究设计 9 抽头强制零均衡器以消除通道中的 ISI。我假设通道响应是我试图计算误码率。当我选择例如,我得到了很好的结果。对于高 SNR 值,BER 达到 1e-4。但是当信道响应为时,下面的代码给出的误码率为 0.5. 有人可以帮我解决这个问题吗?我做错了什么,但我找不到。
N = 10^4; % number of bits or symbols
Eb_N0_dB = [0:2:10]; % multiple Eb/N0 values
for ii = 1:length(Eb_N0_dB)
% Transmitter
ip = rand(1,N)>0.5; % generating 0,1 with equal probability
s = 2*ip-1; % BPSK modulation 0 -> -1; 1 -> 1
% Channel model, multipath channel
ht = [0.41 0.815 0.41]
chanOut = conv(s,ht);
n = 1/sqrt(2)*[randn(1,N+length(ht)-1) + j*randn(1,N+length(ht)-1)]; % white gaussian noise, 0dB variance
% Noise addition
y = chanOut + 10^(-Eb_N0_dB(ii)/20)*n; % additive white gaussian noise
kk=4; % 9-tap filter
L = length(ht);
hM = toeplitz([ht([2:end]) zeros(1,2*kk+1-L+1)], [ ht([2:-1:1]) zeros(1,2*kk+1-L+1) ]);
d = zeros(1,2*kk+1);
d(kk+1) = 1;
c = [inv(hM)*d.'].';
% matched filter
yFilt = conv(y,c);
yFilt = yFilt(kk+2:end);
yFilt = conv(yFilt,ones(1,1)); % convolution
ySamp = yFilt(1:1:N); % sampling at time T
% receiver - hard decision decoding
ipHat = real(ySamp)>0;
% % counting the errors
nErr(1,ii) = size(find([ip-ipHat]),2);
end
simBer = nErr/N; % simulated ber