I'm modeling the following system in MATLAB and plotting the autocorrelation and PSD. I'm getting results that agree with some other simulations, but I'd really like to be able to theoretically arrive at the autocorrelation and PSD functions without needing simulations. I'm an EE grad and have taken a course in stochastic systems but am having a little trouble here. The system is as follows:
The system contains four networks A - D. When network A is "selected", the output is o_A (some integer value). Likewise for B - D.
One network is selected (active) at a time. The rules for network selection are:
1. Once a network has been selected, it can not be selected during the next two cycles
2. Beyond this rule, any network is equally likely to be selected
Hence an output sequence could be: o_A, o_B, o_D, o_A, o_C, o_B, etc but NOT: o_A, o_B, o_A, o_C
An example output pattern is below (the first 20 points of a 4096 length sequence I generated):
The autocorrelation is as follows (using the 'coeff' option in MATLAB):
The FFT of this (the PSD) is as follows:
What I'm looking for is a way to theoretically arrive at that autocorrelation function (the PSD follows naturally of course).
I know that the random process is not IID since it depends on the previous two random variables. I can work out using Bayes and Total Probability some formulas for the probability that Xn will equal o_A. However, I'm not really sure where to go after that. Any help or pointers in the right direction would be much appreciated!