kautilya said:
Hi there
Thanks for the reply. When i said i wanted to obtain it, yes, i really meant deriving the equation of the power spectral density function and also plot the function using MATLAB simulation from the random data of BPSK.
Can you help me regarding this?
regards
kautilya
To derive it, like I said, start with the autocorrelation function, which is
R(tau) = E[x(t) x(t + tau)]
Without too much difficulty, you should be able to show that this is a triangular function between -T and T (where T is the bit length), centered at 0, and zero outside that interval. This assumes that a +1 bit and -1 bit are equally likely and that the bit values are statistically independent from one another. (Actually uncorrelated would suffice.)
If you're stuck on that part, please show us what equation you are assuming for x(t), and how far you are able to get.
This all presumes that x(t) is wide-sense stationary; otherwise the autocorrelation function will depend on two parameters, not just one. Wide-sense stationarity should be true in your case unless you're making an unusual assumption of some kind, but you should verify that this is true.
Once you have that R(tau) is a triangle function, just take its Fourier transform to obtain a sinc^2. Either you know this reflexively based on having it hammered into you in a signals and systems course, or you can derive it by expressing R(tau) as the convolution of a simpler function with itself, and remembering what convolution in the time domain corresponds to in the frequency domain.
Finally, for simulating all of this in Matlab, I assume you can generate a vector containing a simulated BPSK time domain signal. (Either with or without noise added.) I'll assume you have B samples per bit and M bits, so the vector contains BM samples. You'll then want to repeat this process N times (obtain M random BPSK vectors) so you can do a Monte Carlo approximation to the expected value in the defining equation for R(tau).
You can then estimate the power spectral density in one of two ways.
(1) Compute x(t)x(t-tau) for each BPSK vector and for as many values of tau as desired (tau is the offset between samples in the product, and has the same granularity as your sampling rate). For each tau, you can accumulate across all the t values because of the wide-sense stationary assumption. For each BPSK vector this will produce a sample autocorrelation function, call it R_n(tau), where n varies from 1 to N. Then simply average the R_n(tau)'s from 1 to N for each tau, resulting in R(tau). You can then take the Fourier transform using Matlab.
(2) You can directly compute the Fourier transform of each BPSK vector, and then take its magnitude squared. Repeat this process for each BPSK vector, and then average the magnitude-squared FFT's. This should result in the same power spectral density, except probably for a scale factor.