I'm using 'awgn(input_signal,snr_db,'measured')' function in MATLAB to add white noise to the input signal.
Here is the simplified script.
Does zero padding the input signal affect the behavior of awgn function?
clc;clear all;close all;
data = randi([0 3], 1, 2^12); % Generate data
qam_mod = qammod(data, 4); % Modulate data
qam_mod_u = upsample(qam_mod,64); % Upsample
ch_out_interplt = awgn(qam_mod_u, 5, 'measured');
ch_out_no_interplt = awgn(qam_mod, 5, 'measured');
ch_out_downsample = downsample(ch_out_interplt,64); % Downsample
scatterplot(ch_out_downsample); title('with up, down sampling, 5 dB SNR');
scatterplot(ch_out_no_interplt); title('no up, down sampling, 5 dB SNR');
The scatterplots are different with and without zero padding.
- Does that mean awgn function behavior depends on the zero padding (length of the signal)?
- How does the 'awgn(input_signal,snr_db,'measured')' function calculates the input signal power?
- How to make the power calculation independent of the length of the input signal?
- Is there any better way to simulate the awgn noise in MATLAB?