The document presents a new approach to implementing model-based control of systems using neural networks. A neural network is trained to model the dynamic behavior of a system. State-space matrices representing the system are then extracted from the neural network model. A model-based control law using the state-space representation is designed. Simulations show the neural network model matches the analytical model and the controller drives the system states to desired values. The approach is computationally efficient for complex nonlinear systems and does not require prior knowledge of system parameters. Future work involves extending the method to real-world experiments.
1. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
Conversion of Neural Network Models to
State-Space Models for Model-Based Control
Design
Sai Susheel Praneeth Kode
Master’s Thesis Defense
Examination Committee:
Dr. Farbod Fahimi (Adviser)
Dr. Mark Lin
Dr. Chang-kwon Kang
Mechanical and Aerospace Engineering Department
University of Alabama in Huntsville
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
2. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
Outline
1 Introduction
Problem Statement
Current Methods
Proposed Method
Procedure
2 Proposed Approach
Analytical Dynamic Model
Neural Network Dynamic Model
State-Space Extraction
Controller Design
3 Simulations and Experimentation
4 Conclusions and Future Work
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
3. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
Problem Statement
Current Methods
Proposed Method
Procedure
Problem Statement
Traditional method of system automation
Implement mathematical feedback control law
Must know system parameters, mathematical model
Limitations to traditional approach
May be difficult to measure/calculate system parameters
Mathematical model of system may not be available
May be computationally inefficient for a nonlinear or complex
system
Problem
Need method of automating system with unknown dynamic model
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
4. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
Problem Statement
Current Methods
Proposed Method
Procedure
Current Methods (Indirect Method)
Currently, neural networks are used in feedback control as
system identifiers or as controllers
A system identification NN "trains" real-time to model system
behavior
System information is typically passed on to NN controller,
which generates control input
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
5. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
Problem Statement
Current Methods
Proposed Method
Procedure
Current Methods (Direct Method)
A somewhat more straightforward method of using a NN in
feedback control is to combine the tasks of system identification
and control into a single NN
Current methods are mathematically complex due to training real
time and undesirable due to uncertain stability margins
Controller design using NN may be simplified by using static
NN as system identifier, and separate mathematical control law
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
6. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
Problem Statement
Current Methods
Proposed Method
Procedure
Disadvantages
The neural network does not accurately model the system during
training.
There is no mathematical guarantee that controller can drive the
error to zero.
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
7. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
Problem Statement
Current Methods
Proposed Method
Procedure
Proposed Method
Proposed Method
Automate system with control law that uses state-space representation
of system representation extracted from artificial neural network
dynamic model estimator
Artificial Neural Networks
Map action-reaction response of system
"Trained" using data from system
Acts as early predictor for state vector
State-Space Extraction from NN
NN contains same information as dynamic model
State-space representation matrices may be "extracted" from NN
Proposed method algebraically extracts state-space matrices of a
control affine non linear system
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
8. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
Problem Statement
Current Methods
Proposed Method
Procedure
Advantages
By offline training, we definitely have an accurate Neural
Network model.
Using Model-based control design, we can address our certain
stability margins versus uncertain stability margins of current
methods.
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
9. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
Problem Statement
Current Methods
Proposed Method
Procedure
Procedure
Derive analytic dynamic model
Acts as "virtual real robot"
Build artificial neural network
Acts as a dynamic model estimator for the system
"Trained" using input-output data from system
State-space representation of system may be extracted using
proposed method
Design a model-based mathematical feedback control law
Used in series with neural network
Calculates control input
Verify controller in simulation
Simulate controller on "virtual real robot"
Use MATLAB/Simulink Software
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
10. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
Problem Statement
Current Methods
Proposed Method
Procedure
Model-based Neural Network model
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
11. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
Analytical Dynamic Model
Neural Network Dynamic Model
State-Space Extraction
Controller Design
Analytical Dynamic Model
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
12. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
Analytical Dynamic Model
Neural Network Dynamic Model
State-Space Extraction
Controller Design
Analytical Dynamic Model
Parameters
Vc Forward speed
ω Turn rate
UL, UR PWM inputs
T Track(wheelbase)
l c.g.offset
CL,CR Damping coefficients
Kp, Kd PD speed regulator gains
a, b PWM input slope, intercept
Dynamic Model State-Space Representation
˙q = H(q(t)) + BU(t) =⇒
˙Vc
˙ω
= H(Vc, ω) + B
UL
UR
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
13. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
Analytical Dynamic Model
Neural Network Dynamic Model
State-Space Extraction
Controller Design
Neural Network Dynamic Model
Neural network predicts next state of system given current state
vector and input vector
Neural network built by "training" from input-output data
Does not require information of system parameters,
environment, etc.
q(t + δt) = ND(q(t), U(t))
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
14. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
Analytical Dynamic Model
Neural Network Dynamic Model
State-Space Extraction
Controller Design
State-Space Extraction
Neural Network Model
q(t + δt) = ND(q(t), U(t)) (1)
State-Space Model
q(t + δt) = HD(q(t)) + BD(U(t)) (2)
To extract HD , Let U =
0
0
HD(q(t)) = HD(q(t)) + BD
0
0
= ND(q(t),
0
0
) (3)
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
15. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
Analytical Dynamic Model
Neural Network Dynamic Model
State-Space Extraction
Controller Design
State-Space Extraction
To extract BD, algebraically manipulate state-space equation
q(t + δt)1 = HD(q(t)) + BD(q(t)U(t)) (4)
q(t + δt)2 = HD(q(t)) + BD(q(t)(U + δU)) (5)
Subtract to eliminate HD from equation
q(t + δt)2 − q(t + δt)1 = BD(q(t))δU (6)
Two queries of NN are required
BD(q(t))δU = ND(q(t), U(t) + δU) − ND(q(t), U(t)) (7)
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
16. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
Analytical Dynamic Model
Neural Network Dynamic Model
State-Space Extraction
Controller Design
State-Space Extraction
Let δU =
1
0
ND(q(t), U(t) +
1
0
) − ND(q(t), U(t)) =
BD11 BD12
BD21 BD22
1
0
(8)
=
BD11
BD21
Similarly we get for other
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
17. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
Analytical Dynamic Model
Neural Network Dynamic Model
State-Space Extraction
Controller Design
State-Space Extraction
Let δU =
0
1
ND(q(t), U(t) +
0
1
) − ND(q(t), U(t)) =
BD11 BD12
BD21 BD22
0
1
(9)
=
BD12
BD22
Augmented individual columns to obtain BD
BD11 BD12
BD21 BD22
= BD
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
18. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
Analytical Dynamic Model
Neural Network Dynamic Model
State-Space Extraction
Controller Design
Controller Design
Design closed-loop model-based feedback control law that uses
HD,BD extracted from NN
Any model-based control law that uses state space form may be
used
Used sliding mode control law as an example
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
19. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
Analytical Dynamic Model
Neural Network Dynamic Model
State-Space Extraction
Controller Design
Sliding Mode Control Law
The future state is given by the equation
q(t + δt) = HD(q(t)) + BDU(t) + f(q(t)) (10)
We assume an error function σ described as a sliding surface
σ(t + δt) = (q(t + δt) − qd
(t + δt)) − λ((q(t) − qd
(t))) (11)
if we can make the σ(t + δt) = 0 , then
e(t + δt) = λ(e(t))
where d denotes a desired value, and λ and K are diagonal
matrices where
0 < λ11, λ22 < 1
0 < K11, K22 < 1
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
20. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
Analytical Dynamic Model
Neural Network Dynamic Model
State-Space Extraction
Controller Design
Controller Stability Analysis
We assume
σ(t + δt) = σ(t) − K.sgn(σ(t))
For the control law to drive the error to zero
|σi(t + δt)| < |σi(t)|
If σi(t) > 0
σi(t) − Ki + fi < σi(t) =⇒ Ki > |fi|
Ki = Fi + ηi
where Fi ≥ |fi| and ηi > 0
By selecting a gain matrix K that satisfies this condition, system
stability is ensured
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
21. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
Simulation(parameters)
System parameters used in MATLAB/Simulink simulation
Parameter Value Units
Mass,[m] 8 kg
Mass Moment of Inertia, [I] 0.33 kg.m2
c.g. Offset from Axle, [l] 0.05 meters
Track, [T] 0.42 meters
Wheel Motor PD regulator Gains, [KP, KD] 10,1 No units
Wheel Motor PWM intercept slope, [a, b] 3.5285, -0.0025 m/s.bin, m/s
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
22. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
Controller gains used in MATLAB/Simulink simulation
Parameter Value Units
Error Limit, Reduces Chatter [φ]
0.1
0.28
No units
Sliding Mode Error Gain, [λ]
0.5 0
0 0.5
No units
Error Function Gain, [K]
0.1 + E1 0
0 0.1 + E2
No units
E = |(H(q(t)U(t) − N(q(t), U(t)))| (12)
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
23. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
Open loop simulation for analytical vs NN response for
linear velocity
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
24. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
Open loop simulation for analytical vs NN response for
angular velocity
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
25. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
Closed loop simulation for both velocities
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
26. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
Error in open-loop simulation for both velocities
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
27. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
Error in closed-loop simulation for both velocities
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
28. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
Open-loop experimental data vs NN response for linear
velocity
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
29. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
Open-loop experimental data vs NN response for angular
velocity
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
30. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
PWM VS Velocities for analytical data
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
31. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
PWM VS Velocities for experimental data
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
32. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
Conclusions
Hence, this thesis presents a new approach to implementing an
artificial neural network into a closed-loop, model-based state
space control law to govern the motion of an autonomous robot.
This new technique does not require information on system
parameters and does not require information from either a
mathematical or dynamic model of the system.
This method is more computationally efficient than traditional
control approaches for systems that are complex or non linear.
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
33. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
Future work
State-space representation of our model works perfectly for the
simulation, in order to have that extended to the real robot used in our
research, following state space representation is proposed.
N(q(t), U(t)) = HD(q(t)) + BD(U)U (13)
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models
34. Introduction
Proposed Approach
Simulations and Experimentation
Conclusions and Future Work
Questions
Sai Kode (University of Alabama in Huntsville) Conversion of Neural Network Models to State-Space Models