B-spline surface for distribution of the agriculture soil moisture

In the agricultural locality Pohranice were measured soil moisture values for the selected control points. Over these points we put the B-spline surface, which relatively detailed description we supply. On a simple example of 4 x 4 points we debugged program for generation of base functions. Furthermore, we verified process to generate knots of B-spline surface, which we subsequently used for the programming of the surface itself. In this manner formed algorithms we applied to 11 x 11 measured values of soil moisture. Discrete values of measurements were by clamped B-spline surface smoothed and its corner values constitute the edge measurement points. Evenly spaced points at a distance of 1 m in both directions slightly simplified the procedure, which can deal with irregular layout of points.


INTRODUCTION
Geometry modelling in existing computer applications prefers for objects definition instead of complex mathematical expressions enter the coordinates of several points in the plane or in the space that are easy to handle.These points then very efficiently approximate arbitrarily complex shapes and to edit in this way formed objects is often enough to edit positions of the control points [9].Typical examples of this approach are Bézier curve [5], [8], B-spline curve [6] and NURBS curve [10].Likewise are modelled also surfaces as Bézier surface [7], or B-spline surface, which is covered in detail in this article.In addition to description of the B-spline surface we practically apply it to the values of soil moisture.Methods of measurement of the soil moisture as well as processing of the measured data are described in [3].

B-spline surface
For unambiguous identification of the B-spline surface we need several information.First, the matrix of (m + 1) rows and (n + 1) columns of control points P i,j , where i is from 0 to m and j is in the range from 0 to n. Next, there are required two vectors of knots, one in the direction of u with (h+1) knots U = {u 0 , u 1 , ... , u h } and the other in the direction of v with (k+1) knots V = {v 0 , v 1 , ... , v k }.Finally, it is necessary to define the degree of the function p in the direction u and the degree of the function q in the direction v.For the mentioned parameters the equation of B-spline surface takes form where N i,p (u) and N j,q (v) represent B-spline basis functions of degree p, respectively q.The basic equation of the B-spline function that we described for the curve [6] has to match in both directions, thus h = m + p + 1 and k = n + q + 1.Like Bézier surface is also the B-spline surface the surface of tensor product.The set of control points P i,j generates control net and the parameters u and v take values in the range from 0 to 1. B-spline surface thus transforms the unit square to rectangular surface.
B-spline curves can be open, closed, or clamped and therefore the B-spline surface may have the same characteristics in each direction.It may be required that in the direction u is the surface clamped and in the direction v is the same surface closed.If the B-spline surface is clamped in both direction then passes through the control points P 0,0 , P m,0 , P 0,n , P m,n and the end flowlines of the control points constitute eight tangents.We deal in the contribution with just such a clamped surface in both directions.If the B-spline surface is closed in one direction, then also all the isoparametric curves are closed in this direction.In the case of open B-spline surface in both directions this does not pass through any of the control points P 0,0 , P m,0 , P 0,n , P m,n .

Basis functions
Let U = {u 0 , u 1 , u 2 , ... , u h } is non-decreasing sequence of (h+1) real numbers, thus u These numbers are called knots, set U is named knot vector and semi-open interval 〈u i , u i+1 ) is designated as the i-th knot span.Since knots u i can be identical, some knot spans do not exist and are therefore zero.If knot u i occurs s-times, thus u i = u i+1 = ... = u i+s-1 , where s > 1, u i is called s-multiple knot of multiplicity s, what is written u i (s).Otherwise, if u i appears only one, it is simple knot.If the knots are equidistant, i.e. (u i+1 -u i ) = constant, for any 0 ≤ i ≤ (h-1), the knot vector, or the knot sequence is called uniform, otherwise is non-uniform.
The knots can be considered as dividing points that divide the interval 〈u 0 , u h 〉 to the knot spans.The interval 〈u 0 , u h 〉 represents definition domain of the B-spline basis function.
Basis function of B-spline surface, shown in the formula (1) as N i,p (u) a N j,q (v) are defined by the Cox de Boor recursive formula where p indicates function degree.
Basis functions of the B-spline surface (1) are the coefficients of the control points referred to (2) and ( 3).The definition (1) shows that the two-dimensional basis function is a product of two one-dimensional basis functions.The Fig. 1 illustrates the basis functions for m = 3 and n = 3.We show them for different degrees of surfaces, p = q = 0, 1, 2, 3. On each of the four parts of the Fig. 1 are drawn four functions for p = q, and with the same i changing gradually along the x axis.The functions in the same part of the Fig. 1 differ by the different values of j along the y axis.Every part stated precisely its settings.Basis functions m = n = 3, correspond to a training example, which we solve by using p = q = 2.This example has total sixteen basis functions, each match to a single control point P i,j .It must be noted that the last part below right, that assignment p = q = 3, is the property of B-spline surface its limit state, Bézier surface.

Realization of the experiment
The measurement was carried out in the village Pohranice on agricultural site with GPS N48.33213° E18.16568° at an altitude of 223 m.The terrain was slightly undulate with a declining trend to the northwest.On the field was growing wheat and was performed agricultural operation autumn tillage.
To measure soil moisture field, where the vehicle moved during execution of working manoeuvers, we used Moisture Meter HH2.Moisture meter from Delta-T [1] is a universal reader unit, which allows comfortable display format and stores measurement data of the connected sensor.The device reads outputs of probes Profile Probe type PR1 (depth probe to measure soil moisture profile), of the probes Theta Probe (types ML1, ML2 and ML2x) and of isometric tensiometer (types EQ1 and EQ2).Moisture meter size is 150 x 80 x 40 mm and weight 450 g.As mentioned by producer, the range of humidity is measured from zero to saturation, 0 -1.5 V on the voltage scale.The measuring accuracy is specified at ± 0.13% readings in mV +1.0 mV and the resolution is 1 mV.

Algorithm creation
Fig. 2 Control points, B-spline surface of order (2, 2) and their comparison.
In the Fig. 2 is plotted the net of control points and through them is by the algorithm fitted Bspline surface.The surface in both directions has the same degree p = q = 2. Corner points P 0,0 , P 3,0 , P 0,3 and P 3,3 of surface are identical to the control points as shown in the Fig. 2. The Fig. 2 allows simultaneously a comparison of given control points with formed surface and shows smoothing of polygon surface defined by discrete points.Like this measured quantity modelled by B-spline surface remains quite smoothly without restrictions arising by specification only a finite number of measured values.
To create B-spline surfaces, we used the algorithm according to [4].Debugged algorithm we examined on a training example 4 x 4 points, whose coordinates are presented by (4).Measurements we performed on an area of 10 x 10 meters, each measuring point had from the neighbouring point distant 1 m in both directions.So we created a regular grid of measuring points, which we then transformed to the control points P i,j , used in the modelling of B-spline surface with indices i = 0,1,...,10 a j = 0,1,...10.
The measured values in the form of polygon surface are drawn in the Fig. 3. Using the algorithm mentioned above we made a B-spline surface and compared it with measurements in the Fig. 3.Control points P 0,0 , P 10,0 , P 0,10 and P 10,10 are identical to the measured values.Obviously, the B-spline surface smoothed original polygon and for creation of the surface have been used all values that completely define surface.

CONCLUSIONS
B-spline surface stands out for its great adaptability in application to a set of spatially placed points.Number of parameters to be defined for it could give the impression of its complexity.
As shown in the Fig. 3 for applied clamped B-spline surface, its corner points are identical to the endpoints of the specified spatial polygon and other specified points the surface smooths and makes continuous discrete course of points for the polygon.
We compiled the algorithm for creation of basis functions of B-spline surface and verified the procedure for obtaining the knot points and for making surface itself.The net of control points exhibited regular arrangement, although the application of the algorithm is also admissible on an irregular layout.The use of B-spline surfaces on the distribution of soil moisture shows how it is possible to approximate by this surface also other similar technical problems.
Measurement of soil moisture is important for farmers, due to proper setup and use of irrigation systems [2].When we know the exact terms of the origin and amount of the moisture we can save on the consumed water.At the same time significantly improves the process of plants irrigation and set to the important stages of plant growth.

Fig. 1
Fig. 1 Basis functions of the B-spline surface.

4 )
Application of the B-spline surface for the distribution of moistureSoil moisture denotes actual water content in the soil expressed in relative units.It is often measured by volume percentage.Its changes depend on weather conditions as well as on the water intake to plant roots.We conducted our measurements by Moisture Meter HH2, in the area Pohranice, on November 12, 2015.