我想在matlab中实现相位噪声。任何人都可以告诉我为什么我不能在频域中看到我的频谱扩散。请帮助我。在代码中,首先我在频域中绘制了简单信号,在定义了两个噪声分量后,一个是同步的,第二个是累积噪声分量并添加到信号中。
fs = 200;
ts = 1/fs;
t = 0:ts:10000-ts;
fc = 50;
S = cos(2*pi*fc*t); %%% equation 7.1 noisless
L = length(S);
nfft = L*100;
res = fft(S,nfft)/nfft; % resize into nfft nr of element % normalize the amplitude
f = fs/2*linspace(0,1,nfft/2+1);
res = res(1:nfft/2+1);
figure, plot(f,abs(res));
sigma = 0.2;
phi_sync = sigma * randn(1,length(t)); %%%% random variable with gaussian distributed
phi_acc = sigma * randn(1,length(t)); %%%% random variable with gaussian distributed
% h = 0;
for i=1:length(S)
h = phi_sync + phi_acc(i);
end
S1 = cos(2*pi*fc*t + h);
L = length(S1);
nfft = L*100;
res = fft(S1,nfft)/nfft; % resize into nfft nr of element % normalize the amplitude
f = fs/2*linspace(0,1,nfft/2+1);
res = res(1:nfft/2+1);
figure, plot(f,abs(res))
return
答案 0 :(得分:0)
(从评论部分复制)
使噪声更大,例如,设置sigma = 1.2,您将获得在整个频率范围内噪声扩散的频谱。相位噪声只是另一种代表"频率噪声,所以它肯定会拓宽频谱。