1 Introduction

A significant reduction in CO2 emissions by transport should not be expected soon due to the popularity of internal combustion engines. Other sectors have been reducing emissions since 1990, but as more and more people own cars, CO2 emissions from transport are increasing.

Table 1 shows the percentage of CO2 emissions relative to each model of transport (European Parliament, CO2 emissions from cars: facts and figures (infographics)). The data from European Environment Agency says that CO2 emissions from passenger transport vary significantly depending on the transport mode. Passenger cars are a major polluter, accounting for 60.7% of total CO2 emissions from road transport in Europe. However, modern cars could be among the cleanest modes of transport if shared, rather being driven alone. With an average of 1.7 people per car in Europe, other modes of transport, such as buses, are currently a cleaner alternative.

Table 1 Percentage of CO2 emissions relative to each mode of transport

Electric vehicles (a vehicle that uses one or more electric motors or traction motors for propulsion) could help keep the world clean. In general, electric vehicles produce fewer emissions, which contributes to climate change and reduced smog than conventional cars. That is because more and more countries are switching to electric vehicles.

However, electric vehicles are not a panacea. Even though electric vehicles are very profitable from the economic (electricity costs several times cheaper than fuel) and environmental (less carbon dioxide) points of view, their manufacturers are not much concerned with the increase in power reserve. Also, what if electric vehicles could go much longer without recharging?

Comparison of the most popular models of electric cars by their energy consumption in urban and highway traffic (Kane 2019) is shown in Table 2.

Table 2 Energy consumption in urban and highway traffic of electric cars

It is easy to notice that luxury cars and SUVs have higher energy costs than sedans and economy cars. A great example is the Tesla Model X, with a power consumption of 218 W * h/km, and a counterpart from Hyundai, in the form of an SUV, Hyundai Kona Electric, with a power consumption of 175 W * h/km.

There are many plans to operate transport systems for automated cars which are discussed in governments of progressive countries, for example, in Europe, some cities in Belgium, France, Italy and the UK (E.U.CORDIS Research Program CitynetMobil; BBC News).

Public testing in traffic of Germany, the Netherlands and Spain have allowed. The UK launched public trials of the LUTZ Pathfinder automated pod in Milton Keynes (The Telegraph).

The progress of automated vehicles can be assessed by computing the average distance-driven between disengagements. Comparison of the distance to disengagements of the most progressive automated car makers is shown in Table 3.

Table 3 Distance to disengage of most popular self-driving car models

In 2017, Waymo reported 63 disengagements over 567,366 km of testing, an average distance of 9006 km between disengagements, the highest among companies reporting such figures. The total distance to disengage reported by Waymo is 17,951 km. In the final three months of 2017, Cruise (now owned by GM) averaged 8377 km per disengagement over a total distance of 100,888 km. In July 2018, American robotics company Nuro reported averaged 1654 km per disengagement over a total distance of 39,720 km.

Hybrid electric vehicles (HEVs—is a type of vehicle that combines a conventional internal combustion engine system with an electric propulsion system) are now considered as a viable solution to reduce fuel consumption and CO2 emissions in the transport industry.

Studies have shown that the effectiveness of HEVs depends on several factors. The cost of electricity and the percentage of usable energy to the total energy consumed by the car were recognized as major factors for improving battery life.

In Rupp et al. (2019), the results of studies on the reduction of CO2 emissions by vehicles are presented. It has been shown that optimization of charge time can lead to a reduction in CO2 emissions.

The study (Liu et al. 2019; Kafazi and Bannari 2019; Salahshoor et al. 2020; Al Essa 2020) provides a method of increasing battery life based on neural networks. The idea of smart and efficient use of charging stations, described in (Yan et al. 2020; Melo et al. 2014), has several advantages. The idea behind the study proposes to reduce CO2 emissions by optimizing the HEVs charging process. Developing competent logistics for charging stations will result in HEVs owners spending less time travelling to stations, which will reduce emissions. Also, the more stations there are fewer charge queues, and less waiting time—less CO2 emissions.

Currently, some methods are proposed to optimize the energy costs of HEVs (Tranab et al. 2019). Rules-based methods are often successfully applied, but usually, the controller design is limited by specific vehicle design conditions and conditions of use. For this reason, model-based approaches may be more appropriate. It also describes a strategy based on fuzzy logic.

But there remain unresolved issues related to optimal use of batteries. This may be due to the cost involved in developing new or improving existing batteries to improve their physical properties.

Alternatively, adaptive energy control can be used by the battery. This is the approach used in (Madhusudhanan 2019). A good option may be to use in-depth training (Hongwen et al. 2019), which can help to track some patterns (trends) in the use of battery energy resources. Optimizing battery power by analyzing real-time traffic data (Kessler and Bogenberger 2019) can also be a way to solve the problem. Choosing the best path will steadily reduce energy costs.

Autonomous vehicle (AV—is a vehicle that is capable of sensing its environment and moving safely with little or no human input) technology has led to projections that fully autonomous vehicles could define the transportation network within the coming years (Crayton and Meier 2017).

As mentioned in (Iglinski and Babiak 2017), the broad implementation of autonomous vehicle can be a turning point in terms of reducing emissions of greenhouse gases (GHG).

Autonomous vehicles become more accessible soon. The results of Meyer et al. (2017) show that autonomous vehicles could cause another quantum leap in accessibility.

So, to sum up, the scientific works try to focus on utilizing EVs, HEVs and AVs as a part of new urban society. Some authors try to overcome the top issues, that we have today: traffic jams, air pollution, reducing emissions of greenhouse gases and so on. The rest of the researchers try to focus on improving control approaches of the EVs itself. The main issue—power reserve of EVs—is still underestimated and need more profound research.

The study, described in this article, identifies that an approach, using a tracking system, yields significant gains in energy use compared to analogues. This allows for obtaining certain effects from the introduction into production. In particular, the performance of suitable electric batteries can be increased, which will lead to an increase in the vehicle’s power reserve without changing the manufacturing process of the batteries.

All this gives reason to say that it is advisable to study dedicated to the development of an optimal, energy-efficient control system.

2 System Modeling and Problem Formulation

The purpose of this section is to describe a dynamic model of the automated guided vehicle (AGV—is a portable robot that follows along marked long lines or wires on the floor, or uses radio waves, vision cameras, magnets, or lasers for navigation) that we study and provide the ground theory of tracking system.

The definition of all constants and function, which will be mentioned in the following section, is shown in Table 4.

Table 4 Systems and definitions in AGV model

2.1 AGV Dynamic Model

Let’s consider AGV as a two-wheel vehicle as shown in Fig. 1.

Fig. 1
figure 1

Example of two-wheel AGV

Let \(\varphi\)—rotation angle of the wheel. It is known from kinematics that the angular velocity is expressed by the following equation:

$$ \omega = \frac{{{\text{d}}\varphi }}{{{\text{d}}t}} $$
(1)

Given that the AGV has two wheels, Eq. (1) is valid for each of them. For the right wheel the angular velocity \(\omega_{\rm r}\) is:

$$ \omega_{\rm r} = \frac{{{\text{d}}\varphi_{\rm r} }}{{{\text{d}}t}} $$
(2)

Angular velocity for the left wheel \(\omega_{\rm l}\) is:

$$ \omega_{\rm l} = \frac{{{\text{d}}\varphi_{\rm l} }}{{{\text{d}}t}} $$
(3)

Having both components of the angular velocity for the wheels, it is possible to express the total angular velocity of the AGV, \(\omega_{\rm AGV}\):

$$ \omega_{\rm AGV} = r\frac{{\omega_{\rm r} - \omega_{\rm l} }}{L} $$
(4)

From the angular velocity, we can express the total linear velocity of the AGV, \(V_{\rm AGV}\):

$$ V_{\rm AGV} = r\frac{{\omega_{\rm r} + \omega_{\rm l} }}{2} $$
(5)

It is now possible to express velocity projections:

$$ V_{x} = V\cos (\omega ) = \mathop x\limits $$
(6)
$$ V_{y} = V\sin (\omega ) = \mathop y\limits $$
(7)

2.2 AGV Energy-Optimal Path-Following Control Model

The following subsection shows the mathematical background of the proposed tracking system. The main idea of the control system is to minimize the difference between the desirable and real outputs. There is also some constraint, which needs to be followed, the physical meaning of such is to reach the minimization with spending as minimum as possible energy.

Table 5 shows a definition of all matrices and functions used in the following subsection.

Table 5 Optimal tracking system notation

Consider a linear model:

$$ \left\{ \begin{gathered} \mathop {\mathbf{x}}\limits^{ \bullet } (t) = {\mathbf{A}}(t){\mathbf{x}}(t) + {\mathbf{B}}(t){\mathbf{u}}(t), \hfill \\ {\mathbf{y}}(t) = {\mathbf{C}}(t){\mathbf{x}}(t). \hfill \\ \end{gathered} \right. $$
(8)

And the energy-optimal consumption criterion:

$$ J = \frac{1}{2}{\mathbf{e}}^{T} (T){\mathbf{Fe}}(T) + \frac{1}{2}\int\limits_{{t_{0} }}^{T} {[{\mathbf{e}}^{T} (t){\mathbf{Q}}(t){\mathbf{e}}(t) + {\mathbf{u}}^{T} (t){\mathbf{R}}(t){\mathbf{u}}(t)]{\text{d}}t} $$
(9)

where

$$ {\mathbf{e}}(t) = {\mathbf{z}}(t) - {\mathbf{y}}(t) $$
(10)

\({\mathbf{e}}(t)\)—difference between desirable z(t) and real y(t) outputs. Rewrite \({\mathbf{e}}(t)\) as a function of \({\mathbf{z}}(t)\) and \({\mathbf{x}}(t)\):

$$ {\mathbf{e}}(t) = {\mathbf{z}}(t) - {\mathbf{C}}(t){\mathbf{x}}(t) $$
(11)

Substitute the error (11) into the optimality criterion (9) and find the Hamiltonian H of the system:

$$ \begin{aligned} H =& \frac{1}{2}[{\mathbf{z}}(t) - {\mathbf{C}}(t){\mathbf{x}}(t)]^{T} {\mathbf{Q}}(t)[{\mathbf{z}}(t) - {\mathbf{C}}(t){\mathbf{x}}(t)] \\& + \frac{1}{2}{\mathbf{u}}^{T} (t){\mathbf{R}}(t){\mathbf{u}}(t)p_{0} (t) + {\mathbf{A}}(t)^{T} {\mathbf{x}}(t)^{T} {\mathbf{p}}(t)\\ & + {\mathbf{B}}(t)^{T} {\mathbf{u}}(t)^{T} {\mathbf{p}}(t). \\ \end{aligned} $$
(12)

The additional vector function \({\mathbf{p}}(t)\) is described by:

$$ {\mathbf{p}}(t) = \left[ \begin{gathered} p_{0} (t) \\ p_{1} (t) \\ ... \\ p_{n + 1} (t) \\ \end{gathered} \right] $$
(13)

so,

$$ {\mathbf{p}}(T) = \left[ {\begin{array}{*{20}c} { - 1} & 0 & {...} & 0 \\ \end{array} } \right]^{T} $$
(14)

and can be found from the following equation:

$$ \mathop {\mathbf{p}}\limits^{ \bullet } (t) = - \frac{\partial H}{{\partial {\mathbf{x}}(t)}} $$
(15)

Since there are no control restrictions:

$$ \mathop {\max }\limits_{{\mathbf{u}}} H:\frac{\partial H}{{\partial {\mathbf{u}}(t)}} = 0 $$
(16)

so,

$$ \frac{\partial H}{{\partial {\mathbf{u}}(t)}} = {\mathbf{R}}(t){\mathbf{u}}(t) + {\mathbf{B}}^{T} (t){\mathbf{p}}(t) = 0 $$
(17)

where optimal control is written as:

$$ {\mathbf{u}}(t) = - {\mathbf{R}}^{ - 1} (t){\mathbf{B}}^{T} (t){\mathbf{p}}(t) $$
(18)

Differentiate (15) and obtain:

$$ \mathop {\mathbf{p}}\limits^{ \bullet } (t) = - {\mathbf{C}}^{T} (t){\mathbf{Q}}(t){\mathbf{C}}(t){\mathbf{x}}(t) - {\mathbf{A}}^{T} (t){\mathbf{p}}(t) + {\mathbf{C}}^{T} (t){\mathbf{Q}}(t){\mathbf{z}}(t) $$
(19)

Substitute the resulting control (18) into the state Eq. (8):

$$ \mathop {\mathbf{x}}\limits^{ \bullet } (t) = {\mathbf{A}}(t){\mathbf{x}}(t) - {\mathbf{B}}(t){\mathbf{R}}^{ - 1} (t){\mathbf{B}}^{T} (t){\mathbf{p}}(t) $$
(20)

Let the relationship between x(t) and p(t) be written by the following equation:

$$ {\mathbf{p}}(t) = {\mathbf{K}}(t){\mathbf{x}}(t) - {\mathbf{g}}(t). $$
(21)

Therefore, state Eq. (20) can be rewritten as:

$$ \mathop {\mathbf{x}}\limits^{ \bullet } (t) = [{\mathbf{A}}(t) - {\mathbf{S}}(t){\mathbf{K}}(t)]{\mathbf{x}}(t) + {\mathbf{S}}(t){\mathbf{g}}(t) $$
(22)

where

$$ {\mathbf{S}}(t) = {\mathbf{B}}(t){\mathbf{R}}^{ - 1} (t){\mathbf{B}}^{T} (t) $$
(23)

Differentiate the vector function \({\mathbf{p}}(t)\) in (21):

$$ \mathop {\mathbf{p}}\limits^{ \bullet } (t) = \mathop {\mathbf{K}}\limits^{ \bullet } (t){\mathbf{x}}(t) + {\mathbf{K}}(t)\mathop {\mathbf{x}}\limits^{ \bullet } (t) - \mathop {\mathbf{g}}\limits^{ \bullet } (t) $$
(24)

and substitute (22) in the (24):

$$ \begin{aligned} \mathop {\mathbf{p}}\limits^{ \bullet } (t) = & [\mathop {\mathbf{K}}\limits^{ \bullet } (t) + {\mathbf{K}}(t){\mathbf{A}}(t) - {\mathbf{K}}(t){\mathbf{S}}(t){\mathbf{K}}(t)]{\mathbf{x}}(t) \\ & + {\mathbf{K}}(t){\mathbf{S}}(t){\mathbf{g}}(t) - \mathop {\mathbf{g}}\limits^{ \bullet } (t) \\ \end{aligned} $$
(25)

Substitute (21) into the equation of optimal control (18) and obtain:

$$ {\mathbf{u}}(t) = - {\mathbf{R}}^{ - 1} (t){\mathbf{B}}^{T} (t)[{\mathbf{K}}(t){\mathbf{x}}(t) - {\mathbf{g}}(t)] $$
(26)

where \({\mathbf{K}}(t)\) is a real, symmetric, positively defined matrix of dimension n × n, which is the solution of the obtained Riccati equation:

$$ \begin{aligned} {\mathbf{K}}(t) = & - {\mathbf{K}}(t){\mathbf{A}}(t) - {\mathbf{A}}^{T} (t){\mathbf{K}}(t) + {\mathbf{K}}(t){\mathbf{B}}(t){\mathbf{B}}^{ - 1} (t){\mathbf{B}}^{T} (t){\mathbf{K}}(t) \\ & - {\mathbf{C}}^{T} (t){\mathbf{Q}}(t){\mathbf{C}}(t) \\ \end{aligned} $$
(27)

with a boundary condition:

$$ {\mathbf{K}}(T) = {\mathbf{C}}^{T} (T){\mathbf{FC}}(T) $$
(28)

The vector \({\mathbf{g}}(t)\) (with n components) is the result of the solution of the differential equation:

$$ \mathop {\mathbf{g}}\limits^{ \bullet } (t) = - [{\mathbf{A}}(t) - {\mathbf{B}}(t){\mathbf{R}}^{ - 1} (t){\mathbf{B}}^{T} (t){\mathbf{K}}(t)]^{T} {\mathbf{g}}(t) - {\mathbf{C}}^{T} (t){\mathbf{Q}}(t){\mathbf{z}}(t) $$
(29)

with an appropriate boundary condition:

$$ {\mathbf{g}}(T) = {\mathbf{C}}^{T} (T){\mathbf{Fz}}(T) $$
(30)

Therefore, by solving the Riccati Eq. (27) find the \({\mathbf{K}}(t)\) matrix also, the solving the differential Eq. (29) in the reverse time will give the value of the entire vector \({\mathbf{g}}(t)\). Substituting the obtained values into Eq. (26), obtain the optimal input control of the system, which minimizes criterion (9) and solves the tracking problem.

2.3 State-Space Model of AGV

MATLAB System Identification Toolbox (MathWorks 2019) provides tools for creating a mathematical representation of physical systems. The basic idea is to search for a mathematical representation of an AGV described by differential equations with appropriate accuracy.

First, it is necessary to collect input and output from the AGV. Within this study, the software package ROBOTC was used. The software package allows remote control of the AGV using the Logitech F310 joystick. Remote control is achieved by using the communication methods API of the ROBOTC software package and the robot itself.

Also, the advantage of this software package is that it allows you to receive data from AGV sensors in real time. The obtained data can be saved in CSV format for further processing in MATLAB and System Identification Toolbox.

Two sensors are used: the servomotor driver sensor for the input and the tachometer for the output.

Figure 2 shows the graphs of the collected input data for the left and right wheels.

Fig. 2
figure 2

Input data of left and right wheels motors

Figure 3 shows the graphs of the collected output data for the left and right wheels.

Fig. 3
figure 3

Output data of left and right wheels motors

The identification results are shown in Fig. 4.

Fig. 4
figure 4

Identification result: a—left wheel, b—right wheel

As we can see from the figure, the collected data are the combination of linear and pulsive forms. It is simple to understand since the authors collected the data from the tachometer. Plateau sections—describes the cases, when there is a constant speed observed. All slopes—time, when AGV increased the speed.

Therefore, the System Identification Toolbox was able to find the state-space model of the AGV (31).

$$ \begin{gathered} {\mathbf{A}} = \left[ {\begin{array}{*{20}c} {1.68 \cdot 10^{ - 4} } & { - 2.39 \cdot 10^{ - 3} } \\ {1 \cdot 10^{ - 3} } & { - 1.68 \cdot 10^{ - 4} } \\ \end{array} } \right], \\ {\mathbf{B}} = \left[ \begin{gathered} \begin{array}{*{20}c} { - 1.43 \cdot 10^{ - 3} } & {7.86 \cdot 10^{ - 4} } \\ \end{array} \hfill \\ \begin{array}{*{20}c} { - 1.31 \cdot 10^{ - 2} } & {1.37 \cdot 10^{ - 2} } \\ \end{array} \hfill \\ \end{gathered} \right], \\ {\mathbf{C}} = \left[ \begin{gathered} \begin{array}{*{20}c} { - 1.43 \cdot 10^{4} } & {876.67} \\ \end{array} \hfill \\ \begin{array}{*{20}c} { - 1.37 \cdot 10^{4} } & {1.51 \cdot 10^{3} } \\ \end{array} \hfill \\ \end{gathered} \right], \\ {\mathbf{D}} = \left[ \begin{gathered} \begin{array}{*{20}c} 0 & 0 \\ \end{array} \hfill \\ \begin{array}{*{20}c} 0 & 0 \\ \end{array} \hfill \\ \end{gathered} \right]. \\ \end{gathered} $$
(31)

The mathematical model has 99.08% accuracy for the left wheel and 99.02% for the right wheel. Accuracy values were obtained from System Identification Toolbox. So, we can conclude that the model in the state space is fully consistent with its physical reflection.

2.4 Problem Statement

Given the state-space model (8) of AGV, this paper examines the following optimal control problem:

Minimize: \(\begin{aligned} & J = \frac{1}{2}{\mathbf{e}}^{T} (T){\mathbf{Fe}}(T)\\ & + \frac{1}{2}\int\limits_{{t_{0} }}^{T} {[{\mathbf{e}}^{T} (t){\mathbf{Q}}(t){\mathbf{e}}(t) + {\mathbf{u}}^{T} (t){\mathbf{R}}(t){\mathbf{u}}(t)]dt}\end{aligned} \)

Subject to: \(\begin{gathered} {\mathbf{e}} \in E \hfill \\ {\mathbf{u}} \in U \hfill \\ \end{gathered}\)

The optimization objective in this control problem consists of the instantaneous combined cost of electricity consumption and path-following error \({\mathbf{e}}(t) = {\mathbf{z}}(t) - {\mathbf{y}}(t)\). In optimizing this objective, impose two constraints, namely: (1) the path-following error, \(E\); (2) the set of admissible control inputs \(U\). Regarding the estimation of the AGV dynamics, the objective of the optimal control design is to ensure that the estimation error can converge to zero.

3 Numerical Results and Evaluation

The purpose of this section is to show how the, described in sect. 2, theory can be applied to the real physical model. Then, the desired output of the system will be constructed. Finally, the quality of the tracking system and PID controller approaches will be compared.

Let’s consider (31). Matrices \({\mathbf{Q}}\), \({\mathbf{R}}\) and \({\mathbf{F}}\), of the criterion (9) as follow:

$$ {\mathbf{Q}} = \left[ {\begin{array}{*{20}c} {1000} & 0 \\ 0 & {1000} \\ \end{array} } \right] $$
(32)
$$ {\mathbf{R}} = \left[ {\begin{array}{*{20}c} {100} & 0 \\ 0 & {100} \\ \end{array} } \right] $$
(33)
$$ {\mathbf{F}} = \left[ {\begin{array}{*{20}c} 0 & 0 \\ 0 & 0 \\ \end{array} } \right] $$
(34)

The values of matrices \({\mathbf{Q}}\),\({\mathbf{R}}\) and \({\mathbf{F}}\) chosen proportionally to the corresponding values of \(({\mathbf{x}}_{i} (t))^{2}\), \(({\mathbf{u}}_{i} (t))^{2}\) and \(({\mathbf{x}}_{i} (T))^{2}\).

Solving the Riccati Eq. (27) with boundary condition:

$$ {\mathbf{K}}(T) = {\mathbf{C}}^{T} (T){\mathbf{FC}}(T) = 0 $$
(35)

we get \({\mathbf{K}}(t)\) matrix:

$$ {\mathbf{K}}({\text{t}}) = \left[ {\begin{array}{*{20}c} {1.27 \cdot 10^{10} } & { - 1.06 \cdot 10^{9} } \\ { - 1.06 \cdot 10^{9} } & {9.66 \cdot 10^{7} } \\ \end{array} } \right] $$
(36)

Appendix A” provides a sample MATLAB code of solving the Riccati Eq. (27).

Substitute (36) into ordinal differentiation equation \({\mathbf{g}}(t)\) (29) with boundary condition:

$$ {\mathbf{g}}(T) = {\mathbf{C}}^{T} (T){\mathbf{Fz}}(T) = 0 $$
(37)

get:

$$ \mathop {\mathbf{g}}\limits^{ \bullet } (t) = - \left[ {\begin{array}{*{20}c} { - 25.87} & {61.15} \\ { - 0.25} & { - 34.35} \\ \end{array} } \right]{\mathbf{g}}(t) - \left[ {\begin{array}{*{20}c} { - 1.43 \cdot 10^{7} } & { - 1.37 \cdot 10^{7} } \\ {8.79 \cdot 10^{5} } & {1.51 \cdot 10^{6} } \\ \end{array} } \right]{\mathbf{z}}(t). $$
(38)

And now, choosing some vector \({\mathbf{z}}(t)\) (the desired output of tracking system) and solving (38) in reverse time, it will be found the value of the entire vector \({\mathbf{g}}(t)\). Substituting the obtained values into Eq. (26) we obtain the optimal input control of the system, which minimizes criterion (9) and solves the tracking problem.

Appendix A” provides a sample MATLAB code of solving ODE Eq. (38).

3.1 The Trajectory Creation Subsystem

Figure 5 shows a developed Web application that finds a path between two addresses, Web application created on the Azure’s Maps Atlas library base. Easy to notice, that trajectory is not very simple. It has some sharp turns, race on overpass and, also, straight pieces of road. Overall, it is 6.5 km in total.

Fig. 5
figure 5

Example of the result generated by trajectory creation subsystem

This library provides an API to get the navigation path between two addresses. After successfully constructing the path, the Web application saves a set of points (latitude-longitude) into a JSON file. Later, the JSON data will be converted into a format, suitable, for the tracking system, by the appropriate algorithm.

Figure 6 shows the result of the previously mentioned algorithm, for converting the retrieved JSON data into desired vector \({\mathbf{z}}(t)\), in other words—the desired path. The idea is very easy. As this study worked with some AGV, it is necessary to scale the “real” trajectory to some trajectory “for test.” So, as a “real” trajectory scale is 1:500 m, algorithm scale it down to 1:50 cm. In other words, the XY graph of “real” trajectory scaled down to 1000 and now, the length of trajectory “for test” is—6.5 m.

Fig. 6
figure 6

Example of the desired path

It should be noted that desired vector \({\mathbf{z}}(t)\), in our case—trajectory path, could be considered from point A to B and vice versa, without any hesitation from the tracking system algorithm.

3.2 The Experimental Results

A mathematical representation of an AGV in the state-space form was found, the corresponding output of which is the change in the rotation angle of each of the wheels. Accordingly, the problem arises from the transition from the desired path to the desired angles rotation of the wheels. So, using the equations of the dynamic model from Sect. 2.1, graphical dependency over the time of desired angles rotation is shown in Fig. 7.

Fig. 7
figure 7

Graphs of the rotation angles of the wheels over time

To avoid some confusion, the ordinate axis of Fig. 7 related to accumulated angles rotation. For example, if the one wheel rotation is 360° (and − 360° if wheel rotated anticlockwise), ten wheel rotations would be shown as 3600° on the graph.

So, now evaluate a tracking system for solving the path-following problem and compare its quality with PID-based system which solves the same problem. The result of the tracking system is shown in Fig. 8 (tracking by wheels rotation) and Fig. 9 (trajectories comparison).

Fig. 8
figure 8

The comparison results of the tracking system: a—for the left wheel, b—for the right wheel

Fig. 9
figure 9

The comparison results of the desired and real trajectories

The tracking system repeats the desired output with an accuracy of more than 95% by both parameters. To determine the power consumption during the experiments, measurements of the battery voltage were made at the beginning and end of the run, which is summarized in Table 6. The time of 100 s is chosen experimentally; authors wanted to choose the best time interval, for which AGV rode the trajectory with an average of 75% of the load on the wheels.

Table 6 Measurement battery voltage with a voltmeter at the beginning and the end

Therefore, the results of the experiment showed a 0.37% charge loss. The result of the previously mentioned PID-based system is shown in Fig. 10 (tracking by wheels rotation) and Fig. 11 (trajectories comparison).

Fig. 10
figure 10

The comparison results of the PID-based system: a—for the left wheel, b—for the right wheel

Fig. 11
figure 11

The comparison results of the desired and real trajectories

The short remark about how PID-controller was constructed and evaluated. Based on fact that studied AGV represents a two-wheel vehicle, authors constructed PID-regulator for each wheel, left and right. So PID-controllers was constructed with following parameters: overshoot—0%, as fast as possible settling time—authors managed to build two PID-controllers for each wheel.

Below are values of P, I and D constants:

  1. (1)

    P of the right wheel—2.0758;

  2. (2)

    I of the right wheel—0.0826;

  3. (3)

    D of the right wheel—2.0079;

  4. (4)

    P of the left wheel—2.4870;

  5. (5)

    I of the left wheel—− 0.0198;

  6. (6)

    D of the left wheel—1.2527.

The actual output of the system with the PID controller does not completely repeat the desired. The percentage of accuracy tracking by the rotation of the wheels is in the range of 80–85%, but it is not enough for trajectory tracking itself, which, obviously, is shown in Fig. 11. These collected values after measurements are summarized in Table 7.

Table 7 Measurement battery voltage with a voltmeter at the beginning and the end

Therefore, the charge loss was 0.5%.

4 Conclusions

The main approach in the study was the synthesis of an optimal tracking system. A battery loss value of about 0.37% and a trajectory coverage of more than 95% of desired suggests that this approach is the best fit in both parameters in this study.

It should also be noted that the study did not perform any experiments based on another AGV to compare the results.

The use of the method, proposed in the study, proved to be justified. The scientific novelty of this study is as follows. Usually when improving the quality characteristics of the batteries try to improve their dielectric properties. But the use of this approach is limited by the technical progress of electric batteries. Trying to overcome these limitations to increase the dielectric characteristics of the batteries, there are objective difficulties associated with finding or inventing better electrolytes with better characteristics. The study described in this article proposes a way to overcome these difficulties.

It is based on the fact that the improvement of quality characteristics, in general, is due to the hardware implementation around the battery itself and not in changing the physical structure of it. This method made it possible to reduce energy use by the system when performing the tasks. This means that the scientific result of using a tracking system as a regulatory approach, for the sake of optimal, energy-efficient management—is interesting from a theoretical point of view.

From a practical point of view, the use of a tracking system allows improving the quality characteristics of the batteries, which, as a consequence, will increase the power reserve of electric vehicles, without significant changes in the manufacturing process. Thus, an exemplary aspect of using the scientific result obtained is the ability to improve the performance of electric vehicles and to use a completely new approach to increase the life cycle of a single battery charge.

Further development may lead to optimality criterion (9) becoming more complex. At present, the physical content of criterion (9) is fine for a large value of error. In the future, the development of the theory of tracking systems will result in criterion (9) being formed from many functions that will need to be minimized.