_:n5677f8d8b8ba417f80854684345a5907xb1
<http://schema.org/text>
"I want to implement phase noise in my signal. Can anyone tell me why i can not see spreadning of my spectrum in frequency domain. Please help me out.In code, first I have plotted simple signal in frequency domain and after i have defined two noise components, one is syncronous and second is accumulating noise components and added into the signal.\r\n\r\n\r\n  fs = 200;\r\n  ts = 1/fs;\r\n  t = 0:ts:1000-ts;\r\n  fc = 50;\r\n  S = cos(2*pi*fc*t);                    %%% equation 7.1 noisless\r\n  L = length(S);\r\n  nfft = L*100;\r\n  res = fft(S,nfft)/nfft; % resize into nfft nr of element % normalize the amplitude\r\n  f = fs/2*linspace(0,1,nfft/2+1);\r\n  res = res(1:nfft/2+1);\r\n  figure, plot(f,abs(res));\r\n  \r\n  sigma = 0.2;\r\n  phi_sync =  sigma * randn(1,length(t));   %%%% random variable with gaussian distributed\r\n  phi_acc = sigma * randn(1,length(t));   %%%% random variable with gaussian distributed\r\n  % h = 0;\r\n  \r\n  for i=1:length(S)\r\n      h = phi_sync + phi_acc(i);\r\n  end\r\n  \r\n  S1 = cos(2*pi*fc*t + h);    %%%% signal with noise\r\n  \r\n  L = length(S1);\r\n  nfft = L*100;\r\n  res = fft(S1,nfft)/nfft; % resize into nfft nr of element % normalize the amplitude\r\n  f = fs/2*linspace(0,1,nfft/2+1);\r\n  res = res(1:nfft/2+1);\r\n  figure, plot(f,abs(res))\r\n  return\r\n\r\n"
<https://kr.mathworks.com/matlabcentral/answers/231302-adding-phase-noise-in-simple-signal>