First - this will depend on the nature of the phase noise you wish to model. If deltaf
is a constant then it is just a frequency shift and really isn't considered phase noise. What you really need is deltaf
to be a noise vector the same length as t
. In matlab format you can do this by:
t=0:255;
fc=0.2; %just an example
deltaf = 0.001*randn(size(t));
B=cos(2*pi*(fc+deltaf).*t);
Notice that the frequency will have a finite variance in this case - but the phase variance will increase linearly over time - this may or may not be what you want. To have a finite phase variance you would do something like
t=0:255;
fc=0.2; %just an example
ph_n = 0.0001*randn(size(t));
B=cos(2*pi*fc*t+2*pi*ph_n);
Typically you can analyze these signals by using trigonometric identities and then assuming the noise portion is small or by using Taylor series expansions for the noise components.