Symbol time offset simulation I ran a number of simulations for symbol timing synchronization in the past. I used GNU Radio mainly. Now, I'm trying to do the same thing in C++. To achieve that, I need a way to introduce symbol offset to the symbols. So suppose I have a complex array of $M$ samples acquired at a sampling rate of $N$ samples per symbol. How do I introduce a symbol offset of say $\mu = 100 \ \rm ppm$ of the symbol time? Pseudocode, C++, or MATLAB script will suffice.
If you postulate that receiever's clock is perfect, then you want to make the transmitter send symbols every $T_s \pm \varepsilon$ seconds, where $T_s$ is the symbol period according to the receiver.
This is easily achieved by using a very high sampling rate in the transmitter. Let's assume $T_s=1$ and you need a deviation of $\pm 0.01$. This deviation corresponds to one sample, if the sampling interval is $0.01$. So, use a sampling rate of $1/.01 = 100$ samples per time unit, and have the transmitter send a new symbol every 99 samples (for a faster clock) or every 101 samples (for a slower clock). Then, have the receiver sample every 100 samples, and you're done.
By making the sampling rate fast enough, you can easily accomodate any delay you need. Using this method, it is also easy to simulate a time-varying clock drift in the transmitter and/or receiver.