简体   繁体   中英

BER measurement and Downsampling MATLAB

I'm trying to measure BER of 4-QAM modulated signal after downsampling (without filtering). problem is im not sure what to measure after i downsample as the signal is much shorter and the original signal is the same. here's my code:

n=2;
sig = randi([0 1],1,10E4);
sig_d=downsample(sig,n);
sig_mod=qammod(sig_d,4);
y=awgn(sig_mod,5);
sig_demod=qamdemod(y,4);
z=sig_demod>0;
BER = biterr(sig,z)

i might be missing something basic here. the goal of this code is to reduce sampling frequency and measure the BER of the sampled signal.

If you want to take the BER with respect to the original signal, you need to reconstruct the original signal after demodulation. You can interpolate to get back to the same number of samples. Something like this:

a=interp(sig_demod,2);
b=double(a>0.5);
BER = biterr(sig,b);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM