Neural Network Algorithm for Stabilizing Mechanized Systems
SHMAKOVA ELENA G., FILORETOVA OLGA A., NIKOLAEVA OLGA M.,
VASILKIN DENIS P.
Department of Information Systems in Chemical Technology
Lomonosov Institute of Fine Chemical Technological, MIREA-Russian Technological University
Vernad-sky Ave 86, Moscow, 119571
RUSSIA
Abstract: The article describes an experimental model of stabilization of a mechanized system. The following
are shown: a skate; an element of the program code; an algorithm for stabilizing a proportional-integral-
differential controller (PID). The experimental model uses the calculation and adjustment of the regulator
according to the Ziegler-Nichols method. For the case of applying the neural network approach to the search for
equilibrium, the Hopfield neural network is used. The technology of calculating the balancing of the values of
the coefficients: proportional, integral, differential components are described. The design of the rolling system
is described. The experimental model is designed to identify the balancing range of the rolling system of small-
diameter balls. The experimental module balances the ball at a distance of 4.5 to 7 cm (SW-range). The
shortcomings of the experimental model of stabilization of the mechanized system are revealed. The analysis of
experimental studies of spacecraft stabilization is carried out. It is determined that it is advisable to use the
mathematical tools of the sixth-order Butterworth polynomial in the training of a neural network. Complex
neural network calculations make it possible to calculate the stabilization coefficients of the spacecraft when
the coordinate system does not coincide with the axes of inertia. An overview of the authors ' research on the
use of intelligent quality control systems for the production of medicines is given. An overview of neural
network solutions for stabilizing the turning angle of high-speed cars is given. The expediency of selecting the
stabilization coefficients of a proportional-integral-differential regulator by a trained neural network for various
rolling ranges is proved.
Key-Words: neural network, stabilization of the rolling system, experimental model, Butterworth polynomial,
selection of stabilization coefficients of the proportional-integral-differential regulator.
Received: April 12, 2021. Revised: November 18, 2021. Accepted: December 20, 2021. Published: January 8, 2022.
1 Introduction
The stabilization of mechanized systems is realized
with the highest possible accuracy. The stabilization
of mechanized systems is required for unmanned
aerial vehicles, industrial robotics, chemical
industry, mechanical engineering, power
engineering (control of boiler rooms), mechanics
(regulation of servos), high-precision equipment of
the space industry. The stabilization of mechanized
systems includes the following processes: design of
an automated stabilization system, organizational
and technical design, neural network processing of
input and output parameter values. The improved
stabilization algorithm increases accuracy, safety,
and minimizes the probability of errors. The authors
develop a neural network software algorithm for
stabilization and propose a model of its prototype.
The process of developing a stabilization module
based on a PID controller is described, the technical
features of the module development are identified.
To accomplish this task, the authors needed to
analyze the available hardware and software
implementation tools, identify advantages and
disadvantages, develop a neural network algorithm,
develop a prototype of the system and test it. The
main goal of the experiment is to develop a rolling
system for small-diameter metal balls on a 3D
printer. To develop and apply an algorithm for
stabilizing the rolling system by combining
technical capabilities: a microcontroller, a
minicomputer and a neural network algorithm. The
computing device is a proportional-integral-
differential controller. The study shows: a skate; an
element of the program code; an algorithm for
stabilizing a proportional-integral-differential
regulator (PID). The experimental model uses the
calculation and adjustment of the regulator
according to the Ziegler-Nichols method. For the
case of applying a neural network approach to the
search for equilibrium, the Hopfield neural network
is used. The technology of calculating the balancing
of the values of the coefficients: proportional,
integral, differential components is described. The
WSEAS TRANSACTIONS on APPLIED and THEORETICAL MECHANICS
DOI: 10.37394/232011.2022.17.3
Shmakova Elena G., Filoretova Olga A.,
Nikolaeva Olga M., Vasilkin Denis P.
E-ISSN: 2224-3429
15
Volume 17, 2022
design of the rolling system is described.
The experimental model was developed in
order to identify the balancing range of the rolling
system of small diameter balls. The
experimental module balances the ball at a
distance of 4.5 to 7 cm (SW-range). The
shortcomings of the experimental model of
mechanized system stabilization are revealed. The
advantage of the work is the design on a 3D
printer of an experimental model of the
rolling system (Fig.6, Fig. 7, Fig.8) and the
development of a program for the Arduino C
microcontroller and a proportional-integral-
differential controller.
2 Devices for Controlling the Parameters of the
Stabilization Process
Most prototypes are developed using
microelectronic elements, microcontrollers, single-
board computers. Unicameral computers use
operating system programs. Combining the
technical capabilities of a microcontroller, a
minicomputer and a neural network algorithm, in
total, give a synergistic effect. Arduino boards read
data from sensors, output motor signals, LED
signals, network signal data. The software for
writing code (sketch) is free, multiplatform. The
development of a neural network algorithm uses the
theory of microelectronics, programming, design,
modeling of computer technology, analog-digital
data processing. A minicomputer based on a
Raspberry Pi microprocessor (memory, storage,
graphics driver, connection connectors) and an
Arduino microcontroller (central memory, RAM
and permanent storage devices) provide input and
output signals. All signals are processed by the
algorithm. The Arduino clock frequency is 16 MHz.
The clock frequency of the Raspberry Pi is 1.2 GHz.
Raspberry Pi is convenient for developing software
applications using the Python programming
language. Arduino is convenient for controlling:
LEDs; sensors; the position of the motors; the
coordinates of the motor movement; switching
buttons. Intelligent (neural network) digital control
of input and output parameters of mechanized
systems is the main task of stabilization. To create a
prototype, special functions are required, engine
drivers, an Ethernet connection, an SD card reader,
Wi-Fi, touch screens, cameras, GPS, RGB panels,
etc. The power requirements of the Raspberry Pi
and Arduino are different. Despite the fact that both
are powered by USB (micro-USB or USB Type C
for Raspberry Pi and USB Type B for Arduino),
Raspberry Pi requires more current than Arduino.
To work with the Raspberry Pi, a power adapter is
required, to work with the Arduino, it is enough to
simply connect to a computer via a USB port.
Interrupting the power supply of the Raspberry Pi
causes damage to the hardware, software or
applications. In the case of Arduino, when the
power is turned off, the microcontroller restarts.
Raspberry Pi must be properly connected and
properly turned off. It is used by the Arduino IDE
for code development. Raspberry Pi use the
languages Python IDLE, Eclipse IDE, supported by
Linux. Raspberry Pi programming is carried out
using a terminal, a text editor is used for this. The
Arduino open source hardware and software files
are used. Raspberry Pi is not open source software.
Important advantages of Arduino are: cross-
platform, practical IDE architecture, open source
code, additional ability to use AVR-C code.
2.1 Sketch, a sketch of the program code
All sketches and sketches of the program are saved
in a special extension - .ino. The message area
displays: feedback on saving and exporting; current
errors. The console displays the text output of the
Arduino software (IDE). Includes full error
messages and other information. The configured
card and serial port are displayed in the lower right
corner of the window. The toolbar buttons allow
you to check and load programs, create, open and
save thumbnails, and open a serial monitor (Fig.1).
Fig.1: Arduino IDE Interface
The Arduino software (IDE) uses the concept of a
notepad: a standard place to store programs (or
sketches). Thumbnails in the album can be opened
from the "File" menu, "Drawing Album" or using
the "Open" button on the toolbar. When you first
start the Arduino software, a drawing album catalog
is automatically created. Sketch Features:
1. connecting the code from an external file;
2. loading the sketch through the programmer
directly into the microcontroller;
WSEAS TRANSACTIONS on APPLIED and THEORETICAL MECHANICS
DOI: 10.37394/232011.2022.17.3
Shmakova Elena G., Filoretova Olga A.,
Nikolaeva Olga M., Vasilkin Denis P.
E-ISSN: 2224-3429
16
Volume 17, 2022
3. export the binary file and store the compiled file.
The output panel displays the following
information: about the successful compilation of the
code, in addition, an error message.
2.1.1 Proportional-integral-Differential
Controller (PID)
The PID controller is a device for controlling the
process parameters: pressure, fuel consumption,
temperature, speed. The PID controller is used for
small aircraft, regulates the control of the servo
drive. The PID controller is involved in stabilizing
the position of the flying object in space. In the
controller, the feedback device of the control loop is
used to regulate variable processes. In a closed-loop
controller, a control loop feedback device is used to
maintain the required output signal value. The
closed system of the PID controller includes a
feedback control system. The system evaluates the
variable feedback value. A fixed point of error
signal generation is used. The output values change.
The error is approaching zero, reaching zero.
When the value falls below a fixed point, the
controller turns off. The controller is turned off if
the value is higher than the fixed value. The output
signal of the PID controller is unstable, fluctuates
within a fixed point. The operation of the controller
is represented by a block diagram (Fig. 2).
Fig. 2: Block diagram of the PID controller.
2.1.2 Two-position Control of the Regulator with
Feedback
The two-position controller moves the controlled
variable from the OFF position to the ON position,
depending on the variable. The PID controller
supports the output signal in such a way that there is
a zero error between the process variable and the set
value (in the case of performing feedback
operations) (Fig. 3).
Fig. 3: Block diagram of the experimental model
PID controller.
3 The Algorithm of Stabilization
using the PID Controller
To develop a stabilization algorithm, we will
determine the components of the experimental setup
of the stabilization system:
1. Servo drive;
2. Infrared sensor (tracking the movement of the
ball);
3. Swing (swinging the ball);
4. Arduino microcontroller (swing control, sensor
data processing, controller start-up, servo control);
5. Potentiometer (a measuring device for comparing
two voltage values in real time).
The experiment uses metal balls that swing on a
swing (Fig. 4).
Fig. 4: Metal balls with a diameter of 12 mm.
The main task of stabilizing the system is to balance
the values of the coefficients: proportional integral,
differential components.
The stabilization algorithm is defined by the
following procedure:
1. power supply to the circuit blocks
2. data linearization (from Lat. linearis-linear) is one
of the methods of approximate representation of
closed nonlinear systems, in which the study of a
nonlinear system is replaced by the analysis of a
linear system;
3. calculations of the two-position control of the
regulator with feedback;
4. data output to the servo;
WSEAS TRANSACTIONS on APPLIED and THEORETICAL MECHANICS
DOI: 10.37394/232011.2022.17.3
Shmakova Elena G., Filoretova Olga A.,
Nikolaeva Olga M., Vasilkin Denis P.
E-ISSN: 2224-3429
17
Volume 17, 2022
5. at the beginning: reading data from the sensor,
then the cycle enters the data linearization (Fig.
5).
Fig. 5: Linearization.
Linearization with feedback is a way to bring the
system to a form where there is an external
parameter of the control action. In this case, the
nonlinear system becomes linear, and external
control is provided for stabilizing and controlling
the remaining linear part of the system (Fig. 5).
Fig. 6: The algorithm of stabilization of the
experimental model
The Ziegler-Nichols method is a method of
automatic calculation and adjustment of regulators.
This method is empirical and is based on the use of
data obtained experimentally on a real object. For
the case of applying the neural network approach to
the search for equilibrium, the Hopfield neural
network is used — a fully connected neural network
with a symmetric matrix of connections. In
the process of operation, the dynamics of such
networks converges (converges) to one of the
equilibrium positions. These equilibrium
positions are determined in advance in the
learning process, they are the local minimum of
a functional called the network energy (in the
simplest case, the local minima of a negatively
defined quadratic form on an n-dimensional cube)
[3]. Such a network can be used as an auto-
associative memory. The trained neural network
selects the final values of the coefficients:
proportional integral, differential
components(Fig. 6, Fig. 7).
Fig. 7: The final values of the coefficients
The applied element base of the experimental
model:
1. Arduino Uno Board
2. Hitec HS-422 Analog servo drive
3. GP2Y0A41SK0F distance sensor
4. Potentiometer
5. Rocking Chair (Rolling system) Actobotics
Single Servo Arm
6. Metal ball
The design of the experimental rolling system was
carried out in Autodesk 3ds Max. Design of rolling
module parts: base (Fig.8), gutter (Fig.9), bracket
(Fig. 10).
Fig. 8: Module base
WSEAS TRANSACTIONS on APPLIED and THEORETICAL MECHANICS
DOI: 10.37394/232011.2022.17.3
Shmakova Elena G., Filoretova Olga A.,
Nikolaeva Olga M., Vasilkin Denis P.
E-ISSN: 2224-3429
18
Volume 17, 2022
Fig. 9: Module gutter
Fig. 10: Module bracket
The experimental model was developed in order to
identify the range of ball rolling balancing. The
implementation of the software part of the
experimental module was carried out in the Arduino
C programming language (the C++ programming
language connected to the Wiring framework) and
the Arduino IDE development environment. To
program the board on the Arduino microcontroller, a
special development environment of the Arduino
IDE was chosen. This software is open source and
cross-platform, available for use on several
operating systems (Arduino IDE is available for use
on Windows, Mac OS, and Linux). The
programming language is Wiring, the syntax is
similar to such programming languages as C and
C++, the operating system is Windows. Before
creating a sketch, you need to perform the following
actions:
1. Connect the board via the USB port;
2. Specify the port in the Arduino IDE;
3. Develop a sketch.
Next, the sketch is uploaded to the board.
Development of an algorithm for the operation of
the software component:
1. connect the Servo.h library to control
the servo;
2. determine the initial position of the
servo, specify the values of the PID
controller;
3. assignment and initialization of
variables, determination of the numbers
used in the operation of pins.
4. in the setup function, a serial connection
is initiated, the data transfer rate in
bits/s is set, and the port number from
which the drive will be controlled is
specified.
5. in the cycle, Δt is written, data from the
distance sensor is read, we get rid of
the" noise " and linearize the received
data.
6. we count the PID, output the data to the
servo.
If the ball position does not meet the set values, the
cycle is repeated, this happens until the set values
are reached.
The experimental module balances the ball well at a
distance of 4.5 to 7 cm. This is the SW range, not
the real range, the sensor is not 100% calibrated. If
you hit the ball, the module compensates for this
and returns the ball to the starting point. It also
responds to a change in the initial preset position
(using a potentiometer). The code is gradually
struggling more and more with large ranges. Over
time, it compensates for the established errors due to
the unevenness of the gutter.
4 Conclusion
In conclusion, it should be noted that the
experimental model allowed us to determine the
stabilization of the system for balancing the ball in
the range of 4.5 to 7 cm. This suggests that the
Ziegler-Nichols method of calculating and adjusting
regulators can be used for rolling systems with a
ball diameter of 12 mm.
In the study of the authors Vorobyov V. Yu.,
Sablina G. V. "Calculation and optimization of the
parameters of a discrete PID controller by the
Ziegler-Nichols method", the calculation of the
parameters of the PID controller was carried out
using the Matlab software and the Situlink library.
In the study of the authors, it was proved that the
Ziegler-Nichols method does not take into account
the requirements for the stability margin – this is the
main drawback. After calculating the parameters of
the controller, manual adjustment is required to
improve the quality [4], [5], [6].
The conducted experiment confirms the need to use
a neural network approach. The trained neural
network selects stabilization coefficients for
WSEAS TRANSACTIONS on APPLIED and THEORETICAL MECHANICS
DOI: 10.37394/232011.2022.17.3
Shmakova Elena G., Filoretova Olga A.,
Nikolaeva Olga M., Vasilkin Denis P.
E-ISSN: 2224-3429
19
Volume 17, 2022
References:
[1] Shmendel E.V., Kabilova T.O., Morozova N.G.,
Zenkova M.A., Maslov M.A. Effects of spacers
within a series of novel folate-containing
lipoconjugates on the targeted delivery of nucleic
acids, Journal of Drug Delivery Science and
Technology, 2020, 101609
doi.org/10.1016/j.jddst.2020.101609
[2] Zhmud V.A., Sablina, G.V., Trubin,V.G. Dimitrov
L.V. Use of bypass channel for feedback control of
oscillatory object well-known as difficult one for
control, International Siberian conference on
control and communications (SIBCON): proc.,
Moscow, 12-14 May 2016. IEEE, 2016. – 6 p
[3] Vorobyev V. Yu., Sablina G. V. Calculation and
optimization of parameters of a discrete PID
controller by the Ziegler-Nichols method / /
Automation and Software Engineering, 2019 1(27)
http://www.jurnal.nips.ru
[4] Zhmud, V., Dimitrov, L., Yadrishnikov, O.
Calculation of regulators for the problems of
mechatronics by means of the numerical
optimization method // 20.15.2014 12th
International Conference on Actual Problems of
Electronic Instrument Engineering, APEIE 2014
Proceedings 7040784, p. 739744.
[5] Ivoilov A.Y., Zhmud V.A., Trubin V.G, Dimitrov L.
V. Detection of unrevealed non-linearities in the
layout of the balancing robot /. International
Siberian conference on control and communications
(SIBCON): proc., Moscow, 12-14 May 2016.
Moscow : IEEE, 2016. – 9 p.
[6] Zhmud V., Yadrishnikov O., Poloshchuk A.,
Zavorin A. Modern key technologies in automatics:
structures and numerical optimization of regulators.
Proceedings - 2012 7th International Forum on
Strategic Technology, IFOST 2012 2012. С.
6357804.
[7] Zubov N. V., Lapin A.V., Mikrin E. A. Stabilization
of the orbital orientation of the spacecraft // Space
Engineering and Technologies 3, 2013 pp. 74-81.
[8] Kornyushko Valery F., Nikolaeva Olga M., Panov
Alexey V., Biglov Rem R., Kuznetsov Andrei S.,
2021 Quality management of the chemical-
technological process for continuous synthesis of
pharmaceutical substances of medicinal compounds
in flow micro reactors // MATHEMATICS
METHODS AND INFORMATION SYSTEMS IN
CHEMICAL TECHNOLOGY Fine Chemical
Technologies = Fine Chemical Technologies. ISSN
2686-7575 (Online),16(3):252–266.
[9] Khitskov E.A, Veretekhina S.V., Medvedeva A.V.,
Mnatsakanyan O.L., Shmakova E.G., Kotenev A,
2017. Digital transformation of society: Problems
entering in the digital economy // Eurasian Journal
of Analytical Chemistry 12(5) 855-873
[10] Saikin A.M., Buznikov S. E., Shabanov N. S., Elkin
D. S. and others "Mathematical model of the
dynamic stabilization system of an unmanned
vehicle", IOP Conference Series: Materials Science
and Engineering, Volume 315, Issue 1, page 012023
(2018). DOI 10.1088 / 1757-899X / 315/1/012023
WSEAS TRANSACTIONS on APPLIED and THEORETICAL MECHANICS
DOI: 10.37394/232011.2022.17.3
Shmakova Elena G., Filoretova Olga A.,
Nikolaeva Olga M., Vasilkin Denis P.
E-ISSN: 2224-3429
20
Volume 17, 2022
different ball diameters, taking into account the
ranges [2].
In the study of the authors Zubov N. E. and others
"Stabilization of the orbital orientation of the
spacecraft", the mathematical tools of the
Butterworth polynomial of the sixth order are
given [1]. The calculation of the roots of
the polynomial is used in the matrix, which forms
the coefficients of the regulator. Complex
neural network calculations make it possible to
stabilize the spacecraft when the coordinate system
does not coincide with the axes of inertia.
The neural network method solves the
problems of pole placement. Analytical
expressions of the feedback matrix of the
controller solve the problems of stabilization of
the spacecraft's orbital station [7]. In the study of the
authors Saikin A.M., Buznikov S. E., Shabanov
N. S., Elkin D. S. and others "Mathematical
model of the dynamic stabilization system of an
unmanned vehicle", a study of dynamic
stability stabilization along the course is carried
out. Stabilization is necessary for high-speed cars, in
case the car exceeds the speed limit [10].
Application of neural network solutions in the study
of the authors Kornyushko V. F. and others, the
issues of quality management of the chemical and
technological process of continuous synthesis of
pharmaceutical substances of medicinal compounds
in flow microreactors are considered. The necessity
of using intelligent control systems for quality
control of the production of medicines is proved [8].
Calculations and technologies of the team of authors
of the Department of Information Systems in
Chemical Technology under the leadership of
Shmendel E.V. are used for chemical industries [1].
The study of the authors Khitskov E. A, Veretekhina
S. V., Medvedeva A.V., Mnatsakanyan O. L.,
Shmakova E. G., Kotenev A "Digital transformation
of society: Problems entering in the digital economy
"examines the issues of building a parallel digital
reality. The main tool for building digital reality is
trained neural networks [9].
Conflicts of Interest
The authors have no conflicts of interest to
declare .
Contribution of Individual Authors to the
Creation of a Scientific Article
(Ghostwriting Policy)
The authors equally contributed in the
present research, at all stages from the
formulation of the
problem to the final findings
and solution.
Sources of Funding for Research Presented in a
Scientific Article or Scientific Article Itself
No funding was received for conducting this study.
Creative Commons Attribution License 4.0
(Attri-bution 4.0 International, CC BY 4.0) This article
is published under the terms of the Creative
Commons Attribution License 4.0
https://creativecommons.org/licenses/by/4.0/deed.en _US