Figure 1: Architecture of a Rayleigh random variable generator
Uniform and Gaussian random variables generator
Figure 2: Model-based implementation of Gaussian random variables generator
The starting point for the implementation of a Rayleigh random variable generator is to implement a Gaussian random variables generator, as mentioned in Part 2 of this series . The Tausworthe algorithm is used to implement a 32-bit uniform number generator. It provides fast, superior randomness that occupies less area in the field-programmable gate array (FPGA). The initial seed values of this uniform random generator are randomly chosen. The F_ROM and G_ROM blocks contain quantized approximations of the f and g functions mentioned in . They are addressed by the output of the uniform random generator blocks. The MULT block is a pipeline real multiplier with full-scale output. Input to the accumulator is truncated before performing accumulation to realize the central limit theorem in order to overcome quantization and approximation errors. As a result, the Gaussian generator generates one sample every four clock cycles (the accumulator accumulates four samples before generating the Gaussian distributed random variable). Simulation results can be validated by an output scope or a variable dump to a MATLAB workspace.
Rayleigh random variables generator
Putting it all together, Figure 3 shows a model-based implementation of the correlated Rayleigh random variables generator. The Gaussian random generator (magenta block) generates two independent real and imaginary rails. The configurable fast Fourier transform (FFT) processor (orange block) is configured to 1024-point complex inverse FFT (IFFT). IFFT stage schedule scaling, and continuous streaming mode are configurable via user ports. It is worth noting that the IFFT length must be configured before starting the IFFT processing. The normalized Doppler shift of 0.05 is preloaded into the Doppler filter (green block). Filtered complex Gaussian distributed random variables in the frequency-domain are then injected into the IFFT processor to generate the time-domain Rayleigh distributed random variables.
At this point, the Rayleigh random variables generator block is ready for simulation. A few scopes and variable dumps to MATLAB workspaces are used to validate the implementation. For example, the magnitude and phase simulation results captured from the Rayleigh random variables generator model are shown in Figure 4.
Figure 3: Model-based implementation of the Rayleigh random variables generator
Figure 4: Rayleigh random variables generator simulation results
This blog post showed a model-based implementation of the Rayleigh random variable generator that is simple, fast, and efficient. In upcoming blog post, we will use Nutaq’s Perseus 601X development platform to test this implementation on a Virtex-6 FPGA .