Digital Twin of Mechatronic Drive Based On The Opt
Digital Twin of Mechatronic Drive Based On The Opt
1051/matecconf/202032903071
ICMTMTE 2020
1 Introduction
Currently, in connection with the development in industry of complex and capital-intensive
production systems, accidents on which can lead to significant losses due to expensive
repairs, and the significant development of data transmission facilities, computer technology
and storage devices for large amounts of data, the concept of digital twins has appeared. [1-
5]. Behind this concept lies an approach based on forecasting methods, for example, the
residual resource of elements of complex systems [1-5]. Methods and mathematical models
for such forecasting, based on the methods of mathematical statistics, were widely developed
in the 20th century. Now this approach, based on recording a large amount of measurement
data in the database, makes it possible to form training samples of conditionally "suitable",
that is, those capable of fulfilling a functional purpose with a high probability, and
conditionally "unusable elements of systems that can lead to an accident. the entire system
soon and must be replaced immediately. Another approach involves modeling the parameters
of the control algorithm in order to adapt it to changing operating conditions both due to
material degradation and environmental changes.
The purpose of the digital twin is determined in accordance with [1–5] as a software
model, with the help of which it is possible to determine the degree of conformity of the
© The Authors, published by EDP Sciences. This is an open access article distributed under the terms of the Creative Commons
Attribution License 4.0 (http://creativecommons.org/licenses/by/4.0/).
MATEC Web of Conferences 329, 03071 (2020) https://doi.org/10.1051/matecconf/202032903071
ICMTMTE 2020
control model incorporated in the control program of the mechatronic device and the real
parameters of the drive. If during the operation of the mechatronic device the parameters
change due to the degradation of the nodes, then during control the errors of the output
parameter (angular speed of the drive) will increase. To ensure the specified accuracy of the
angular speed of the drive, an algorithm for adapting the control program is proposed based
on modeling the state and control matrices [6-18].
This paper presents a mathematical model of a digital twin for a BLDC motor, as an
element of a production line, and optimally controlled using a nonlinear algorithm. Modeling
the operating conditions from the model will allow the controller to adapt to changing
operating conditions.
We find solution (2) as a solution to the matrix equation, i.e. the state score will be
calculated as:
xˆ k = Ck−1y k . (4)
The optimal solution (3) with the view (4) is found in the form of [12-17]:
u k = −G −k 1BTk K k xˆ k (5)
where Kk is the Cauchy matrix, which can be found by solving the Riccati equation [16,17]:
−K
= Q + AT K + K T A − K T BG −1BT K
(6)
where Q and G are positive arbitrarily defined matrices. The matrices Q and G are chosen
positive definite, since affect only the scale of the solution. We will select these matrices by
selection or modeling [16,17].
The quality criterion that minimizes the energy of control and displacement, in this case,
is a quadratic form:
2
MATEC Web of Conferences 329, 03071 (2020) https://doi.org/10.1051/matecconf/202032903071
ICMTMTE 2020
1 tf T
I= (x Qx + uT Gu )dt , Q 0, G 0
2 t0 (7)
The control process assumes adjusting the matrix Ak at each control step. In the initial
serviceable state of the mechatronic device, only one element will change in this matrix. This
element contains a variable load moment, which is calculated according to the data of the
information-measuring system in terms of the BLDC motor shaft as
𝑴𝑴(𝒌𝒌) = 𝜺𝜺(𝒌𝒌)𝑱𝑱, (8)
𝝎𝝎(𝒌𝒌+𝟏𝟏)−𝝎𝝎(𝒌𝒌)
𝑴𝑴(𝒌𝒌) = 𝑱𝑱, (9)
𝑻𝑻
𝜽𝜽(𝒌𝒌+𝟏𝟏)−𝜽𝜽(𝒌𝒌)
𝛚𝛚(𝒌𝒌 + 𝟏𝟏) = , (10)
𝑻𝑻
where ε(k) is the angular acceleration reduced to the BLDC motor shaft, which is necessary
to return to the trajectory set during control;
J is the moment of inertia of the mechatronic device reduced to the electric drive shaft.
Let the accuracy of the trajectory execution by the mechatronic device be given as δ max,
determined by the tolerances for the manufacture of the components of the mechatronic
device and the permissible environmental parameters of the functioning of this mechatronic
device. The control device at the moment of loss of controllability according to the criterion
of an increase in the trajectory errors above the given δmax or the impossibility of performing
control due to the exceeding of the passport values of the parameters of the electric motor
starts the algorithm for modeling the state and control matrices on the digital twin.
The program for modeling the state and control matrices of the digital twin can be placed
on a high-performance external processor that receives data from the memory, into which the
control unit of the mechatronic device places the current state and control matrices at regular
intervals while moving along a certain trajectory segment. On the other hand, if the frequency
of control measurements is large, and the processor power of the control device is sufficient,
then simulation of the state and control matrices can be implemented in the background on
the device itself.
The following algorithm is proposed for modeling the state and control matrices on a
digital twin to ensure the minimum control energy for a given accuracy of the angular speed
of the drive.
1. Initial data for modeling:
- the designated section of the trajectory of movement in the form of a vector s k consisting of
elements s(k), k = 1,2, ..., K;
- state matrix 𝐀𝐀𝒌𝒌 (𝝎𝝎𝒌𝒌 |𝐬𝐬(𝒌𝒌)) = [𝒂𝒂𝒊𝒊𝒊𝒊 (𝒌𝒌)], 𝒌𝒌 = ̅̅̅̅̅
𝟏𝟏, 𝑲𝑲 , 𝒊𝒊, 𝒋𝒋 = ̅̅̅̅̅
𝟏𝟏, 𝑵𝑵 ;
- the control matrix 𝐁𝐁𝒌𝒌 (𝝎𝝎𝒌𝒌 |𝐬𝐬(𝒌𝒌) = [𝒃𝒃𝒑𝒑𝒑𝒑 (𝒌𝒌)], 𝒌𝒌 = 𝟏𝟏, 𝑲𝑲, 𝒑𝒑 = ̅̅̅̅̅
̅̅̅̅̅ 𝟏𝟏, 𝑵𝑵 , 𝒒𝒒 = ̅̅̅̅̅̅
𝟏𝟏, 𝑴𝑴 , 𝑴𝑴 ≤ 𝑵𝑵;
̅̅̅̅̅̅̅̅̅̅ ̅̅̅̅̅̅̅̅̅̅̅
- 𝒏𝒏𝒊𝒊𝒊𝒊 , 𝒏𝒏𝒑𝒑𝒑𝒑 = ±𝟎𝟎, 𝟏𝟏, 𝟐𝟐, … , 𝒊𝒊𝒊𝒊 = 𝟏𝟏, 𝑵𝑵 ∗ 𝑵𝑵 , 𝒑𝒑𝒑𝒑 = 𝟏𝟏, 𝑵𝑵 ∗ 𝑴𝑴 are indices of enumeration of
model options.
2. We will change the parameters of the control and state matrices for all indices i, j, p, q
of matrices A, B and the indices of enumeration of degradation options nij, npq for all points
of the trajectory
𝐬𝐬(𝒌𝒌|𝒏𝒏𝒊𝒊𝒊𝒊 , 𝒏𝒏𝒑𝒑𝒑𝒑 ), 𝒌𝒌 = 𝟏𝟏, 𝟐𝟐, … , 𝒏𝒏𝒊𝒊𝒊𝒊 , 𝒏𝒏𝒑𝒑𝒑𝒑 = ±𝟎𝟎, 𝟏𝟏, 𝟐𝟐, … .
𝐀𝐀𝒌𝒌 (𝒊𝒊, 𝒋𝒋, 𝒏𝒏𝒊𝒊𝒊𝒊 ) = [𝒂𝒂𝒊𝒊𝒊𝒊 (𝒌𝒌) ± 𝒏𝒏𝒊𝒊𝒊𝒊 ∆𝒂𝒂𝒊𝒊𝒊𝒊 , 𝒏𝒏𝒊𝒊𝒊𝒊 = 𝟎𝟎, 𝟏𝟏, 𝟐𝟐, … . ],
𝐁𝐁𝒌𝒌 (𝒑𝒑, 𝒒𝒒, 𝒏𝒏𝒊𝒊𝒊𝒊 , 𝒏𝒏𝒑𝒑𝒑𝒑 ) = [𝒃𝒃𝒑𝒑𝒑𝒑 (𝒌𝒌) ± 𝒏𝒏𝒑𝒑𝒑𝒑 ∆𝐛𝐛𝒑𝒑𝒑𝒑 , 𝒏𝒏𝒑𝒑𝒑𝒑 = 𝟎𝟎, 𝟏𝟏, 𝟐𝟐, … . ].
3
MATEC Web of Conferences 329, 03071 (2020) https://doi.org/10.1051/matecconf/202032903071
ICMTMTE 2020
∆𝒂𝒂𝒊𝒊𝒊𝒊 и ∆𝐛𝐛𝒑𝒑𝒑𝒑 are the increments for matrix elements that determine the accuracy of modeling
the state and control matrices A, B.
3. Let us calculate the standard deviation of the control voltage over all components of
the control vector uk with the components at each step 𝒖𝒖𝒌𝒌 (𝒏𝒏), 𝒏𝒏 = ̅̅̅̅̅ 𝟏𝟏, 𝑵𝑵, determined
according to (5):
𝟏𝟏
𝝈𝝈𝟐𝟐 (𝒖𝒖𝑲𝑲 , 𝒔𝒔𝑲𝑲 |𝒊𝒊, 𝒋𝒋, 𝒑𝒑, 𝒒𝒒, 𝒊𝒊𝒊𝒊, 𝒑𝒑𝒑𝒑) = ∑𝑲𝑲 𝟐𝟐 𝟐𝟐 𝟐𝟐
𝒌𝒌=𝟏𝟏(𝒖𝒖𝒌𝒌 (𝟏𝟏) + 𝒖𝒖𝒌𝒌 (𝟐𝟐) + ⋯ + 𝒖𝒖𝒌𝒌 (𝑵𝑵)) .
𝑲𝑲
This value, up to a constant coefficient, can be interpreted as the control energy E on the
trajectory section 𝒔𝒔(𝒌𝒌), 𝒌𝒌 = 𝟏𝟏, 𝟐𝟐, … , 𝑲𝑲;
4. We define the combination of control and state matrices corresponding to the minimum
standard deviation as:
𝐀𝐀𝒌𝒌 | 𝐦𝐦𝐦𝐦𝐦𝐦 (𝝈𝝈𝟐𝟐 (𝒖𝒖𝑲𝑲 , 𝒔𝒔𝑲𝑲 |𝒊𝒊, 𝒋𝒋, 𝒑𝒑, 𝒒𝒒, 𝒊𝒊𝒊𝒊, 𝒑𝒑𝒑𝒑) ) = [𝒂𝒂𝒊𝒊𝒊𝒊 (𝒌𝒌)],
𝐁𝐁𝒌𝒌 | 𝐦𝐦𝐦𝐦𝐦𝐦 (𝝈𝝈𝟐𝟐 (𝒖𝒖𝑲𝑲 , 𝒔𝒔𝑲𝑲 |𝒊𝒊, 𝒋𝒋, 𝒑𝒑, 𝒒𝒒, 𝒊𝒊𝒊𝒊, 𝒑𝒑𝒑𝒑)) = [𝒃𝒃𝒑𝒑𝒑𝒑 (𝒌𝒌)],
for specific indices 𝒊𝒊 = 𝒊𝒊𝒎𝒎𝒎𝒎𝒎𝒎 , 𝒋𝒋 = 𝒋𝒋𝒎𝒎𝒎𝒎𝒎𝒎 , 𝒑𝒑 = 𝒑𝒑𝒎𝒎𝒎𝒎𝒎𝒎 , 𝒒𝒒 = 𝒒𝒒𝒎𝒎𝒎𝒎𝒎𝒎 , , 𝒊𝒊𝒊𝒊 = 𝒊𝒊𝒊𝒊𝒎𝒎𝒎𝒎𝒎𝒎 , 𝒑𝒑𝒑𝒑 = 𝒑𝒑𝒑𝒑𝒎𝒎𝒎𝒎𝒎𝒎 ,
corresponding to the minimum control energy.
5. The calculated trajectory during simulation will be equal to
̂𝒌𝒌−𝟏𝟏 + 𝑩𝑩𝒌𝒌−𝟏𝟏 (𝒑𝒑𝒎𝒎𝒎𝒎𝒎𝒎 , 𝒒𝒒𝒎𝒎𝒎𝒎𝒎𝒎 )𝒖𝒖𝒌𝒌−𝟏𝟏
𝐬𝐬̂(𝒌𝒌) = 𝐱𝐱̂ 𝒌𝒌 = 𝑨𝑨𝒌𝒌−𝟏𝟏 (𝒊𝒊𝒎𝒎𝒎𝒎𝒎𝒎 , 𝒋𝒋𝒎𝒎𝒎𝒎𝒎𝒎 )𝒙𝒙 (11)
Constant elements of control and state matrices do not change during brute-force simulation.
A dynamic model of the BLDC motor was developed in a rotating coordinate system (d, q),
oriented along the magnetic axis of the rotor. Based on the second Kirchhoff's law, an
equation has been compiled that describes the electrical part of the BLDC motor in the d, q
coordinate system rotating at the rotor speed ω:
𝒅𝒅𝒊𝒊̅𝒔𝒔
̅̅̅𝒔𝒔 = 𝒊𝒊̅𝑹𝑹
𝒖𝒖 𝒔𝒔 𝒔𝒔 + 𝑳𝑳𝒔𝒔
̅̅̅̅𝟎𝟎
+ 𝒋𝒋𝒋𝒋𝑳𝑳𝒔𝒔 𝒊𝒊̅𝒔𝒔 + 𝒋𝒋𝒋𝒋Ф (12)
𝒅𝒅𝒅𝒅
where ̅̅̅ 𝒖𝒖𝒔𝒔 = 𝒖𝒖𝒔𝒔𝒔𝒔 − 𝒋𝒋𝒋𝒋𝒔𝒔𝒔𝒔 is the resulting voltage vector on the stator winding;
𝑹𝑹𝒔𝒔 , 𝑳𝑳𝒔𝒔 are active resistance and total inductance of the stator phase;
̅̅̅̅𝟎𝟎 = Ф𝟎𝟎𝟎𝟎 + 𝒋𝒋Ф𝟎𝟎𝟎𝟎 is the magnetic flow vector of the BLDC motor;
Ф
𝒋𝒋𝒋𝒋𝑳𝑳𝒔𝒔 𝒊𝒊̅𝒔𝒔 is voltage drop caused by the stator magnetic flux;
𝒋𝒋𝒋𝒋Ф ̅̅̅̅𝟎𝟎 is voltage drop caused by the main magnetic flux of the BLDC motor, which is created
by the rotor.
Let us represent a model of a mechatronic drive based on a BLDC motor in the form (1,2),
taking C=E:
R
1 − T L Tp (k ) 0 0 T
id (k + 1) i (k )
d L
0
i (k + 1) − Tp 1 − T R K
−T m 0 iq (k ) T u d (k )
x(k + 1) = q = L L ( k ) + 0 u ( k )
(k + 1) K F M (k ) L q
(k + 1) 0 T m 1−T −T 0 (k ) 0 0
J J J (k )
0 0
0 T 1 0
(13)
iˆd (k ) 1 0 0 0 id (k ) id
iˆq (k ) = 0 1 0 0 iq (k ) iq
+
ˆ (k ) 0 0 1 0 (k )
ˆ(k ) 0 0 0 1 (k )
(14)
4
MATEC Web of Conferences 329, 03071 (2020) https://doi.org/10.1051/matecconf/202032903071
ICMTMTE 2020
where id (k ), iq (k ), (k ), (k ) are the measured value of currents, angular velocity and
displacement;
(k + 1) is the planned value of the angular speed;
θ(k+1) is the planned value of the angular position of the motor shaft;
T is sampling interval, time between k+1 and k samples;
R is the active resistance of the stator winding of the BLDC motor;
Lq, Ld are inductance of the BLDC motor stator along the q and d axes;
p is the number of pairs of poles of the BLDC motor;
ψ is the magnetic flux induced by permanent magnets in the stator winding;
F is coefficient of viscous friction in the BLDC motor;
J is moment of inertia;
M(k) is the electromagnetic moment of the BLDC motor;
id (k + 1), iq (k + 1), (k + 1), (k + 1) are projection of the stator current on the d-axis,
projection of the stator current on the q axis, the angular velocity, angular displacement of
the BLDC motor at time k+1;
uq, ud are stator voltage projections on the q and d axes;
[id iq ]T is measurement error vector;
R
1 − T L Tp (k ) 0 0
R K
− Tp 1 − T −T m 0
A= L L
0 Km F M (k )
T 1− T −T 0
J J J (k )
0 0 T 1
. (15)
Control matrix is:
T
L 0
T
B = 0
L
0 0
0 0
(16)
Variable in the process of operation and simulated components R, L for the state matrix
(15) and L for the control matrix (16) of the BLDC motor model.
5
MATEC Web of Conferences 329, 03071 (2020) https://doi.org/10.1051/matecconf/202032903071
ICMTMTE 2020
1 − T *1056 T * 8 * (k ) 0 0
− T * 8 * 1 − T *1056 − T * 0.444 0
A= M (k )
0 T * 33.333 1 − T * 41.667 − T 0
0.0000024 * (k )
0 0 T 1 .(17)
The control matrix of the BLDC motor JK42BLS01 model will be equal to
555.55 0
0 555.55
B=
0 0
. 0 0 (18)
Let's set the measurement matrix C in the form of a unit matrix, we get:
𝑖𝑖̂𝑑𝑑 𝑖𝑖𝑑𝑑 𝜉𝜉𝐼𝐼𝑑𝑑
𝑖𝑖̂ 𝜉𝜉𝐼𝐼
[ 𝑞𝑞 ] = [𝑖𝑖𝑞𝑞 ] + 𝑞𝑞 , (19)
𝜔𝜔̂ 𝜔𝜔 𝜉𝜉𝜔𝜔
𝜃𝜃̂ 𝜃𝜃 [ 𝜉𝜉𝜃𝜃 ]
[ ]T
where id iq
is the vector of measurement errors that can be simulated by
a pseudo-random number generator. In this experiment, the vector of control errors is taken
equal to zero.
The BLDC motor JK42BLS01 was simulated in the MatLab program. Time T=0.001 sec.
6
MATEC Web of Conferences 329, 03071 (2020) https://doi.org/10.1051/matecconf/202032903071
ICMTMTE 2020
Figure 1 shows the projections of the voltage vector Ud, Uq of the BLDC motor stator,
calculated on the basis of the Riccati equation in the MatLab program.
Figure 2 shows the projections of the control currents id and iq.
Fig. 1. Projections of the voltage vector Ud, Uq of the stator, calculated on the basis of the Riccati
equation.
4 Conclusion
This paper presents a digital twin of a mechatronic drive based on a BLDC motor model
based on a nonlinear discrete and optimal control model. Simulation on a digital twin by a
7
MATEC Web of Conferences 329, 03071 (2020) https://doi.org/10.1051/matecconf/202032903071
ICMTMTE 2020
complete enumeration of discrete values of the BLDC motor parameters with a search for
elements of control and state matrices according to the criterion of the minimum control
energy will make it possible to introduce a correction into the control program for the
mechatronic device control device. The minimization of the control energy according to the
proposed algorithm provides:
1. Optimal control of BLDC motor according to the criterion of minimum control energy.
2. Adaptation of the control algorithm to changing operating conditions.
3. Maintaining the dynamic range of control voltages at close to the original values of the
voltage.
4. Increasing the accuracy of the reproduction of the trajectory in comparison with the
current accuracy.
The mechanism of digital twins, which implements the proposed adaptation algorithm,
can be implemented both on a processor external to the mechatronic device and on the
processor of the control device for this mechatronic device.
References
1. W. Michael, Grieves Digital Twin: Manufacturing Excellence through Virtual Factory
Replication. LLC, 7 p. (2014)
2. D. Tarkhov, A. Vasilyev, Semi-empirical Neural Network Modeling and Digital Twins
Development. London. Academic Press. 240 p. (2020)
3. R. Kharat, V. Bavane, S. Jadhao, R. Marode, Digital Twin: Manufacturing Excellence
through Virtual Factory Replication. Global journal of engineering science and
researches. 10 p. (2018)
4. A.G. Kravets, A.A. Bolshakov, M.V. Shcherbakov, Cyber-Physical Systems: Advances
in Design & Modelling. Springer. 340 p. (2020)
5. E.A. Lee, Cyberphysical systems: Design challenges. 11th IEEE International
Symposium on Object and Component-Oriented Real-Time Distributed Computing
(ISORC). Orlando. IEEE. pp. 363-369. (2020)
6. K. Sang-Hoon, Electric Motor Control DC, AC and BLDC Motors. Elsevier Inc., 426
p. (2017)
7. P. Stepanov, Yu. Nikitin, Diagnostics of Mechatronic Systems on the Basis of Neural
Networks with High-Performance Data Collection. Mechatronics 2013: Recent
Technological and Scientific Advances. Springer Intrenational Publishing Swizerland,
2014. 7–9.10.2013, Brno, Czech Republic. Pp. 433-440. (2013)
8. Yu. Turygin, P. Božek, I. Abramov, Yu. Nikitin, Reliability Determination and
Diagnostics of a Mechatronic System. Advances in Science and Technology. Vol. 12,
No. 2, June, pp. 274-290. (2018)
9. S. Trefilov, Y. Nikitin, Automatic warehouses with transport robots of increased
reliability. ActaLogistica, vol. 5, no. 3. Pp. 19-23. (2018)
10. P. Bozek, A. Shchenyatsky, Yu. Turygin, Yu. Nikitin, Yu. Karavaev, Reverse validation
of a programmed robot trajectory based on INS. 12th International Conference
ELEKTRO 2018. IEEE, Mikulov, Czech Republic. 21-23 May 2018. Pp. 1-4. (2018)
11. S.A. Trefilov, Yu.R. Nikitin, Robot drives diagnostics by identifiability criterion based
on state matrix. Instrumentation Engineering, Electronics and Telecommunications -
2019 : Proceedings of the V International Forum (Izhevsk, Russia, November 20-22,
2019). Izhevsk. Publishing House of Kalashnikov ISTU. 123 p. Pp.105-114. (2019)
12. P. Eykhoff, System Identification: Parameter and State Estimation. Wiley-Interscience,
New York. 555 p. (1974)
8
MATEC Web of Conferences 329, 03071 (2020) https://doi.org/10.1051/matecconf/202032903071
ICMTMTE 2020
13. P. Eykhoff, ed., Trends and progress in system identification. Oxford, England:
Pergamon. 402 p. (1981)
14. D. Graupe, Identification of system. New York, R.E.Krieger Publishing Company. 302
p. (1976)
15. L. Ljung, System identification. Theory for the user. 2nd ed. PTR Prentice Hall, Upper
Saddle River. 609 p. (1999)
16. A. Sage, J. Melsa, System identification. New York, Academic press. 221 p. (1999)
17. A. Sage, J. Melsa, Estimation Theory with Applications to Communications and
Control. New York, McGraw-Hill. 496 p. (1971)
18. H. Luo, Plug-and-Play Monitoring and Performance Optimization for Industrial
Automation Processes. Springer Fachmedien Wiesbaden GmbH. 158 p. (2017)