This document discusses an adaptive neural network controller for strict-feedback nonlinear systems. It begins by introducing the research topic of controlling such nonlinear systems. It then describes using a neural network to approximate unknown functions in the system model. The third part details designing an adaptive controller for a first-order strict-feedback system using Lyapunov stability analysis and updating the neural network weights online. Finally, it applies this approach to control the joints of a three degree-of-freedom robotic arm. Simulation results demonstrate the link trajectories track the desired motions with small errors.
Deep Neural Networks (D1L2 Insight@DCU Machine Learning Workshop 2017)
Adaptive neural network controller for strict-feedback nonlinear systems
1. Adaptive neural network controller
for strict – feedback nonlinear
systems
Nguyen Cong Dan
Hanoi University of Science and
Technology
2. The main content
Researching object
Using neural networks to approximate a smooth
function
Designing an adaptive controller for strict-
feedback nonlinear systems
Applying this controller to Robot SCARA
211/23/2015 Nguyen Cong Dan
3. Part 1: Researching object
• Nonlinear systems written by strict – feedback
form:
3
1 1 1 1 1 2
2 2 1 2 2 1 2 3
1 2 1 2
1
( ) ( )
( , ) ( , )
.........
( , ,..., ) ( , ,..., )n n n n n
x f x g x x
x f x x g x x x
x f x x x g x x x u
y x
&
&
&
11/23/2015 Nguyen Cong Dan
4. Part 2: Neural network to approximate
a smooth function.
• With a smooth unknown function:
• Constructing a neural network having structure :
Where :
: Input vector
: the first layer weight
: the second layer weight
4
( ) : m
h Z R R
( ) ( )T T
nng Z W S V Z
1
,1
TT m
Z R
Z
( 1)
1 2, ,... m l
lV v v v R
1 2, ,...
T l
lW w w w R
11/23/2015 Nguyen Cong Dan
5. Neural network to approximate
a smooth function.
5
INPUT LAYER 1 LAYER 2 OUTPUT
1
2
3
1
2
l
m+1
V(m+1,l) W(l,1)
11/23/2015 Nguyen Cong Dan
6. Part 3: Designing adaptive neural
network controller
• First order system:
• Define:
• Choose an integral-type Lyapunov function:
6
1 1 1 1 1 1
1
( ) ( )x f x g x u
y x
&
1 1 ;dz x y 1 1 1 1 1 1( ) ( ) / ( )x x g x g
1
1 10
( ) 0
z
z dV y d
11/23/2015 Nguyen Cong Dan
7. Designing adaptive neural
network controller
• We can choose a controller for this system:
Where:
• Following Lyapunov theory, control function u1 can make this
system stability.
• Problem: f1(.) and g1(.) are uncertain, thus we can’t define exactly
as well as u1.
7
1 1 1 1
1 1
1
( ) ( )
( )
u k t z h Z
x
g
1
1 1 1 1 1 1 1 10
* ( ) ( ) ( ) ( )d dh Z x f x y z y d & 3
1 1[ , , ]T
d dZ x y y R &
1 1( )h Z
11/23/2015 Nguyen Cong Dan
8. Designing adaptive neural
network controller
• Apply the neural network designed to
approximate
• And layer weights are updated during training
process by proper laws.
8
1 1( )h Z
1 1 1 1 1 1 1
1 1
1 ˆ ˆ[ ( ) ( )]
( )
T T
u k t z W S V
x
Z
g
11/23/2015 Nguyen Cong Dan
9. N-dimensional nonlinear system
• Using backstepping design we can find adaptive NN controller for n-
dimensional system. We need n steps, each step uses an intermediate
control function.
• By viewing x2 as a virtual control input for (1); x3 as a virtual control input
for (2)… along the similar process with the first order system. We can
design intermediate control functions, train Neural network weights, and
offer final controller.
9
1 1 1 1 1 2
2 2 1 2 2 1 2 3
1 2 1 2
1
( ) ( ) (1)
( , ) ( , ) (2)
.........
( , ,..., ) ( , ,..., ) ( )n n n n n
x f x g x x
x f x x g x x x
x f x x x g x x x u n
y x
&
&
&
11/23/2015 Nguyen Cong Dan
10. Part 4: Apply this method to
control Robot SCARA
• Robot Scara 3 DOF (2 Revolute joints and 1 Prismatic joint)
10
(1)(2)
(3)
- mi and ai : are the mass and the
length of link i, (i =1,2,3)
- qi is the joint variable in joint i
1 1 2 2 3 3; ;q q q d
1 2 3[ , , ]T
q q q q
Joint 2
Joint 3
Joint 1
11/23/2015 Nguyen Cong Dan
11. Robot Scara 3 DOF
Dynamic equation:
11
( ) ( , )M q q q q U && &
1
2
T
U T
F
1
q M U
&&
11 12 13
21 22 23
31 32 33
( ) ;
m m m
M q m m m
m m m
1
2
3
( , ) ;
h
q q h
h
&
11/23/2015 Nguyen Cong Dan
12. Robot Scara 3 DOF
So, we can write dynamic equation for each link:
12
1 1 1
1 11 1 12 2 13 3 1
1 1 1
2 21 1 22 2 23 3 2
1 1 1
3 31 1 32 2 33 3 3
(1)
(2)
(3)
q M h M h M h u
q M h M h M h u
q M h M h M h u
&&
&&
&&
11/23/2015 Nguyen Cong Dan
13. Robot Scara 3 DOF
• Dynamic equation (1) written by strict-feedback form
• Although depend on we can view them
as uncertain ingredients. Design adaptive independent
controller for q1 like Part 3.
• Similar procedure with equation (2) and (3)
13
1 1
1 2
1 1 1
2 11 1 12 2 13 3 1
q x
x x
x M h M h M h u
&
&
2 2 3 3, , ,q q q q& &1q&&
11/23/2015 Nguyen Cong Dan
17. Conclusion
• The report has presented a method about adaptive NN
control for strict-feedback nonlinear systems using
backstepping design.
• Apply successfully this method to robotic arm, we
can design independent controllers for each link of
robot SCARA.
1711/23/2015 Nguyen Cong Dan
Editor's Notes
I will present overview about my report.
The name of my thesis: adaptive neural network controller for strict feedback nonlinear systems
My report has 4 parts
Part1 2 3
Part 4: Apply this controller to real objective. It is Robot scara.
We start with Part 1: Researching object
Object in here is a nonlinear system with strict feedback form :
U is input, y is output, X are state variable
With sufficient model, we have some method to design controller.
If function g1, g2, .. gn are uncertain, We have some difficulties To design controller for this object
To solve this difficulty ,we can use neural networks to approximate uncertain ingredients
Unknown function h(Z) We construct a neural network have structure like this
gnnZ is output of NN
You can see .We have input, layer 1, layer 2, output
V and W are layer weight matrix.
By training V and W, we can gain output of network approximate output of function h(Z).
We use this structure of neural network to apply in next part.
And part 3: design adaptive neural network controller
With the first order system.
we choose Lyapunov function like this. This is a positive function.
Following Lyapunov theory ,We can choose control function u1 for system stability.
But problem in here is f1 and g1 are uncertain so we need use NN having structure in part 2 to approximate them.
Formula of training weight matrix you can see on your documents which I gave you.
with higher order systems we have Similar process
Step1 by viewing x2 as a virtual control input for equation 1,We design intermediate control functions,
step 2 by viewing x3 as a virtual control input for equation 2
And finally, step n we can design complete controller.
Part 4: apply neural network controller for real object.
Robot SCARA with 3 dof.
First, we need to establish dynamic equations for robot.
M(q): is mass matrix
We can write dynamic equation for each link
U1 u2 U3
They are control inputs (moment or force impact in joints)
Expand the equation we have equation for each link.
We need write them under strict-feedback form
To Apply easily adaptive controller which we designed in part 3
After design controllers, we simulate system with Matlab Simulink software
You can see schematic of system.
The first block is adaptive controller, the second block is robot model.
On the left is desired trajectory of each link,
On the right is Real trajectory of each link
This model is insufficient, we need to add Direct Kinematics and Inverse Kinematics
With one desired orbit of end-effector we calculate to gain orbits of each link by IK problem,
then after controller, we have real orbits of each link, by DK problem we have real orbit of end-effector
And here is results from simulation
The red line is desired orbit
The green line is real orbit of each link.
You can see: Real signal approximate Desired signal
Error between desired orbit and real orbit
Small error prove that controller give good quality for system