Rotary 3D Magnetic Field Scanner for the Research and Minimization of the Magnetic Field of UUV

Research on the value and nature of physical quantities allows for a detailed understanding of the conditions in the studied area, and the quality and precision of the final conclusions depend on the accuracy of the measurements. In order to increase the accuracy of measurements, the measurement infrastructure and unmanned vehicles used during the observation should introduce the lowest possible disturbance–they should be minimized in terms of the magnetic field. This article presents a solution based on the infrastructure model and the development of a method using polynomial regression to study the magnetic field in three dimensions (3D-longitudinal X, transverse Y, and vertical Z components). The test stand consists of an Arduino Mega microcontroller, a rotary table driven and controlled by a stepper motor, a touch display whose task is to control the magnetic field measurement parameters and display 3D data, and proprietary software made in the Python programming language. The structural elements of the stand model were produced by an additive method using a 3D printer. The presented solution belongs to the group of modern technological solutions known as the technology of low object detection (stealth technology or low observable technology).


Introduction
The most of the world's navies have the infrastructure for precise three-axis magnetic field measurement of ships and marine equipment, ROVs and UUVs, and surface USVs [1]. This measurement is usually carried out by two methods, related to the fact that the magnetic, electric, hydroacoustic, and hydrodynamic fields (signatures) are measured simultaneously: • Measurement using special infrastructure on land: only the magnetic field (and partial airborne equipment acoustic testing [2]), as the other fields require the presence of a water medium; • Measurement in the sea on special measurement ranges, where the ship's route is marked with buoys or guides and supported by GPS systems (measuring equipment is placed on the bottom of the sea basin or mounted on AUVs [3,4]).
An example of a comparative measurement of the magnetic field at the WTD71 test site in Aschau, Germany, is shown in Figure 1. The infrastructure described above is very expensive, and research conducted using it both on land and at sea is expensive and timeconsuming. These tests are usually carried out in order to ensure low detectability of ships and underwater vehicles and protection against the mine threat, and this is called passive defense of the ship. Usually, test reports are classified. Currently, the use of submersible vehicles goes far beyond military applications to many civilian applications, which will be briefly discussed below. Current electronic and IT technologies enable access to the development of tools for much cheaper and less time-consuming measurement of the magnetic field of underwater vehicles, their parts, and equipment. The development of robotic technologies over the last decades has led to a broadening of the scope of research and environmental observations [5]. Numerous applications of UXV unmanned systems can provide valuable data, for example, by UUV in a hard-tostudy marine environment [6] due to, for example, turbidity in the water or objects buried in the bottom or hidden in silt. Important areas are clearance of contaminated sites in the sea like clearance of unexploded ordnance and chemical munitions [7] and electromagnetic fields (EMF), which determine the exposure of marine organisms to magnetic and induced electric fields from undersea power cables: (1) the amount of electrical current being carried by the cable, (2) the design of the cable, and (3) the distance of marine organisms from the cable [8] and use of magnetometers in underwater archaeology [9].
Various types of sensors are used in these tests, such as magnetic field sensors (3D or one axis, north indicator), cameras, thermometers, as well as hydro acoustics (e.g., echosounders, sonars, hydrophones), pressure, or electric field sensors. All these physical quantities improve our understanding of the conditions prevalent in an area under study, while the quality and precision of the final conclusions depend on the accuracy of the measurements. To increase measurement accuracy, the measurement infrastructure and unmanned vehicles used during the observation should cause the least possible disturbance [10].
The focus of this work was the magnetic field, and a model of a test stand for measuring magnetic properties of materials is suggested, which may be used to build unmanned vehicles for research and environmental observation in the future. The purpose of this stand is to gain experience and test the applied solutions that can be used in the future during the construction of a full-scale UUV test stand.
The magnetic field is a state of space where forces act on objects with a non-zero magnetic moment, such as permanent magnets, and on moving electric charges such as electrons. Our everyday natural source of magnetic field is the Earth [11]. In addition, magnetic minerals such as magnetite and metal ores such as iron also produce a natural magnetic field. By placing a ferromagnetic material in a magnetic field, the magnetic domains in the material align with the direction of the external magnetic field, thereby amplifying it. After the disappearance of the external magnetic field, the magnetization of the material remains, maintaining the field [12]. Disturbances in the natural magnetic field are used to detect invisible objects with ferromagnetic properties, e.g., buried mines. The development of robotic technologies over the last decades has led to a broadening of the scope of research and environmental observations [5]. Numerous applications of UXV unmanned systems can provide valuable data, for example, by UUV in a hard-tostudy marine environment [6] due to, for example, turbidity in the water or objects buried in the bottom or hidden in silt. Important areas are clearance of contaminated sites in the sea like clearance of unexploded ordnance and chemical munitions [7] and electromagnetic fields (EMF), which determine the exposure of marine organisms to magnetic and induced electric fields from undersea power cables: (1) the amount of electrical current being carried by the cable, (2) the design of the cable, and (3) the distance of marine organisms from the cable [8] and use of magnetometers in underwater archaeology [9].
Various types of sensors are used in these tests, such as magnetic field sensors (3D or one axis, north indicator), cameras, thermometers, as well as hydro acoustics (e.g., echosounders, sonars, hydrophones), pressure, or electric field sensors. All these physical quantities improve our understanding of the conditions prevalent in an area under study, while the quality and precision of the final conclusions depend on the accuracy of the measurements. To increase measurement accuracy, the measurement infrastructure and unmanned vehicles used during the observation should cause the least possible disturbance [10].
The focus of this work was the magnetic field, and a model of a test stand for measuring magnetic properties of materials is suggested, which may be used to build unmanned vehicles for research and environmental observation in the future. The purpose of this stand is to gain experience and test the applied solutions that can be used in the future during the construction of a full-scale UUV test stand.
The magnetic field is a state of space where forces act on objects with a non-zero magnetic moment, such as permanent magnets, and on moving electric charges such as electrons. Our everyday natural source of magnetic field is the Earth [11]. In addition, magnetic minerals such as magnetite and metal ores such as iron also produce a natural magnetic field. By placing a ferromagnetic material in a magnetic field, the magnetic domains in the material align with the direction of the external magnetic field, thereby amplifying it. After the disappearance of the external magnetic field, the magnetization of the material remains, maintaining the field [12]. Disturbances in the natural magnetic field are used to detect invisible objects with ferromagnetic properties, e.g., buried mines.

Description of the Test Stand
The stand used to carry out the measurements is a model of a stand that is scalable, and the experience gained will be used to build a full-scale measuring stand for studying the magnetic induction distribution of unmanned vehicles, their components, and electrical devices. The stand ( Figure 2) consists of (1) a rotating base on which the tested object is placed, (2) a sensor located on an adjustable handle (at an adjustable height and distance from the center of the rotating base, (3) a ruler indicating the measurement distance to the center of the rotating base, (4) a stepper motor with a belt driving the rotary stand, and (5) a central module with a display that controls the operation of the device. The solution is based on earlier solutions for monitoring selected physical quantities in real time [13,14].

Description of the Test Stand
The stand used to carry out the measurements is a model of a stand that is scalable, and the experience gained will be used to build a full-scale measuring stand for studying the magnetic induction distribution of unmanned vehicles, their components, and electrical devices. The stand ( Figure 2) consists of (1) a rotating base on which the tested object is placed, (2) a sensor located on an adjustable handle (at an adjustable height and distance from the center of the rotating base, (3) a ruler indicating the measurement distance to the center of the rotating base, (4) a stepper motor with a belt driving the rotary stand, and (5) a central module with a display that controls the operation of the device. The solution is based on earlier solutions for monitoring selected physical quantities in real time [13,14].  (2), the ruler marking the distance from the center of the rotating base (3), the stepper motor with a drive belt (4), the control module with a display (5), and the tested toroidal magnet (6).
A three-axis magnetic induction sensor LIS3MDL [15], made in MEMS technology using the Hall effect, was used as the magnetic field sensor (the magnetic sensor can be selected depending on the needs). It has configurable scopes of measurement in the range of ±400 μT, ±800 μT, ±1200 μT, and ±1600 μT. The magnetometer has a built-in 16-bit analog-to-digital converter (ADC). The highest measurement accuracy possible is in the measuring range of ±400 μT; in this range, the measurement resolution is 0.012 μT [16]. The device has two operating modes: automatic and graphic ( Figure 3). By using a rotating base, in automatic mode, measurements are made in the range of 360° in 9° increments, while the device is operated and data are recorded without the involvement of an operator. Measurements are made five times in the full base rotation range, which results in five full rotations of the tested object in relation to the magnetometer. Each measurement is saved on an SD memory card.
The graphic mode enables the magnetic induction values to be displayed in real time ( Figure 4) in three measurement axes and the data to be saved on a memory card. The rotating stand is then inactive, and the operator himself decides when to start and stop recording the measured values. Before the device starts running, a configuration window appears where the user selects the measuring ranges, operating mode and sampling frequency. The option to select the sampling frequency is available only when working in Figure 2. The measuring stand with individual elements distinguished: the rotating stand (1), the magnetometer on an adjustable holder (2), the ruler marking the distance from the center of the rotating base (3), the stepper motor with a drive belt (4), the control module with a display (5), and the tested toroidal magnet (6).
A three-axis magnetic induction sensor LIS3MDL [15], made in MEMS technology using the Hall effect, was used as the magnetic field sensor (the magnetic sensor can be selected depending on the needs). It has configurable scopes of measurement in the range of ±400 µT, ±800 µT, ±1200 µT, and ±1600 µT. The magnetometer has a built-in 16-bit analog-to-digital converter (ADC). The highest measurement accuracy possible is in the measuring range of ±400 µT; in this range, the measurement resolution is 0.012 µT [16]. The device has two operating modes: automatic and graphic ( Figure 3). By using a rotating base, in automatic mode, measurements are made in the range of 360 • in 9 • increments, while the device is operated and data are recorded without the involvement of an operator. Measurements are made five times in the full base rotation range, which results in five full rotations of the tested object in relation to the magnetometer. Each measurement is saved on an SD memory card.
The graphic mode enables the magnetic induction values to be displayed in real time ( Figure 4) in three measurement axes and the data to be saved on a memory card. The rotating stand is then inactive, and the operator himself decides when to start and stop recording the measured values. Before the device starts running, a configuration window appears where the user selects the measuring ranges, operating mode and sampling frequency. The option to select the sampling frequency is available only when working in graphic mode, since it presents the current waveforms of changes in the field value in real time. The possible sampling frequencies are 0.625 Hz, 20 Hz, 80 Hz, and 155 Hz. graphic mode, since it presents the current waveforms of changes in the field value in real time. The possible sampling frequencies are 0.625 Hz, 20 Hz, 80 Hz, and 155 Hz.
The sensor and other electronic components are integrated with the Arduino Mega platform, and the entire measuring system is controlled by a proprietary program written in the Arduino language.  Most of the stand's elements were made via PLA 3D printing because it is a nonmagnetic material, thereby restricting measurement errors from the measuring stand. The stepper motor (Figure 2 (4)) is extended so far that it does not affect the measured values.

Research Methods
The method used to determine the distribution of magnetic induction of magnetic objects, which is based on measurements at several selected points at any distance from the measuring range and on calculations using polynomial regression, is presented below using ferrite permanent magnets, commonly used as a compromise between financial and technical considerations. Selected values of the parameters characterizing ferrite magnets are presented in Table 1: graphic mode, since it presents the current waveforms of changes in the field value in real time. The possible sampling frequencies are 0.625 Hz, 20 Hz, 80 Hz, and 155 Hz.
The sensor and other electronic components are integrated with the Arduino Mega platform, and the entire measuring system is controlled by a proprietary program written in the Arduino language.  Most of the stand's elements were made via PLA 3D printing because it is a nonmagnetic material, thereby restricting measurement errors from the measuring stand. The stepper motor (Figure 2 (4)) is extended so far that it does not affect the measured values.

Research Methods
The method used to determine the distribution of magnetic induction of magnetic objects, which is based on measurements at several selected points at any distance from the measuring range and on calculations using polynomial regression, is presented below using ferrite permanent magnets, commonly used as a compromise between financial and technical considerations. Selected values of the parameters characterizing ferrite magnets are presented in Table 1: The sensor and other electronic components are integrated with the Arduino Mega platform, and the entire measuring system is controlled by a proprietary program written in the Arduino language.
Most of the stand's elements were made via PLA 3D printing because it is a nonmagnetic material, thereby restricting measurement errors from the measuring stand. The stepper motor (Figure 2 (4)) is extended so far that it does not affect the measured values.

Research Methods
The method used to determine the distribution of magnetic induction of magnetic objects, which is based on measurements at several selected points at any distance from the measuring range and on calculations using polynomial regression, is presented below using ferrite permanent magnets, commonly used as a compromise between financial and technical considerations. Selected values of the parameters characterizing ferrite magnets are presented in Table 1: Table 1. Selected parameters of ferrite magnets [17,18]. Measurements were made in the laboratory at room temperature (~21 • C), and the magnets were placed directly on the rotating base ( Figure 2 (1)). The relationship between the magnetic induction B and the magnetic field strength H depends on the medium in which the magnetic field is present, as described by Equation (1). The magnetic permeability of a vacuum is a physical constant µ 0 , while the relative magnetic permeability of the medium µr characterizes the medium in which the magnetic field is present. For water and air it is assumed that µ r = 1.0 [11].

Symbol of the Material
The measuring stand has an automatic mode for taking measurements. Before starting the operation of the device, the tested system of magnets was placed on a rotating stand, described in more detail later in this work. The system was placed in such a way that the rotation of the base was as symmetrical as possible and there were no significant changes in the distance between the system and the magnetometer caused by the rotation of the base. In the automatic operating mode, the base rotates 360 • 5 times in 9 • steps, and each measurement is saved on the SD card. After making five series of measurements for one position of the magnetometer, the sensor was moved to the next measurement position, and the process of five series of measurements was performed again. The distances at which the measurements were made were, respectively, 6 cm, 7 cm, 8 cm, 9 cm, 10 cm, 11 cm, 12 cm, and 15 cm from the center of the rotating base. Measuring ranges at each distance were selected so as to obtain the highest measurement accuracy without exceeding the allowable measuring range. With the increase in the distance, the measuring range decreased, because the measured magnetic induction reached a lower value. The same steps should be repeated for the magnets or devices selected for testing. The measurement scheme is shown in Figure 5.

Calculation Method
Non-linear regression is a method that approximates an unknown function ( ) using an estimator. The estimator can be any polynomial function p(x), n-of degree (Equation (2)). It boils down to determining the coefficients of the polynomial in such a way as to reproduce the course of the function ( ) as precisely as possible, i.e., to minimize the error R. The least squares method (Equation (4)) is most often used as a measure of the error R. Given the values of the function ( ) for the known arguments and the calculated values of the estimator values at these points, the difference between the squares of both values is determined, and then the sum of the differences from each known point is made.
The above formula can be represented as a sum and takes the form: The method of least squares used to determine the error takes the form:

Calculation Method
Non-linear regression is a method that approximates an unknown function f (x) using an estimator. The estimator can be any polynomial function p(x), n-of degree (Equation (2)). It boils down to determining the coefficients of the polynomial in such a way as to reproduce the course of the function f (x) as precisely as possible, i.e., to minimize the error R. The least squares method (Equation (4)) is most often used as a measure of the error R. Given the values of the function f (x) for the known arguments x i and the calculated values of the estimator values at these points, the difference between the squares of both values is determined, and then the sum of the differences from each known point is made.
p(x) = a n x n + a n−1 x n−1 + . . . + a 1 x + a 0 The above formula can be represented as a sum and takes the form: The method of least squares used to determine the error takes the form: where: ϕ(x) is the approximating function; and f (x) is the approximated function.
Depending on the degree of the polynomial, the regression can be linear or non-linear. Linear regression uses a zero or first order polynomial, and the effect is to determine the approximating function ϕ(x) in the form of a linear function. In order to approximate more complex functions, higher degree polynomials are used, which allow for more accurate determination of the value of the function f (x) and minimization of the error R ( Figure 6) [19]. Depending on the degree of the polynomial, the regression can be linear or non-linear. Linear regression uses a zero or first order polynomial, and the effect is to determine the approximating function ( ) in the form of a linear function. In order to approximate more complex functions, higher degree polynomials are used, which allow for more accurate determination of the value of the function ( ) and minimization of the error R ( Figure 6) [19]. The polynomial regression method was chosen to estimate the distribution of the magnetic field induction due to the heterogeneous nature of the field generated by the tested objects. For each angle of rotation α of the rotating base, an approximation polynomial is determined on the basis of measurements made at m measuring distances for a given angle α. Then, using the determined polynomials, the value of magnetic induction at any distance from the center of the rotating base is calculated. In this way, the induction distribution in the range of 360° is determined in steps of 9°. For calculations and visualization of measurements, a Python script was written using the described method of polynomial regression to determine the magnetic induction of the field at a distance r from the center of the tested object. The data flow is shown in Figure 7.
The first stage of the algorithm is to calculate the resultant value of magnetic induction based on the measured values in three measurement axes in accordance with Equation (5) [11]. where: is  The polynomial regression method was chosen to estimate the distribution of the magnetic field induction due to the heterogeneous nature of the field generated by the tested objects. For each angle of rotation α of the rotating base, an approximation polynomial is determined on the basis of measurements made at m measuring distances for a given angle α. Then, using the determined polynomials, the value of magnetic induction at any distance from the center of the rotating base is calculated. In this way, the induction distribution in the range of 360 • is determined in steps of 9 • . For calculations and visualization of measurements, a Python script was written using the described method of polynomial regression to determine the magnetic induction of the field at a distance r from the center of the tested object. The data flow is shown in Figure 7.
The first stage of the algorithm is to calculate the resultant value of magnetic induction based on the measured values in three measurement axes in accordance with Equation (5) [11].
where: magnetic induction values, and the standard deviation of the measurements is calculated. The data obtained in this way form a table in which the number of rows corresponds to the number of measurement distances m, while the number of columns is equal to k, and the number of positions of the rotary base for which the measurements were made. In the next stage of the algorithm, the data prepared in this way are used to determine the coefficients a n and the approximating polynomial of the n th degree. For this purpose, l measurement values are selected from m available values from each column of the table, in which measurements for one angle α are stored. On the basis of these values, a polynomial approximating the magnetic induction distribution as a function of the distance from the base center is determined for each value of the rotation angle α. For this purpose, the polyfit method available in the numpy library [20] was used, which implements the nth degree polynomial approximation method using the least squares error minimization described earlier. distance from the center of the base rp. The averaging process is performed for all measured magnetic induction values, and the standard deviation of the measurements is calculated. The data obtained in this way form a table in which the number of rows corresponds to the number of measurement distances m, while the number of columns is equal to k, and the number of positions of the rotary base for which the measurements were made. In the next stage of the algorithm, the data prepared in this way are used to determine the coefficients and the approximating polynomial of the n th degree. For this purpose, l measurement values are selected from m available values from each column of the table, in which measurements for one angle α are stored. On the basis of these values, a polynomial approximating the magnetic induction distribution as a function of the distance from the base center is determined for each value of the rotation angle α. For this purpose, the polyfit method available in the numpy library [20] was used, which implements the nth degree polynomial approximation method using the least squares error minimization described earlier. On the basis of the obtained approximating polynomials, the values of the magnetic induction of the tested object at distances of 6 cm-15 cm from the center of the base were determined, which are presented in the next section in the form of 3D diagrams prepared using the library matplotlib.

Study of the Influence of the Degree of the Approximating Polynomial on the Quality of the Obtained Results
When approximating the distribution based on the measured values of the magnetic field, the degree of the approximating polynomial has a large impact on the quality of mapping the value of the field generated by the tested object. The measurements referred to in this article were carried out at eight measurement distances, of which three values were used as controls, which means that they were not used during the determination of the polynomial. In order to select the degree of the polynomial, an iterative method was used consisting of determining several polynomials of the second, third, and fourth degree. Based on the obtained results, the fourth-degree polynomial was selected because it most accurately reproduced the course of values at the control points, which is shown in Figure 8. On the basis of the obtained approximating polynomials, the values of the magnetic induction of the tested object at distances of 6 cm-15 cm from the center of the base were determined, which are presented in the next section in the form of 3D diagrams prepared using the library matplotlib.

Study of the Influence of the Degree of the Approximating Polynomial on the Quality of the Obtained Results
When approximating the distribution based on the measured values of the magnetic field, the degree of the approximating polynomial has a large impact on the quality of mapping the value of the field generated by the tested object. The measurements referred to in this article were carried out at eight measurement distances, of which three values were used as controls, which means that they were not used during the determination of the polynomial. In order to select the degree of the polynomial, an iterative method was used consisting of determining several polynomials of the second, third, and fourth degree. Based on the obtained results, the fourth-degree polynomial was selected because it most accurately reproduced the course of values at the control points, which is shown in Figure 8. In order to determine the accuracy of the approximation depending on the degree of the polynomial, the relative errors (Figure 9) of the fit of the function to the measurement points presented in Figure 8 were calculated. On this basis, the fourth degree of the polynomial was selected as the function that most accurately represented the measurement points; the relative error does not exceed 3.2%.

Study of the Impact of Data Selection on the Quality of the Approximating Polynomial
The measurements carried out provided a large number of measured values, which then need to be processed. The data recorded by the sensor consists of a three-dimensional array of 5 × k × m, where k is the number of all positions of the angle of rotation α and m In order to determine the accuracy of the approximation depending on the degree of the polynomial, the relative errors (Figure 9) of the fit of the function to the measurement points presented in Figure 8 were calculated. On this basis, the fourth degree of the polynomial was selected as the function that most accurately represented the measurement points; the relative error does not exceed 3.2%. In order to determine the accuracy of the approximation depending on the degree of the polynomial, the relative errors (Figure 9) of the fit of the function to the measurement points presented in Figure 8 were calculated. On this basis, the fourth degree of the polynomial was selected as the function that most accurately represented the measurement points; the relative error does not exceed 3.2%.

Study of the Impact of Data Selection on the Quality of the Approximating Polynomial
The measurements carried out provided a large number of measured values, which then need to be processed. The data recorded by the sensor consists of a three-dimensional array of 5 × k × m, where k is the number of all positions of the angle of rotation α and m

Study of the Impact of Data Selection on the Quality of the Approximating Polynomial
The measurements carried out provided a large number of measured values, which then need to be processed. The data recorded by the sensor consists of a three-dimensional array of 5 × k × m, where k is the number of all positions of the angle of rotation α and m is the number of measurement distances at which the measurements were made. According to the previously discussed scheme, the first stage of calculations focuses on determining the average values at each point based on five measurements. After averaging these values, a two-dimensional k × m matrix is obtained. In order to demonstrate the impact of the selection of measurement points on the quality of estimation of the measured magnetic induction distribution, data for the rotation angle of 27 • were selected from the calculated average values, presented in Table 2. The impact of data selection on the quality of the approximating polynomial is shown in Figure 10. Three approximated waveforms based on different learning vectors have been presented, it can be seen that the green approximating waveform covering five points from the entire range of measurement distances most accurately reflects the waveform obtained from the measurement values. is the number of measurement distances at which the measurements were made. According to the previously discussed scheme, the first stage of calculations focuses on determining the average values at each point based on five measurements. After averaging these values, a two-dimensional k × m matrix is obtained. In order to demonstrate the impact of the selection of measurement points on the quality of estimation of the measured magnetic induction distribution, data for the rotation angle of 27° were selected from the calculated average values, presented in Table 2. The impact of data selection on the quality of the approximating polynomial is shown in Figure 10. Three approximated waveforms based on different learning vectors have been presented, it can be seen that the green approximating waveform covering five points from the entire range of measurement distances most accurately reflects the waveform obtained from the measurement values.

Study of the Toroidal Magnet
In order to verify the rotary 3D magnetic field scanner and estimate the obtained accuracy of the determination of the 3D magnetic induction, measurements were carried out with the use of a toroidal permanent magnet. Measurements were performed in the range of 360° every 9°, and the obtained results were saved on a memory card and calculated using the previously described method.

Study of the Toroidal Magnet
In order to verify the rotary 3D magnetic field scanner and estimate the obtained accuracy of the determination of the 3D magnetic induction, measurements were carried out with the use of a toroidal permanent magnet. Measurements were performed in the range of 360 • every 9 • , and the obtained results were saved on a memory card and calculated using the previously described method.
The ferrite toroidal magnet was placed on the test stand as shown in Figure 2 (6). Magnetic induction measurements were made at a distance of 6 cm, 7 cm, 8 cm, 9 cm, 10 cm, 11 cm, 12 cm, and 15 cm from the center of the rotating base.
According to the diagram discussed in the previous section, the mean scalar values were determined for each series of measurements performed at select measuring distances. The results are shown in Figures 11-15. The ferrite toroidal magnet was placed on the test stand as shown in Figure 2 (6). Magnetic induction measurements were made at a distance of 6 cm, 7 cm, 8 cm, 9 cm, 10 cm, 11 cm, 12 cm, and 15 cm from the center of the rotating base.
According to the diagram discussed in the previous section, the mean scalar values were determined for each series of measurements performed at select measuring distances. The results are shown in Figures 11-15.     The ferrite toroidal magnet was placed on the test stand as shown in Figure 2 (6). Magnetic induction measurements were made at a distance of 6 cm, 7 cm, 8 cm, 9 cm, 10 cm, 11 cm, 12 cm, and 15 cm from the center of the rotating base.
According to the diagram discussed in the previous section, the mean scalar values were determined for each series of measurements performed at select measuring distances. The results are shown in Figures 11-15.    The ferrite toroidal magnet was placed on the test stand as shown in Figure 2 (6). Magnetic induction measurements were made at a distance of 6 cm, 7 cm, 8 cm, 9 cm, 10 cm, 11 cm, 12 cm, and 15 cm from the center of the rotating base.
According to the diagram discussed in the previous section, the mean scalar values were determined for each series of measurements performed at select measuring distances. The results are shown in Figures 11-15.          For the rest of the calculations, the measurements taken at a distance of 6 cm, 8 cm, 10 cm, 12 cm, and 15 cm from the center of the base were selected. The values of the magnetic induction were calculated, and the comparison of the calculated values with the measured values is presented in Figures 16 and 17.
In order to assess the accuracy of the method and the representation of the actual measured values, the relative error of each of the estimated waveforms as a function of the stand rotation angle was calculated ( Figure 18  In order to assess the accuracy of the method and the representation of the actual measured values, the relative error of each of the estimated waveforms as a function of the stand rotation angle was calculated ( Figure 18).  In order to assess the accuracy of the method and the representation of the actual measured values, the relative error of each of the estimated waveforms as a function of the stand rotation angle was calculated ( Figure 18). On the basis of the determined approximating functions, the distribution of the magnetic induction of the tested object can also be presented in a three-dimensional form. Figures 19 and 20 present a summary of the measured values (marked with dots) and a threedimensional distribution of magnetic induction components in the form of a three-dimen- On the basis of the determined approximating functions, the distribution of the magnetic induction of the tested object can also be presented in a three-dimensional form. Figures 19 and 20 present a summary of the measured values (marked with dots) and a three-dimensional distribution of magnetic induction components in the form of a threedimensional surface. Tables 3-6 present numerical data from the measurements of the magnetic field of the toroidal magnet. On the basis of the determined approximating functions, the distribution of the magnetic induction of the tested object can also be presented in a three-dimensional form. Figures 19 and 20 present a summary of the measured values (marked with dots) and a threedimensional distribution of magnetic induction components in the form of a three-dimensional surface. Tables 3-6 present numerical data from the measurements of the magnetic field of the toroidal magnet.    6.0 cm 7.0 cm 8.0 cm 9.0 cm 10.0 cm 11.0 cm 12.0 cm 15.0        On the basis of the conducted research, it can be concluded that the detection range of ferromagnetic objects, which are most often used in the marine environment, is comparable to the size of this object.

Study of a Group of Magnets Arranged in Irregular Form
According to the methods of magnetic field measurement and polynomial approximation described above, the distribution of the magnetic field of the system of several permanent magnets presented in Figure 21 was determined.
The comparison of the obtained results of the estimated and measured values for the system of magnets shown in Figure 21 is shown in Figures 22 and 23.
In order to assess the quality of the approximation, the value of the relative error was calculated, shown in Figure 24 in the form of a bar graph, for each control distance as a function of the base rotation angle. of ferromagnetic objects, which are most often used in the marine environment, is comparable to the size of this object.

Study of a Group of Magnets Arranged in Irregular Form
According to the methods of magnetic field measurement and polynomial approximation described above, the distribution of the magnetic field of the system of several permanent magnets presented in Figure 21 was determined.

Study of a Group of Magnets Arranged in Irregular Form
According to the methods of magnetic field measurement and polynomial approximation described above, the distribution of the magnetic field of the system of several permanent magnets presented in Figure 21 was determined.   In order to assess the quality of the approximation, the value of the relative error was calculated, shown in Figure 24 in the form of a bar graph, for each control distance as a function of the base rotation angle.  In order to assess the quality of the approximation, the value of the relative error was calculated, shown in Figure 24 in the form of a bar graph, for each control distance as a function of the base rotation angle.          Table 8. Estimated values of the B y component of magnetic induction as a function of rotation angle and measurement distance.   Table 10. Estimated values of the B component of magnetic induction as a function of rotation angle and measurement distance. Based on the data in Table 6 (regular toroidal shape of the magnet) and Table 10 (irregular shape of the set of magnets), it can be seen that for the doubled measuring distance (between 6 cm and 12 cm) there is a tenfold decrease in the value of the total magnetic induction B, which means that at this distance, an object with magnetic properties is much more difficult to detect.

Conclusions
At present, measurements of the physical fields (magnetic, pressure, seismic, acoustic, and electric) of UUV underwater unmanned vehicles are not commonly used, primarily due to the lack of availability of appropriate research positions and qualified research staff. Such tests are carried out sporadically, which significantly affects the quality of the components of these vehicles and the general characteristics (so-called objects or ship signatures) of the UUV physical fields.
The stand prepared in this work and the conducted research indicate that the proposed solution meets the assumed requirements. The accuracy obtained, estimated on the basis of the relative error between the values obtained from the measurements and the values calculated using polynomial regression, is sufficient and reaches 9% in the worst case. The test stand is scalable, i.e., using a different (larger) design and more advanced three-axis magnetic field sensors, the proposed method and software can be used without any changes. An important issue is to popularize the proposed solution. It has to be taken into account that depending on the application, the minimization criteria may be different. For example, UUV minimization for the purpose of detecting disorderly intruders and protecting the so-called critical infrastructure will require such optimization of the vehicle's structural elements so that its magnetic field is within or slightly greater than the values of the three components of the Earth's magnetic induction at the site of the mission. On the other hand, the UXV task consisting of the detection of magnetic materials in a given environment (e.g., for the neutralization of ammunition or archaeological research) will require detailed knowledge of the distribution of the UUV magnetic field and possible software corrections related to the magnetic induction value of the detected objects with magnetic properties. Data Availability Statement: Raw data from this study are available upon request with the agreement of the author.

Conflicts of Interest:
The authors declare no conflict of interest.