Download as pdf or txt
Download as pdf or txt
You are on page 1of 41

2.

Robot Dynamics

 2.1 L-E and N-E Equations


 2.2 Lagrangian Method
 2.3 Properties of Dynamic Model
 2.4 Neural Network Modelling

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS -1-


2.4 Neural Network Modelling

 Neural Network Approximations


• Function Approximation
• Linearly Parametrized Neural Networks
• Non-linearly Parametrized Neural Networks
• Ge-Lee (GL) Matrix and Operator

 Neural Network Modelling of Robots

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS -2-


2.4 Neural Network Modelling

Reference Books (Part 2)


1) S. S. Ge, T. H. Lee, and C. J. Harris. Adaptive neural network
control of robotic manipulators. Vol. 19. World Scientific, 1998
2) S. S. Ge, C. C. Hang, T. H. Lee, and T. Zhang. Stable
Adaptive Neural Network Control. Kluwer Academic Publishers,
Incorporated, 1st edition, 2001

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS -3-


2.4 Neural Network Modelling

 Neural Networks

• Neural networks (NNs) consist of a large number of


simple processing elements called nodes.
• The nodes are interconnected by weighted links where the
weights are the network’s adjustable parameters.
• The arrangement of the nodes and the interconnections
defines the architecture of the NNs.

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS -4-


2.4 Neural Network Modelling

 Neural Networks

• In control engineering, a neural network is usually used to


generate input/output maps using the property that a multi-
layer neural network can approximate any function, under
mild assumptions, with any desired accuracy.

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS -5-


2.4 Neural Network Modelling

 Function Approximation

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS -6-


2.4 Neural Network Modelling

 Multi-Layer Perceptron (MLP) Network

• In the literature, quite a number of NNs for function


approximation have been used, such as the MLP network.
• The MLP network is the most widely studied neural
network structure.
• It is a feed-forward network where the input signals
propagating forwardthrough several processing layers
before the network output is calculated.

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS -7-


2.4 Neural Network Modelling

 Multi-Layer Perceptron (MLP) Network

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS -8-


2.4 Neural Network Modelling

 Linearly Parametrized Neural Networks: are the


NNs in which the adjustable parameters appear linearly.

z ( x) = V T x
y( z ) = W T a( z )

The output of the network


y ( x) = W T a(V T x)
The RBF networks belong to a class of
Three layer neural network Linear Parametrized Neural Networks
Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS -9-
2.4 Neural Network Modelling

 Linearly Parametrized Neural Networks

BP network (Back-ProPagation Network) is also called back-


propagation neural network. Through training of sample data,
the network weights and thresholds are continuously modified
to make the error function fall in the direction of negative
gradient and approximate the expected output.

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 10


2.4 Neural Network Modelling
Example: According to Table 1, predict the high jump performance
of Athlete 15. Table 1 Quality indicators of high jumpers
Order Men's 30m back Set up a Run-up Men's Weight Barbell Men's Snatch
number High run triple and High -squat squat 100m
Jump jump Touch Jump barbell coefficien
high with run t
4-6
1 2.24 3.2 9.6 3.45 2.15 140 2.8 11.0 50

2 2.33 3.2 10.3 3.75 2.2 120 3.4 10.9 70

3 2.24 3.0 9.0 3.5 2.2 140 3.5 11.4 50

4 2.32 3.2 10.3 3.65 2.2 150 2.8 10.8 80

5 2.2 3.2 10.1 3.5 2.0 80 1.5 11.3 50

6 2.27 3.4 10.0 3.4 2.15 130 3.2 11.5 60

7 2.2 3.2 9.6 3.55 2.1 130 3.5 11.8 65

8 2.26 3.0 9.0 3.5 2.1 100 1.8 11.3 40

9 2.2 3.2 9.6 3.55 2.1 130 3.5 11.8 65

10 2.24 3.2 9.2 3.5 2.1 140 2.5 11.0 50

11 2.24 3.2 9.5 3.4 2.15 115 2.8 11.9 50

12 2.2 3.9 9.0 3.1 2.0 80 2.2 13.0 50

13 2.2 3.1 9.5 3.6 2.1 90 2.7 11.1 70

14 2.35 3.2 9.7 3.45 2.15 130 4.6 10.85 70

15 ? 3.0 9.3 3.3 2.05 100 2.8 11.2 50

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 11


2.4 Neural Network Modelling
Step (a):
We take the quality indicators of the athletes 1 to 14 as input, that is (30m back run, set up
a triple jump, run-up and touch high, run-up 4-6 step high, weight-squat barbell, barbell
squat coefficient, men's 100m, snatch) , Take the corresponding high jump result as the
output.

Input=[3.2 3.2 3 3.2 3.2 3.4 3.2 3 3.2 3.2 3.2 3.9 3.1 3.2;
9.6 10.3 9 10.3 10.1 10 9.6 9 9.6 9.2 9.5 9 9.5 9.7;
3.45 3.75 3.5 3.65 3.5 3.4 3.55 3.5 3.55 3.5 3.4 3.1 3.6 3.45;
2.15 2.2 2.2 2.2 2 2.15 2.14 2.1 2.1 2.1 2.15 2 2.1 2.15;
140 120 140 150 80 130 130 100 130 140 115 80 90 130;
2.8 3.4 3.5 2.8 1.5 3.2 3.5 1.8 3.5 2.5 2.8 2.2 2.7 4.6;
11 10.9 11.4 10.8 11.3 11.5 11.8 11.3 11.8 11 11.9 13 11.1 10.85;
50 70 50 80 50 60 65 40 65 50 50 50 70 70];
Output=[2.24 2.33 2.24 2.32 2.2 2.27 2.2 2.26 2.2 2.24 2.24 2.2 2.2 2.35];

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 12


2.4 Neural Network Modelling
Step (b):
BP network consists of input layer, hidden layer and output layer.
1) Design of input and output layers
The model takes various quality indicators of each set of data as input and high jump
performance as output, so the number of nodes in the input layer is 8 and the number of
nodes in the output layer is 1.
2) The question of selecting the number of hidden neurons refers to the following empirical
formula:

Where n is the number of neurons in the input layer, m is the number of neurons
in the output layer, and a is constant between [1, 10].
According to the above formula, the number of neurons can be calculated between
4-13. In this experiment, the number of neurons in hidden layer is 6.

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 13


2.4 Neural Network Modelling
Step (b):
The network structure diagram is as follows:
Fig. Three layer BP neural network

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 14


2.4 Neural Network Modelling
Step (c):
Selection of incentive function. BP neural network usually uses Sigmoid
differentiable function and linear function as the activation function. In this paper,
we choose the S-tangent function tansig as the activation function of the hidden
layer neurons and the S-log function logsig as the activation function of the output
layer neurons.

Step (d):
Select relevant parameters and expected errors for training (the training results are
shown in the figure below). After training, enter the Athlete 15 and its various
quality indicators to predict the value of his high jump performance. The
prediction result is 2.20 m.

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 15


2.4 Neural Network Modelling
Step (d):
Fig. The training results

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 16


2.4 Neural Network Modelling

 Non-linearly Parametrized Neural Networks: are


the NNs in which the adjustable parameters appear
nonlinearly.

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 17


2.4 Neural Network Modelling

 Non-linearly Parametrized Neural Networks

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 18


2.4 Neural Network Modelling

 Matrix Form of NNs

where

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 19 -


2.4 Neural Network Modelling

 GL Matrix and Operator


The output network is expressed as
(1)

Another representation is

(2)

where

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 20 -


2.4 Neural Network Modelling

 GL Matrix and Operator

(1) (2)

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 21 -


2.4 Neural Network Modelling

 GL Matrix and Operator


Let

Define

where

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 22 -


2.4 Neural Network Modelling

 GL Matrix and Operator


The detailed formulations of {W} and {W}T are given by

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 23 -


2.4 Neural Network Modelling

 GL Matrix and Operator

where

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 24 -


2.4 Neural Network Modelling

 GL Matrix and Operator: Properties


1. The definition of transpose for GL matrix (vector) is different
from that of conventional matrix (vector). It only transpose its
elementary vectors locally.
2. The transpose of a GL row vector equals the transpose of the
corresponding conventional vector. For example, .
3. A conventional matrix (vector) can be taken as a GL matrix
(vector) by grouping the elements of the matrix (vector) into
sub-vectors accordingly.
4. The GL product of two GL matrices (or two GL vectors) leads to
a conventional matrix (or a vector). For example,
and .

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 25 -


2.4 Neural Network Modelling

 GL Matrix and Operator


Let a GL row vector

• Def: The GL product of a square matrix and a GL row vector


is defined as

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 26 -


2.4 Neural Network Modelling

 GL Matrix and Operator


Note:
• 1) The GL product should be computed first in a mixed
matrix product.
• 2) The GL matrix and operator will be used in the control
design later.

Example:
Compute {A}•{B}C
1. matrix [{A}•{B}] should be computed first to get a
conventional matrix [{A}•{B}].
2. [{A}•{B}]C is computed.

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 27 -


2.4 Neural Network Modelling

 Neural Network Modelling of Robots


• The dynamics of a robot are function of position, velocity and
acceleration, and can be described by following Lagrange-
Euler equation.

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 28 -


2.4 Neural Network Modelling

 Neural Network Modelling of Robots


• NNs have been used to approximate the complete non-linear
dynamics as follows

• It can be seen that the NNs are functions of q , q and q.


• Because of the difficulty in measuring acceleration for system
identification and control system design, the format in the
above equation has been losing ground to the NN models in
which NNs are used to approximate different functions
selectively for the convenience of controller design.

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 29 -


2.4 Neural Network Modelling

 Neural Network Modelling of Robots


• The elements of D(q) and G(q), i.e. dkj(q) and gk(q) respectively
are functions of q only. Thus, static neural networks (SNN),
whose inputs are q only, are sufficient to model them. Suppose

where

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 30 -


2.4 Neural Network Modelling

 Neural Network Modelling of Robots

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 31 -


2.4 Neural Network Modelling

 Neural Network Modelling of Robots

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 32 -


2.4 Neural Network Modelling

 Neural Network Modelling of Robots


• C (q, q ) , is a function of both q and q . Therefore, dynamic
neural networks (DNN) of q and q are necessary.
• The dynamic neural network emulator cDNNkj (q, q ) of ckj (q, q ) is
given by
with z = [q T , q T ]T

Then

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 33 -


2.4 Neural Network Modelling

 Neural Network Modelling of Robots

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 34 -


2.4 Neural Network Modelling

 Neural Network Modelling of Robots


• Based on the definitions for GL matrix and operator, we have

where

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 35 -


2.4 Neural Network Modelling

 Neural Network Modelling of Robots


with

and

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 36 -


2.4 Neural Network Modelling

 Neural Network Modelling of Robots


• Similarly, we have

where

[1] S. S. Ge, T. H. Lee, and C. J. Harris. Adaptive neural network control of robotic manipulators. Vol. 19.
World Scientific, 1998.

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 37 -


2.4 Neural Network Modelling

 Neural Network Modelling of Robots


• The neural network approximations of D(q) and G(q) are
schematically shown in the following figure.

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 38 -


2.4 Neural Network Modelling

 Neural Network Modelling of Robots


• Finally, the dynamic neural network model can be obtained as
D(q )q + C (q, q )q + G (q ) = τ

𝐷𝐷𝑆𝑆𝑆𝑆𝑆𝑆 𝑞𝑞 𝑞𝑞̈ + 𝐶𝐶𝐷𝐷𝐷𝐷𝐷𝐷 𝑞𝑞, 𝑞𝑞̇ 𝑞𝑞̇ + 𝐺𝐺𝑆𝑆𝑆𝑆𝑆𝑆 𝑞𝑞 + 𝐸𝐸𝐷𝐷𝐷 = 𝜏𝜏


𝐸𝐸𝐷𝐷𝐷 = 𝐸𝐸𝐷𝐷 𝑞𝑞̈ + 𝐸𝐸𝐶𝐶 𝑞𝑞̇ + 𝐸𝐸𝐺𝐺
Dynamic NN Model D – 1

Dynamic NN model D – 2, Static NN models can be found in chapter 4 in Reference [1]

[1] S. S. Ge, T. H. Lee, and C. J. Harris. Adaptive neural network control of robotic manipulators. Vol. 19.
World Scientific, 1998.

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 39 -


2.4 Neural Network Modelling

 Neural Network Modelling of Task Space Dynamics


• The above dynamic neural network modelling method can be
directly applied to neural network modelling of robot dynamics
in Cartesian space.
• Corresponding to the joint space dynamics, the task space
dynamics are given by
Dx (q ) x + C x (q, q ) x + Gx (q ) = Fx
where
Dx ( q) = J −T ( q) D( q) J −1 ( q),
C x ( q) = J −T ( q)(C ( q, q ) − D( q) J −1 ( q) J ( q)) J −1 ( q)
Gx ( q) = J −T (q)G (q ), Fx = J −T (q )τ

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 40 -


2.4 Neural Network Modelling

 Neural Network Modelling of Task Space Dynamics


• The Cartesian space NN dynamics of robots can thus be
described as

where

[1] S. S. Ge, T. H. Lee, and C. J. Harris. Adaptive neural network control of robotic manipulators. Vol. 19.
World Scientific, 1998.

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 41 -

You might also like