# Phase Congruential White Noise Generator
## 2 White Noise Autocorrelation Matrix
The data presented in the last listing demonstrate that the uniform white noise was indeed achieved with an almost independent autocorrelation matrix for the autvectors of the original signal. ## 5 Discussion

After obtaining the correlation matrices, the first thing which should be analyzed is whether both experiments in the programs _P070101_ and _P070403_ ensure the realization of the first fundamental property of uniform white noise (considered here earlier in subsection _White Noise Autocorrelation Matrix_) by the equality of all intensities of the internal Fourier spectrum. Let us discuss this issue further in more detail. When considering the frequency properties of discrete information signals, usually the Fourier polynom (11) is used, with the number of countings \(N_{S}\) and the quantity of internal frequencies \(N_{F}\) in the original signal \(S_{0}\). The amplitudes of the cosine \(a_{k}\) and sine \(b_{k}\) components are calculated from the meanings of countings \(f(x_{i})\) using the following Euler-Fourier formulas below:

\[f(x_{i})=a_{0}+\sum_{k=1}^{N_{\omega}}A_{k}\cos(k\omega_{1}x_{i}+\varphi_{k}) \tag{28}\]1

\[f(x_{i})=a_{0}+\sum_{k=1}^{N_{\omega}}A_{k}\cos(k\omega_{1}x_{i}+\varphi_{k}) \tag{28}\]2

\[f(x_{i})=a_{0}+\sum_{k=1}^{N_{\omega}}A_{k}\cos(k\omega_{1}x_{i}+\varphi_{k}) \tag{28}\]3

The process of white noise generation could be considered successful if the obtained countings \(f(x_{i})\) of the signal admit transformations (38)-(40) into the Euler-Fourier coefficients \(a_{k}\) and \(b_{k}\). It should be checked now whether the intensities \(A_{k}\) are the same at all frequencies \(\omega_{k}=k\omega_{1}\). This is required by the first property in the designation of white noise, i.e., the demand of uniform distribution of intensities at all internal frequencies of the signal. This check should be carried out both for the white noise of the function _Random.Next()_ in the program _P070101_ and for the congruential white noise in the program _P070401_. Below is the program _P070501_, which uses the random process generated earlier in the program _P070101_ for the white noise signal \(S_{0}\) using the function _Random.Next()_. The derivable spectral amplitudes \(A_{k}\) are calculated with help from sine technique using the function _Fourier()_, which is composed according to the Euler-Fourier Formulas (38)-(40) for the coefficients \(a_{k}\) and \(b_{k}\). namespace P070501  { class cP070501  { static void Main(string[] args)  { const int NS = 33; // signal counter quantity  const int NF = 16; // frequency quantity in a counter  Console.WriteLine(\"NS = {0} NF = {1}\", NS, NF);  double[] s0 = new double[NS]  {  0.905, 1.269, 1.072, 0.233, \(-\)1.176, 0.236,  1.624, \(-\)0.231, 1.910, \(-\)0.905, \(-\)0.832, \(-\)0.131,  0.531, \(-\)0.122, 1.929, \(-\)1.879, 1.449, \(-\)1.981,  0.709, \(-\)0.742, 1.268, 1.392, 1.968, \(-\)1.869,  0.800, 0.105, 1.736, 0.750, 0.187, \(-\)1.676,  \(-\)1.252, \(-\)0.187, \(-\)0.811,  ];  Console.WriteLine(\"S0 = \");  for (int i = 1; i <= NS; i++)  { Console.Write(\"[0,8:F3]\", s0[i-1]);  if (i % 6 == 0) Console.WriteLine();  }  Console.WriteLine();  double[] AF = new double[NF + 1];  double[] phiF = new double[NF + 1];  Fourier(NS, NF, s0, AF, phiF);  Console.WriteLine(\"AFourier =\");  for (int i = 1; i <= NF + 1; i++)  { Console.Write(\"[0,8:F3]\", AF[i - 1]);  if (i % 6 == 0) Console.WriteLine();  }  Console.WriteLine();  Console.ReadKey(); // result viewing  } //------------------------------------------------ static void Fourier(int NS, int NF, double[] s,  double[] AF, double[] phiF)  { double a, b;  for (long k = 1; k <= NF; k++)  { a = 0.0; // cosine coefficients  b = 0.0; // sine coefficients  double w1 = 1.0;  double dx = 2.0 * Math.PI / NS;  for (long i = 0; i < NS; i++)  { double x = i * dx;a+=s[i]*Math.Cos(k*w1*x); b+=s[i]*Math.Sin(k*w1*x); } a=a*2.0/NS; b=b*2.0/NS; AF[k]=Math.Sqrt(a*a+b*b); phiF[k]=Math.Asin(a/AF[k]); } //------------------------------------------------ } } After executing the program _P070501_ the following outcome shows up.