Title: Department of Electronics and Electrical Engineering
1Department of Electronics and Electrical
Engineering
Inverse Simulation Methods and Applications
TUTORIAL PRESENTATION 6th EUROSIM CONGRESS,
LJUBLJANA, SEPTEMBER 2007
David J. Murray-Smith
E-mail djms_at_elec.gla.ac.uk
2Contents and Organisation of the Tutorial
- An introduction to inverse simulation ideas and
the methods of inverse simulation developed
initially for aeronautical engineering
applications but now applied more widely
differentiation based, integration based and
optimisation-based techniques. - Some preliminary applications and case studies.
- A brief introduction to some other methods of
inverse simulation using feedback principles,
DAE-based methods. - Links between inverse simulation and model
inversion methods from control engineering. - Model-following control system design using
inverse simulation. - Applications and case studies.
- Links between nonlinear model predictive control,
receding horizon concepts and inverse simulation
methods. - Further case studies.
- Discussion.
3What is Inverse Simulation?
- Conventional modelling and simulation a process
of finding a model output for a given set of
initial conditions and a prescribed time history
of inputs. - Inverse modelling and simulation a process
through which inputs are found that will
produce a prescribed model output.
4The Inverse Simulation Process
5Model Inversion (the linear case)
- Consider the SISO linear system described by the
transfer function - Then (subject to some restrictions in terms of
realisability) the inverse is
6Model Inversion (the simple linear case)
- Inverse is realisable only if the order of the
numerator is equal to the order of the
denominator - If the inverse transfer function is not
realisable we can make it realisable by adding
sufficient additional poles to the denominator of
the inverse to make the order of denominator at
least as high as that of the numerator. Those
extra poles in E(s) must lie far to the left in
the s-plane compared with poles of N(s). - Must then use integration methods suitable for
stiff systems to generate an inverse simulation.
7Why use Inverse Simulation?
- Puts emphasis on the control action needed to
achieve a particular output response. - Specially important in the case of systems
described by nonlinear dynamic models. - Allows investigation of characteristics needed in
a control actuator to achieve a required output. - Allows investigation of limitations of human
operators in closed-loop manual control systems.
Particularly valuable in the case of constrained
responses.
8- Much of the original interest in inverse
simulation came from the helicopter design
community. Many of the issues relevant to
helicopters carry over to design problems for
other types of application such as robotics and
underwater vehicles. - Unlike fixed-wing aircraft, helicopters can hover
and move sideways or fly at low speed close to
trees, buildings and the ground. Equivalent
situations arise in the case of underwater
vehicles and robots. - Precise control of helicopter flight presents
particular design challenges that necessitate
extensive use of computer simulation techniques
at the design stage. Inverse simulation has been
found to have a particularly valuable role in
this.
9Why Simulation? Why not Inverse Models?
- Important to distinguish between inverse
simulation methods and inverse models derived by
analytical methods. - Analytical methods can be applied to linear
models and to certain forms of nonlinear model
described by equations having specific forms. - Methods of inverse simulation exist that can be
applied to models of all kinds.
10Inverse Simulation Concepts
- Initial value problem
- For inverse simulation u(t) has to be found for a
given y(t). Differentiating gives - If this equation is invertible we can write
-
The inverse model has dynamic properties that can
differ significantly from the original model. The
forcing function is dy/dt rather that y(t).
11Inverse Simulation Methods
- There are at least five broad classes of
method - Direct techniques involving numerical
differentiation. - Iterative techniques involving numerical
integration. - Techniques based on optimisation methods.
- Methods based on properties of high-gain feedback
systems. - Methods based on DAE solutions.
12Numerical Differentiation Approach of Thomson
and Bradley
- At time step n
- where yn is known.
- Then we have to find xn and un such that F1 and
F2 are approximately zero. - Then, based on a Newton-Raphson type of approach
at the mth iteration, we have
13Issues Arising with the Differentiation Approach
- The differentiation approach is model specific.
- Numerical differencing can give rise to problems
of rounding error and thus the choice of step
size ?t in numerical differentiation is very
important. - Increments used in calculation of Jacobian can
present problems. - If measured data are being used (e.g. for model
validation applications) differentiation can
amplify high frequency components and adversely
affect signal to noise ratios.
14Numerical Integration Approach of Hess, Gao and
Wang
- Involves repeated solution of the initial value
problem. - At the mth estimate at the nth time point we
define an error en as the difference between yn
and the required output ydn. - i.e. (en)m (yn)m ydn
- A Newton-Raphson approach can then be used to
find a new estimate of u as - ( un-1)m1 (un-1)m- J-1(en)m
- where J is the Jacobian. New estimates of the
state - vector, its derivative and the output are
obtained. The process continues until all
elements of en fall below a preset threshold
value.
15Description of the GENISA Algorithm
Estimates of state and output vectors
Dynamic system
Error function
State and control vectors
Newton-Raphson method
16Essentials of the Integration-based Iterative
Approach
- The desired trajectory is discretised (as in the
differentiation-based approach). - At each time point an estimate is made of the
amplitude of step change of each input to move
system to next point. - The resulting output is found and error between
actual and desired output calculated. - An iterative process then used to minimise error.
- By taking inputs over all time periods can find
input time histories needed to make the system
follow the desired trajectory.
17Features of the Integration-based Iterative
Approach
- The integration based approach is generic and can
be applied directly to any existing simulation
model. - The algorithm is slow compared with numerical
differentiation approach. - Issues of numerical accuracy have given cause for
concern.
18Limitations
- There are three categories of inverse
simulation problem - Number of inputs gt Number of outputs
- (no solution available).
- Number of inputs Number of outputs
- Number of inputslt Number of outputs
- (so-called redundant case where no inverse
of the Jacobian exists, requiring use of the
Moore-Penrose generalised inverse).
19Numerical Issues
- Algorithms based on numerical differencing can
give rise to problems of rounding error. This
presents potential difficulties for the
differentiation approach. - Problems can also arise through errors in the
calculation of the Jacobian. These can affect
both the differentiation and integration based
approaches. - Potential issues of non-uniqueness of solutions
20Calculation of the elements of the Jacobian
- In most cases of practical importance an
- approximation method must be used to
- obtain the Jacobian
- When the Jacobian matrix is not square
- (number of inputs ? number of outputs)
- may use the Moore-Penrose pseudo-
- inverse approach to obtain a solution.
-
21Input Saturation Effects
- Input saturation and limiting present a challenge
to traditional inverse simulation methods that
depend on gradient information. - Traditional methods depend on smooth properties
of both model and the manoeuvre. -
- Complications of the Jacobian can be avoided
through use of the constrained Nelder-Mead (NM)
method. This gives a derivative-free approach
based on optimisation.
22System with input constraints using
Newton-Raphson approach for Inverse
SimulationSituation at the kth discretized
interval with input saturation levels umax and
umin elements of Jacobian can become zero,
leading to problems of singularity and thus
non-convergence of the algorithm.
23Options available
- Use the NR algorithm for the model without
saturation constraints examination of time
histories of inputs can then provide useful
physical insight as limiting values are
approached. - Use other forms of inverse simulation method than
can accommodate input limits particularly
relevant for control system analysis and design.
24Optimisation-based methods
- In 1999 Celi demonstrated that the Newton-Raphson
type of iterative scheme normally used in the
standard integration-based approach could be
replaced by a numerical optimisation method.
- Since 2005 Lu and Murray-Smith have been
successfully applying the Nelder-Mead simplex
type of search-based optimisation algorithm,
which requires no gradient information, to
problems of inverse simulation. - Celi, R., Optimization-based inverse simulation
of a helicopter maneuver, In Proc. 25th Eur.
Rotorcraft Forum, Rome, Italy, H12.1-H12.12,
1999. - Lu, L., PhD Thesis, University of Glasgow, 2007.
25The Nelder-Mead Approach Applied to Inverse
Simulation
- Cost function typically takes form
- This must be minimised, subject to
- Process involves forward simulation from tk to
tk1 and then finding u(tk) that miminizes L
using the value of x(tk1) found from the forward
simulation.
26Essentials of the Constrained Nelder-Mead Approach
- The constrained Nelder-Mead algorithm is a
well-known method for minimizing a scalar-valued
nonlinear function involving only function
values. - It can handle discontinuities satisfactorily,
particularly if they do not occur near the
optimum solution. -
- For inverse simulation it combines optimization
with the integration method and, like the
Newton-Raphson approach, is applied over the
interval tk , ,tk1 . - Does not involve any analytic or numerical
gradient information. - Essentially a direct-search downhill simplex
method for function minimization slow but
robust.
27Outline of the NM Algorithm
- Algorithm first characterises a simplex in
q-dimensional space by q1 vertices. - Applying four rules involving reflection,
expansion, contraction and shrinkage a new point
in or near to the current simplex is found. - A new simplex is then formed by replacing a
vertex in the current simplex by this new point. - Cost function values at vertices of the old
simplex are compared with those for the new
simplex. - The process is continued until the diameter of
the simplex is less than a specified tolerance.
28Discretisation Processes in Inverse Simulation
- Analysis in the nonlinear case is difficult so
more appropriate to first consider a linear
system - Procedures based on integration divide into two
steps a) discretisation and b) solution. - Stability and performance of the second stage
depends on numerical properties of the algorithm.
Questions of dynamical stability are important
only for the first stage. - After discretisation the linear model above
becomes -
-
- where
- and
29Application to a Simple Surface Ship Model with
Rudder Deflection and Rate Limits
30ROV Zeefakkel(Photograph United Dutch Navy and
Maritime Forum (http//www.dutchfleet.net))
31Assessment Scheme for Inverse Simulations
32Inverse Simulation Resultsfor ROV Zeefakkel -
Relatively Small Manoeuvre
No saturation limits. Newton-Raphson method,
(?t0.2s, 20 degrees heading change)
33Inverse Simulation Results for ROV Zeefakkel
Larger Manoeuvre
No saturation limits. Newton-Raphson method,
(?t0.2s, 50 degrees heading change)
34Inverse Simulation Results for ROV Zeefakkel
Saturation limits included. Nelder-Mead method,
?t0.2s
35Assessment of Results from ROV Zeefakkel Study
- The results from inverse simulation and forward
simulation agree well for cases where there is no
saturation limit. -
- With a rudder limit of 35 deg. and rudder rate
limit of 7 deg./s. NR method fails to converge if
U lt 9 m./s. for heading change of 20 deg. and for
U lt 15 m./s. for heading change of 50 deg..
However, the NM method does provide useful
results in such cases. - As expected, the required inputs become larger as
speed falls and the larger the demanded heading
change. - The more the input involves nonlinear effects the
more difficult it is to follow the ideal (linear)
trajectory.
36Inverse Simulation - Revisiting the Fundamentals
Initial value problem
control input
output
model
Conventional simulation
desired output
control input
model
Inverse simulation
37Comparisons of Model Inversion and Inverse
Simulation Approaches
- Model Inversion
- Highly mathematical basis for nonlinear case.
- Quite extensively used for aerospace
applications. - Tends to be rather complex for application to
full-scale nonlinear models such as helicopter
and ship models. - Most approaches are noncausal for
nonminimum-phase systems. - Inverse Simulation
- Easy and feasible for implementation for
minimum-phase systems. - Involves causal inversion for some linear
nonminimum-phase systems. - Can be applied to nonlinear models without
difficulty.
38Inversion by Inverse Simulation
- Suggestion
- For discontinuous complex models such as
helicopter or ship models, it may be convenient
to use inverse simulation instead of model
inversion for FF control system design, provided
a suitable sampling interval ?t can be chosen. - Rules for selection of the interval ?t
-
- Need to guarantee the convergence of inverse
simulation process - Must attempt to keep the zeros within Unit Circle
in the discretisation process.
39Example 1- A Simple Linear NMP System
This model has two RHP zeros 0.5000 7.0534i
Investigated Model
Adopted Manoeuvre
Z
The hurdle-hop manoeuvre
40Example 1- A Simple Linear NMP System (Cont.)
Distribution of zeros in the z-plane (left) and
variation of zero magnitude with ?t (right). In
the z-plane plot, the lighter dashed line (red)
represents the unit circle.
41Example 1- A Simple Linear Non-minimum Phase
System (Cont.)
The calculated inputs from inverse simulation
Comparisons of the calculated outputs with the
ideal manoeuvres ?????? Ideal manoeuvre
--- Forward simulation
42A Feedback Systems Approach to Inverse Simulation.
- Based on principles of analog dividers and
inverse function generators and also ideas
published in the 1990s by Gray and von Grünhagen
at DLR in Germany. - Uses high gain feedback principles to generate
inputs required to produce model output that
matches the required output.
43Block Diagram for Feedback Approach to Inverse
Simulation
Model input needed to produce required model
output
Required output of model
Model output
Plant model
Gain factor
-
44Case Study A Two-Tank Liquid Level System
- Laboratory system (Tequipment Ltd) intended
for control system experiments.
45Classical Model of the System
A1 dH1/dt Qvi Cd1 a1 2g (H1 H2) ½ A2
dH2/dt Cd1 a1 2g (H1 H2) ½ - Cd2 a2 2g
(H2 H3) ½
46Experimental Data Large Transient(Set 6 ----
liquid depth (mm) versus time (seconds), H1-
blue, H2- red plugs in two largest holes)
47Comparison for data set 6(Simulation results on
left for Cd1 0.43,Cd2 0.48. Experimental
results on right)
48Input from Feedback Approach
- Plot of input flow (m3/s) as a function of
time (sec) calculated by inverse simulation using
feedback approach
49Theoretical input (cm3/min) versus time (sec)
50Comments on Feedback System Approach
- Obvious issues of stability (both model stability
and numerical stability). - Obvious issues of non-uniqueness of solutions
(depend on design method used). - Feedback analysis and design more straightforward
in this case than for closed-loop control systems
(no issues of robustness). - Computation time very much less than by other
approaches to inverse simulation.
51Differential Algebraic Equations (DAE) Approach
- Allows an inverse simulation model to be derived
directly from the structure of the conventional
system simulation model. - Readily available for users of simulation and
modelling tools such as Modelica/Dymola or
Scilab/Scicos that incorporate DAE solvers. - An inverse model of a DAE is constructed simply
by changing the meaning of variables. The result
is still a DAE which can be dealt with using
standard DAE solution methods. - See Thümmel, M., Looye, G., et al. Nonlinear
inverse models for control, Proceedings 4th
Intl. Modelica Conference, Hamburg, March 7-8,
2005, pp267-279.
52Inverse Simulation for Control Systems
Applications
- Many applications of model inversion are
associated with control system design. - Can inverse simulation techniques replace methods
of model inversion for control design
applications? For example, in combined
feed-forward/ feedback model following control
systems. - Conversely, can techniques and concepts developed
in areas such as nonlinear model-based predictive
control be used with benefit in inverse
simulation methods?
53Traditional Model-Following Structure
The Feedforward (FF) Feedback (FB) Structure
54Strengths of the FFFB Structure
- Feedforward Channel (FFC)
- Designed to compensate for the dynamics of the
plant. - May assist in providing precision tracking.
- Feedback Channel (FBC)
- Provides robust stability against uncertainties
caused by external disturbances and reduces
sensitivity to sensor noise. - Reduces the risks of long-term drifts in the
overall system response by minimizing the
feedforward inaccuracies.
55Model Following Control Applications
- Case One
- An 8th-order linearised Lynx-like helicopter
model - Four outputs heave velocity, roll rate (p),
pitch rate (q), and heading rate - Four inputs the traditional four control
channels of the helicopter - Case Two
- A full nonlinear container ship model (Son
and Nomoto) with - constraints on rudder angle, propeller speed
and rudder rate. - One output the heading angle
- One input the rudder angle
56Control Structure
FFC inverse simulation FBC the K/KS designed
by H8 approach with disturbance and measurement
noise
57Results from Case One (Helicopter)
Ideal values results without FFC stars results
with FFC solid line (?t 0.01s)
58Results from Case Two (Container ship with
heading and roll control)
Linear FFC solid Nonlinear FFC dot solid No
FFC dashed (Left, ?n0.1 rad/s right, ?n0.015
rad/s)
The feedback signals for channels p and F
(rudder-roll subsystem) are switched on from 300
s to 500 s and are switched off at all other
times
59Results from Case Two (Container Ship)
60Links with Model Predictive Control and Receding
Horizon ConceptsApplication Helicopter in
pop-up manoeuvre
61Restrictions of Conventional Inverse Simulation
Lynx flying a pop-up manoeuvre (flight velocity
120 knots, height 40 m, manoeuvre time 5 sec).
- Possible constraints
- Mechanical limitations of control surfaces
- Control rates (actuator saturation
characteristics) - Limitations of main rotor and tail rotor torque
- Human pilot limitations
- Handling Qualities requirements
- Structural limits of critical components
- Limits of state values
62Idea of Predictive Inverse Simulation
Control Input
Receding Horizon
Time
Predictive Inverse Simulation
Inverse Simulation
Predictive Control Receding Horizon
Calculates feasible solution based on heuristic
approach.
63Predictive Inverse Simulation Algorithm
Manoeuvre Modelling
Inverse Simulation GENISA Algorithm
Predictive Part Receding Horizon
States andControl Inputs
Trim Algorithm
Constraints Exceeded?
NO
Helicopter Model
YES
Decision Tree Algorithm
A Priori KnowledgeDatabase
64Mathematical Representation of Pop-Up Manoeuvre
Boundary conditions
Exit
Boundary conditions
Start
65Mathematical Representation of Pop-Up Manoeuvre
Boundary conditions
Exit
Boundary conditions
Start
Decision point
66Helicopter Model
67Decision Tree Approach
flight velocity profile
heading/sideslip constraint
heading/sideslip profile
I
Decision point
Decision Point
II
I
II
III
m
III
1
2
n
In general there might be m different modifiers.
Decision point
A Priori Knowledge database allows to reduce
dramatically a number of possible changes n.
68Simulation Results Avoiding the Collective Pitch
Limit
Lynx flying a pop-up manoeuvre (flight velocity
120 knots, height 40 m, manoeuvre time 5 sec).
receding horizon
decision point
Results of predictive inverse simulation (blue
line) using a 3 sec prediction horizon (red
line).
69Avoiding the Longitudinal Cyclic Pitch Limit
Lynx flying a pop-up manoeuvre (flight velocity
60 knots, height 34 m, manoeuvre time 5 sec).
decision point
receding horizon
Results of predictive inverse simulation (blue
line) using a 2 sec prediction horizon (red line).
70 Avoiding the Longitudinal Cyclic Pitch Limit
Lynx flying a pop-up manoeuvre (flight velocity
80 knots, height 37 m, manoeuvre time 5 sec).
decision point
receding horizon
Results of predictive inverse simulation (blue
line) using a 4 sec prediction horizon (red line).
71Avoiding the Lateral Cyclic Pitch Limit
Lynx flying a lateral realignment manoeuvre
(flight velocity 100 knots, manoeuvre time 5 sec).
receding horizon
decision point
Results of predictive inverse simulation (blue
line) using a 2 sec prediction horizon (red line).
72Conclusions relating to predictive inverse
simulation
- Method developed achieves the aim of improving
the realism of conventional inverse simulation
results by implementing the receding horizon
approach. - A process of constraint handling is incorporated
into the inverse simulation algorithm. - Predictive inverse simulation can reduce a number
of iterative calculations in application to the
conceptual design of helicopters. - Proposed methodology can form the basis for a
trajectory generation algorithm for use in
tunnel in the sky systems.
Future Work
1. Investigation of techniques that can provide
higher speed of solution for inverse simulation
problems. 2. Implementation of other helicopter
manoeuvres. 3. Incorporation of new constraints,
such as control rates limits, limitations of
rotor and tail rotor torque, limits of state
values(for example, pitch attitude).
73Areas of Current Research at the University of
Glasgow
- Further investigation of numerical issues for
iterative methods of inverse simulation. - Further research on the application of ideas from
the Model Predictive Control field to development
of improved inverse simulation algorithms and
piloting strategies (with D. Thomson, D.
Anderson, M.Bagiev and in collaboration with M.
Grimble and colleagues (University of
Strathclyde) with financial support from UK
EPSRC). Application to helicopter-ship landing
problems. - Development of inverse simulation methods based
on a feedback approach. Emphasis is on providing
inverse solutions for real-time applications such
as those arising in the receding horizon work
involving constrained helicopter flight. - Application of inverse simulation methods to
simulation model validation. - Investigation of the potential of DAE-based
methods applied to inverse simulation for
aeronautical and marine applications.
74Conclusions
- Inverse simulation can reduce need for repeated
conventional simulation runs in the investigation
of many engineering problems involving nonlinear
dynamic systems. - Inverse simulation can replace analytical
methods of model inversion for minimum-phase
problems and some kinds of linear non-minimum
phase systems. - Use of inverse simulation coupled with receding
horizon concepts provides potential for new forms
of decision support system for a range of
applications involving piloted vehicles. - However, challenging problems remain in order to
convert inverse simulation techniques into design
tools for routine use by engineers in industry. -
75Acknowledgements
- I wish to thank my research student Linghai Lu
who has contributed the applications relating to
ships and has undertaken much of the work
involving feedforward and feedback control system
design. - I also wish to thank my colleague Dr Douglas
Thomson of the Dept. of Aerospace Engineering who
was responsible for much of the fundamental
research on inverse simulation methods for
helicopter applications carried out at the
University of Glasgow. - I also thank Dr David Anderson and Dr Marat
Bagiev (Dept. of Aerospace Eng.) for their
contributions relating to the recent research on
predictive methods for helicopter piloting and to
Professor Mike Grimble and his colleagues at the
University of Strathclyde with whom we
collaborate. - I acknowledge the support of the UK Engineering
and Physical Sciences Research Council through
grant GR/S91024/01. This tutorial has been
developed with the support of that grant.
76(No Transcript)