我想在调频信号中添加相位和幅度噪声。我需要在信号中添加不同级别的相位噪声,并需要查看输出如何变化。
频率调制信号的方程为 s = A * cos(2*pi*fc.*t + 2*pi bw int_x + init_phase)。这里我应该把什么当作 init_phase(phase noise) = ?和 A = ?。
function [st] = freqmod(fc,fs, bw, x, t,init_phase)
%VCO_FUNCTION Summary of this function goes here
% Detailed explanation goes here
if nargin < 6
init_phase = 0;
end
if (fs < 2*fc)
disp('Error: fs must at least 2*fc');
return;
end
int_x = cumsum(x)/fs;
st = cos(2*pi*fc.*t + 2*pi *bw*int_x + init_phase); % Frequency modulation
end