Have a personal or library account? Click to login
Computer Simulation of Calculation Frequency Deviation from Odd Frequency Spectrum Cover

Computer Simulation of Calculation Frequency Deviation from Odd Frequency Spectrum

By: Peter Andris and  Ivan Frollo  
Open Access
|Jan 2026

Full Article

1.
Introduction

A very important tool in processing signals from nuclear magnetic resonance (NMR) experiments is the Fourier transform [1]–[2]. Since signals from NMR experiments are processed as discrete quantities, the Fourier transform must also be discrete. The authors of [3] stabilized the static magnetic field of an experimental NMR tomograph, and the knowledge obtained was useful for other NMR experiments. The authors of [4] worked on a static magnetic field standard and used an unused Bruker Minispec device in their experiments. The research also investigated the method of measuring the static magnetic field using the odd frequency spectrum. It was only a marginal area of research, which should be explored further in this study. Publication [5] describes the properties and solutions of static magnetic field measurement using the even frequency spectrum. The disadvantage of this method is that the maximum of the spectrum is displayed twice. Nevertheless, this method of NMR signal processing can also be effectively used in static magnetic field measurement. The authors of [6] describe an improvement to the NMR method they used. Publications [7]–[8] are recommended for beginners who want to focus on instrumentation in NMR experiments. The frequency of the NMR signal depends not only on the measured substance (mostly hydrogen) but also on the compound in which the substance is found. A typical example is hydrogen in water or in fat. The authors of [9] present a method to distinguish hydrogen in water from hydrogen in fat, which is important in medicine. The authors of [10] present a method for measuring the magnetic field of small coils using NMR technology. The authors of [11] measure and compare several coils that can be used for NMR experiments. The authors of [12] present a less common NMR method for an NMR experiment. Not every method is suitable for every scanner; suitability depends mainly on the magnetic induction of the static magnetic field and other parameters of the NMR instrument. Although it may not seem so at first glance, an NMR (or optical) experiment is also a method of measurement, and the result is usually an image.

The authors of [13] reflect on the importance of measurement in scientific research. Measurement is not only a scientific method under investigation but is also used by other scientific methods, not only in the natural sciences. Therefore, it can be said without exaggeration that scientific research cannot be done without measurement, that is, measurement is the science of sciences. The main goal of this research is to deepen knowledge about the measurement of a static magnetic field, while using the odd frequency spectrum of the signal measured by the NMR technique. The main method is computer simulation, which is convenient because the desired result is known. It is only necessary to determine how to obtain it.

2.
Subject & Methods

A specially developed probe is used for the measurement, with a small water sample at its core. Protons in the water, when placed in a static magnetic field, precess at a frequency that depends on the magnetic induction. Essentially, they perform two movements: they rotate around their axis at a huge speed and, in addition, they precess. This principle is used in NMR operations and in measuring the magnetic induction of a static magnetic field. A high-frequency pulse excites the rotating protons, causing their axes to be deflected by an angle that depends on the energy of the high-frequency pulse and other factors. After the high-frequency pulse ends, the excited protons return to their original positions and at the same time radiate RF energy, which also contains information about the value of the induction of the static magnetic field. This is the essence of the described experiments.

The signal obtained from the excited sample is processed in various ways to achieve the final result: the value of the magnetic induction of the applied static magnetic field. The experimental procedure is shown in Fig. 1.

Fig. 1.

Procedure of the simulated experiment. The labels (a), (b), (c), and (d) correspond to those in Fig. 3. and Fig. 5.

The signal from the NMR experiment, a1, is simulated using a harmonic signal with frequency f1 = 10000 Hz ± Δf1. It is the deviation Δf1 that is the sought-after quantity. So far, it is a real quantity. To transform it into a complex quantity, a1 is mixed with two harmonic signals, b1 and b2, with b2 phase-shifted by π/2 relative to b1(cos[α + π/2] = −sin[α]). This produces the real and imaginary components of the complex signal. Mixing two signals with a balanced mixer mathematically corresponds to multiplying the signals. The complex time signal is processed by Fourier transformation. The frequency samples obtained in this way already contain the desired frequency information. The frequency samples of the asymmetric spectrum c, ranging from 1 to N, are transformed into a symmetric one from −N/2 to +N/2 (Fig. 2).

Fig. 2.

Transformations of indices. After FT, the positions of the samples also change; in the latter case, only the indices (blue color) are affected.

However, for further calculations, it is advantageous to arrange the samples symmetrically, but process them as asymmetric, maintaining their order as for symmetric samples, i.e., from 0 to N (blue font in Fig. 2). The spectrum of the signal from the Fourier transformation (1 to N) is divided into two halves, their positions are swapped, and their designation is changed to (−N/2 to +N/2). A sample with value 0 is added to the center of the spectrum, and the sample designations are changed to asymmetric 0 to N. It is necessary to find the maxima and minima of the signal c. The maximum of the real component m is calculated directly (Fig. 3(a)).

Fig. 3.

Components of the complex spectrum and their suitability for further calculation: (a) Real, (b) and (c) Imaginary, and (d) Absolute value. Typical shape, close to the expected result. The discrete nature of the signals has been suppressed for better clarity.

The situation is more complicated for the imaginary component, as m can be calculated using either the maximum or minimum of c. Finding a compromise value would unnecessarily complicate the calculation if accuracy is to be maintained (Fig. 3(b), Fig. 3(c)).

Finding the frequency value for the component that crosses the zero axis is more difficult than it appears, because the signal is discrete. Moreover, for small signals (Fig. 3(c)) this component of the spectrum c exhibits a certain DC component.

It is obvious that calculation accuracy is best preserved by starting from the maximum or minimum. From the maximum of the spectrum, the position of the resulting frequency A is calculated (Fig. 1, Fig. 3(d)), even for the absolute value of the spectrum c. In all cases, the frequency A must be calibrated using the value f0. Its meaning is shown in Fig. 4.

Fig. 4.

Finding the frequency f0.

For each method of determining frequency A, the value f0 must be determined separately.

3.
Results

The results for all three calculation methods (real or imaginary component, absolute value of the spectrum) are shown in Fig. 5.

Fig. 5.

Calculation of frequencies A using three components of the spectrum: (a) Real, (b) Imaginary, (c) Absolute value.

The waveforms of the resulting quantity can generally be characterized by the phrase “partially continuous”. An auxiliary calculation using the “If” instruction (Fig. 1) can help. If the auxiliary frequency A is less than or equal to −10000, its value must be adjusted to −20000–A. Otherwise, A remains unchanged. The result is marked Δf2 (Fig. 1). Theoretically, it should closely match the input deviation Δf1. From Fig. 5(b), it is clear that the imaginary component of the spectrum is least affected; in this case, no additional adjustment would be necessary for some applications.

4.
Discussion / Conclusions

This research did not provide an answer to the question of why the “partial continuity” error occurs. However, it provided a simple way to remove it, if needed, without reducing accuracy. The use of the “If” instruction appears straight-forward, but it can also present challenges. In our case, when using a higher, “human-friendly” programming language, it was not possible to build it into the calculation. Testing the method with a suitable “machine-friendly” programming language may be a suitable task in the future. A distinctive feature of this approach, compared to calculating the frequency deviation using the even spectrum [5], is that zero is absolute here. In the even spectrum, zero was only relative, and its position could be changed as needed. It is not possible to determine which method is more advantageous. It depends on the specific problem. The simulation was performed using a "human-friendly" programming language (Wolfram Research, Mathematica, v. 12.3). Some procedures may differ if another language is used.

Language: English
Page range: 10 - 13
Submitted on: Jun 26, 2025
|
Accepted on: Nov 10, 2025
|
Published on: Jan 5, 2026
In partnership with: Paradigm Publishing Services
Publication frequency: Volume open

© 2026 Peter Andris, Ivan Frollo, published by Slovak Academy of Sciences, Institute of Measurement Science
This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 License.