0% found this document useful (0 votes)
522 views755 pages

Nonlinear Control and Filtering

Nonlilear control flatness

Uploaded by

neft
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
522 views755 pages

Nonlinear Control and Filtering

Nonlilear control flatness

Uploaded by

neft
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 755

Studies in Systems, Decision and Control 25

Gerasimos G. Rigatos

Nonlinear Control
and Filtering Using
Differential Flatness
Approaches
Applications to Electromechanical
Systems
Studies in Systems, Decision and Control

Volume 25

Series editor
Janusz Kacprzyk, Polish Academy of Sciences, Warsaw, Poland
e-mail: [email protected]
About this Series

The series “Studies in Systems, Decision and Control” (SSDC) covers both new
developments and advances, as well as the state of the art, in the various areas of
broadly perceived systems, decision making and control- quickly, up to date and
with a high quality. The intent is to cover the theory, applications, and perspectives
on the state of the art and future developments relevant to systems, decision
making, control, complex processes and related areas, as embedded in the fields of
engineering, computer science, physics, economics, social and life sciences, as well
as the paradigms and methodologies behind them. The series contains monographs,
textbooks, lecture notes and edited volumes in systems, decision making and
control spanning the areas of Cyber-Physical Systems, Autonomous Systems,
Sensor Networks, Control Systems, Energy Systems, Automotive Systems, Bio-
logical Systems, Vehicular Networking and Connected Vehicles, Aerospace Sys-
tems, Automation, Manufacturing, Smart Grids, Nonlinear Systems, Power
Systems, Robotics, Social Systems, Economic Systems and other. Of particular
value to both the contributors and the readership are the short publication timeframe
and the world-wide distribution and exposure which enable both a wide and rapid
dissemination of research output.

More information about this series at http://www.springer.com/series/13304


Gerasimos G. Rigatos

Nonlinear Control
and Filtering Using
Differential Flatness
Approaches
Applications to Electromechanical Systems

123
Gerasimos G. Rigatos
Unit of Industrial Automation
Industrial Systems Institute
26504 Rion Patras
Greece

ISSN 2198-4182 ISSN 2198-4190 (electronic)


Studies in Systems, Decision and Control
ISBN 978-3-319-16419-9 ISBN 978-3-319-16420-5 (eBook)
DOI 10.1007/978-3-319-16420-5

Library of Congress Control Number: 2015935609

Springer Cham Heidelberg New York Dordrecht London


© Springer International Publishing Switzerland 2015
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part
of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations,
recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission
or information storage and retrieval, electronic adaptation, computer software, or by similar or
dissimilar methodology now known or hereafter developed.
The use of general descriptive names, registered names, trademarks, service marks, etc. in this
publication does not imply, even in the absence of a specific statement, that such names are exempt
from the relevant protective laws and regulations and therefore free for general use.
The publisher, the authors and the editors are safe to assume that the advice and information in this
book are believed to be true and accurate at the date of publication. Neither the publisher nor the
authors or the editors give a warranty, express or implied, with respect to the material contained
herein or for any errors or omissions that may have been made.

Printed on acid-free paper

Springer International Publishing AG Switzerland is part of Springer Science+Business Media


(www.springer.com)
To Elektra
Foreword

This book analyzes the design of nonlinear filters and nonlinear adaptive controllers,
using exact linearization which is based on differential flatness theory and differ-
ential geometry methods. The obtained filters exhibit specific advantages as they
outperform in terms of accuracy of estimation and computation speed of other
nonlinear filters. The obtained adaptive controllers can be applied to a wider class of
nonlinear systems with unknown dynamics and can assure reliable functioning
of the control loop under uncertainty and under varying operating conditions.
Moreover, the book analyzes differential flatness theory-based control and filtering
methods for distributed parameter systems. The book presents a series of application
examples to confirm the efficiency of the proposed control and filtering schemes for
various electromechanical systems. These include:
(i) Industrial Robotics: neuro-fuzzy adaptive control of multi-DOF robots and
underactuated robotic manipulators, observer-based neuro-fuzzy control of
multi-DOF robotic manipulators, state estimation-based control of multi-
DOF robots and underactuated robotic manipulators, state estimation-based
control of robots and mechatronic systems under disturbances and model
uncertainties.
(ii) Mobile robotics and vehicles: state estimation-based control of autonomous
vehicles, control of cooperating vehicles with the use of nonlinear filtering,
distributed fault diagnosis for autonomous vehicles, velocity control of
four-wheel vehicles, active vehicle suspension control, control of various
types of unmanned vehicles, such as AGVs, UAVs, USVs and AUVs.
(iii) Electric Power Generation: state estimation-based control of the PMSG
(Permanent Magnet Synchronous Generator), state estimation-based control
of the DFIG (Doubly-fed Induction Generator), state estimation-based
control and synchronization of distributed PMSGs.
(iv) Electric Motors and Actuators: neuro-fuzzy adaptive control of the DC
motor, neuro-fuzzy adaptive control of the Induction motor, state estimation-
based control of the DC motor, state estimation-based control of the
Induction Motor.

vii
viii Foreword

(v) Power Electronics: state estimation-based control of power converters, state


estimation-based control of photovoltaic systems, state estimation-based
control and synchronization of distributed inverters.
(vi) Internal combustion engines: neuro-fuzzy adaptive control of diesel engines,
neuro-fuzzy adaptive control of spark-ignited (SI) engines, state estimation-
based control of valves in ship diesel engines, state estimation-based control
of turbocharged diesel engines, state estimation-based control of spark
ignited engines, state estimation-based control of the air-fuel ratio system in
combustion engines under various perturbations.
(vii) Distributed Parameter Systems: pointwise flatness-based control of distrib-
uted parameter systems, boundary flatness-based control of distributed
parameter systems, state estimation of distributed parameter systems, fault
diagnosis for sensor networks which monitor distributed parameter systems,
condition monitoring for multi-DOF buildings.
(viii) Communication Systems: state estimation for synchronization and channel
equalization in chaotic communication systems, filtering for compensation of
communication delays and packet drops in networked robotic control,
feedback control and stabilization of chaotic dynamics.
The book is primarily addressed to the academic community. The content of the
book can be the basis for teaching undergraduate or postgraduate courses on
nonlinear control systems. Therefore, it can be used by both academic tutors and
students as a reference book for such a course. The book is suitable for departments
of electrical, industrial and mechanical engineering, which can include in their
curriculum nonlinear control courses on the topic of the present monograph.
Moreover, the book is addressed to the engineering community. Engineers
working in industrial production, in electric power generation, in the design of
transportation systems, in the development of automation and electromechanical
equipment, or in several other application fields frequently come against nonlinear
control problems which have to be solved, at low cost and within hard time con-
straints. To cope efficiently with such control problems, engineers should be
acquainted with control methods of generic use, improved reliability, and clear
implementation stages. The nonlinear control and estimation methods which are
analyzed in this book fulfill the aforementioned requirements and can be a powerful
tool and a useful companion for engineers working on practical electromechanical
problems.

Athens Gerasimos G. Rigatos


March 2015
Preface

Differential flatness theory is currently a main direction in nonlinear control


systems. Differential flatness theory enables to develop global linearizing methods
for nonlinear dynamical systems, thus also facilitating the solution of complicated
nonlinear control and filtering problems. The present book aims at presenting recent
advances in differential flatness theory for nonlinear control and estimation.
Actually, it shows that through differential flatness theory it is possible to perform
filtering and state estimation for a wide class of nonlinear dynamical systems,
including single input—single output, multi input—multi output dynamical models
or even distributed parameter systems.
The book analyzes the design of nonlinear adaptive controllers and nonlinear
filters, using exact linearization which is based on differential flatness theory. The
obtained adaptive controllers can be applied to a wide class of nonlinear systems
with unknown dynamics and can assure reliable functioning of the control loop
under uncertainty and varying operating conditions. The obtained filters exhibit
specific advantages as they outperform in terms of accuracy of estimation and
computation speed other nonlinear filters. The book presents a series of application
examples to confirm the efficiency of the proposed nonlinear filtering and adaptive
control schemes for various electromechanical systems. These include: (i) Industrial
Robotics, (ii) Mobile Robotics and Autonomous Vehicles, (iii) Electric Power
Generation, (iv) Electric Motors and Actuators, (v) Power Electronics, (vi) Internal
Combustion Engines, (vii) Distributed Parameter Systems, (viii) Communication
Systems.
The book aims at providing an informative overview of results on flatness-based
control for single and multi-input dynamical systems which are described by
ordinary differential equations. The monograph analyzes the stages of design of
nonlinear adaptive controllers and nonlinear Kalman Filters, using differential
flatness theory. The application of differential flatness theory enables transformation
of the system dynamics to the linear canonical (Brunovsky) form. This is feasible
for all single input nonlinear dynamical systems and for MIMO dynamical systems,
which can be linearized through static state feedback. Moreover, for MIMO

ix
x Preface

dynamical systems which accept only dynamic feedback linearization, it is also


possible to succeed transformation to the canonical Brunovsky form.
In particular, the book comes up with new adaptive neuro-fuzzy control methods
that are based on differential flatness theory and which are suitable for both SISO
and MIMO dynamical systems. The differential flatness theory-based approach
extends the class of nonlinear systems to which adaptive neuro-fuzzy control can be
applied. By proving that a dynamical system satisfies differential flatness properties,
its transformation to the linear canonical (Brunovsky) form is possible. After such a
transformation, a modified control input is applied to the system, which contains not
only the initial control signal but also unknown terms associated with the system’s
nonlinear dynamics. These terms are identified online by neuro-fuzzy approxima-
tors. Thus, a nonlinear adaptive control scheme is formulated in which identifica-
tion of the unknown system dynamics is first performed and subsequently this
information is used for the computation of the control inputs. The stability of the
adaptive control scheme is proven through Lyapunov methods. Additionally,
adaptive neuro-fuzzy control schemes are developed which succeed simultaneously
the identification of the unknown system dynamics and estimation of the non-
measurable elements of the system’s state vector. The feedback loop of these
adaptive fuzzy control schemes contains neuro-fuzzy approximators of the system’s
nonlinear model and also state observers which provide estimates of the system’s
state vector. The stability of such control schemes is proven again with the use of
Lyapunov methods.
Furthermore, the book comes up with a new nonlinear Kalman Filtering
approach under the name “Derivative-free nonlinear Kalman Filter” that is based on
differential flatness theory. The Derivative-free nonlinear Kalman Filter consists
of the Kalman Filter recursion applied on the linearized equivalent model of the
treated system, together with an inverse transformation based on differential flatness
theory that enables to retrieve estimates for the state variables of the initial nonlinear
system. This is a nonlinear filtering algorithm which does not need to compute
partial derivatives and Jacobian matrices. In terms of accuracy of the provided state
estimation the algorithm’s performance is equivalent to that of the Unscented
Kalman Filter and is significantly improved compared to the Extended Kalman
Filter. In terms of speed of computation, the Derivative-free nonlinear Kalman
Filter outperforms other nonlinear estimation algorithms. The generalization of the
Derivative-free nonlinear Kalman Filter to the case of a distributed computing
environment results in the Derivative-free distributed nonlinear Kalman Filter. For
the latter distributed filtering method, it has been proven that it has better perfor-
mance than the widely used Extended Information Filter. Through a series of
examples the book shows that the proposed nonlinear filtering method can be part
of control schemes for nonlinear dynamical systems.
Moreover, the book aims at presenting flatness-based control methods for
systems with spatiotemporal dynamics. Such systems are described by partial
differential equations together with the associated boundary conditions and play a
critical role in several engineering problems, such as vibrating structures, flexible-
link robots, waveguides and optical fibers, heat conduction, etc. Additionally, the
Preface xi

book aims at presenting differential flatness approaches for state estimation/filtering


and fault diagnosis for distributed parameter systems. Being in position to recon-
struct the dynamics of such systems out of a limited number of sensor measure-
ments is important for monitoring their condition. Results on filtering and fault
diagnosis for nonlinear PDE models are shown to be applicable to systems of wave-
type and diffusion-type dynamics.
The control and filtering methods analyzed in the book are generic and suitable
for classes of systems, therefore one can anticipate the use of the book’s methods to
various engineering and science problems. The structure of the book is as follows:
In Chap. 1, an analysis is given about the basics of systems theory which can be
used in the modeling of nonlinear dynamics. To understand the oscillatory behavior
of nonlinear dynamical systems, benchmark examples of oscillators are given.
Moreover, the following properties are introduced: phase diagram, isoclines,
attractors, local stability, bifurcations of fixed points, and chaos properties. Next,
differential geometry and Lie algebra-based control are analyzed as a predecessor to
differential flatness theory-based control. First, the differential geometric approach
and the Frobenius theorem are analyzed. Next, the concept of input–output line-
arization is introduced and its association to transformation to normal forms is
explained. Furthermore, the concept of input-state linearization is presented and the
stages of its implementation are explained. Necessary and sufficient conditions for
applying input-state linearization and input–output linearization are provided.
In Chap. 2, flatness-based control for lumped parameter systems is first analyzed.
Such systems are described by ordinary differential equations. The chapter over-
views the definition and properties of differentially flat systems and presents basic
classes of differentially flat systems. First the equivalence property is explained,
which signifies that it is possible to transform differentially flat systems through a
change of variables into the linear canonical form. The chapter presents examples of
single input dynamical systems which are written into the linear canonical form by
using the differential flatness theory diffeomorphism and explains the design of the
associated feedback control loop. The case of MIMO differentially flat dynamical
system is also examined. It is shown that differentially flat systems which admit
static feedback linearization can be transformed into the linear canonical form. It is
also shown that for MIMO differentially flat systems that admit only dynamic
feedback linearization, it is again possible to succeed transformation to the linear
canonical form and subsequently to design state feedback controllers. Moreover,
elaborated criteria for checking differential flatness properties of dynamical systems
are given. Finally, the chapter studies differential flatness properties for distributed
parameter systems and methods for their transformation to an equivalent linear
canonical form.
In Chap. 3, differential flatness theory-based adaptive fuzzy control is proposed
for complex nonlinear dynamical systems. First, single-input single-output
dynamical systems are studied and it is shown how flatness-based adaptive fuzzy
controllers can be designed for such systems. Moreover, it is shown that multi-input
multi-output dynamical systems which admit static feedback linearization can be
transformed to a decoupled and linear canonical form for which the design of the
xii Preface

flatness-based adaptive fuzzy controller is a straightforward procedure. The latter


results can be also extended to the case of MIMO systems that admit exclusively
dynamical feedback linearization.
In Chap. 4, a new filtering method for nonlinear dynamical systems is analyzed.
The filtering method is based on differential flatness theory and is known as
Derivative-free nonlinear Kalman Filter. First the filtering method is applied to
lumped dynamical systems, that is, systems that are described by ordinary differ-
ential equations. Moreover, the problem of distributed nonlinear filtering is solved,
that is, the problem of fusion of the outcome of distributed local filtering procedures
(local nonlinear Kalman Filters) into one global estimate that approximates the
system’s state vector with improved accuracy.
In Chap. 5, differential flatness theory is used for the solution of industrial
robotics problems. These comprise among others adaptive control of MIMO robotic
manipulators without prior knowledge of the robot’s dynamical model, adaptive
control of underactuated robotic manipulators (that is, robots having less actuators
than their degrees of freedom), observer-based adaptive control of MIMO robotic
manipulators in which uncertainty is not related only to the unknown dynamic
model of the robot but also comes from the inability to measure all elements of the
robot’s state vector, and Kalman Filter-based control of MIMO robotic manipula-
tors. Finally, differential flatness theory is proposed for developing a robot control
scheme over a communication network that is characterized by transmission delays
or losses in the transmitted information.
In Chap. 6, it is proposed to use nonlinear filtering and control methods based on
differential flatness theory for autonomous vehicles control. In particular the chapter
analyzes steering control, localization and autonomous navigation of land vehicles,
unmanned surface vessels and unmanned aerial vehicles. It is shown that through the
application of differential flatness theory, one can obtain solution for the following
nontrivial problems: state estimation-based control of autonomous vehicles, state
estimation-based control of cooperating vehicles, distributed fault diagnosis for
autonomous vehicles, velocity control of ground vehicles under model uncertainties
and external disturbances, active control of vehicle suspensions, state estimation-
based control of unmanned aerial vehicles of the quadrotor type, and finally state
estimation-based control of unmanned surface vessels of the hovercraft type.
In Chap. 7, it is proposed to use differential flatness theory for nonlinear filtering
and nonlinear control problems met in electric power generation. Power generators
of various types are considered such as DFIGs and PMSGs, while the mode of
operation of these generators can be either the stand-alone one (single machine
infinite bus model), or the generators can function as part of the power grid (multi-
area multi machine power generation models). The chapter shows how differential
flatness theory can provide efficient solutions to the following problems: (i) state
estimation-based control of the PMSG, (ii) state estimation-based control of the
DFIG, (iii) state estimation-based control and synchronization of distributed power
generators of the PMSG type.
In Chap. 8, it is proposed to apply differential flatness theory-based nonlinear
filtering and control methods, to electric motors and actuators and to motion
Preface xiii

transmission systems. To this end, differential flatness theory is used for adaptive
control of the DC motor, for adaptive control of the induction motor, for state
estimation-based control of the DC motor, for state estimation-based control of
asynchronous electric motors and finally for observer-based adaptive fuzzy control
of microactuators (MEMS).
In Chap. 9, differential flatness theory is used to solve nonlinear filtering and
control problems which appear in power electronics such as voltage source con-
verters (VSC) and inverters, when these devices are used for connecting various
types of power generation units (AC and DC) to the grid. In particular, the chapter
proposes differential flatness theory for state estimation-based control of three-
phase voltage source converters, for state estimation-based control of voltage
inverters (finding application to the connection of photovoltaics to the electricity
grid), and finally for decentralized control and synchronization of distributed
inverters which are used to connect distributed DC power units with the electricity
network.
In Chap. 10, differential flatness theory is applied to nonlinear filtering and
control methods for internal combustion engines. The presented methods are con-
cerned with robust control and filtering for valves of diesel engines, with filtering
flatness-based of turbocharged diesel engines, with embedded adaptive control of
turbocharged Diesel engines, with embedded control and filtering of spark-ignited
engines, with embedded adaptive control of spark ignited engines and finally with
embedded control and filtering of the air-fuel ratio in combustion engines.
In Chap. 11, differential flatness theory-based methods for nonlinear filtering and
nonlinear control are applied to chaotic dynamical systems. Flatness-based adaptive
fuzzy control is proposed first for chaotic dynamical systems and manages to
modify the behavior of such systems without any knowledge of their dynamic
model. Next, differential flatness theory is proposed for developing a chaotic
communication system. A differential flatness theory-based Kalman Filtering
approach is proposed for performing blind equalization of the chaotic communi-
cation channel and for the synchronization between the transmitter and the receiver.
In Chap. 12, it is proposed to use differential flatness theory in nonlinear filtering
and control problems of distributed parameter systems, that is, systems which are
described by partial differential equations (of the parabolic, hyperbolic or elliptic
type). Methods of pointwise control of nonlinear PDE dynamics are introduced,
while methods for state estimation in nonlinear PDE models are developed. Such
results are applicable to communication systems (transmission lines, optical fibers,
and electromagnetic waves propagation), to electronics (Josephson junctions), to
manufacturing (heat diffusion control in the gas-metal arc welding proces), in
structural engineering (dynamic analysis of buildings under seismic waves,
mechanical structures subjected to vibrations, pendulum chains), in sensor networks
(fault diagnosis in distributed sensors monitoring systems with PDE dynamics), etc.
Finally, in Chap. 13, it is demonstrated that differential flatness theory is in the
background of other control methods, such as backstepping control and optimal
control. First, the chapter shows that differential flatness theory is in the background
of backstepping control. It is shown that to implement flatness-based control, it is
xiv Preface

not always necessary to transform the system into the trivial (linear canonical) form,
but it may suffice to decompose it into a set of flat subsystems associated with the
rows of its state-space description. The proposed flatness-based control method can
solve efficiently several nonlinear control problems, met for instance in robotic and
power generation systems. Moreover, the chapter shows how differential flatness
theory can be used for implementing boundary control of distributed parameter
systems. As a case study the control of a nonlinear wave PDE is considered.
The manuscript is suitable for teaching nonlinear control and nonlinear filtering
methods at late undergraduate and at postgraduate level. Such a course can be part
of the curriculum of several university departments, such as Electrical Engineering,
Mechanical Engineering, Computer Science, Physics, etc. The proposed book
contains teaching material which can be also used in a supplementary manner to the
content of undergraduate nonlinear control courses. The book can also serve per-
fectly the needs of a postgraduate course on nonlinear control and nonlinear esti-
mation methods.
Moreover, the book can be a useful reference for researchers, academic tutors,
and engineers that come against complex nonlinear control and nonlinear dynamics
problems. The book has both theoretical and practical value. It provides efficient
solutions to control problems associated with several electromechanical systems
met in industrial production, in transportation systems, in electric power generation,
and in many other applications. The control and filtering methods analyzed in the
book are generic and applicable to classes of systems, therefore one can anticipate
the application of the book’s methods to various types of electromechanical sys-
tems. I hope the book to become a useful reference not only for the industrial
systems, and the robotics and control community, but also for researchers and
engineers in the fields of signal processing, computational intelligence, and
mechatronics.

Athens, Greece Gerasimos G. Rigatos


March 2015
Acknowledgments

The author of this monograph would like to thank researchers and university staff
who through their constructive review and comments have contributed to the
improvement of the structure and content of this manuscript.

xv
Contents

1 Nonlinear Dynamical Systems and Global Linearizing


Control Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Characteristics of the Dynamics of Nonlinear Systems. . . . . . . 1
1.3 Computation of Isoclines . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.4 Basic Features in the Study of Nonlinear Dynamics . . . . . . . . 8
1.4.1 The Phase Diagram . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.4.2 Stability Analysis of Nonlinear Systems. . . . . . . . . . . 9
1.4.3 Stability Analysis of Nonlinear Models . . . . . . . . . . . 11
1.5 Phase Diagrams and Equilibria of Nonlinear Models . . . . . . . . 12
1.5.1 Phase Diagrams for Linear Dynamical Systems . . . . . 12
1.5.2 Multiple Equilibria for Nonlinear Dynamical
Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.5.3 Limit Cycles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.6 Bifurcations in Nonlinear Dynamics . . . . . . . . . . . . . . . . . . . 21
1.6.1 Bifurcations of Fixed Points of Nonlinear Models . . . . 21
1.6.2 Saddle-Node Bifurcations of Fixed Points
in a One-Dimensional System . . . . . . . . . . . . . . . . . 21
1.6.3 Pitchfork Bifurcation of Fixed Points. . . . . . . . . . . . . 22
1.6.4 The Hopf Bifurcation . . . . . . . . . . . . . . . . . . . . . . . 24
1.7 Predecessors of Differential Flatness Theory. . . . . . . . . . . . . . 26
1.7.1 The Differential Geometric Approach . . . . . . . . . . . . 26
1.7.2 Elaboration on the Frobenius Theorem . . . . . . . . . . . 29
1.7.3 Input–Output Linearization. . . . . . . . . . . . . . . . . . . . 30
1.7.4 Elaborating on Input–Output Linearization . . . . . . . . . 33
1.7.5 Input-State Linearization . . . . . . . . . . . . . . . . . . . . . 37
1.7.6 Stages in the Implementation of Input-State
Linearization . . . . . . . . . . . . . . . . . . . . . . . . . . ... 43
1.7.7 Input–Output and Input-State Linearization
for MIMO Systems . . . . . . . . . . . . . . . . . . . . . . ... 44
1.7.8 Dynamic Extension . . . . . . . . . . . . . . . . . . . . . . ... 45

xvii
xviii Contents

2 Differential Flatness Theory and Flatness-Based Control . . . . . . . 47


2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
2.2 Definition of Differentially Flat Systems . . . . . . . . . . . . . . . . 48
2.2.1 The Background of Differential Flatness Theory . . . . . 48
2.2.2 Differential Flatness for Finite Dimensional
Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
2.3 Properties of Differentially Flat Systems . . . . . . . . . . . . . . . . 57
2.3.1 Equivalence and Differential Flatness . . . . . . . . . . . . 57
2.3.2 Differential Flatness and Trajectory Planning . . . . . . . 72
2.3.3 Differential Flatness, Feedback Control
and Equivalence . . . . . . . . . . . . . . . . . . . . . . . . . .. 75
2.4 Flatness-Based Control and State Feedback for Systems
with Model Uncertainties . . . . . . . . . . . . . . . . . . . . . . . . . .. 79
2.5 Classification of Types of Differentially Flat Systems . . . . . .. 82
2.5.1 Criteria About the Differential Flatness of a System . .. 82
2.5.2 A Sufficient Condition for Showing that a System
Is Not Differentially Flat . . . . . . . . . . . . . . . . . . . . . 85
2.5.3 Liouvillian and Nondifferentially Flat Systems . . . . . . 86
2.6 Elaborated Criteria for Checking Differential Flatness . . . . . . . 87
2.6.1 Implicit Control Systems on Manifolds of Jets . . . . . . 87
2.6.2 The Lie-Backlünd Equivalence for Implicit
Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 89
2.6.3 Conditions for Differential Flatness of Implicit
Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 90
2.6.4 Example of Elaborated Differential Flatness
Criteria to Nonlinear Systems . . . . . . . . . . . . . . . . .. 93
2.7 Distributed Parameter Systems and Their Transformation
into the Canonical Form . . . . . . . . . . . . . . . . . . . . . . . . . .. 96
2.7.1 State-Space Description of a Heat Diffusion
Dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 96
2.7.2 Differential Flatness of the Nonlinear Heat
Diffusion PDE . . . . . . . . . . . . . . . . . . . . . . . . . . .. 99

3 Nonlinear Adaptive Control Based on Differential


Flatness Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ....... 103
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ....... 103
3.2 Flatness-Based Adaptive Neuro-Fuzzy Control
for SISO Systems . . . . . . . . . . . . . . . . . . . . . . . . . ....... 104
3.2.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . ....... 104
3.3 Flatness-Based Adaptive Fuzzy Control for SISO
Dynamical Systems . . . . . . . . . . . . . . . . . . . . . . . . ....... 105
3.3.1 Transformation of SISO Nonlinear Systems
into a Canonical Form . . . . . . . . . . . . . . . . ....... 105
Contents xix

3.3.2 Adaptive Control Law for SISO Nonlinear


Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 106
3.3.3 Approximators of SISO System Unknown
Dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 107
3.3.4 Lyapunov Stability Analysis for SISO Dynamical
Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 109
3.3.5 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . . . .. 111
3.4 Flatness-Based Adaptive Fuzzy Control for MIMO
Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 116
3.4.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 116
3.4.2 Differential Flatness for MIMO Nonlinear
Dynamical Systems . . . . . . . . . . . . . . . . . . . . . . . .. 117
3.4.3 Flatness-Based Adaptive Fuzzy Control for MIMO
Nonlinear Systems . . . . . . . . . . . . . . . . . . . . . . . .. 120
3.4.4 Flatness-Based Control for a MIMO Robotic
Manipulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 122
3.4.5 Lyapunov Stability Analysis for MIMO Nonlinear
Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 127
3.4.6 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . . . .. 133

4 Nonlinear Kalman Filtering Based on Differential


Flatness Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
4.2 The Derivative-Free Nonlinear Kalman Filter . . . . . . . . . . . . . 142
4.2.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
4.2.2 Extended Kalman Filtering for Nonlinear
Dynamical Systems . . . . . . . . . . . . . . . . . . . . . .... 143
4.2.3 Derivative-Free Kalman Filtering to SISO
Nonlinear Systems . . . . . . . . . . . . . . . . . . . . . .... 149
4.2.4 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . .... 152
4.2.5 Derivative-Free Kalman Filtering for MIMO
Nonlinear Systems . . . . . . . . . . . . . . . . . . . . . . . . . 163
4.2.6 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
4.3 The Derivative-Free Distributed Nonlinear Kalman Filter . . . . . 172
4.3.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
4.3.2 Overview of the Extended Information Filter . . . . . . . 173
4.3.3 Distributed Filtering for Sensorless Control . . . . . . . . 177
4.3.4 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . 179

5 Differential Flatness Theory and Industrial Robotics . . . . . . . . . . 183


5.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
5.2 Adaptive Fuzzy Control of Underactuated MIMO Robots . . . . 185
5.2.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
xx Contents

5.2.2 Dynamic Model of the Closed-Chain 2-DOF


Robotic System . . . . . . . . . . . . . . . . . . . . . . . . ... 186
5.2.3 Linearization of the Closed-Chain 2-DOF
Robotic System Using Lie Algebra Theory . . . . . ... 192
5.2.4 Differential Flatness of the Underactuated
Manipulator . . . . . . . . . . . . . . . . . . . . . . . . . . . ... 195
5.2.5 Flatness-Based Adaptive Fuzzy Control
for the Underactuated Robot. . . . . . . . . . . . . . . . . . . 198
5.2.6 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
5.3 Observer-Based Adaptive Fuzzy Control of MIMO Robots . . . 199
5.3.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
5.3.2 Estimation of the Robot’s State Vector . . . . . . . . . . . 201
5.3.3 Application of Flatness-Based Adaptive Fuzzy
Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... 203
5.3.4 Dynamics of the Observation Error . . . . . . . . . . . ... 204
5.3.5 Approximation of the System’s Unknown
Dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... 205
5.3.6 Lyapunov Stability Analysis. . . . . . . . . . . . . . . . ... 206
5.3.7 The Role of Riccati Equation Coefficients
in Observer-Based Adaptive Fuzzy Control . . . . . . . . 212
5.3.8 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
5.4 State Estimation-Based Control of Underactuated Robots . . . . . 218
5.4.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
5.4.2 Derivative-Free Nonlinear Kalman Filter
for the Closed-Chain 2-DOF Robotic System . . . . . . . 219
5.4.3 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
5.5 Distributed Filtering Under External Disturbances . . . . . . . . . . 223
5.5.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
5.5.2 Dynamics and Control of the Robot . . . . . . . . . . . . . 225
5.5.3 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
5.6 Distributed Nonlinear Filtering Under Measurement Delays . . . 230
5.6.1 Networked Control Under Communication
Disturbances . . . . . . . . . . . . . . . . . . . . . . . . . . ... 230
5.6.2 Networked Kalman Filtering for an Autonomous
System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... 231
5.6.3 Smoothing Estimation in Case of Delayed
Measurements . . . . . . . . . . . . . . . . . . . . . . . . . ... 232
5.6.4 Distributed Filtering-Based Fusion of the Robot’s
State Estimates . . . . . . . . . . . . . . . . . . . . . . . . . ... 235
5.6.5 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . . ... 236
Contents xxi

6 Differential Flatness Theory in Mobile Robotics


and Autonomous Vehicles . . . . . . . . . . . . . . . . . . . . . . . . . . .... 239
6.1 Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .... 239
6.2 State Estimation-Based Control of Autonomous Vehicles . .... 241
6.2.1 Localization and Autonomous Navigation
of Ground Vehicles . . . . . . . . . . . . . . . . . . . . . .... 241
6.2.2 Application of Derivative-Free Kalman Filtering
to MIMO UGV Models . . . . . . . . . . . . . . . . . . . . . . 242
6.2.3 Controller Design for UGVs. . . . . . . . . . . . . . . . . . . 244
6.2.4 Derivative-Free Kalman Filtering for UGVs . . . . . . . . 247
6.2.5 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
6.2.6 Derivative-Free Kalman Filter-Based Navigation
of the Autonomous Vehicle . . . . . . . . . . . . . . . .... 252
6.3 State Estimation-Based Control and Synchronization
of Cooperating Vehicles . . . . . . . . . . . . . . . . . . . . . . . .... 261
6.3.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . .... 261
6.3.2 Distributed Kalman Filtering for Unmanned
Ground Vehicles. . . . . . . . . . . . . . . . . . . . . . . . . . . 263
6.3.3 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
6.4 Distributed Fault Diagnosis for Autonomous Vehicles . . . . . . . 265
6.4.1 Integrity Testing in Navigation Sensors of AGVs . . . . 265
6.4.2 Sensor Fusion for AGV Navigation. . . . . . . . . . . . . . 267
6.4.3 Canonical Form for the AGV Model . . . . . . . . . . . . . 270
6.4.4 Derivative-Free Extended Information Filtering
for UGVs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
6.4.5 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
6.5 Velocity Control of 4-Wheel Vehicles . . . . . . . . . . . . . . . . . . 273
6.5.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
6.5.2 Dynamic Model of the Vehicle. . . . . . . . . . . . . . . . . 276
6.5.3 Flatness-Based Controller for the 3-DOF
Vehicle Model . . . . . . . . . . . . . . . . . . . . . . . . .... 280
6.5.4 Estimation of Vehicle Disturbance Forces
with Kalman Filtering . . . . . . . . . . . . . . . . . . . . . . . 283
6.5.5 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
6.6 Active Vehicle Suspension Control . . . . . . . . . . . . . . . . . . . . 288
6.6.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
6.6.2 Dynamic Model of Vehicle Suspension . . . . . . . . . . . 292
6.6.3 Flatness-Based Control for a Suspension Model . . . . . 296
6.6.4 Compensating for Model Uncertainty
with the Use of the H1 Kalman Filter. . . . . . . . .... 297
6.6.5 Robust State Estimation with the Use
of Disturbance Observers . . . . . . . . . . . . . . . . . .... 300
6.6.6 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . .... 302
xxii Contents

6.7 State Estimation-Based Control of Quadrotors . . . . . . . . . . . . 304


6.7.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
6.7.2 Kinematic Model of the Quadropter . . . . . . . . . . . . . 310
6.7.3 Euler-Lagrange Equations for the Quadropter . . . . . . . 311
6.7.4 Design of Flatness-Based Controller
for the Quadrotor’s Model . . . . . . . . . . . . . . . . . ... 313
6.7.5 Estimation of the Quadrotor’s Disturbance Forces
and Torques with Kalman Filtering . . . . . . . . . . . ... 315
6.7.6 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . . ... 318
6.8 State Estimation-Based Control of the Underactuated
Hovercraft . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... 320
6.8.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... 320
6.8.2 Lie Algebra-Based Control of the Underactuated
Hovercraft . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... 323
6.8.3 Flatness-Based Control of the Underactuated
Vessel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... 329
6.8.4 Disturbances’ Compensation with the Use
of the Derivative-Free Nonlinear Kalman Filter . . ... 330
6.8.5 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . . ... 332

7 Differential Flatness Theory and Electric Power Generation . . . . . 337


7.1 Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
7.2 State Estimation-Based Control of PMSGs . . . . . . . . . . . . . . . 338
7.2.1 The PMSG Control Problem . . . . . . . . . . . . . . . . . . 338
7.2.2 Dynamic Model of the Permanent Magnet
Synchronous Generator . . . . . . . . . . . . . . . . . . . ... 340
7.2.3 Lie Algebra-Based Design of State Estimators
for the PMSG. . . . . . . . . . . . . . . . . . . . . . . . . . ... 342
7.2.4 Differential Flatness of the PMSG. . . . . . . . . . . . ... 347
7.2.5 Estimation of PMSG Disturbance Input
with Kalman Filtering . . . . . . . . . . . . . . . . . . . . . . . 349
7.2.6 Simulation Experiments . . . . . . . . . . . . . . . . . . . . . . 352
7.3 State Estimation-Based Control of DFIGs . . . . . . . . . . . . . . . 358
7.3.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
7.3.2 The Complete Sixth-Order Model of the Induction
Generator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... 359
7.3.3 Input–Output Linearization of the DFIG Using
Lie Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . ... 363
7.3.4 Input–Output Linearization of the DFIG Using
Differential Flatness Theory . . . . . . . . . . . . . . . . ... 367
7.3.5 Kalman Filter-Based Disturbance Observer
for the DFIG Model . . . . . . . . . . . . . . . . . . . . . ... 371
7.3.6 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . . ... 373
Contents xxiii

7.4 Flatness-Based Control of DFIG in Cascading Loops . ...... 377


7.4.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . ...... 377
7.4.2 A New Proof of the Differential Flatness
of the DFIG . . . . . . . . . . . . . . . . . . . . . . . . ...... 378
7.4.3 Control of the DFIG in Cascading Loops. . . . ...... 380
7.4.4 EKF Implementation for Sensorless Control
of the DFIG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
7.4.5 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
7.5 State Estimation-Based Control of Distributed PMSGs. . . . . . . 388
7.5.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
7.5.2 Dynamic Model of the Distributed Power
Generation Units. . . . . . . . . . . . . . . . . . . . . ...... 390
7.5.3 Lie Algebra-Based Design of a Feedback
Controller for the PMSG . . . . . . . . . . . . . . . ...... 391
7.5.4 Differential Flatness of the Distributed
PMSG Model . . . . . . . . . . . . . . . . . . . . . . . ...... 393
7.5.5 Simulation Tests . . . . . . . . . . . . . . . . . . . . . ...... 397

8 Differential Flatness Theory for Electric Motors


and Actuators. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
8.2 Flatness-Based Adaptive Control of DC Motors . . . . . . . . . . . 404
8.2.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404
8.2.2 Dynamics and Linearization of the DC
Motor Model . . . . . . . . . . . . . . . . . . . . . . . . . . ... 405
8.3 Flatness-Based Control of Induction Motors
in Cascading Loops. . . . . . . . . . . . . . . . . . . . . . . . . . . . ... 409
8.3.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... 409
8.3.2 A Cascading Loops Scheme for Control
of Field-Oriented Induction Motors . . . . . . . . . . . ... 410
8.3.3 A Flatness-Based Control Approach for Induction
Motors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... 414
8.3.4 Implementation of the EKF for the Nonlinear
Induction Motor Model . . . . . . . . . . . . . . . . . . . ... 415
8.3.5 Unscented Kalman Filtering for Induction
Motor Control . . . . . . . . . . . . . . . . . . . . . . . . . ... 416
8.4 Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... 418
8.5 Flatness-Based Adaptive Control of Electrostatic MEMS
Using Output Feedback . . . . . . . . . . . . . . . . . . . . . . . . . ... 422
8.5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . ... 422
8.5.2 Dynamic Model of the Electrostatic Actuator . . . . ... 423
8.5.3 Linearization of the MEMS Model Using
Lie Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . ... 425
xxiv Contents

8.5.4 Differential Flatness of the Electrostatic Actuator .... 427


8.5.5 Adaptive Fuzzy Control of the MEMS Model
Using Output Feedback . . . . . . . . . . . . . . . . . . .... 429
8.5.6 Lyapunov Stability Analysis. . . . . . . . . . . . . . . .... 434
8.5.7 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . .... 439

9 Differential Flatness Theory in Power Electronics. . . . . . . . . . . . . 443


9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443
9.2 Three-Phase Voltage Source Converters Control . . . . . . . . . . . 444
9.2.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444
9.2.2 Linearization of the Converter’s Model Using
Lie Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 446
9.2.3 Differential Flatness of the Voltage Source
Converter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 449
9.2.4 Kalman Filter-Based Disturbance Observer
for the VSC Model . . . . . . . . . . . . . . . . . . . . . . . . . 453
9.2.5 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
9.3 Inverters Control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458
9.3.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458
9.3.2 Dynamic Model of the Inverter. . . . . . . . . . . . . . . . . 459
9.3.3 Lie Algebra-Based Control of the Inverter’s Model . . . 463
9.3.4 Differential Flatness of the Inverter’s Model. . . . . . . . 466
9.3.5 Flatness-Based Control of the Inverter . . . . . . . . . . . . 468
9.3.6 State and Disturbances Estimation with Nonlinear
Kalman Filtering. . . . . . . . . . . . . . . . . . . . . . . . . . . 472
9.3.7 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . 473
9.4 Distributed Inverters Synchronization . . . . . . . . . . . . . . . . . . 475
9.4.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
9.4.2 The Synchronization Problem for Parallel Inverters . . . 477
9.5 State and Disturbances Estimation of Parallel Inverters
with Nonlinear Kalman Filtering. . . . . . . . . . . . . . . . . . . . .. 482
9.6 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 483

10 Differential Flatness Theory for Internal Combustion Engines . . . 491


10.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491
10.2 Flatness-Based Control of Valves in Marine Diesel Engines . . . 493
10.2.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493
10.2.2 Dynamic Model of the Valve . . . . . . . . . . . . . . . . . . 494
10.2.3 Input–Output Linearization Using Lie Algebra . . . . . . 498
10.2.4 Input–Output Linearization Using Differential
Flatness Theory . . . . . . . . . . . . . . . . . . . . . . . . . .. 501
10.2.5 Disturbances Compensation with Derivative-Free
Nonlinear Kalman Filter . . . . . . . . . . . . . . . . . . . .. 504
10.2.6 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . . . .. 506
Contents xxv

10.3 Flatness-Based Control of Diesel Combustion Engines . ..... 511


10.3.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . ..... 511
10.3.2 Dynamic Model of the Turbocharged
Diesel Engine. . . . . . . . . . . . . . . . . . . . . . . . ..... 512
10.3.3 Nonlinear Control of the Diesel Engine Using
Lie Algebra . . . . . . . . . . . . . . . . . . . . . . . . . ..... 514
10.3.4 A Dynamic Extension-Based Feedback
Control Scheme . . . . . . . . . . . . . . . . . . . . . . ..... 517
10.3.5 Nonlinear Control of the Diesel Engine
Using Differential Flatness Theory . . . . . . . . . ..... 521
10.3.6 Disturbances Compensation Using
the Derivative-Free Nonlinear Kalman Filter . . . . . . . 525
10.3.7 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . 527
10.4 Adaptive Control for Diesel Combustion Engines . . . . . . . . . . 528
10.4.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528
10.4.2 Observer-Based Adaptive Fuzzy Control
for the Diesel Combustion Engine. . . . . . . . . . ..... 529
10.4.3 Application of Flatness-Based Adaptive Fuzzy
Control to the MIMO Diesel Engine Model . . . ..... 533
10.4.4 Lyapunov Stability Analysis. . . . . . . . . . . . . . ..... 538
10.4.5 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . ..... 543
10.5 Flatness-Based Control and Kalman Filtering
for the Spark-Ignited Engine . . . . . . . . . . . . . . . . . . . ..... 547
10.5.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . ..... 547
10.5.2 Dynamic Model of the SI Engine . . . . . . . . . . ..... 548
10.5.3 Feedback Linearizing Control of the SI Engine
Using Lie Algebra . . . . . . . . . . . . . . . . . . . . ..... 549
10.5.4 Feedback Linearizing Control of the SI Engine
Using Differential Flatness Theory . . . . . . . . . ..... 551
10.5.5 Compensation of Disturbances Using
the Derivative-Free Nonlinear Kalman Filter . . ..... 553
10.5.6 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . ..... 554
10.6 Flatness-Based Adaptive Fuzzy Control
of the Spark-Ignited Engine . . . . . . . . . . . . . . . . . . . . ..... 558
10.6.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . ..... 558
10.6.2 Flatness-Based Adaptive Fuzzy Control
for SI Motors . . . . . . . . . . . . . . . . . . . . . . . . ..... 559
10.6.3 Lyapunov Stability Analysis. . . . . . . . . . . . . . ..... 562
10.6.4 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . ..... 565
10.7 Flatness-Based Control and Kalman Filtering
of the Air–Fuel Ratio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 566
10.7.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 566
10.8 Dynamic Model of the Air–Fuel Ratio System . . . . . . . . . . . . 567
10.8.1 The Air and Fuel Flow Models. . . . . . . . . . . . . . . . . 567
xxvi Contents

10.8.2 Dynamics of the Air–Fuel Ratio System . . . . . . . ... 569


10.8.3 Differential Flatness of the Air–Fuel Ratio System ... 570
10.8.4 Flatness-Based Control of the Air–Fuel
Ratio System . . . . . . . . . . . . . . . . . . . . . . . . . . ... 572
10.8.5 Compensation of Uncertainties with the
Derivative-Free Nonlinear Kalman Filter . . . . . . . ... 573
10.8.6 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . . ... 577

11 Differential Flatness Theory for Chaotic Dynamical Systems. . . . . 579


11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579
11.2 Flatness-Based Control of Chaotic Dynamical Systems . . . . . . 580
11.2.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 580
11.2.2 Differential Flatness of Chaotic Dynamical
Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... 581
11.2.3 Flatness-Based Adaptive Fuzzy Control
for Chaotic Systems . . . . . . . . . . . . . . . . . . . . . . . . 585
11.2.4 Design of the Feedback Controller . . . . . . . . . . . . . . 585
11.2.5 Approximators of Unknown System Dynamics . . . . . . 587
11.2.6 Lyapunov Stability Analysis. . . . . . . . . . . . . . . . . . . 588
11.2.7 Nonlinear Feedback Control of Chaotic Systems
Based on Fuzzy Local Linearization . . . . . . . . . . ... 591
11.2.8 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . . ... 593
11.3 Differential Flatness Theory for Chaos-Based
Communication Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . 596
11.3.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596
11.3.2 Structure of the Chaotic Communication System. . . . . 598
11.3.3 Differential Flatness Theory . . . . . . . . . . . . . . . . . . . 600
11.3.4 Estimation in Chaotic Modulators with Nonlinear
Kalman Filter . . . . . . . . . . . . . . . . . . . . . . . . . . ... 601
11.3.5 Channel Equalization and Synchronization
Using Dual Kalman Filtering . . . . . . . . . . . . . . . ... 602
11.3.6 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . . ... 605

12 Differential Flatness Theory for Distributed


Parameter Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... 613
12.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... 613
12.2 Pointwise Flatness-Based Control of Distributed Parameter
Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... 615
12.2.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... 615
12.2.2 Nonlinear 1D Wave-Type Partial Differential
Equations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... 616
12.2.3 Sine-Gordon Nonlinear PDE in the Model
of the Josephson Junction . . . . . . . . . . . . . . . . . ... 617
Contents xxvii

12.2.4 Current Equation in a Josepshon


Transmission Line. . . . . . . . . . . . . . . . . . . . . . . . . . 618
12.2.5 State-Space Description of the Nonlinear
Wave Dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . 619
12.2.6 Solution of the Control and Estimation Problem
for Nonlinear Wave Dynamics . . . . . . . . . . . . . . . . . 622
12.2.7 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . 625
12.3 Control of Heat Diffusion in Arc Welding Using Differential
Flatness Theory and Nonlinear Kalman Filtering. . . . . . . . . . . 627
12.3.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 627
12.4 Dynamic Model of the Arc Welding Process . . . . . . . . . . . . . 631
12.5 State-Space Description of the Nonlinear Heat Diffusion
Dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633
12.6 Solution of the Control and Estimation Problem
for Nonlinear Heat Diffusion . . . . . . . . . . . . . . . . . . . . . . . . 635
12.6.1 Solution of the Control Problem . . . . . . . . . . . . . . . . 635
12.6.2 Solution of the Estimation Problem . . . . . . . . . . . . . . 637
12.7 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 639
12.8 Fault Detection and Isolation in Distributed Parameter
Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 640
12.8.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 640
12.8.2 Estimation of Nonlinear Wave Dynamics. . . . . . . . . . 643
12.8.3 Equivalence Between Kalman Filters
and Regressor Models . . . . . . . . . . . . . . . . . . . . . . . 645
12.8.4 Change Detection with the Local Statistical
Approach. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 646
12.8.5 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . 651
12.9 Application to Condition Monitoring of Civil
and Mechanical Structures . . . . . . . . . . . . . . . . . . . . . . . . . . 656
12.9.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656
12.9.2 Dynamical Model of the Building—Mechanical
Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657
12.10 Differential Flatness of the Multi-DOF
Building’s Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659
12.10.1 Damage Detection with the Use
of Statistical Criteria . . . . . . . . . . . . . . . . . . . . . . . . 662
12.10.2 Disturbances Estimation with the Derivative-Free
Nonlinear Kalman Filter . . . . . . . . . . . . . . . . . . . . . 664
12.10.3 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . 666
xxviii Contents

13 Differential Flatness Theory in the Background of Other


Control Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... 671
13.1 Differential Flatness Theory in the Background
of Backstepping Control . . . . . . . . . . . . . . . . . . . . . . . . ... 671
13.1.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... 671
13.1.2 Flatness-Based Control Through Transformation
into the Canonical Form . . . . . . . . . . . . . . . . . . ... 673
13.1.3 A New Approach to Flatness-Based Control
for Nonlinear Dynamical Systems . . . . . . . . . . . . . . . 674
13.1.4 Closed-Loop Dynamics . . . . . . . . . . . . . . . . . . . . . . 677
13.1.5 Comparison to Backstepping Control. . . . . . . . . . . . . 679
13.1.6 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . 680
13.2 Differential Flatness and Optimal Control . . . . . . . . . . . . . . . 686
13.3 Boundary Control of Nonlinear PDE Dynamics Using
Differential Flatness Theory . . . . . . . . . . . . . . . . . . . . . . ... 687
13.3.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... 687
13.3.2 Transformation of the PDE Model into a Set
of Nonlinear ODEs . . . . . . . . . . . . . . . . . . . . . . ... 688
13.3.3 Differential Flatness of the Nonlinear PDE Model. ... 691
13.3.4 Computation of a Boundary Conditions-Based
Feedback Control Law . . . . . . . . . . . . . . . . . . . ... 693
13.3.5 Closed-Loop Dynamics . . . . . . . . . . . . . . . . . . . ... 695
13.3.6 Simulation Tests . . . . . . . . . . . . . . . . . . . . . . . . ... 697

References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 731
Acronyms

AC Alternate Current
AGV Automatic Ground Vehicle
ARE Algebraic Riccati Equation
ARMA Auto Regressive Moving Average
ARMAX Auto Regressive Moving Average with noise
AUV Autonomous Underwater Vessel
BER Bit Error Rate
CRLB Cramer-Rao Lower Bound
DC Direct Current
DFIG Doubly-Fed Induction Generator
DFKF Derivative-Free nonlinear Kalman Filtering
DOF Degrees of Freedom
DPS Distributed Parameter Systems
EKF Extended Kalman Filtering
KF Kalman Filtering
MSE Mean Square Error
MMSE Minimum Mean Square Estimator
MIMO Multi-Input Multi-Output
ODE Ordinary Differential Equation
PDE Partial Differential Equation
PMSG Permanent Magnet Synchronous Generator
SI Spark Ignited
SISO Single-input Single Output
SNR Signal-to-Noise Ratio
UAV Unmanned Aerial Vehicle
UKF Unscented Kalman Filtering
USV Unmanned Surface Vessel
VSC Voltage Source Converter

xxix
Chapter 1
Nonlinear Dynamical Systems
and Global Linearizing Control Methods

1.1 Introduction

This chapter overviews the basics of systems theory which can be used in the
modeling of nonlinear dynamics. To understand the oscillatory behavior of nonlinear
dynamical systems, benchmark examples of oscillators are given. Moreover, the fol-
lowing properties are analyzed: phase diagram, isoclines, attractors, local stability,
bifurcations of fixed points, and chaos properties.
Next, the chapter outlines differential geometry and Lie algebra-based control
as a predecessor to differential flatness theory-based control. First, the differential
geometric approach and the Frobenius theorem are analyzed. Next, the concept of
input–output linearization is introduced and its association to transformation of nor-
mal forms is explained. Additionally, the concept of input-state linearization is pre-
sented and the stages of its implementation are explained. Necessary and sufficient
conditions for applying input-state linearization and input–output linearization are
provided.

1.2 Characteristics of the Dynamics of Nonlinear Systems

The main features characterizing the stability of nonlinear dynamical systems are
defined as follows [238, 555]:
1. Finite escape time: It is the finite time within which the state-vector of the nonlinear
system converges to infinity.
2. Multiple isolated equilibria: A linear system can have only one equilibrium to
which converges the state vector of the system in steady-state. A nonlinear system
can have more than one isolated equilibria (fixed points). Depending on the initial
state of the system, in steady-state the state vector of the system can converge to one
of these equilibria.

© Springer International Publishing Switzerland 2015 1


G.G. Rigatos, Nonlinear Control and Filtering Using Differential
Flatness Approaches, Studies in Systems, Decision and Control 25,
DOI 10.1007/978-3-319-16420-5_1
2 1 Nonlinear Dynamical Systems and Global Linearizing Control Methods

3. Limit cycles: For a linear system to exhibit oscillations it must have eigenvalues on
the imaginary axis. The amplitude of the oscillations depends on initial conditions.
In nonlinear systems one may have oscillations of constant amplitude and frequency,
which do not depend on initial conditions. These types of oscillations are known as
limit cycles.
4. Subharmonic, harmonic, and almost periodic oscillations: A stable linear system
under periodic input produces an output of the same frequency. A nonlinear system,
under periodic excitation can generate oscillations with frequencies that are several
times smaller (subharmonic) or multiples of the frequency of the input (harmonic).
It may also generate almost periodic oscillations with frequencies that are not nec-
essarily multiples of a basis frequency (almost periodic oscillations).
5. Chaos: A nonlinear system in steady-state can exhibit behavior that is not character-
ized as equilibrium, periodic oscillation, or almost periodic oscillation. This behavior
is characterized as chaos. As time advances the behavior of the system changes in a
random-like manner, and this depends on the initial conditions. Although the dynamic
system is deterministic it exhibits randomness in the way it evolves in time.
6. Multiple modes of behavior: It is possible for the same dynamical system to
exhibit simultaneously more than one of the aforementioned characteristics (1)–(5).
Thus, a system without external excitation may exhibit simultaneously more than
one limit cycles. A system receiving a periodic external input may exhibit harmonic
or subharmonic oscillations, or an even more complex behavior in steady state which
depends on the amplitude and frequency of the excitation.

Example 1: Oscillations of a pendulum (Fig. 1.1).


The equation of the rotational motion of the pendulum under friction is given as

ml 2 θ̈ = mgsin(θ )l − klv ⇒
ml 2 θ̈ = mgsin(θ )l − kl 2 θ̇ ⇒ (1.1)
ml θ̈ = mgsin(θ ) − kl θ̇

By defining the state variables x1 = θ and x2 = θ̇ one has the state-space description

ẋ1 = x2
(1.2)
ẋ2 = gl sin(x1 ) − k
m x2

To compute the equilibrium one has

ẋ1 = ẋ2 = 0⇒
(1.3)
x2 = 0 and x1 = nπ n = 0, ±1, ±2, · · ·

Indicative forms of oscillations for the pendulum are defined as follows:


1.2 Characteristics of the Dynamics of Nonlinear Systems 3

Fig. 1.1 Pendulum


performing oscillations

(a) The effect of friction is neglected, therefore one has

ẋ1 = x2
(1.4)
ẋ2 = gl sin(x1 )

(b) An external torque T is applied to the pendulum

ẋ1 = x2
(1.5)
ẋ2 = gl sin(x1 ) − mk x2 + 1
ml 2
T

Example 2: Tunnel diode circuit (Fig. 1.2)


The following equations hold:

1 d Vc (t)
Vc = Ic (s)⇒Ic (s) = sC Vc (s)⇒Ic (t) = C (1.6)
sC dt
Fig. 1.2 Tunnel diode
circuit
4 1 Nonlinear Dynamical Systems and Global Linearizing Control Methods

d I L (t)
VL (s) = sLI L (s)⇒VL (t) = L (1.7)
dt

I L (s) = IC + I R (1.8)

I R (s) = h(V R ) (1.9)

The following state variables are defined x1 = VC and x2 = i L . From Eq. (1.8) it
holds that
I L − IC − I R = 0⇒IC = I L − I R ⇒IC = x2 − h(x1 ) (1.10)

Moreover, it holds that

d IL
I L R − E + VL + VC = 0⇒E = VL + VC + i L R⇒E = L + VC + I L R⇒
dt
1 1
E = L ẋ2 + VC − x2 R⇒ẋ2 = [−VC − Rx2 + E]⇒ẋ2 = [−x1 − Rx2 + u]
L L
(1.11)
Additionally, from Eq. (1.6) it holds that

d Vc (t) 1
= Ic (t) (1.12)
dt C
By replacing Eq. (1.10) into Eq. (1.12) one obtains

d Vc (t) 1
= [x2 − h(x1 )] (1.13)
dt C
From Eqs. (1.11) and (1.13) one has the description of the system is state-space form
as
ẋ1 = C1 [x2 − h(x1 )]
(1.14)
ẋ2 = L1 [−x1 − Rx2 + u]

The associated equilibrium is computed from the condition ẋ1 = 0 and ẋ2 = 0 which
gives
−h(x1 ) + x2 = 0
(1.15)
−x1 − Rx2 + u = 0

and consequently
E−x1
−h(x1 ) + R =0
E−x1 (1.16)
x2 = R

Therefore, finally the equilibrium point is computed from the solution of the relation

E 1
h(x1 ) = − x1 (1.17)
R R
1.2 Characteristics of the Dynamics of Nonlinear Systems 5

Fig. 1.3 Spring-mass


system

Example 3: Spring-mass system (Fig. 1.3)


It holds that
m ẍ = F − F f − Fsp ⇒
(1.18)
m ẍ = F − b ẋ − kx

One can also consider a model with nonlinear spring dynamics given by

g(x) = k(1 − a 2 x 2 )x |ax| < 1 model of softening spring


(1.19)
g(x) = k(1 + a 2 x 2 )x x > xthr es model of hardening spring

The combination of a hardening spring, a linear viscous damping term, and a periodic
external force F = Acos(ωt) results in the Duffing oscillator

m ẍ + c ẋ + kx + ka 2 x 3 = Acos(ωt) (1.20)

The combination of a linear spring, a linear viscous damping term, a dry friction
term, and a zero external force generates the following oscillator model:

m ẍ + kx + c ẋ + η(x, ẋ) = 0 (1.21)

where


⎨ μk mg·sign(ẋ) if |ẋ > 0|
η(x, ẋ) = −kx if |ẋ| = 0 and |x|≤μs mg/k (1.22)


−μs mgsign(x) if ẋ = 0 and |x| > μs mg/k

By defining the state variables x1 = x and x2 = ẋ one has

ẋ1 = x2
(1.23)
ẋ2 = − mk x1 − mc x2 − m η(x, ẋ)
1
6 1 Nonlinear Dynamical Systems and Global Linearizing Control Methods

For x2 = ẋ > 0 one obtains the state-space description

ẋ1 = x2
(1.24)
ẋ2 = − mk x1 − mc x2 − μk g

For x2 = ẋ < 0 one obtains the state-space description

ẋ1 = x2
(1.25)
ẋ2 = − mk x1 − mc x2 + μk g

1.3 Computation of Isoclines

An autonomous second order system is described by two differential equations of


the form
ẋ1 = f 1 (x1 , x2 )
(1.26)
ẋ2 = f 2 (x1 , x2 )

The method of the isoclines consists of computing the slope (ratio) between f 2 and
f 1 for every point of the trajectory of the state vector (x1 , x2 ).

f 2 (x1 , x2 )
s(x) = (1.27)
f 1 (x1 , x2 )

The case s(x) = c describes a curve in the x1 − x2 plane along which the trajectories
ẋ1 = f 1 (x1 , x2 ) and ẋ2 = f 2 (x1 , x2 ) have a constant slope.
The curve s(x) = c is drawn in the x1 − x2 plane and along this curve one also
draws small linear segments of length c. The curve s(x) = c is known as an isocline.
The direction of these small linear segments is according to the sign of the ratio
f 2 (x1 , x2 )/ f 1 (x1 , x2 ).
Example 1:
The following simplified pendulum equation is considered:

ẋ1 = x2
(1.28)
ẋ2 = −sin(x1 )

The slope s(x) is given by the relation

f 2 (x1 , x2 ) sin(x2 )
s(x) = ⇒s(x) = − (1.29)
f 1 (x1 , x2 ) x2

Setting s(x) = c it holds that the isoclines are given by the relation
1.3 Computation of Isoclines 7

Fig. 1.4 Isoclines diagram 5


for s(x) = −sin(x
x2
1) c=−1/4
4 c=−1/3
c=−1/2
3 c=−1.0
c=1.0

2 c=1/2
c=1/3
c=1/4
1

x2
0

−1

−2

−3

−4

−5
−5 0 5
x1

1
x2 = − sin(x1 ) (1.30)
c
For different values of c one has the following isoclines diagram depicted in Fig. 1.4.
Example 2:
The following oscillator model is considered, being free of friction and with state-
space equations:
ẋ1 = x2
(1.31)
ẋ2 = −0.5x2 − sin(x1 )

To compute isoclines one has

s(x) = −0.5x2x−sin(x 1)
= c⇒ − 0.5x2 − sin(x1 ) = cx2 ⇒
2 (1.32)
(0.5 + c)x2 = sin(x1 )⇒x2 = − 0.5+c1
sin(x1 )

For different values of parameter c the isoclines are depicted in Fig. 1.5.
8 1 Nonlinear Dynamical Systems and Global Linearizing Control Methods

Fig. 1.5 Isoclines diagram 5


for s(x) = −0.5x2x−sin(x
2
1) c1=−3/4
4 c2=−5/6
c3=−1
3 c4=−3/2
c5=1/2

2 c6=0
c7=−1/6
c8=−1/4
1

x2
0

−1

−2

−3

−4

−5
−5 0 5
x1

1.4 Basic Features in the Study of Nonlinear Dynamics

The basic features that are important in the study of nonlinear dynamics are (i)
equilibria (fixed points), (ii) limit cycles, (ii) phase diagrams, (iv) periodic orbits, and
(v) bifurcations of fixed points [238, 555, 584, 605]. The definition of these features
is given through examples in the case of nonlinear dynamical systems models.

1.4.1 The Phase Diagram

One can consider the nonlinear model with the two state variables, V and η. The
dynamics of the nonlinear model can be written as

dV
dt = f (V, η)
dη (1.33)
dt = g(V, η)

The phase diagram consists of the points on the trajectories of the solution of the
associated differential equation, i.e., (V (tk ), η(tk )).
At a fixed point or equilibrium it holds that f (V R , η R ) = 0 and g(V R , η R ) = 0.
The closed trajectories are associated with periodic solutions. If there are closed
trajectories the ∃T > 0 such that (V (tk ), η(tk )) = (V (tk + T ), η(tk + T )).
1.4 Basic Features in the Study of Nonlinear Dynamics 9

Another useful parameter is the nullclines. The V -nullcline is characterized by


the relation V̇ = f (V, η) = 0. The η-nullcline is characterized by the relation
η̇ = g(V, η) = 0. The fixed points (or equilibria) are found on the intersection of
nullclines.

1.4.2 Stability Analysis of Nonlinear Systems

1.4.2.1 Local Linearization

A manner to examine stability in nonlinear dynamical systems is to perform local


linearization around an equilibrium. Assume the nonlinear system ẋ = f (x, u) and
f (x0 , u) = 0, that is, x0 is the local equilibrium. The linearization of f (x, u) with
respect to u around x0 (Taylor series expansion) gives the equivalent description

ẋ = Ax + Bu (1.34)

where ⎛ ∂ f1 ∂ f1 ⎞
∂x ∂x· · · ∂∂ xfn1
⎜ ∂ f12 ∂ f22 ⎟
· · · ∂∂ xfn2 ⎟
⎜ ∂ x1 ∂ x2
A = ∇x f = ⎜ ⎟ |x=x0 (1.35)
⎝··· ··· ··· ···⎠
∂ fn ∂ fn ∂ fn
∂ x1 ∂ x2 · · · ∂ xn

and ⎛ ∂ f1 ∂ f1 ∂ f1 ⎞
∂u ∂u· · · ∂u
⎜ ∂ f21 ∂ f22∂ f2 ⎟
n
· · · ∂u
⎜ ∂u 1 ∂u 2 ⎟
B = ∇u f = ⎜ n ⎟ | x=x (1.36)
⎝··· ··· ··· ···⎠ 0

∂ fn ∂ fn ∂ fn
∂u 1 ∂u 2 · · · ∂u n

The eigenvalues of matrix A define the local stability features of the system:
Example 1:
Assume the nonlinear system

d2x dx
2
+ 2x + 2x 2 − 4x = 0 (1.37)
dt dt

By defining the state variables x1 = x, x2 = ẋ the system can be written in the


following form:
ẋ1 = x2
(1.38)
ẋ2 = −2x1 x2 − 2x12 + 4x1

It holds that ẋ = 0 if f (x) = 0 that is (x1∗,1 , x2∗,1 ) = (0, 0) and (x1∗,2 , x2∗,2 ) = (2, 0).
Round the first equilibrium (x1∗,1 , x2∗,1 ) = (0, 0) the system’s dynamics is written as
10 1 Nonlinear Dynamical Systems and Global Linearizing Control Methods

01 ẋ1 01 x1
A = ∇x f = or = (1.39)
40 ẋ2 40 x2

The eigenvalues of the system are λ1 = 2 and λ2 = −2. This means that the fixed
point (x1∗,1 , x2∗,1 ) = (0, 0) is an unstable one.
Next, the fixed point (x1∗,2 , x2∗,2 ) = (2, 0) is analyzed. The associated Jacobian
matrix is computed again. It holds that

0 1
A = ∇x f = (1.40)
−4 −4

The eigenvalues of the system are λ1 = −2 and λ2 = −2. Consequently, the fixed
point (x1∗,2 , x2∗,2 ) = (2, 0) is a stable one.

1.4.2.2 Lyapunov Stability Approach

The Lyapunov method analyzes the stability of a dynamical system without the need
to compute explicitly the trajectories of the state vector x = [x1 , x2 , . . . , xn ]T .
Theorem: The system described by the relation ẋ = f (x) is asymptotically stable in
the vicinity of the equilibrium x0 = 0 if there is a function V (x) such that
(i) V (x) to be continuous and to have a continuous first order derivative at x0
(ii) V (x) > 0 if x=0 and V (0) = 0
(iii) V̇ (x) < 0, ∀x=0.
The Lyapunov function is usually chosen to be a quadratic (and thus positive) energy
function of the system, however, there in no systematic method to define it.
Assume now that ẋ = f (x) and x0 = 0 is the equilibrium. Then the system is
globally asymptotically stable if for every ε > 0, ∃δ(ε) > 0, such that if ||x(0)|| < δ
then ||x(t)|| < ε, ∀t≥0.
This means that if the state vector of the system starts in a disk of radius δ then
as time advances it will remain at the same disk, as shown in Fig. 1.6. Moreover, if
lim t→∞ ||x(t)|| = x0 = 0, then the system is globally asymptotically stable.
Example 1: Consider the system

ẋ1 = x2
(1.41)
ẋ2 = −x1 − x32

The following Lyapunov function is defined:

V (x) = x12 + x22 (1.42)

The equilibrium point is (x1 = 0, x2 = 0). It holds that V (x) > 0∀(x1 , x2 )=
(0, 0) and V (x) = 0 for (x1 , x2 ) = (0, 0). Moreover, it holds that
1.4 Basic Features in the Study of Nonlinear Dynamics 11

Fig. 1.6 Global stability and global asymptotic stability

V̇ (x) = 2x1 ẋ1 + 2x2 ẋ2 = 2x1 x2 + 2x2 (−x1 − x23 )⇒


(1.43)
V̇ (x) = −2x24 < 0 ∀ (x1 , x2 )=(0, 0)

Therefore, the system is asymptotically stable and lim t→∞ (x1 , x2 ) = (0, 0).
Example 2: Consider the system

ẋ1 = −x1 (1 + 2x1 x22 )


(1.44)
ẋ2 = x13 x2

The following Lyapunov function is considered:

1 2
V (x) = x + x22 (1.45)
2 1
The equilibrium point is x1 = 0, x2 = 0. It holds that

V̇ (x) = x1 ẋ1 + 2x2 ẋ2 = −x12 (1 + 2x1 x22 + 2x2 (x13 x2 ))⇒
(1.46)
V̇ (x) = −x12 < 0 ∀ (x1 , x2 )=(0, 0)

Therefore, the system is asymptotically stable and lim t→∞ (x1 , x2 ) = (0, 0).

1.4.3 Stability Analysis of Nonlinear Models

Local stability of the previously described nonlinear model can be studied around the
associated equilibria. Local linearization can be performed around equilibria. Using
the set of differential equations ẋ = h(x) that describe the nonlinear system and
performing Taylor series expansion, that is, ẋ = h(x)⇒ẋ = h(x0 )|x0 + ∇x h(x −
x0 ) + · · · .
12 1 Nonlinear Dynamical Systems and Global Linearizing Control Methods

Consider for instance a nonlinear model (Duffing oscillator) under no external


force
ẋ1 f (x1 , x2 )
= (1.47)
ẋ2 g(x1 , x2 )

kα 2 x 3
where f (x1 , x2 ) = x2 and g(x1 , x2 ) = − mc x2 − mk x1 − m 1 . The fixed points of
this model are computed from the condition ẋ1 = 0 and ẋ2 = 0, and are found to be
(x1∗ , x2∗ ) = (0, 0). The Jacobian matrix ∇x h = M is given as
 
∂f ∂f
J= ∂ x1 ∂ x2 (1.48)
∂g ∂g
∂ x1 ∂ x2

which results in the matrix


 
0 1
J= 3kα 2 x12 (1.49)
− mk − m − mc

At the fixed point (x1∗ , x2∗ ) = (0, 0) one obtains det (λI − J ) = λ2 + mc λ + mk which
for c2 < 4 km has imaginary roots with negative real part. Consequently, the system
is locally stable at the operating point and exhibits attenuating oscillations.
The eigenvalues of matrix M define stability around fixed points (stable or unstable
fixed point). To this end, one has to find the roots of the associated characteristic
polynomial which is given by det (λI − J ) = 0 where I is the identity matrix.

1.5 Phase Diagrams and Equilibria of Nonlinear Models

1.5.1 Phase Diagrams for Linear Dynamical Systems

The following autonomous linear system is considered:

ẋ = Ax (1.50)

The eigenvalues of matrix A define the system dynamics. Some terminology asso-
ciated with fixed points is as follows:
A fixed point for the system of Eq. (1.50) is called hyperbolic if none of the
eigenvalues of matrix A has zero real part. A hyperbolic fixed point is called a saddle
if some of the eigenvalues of matrix A have real parts greater than zero and the
rest of the eigenvalues have real parts less than zero. If all of the eigenvalues have
negative real parts then the hyperbolic fixed point is called a stable node or sink. If
all of the eigenvalues have positive real parts then the hyperbolic fixed point is called
1.5 Phase Diagrams and Equilibria of Nonlinear Models 13

Fig. 1.7 Phase diagram of 10


initial state variables x1 , x2
of a second order linear 8
autonomous system with
negative eigenvalues, where 6
λ1 < λ2 < 0
4

x2
0

−2

−4

−6

−8

−10
−15 −10 −5 0 5 10 15
x1

an unstable node or source. If the eigenvalues are purely imaginary then one has an
elliptic fixed point which is said to be a center.
Case 1: Both eigenvalues of matrix A are real and unequal, that is, λ1 =λ1 =0. For
λ1 < 0 and λ2 < 0 the phase diagram for z 1 and z 2 is shown in Fig. 1.7.
In case λ2 is smaller than λ1 the term eλ2 t decays faster than eλ1 t .
For λ1 > 0 > λ2 the phase diagram of Fig. 1.8 is obtained:
In the latter case there are stable trajectories along eigenvector v1 and unstable
trajectories along eigenvector v2 of matrix A. The stability point (0, 0) is said to be
a saddle point.
When λ1 > λ2 > 0 then one has the phase diagrams of Fig. 1.9:
Case 2: Complex eigenvalues:
Typical phase diagrams in the case of stable complex eigenvalues are given in
Fig. 1.10.
Typical phase diagrams in the case of unstable complex eigenvalues are given in
Fig. 1.11.
Typical phase diagrams in the case of imaginary eigenvalues are given in Fig. 1.12.
Case 3: Matrix A has nonzero eigenvalues which are equal to each other. The asso-
ciated phase diagram is given in Fig. 1.13.
14 1 Nonlinear Dynamical Systems and Global Linearizing Control Methods

Fig. 1.8 Phase diagram of 2


initial state variables x1 , x2
of a second order linear
1.5
autonomous system with real
eigenvalues, where
λ1 > 0 > λ2 1

0.5

x2
0

−0.5

−1

−1.5

−2
−30 −20 −10 0 10 20 30
x1

Fig. 1.9 Phase diagram of 3


state variables x1 , x2 of a
second order linear
autonomous system with real 2
eigenvalues λ1 > λ2 > 0

1
x2

−1

−2

−3
−30 −20 −10 0 10 20 30
x1
1.5 Phase Diagrams and Equilibria of Nonlinear Models 15

Fig. 1.10 Phase diagram of 15


state variables x1 , x2 of a
second order linear
autonomous system with 10
complex stable eigenvalues

x2
0

−5

−10

−15
−10 −5 0 5 10
x1

Fig. 1.11 Phase diagram of 10


x 10
state variables x1 , x2 of a 1
second order linear
autonomous system with 0.8
complex unstable
eigenvalues 0.6

0.4

0.2
x2

−0.2

−0.4

−0.6

−0.8

−1
−8 −6 −4 −2 0 2 4 6 8
x1 x 10
9
16 1 Nonlinear Dynamical Systems and Global Linearizing Control Methods

Fig. 1.12 Phase diagram of 25


state variables x1 , x2 of a 2nd
order linear autonomous 20
system with imaginary
eigenvalues 15

10

x2
0

−5

−10

−15

−20

−25
−15 −10 −5 0 5 10 15
x1

Fig. 1.13 Phase diagram of 10


state variables x1 , x2 of a
second order linear 8
autonomous system with
identical stable eigenvalues 6

2
x2

−2

−4

−6

−8

−10
−15 −10 −5 0 5 10 15
x1
1.5 Phase Diagrams and Equilibria of Nonlinear Models 17

1.5.2 Multiple Equilibria for Nonlinear Dynamical Systems

A nonlinear system can have multiple equilibria as shown in the following example.
Consider for instance the model of a pendulum under friction

ẋ1 = x2
(1.51)
ẋ2 = − gl sin(x1 ) − K
m x2

The associated phase diagram is designed for different initial conditions and is given
in Fig. 1.14.
For the previous model of the nonlinear oscillator, local linearization around
equilibria with the use of Taylor series expansion enables analysis of the local stability
properties of nonlinear dynamical systems

ẋ1 = f 1 (x1 , x2 )
(1.52)
ẋ2 = f 2 (x1 , x2 )

which gives

ẋ1 = f 1 ( p1 , p2 ) + α11 (x1 − p1 ) + α12 (x2 − p2 ) + h.o.t


(1.53)
ẋ2 = f 2 ( p1 , p2 ) + α21 (x1 − p1 ) + α22 (x2 − p2 ) + h.o.t

Fig. 1.14 Phase diagram of 6


state variables x1 , x2 of a
second order nonlinear
oscillator that exhibits 4
multiple equilibria

2
x2

−2

−4

−6
−30 −20 −10 0 10 20 30
x1
18 1 Nonlinear Dynamical Systems and Global Linearizing Control Methods

where
∂ f 1 (x1 ,x2 ) ∂ f 1 (x1 ,x2 )
α11 = ∂ x1 |x1 = p1 ,x2 = p2 α12 = ∂ x2 |x1 = p1 ,x2 = p2
∂ f 2 (x1 ,x2 ) ∂ f 2 (x1 ,x2 ) (1.54)
α21 = ∂ x1 |x1 = p1 ,x2 = p2 α22 = ∂ x2 |x1 = p1 ,x2 = p2

For the equilibrium it holds that


f 1 ( p1 , p2 ) = 0
(1.55)
f 2 ( p1 , p2 ) = 0

Next, by defining the new variables y1 = x1 − p1 and y2 = x2 − p2 one can rewrite


the state-space equation as
ẏ1 = ẋ1 = α11 y1 + α12 y2 + h.o.t.
(1.56)
ẏ2 = ẋ2 = α21 y1 + α22 y2 + h.o.t.

By omitting the higher order terms one can approximate the initial nonlinear system
with its linearized equivalent
ẏ1 = α11 y1 + α12 y2
(1.57)
ẏ2 = α21 y1 + α22 y2

which in matrix form is written as

ẏ = Ay (1.58)

where  
∂ f1 ∂ f1
α11 α12 ∂ x1 ∂ x2 ∂f
A= = ∂ f2 ∂ f2 |x= p = ∂ x |x= p (1.59)
α21 α22 ∂ x1 ∂ x2

Matrix A = ∂∂ xf is the Jacobian matrix of the system computed at point (x1 , x2 ) =


( p1 , p2 ). It is anticipated that the trajectories of the phase diagram of the linearized
system in the vicinity of the equilibrium point will be also close to the trajectories
of the phase diagram of the nonlinear system.
Therefore, if the origin (equilibrium) in the phase diagram of the linearized system
is (i) a stable node (matrix A has stable real eigenvalues), (ii) a stable focus (matrix A
has stable complex eignevalues), (iii) a saddle point (matrix A has some eigenvalues
with negative real part while the rest of the eigenvalues have positive real part),
then one concludes that the same properties hold for phase diagram of the nonlinear
system.
Example: A nonlinear oscillator of the following form is considered:

ẋ = f (x)⇒
(1.60)
ẋ1 x2
=
ẋ2 −sin(x1 ) − 0.5x2
1.5 Phase Diagrams and Equilibria of Nonlinear Models 19

The associated Jacobian matrix is



∂f 0 1
∂x = (1.61)
−cos(x1 ) −0.5

There are two equilibrium points (0, 0) and (π, 0). The linearization around the
equilibria gives

0 1 0 1
A1 = A2 =
−1 −0.5 1 −0.5
(1.62)
with eigenvalues with eigenvalues

λ1,2 = −0.25± j0.97 λ1 = −1.28 λ2 = 0.78

Consequently, the equilibrium (0, 0) is a stable focus (matrix A1 has stable complex
eignevalues) and the equilibrium (π, 0) is a saddle point (matrix A2 has an unstable
eigenvalue).

1.5.3 Limit Cycles

A dynamical system is considered to exhibit limit cycles when it admits the nontrivial
periodic solution
x(t + T ) = x(t) ∀ t≥0 (1.63)

for some T > 0 (the trivial periodic solution is the one associated with x(t) =
constant). An example about the existence of limit cycles is examined in the case of
the Van der Pol oscillator. The state equations of the oscillator are

ẋ1 = x2
(1.64)
ẋ2 = −x1 + ε(1 − x!2 )x2

Next the phase diagram of the Van der Pol oscillator is designed for three different
values of parameter ε, namely ε = 0.2, ε = 1 and ε = 5.0. In Figs. 1.15 and 1.16,
it can be observed that in all cases there is a closed trajectory to which converge all
curves of the phase diagram that start from points far from it.
To study conditions under which dynamical systems exhibit limit cycles, a second
order autonomous nonlinear system is considered next, given by

ẋ1 f 1 (x1 , x2 )
= (1.65)
ẋ2 f 2 (x1 , x2 )
20 1 Nonlinear Dynamical Systems and Global Linearizing Control Methods

Fig. 1.15 Phase diagram of 2.5


the Van der Pol oscillator for
ε = 0.2 2

1.5

0.5

x2
0

−0.5

−1

−1.5

−2

−2.5
−2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5
x1

Fig. 1.16 Phase diagram of 3


the Van der Pol oscillator for
ε=1
2

1
x2

−1

−2

−3
−2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5
x1
1.5 Phase Diagrams and Equilibria of Nonlinear Models 21

Next, the following theorem defines the appearance of limit cycles in the phase
diagram of dynamical systems [238, 555].
Theorem 1 (Poincaré-Bendixson): If a trajectory of the nonlinear system of Eq. (1.65)
remains in a finite region Ω, then one of the following is true: (i) the trajectory goes
to an equilibrium point, (ii) the trajectory tends to a limit cycle, (iii) the trajectory is
itself a limit cycle.
Moreover, the following theorem provides a sufficient condition for the nonexis-
tence of limit cycles:
Theorem 2 (Bendixson): For the nonlinear system of Eq. (1.65), no limit cycle can
exist in a region Ω of the phase plane in which ∂∂ xf11 + ∂∂ xf22 does not vanish and does
not change sign.

1.6 Bifurcations in Nonlinear Dynamics

1.6.1 Bifurcations of Fixed Points of Nonlinear Models

As the parameters of the nonlinear model of the system are changed, the stability of
the equilibrium point can also change and also the number of equilibria may vary.
Values of these parameters at which the locus of the equilibrium (as a function of the
parameter) changes and different branches appear are known as critical or bifurca-
tion values. The phenomenon of bifurcation has to do with quantitative changes in
parameters leading to qualitative changes in the system’s properties [94, 137, 194,
258, 287].
Another issue in bifurcation analysis has to do with the study of the segments of the
bifurcation branches in which the fixed points are no longer stable but either become
unstable or are associated with limit cycles. The latter case is called Hopf bifurcation
and the system’s Jacobian matrix has a pair of complex imaginary eigenvalues.

1.6.2 Saddle-Node Bifurcations of Fixed Points


in a One-Dimensional System

The considered dynamical system is given by ẋ = μ − x 2 . The fixed points of the



system result from the condition ẋ = 0 which for μ > 0 gives x ∗ = ± μ. The first
√ √
fixed point x = μ is a stable one, whereas the second fixed point x = − μ is an
unstable one. The phase diagram of the system is given in Fig. 1.17. Since there is
one stable and one unstable fixed point the associated bifurcation (locus of the fixed
points in the phase plane) will be a saddle-node one.
The bifurcations diagram is given next. The diagram shows how the fixed points
of the dynamical system vary with respect to the values of parameter μ. In the above
case it represents a parabola in the μ − x plane as shown in Fig. 1.18.
22 1 Nonlinear Dynamical Systems and Global Linearizing Control Methods

Fig. 1.17 Phase diagram


and fixed points of the
system ẋ = μ − x 2 .
Converging arrows denote a
stable fixed point

Fig. 1.18 Saddle-node


bifurcation diagram


For μ > 0 the dynamical system has two fixed points located at ± μ. One fixed
point is stable and is associated with the upper branch of the parabola. The other
fixed point is unstable and is associated with the lower branch of the parabola. The
value μ = 0 is considered to be a bifurcation value and the point (x, μ) = (0, 0) is a
bifurcation point. This particular type of bifurcation where one branch is associated
with fixed points and the other branch is not associated to any fixed points is known
as saddle-node bifurcation.

1.6.3 Pitchfork Bifurcation of Fixed Points

In pitchfork bifurcations the number of fixed points varies with respect to the values
of the bifurcation parameter. The dynamical system ẋ = x(μ − x 2 ) is considered.
1.6 Bifurcations in Nonlinear Dynamics 23

Fig. 1.19 Phase diagram


and fixed points of a system
exhibiting pitchfork
bifurcations. Converging
arrows denote a stable fixed
point

Fig. 1.20 Pitchfork


bifurcation diagram

The associated fixed points are found by the condition ẋ = 0. For μ < 0 there is
one fixed point at zero which is stable. For μ = 0 there is still one fixed point at
zero which is still stable. For μ > 0 there are three fixed points, one at x = 0, one at
√ √
x = + μ which is stable and one at x = − μ which is also stable. The associated
phase diagrams and fixed points are presented in Fig. 1.19.
The bifurcations diagram is given next. The diagram shows how the fixed points
of the dynamical system vary with respect to the values of parameter μ. In the above
case, it represents a parabola in the μ − x plane as shown in Fig. 1.20.
24 1 Nonlinear Dynamical Systems and Global Linearizing Control Methods

1.6.4 The Hopf Bifurcation

Bifurcation of the equilibrium point means that the locus of the equilibrium on the
phase plane changes due to variation in the system’s parameters. Equilibrium x ∗ is
a hyperbolic equilibrium point if the real parts of all its eigenvalues are nonzero. A
Hopf bifurcation appears when the hyperbolicity of the equilibrium point is lost due
to variation of the system parameters and the eigenvalues become purely imaginary.
By changing the values of the parameters at a Hopf bifurcation, an oscillatory solution
appears [373, 576].
The stages for finding Hopf bifurcations in nonlinear dynamical systems are
described next. The following autonomous differential equation is considered:

dx
= f 1 (x, λ) (1.66)
dt

where x is the state vector x∈R n and λ∈R m is the vector of the system parameters. In
Eq. (1.66) a point x ∗ satisfying f 1 (x ∗ ) = 0 is an equilibrium point. Therefore, from
the condition f 1 (x ∗ ) = 0 one obtains a set of equations which provide the equilibrium
point as function of the bifurcating parameter. The stability of the equilibrium point
can be evaluated by linearizing the system’s dynamic model around the equilibrium
point and by computing eigenvalues of the Jacobian matrix. The Jacobian matrix at
the equilibrium point can be written as

∂ f 1 (x)
J f1 (x ∗ ) = |x=x ∗ (1.67)
∂x
and the determinant of the Jacobian matrix provides the characteristic equation which
is given as

det (μi In − J f1 (x ∗ ) ) = λn1 + α1 λin−1 + · · · + αn−1 λi + αn = 0 (1.68)

where In is the n×n identity matrix, μi with i = 1, 2, . . . , n denotes the eigenvalues


of the Jacobian matrix D f 1 (x ∗ ). From the requirement the eigenvalues of the sys-
tem to be purely imaginary one obtains a condition, i.e. values that the bifurcating
parameter should take, for the appearance of Hopf bifurcations.
As example, the following nonlinear system is considered:

ẋ1 = x2
(1.69)
ẋ2 = −x1 + (m − x12 )x1

Setting ẋ1 = 0 and ẋ2 = 0 one obtains the system’s fixed points. For m≤1 the
system has the fixed point (x1∗ , x2∗ ) = (0, 0). For m > 1 the system has the fixed
√ √
points (x1∗ , x2∗ ) = (0, 0), (x1∗ , x2∗ ) = ( m − 1, 0), (x1∗ , x2∗ ) = (− m − 1, 0). The
system’s Jacobian is
1.6 Bifurcations in Nonlinear Dynamics 25

Fig. 1.21 Phase diagram 2


and fixed points of a system
exhibiting Hopf bifurcations
1.5

0.5

x2
0

−0.5

−1

−1.5

−2
−2 −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5
x1

Fig. 1.22 Hopf bifurcation 4


diagram
3

0
x

−1

−2

−3

−4
1 2 3 4 5 6 7 8 9 10 11
m
26 1 Nonlinear Dynamical Systems and Global Linearizing Control Methods

0 1
J= (1.70)
−1 + m − 3x12 0

If m≤1, the eigenvalues of the Jacobian at the fixed point (x1∗ , x2∗ ) = (0, 0) will
be imaginary. Thus the system exhibits Hopf bifurcations, as shown in Fig. 1.21. If
m > 1 then the fixed point (x1∗ , x2∗ ) = (0, 0) is an unstable one. On the other hand,

if m > 1 the eigenvalues of the Jacobian at the fixed points (x1∗ , x2∗ ) = ( m − 1, 0)

and (x1∗ , x2∗ ) = (− m − 1, 0) will be imaginary and the system exhibits again Hopf
bifurcations.
The bifurcations diagram is given next. The diagram shows how the fixed points
of the dynamical system vary with respect to the values of parameter μ. In the above
case it represents a parabola in the μ − x plane as shown in Fig. 1.22.

1.7 Predecessors of Differential Flatness Theory

1.7.1 The Differential Geometric Approach

Before proceeding to the analysis of the differential geometric approach for the
control of nonlinear systems the following definitions are given [216, 238]:
Vector Field: A mapping f : D→R n where D⊂R n is a domain, is said to be a vector
field on D. A vector field is a n-dimensional column.
Covector Field: The transpose of a vector field is said to be a covector field. A
covector field is an n-dimensional row.
Inner Product: If f and w are, respectively, a vector field and a covector field on D,
then the inner product < w, f > is defined as


n
< w, f >= w(x) f (x) = wi (x) f i (x) (1.71)
i=1

Differential: Let h : D→R. The differential of h is a covector field defined as

∂h ∂h ∂h ∂h
dh = =[ , ,..., ] (1.72)
∂x ∂ x1 ∂ x1 ∂ xn

Lie Derivatives: Let h : D→R and f : D→R n . The Lie derivative of h, with respect
to f or along f , is denoted as L f h and is defined as

∂h
Lfh = f (x) (1.73)
∂x
This is the meaning of computing the derivatives of h along the trajectories of the
system ẋ = f (x). The previous notation can be generalized towards the computation
1.7 Predecessors of Differential Flatness Theory 27

of Lie derivatives of higher order with respect to the same vector field, or with respect
to a new vector field. Thus, one has

∂L f h
L g L f h(x) = g(x) (1.74)
∂x
while it also holds

L 0f h(x) = h(x)
∂h n
L f h(x) = ∂h
∂ x1 f 1 +
1 ∂h 2
∂ x2 f 2 + ··· + ∂ xn f n
··· (1.75)
∂ L k−1
L kf h(x) = L f L k−1
f = ∂x
f
f (x)

Using the Lie derivative notation one can arrive at the definition of the relative degree
for nonlinear dynamical systems. Consider for example the following single-input
single-output nonlinear system

ẋ = f (x) + g(x)u
(1.76)
y = h(x)

has relative degree r in a domain D0 if

L g L if h(x) = 0 for 0≤i≤r − 2 and L g L rf−1 h(x)=0 ∀ x∈D0 (1.77)

Lie Bracket: Let f and g be two vector fields on D⊂R n . The Lie Bracket of f and
g is written as [ f, g] and is a third vector field which is defined as

∂g ∂f
[ f, g](x) = f − g (1.78)
∂x ∂x

where ∂∂gx and ∂∂ xf are Jacobian matrices. The definition of the Lie Brackets can be
repetitively used as follows:

ad 0f g(x) = g(x)
ad f g(x) = [ f, g](x)
(1.79)
···
ad kf g(x) = [ f, ad k−1
f g](x)

For Lie Brackets the following properties hold:


Bilinear: Let f 1 , f 2 and g1 , g2 be vector fields and r1 , r2 be real numbers. Then,

[r1 f 1 + r2 f 2 , g1 ] = r1 [ f 1 , g1 ] + r2 [ f 2 , g2 ]
(1.80)
[ f 1 , r1 g1 + r2 g2 ] = r1 [ f 1 , g1 ] + r2 [ f 1 , g2 ]
28 1 Nonlinear Dynamical Systems and Global Linearizing Control Methods

Skew commutative: [ f, g] = −[g, f ]


Jacobi identity: If f and g are vector fields and h is a real-valued function, then

L [ f,g] h(x) = L f L g h(x) = L g L f h(x) (1.81)

Diffeomorphism: A mapping T : D→R n is a diffeomorphism on D if (i) it is


invertible on D, that is there exists a function T −1 (x) such that T −1 (T (x)) = x
for all x∈D and (ii) both T (x) and T −1 (x) are continuously differentiable. If the
Jacobian matrix [ ∂∂Tx ] is nonsingular at a point x0 ∈D, then from the inverse function
theorem it is concluded that there is a neighborhood N of x0 , such that T restricted
to N is a diffeomorphism on N , T is said to be a global diffeomorphism if it is a
diffeomorphism on R n and T (R n ) = R n . T is a global diffeomorphism if and only if
(i) [∂ T /∂ x] is nonsingular for all x∈R n
(ii) T is proper, that is lim ||x||→∞ ||T (x)|| = ∞
Distribution: Let f 1 , f 2 , . . ., f k be vector fields on D⊂R n . At any fixed point x∈D,
f 1 (x), f 2 (x), . . ., f k (x) are vectors in R n and

Δ(x) = span{ f 1 (x), f 2 (x), . . . , f n (x)} (1.82)

is a subspace on R n . To each point x∈R n a subspace Δ(x) is assigned. One can refer
to this assignment using
Δ = span( f 1 , f 2 , . . . , f n ) (1.83)

and this is called a distribution.This implies that, Δ is the collection of all vector
spaces Δ(x) for xin D. The dimension of Δ(x) which is denoted as

dim(Δ(x)) = rank[ f 1 (x), f 2 (x), . . . , f k (x)] (1.84)

may vary with x. However, when Δ = span{ f 1 , f 2 , . . . , fr }, where { f 1 (x),


. . . , fr (x)} are linearly independent for all x∈D, then dim(Δ(x)) = r for all x∈D. In
that case Δ is said to be a nonsingular distribution on D, generated by f 1 , f 2 , . . . , fr .
It follows from the smoothness of the vector fields that every y∈Δ can be expressed as


r
g(x) = ci (x) f i (x) (1.85)
i=1

where ci (x) are smooth functions defined on D.


Involutive distribution: A distribution Δ is involutive if

g1 ∈Δ and g2 ∈Δ ⇒[g1 , g2 ] ∈ Δ (1.86)

If Δ is a nonsingular distribution on Δ, generated by f 1 , f 2 , . . . , fr then it can be


verified that Δ is an involutive distribution if and only if
1.7 Predecessors of Differential Flatness Theory 29

[ f i , f j ]∈Δ ∀ 1≤i, j≤r (1.87)

or equivalently

r
[ f i , f j ](x) = αi jk f k (x) ∀ i, j (1.88)
k=1

Equivalently, involutivity means that if one forms the Lie bracket of any pairs of vector
fields from the set [ f 1 , f 2 , . . . , f m ], the produced vector field can be expressed as a
linear combination of the original set of vector fields. It is noted that checking if a
set of vector fields [ f 1 , . . . , f m ] is involutive is equivalent to checking if

rank( f 1 (x), . . . , f m (x)) = rank( f 1 (x), . . . , f m (x), [ f i , f j ](x)) (1.89)

for all x and all i, j.


Codistribution: Codistributions are dual objects to distributions. They are defined
using covector fields and possess properties in analogy to those of distributions. A
particular codistribution is the one that annihilates a distribution Δ, which is denoted
as Δ⊥ , and which is defined as

Δ⊥ (x) = {w∈(R n )∗ | < w, v >= 0, ∀ v∈Δ(x)} (1.90)

where (R n )∗ is the n-dimensional space of new vectors.


Complete integrability: Let Δ be a nonsingular distribution on D, generated by
f 1 , . . . , f n . Then Δ is completely integrable, if for each x0 ∈D, there exists a neigh-
borhood N of x0 and n − r real-valued smooth functions h 1 (x), . . . , h n−r (x), such
that h 1 (x), . . . , h n−r (x) satisfy the partial differential equations
∂h j
f i (x) = 0, ∀ 1≤i≤r and 1≤ j≤n − r (1.91)
∂x

and the covector fields dh j (x) are linearly independent for all x∈D. Equivalently,
one can write
Δ⊥ = span{dh 1 , . . . , dh n−r } (1.92)

Finally, a key result in differential geometry is Frobenius’ theorem which states that:
A nonsingular distribution is completely integrable if it is involutive.

1.7.2 Elaboration on the Frobenius Theorem

The Frobenius theorem is important for the formal treatment of feedback linearization
of n-order nonlinear systems. It provides a necessary and sufficient condition for the
solvability of a special class of partial differential equations. Consider for example
the set of first-order partial differential equations
30 1 Nonlinear Dynamical Systems and Global Linearizing Control Methods

∂h ∂h ∂h
∂ x1 f 1 + ∂ x2 f 2 + ∂ x3 f 3 =0
∂h ∂h ∂h (1.93)
∂ g1 g1 + ∂ x2 g2 + ∂ x3 g3 =0

where f i (x1 , x2 , x3 ) and gi (x1 , x2 , x3 ), i = 1, 2, 3 are scalar functions of x1 , x2 , x3


and h(x1 , x2 , x3 ) is an unknown function. If a solution h(x1 , x2 , x3 ) exists for the
above set of partial differential equations, then it is said that the set of vector fields
[ f, g] where f = ( f 1 , f 2 , f 3 )T and g = (g1 , g2 , g3 )T is completely integrable.
It has to be determined when this set of partial differential equations is solvable.
The Frobenius theorem provides a relatively simple condition about this. Equa-
tion (1.93) has a solution h(x1 , x2 , x3 ) if and only if there exist scalar functions
α1 (x1 , x2 , x3 ) and α2 (x1 , x2 , x3 ), such that

[ f, g] = α1 f + α2 g (1.94)

which means that the Lie bracket of f and g can be expressed as a linear combination
of f and g. This is the involutivity condition on the vector fields [ f, g]. Thus, the
Frobenius theorem states that the set of vector fields [ f, g] is completely integrable,
if and only if it is involutive.
Next, the Frobenius theorem is restated, according to the previous definitions of
complete integrability and involutivity.
Frobenius theorem: Let f 1 , f 2 , . . . , f m be a set of linearly independent vector fields.
The set is completely integrable, if and only if it is involutive.

1.7.3 Input–Output Linearization

Input–output linearization is analyzed for nonlinear dynamical systems of the form

ẋ = f (x) + g(x)u
(1.95)
y = h(x)

where f : D→R n , g : D→R n and h : D→R are smooth, D⊂R n is a domain.


Moreover, y is the system’s output. By input–output linearization one means the
generation of the linear differential relation between the output y and a new equivalent
input v [498]. The basic approach of input–output linearization is to differentiate the
output function y repeatedly until the input u appears.
The single-input single-output system of Eq. (1.95) is considered [238]

ẋ = f (x) + g(x)u
(1.96)
y = h(x)

The system has relative degree r on D, which means

L g L if h(x) = 0 for 0≤i≤r − 2, and L g L rf−1 h(x)=0, ∀x∈D (1.97)


1.7 Predecessors of Differential Flatness Theory 31

The following two lemmas are applied to the system [238]:


Lemma 1: For all x∈D and all integers k and j such that k≥0 and 0≤r − 1 one has

0 if 0≤ j + k < r − 1
L ad i g L kf h(k) = r −1 (1.98)
f (−1) j L g L f h(x) =0 if j + k = r − 1

Proof : The proof is based on induction. For j = 0 Eq. (1.98) it holds because it
becomes equivalent to the definition of the relative degree of the system of Eq. (1.96).
Next, it is assumed that Eq. (1.98) holds for some j and it is proven for j + 1. Using
the Jacobi identity one has

L [ f,β] λ(x) = L f L β λ(x) − L β L f λ(x) (1.99)

for any real-valued function λ and any vector fields f and β. Taking λ = L kf ,
j
β = ad f g one obtains

L ad j+1 g L kf h(k) = L [ f,ad i g] L kf h(x) = L f L ad i g L kf h(x) − L ad i g L k+1


f h(x)
f f f j
(1.100)

In the previous equation, the first term of the right-hand side is equal to 0, that is,
L f L ad i g L kf h(x) = 0 because j + k + 1≤r − 1 or j + k < r − 1.
f
Moreover, using that Eq. (1.98) holds for j one has also

0 if 0≤ j + k + 1 < r − 1
L ad i g L k+1
f h(k) = (1.101)
f (−1) j L g L rf−1 h(x)=0 if j + k + 1 = r − 1

Consequently, one obtains



0 if 0≤ j + k + 1 < r − 1
L ad i+1 g L kf h(k) = (1.102)
f (−1) j+1 L g L rf−1 h(x)=0 if j + k + 1 = r − 1

which completes the proof of the Lemma.


Lemma 2: For all x∈D
• the row vectors dh(x, d L f )h(x), . . . , d L rf−1 (x) are linearly independent
• the column vectors g(x), ad f g(x), . . . , ad rf −1 g(x) are linearly independent
32 1 Nonlinear Dynamical Systems and Global Linearizing Control Methods

Proof : One has


⎛ ⎞
dh(x)  
⎝ ··· ⎠ g(x) · · · ad r −1 g(x) =
f
d L rf−1 h(x)
⎛ ⎞
L g h(x) L ad f g h(x) · · · ··· L ad r −1 g h(x) (1.103)
⎜ L L h(x) ⎟
f
⎜ g f ··· · · · L ad r −2 g h(x) ∗ ⎟
⎜ f ⎟
⎝ ··· ··· ··· ··· ··· ⎠
r −1
L g L f h(x) ∗ ··· ··· ∗

From the previous Lemma, the right-hand side matrix is written as


⎛ ⎞
0 ··· ··· 0 
⎜0 ··· ···  ∗⎟
⎜ ⎟
⎜· · · ··· ··· ··· · · ·⎟ (1.104)
⎜ ⎟
⎝0  ··· ··· ∗⎠
 ∗ ··· ··· ∗

where  denotes a nonzero element. Thus, the matrix is nonsingular. This provides
a proof for the Lemma, because if any of the two matrices appearing on the left side
of the equation had rank less than n, their product should be a singular matrix.
The previous lemma proves that r ≤n. Next, the main result of input–output lin-
earization will be formulated: A single-input single-output system of relative degree
r < n can be locally transformed into the canonical (normal) form. This is given in
the following theorem:
Theorem: The system of Eq. (1.96) is considered and it is assumed that it has relative
degree r < n in D. Then, for every x0 ∈D, there exist a neighborhood N of x0 and
smooth functions φ1 (x), . . . , φn−r (x), such that

L g φi (x) = 0, ∀ 1≤i≤n − r, ∀ x∈N (1.105)

and the mapping ⎛ ⎞


φ1 (x)
⎜ ··· ⎟
⎜ ⎟
⎜ φn−r (x) ⎟
T (x) = ⎜
⎜ h(x) ⎟
⎟ (1.106)
⎜ ⎟
⎝ ··· ⎠
L rf−1 h(x)

restricted to N , is a diffeomorphism on N .
Proof : The distribution Δ = span{g} is nonsingular, involutive, and has dimension
1. By Frobenius’ theorem Δ is completely integrable. Consequently, for every x0 ∈D
1.7 Predecessors of Differential Flatness Theory 33

there exist a neighborhood N1 of x0 and n − 1 smooth functions φ1 (x), . . . , φn−1 (x)


with linearly independent differentials such that

L g φi (x) = 0 for 1≤i≤n − 1 ∀ x∈N1 (1.107)

Equivalently,
Δ⊥ = span{dφ1 , . . . , dφn−1 } (1.108)

on N1 . Since
L g L if h(x) = 0, for 0≤i≤r − 2 (1.109)

and dh 1 , . . . , d L rf−2 h(x) are linearly independent, one can use h, . . . , L rf−2 h as part
of these n − 1 functions. In particular they can be denoted as φn−r +1 , . . . , φn−1 .
Since L g L rf−1 h(x)=0, one has

d L rf−1 h(x0 )∈Δ


/ ⊥ (x0 )⇒rank[ ∂∂Tx (x0 )] = n⇒
∂T (1.110)
∂ x (x 0 ) is nonsingular

2 of x 0 such that T (x), restricted to N2 , is


This shows that there is a neighborhood N
a diffeomorphism on N2 . Taking N = N1 N2 completes the theorem’s proof.

1.7.4 Elaborating on Input–Output Linearization

1.7.4.1 The Case of a Well-Defined Relative Degree

First, a region Ωx of the state-space is considered. Using the notations of differential


geometry, the process of repeated differentiation gives

ẏ = ∇h( f + gu) = L f h(x) + L g h(x)u = v (1.111)

If L g h(x)=0 for some x = x0 in Ωx , then by continuity this relation is verified in


a finite neighborhood Ω of x0 . In Ω the control input that is finally exerted on the
system is given by
1
u= (−L f h + v) (1.112)
Lgh

results in a linear relation between u and v, which is ẏ = v.


If, however, L g h(x) = 0 for all x∈Ωx one can attempt to differentiate ẏ once
more with respect to time, and this gives

ÿ = L 2f h(x) + L g L f h(x)u (1.113)

If L g L f h(x) is again zero for all x∈Ωx , additional differentiations with respect to
time can be attempted
34 1 Nonlinear Dynamical Systems and Global Linearizing Control Methods

y (i) = L if h(x) + L g L i−1


f h(x)u (1.114)

until for some integer r one arrives at

L g L i−1
f h(x) =0 (1.115)

for some x = x0 in Ωx . If the above relation indeed holds then one can compute the
stabilizing control input that is finally applied to the system

1
u= (−L rf h + v) (1.116)
L g L i−1
f h(x)

By applying the control input of Eq. (1.116) to the equivalent description of the
system’s dynamics one gets

y (r ) = L rf h(x) + L g L rf−1 h(x)u (1.117)

one arrives at the input–output linearized description of the system

y (r ) = v (1.118)

The number r of the differentiations required for the input u to appear is the relative-
degree of the system. One has r ≤n, where n is the system’s order. If r = n then
input–output linearization becomes equivalent to the input-state linearization of the
system.

1.7.4.2 Input–Output Linearization and Normal Forms

When the relative degree r is defined and r < n, the nonlinear system of Eq. (1.95)
can be transformed to the normal form using the new state vector [y, ẏ, . . . , y (r −1) ].
Let
μ = [μ1 , μ2 , . . . , μr ]T = [y, ẏ, . . . , y (r −1) ]T (1.119)

In a neighborhood Ω of a point x0 , the normal form of the system can be written as


⎛ ⎞ ⎛ ⎞⎛ ⎞ ⎛ ⎞
μ̇1 0 1 0 ··· ··· 0 0 μ1 0
⎜ μ̇2 ⎟ ⎜ 0 0 1 ··· ··· 0 0⎟ ⎜ μ2 ⎟ ⎜ 0 ⎟
⎜ ⎟ ⎜ ⎟⎜ ⎟ ⎜ ⎟
⎜ μ̇3 ⎟ ⎜ 0 ··· ··· 0⎟ ⎜ ⎟ ⎜ ⎟
⎜ ⎟ ⎜ 0 0 0 ⎟ ⎜ μ3 ⎟ ⎜ 0 ⎟
⎜ · · · ⎟ = ⎜· · · ··· ··· ··· ··· ··· ⎟ ⎜
· · ·⎟ ⎜ · · · ⎟ ⎜ ⎟
⎜ ⎟ ⎜ ⎟ + ⎜· · ·⎟ (α(μ, ψ) + (μ, ψ)u)
⎜ · · · ⎟ ⎜· · · ··· ··· ··· ··· ··· ⎟ ⎜
· · ·⎟ ⎜ · · · ⎟ ⎜
⎟ ⎟ ¯
⎜ ⎟ ⎜ ⎜· · ·⎟
⎝μ̇r −1 ⎠ ⎝ 0 0 0 ··· ··· 0 1 ⎠ ⎝μr −1 ⎠ ⎝ 0 ⎠
μ̇r 0 0 0 ··· ··· 0 0 μr 1
(1.120)
1.7 Predecessors of Differential Flatness Theory 35

with internal dynamics defined by

ψ̇ = w(μ, ψ) (1.121)

while the output function is defined by

y = μ1 (1.122)

Variables μi and ψ j are referred to as normal coordinates or normal states in Ω


(or at x0 ). It is noted that the internal dynamics of the system do not depend on the
control input u.
To demonstrate that the nonlinear system of Eq. (1.95) can indeed be transformed
into the normal form of Eq. (1.120), it has to be shown not only that a suitable
transformation exists. Equivalently, a diffeomorphism has to be defined as

φ(x) = [μ1 , . . . , μr , ψ1 , . . . , ψn−r ]T (1.123)

such that Eqs. (1.120) and (1.121) are verified. To show that a transformation φ is a
diffeomorphism it suffices to show that its Jacobian is invertible, i.e., the gradients
∇μi and ∇ψ j are linearly independent.
First, it will be shown that the gradients ∇μi are linearly independent which
means that the components of μ can serve as state variables. This result states that
the system’s output and its first r − 1 derivatives can serve as new state variables.
Next, it will be shown that other n − r vector fields ψ j can be found to complete
the new state vector, which means that the gradients ∇μi and ∇ψ j are also linearly
independent.
The following Lemma holds about the linear independence of the gradients ∇μi
[498]:
Lemma: If the relative degree of the system of Eq. (1.95) is r in the region Ω, then
the gradients ∇μ1 , ∇μ2 , . . ., ∇μr are also linearly independent in Ω.
Proof : It is first noted that in terms of μ Eq. (1.115) can be written as

∇μi g = 0 1≤i < r


(1.124)
∇μr g=0

Next, the proof is provided for the case that r = 3, however, it can be generalized to
higher values of r . It is assumed that there exist smooth functions αi (x), such that
everywhere in Ω
a1 ∇μ1 + a2 ∇μ2 + a3 ∇μ3 = 0 (1.125)

Multiplying Eq. (1.125) by g yields

[a1 ∇μ1 + a2 ∇μ2 + a3 ∇μ3 ]g = 0 (1.126)


36 1 Nonlinear Dynamical Systems and Global Linearizing Control Methods

which from Eq. (1.125) implies that α3 = 0 (everywhere in Ω). Replacing a3 = 0


in Eq. (1.126) gives
[a1 ∇μ1 + a2 ∇μ2 ] = 0 (1.127)

Multiplying Eq. (1.127) by the Lie bracket ad f g, and using Jacobi’s identity, as well
as the definition of the relative degree one has

0 = a1 L ad f g μ1 + a2 L ad f g μ2 =
= α1 [L f L g h − L g L f h] + α2 [L f L g − L g L f ]L f h = (1.128)
−a2 L g L 2f h

which from the definition of the relative degree implies that a2 = 0, everywhere in
Ω. Replacing a2 = 0 in Eq. (1.127) implies that

a1 ∇μ1 = 0 (1.129)

Multiplying Eq. (1.129) by ad 2f g and using the definition of the relative degree, as
well as the following result from Jacobi’s identity

L ad 2 g h = L ad f ad f g h = L f L ad f g h − L ad f g L f h =
f
= L f [L f L g h − L g L f h] − [L f L g − L g L f ]L f h = (1.130)
= L 2f L g h − 2L f L g L f h + L g L 2f h

one gets

0 = a1 L ad 2 g μ1 = a1 [L 2f L g h − 2L f L g L f h + L g L 2f h] = a1 L g L 2f h (1.131)
f

which again from the definition of the relative degree implies that a1 = 0, everywhere
in Ω. This finally confirms that the gradients ∇μi are linearly independent. This
completes the Lemma’s proof .
Next, it is shown that there exist n − r more functions ψ j to complete the coor-
dinates transformation. The proof about this is as follows:
It is needed to show that the gradient vectors ∇ψ j can be found such that the
∇μi and ∇ψ j are all linearly independent. At x0 Eq. (1.124) indicates that the first
r − 1 vectors ∇μi , (i = 1, 2, . . . , r − 1) which have been shown to be linearly
independent, are all within an hyperplane orthogonal to g. Since the dimension of
such hyperplane is n − 1, one can find

n − r = (n − 1) − (r − 1) (1.132)

vectors in that hyperplane that are linearly independent of the ∇μi and linearly
independent of each other. These vectors can be called ∇ψ j ( j = 1, 2, . . . , n − r )
and by definition they verify
1.7 Predecessors of Differential Flatness Theory 37

∇ψ j g = 0 1≤ j≤n − r (1.133)

Through Frobenius theorem it can also be assured that there exist n − 1 linearly
independent gradient functions ∇h k k = 1, . . . , n − 1 which satisfy ∇h k g = 0.
Furthermore, from Eq. (1.124) it is assured that μr is not in the hyperplane orthogonal
to g. Thus the gradients ∇μi (i = 1, . . . , r ) and ∇ψ j ( j = 1, . . . , n − r ) are
all linearly independent. Thus the Jacobian matrix of the transformation given in
Eq. (1.123) is invertible.
By continuity, the Jacobian remains invertible in a neighborhood Ω1 of x0 .
Redefining Ω as the intersection of Ω1 and Ω, the transformation φ defines a dif-
feomorphism in Ω. Hence, in Ω this transformation is a state transformation which
brings the nonlinear system in the form of Eq. (1.120), with

α(μ, ψ) = L rf h(x) = L rf h[ψ −1 (μ, ψ)]


(1.134)
β(μ, ψ) = L g L rf−1 h(x) = L g L rf−1 h[ψ −1 (μ, ψ)]

while in Eq. (1.121) the input u does not appear, since the ψ j verifies

L g ψ j (x) = 0 ∀x ∈ Ω (1.135)

From a practical point of view, to find the vector field ψ that completes the trans-
formation into a normal form requires the nontrivial step of solving the set of partial
differential equations given in Eq. (1.133).

1.7.5 Input-State Linearization

A different approach for obtaining a linearized equivalent description of a nonlinear


dynamical system is input-state linearization.
Definition: A nonlinear system

ẋ = f (x) + g(x)u (1.136)

where f : Dr →R n and G : Dr →R n× p are sufficiently smooth on a domain Dx ⊂R n ,


is said to be input-state linearizable if there exists a diffeomorphism T : Dx ⇒R n
such that Dx = T (Dx ) contains the origin, and the change of variables z = T (x)
transforms the system of Eq. (1.136) into the form

ż = Az + Bβ −1 (x)[u − α(x)] (1.137)

The following single-input system is considered:

ẋ = f (x) + g(x)u (1.138)


38 1 Nonlinear Dynamical Systems and Global Linearizing Control Methods

where f : D→R n and g : D→R n are smooth functions on a domain D⊂R n .


The following Theorem gives necessary and sufficient conditions for the system of
Eq. (1.138) to be input-to-state linearizable near a point x0 ∈D [238].
Theorem: The system of Eq. (1.138) is input-state linearizable if and only if there
exists a domain Dx ⊂D such that
1. the matrix G(x) = [g(x), ad f g(x), . . . , ad n−1
f g(x)] has rank n for all x∈Dx
2. the distribution D = span{g, ad f g, . . . , ad n−2
f g} is involutive in Dx
Proof : The system of Eq. (1.138) is input-to-state linearizable if and only if there is
a real-valued function h(x) such that the system

ẋ = f (x) + g(x)u
(1.139)
y = h(x)

has relative degree n in Dx . That is h(x) satisfies

L g L if h(x) = 0 for 0≤i≤n − 2 and L g L n−1


f h(x) =0 ∀x∈D x (1.140)

The “only if” part follows from the definition of input-to-state linearization while the
“if part” follows from applying the change of variables which is given by z = T (x) =
[h(x), L f h(x), . . . , L n−1 T
f h(x)] . The previously given Lemma 2 confirms that the
Jacobian matrix [ ∂∂Tx ](x) is nonsingular for all x∈Dx . Hence, for each x0 ∈Dx , there
is a neighborhood N of x0 such that T (x) is restricted to N , is a diffeomorphism. For
the theorem’s proof it is also necessary to show that the existence of h(x) satisfying
Eq. (1.140) is equivalent to the previous stated conditions 1 and 2.
Necessity: Suppose there is h(x) satisfying Eq. (1.140) shows that rank(G) = n.
Then D is nonsingular and has dimension n − 1. From Eq. (1.98), with k = 0 and
r = n one has

L g h(x) = L ad f g h(x) = · · · = L ad (n−2) g h(x) = 0 (1.141)


f

which can also be written as

dh(x)[g(x), ad f g(x), . . . , ad n−2


f g(x)] = 0 (1.142)

The above equation implies that D ⊥ = span(dh). Hence, D is completely integrable


and it follows from Frobenius theorem that D is involutive.
Sufficiency: It is assumed that conditions 1 and 2 hold. Then D is nonsingular and
has dimension n − 1. By Frobenius’ theorem, there exists h(x) satisfying

L g h(x) = L ad f g h(x) = · · · = L ad n−2 g h(x) = 0 (1.143)


f
1.7 Predecessors of Differential Flatness Theory 39

Using the Jacobi identity, it can be verified that

L g h(x) = L g L f h(x) = · · · = L g L n−2


f h(x) = 0 (1.144)

Furthermore,

dh(x)G(x) = dh(x)[g(x), ad f g(x), . . . , ad n−1


f g(x)] = [0, . . . , 0, L ad n−1 g h(x)]
f
(1.145)

Since rank(G) = n and dh(x)=0, it must be true that L ad n−1 g h(x)=0. Using the
f
Jacobi identity, it can be verified that L g L n−1
f h(x) =0, which completes the proof of
the theorem.

1.7.5.1 Relation Between Input-State and Input–Output Linearization

The formal definition of input-to-state-linearization is as follows:


Using the transformed state-space description of the system of Eq. (1.137) and by
defining the new control input v = β −1 (x)[u − α(x)], one obtains

ż = Az + Bv (1.146)

where ⎛ ⎞ ⎛ ⎞
0 1 0 ··· 0 0
⎜0 0 1 ··· 0⎟ ⎜0⎟
⎜ ⎟ ⎜ ⎟
⎜· · · ··· ··· ··· · · ·⎟ ⎜ ⎟
A=⎜ ⎟ B = ⎜ · · ·⎟ (1.147)
⎜· · · ··· ··· ··· ⎟
· · ·⎟ ⎜ · · ·⎟
⎜ ⎜ ⎟
⎝0 0 0 ··· 1 ⎠ ⎝0⎠
0 0 0 ··· 0 1

The new state vector z is called linearizing state and the control input of Eq. (1.146) is
the linearizing control law. The transformed system dynamics given in Eqs. (1.146)
and (1.147) is in the so-called linear canonical form, which is both controllable and
observable.
The canonical form of Eq. (1.146) stands for a special case of the input–output
linearization, where the output function leads to a relative degree n. This means that
if a system is input–output linearizable with relative degree n, it is also input-state
linearizable. On the other hand, is a system is input-state linearizable with a first new
state z 1 representing the output, the system is also input–output linearizable with
relative degree n.
Consequently, the relation between input-state linearization and input–output lin-
earization can be summarized as follows:
Lemma: An nth order nonlinear system is input-state linearizable, if and only if, there
exists a scalar function z 1 (x) such that the system’s input–output linearization with
z 1 (x) as output has relative degree n.
40 1 Nonlinear Dynamical Systems and Global Linearizing Control Methods

However, the above lemma provides no guidance about how to find the desirable
output function z 1 (x).

1.7.5.2 Conditions for Input-State Linearization

It should be specified which are the nonlinear systems of the form of Eq. (3.44) which
can be subjected to input-state linearization. The above question stands for one of the
most important issues in feedback linearization theory. The necessary and sufficient
conditions for input–output linearization of a dynamical system have been stated in
the theorem given in Sect. 1.7.5. Next, the proof of this theorem is revisited [498].
Theorem: The nonlinear system of Eq. (3.44) with f (x) and g(x) being smooth vector
fields, is input-state linearizable, if and only if, there exists a region Ω such that the
following conditions hold:
• the vector fields [g, ad f g, . . . , ad n−1
f g] are linearly independent in Ω
• the set [g, ad f g, . . . , ad n−2
f g] is involutive in Ω

Prior to proving the theorem some remarks about the aforementioned conditions are
given:
The first condition can be interpreted as a controllability condition for the nonlin-
ear system of Eq. (1.139). For linear systems, the vector fields [g, ad f g, . . . , ad n−1
f g]
become [b, Ab, . . . , An−1 b] and independence implies that the associated matrix is
a full-rank one which is also invertible. It can be also shown that if a system’s linear
approximations in a closed connected region Ω∈R are all controllable, then under
some mild smoothness assumptions, the system can be driven from any point in Ω
to any point in Ω (the inverse does not hold because, a nonlinear system can be
controllable whereas its linear approximation may not be).
The involutivity condition is less intuitive. It is trivially satisfied for linear systems
(which have constant vector fields) but does not hold in general in the nonlinear case.
Next, to proceed to the Theorem’s proof, the following Lemma is analyzed:
Lemma: Let z(x) be a smooth function in a region Ω. Then, in Ω, the set of equations

L g z = L g L f z = · · · = L g L kf z = 0 (1.148)

is equivalent to
L g z = L g L ad f gz = · · · = L g L ad k gz = 0 (1.149)
f

for any positive integer k.


Proof : The Lemma’s proof is based on induction. When k = 0 the result is obvious.
When k = 1, then from Jacobi’s identity one obtains

L ad f g z = L f L g z − L g L f z = 0 − 0 = 0 (1.150)
1.7 Predecessors of Differential Flatness Theory 41

When k = 2, the using again Jacobi’s identity then one obtains

L ad 2 g z = L 2f L g z − 2L f L g L f z + L g L 2f z = 0 − 0 + 0 = 0 (1.151)
f

Repeating the procedure, it can be shown by induction that Eq. (1.150) implies
Eq. (1.151) for any k. Finally, using Jacobi’s identity in an inverse manner it can
be shown that from Eq. (1.151) one can arrive at Eq. (1.150).
Proof of Theorem: First the necessity condition is proven. It is assumed that there
exist a state transformation z = z(x) and an input transformation u = α(x) + β(x)v,
such that z and v satisfy Eq. (1.146). The first row of Eq. (1.146) can be rewritten as

∂z 1
ż 1 = ( f + gu) = z 2 (1.152)
∂x
Continuing, in a similar manner with the rest of the elements of the state vector one
has the following differential equations:

∂z 1 ∂z 1
f + gu = z 2 (1.153)
∂x ∂x
∂z 2
∂x f + ∂z
∂ x gu = z 3
2
(1.154)
··· ··· ···

∂z n ∂z n
f + gu = v (1.155)
∂x ∂x
Since z 1 , . . . , z n are independent of u, while v is not, from the above equations it
can be concluded that

L g z 1 = L g z 2 = · · · = L g z n−1 = 0 and L g z n =0 (1.156)

L f z i = z i+1 i = 1, 2, . . . , n − 1 (1.157)

The above equations on z i can be compressed into one single equation concerning
only z 1 . Using the Lemma proven above and Eq. (1.156) one gets

∇z 1 ad kf g = 0 k = 0, 1, 2, . . . , n − 2 (1.158)

Moreover, by continuing as in the proof of the previous Lemma it can be shown that

∇z 1 ad n−1
f g = (−1)n−1 L g z n (1.159)

which implies that


∇z 1 ad n−1
f g=0 (1.160)
42 1 Nonlinear Dynamical Systems and Global Linearizing Control Methods

From Eqs. (1.158)–(1.160) one can conclude that the state vector fields [g, ad f g,
. . . , ad n−1
f g] are linearly independent. Indeed, if for some number i(i≤n − 1) there
existed scalar functions α1 (x), . . . , αi−1 (x), such that


i−1
ad if g = αk ad kf g (1.161)
k=0

one would also have



n−2
ad n−1
f g= αk ad kf g (1.162)
k=0

Equation (1.162) together with Eq. (1.159) would imply that


n−2
∇z 1 ad n−1
f g= αk ad kf g = 0 (1.163)
k=0

which is in contradiction to Eq. (1.160).


From Eqs. (1.158)–(1.160) it is also possible to conclude that the vector fields
are involutive. This follows from the existence of a scalar function z 1 satisfying the
n − 1 partial differential equations of Eq. (1.158) and from the necessity part of the
Frobenius theorem. This completes the necessity part of the present Theorem proof.
Next, it will be proven that the two conditions in the present Theorem are also
sufficient for the state linearizability of the system of Eq. (1.139), which means that
it is possible to find a state transformation and an input transformation such that
Eq. (1.146) is satisfied. The stages of the proof are as follows: Since the involutiv-
ity condition is satisfied, from the Frobenius theorem there exists a nonzero scalar
function z 1 (x) satisfying

L g z 1 = L ad f g z 1 = · · · = L ad n−2 g z 1 = 0 (1.164)
f

According to the previous Lemma, the above equation can be written as

L g z 1 = L g L f z 1 = · · · = L g L n−2
f z1 = 0 (1.165)

Consequently, if one uses as new state variables the elements of the vector z =
[z 1 , L f z 1 , . . . , L n−1
f z 1 ] , the first n − 1 state equations give
T

ż k = z k+1 k = 1, . . . , n − 1 (1.166)

while the last equation becomes

ż n = L nf z 1 + L g L n−1
f z1u (1.167)
1.7 Predecessors of Differential Flatness Theory 43

The next question that arises is if the gain function L g L n−1


f z 1 can be equal to zero.
Since the vector fields [g, ad f g, . . . , ad n−1
f g] are linearly independent in Ω, and
using Eq. (1.165), one obtains in accordance to the proof of the previous Lemma that

L g L n−1
f z 1 = (−1)
n−1
L ad n−1 g z 1 (1.168)
f

and consequently it should hold

L ad n−1 g z 1 (x)=0 ∀x∈Ω (1.169)


f

Otherwise, the nonzero vector ∇z 1 should satisfy

∇z 1 [g, ad f g, . . . , ad n−1
f g] = 0 (1.170)

which implies that ∇z 1 would be orthogonal to n linearly independent vectors, which


is a contradiction. For the system’s dynamics described in Eq. (1.167), and by denot-
ing as new control input v = L nf z 1 + L g L n−1
f z 1 u, the stabilizing feedback control
law that is finally applied to the system is
−1
u = (L g L n−1
f z 1 ) (−L f z 1 + v)
n
(1.171)

1.7.6 Stages in the Implementation of Input-State


Linearization

The stages for implementing input-state linearization of dynamical systems of the


form of Eq. (1.139) and for designing the associated feedback control law, are as
follows:
(i) the vector fields [g, ad f g, . . . , ad n−1
f g] for the given system is constructed.
(ii) it is checked if the controllability and involutivity conditions are satisfied.
If both conditions are satisfied, then one should find the first state z 1 (which is the
output function that leads to input–output linearization of relative degree n) from
Eqs. (1.164) and (1.165), that is

∇z 1 ad if = 0 i = 0, 1, . . . , n − 2
(1.172)
∇z 1 ad n−1
f =0

Next, the state transformation z(x) = [z 1 , L f z 1 , . . . , L n−1


f z 1 ] and the input trans-
T

formation u = α(x) + β(x)v are computed where


44 1 Nonlinear Dynamical Systems and Global Linearizing Control Methods

L nf z 1
α(x) = −
L g L n−1
f z1 (1.173)
β(x) = 1
L g L n−1
f z1

(n)
The transformed control input that makes the linearized system z 1 = v be a Hurwitz
stable one, i.e., to have all its poles in the left complex semi-plane is given by

(n)
v = z 1,d − K 1 (z 1(n−1) − z 1,d
(n−1)
) − K 2 (z 1(n−2) − z 1,d
(n−2)
) − ···−
(1.174)
−K n−1 (ż 1 − ż 1,d ) − K n (z 1 − z 1,d )

1.7.7 Input–Output and Input-State Linearization


for MIMO Systems

The previously analyzed approaches to input–output and input-state linearization


which were formulated for SISO systems can be also extended to MIMO systems.
Input–output linearization of MIMO systems is obtained similarly to the SISO case,
by differentiating the selected outputs yi until the inputs re-appear. It is assumed that
ri stands for the smallest order of output derivations, such that at least one of the
(r )
inputs appears in yi i , that is,

(ri )

m
yi = L rfi h i + L g j L rfi −1 h i u j (1.175)
j=1

with L g j L rfi −1 h i (x)=0, for at least one j, in a neighborhood Ω of point x0 . Following


this procedure of successive derivations for all chosen outputs of the system, one
obtains the input–output linearized description of the system’s dynamics in matrix
form
⎛ ri ⎞ ⎛ r 1 ⎞ ⎛ ⎞⎛ ⎞
y1 L f h 1 (x) L g1 L rf1 −1 h 1 (x) · · · L g1m L rfm −1 h m (x) u1
⎜···⎟ ⎜ ··· ⎟ ⎜ ⎟⎜ ⎟
1
⎜ ⎟=⎜ ⎟ ⎜ · · · · · · · · · ⎟ · · ·⎟
⎝···⎠ ⎝ ··· ⎠ + ⎜ ⎟⎜
⎝ ··· ··· ··· ⎠ ⎝· · ·⎠
rm
ym L rfm h m (x) L gm L r1 −1 h 1 (x) · · · L gm L rm −1 h m (x) um
1 f m f
(1.176)

In the above description the linearized dynamical system is a square one, that is, the
number of its outputs is equal to the number of control inputs. Therefore, through
the followed procedure one succeeds at the same time linearization and decoupling
of the system’s dynamics. Thus, finally the linearized system is written in the form

Ỹ = F̃ + G̃u⇒
(1.177)
Ỹ = v
1.7 Predecessors of Differential Flatness Theory 45

and the feedback control law that makes the elements of the output vector Ỹ converge
to the desirable setpoints is u = G̃ −1 (v− F̃). The above system is said to have relative
degree (r1 , . . . , rm ) and the scalar r = r1 + . . . + rm is the total relative degree.

1.7.8 Dynamic Extension

In certain cases, and despite successive derivations of the system’s outputs yi , i =


1, 2, . . . , m the control inputs may not reappear and thus matrix G̃ given in Eq. (1.177)
may be singular. To handle this case, the so-called dynamic extension or dynamic
feedback linearization is performed. This means that the system’s state vector is
extended by considering as additional state vector elements some of the control
inputs and their derivatives. For the extended state-space description it becomes
possible to perform input–output linearization and to obtain an equivalent linearized
and decoupled form of it. This control approach has as a result to generate a control
input that contains integral terms of the initial state vector of the system.
Without loss of generality, one can consider dynamic extension in the case of a
system with two inputs and two outputs and that matrix G̃ given in Eq. (1.177) is
of rank 1. Assuming that one column of matrix G̃ becomes equal to zero, we get a
description of the system (after successive differentiations) in form
  r
(r )
y1 1 L f1 h 1
(r2 ) = L r2 h + g̃1 u 1 (1.178)
2y f 2

By considering the control input as additional state variable, and by differentiating


Eq. (1.178) once more with respect to time while also using the initial system’s
dynamics, one arrives at the description
 
(r +1)
y1 1 b1 (x, u 1 ) ẽ1,1 (x, u 1 ) ẽ1,2 (x, u 1 ) u̇ 1
(r2 +1) = b (x, u ) + ẽ (x, u ) ẽ (x, u ) u
(1.179)
y2 2 1 2,1 1 2,2 2 2

which is also written as


 
y1(r1 +1) u˙1
(r2 +1) = B̃(x, u 1 ) + Ẽ(x, u 1 ) u = ṽ (1.180)
y2 2

The control input ṽ is chosen to place the poles of the input–output linearized system
to the left complex semiplane. The control input [u̇ 1 , u 2 ]T is given by

u̇ 1
= Ẽ −1 (ṽ − B̃(x, u 1 )) (1.181)
u2

After computing u˙1 from the aboverelation, the control input


 that is finally applied to
the dynamical system is given by [ u̇ 1 , u 2 ]T . The term u̇ 1 implies that the integral
of the initial state vector of the system is used for implementing the feedback control.
Chapter 2
Differential Flatness Theory
and Flatness-Based Control

2.1 Introduction

First, the chapter analyzes flatness-based control for lumped parameter systems,
that is systems which are described by ordinary differential equations. The chapter
overviews the definition and properties of differential flatness and presents basic
classes of differentially flat systems. It is explained that all dynamical systems which
satisfy differential flatness properties can be transformed through a change of vari-
ables into the linear canonical form. The first section of the chapter presents examples
of single-input dynamical systems which are written into the linear canonical form by
using the differential flatness theory diffeomorphism and the design of the associated
feedback control loop is explained. The case of MIMO differentially flat dynamical
system is also examined. It is shown that differentially flat systems which admit static
feedback linearization can be transformed into the linear canonical form. Moreover, it
is shown that for MIMO differentially flat systems, that admit only dynamic feedback
linearization, it is again possible to succeed transformation to the linear canonical
form and subsequently to design state feedback controllers.
Next, the chapter examines flatness-based control for distributed parameter sys-
tems, that is, systems which are described by partial differential equations. Unlike
control of lumped parameter systems, distributed parameter systems control has been
less investigated. Such systems are described by partial differential equations and
the associated boundary conditions and play a critical role in several engineering
problems, such as vibrating structures, flexible-link robots, waveguides and optical
fibers, heat conduction, etc. Differential flatness theory enables the solution of such
control problems. A flatness-based control method for distributed parameter systems
proposes the decomposition of the desirable trajectory into a series of a reference flat
output and its derivatives, and enables to compute control commands that succeed
trajectory tracking. One can also consider flatness-based control for PDE systems
which are based on the transformation of the PDE model into a finite differences
models and the associated state-space description in a canonical form. The chapter

© Springer International Publishing Switzerland 2015 47


G.G. Rigatos, Nonlinear Control and Filtering Using Differential
Flatness Approaches, Studies in Systems, Decision and Control 25,
DOI 10.1007/978-3-319-16420-5_2
48 2 Differential Flatness Theory and Flatness-Based Control

overviews main findings and methods on flatness-based control of systems exhibiting


a spatiotemporal (2D) dynamics.

2.2 Definition of Differentially Flat Systems

2.2.1 The Background of Differential Flatness Theory

Differential flatness theory and flatness-based control were introduced in the late
1980s by Michel Fliess and coresearchers and since then they keep on being devel-
oped and on providing efficient solutions to advanced control and state estimation
problems [153].
The definition of a differentially flat system is as follows: A system ẋ = f (x, u)
with state vector x ∈ R n , input vector u ∈ R m where f is a smooth vector field, is
differentially flat if there exists a vector y ∈ R m in the form

y = h(x, u, u̇, . . . , u (r ) ) (2.1)

such that

x = φ(y, ẏ, . . . , y (q) )


(2.2)
u = α(y, ẏ, . . . , y (q) )

where h, φ and α are smooth functions. This means that the new system’s description
is given by the m algebraic variables yi , i = 1, 2, . . . , m. The definition of the flat
output given above was y = h(x, u, u̇, . . . , u (r ) ). If the flat output is exclusively a
function of the state vector x then the system is a 0-flat one. However, there may be
a need to express the flat output as a function of not only the state vector x but also
as a function of the control u and of its derivatives. For instance, the latter holds in
the case of dynamic feedback linearization and in the application of the so-called
dynamic extension. This means that the state vector of the system is extended by
considering as additional state variables the control inputs and its derivatives.
Equation (2.2) shows that the state vector of the differentially flat system and its
control inputs can be expressed as function of the flat output and of the flat output’s
derivatives. The basic question that arises in the study of differential flatness is
whether, given the differential equations that describe the nonlinear system dynamics
ẋ = f (x, u), there exists a function y = h() given by y = h(x, u, u̇, . . . , u (r ) ), such
that the state vector of the system x and the control input u can be expressed as
functions of y and of its derivatives, as in Eq. (2.2).
This problem was initially set by D. Hilbert in 1912, for the second-order Monge’s
equation
d2 y dy dz
= F(x, y, z, , ) (2.3)
dx2 dx dx
2.2 Definition of Differentially Flat Systems 49

which is an underdetermined differential equation system (there is one differential


equation with respect to x, connecting two functions of x, namely y(x) and z(x)).
Hilbert speaks about a solution that is not based on the computation of integrals.
He has shown that this problem is related to the classification of underdetermined
differential equation systems through a group of transformations called “invertible
without integral.”
Soon afterwards, Èlie Cartan, reworks on the question set by Hilbert and shows
how the calculations on the Pfaff systems, permit to classify second-order Monge
equations which admit a solution without integral. He deduced an explicit description
for all curves in the Euclidean space R 3 for which the curvature ratio and the torsion
are constant. The results of Èlie Cartan are complete for Pfaff systems of codimension
2, which are underdetermined differential equation systems of codimension 1, i.e.,
systems in which only one arbitrary function intervenes (otherwise stated, systems
having only one control input). Èlie Cartan also suggested the notion of absolute
equivalence; however, he did not define it with precision. He also noted that for
Pfaff systems of codimension equal or greater than 2 (which means systems having
at least two control inputs) the solution of the above problem becomes extremely
complicated.
Next a formal definition will be given about the analogy in terms of the con-
trol theory, of what was described above as underdetermined differential equation
systems which can be solved without integration.

2.2.2 Differential Flatness for Finite Dimensional Systems

As noted in Eqs. (2.1) and (2.2) differential flatness is a structural property of a


class of nonlinear dynamical systems, denoting that all system variables (such as
state vector elements and control inputs) can be written in terms of a set of specific
variables (the so-called flat outputs) and their derivatives. The following nonlinear
system is considered:
ẋ(t) = f (x(t), u(t)) (2.4)

The time variable is t ∈ R, the state vector is x(t) ∈ R n with initial conditions x(0) =
x0 , and the input variable is u(t) ∈ R m . Next, the main principles of differentially
flat systems are given [465, 535]:
The finite dimensional system of Eq. (2.4) can be written in the general form of an
ordinary differential equation (ODE), i.e., Si (w, ẇ, ẅ, . . . , w(i) ), i = 1, 2, . . . , q.
The entity w is a generic notation for the system variables (these variables are,
for instance, the elements of the system’s state vector x(t) and the elements of
the control input u(t)) while w(i) , i = 1, 2, . . . , q are the associated derivatives.
Such a system is said to be differentially flat if there is a collection of m functions
y = (y1 , . . . , ym ) of the system variables and of their time derivatives, i.e., yi =
φ(w, ẇ, ẅ, . . . , w(αi ) ), i = 1, . . . , m satisfying the following two conditions [152,
340, 362, 364, 422]:
50 2 Differential Flatness Theory and Flatness-Based Control

1. There does not exist any differential relation of the form R(y, ẏ, . . . , y (β) ) = 0
which implies that the derivatives of the flat output are not coupled in the sense of an
ODE, or equivalently it can be said that the flat output is differentially independent.
2. All system variables (i.e., the elements of the system’s state vector w and the
control input) can be expressed using only the flat output y and its time derivatives
wi = ψi (y, ẏ, . . . , y (γi ) ), i = 1, . . . , s. An equivalent definition of differentially
flat systems is as follows:
Definition: The system ẋ = f (x, u), x ∈ R n , u ∈ R m is differentially flat if there
exist relations

h : R n × (R m )r +1 → R m ,
φ : (R m )r → R n and (2.5)
ψ : (R m )r +1 → R m

such that

y = h(x, u, u̇, . . . , u (r ) ),
x = φ(y, ẏ, . . . , y (r −1) ), and (2.6)
u = ψ(y, ẏ, . . . , y (r −1) , y (r ) ).

This means that all system dynamics can be expressed as a function of the flat output
and its derivatives; therefore, the state vector and the control input can be written as

x(t) = φ(y(t), ẏ(t), . . . , y (r −1) (t)), and


(2.7)
u(t) = ψ(y(t), ẏ(t), . . . , y (r ) (t))

Next, an example is given to explain the design of a differentially flat controller for
finite dimensional systems of known parameters.
Example 1: Flatness-based control for a nonlinear system of known parameters [263].
Consider the following model:

ẋ1 = x3 − x2 u
ẋ2 = −x2 + u (2.8)
ẋ3 = x2 − x1 + 2x2 (u − x2 )

x22
The flat output is chosen to be y1 = x1 + 2 . Thus one gets:

x2
y1 = x1 + 22
y2 = ẏ1 = (x3 − x2 u) + x2 (u − x2 ) = x3 − x22 (2.9)
y3 = ẏ2 = ÿ1 = x2 − x1 + 2x2 (u − x2 ) − 2x2 (u − x2 ) = −x1 + x2
(3)
v = ẏ3 = y1 = −x3 + x2 u − x2 + u = −x2 − x3 + u(1 + x2 )

It can be verified that property (1) holds, i.e., there does not exist any differential
relation of the form R(y, ẏ, . . . , y (β) ) = 0, and this implies that the derivatives of
2.2 Definition of Differentially Flat Systems 51

the flat output are not coupled. Moreover, it can be shown that property (2) also
holds i.e., the components w of the system (elements of the system’s state vector and
control input) can be expressed using only the flat output y and its time derivatives
wi = ψi (y, ẏ, . . . , y (γi ) ), i = i, . . . , s.
(3)
For instance to calculate x1 with respect to y1 , ẏ1 , ÿ1 and y1 the relation of ÿ1 is
used, i.e.,
x12 + 2x1 (1 + ÿ1 ) + ÿ12 − 2y1 = 0 (2.10)

√ solutions are derived, i.e., x1 = −(1+ ÿ1 − 1 + 2(y1 + ÿ1 ))
from which two possible
and x1 = −(1 + ÿ1 + 1 + 2(y1 + ÿ1 )). Keeping the biggest out of these two solu-
tions one obtains: √
x1 = −(1 + ÿ1 ) + 1 + 2(y1 + ÿ1 )
x2 = ÿ1 + x1
x3 = ẏ1 + ÿ12 + 2x1 ÿ1 + x12 (2.11)
(3)
y1 + ÿ12 + ÿ1 + ẏ1 +x1 +2x1 ÿ1 +x12
u= 1+x1 + ÿ1

The computation of the equivalent model of the system in the linear canonical form
is summarized as follows: By finding the derivatives of the flat output one gets a
set of equations which can be solved with respect to the state variables and the
control input of the initial state-space description of the system. First, the binomial
of variable x1 given in Eq. (2.10) is solved providing x1 as a function of the flat output
and its derivatives. Next, using the expression for x1 and Eq. (2.11), state variable
x2 is also written as a function of the flat output and its derivatives. Finally, using
the expressions for both x1 and x2 and Eq. (2.11), state variable x3 is written as a
function of the flat output and its derivatives. Thus one can finally express the state
vector elements and the control input as function of the flat output and its derivatives,
which completes the proof about differential flatness of the system.
From Eq. (2.11) it can be concluded that the initial system of Eq. (2.8) is indeed
differentially flat. Using the flat output and its derivatives, the system of Eq. (2.8) can
be written in Brunovsky (canonical) form:
⎛ ⎞ ⎛ ⎞⎛ ⎞ ⎛ ⎞
y 010 y1 0
d ⎝ 1⎠ ⎝
y2 = 0 0 1⎠ ⎝ y2 ⎠ + ⎝0⎠ v (2.12)
dt y 000 y3 1
3

where the new control input is v = f (x) + g(x)u. Therefore, a transformation of the
system into a linear equivalent description is obtained and then it is straightforward to
design a controller based on linear control theory. Thus, given the reference trajectory
[x1∗ , x2∗ , x3∗ ]T , one can find the transformed reference trajectory [y1∗ , ẏ1∗ , ÿ1∗ ]T and
select the appropriate control input v that succeeds tracking of the reference setpoints.
Knowing v, the control u of the initial system can be found. Knowing v the control
input that is actually applied to the system is u = g −1 (x)[v − f (x)].
52 2 Differential Flatness Theory and Flatness-Based Control

It is noted that for linear systems, the property of differential flatness is equivalent
to that of controllability. Next, two examples of differentially flat MIMO dynamical
systems are given. It is shown that the definition of the differential flat outputs also
enables to transform the system into the Brunovksy (canonical) form:
Example 2: Differential flatness of a nonlinear spring–damper–mass system which
consists of two masses.
The spring–damper–mass model is described in Fig. 2.1. The dynamic equations
of the model are given by [89]

M1 ẍ1 = − f K 1 (x) − f B1 (x)+


+ f K 2 (x) + f B2 (x) + u 1 + 0.2u 2
(2.13)
M2 ẍ2 = − f K 2 (x) − f B2 (x) + 0.25u 1 + u 2

where M1 and M2 are the masses of the system, x(t) = [x1 , ẋ1 , x2 , ẋ2 ]T is the state
vector which has as elements the positions and the velocities of the two masses, and
f K 1 (x) and f K 2 (x) are spring forces defined by the following equations

f K 1 (x) = K 10 + ΔK 1 x13
(2.14)
f K 2 (x) = K 20 + ΔK 2 (x2 − x1 )3

f B1 (x) and f B2 (x) are friction forces which are defined as

f B1 (x) = b10 ẋ1 + Δb1 ẋ12


(2.15)
f B2 (x) = b20 (ẋ2 − ẋ1 ) + Δb2 (ẋ2 − ẋ1 )2

Fig. 2.1 A spring–damper–


mass system consisting of
two masses
2.2 Definition of Differentially Flat Systems 53

The following flat outputs are defined

y1 = x1 y2 = x2 (2.16)

Obviously, it holds
x1 = y1 x2 = y2
(2.17)
ẋ1 = ẏ1 ẋ2 = ẏ2

Thus, it is observed that the state variables of the spring-damper-mass model can be
expressed as functions of the flat outputs and of the associated derivatives. Moreover,
the following relations can be obtained about the control inputs of the model

M1 ẍ1 =
−(K 10 x1 + ΔK 1 x13 ) − (b10 ẋ1 + Δb1 ẋ12 )+
(2.18)
+(K 20 (x2 − x1 ) + ΔK 2 (x2 − x1 )3 )+
+(b20 (ẋ2 − ẋ1 ) + Δb2 (ẋ2 − ẋ1 )2 ) + u 1 + 0.2u 2

M2 ẍ2 =
−(K 20 (x2 − x1 ) + ΔK 2 (x2 − x1 )3 ) − (b20 (ẋ2 − ẋ1 )+ (2.19)
Δb2 (ẋ2 − ẋ1 )2 + 0.25u 1 + u 2

Using the definition of the flat outputs in Eqs. (2.18) and (2.19), one obtains

M1 ÿ1 =
−(K 10 y1 + ΔK 1 y13 ) − (b10 ẏ1 + Δb1 ẏ12 )+
(2.20)
+(K 20 (y2 − y1 ) + ΔK 2 (y2 − y1 )3 )+
+(b20 ( ẏ2 − ẏ1 ) + Δb2 ( ẏ2 − ẏ1 )2 ) + u 1 + 0.2u 2

M2 ÿ2 =
−(K 20 (y2 − y1 ) + ΔK 2 (y2 − y1 )3 ) − (b20 ( ẏ2 − ẏ1 )+ (2.21)
+Δb2 ( ẏ2 − ẏ1 )2 + 0.25u 1 + u 2

or equivalently

M1 ÿ1 + (K 10 y1 + ΔK 1 y13 ) + (b10 ẏ1 +


+Δb1 ẏ12 ) − (K 20 (y2 − y1 ) + ΔK 2 (y2 − y1 )3 )− (2.22)
−(b20 ( ẏ2 − ẏ1 ) + Δb2 ( ẏ2 − ẏ1 )2 ) = u 1 + 0.2u 2

M2 ÿ2 + (K 20 (y2 − y1 ) + ΔK 2 (y2 − y1 )3 )+


+(b20 ( ẏ2 − ẏ1 ) + Δb2 ( ẏ2 − ẏ1 )2 = (2.23)
= 0.25u 1 + u 2
54 2 Differential Flatness Theory and Flatness-Based Control

Defining the matrix of the coefficients of the control inputs and its inverse as
   
1 0.2 1.0526 −0.2105
A= A−1 = (2.24)
0.25 1 −0.2632 1.0526

one obtains the following relation about the control inputs and the flat outputs defined
in Eq. (2.16)     
u1 1.0526 −0.2105 q1
= (2.25)
u2 −0.2632 1.0526 q2

where q1 = M1 ÿ1 + (k10 y1 + ΔK 1 y13 ) + (b10 ẏ1 + Δb1 ẏ12 ) + (K 20 (y2 − y1 ) +


ΔK 2 (y2 − y1 )3 ) + (b20 ( ẏ2 − ẏ1 ) + Δb2 ( ẏ2 − ẏ1 )2 ) and q2 = M2 ÿ2 + (K 20 (y2 −
y1 ) + ΔK 2 (y2 − y1 )3 ) + (b20 ( ẏ2 − ẏ1 ) + Δb2 ( ẏ2 − ẏ1 )2 ).
The previous relation between the state variables of the system and the flat outputs
enables to write the system in the Brunovsky (canonical) form

ÿ1 =
M1 {−(K 10 y1 + ΔK 1 y1 ) − (b10 ẏ1 + Δb1 ẏ1 )}+
1 3 2
(2.26)
M1 {(K 20 (y2 − y1 ) + ΔK 2 (y2 − y1 ) )+
1 3

+b20 ( ẏ2 − ẏ1 ) + Δb2 ( ẏ2 − ẏ1 )} + M11 u 1 + 0.2 M11 u 2


2

ÿ2 =
M2 {−(K 20 (y2 − y1 ) + ΔK 2 (y2 − y1 ) )−
1 3
(2.27)
−(b20 ( ẏ2 − ẏ1 ) + Δb2 ( ẏ2 − ẏ1 ) )} + 0.25 M12 u 1 +
2 1
M2 u 2

Consequently, one has

ÿ1 = f 1 (y1 , ẏ1 , y2 , ẏ2 ) + g11 (x)u 1 + g12 (x)u 2 (2.28)

ÿ2 = f 2 (y1 , ẏ1 , y2 , ẏ2 ) + g21 (x)u 1 + g22 (x)u 2 (2.29)

with
f 1 (y1 , ẏ1 , y2 , ẏ2 ) = f 1 (x) =
M1 {−(K 10 y1 + ΔK 1 y1 ) − (b10 ẏ1 + Δb1 ẏ1 )}+
1 3 2
(2.30)
M1 {(K 20 (y2 − y1 ) + ΔK 2 (y2 − y1 ) )+
1 3

+b20 ( ẏ2 − ẏ1 ) + Δb2 ( ẏ2 − ẏ1 )2 }

g11 (y1 , ẏ1 , y2 , ẏ2 ) = g12 (x) = 1


M1
(2.31)
g12 (y1 , ẏ1 , y2 , ẏ2 ) = g12 (x) = 0.2
M1
2.2 Definition of Differentially Flat Systems 55

f 2 (y1 , ẏ1 , y2 , ẏ2 ) = f 2 (x) =


M2 {−(K 20 (y2 − y1 )) + ΔK 2 (y2 − y1 ) −
1 3
(2.32)
−(b20 ( ẏ2 − ẏ1 ) + Δb2 ( ẏ2 − ẏ1 ) )}
2

g21 (y1 , ẏ1 , y2 , ẏ2 ) = g21 (x) = 0.25


M2 (2.33)
g22 (y1 , ẏ1 , y2 , ẏ2 ) = g22 (x) = M12

Thus, one obtains the following canonical form description for the nonlinear system
⎛ ⎞ ⎛ ⎞⎛ ⎞ ⎛ ⎞
ẋ1 0 1 0 0 x1 0 0  
⎜ẋ2 ⎟ ⎜0 0 0 0⎟ ⎜ x 2 ⎟ ⎜1 0⎟
⎜ ⎟=⎜ ⎟⎜ ⎟ + ⎜ ⎟ v1 (2.34)
⎝ẋ3 ⎠ ⎝0 0 0 1⎠ ⎝x3 ⎠ ⎝0 0⎠ v2
ẋ4 0 0 0 0 x4 0 1

where
v1 = f 1 (x) + g11 (x)u 1 + g12 (x)u 2
(2.35)
v2 = f 2 (x) + g21 (x)u 1 + g22 (x)u 2

or equivalently
v = F(x) + G(x)u (2.36)

where      
v1 u1 f 1 (x)
v= , u= ,F = ,
v2 u2 f 2 (x)
  (2.37)
g (x) g12 (x)
G = 11
g21 (x) g22 (x)

Example 3: Differential flatness of the VTOL aircraft (vertically take-off and landing
aircraft).
The dynamic model of the vertically take-off and landing aircraft (Fig. 2.2) is
described by the following set of equations [561]

ẍ = u 1 sin(θ ) − εu 2 cos(θ )
z̈ = u 1 cos(θ ) + εu 2 sin(θ ) − 1 (2.38)
θ̈ = u 2
56 2 Differential Flatness Theory and Flatness-Based Control

Fig. 2.2 The vertically


take-off and landing aircraft
model

where ε is a small parameter. Defining y1 and y2 two smooth functions satisfying


the condition ÿ12 + ( ÿ2 + 1)2 = 0, e.g., y1 = x − εsin(θ ), y2 = z + εcos(θ )

ε ÿ1
x = y1 −
,
ÿ1 +( ÿ2 +1)2
2

z = y2 −
ε ÿ2 +1 , (2.39)
ÿ12 +( ÿ2 +1)2

θ = tan −1 ( ÿ2ÿ+1
1
)

Since all state variables are expressed as functions of the flat outputs and their deriv-
atives, one can also write the control inputs u 1 and u 2 as functions of the flat outputs
and their derivatives. This confirms that the model of the vertically take-off and
landing aircraft is differentially flat. The system can be written in the Brunovsky
form
(4) (4)
y1 = v1 , y2 = v2 (2.40)

where the control inputs v1 and v2 are defined as

v1 = η̇2 sin(θ ) + 2η2 θ̇cos(θ )+


+η1 u 2 cos(θ ) − η1 θ̇ 2 sin(θ )
(2.41)
v2 = η̇2 cos(θ ) − 2η2 θ̇ sin(θ )−
−η1 u 2 sin(θ ) − η1 θ̇ 2 cos(θ )

with variables η1 and η2 being defined as

η1 = u 1 − εθ̇ 2 , η2 = η̇1 (2.42)


2.2 Definition of Differentially Flat Systems 57

The previous Brunovsky-form model of the vertically take-off and landing aircraft
can be also written using state-space equations
⎛ ⎞ ⎛ ⎞⎛ ⎞ ⎛ ⎞
ẏ1,1 0 1 0 0 0 0 0 0 y1,1 0 0
⎜ ẏ1,2 ⎟ ⎜0 0 1 0 0 0 0 0⎟ ⎜ y1,2 ⎟ ⎜0 0⎟
⎜ ⎟ ⎜ ⎟⎜ ⎟ ⎜ ⎟
⎜ ẏ1,3 ⎟ ⎜0 0 0 1 0 0 0 0⎟ ⎜ ⎟ ⎜ 0⎟
⎜ ⎟ ⎜ ⎟ ⎜ y1,3 ⎟ ⎜0 ⎟ 
⎜ ẏ1,4 ⎟ ⎜0 0 0 0 0 0 0 ⎟ ⎜
0⎟ ⎜ y1,4 ⎟ ⎜ 0⎟
⎜ ⎟ ⎜ ⎟ + ⎜1 ⎟ v1
⎜ ẏ2,1 ⎟ = ⎜0 0 0 0 0 1 0 ⎟ ⎜
0⎟ ⎜ y2,1 ⎟ ⎜
⎟ 0⎟
(2.43)
⎜ ⎟ ⎜ ⎜0 ⎟ v2
⎜ ẏ2,2 ⎟ ⎜0 0 0 0 0 0 1 0⎟ ⎜ y2,2 ⎟ ⎜0 0⎟
⎜ ⎟ ⎜ ⎟⎜ ⎟ ⎜ ⎟
⎝ ẏ2,3 ⎠ ⎝0 0 0 0 0 0 0 1⎠ ⎝ y2,3 ⎠ ⎝0 0⎠
ẏ2,4 0 0 0 0 0 0 0 0 y2,4 0 1

2.3 Properties of Differentially Flat Systems

2.3.1 Equivalence and Differential Flatness

2.3.1.1 Representation of System Dynamics as Vector Fields of Infinite


Dimension

A basic property of differentially flat systems is that through a change of variables


(diffeomorphism) they can be transformed to an equivalent description, which is
the linear canonical (Brunovsky) form. This is analyzed next and stands for the
Lie-Backlünd isomorphism to equivalence and differential flatness [153].
First a dynamical system of the form

ẋ = f (x) x ∈ X ⊂ R n (2.44)

is considered. This is described by the couple (X, f ), where X is defined in R n and


f is a vector field on X . A trajectory is considered to be the function t→ x(t) such
that ẋ(t) = f (x(t)) ∀t ≥ 0. One can consider also the output mapping x → h(x)
for which holds
d dh dh
h(x(t)) = (x(t)) · ẋ(t) = (x(t)) · f (x(t)) ∀ t ≥ 0 (2.45)
dt dt dt

dt (x(t)) · f (x(t)) is also called time


Equation (2.45) gives the total derivative, i.e., dh
derivative of the function h, and is noted by ḣ.
Next, the notions of the total derivative and of the time derivative of function h
can be generalized to the case of a nonlinear system with control input

ẋ = f (x, u) (2.46)
58 2 Differential Flatness Theory and Flatness-Based Control

where X × U ∈ R n × R m . Here, f is no longer a vector field but is an infinite


collection of vector fields parameterized by u. Actually, for every u the function
x → f u (x) = f (x, u) is a vector field on X . One can also consider the case of
dynamic feedback in which the system’s state vector is extended by defining as state
vector element the control input (and its derivatives), while the equations describing
the system’s dynamics are extended as follows:

ẋ = f (x, u)
(2.47)
u̇ = v

In the latter case, in place of the state-space X one has the state-space X × U .
Assume now that the solution of ẋ = f (x, u) is the function t → (x(t, u(t))) which
has values in X × U , such that ẋ(t) = f (x(t), u(t)) ∀ t ≥ 0. Moreover, one can
consider the infinite function

t → ξ(t) = (x(t), u(t), u̇(t), . . .) (2.48)

which takes values in X × U × Rm ∞ , where R ∞ = R m × R m × · · · represents an


m
infinite product formed by vectors defined in R m . A point of Rm ∞ is of the form
(1) (2)
u , u , . . . with u ∈ R , using that ẋ = f (x, u). This function also satisfies the
i m

relation
ξ̇ (t) = ( f (x(t), u(t)), u̇(t), ü(t), . . .) ∀ t ≥ 0 (2.49)

and this can be interpreted as a trajectory of an infinite vectors field

(x, u, u (1) , . . .) → F(x, u, u (1) , . . .) = ( f (x, u), u (1) , u (2) , . . . , ) (2.50)

According to the above, the dynamical system ẋ = f (x, u) is defined by the space
X × U × Rm ∞ and an infinite number of vector fields F on that space. As in the case

of an autonomous dynamical system ẋ = f (x), for the nonautonomous dynamical


system ẋ = f (x, u) one can also define the time derivative of the smooth output
function (x, u, u (1) , . . .) → h(x, u, u (1) , . . . , u (k) ), which is written as

ḣ(x, u, u (1) , . . . , u (k+1) ) := Dh · F =


(2.51)
= ∂∂hx f (x, u) + ∂h ∂u u
(1) + ∂h u (2) + · · ·
∂u 1

If h() depends on a finite number of variables then the above sum becomes finite
too. For the above type of functions, one can define the so-called Fréchet topology
which implies computations on smooth functions which are defined in k copies of
R m , for k being sufficiently large.
After a change of variables, a differentially flat system is written in the canonical
Brunovsky form. Thus, it becomes equivalent to the trivial system Rm ∞ , F with
m
(1) (2)
coordinates y, y , y , . . . , and the vector fields

(y (1) , y (2) , y (3) , . . .) = Fm (y, y (1) , y (2) , . . .) (2.52)


2.3 Properties of Differentially Flat Systems 59

which describes systems composed by m chains of integrators (this is the canonical


Brunovsky form for linear controllable systems).

2.3.1.2 Equivalence of Systems

Two dynamical systems are considered to be equivalents if there exists an invertible


relationship which exchanges their trajectories. The definition of equivalent systems
is as follows:
Definition: Two systems (M, F) and (N , G) (notation referring to state vector and
vector field, respectively) are equivalent in ( p, q) ∈ (M, N ), if and only if, there
exists an endogenous transformation from a neighborhood of p to a neighborhood
of q. The two systems (M, F) and (N , G) are equivalent if the equivalence holds
for all pairs of points ( p, q) of the space M × N .
Using coordinates, the previous notions are expressed as follows: Considering the
two systems (X × U × Rm ∞ , F) and (Y × V × R ∞ , G) describing the initial system
s
dynamics
ẋ = f (x, u) with (x, u) ∈ X × U ⊂ R n × R m (2.53)

and the equivalent system dynamics

ẏ = g(y, v) with (y, v) ∈ Y × V ⊂ R r × R s (2.54)

The vector fields F, G are defined as

F(x, u, u (1) , . . .) = ( f (x, u), u (1) , u (2) , . . .)


(2.55)
G(y, v, v(1) , . . .) = (g(y, v), v(1) , v(2) , . . .)

If the two systems are equivalent, the endogenous transformation takes the form

Ψ (x, u, u (1) , . . .) = (ψ(x, ū), β(x, ū), β̇(x, ū), . . .) (2.56)

where ū is the abbreviated notation ū = (u, u (1) , . . . , u (k) ). Similarly, one can define
the inverse endogenous transformation

Φ(y, v, v(1) , . . .) = (φ(y, v̄), α(y, v̄), α̇(y, v̄), . . .) (2.57)

Since Φ and Ψ are inverse to each other, one has

ψ(φ(y, v̄), ᾱ(y, v̄)) = y and φ(ψ(x, ū), β̄(x, ū)) = x


(2.58)
β(φ(y, v̄), ᾱ(y, v̄)) = v and α(ψ(x, ū), β̄(x, ū)) = u
60 2 Differential Flatness Theory and Flatness-Based Control

About vector fields F and G which are related to the derivatives of x and y, respec-
tively, one has
f (φ(y, v̄), α(y, v̄)) = Dφ(y, v̄) · ḡ(y, v̄) (2.59)

where ḡ corresponds to (g, v(1) , . . . , v(k) )

g(ψ(x, ū), β(x, ū)) = Dψ(x, ū) · f¯(x, ū) (2.60)

where f¯ corresponds to ( f, u (1) , . . . , u (k) ). Additionally, it can be stated that if the


trajectory of the first system is denoted as

t → (x(t), u(t)) (2.61)

then the trajectory of the second system becomes

t → (y(t), v(t)) = (ψ(x(t), ū(t)), β(x(t), ū(t))) (2.62)

Example 1: The VTOL aircraft (Vertical Take-off and Landing Aircraft) studied in
Sect. 2.2.2 is revisited. State-space transformation for the VTOL model provides an
example of equivalence between dynamical systems descriptions.
The initial dynamic model of the VTOL aircraft is given by

ẍ = −u 1 sin(θ ) + εu 2 cos(θ )
z̈ = u 1 cos(θ ) + εu 2 sin(θ ) − 1 (2.63)
θ̇ = u 2

This system is first shown to be globally equivalent to the transformed model

ÿ1 = −ξ sin(θ )
ÿ2 = ξ cos(θ ) − 1 (2.64)
θ̇ = u 2

where ξ and θ stand for the new control inputs. Indeed, choosing

X := (x, z, ż, ż, θ, θ̇ ) and Y := (y1 , y2 , ẏ1 , ẏ2 )


(2.65)
U := (u 1 , u 2 ) V = (ξ, θ )

and with the abbreviated notations given above one can define the functions of the
transformed state vector and of the transformed control input Y = ψ(X, Ū ) and
V = β(X, Ū ), as
⎛ ⎞
x − εsin(θ )  
⎜ z + εcos(θ ) ⎟
⎟ and β(X, Ū ) = u 1 − εθ̇
2
ψ(X, U ) = ⎜
⎝ẋ − εθ̇ cos(θ )⎠ (2.66)
θ
ż − εθ̇ sin(θ )
2.3 Properties of Differentially Flat Systems 61

which finally enable to obtain the endogenous transformation Ψ . The inverse trans-
formation Φ is given by X = φ(Y, V̄ ) and U = α(Y, V̄ ) according to the following
⎛ ⎞
y1 + εsin(θ )
⎜ y1 − εcos(θ ) ⎟
⎜ ⎟  
⎜ ẏ1 + εθ̇ cos(θ )⎟ ξ + εθ̇ 2

φ(Y, V̄ ) = ⎜ ⎟
⎟ and α(Y, V̄ ) = (2.67)
⎜ ẏ2 − εθ̇ sin(θ )⎟ θ̈
⎝ θ ⎠
θ̇

Continuing with the vertical take-off and landing aircraft (VTOL) and using the
dynamics of the aircraft which has been defined in Eq. (2.63), it is found that this
system admits as flat output

y = (x − εsin(θ ), z + εcos(θ )) (2.68)

To express the state variables and the control input as functions of the flat output and
its derivatives (this enables to find also the elements of the inverse transformation of
Φ, that is X = φ( ȳ) and U = α(y)), the following implicit relations are used:

(y1 − x)2 + (y2 − z)2 = ε2


(y1 − x)( ÿ2 + 1)(y2 − z) ÿ1 = 0 (2.69)
( ÿ2 + 1)sin(θ ) + ÿ1 cos(θ ) = 0

Solving the above set of equations with respect to x, z, and θ , one gets

ÿ1
x = y1 ±ε

ÿ12 +( ÿ2 +1)2


z = y2 ±ε
( ÿ2 +1) (2.70)
ÿ12 +( ÿ2 +1)2
θ= −1
tan ( ÿ2 + ÿ11 )

One has simply to differentiate so as to obtain ẋ, ż, θ̇ , and u as functions of the deriv-
atives of the flat output y. Singularity of the system is avoided if ÿ12 + ( ÿ2 + 1)2 = 0.
Next, the system is transformed to the linear canonical form described in Eq. (2.43)
through dynamic feedback linearization. The feedback control consists of the fol-
lowing elements
ξ̇ = −v1 sin(θ ) + v2 cos(θ ) + ξ θ̇ 2
u 1 = ξ + εθ̇ 2 (2.71)
u 2 = − ξ (v1 cos(θ ) + v2 sin(θ ) + 2ξ̇ (θ̇))
1
62 2 Differential Flatness Theory and Flatness-Based Control

which transforms the system into the linear canonical form

(4)
y1 = v1
(2.72)
y2(4) = v2

Thus, now one has the change of coordinates

(x, z, θ, ẋ, ż, θ̇ , ξ, ξ̇ ) → (y, ẏ, ÿ, y (3) ) (2.73)

The only singularity which may appear in this feedback control loop is when ξ = 0
that is ÿ12 + ( ÿ2 + 1)2 = 0 (which practically means that the aircraft is in free fall).
Example 2: The underactuated vessel dynamics. The model of an autonomous hov-
ercraft provides another example about equivalence between an initial complicated
nonlinear description of its dynamics and the linear canonical (Brunovsky form)
[461].
The hovercraft model is obtained from the generic ship’s model, after setting
specific values for the elements of the inertia and Coriolis matrix and after reducing
the number of the available control inputs. The state-space equation of the nonlinear
underactuated hovercraft model (Fig. 2.3) is given by

ẋ = ucos(ψ) − vsin(ψ)
ẏ = usin(ψ) + vcos(ψ)
ψ̇ = r
(2.74)
u̇ = v · r + τu
v̇ = −u · r − βv
ṙ = τr

Fig. 2.3 Diagram of the


underactuated hovercraft’s
kinematic model
2.3 Properties of Differentially Flat Systems 63

where x and y are the cartesian coordinates of the vessel, ψ is the orientation angle,
u is the surge velocity, v is the sway velocity, and r is the yaw rate. Coefficient β
is a function of elements of the inertia matrix and hydrodynamic damping matrix
of the vessel. The control inputs are the surge force τu and the yaw torque τr . The
hovercraft’s model is also written in the matrix form:
⎛ ⎞ ⎛ ⎞ ⎛ ⎞
ẋ ucos(ψ) − vsin(ψ) 00
⎜ ẏ ⎟ ⎜ usin(ψ) + vcos(ψ) ⎟ ⎜0 0⎟
⎜ ⎟ ⎜ ⎟ ⎜ ⎟ 
⎜ψ̇ ⎟ ⎜ r ⎟ ⎜0 0⎟ τu
⎜ ⎟=⎜ ⎟+⎜ ⎟ (2.75)
⎜ u̇ ⎟ ⎜ vr ⎟ ⎜1 0⎟ τr
⎜ ⎟ ⎜ ⎟ ⎜ ⎟
⎝ v̇ ⎠ ⎝ −ur − βv ⎠ ⎝0 0⎠
ṙ 0 01

or equivalently, one has the description

x̃˙ = f˜(x̃) + g̃(x̃)ṽ (2.76)

The system’s state vector is denoted as x̃ = [x, y, ψ, u, v, r ]T , f (x̃) ∈ R 6×1 , and


g̃(x̃) = [g̃a , g̃b ] ∈ R 6×2 , while the control input is the vector ṽ = [τu , τr ]T .
The system’s state vector can be extended by including as additional state variables
the control input τu and its first derivative τ̇u . These are denoted as z 1 = τu and
z 2 = τ̇u . The extended state-space description of the system becomes
⎛ ⎞ ⎛ ⎞ ⎛ ⎞
ẋ ucos(ψ) − vsin(ψ) 0 0
⎜ ẏ ⎟ ⎜ usin(ψ) + vcos(ψ) ⎟ ⎜0 0⎟
⎜ ⎟ ⎜ ⎟ ⎜ ⎟
⎜ ψ̇ ⎟ ⎜ r ⎟ ⎜0 0⎟
⎜ ⎟ ⎜ ⎟ ⎜ ⎟ 
⎜ u̇ ⎟ ⎜ vr + z 1 ⎟ ⎜0 0⎟
⎜ ⎟=⎜ ⎟+⎜ ⎟ τ̈u (2.77)
⎜ v̇ ⎟ ⎜ −ur − βv ⎟ ⎜0 0⎟
⎜ ⎟ ⎜ ⎟ ⎜ ⎟ τr
⎜ ṙ ⎟ ⎜ 0 ⎟ ⎜0 1⎟
⎜ ⎟ ⎜ ⎟ ⎜ ⎟
⎝ż 1 ⎠ ⎝ z2 ⎠ ⎝0 0⎠
ż 2 0 1 0

or equivalently, one has the description

ż = f (z) + g(z)ṽ (2.78)

The extended system’s state vector is denoted as z = [x, y, ψ, u, v, r, z 1 , z 2 ]T . More-


over, one has f (z) ∈ R 8×1 , and g(z) = [ga , gb ] ∈ R 8×2 , while the control input is
the vector ṽ = [τ̈u , τr ]T .
It can be proven that the model of the underactuated vessel given in Eq. (2.74) is a
differentially flat one. This means that all its state variables and the control inputs can
be written as functions of a single variable, which is the flat output. In the hovercraft’s
case, the flat output is the vector of the vessel’s cartesian coordinates, that is

ỹ = [y1 , y2 ] = [x, y] (2.79)


64 2 Differential Flatness Theory and Flatness-Based Control

It holds that

ẍ = u̇cos(ψ) − u · sin(ψ) · ψ̇ − v̇sin(ψ) − v · cos(ψ)ψ̇


(2.80)
ÿ = u̇sin(ψ) + u · cos(ψ) · ψ̇ + v̇cos(ψ) − v · cos(ψ)ψ̇

Moreover, it holds that

ẍ + β ẋ = cos(ψ)(u̇ − vψ̇ + βu) + sin(ψ)(−u ψ̇ − v̇ − βv)


(2.81)
ÿ + β ẏ = cos(ψ)(v̇ + u ψ̇ + βv) + sin(ψ)(−vψ̇ + u̇ + βu)

Using Eqs. (2.81) and (6.166), and after computing that

u ψ̇ + v̇ + βv = u · r − ur − βv + βv = 0
(2.82)
u̇ − vψ̇ + βu = vr + τu − vr + βu = τu + βu

one obtains
ÿ+β ẏ cos(ψ)0+sin(ψ)(τu +βu)
ẍ+β ẋ = cos(ψ)(τu +βu)−sin(ψ)0 →
(2.83)
ÿ+β ẏ
ẍ+β ẋ = tan(ψ) → ψ = atan −1 ( ẍ+β
ÿ+β ẏ
ẋ )

Thus, through Eq. (2.83) it is proven that the state variable ψ (heading angle of the
vessel) is a function of the flat output and of its derivatives.
From Eq. (2.81) one also has that

(ẍ + β ẋ)2 + ( ÿ + β ẏ)2 = (τu + βu)2 (2.84)

Moreover, it holds that

ẋ(ẍ + β ẋ) = (ucos(ψ) − vsin(ψ))cos(ψ)(τu + βu)


(2.85)
ẏ( ÿ + β ẏ) = (usin(ψ) + vcos(ψ))sin(ψ)(τu + βu)

while using Eq. (2.84) and after intermediate computations one finally obtains

ẋ(ẍ + β ẋ) + ẏ( ÿ + β ẏ) = u(τu + βu) (2.86)

Dividing Eq. (2.86) with the square root of Eq. (2.84) one obtains

u(τu +βu)
√ẋ(ẍ+β ẋ)+ ẏ( ÿ+β ẏ) = (τu +βu) (2.87)
(ẍ+β ẋ) +( ÿ+β ẏ)
2 2

which finally give


u = √ẋ(ẍ+β ẋ)+ ẏ( ÿ+β ẏ)
(2.88)
(ẍ+β ẋ) +( ÿ+β ẏ)
2 2
2.3 Properties of Differentially Flat Systems 65

It also holds that

ẏ ẍ − ẋ ÿ = (usin(ψ) + vcos(ψ))(u̇cos(ψ) − usin(ψ)ψ̇−


−v̇sin(ψ) − vcos(ψ)ψ̇) − (ucos(ψ) − vsin(ψ))(u̇sin(ψ) + ucos(ψ)ψ̇+
+v̇cos(ψ) − vsin(ψ)ψ̇)
(2.89)

which after intermediate computations and substitution of the derivative variables


from Eq. (2.75) give
ẏ ẍ − ẋ ÿ = v(βu + τu ) (2.90)

From Eqs. (2.90) and (2.84) one obtains

ẏ ẍ − ẋ ÿ
v= (2.91)
(ẍ + β ẋ)2 + ÿ + β ẏ)2

From the state-space equations it holds that

r = ψ̇ (2.92)

where from Eq. (2.83) one has that

ÿ + β ẏ
ψ = atan −1 ( ) (2.93)
ẍ + β ẋ

which means that r is also a function of the flat output and of its derivatives. This
can be also confirmed analytically. Indeed from Eq. (2.93) it holds that

cos 2 (ψ)ψ̇ + sin 2 (ψ)ψ̇ (y (3) + β ψ̈)(ẍ + β ẋ) − ( ÿ + β ẏ)(x (3) + β ẍ)
=
cos 2 (ψ) (ẍ + β ẋ)2
(2.94)
which also gives

ψ̇ (y (3) + β ψ̈)(ẍ + β ẋ) − ( ÿ + β ẏ)(x (3) + β ẍ)


= (2.95)
cos 2 (ψ) (ẍ + β ẋ)2

while using that


1
= tan 2 (ψ) + 1 (2.96)
cos2 ψ

one obtains that


(ẍ + β ẋ)2
cos2 ψ = (2.97)
(ẍ + β ẋ)2 + ( ÿ + β ẏ)2
66 2 Differential Flatness Theory and Flatness-Based Control

Thus, from Eqs. (2.95) and (2.92) one has that

(y (3) + β ψ̈)(ẍ + β ẋ) − ( ÿ + β ẏ)(x (3) + β ẍ)


r = ψ̇ ⇒ r = cos 2 (ψ) (2.98)
(ẍ + β ẋ)2

which after intermediate operations gives

y (3) (ẍ + β ẋ) − x (3) ( ÿ + β ẏ) − β 2 (ẍ ẏ − ÿ ẋ)


r= (2.99)
(ẍ + β ẋ)2 + ( ÿ + β ẏ)2

Equivalently, from the state-space equations one has that



τu = u̇ − v · r ⇒ τu = d
dt
√ẋ(ẍ+β ẋ)+ ẏ( ÿ+β ẏ) −
(ẍ+β ẋ)2 +( ÿ+β ẏ)2
(2.100)
y (3) (ẍ+β ẋ)−x (3) ( ÿ+β ẏ)−β 2 (ẍ ẏ− ÿ ẋ)
−√ ẏ ẍ−ẋ ÿ
· (ẍ+β ẋ)2 +( ÿ+β ẏ)2
(ẍ+β ẋ)2 +( ÿ+β ẏ)2

which after intermediate operations gives

τu = √ẍ(ẍ+β ẋ)+ ÿ( ÿ+β ẏ)


(2.101)
(ẍ+β ẋ) +( ÿ+β ẏ)
2 2

Finally, for the control input τr it holds that τr = ṙ and using Eq. (2.99) this implies
that τr is also a function of the flat output and of its derivatives. This can be also
shown analytically according to the following:

τr = ṙ ⇒ τr =

y (4) (ẍ+βx)−x (4) ( ÿ+β ẏ)+β(y (3) ẍ−x (3) ÿ)−β 2 (x (3) ẏ−y (3) ẋ)
[(ẍ+β ẋ)2 +( ÿ+β ẏ)2 ]· (2.102)
(3)
−2 [y (ẍ+β ẋ)−x 3 ( ÿ+β ẏ)−β 2 (ẍ ẏ− ÿ ẋ)]
[(ẍ+β ẋ)2 +( ÿ+β ẏ)2 ]2
·
·{(ẍ + β ẋ)(x + β ẍ) + ( ÿ + β ẏ)(y (3) + β ÿ)}
(3)

Through Eq. (2.102) it is confirmed that that all state variables and the control input
of the hovercraft’s model can be written as functions of the flat output and of its
derivatives. Consequently, the vessel’s model is a differential flat one.
Next, it will be shown that a flatness-based controller can be developed for the
hovercraft’s model. It has been shown that it holds

ẍ = u̇cos(ψ) − usin(ψ)ψ̇ − v̇sin(ψ) − vcos(ψ)ψ̇ → ẍ = (vr + τu )cos(ψ) −


usin(ψ)r − (−ur − βv)sin(ψ) − vcos(ψ)r → ẍ = τu cos(ψ) + βvsin(ψ)
2.3 Properties of Differentially Flat Systems 67

By differentiating once more with respect to time and after intermediate operations
one finally obtains
x (3) = τ̇u cos(ψ) − τu sin(ψ)r +
(2.103)
+β(−ur − βv)sin(ψ) + βvcos(ψ)r

Similarly one has

ÿ = u̇sin(ψ) + ucos(ψ)ψ̇ + v̇cos(ψ) − vsin(ψ)ψ̇ → ÿ = (vr + τu )sin(ψ) +


ucos(ψ)r + (−ur − βv)cos(ψ) − vsin(ψ)r → ÿ = τu sin(ψ) − βvcos(ψ)

As explained in Eq. (2.104), the state vector of the system is extended so as to include
as new state variables the control input τu and its first derivative τ̇u . The new state
variables are denoted as z 1 = τu and z˙1 = τ̇u . Using that the extended state-space
description of the system is
⎛ ⎞ ⎛ ⎞ ⎛ ⎞
ẋ ucos(ψ) − vsin(ψ) 0 0
⎜ ẏ ⎟ ⎜ usin(ψ) + vcos(ψ) ⎟ ⎜0 0⎟
⎜ ⎟ ⎜ ⎟ ⎜ ⎟
⎜ ψ̇ ⎟ ⎜ r ⎟ ⎜0 0⎟
⎜ ⎟ ⎜ ⎟ ⎜ ⎟ 
⎜ u̇ ⎟ ⎜ vr + z 1 ⎟ ⎜0 0⎟
⎜ ⎟=⎜ ⎟+⎜ ⎟ τ̈u (2.104)
⎜ v̇ ⎟ ⎜ −ur − βv ⎟ ⎜0 0⎟
⎜ ⎟ ⎜ ⎟ ⎜ ⎟ τr
⎜ ṙ ⎟ ⎜ 0 ⎟ ⎜0 1⎟
⎜ ⎟ ⎜ ⎟ ⎜ ⎟
⎝ż 1 ⎠ ⎝ z2 ⎠ ⎝0 0⎠
ż 2 0 1 0

or equivalently, one has the description

ż = f (z) + g(z)ṽ (2.105)

The system’s state vector is again denoted as z = [x, y, ψ, u, v, r, z 1 , z 2 ]T , f (z) ∈


R 8×1 , and g(z) = [ga , gb ] ∈ R 8×2 , while the control input is the vector ṽ =
[τ̈u , τr ]T .
The extended state-space description of the system given in Eq. (2.104) or in its
compact form described by Eq. (2.105), is used. By differentiating once more with
respect to time and after intermediate operations one finally obtains

y (3) = z 2 sin(ψ) + z 1 cos(ψ)r + βur cos(ψ)+


(2.106)
+β 2 vcos(ψ) + βvsin(ψ)r

It can be noticed that in the equations of the third-order derivatives for both x and
y only the control input τu and its derivative τ̇u appear, while the control input τr
is missing. Therefore, differentiation of x (3) once more with respect to time is per-
formed. This gives
68 2 Differential Flatness Theory and Flatness-Based Control

x (4) = τ̈u cos(ψ) − 2z 2 sin(ψ)r − z 1 cos(ψ)r 2 − z 1 sin(ψ)τr − βvr 2 sin(ψ) −


βz 1rsin(ψ) − βuτr sin(ψ) − βur 2 cos(ψ) + β 2 ur sin(ψ) − β 3 vsin(ψ) − β 2 vr cos
(ψ) − βur 2 cos(ψ) + β 2 vr cos(ψ) − βvr 2 sin(ψ) + βvcos(ψ)τr

while after substituting the time derivative according to Eq. (2.74) and after regroup-
ing terms one obtains a description of the form

x (4) = [−2z 2 sin(ψ)r − z 1 cos(ψ)r 2 − βvr 2 sin(ψ) − βz 1rsin(ψ) − βur 2 cos(ψ)+


+β 2 ur sin(ψ) − β 3 vsin(ψ) − β 2 vr cos(ψ) − βur 2 cos(ψ) + β 2 vr cos(ψ)−
−βvr 2 sinψ] + [cos(ψ)]τ̈u + [−z 1 sin(ψ) − βusin(ψ) + βvcos(ψ)]τr
(2.107)

Consequently, the fourth derivative of x is finally written in the form

x (4) = L 4f y1 + L ga L 3f y1 τ̈u + L gb L 3f y1 τr (2.108)

where

L 4f y1 = −2z 2 sin(ψ)r − z 1 cos(ψ)r 2 − βvr 2 sin(ψ) − βz 1 rsin(ψ)−


−βur 2 cos(ψ) + β 2 ur sin(ψ) − β 3 vsin(ψ) − β 2 vr cos(ψ) − βur 2 cos(ψ)+
+β 2 vr cos(ψ) − βvr 2 sinψ
(2.109)

L ga L 3f y1 = cos(ψ) (2.110)

L gb L 3f y1 = −z 1 sin(ψ) − βusin(ψ) + βvcos(ψ) (2.111)

In a similar manner, differentiating once more with respect to time the expression
about y (3) one gets

y (4) = ż 1 cos(ψ)r − z 1 sin(ψ)ψ̇r + z 1 cos(ψ)ṙ −


−β v̇r sin(ψ) − βvṙ sin(ψ) − βvr cos(ψ)ψ̇−
−β u̇r cos(ψ) − βu ṙ cos(ψ) + βur sin(ψ)ψ̇+ (2.112)
+β 2 v̇cos(ψ) − β 2 vsinψ ψ̇+
+ż 2 sin(ψ) + z 2 cos(ψ)ψ̇

while after substituting the time derivative according to Eq. (6.166) and after regroup-
ing terms one obtains a description of the form

y (4) = [z 2 r cos(ψ) − z 1 r 2 sin(ψ) + βur 2 sin(ψ) + β 2 vr sin(ψ) − βvr 2 cos(ψ)]−


−βvr 2 cos(ψ) − βz 1 r cos(ψ) + βur 2 sin(ψ) − βur cos(ψ) + β 2 vcos(ψ)−
−β vr sin(ψ) + z 2 r cos(ψ)] + [sin(ψ)]τ̈u + [z 1 cos(ψ) − βvsin(ψ) − βucos(ψ)]τr
2

(2.113)
2.3 Properties of Differentially Flat Systems 69

Thus y (4) can be also written in the form

y (4) = L 4f y2 + L ga L 3f y2 τ̈u + L gb L 3f y2 τr (2.114)

L 4f y2 = [z 2 r cos(ψ) − z 1r 2 sin(ψ) + βur 2 sin(ψ) − β 2 vr sin(ψ) − βvr 2 cos(ψ)]−


−βvr 2 cos(ψ) − βz 1r cos(ψ) + βur 2 sin(ψ) − βur cos(ψ) + β 2 vcos(ψ)−
−β 2 vr sin(ψ) + z 2 r cos(ψ)]
(2.115)
and
L ga L 3f y2 = sin(ψ) (2.116)

L gb L 3f y2 = z 1 cos(ψ) − βvsin(ψ) − βucos(ψ) (2.117)

Consequently, the aggregate input–output linearized description of the system


becomes
x (4) = L 4f y1 + L ga L 3f y1 τ̈u + L gb L 3f y1 τr
(2.118)
y (4) = L 4f y2 + L ga L 3f y2 τ̈u + L gb L 3f y2 τr

while by defining the new control inputs

v1 = L 4f y1 + L ga L 3f y1 τ̈u + L gb L 3f y1 τr
(2.119)
v2 = L 4f y2 + L ga L 3f y2 τ̈u + L gb L 3f y2 τr

the following description for the input–output linearized hovercraft model is obtained

x (4) = v1
(2.120)
y (4) = v2

For the dynamics of the linearized equivalent model of the system, the following
new state variables can be defined

z 1,1 = x z 1,2 = ẋ z 1,3 = ẍ z 1,4 = x (3)


(2.121)
z 2,1 = y z 2,2 = ẏ z 2,3 = ÿ z 2,4 = y (3)

and the state-space description of the system becomes

ż = Az + Bv
(2.122)
zm = C z
70 2 Differential Flatness Theory and Flatness-Based Control

or equivalently
⎛ ⎞ ⎛ ⎞⎛ ⎞ ⎛ ⎞
ż 1,1 0 1 0 0 0 0 0 0 z 1,1 0 0
⎜ż 1,2 ⎟ ⎜0 0 1 0 0 0 0 0⎟ ⎜z 1,2 ⎟ ⎜0 0⎟
⎜ ⎟ ⎜ ⎟⎜ ⎟ ⎜ ⎟
⎜ż 1,3 ⎟ ⎜0 0 0 1 0 0 0 0⎟ ⎜ ⎟ ⎜ 0⎟
⎜ ⎟ ⎜ ⎟ ⎜z 1,3 ⎟ ⎜0 ⎟ 
⎜ż 1,4 ⎟ ⎜0 0 0 0 0 0 0 ⎟ ⎜
0⎟ ⎜z 1,4 ⎟ ⎜ 0⎟
⎜ ⎟ ⎜ ⎟ + ⎜1 ⎟ v1
⎜ż 2,1 ⎟ = ⎜0 0 0 0 0 1 0 ⎟ ⎜
0⎟ ⎜z 2,1 ⎟ ⎜
⎟ 0⎟
(2.123)
⎜ ⎟ ⎜ ⎜0 ⎟ v2
⎜ż 2,2 ⎟ ⎜0 0 0 0 0 0 1 0⎟ ⎜z 2,2 ⎟ ⎜0 0⎟
⎜ ⎟ ⎜ ⎟⎜ ⎟ ⎜ ⎟
⎝ż 2,3 ⎠ ⎝0 0 0 0 0 0 0 1⎠ ⎝z 2,3 ⎠ ⎝0 0⎠
ż 2,4 0 0 0 0 0 0 0 0 z 2,4 0 1

while the associated measurement equation is


⎞ ⎛
z 1,1
⎜z 1,2 ⎟
⎜ ⎟
⎜ ⎟
 m   ⎜z 1,3 ⎟
z1 1 0 0 0 0 0 0 0 ⎜z 1,4 ⎟


= (2.124)
m
z2 00001000 ⎜ ⎜z 2,1 ⎟

⎜z 2,2 ⎟
⎜ ⎟
⎝z 2,3 ⎠
z 2,4

This completes Example 2.


An important property of the endogenous transformations is that the number of
control inputs in the initial and the final description of the system remains the same.
Theorem: If the two systems (X × U × Rm ∞ , F) and Y × V × R ∞ , G are equivalent,
s
then they will have the same number of control inputs, that is m = s.
Proof : Consider the truncation Φm of Φ on X × U × (R m )μ

Φμ : X × U × (R m+k )μ → Y × V × (R s )μ
(2.125)
(x, u, u 1 , . . . , u k+μ ) → (φ, α, α̇, . . . , α (μ) )

which means the first μ + 2 blocks of the components of Ψ , while μ is a sufficiently


large entity. Since Ψ is invertible, Ψmu is a submersion for all μ. Thus the dimension
of the space from which Ψ has emanated is superior or equal to the dimension of the
space of arrival. This is written as

n + m(k + μ + 1) ≥ s(μ + 1) ∀μ > 0 (2.126)

This implies m ≥ s. In a similar manner, it is shown that with the mapping Ψ it


holds s ≥ m. Consequently, one finally has m = s which means that the number of
control inputs in the two descriptions remains the same.
This definition of the equivalence is adapted to the equivalence between two so-
called diffieties. As it will be explained in detail in Sect. 2.6, the concept of a diffiety
2.3 Properties of Differentially Flat Systems 71

is as follows: Variable (X, τx ) comprising the state vector of the nonlinear system
and its successive derivatives with respect to time, as well as the Lie derivatives of
the mapping transformation along a vector field defined by the state vector elements
and their derivatives is called a manifold of jets or a diffiety.
Given two diffieties (M, CTM) and (N , CTN) it is said that a function Ψ from
M to N is Lie-Backlünd or a C-morphism, if the tangent (projection) function T Ψ
satisfies T Φ(CTM) ⊂ CTN. Moreover, if Ψ has an inverse function Φ, such that
T Ψ (C T N ) ⊂ CTM, then Ψ is a Lie-Backlünd isomorphism or a C isomorphism.
When such an isomorphism exists, the diffieties are called equivalent. Therefore,
an endogenous transformation is a special type of a Lie-Bakclünd transformation
which preserves the parametrization in time of the integral curves. It is also possible
to introduce a more general concept which is the orbital equivalence, about the Lie-
Bakclünd isomorphisms which preserve only the geometric locus of the integral
curves.

2.3.1.3 Differentially Flat Systems and Equivalence to the Trivial System

Definition: The dynamical system (M, F) where M: is the state vector and F: is a
vector field, is differentially flat in p (or respectively flat), if and only if it is equivalent
in p (respectively equivalent) with the trivial system (therefore it can be described
in the Brunovsky canonical form, as shown in the examples of Sect. 2.2.2).
The definition of equivalent systems can be used, and one can consider a differ-
entially flat system (X × U × Rm ∞ , F) associated with

ẋ = f (x, u) where (x, u) ∈ X × U ⊂ R n × R m (2.127)

By definition, the above system is equivalent to the trivial system Rn∞ , Fs , where the
endogenous transformation Ψ takes the form

Ψ (x, u, u (1) , . . .) = (h(x, u), ḣ(x, u), ḧ(x, u), . . .) (2.128)

In other terms, Ψ is the infinite extension of function h(). The inverse transformation
of Ψ is denoted as Φ and holds

Ψ ( ȳ) = (ψ(ψ̄), β(ψ̄), β̇(ψ̄) . . .) (2.129)

Since Φ and Ψ are inverse applications it holds that

φ(h̄(x, ū)) = x and α(h̄(x, ū)) = u (2.130)

Moreover, t → y(t) is a trajectory of y = v and

t → (x(t), u(t)) = (ψ(ψ̄(t)), β(ψ̄(t))) (2.131)

is a trajectory of ẋ = f (x, u).


72 2 Differential Flatness Theory and Flatness-Based Control

Definition: Assume that {M, F} is a system and that Ψ is the transformation that
brings it to the canonical form. The first component of Ψ is considered to be the flat
output.
Another important property of differentially flat systems is that the dimension of
the flat output is equal to the number of the control inputs (and thus linearization
and decoupling is succeeded). However, it is noted that the flat output is not unique.
If y is a flat output, then γ (y) is also a flat output, provided that γ is a smooth
diffeomorphism. For single-input systems, the flat output is a scalar s = m = 1.
It is easy to show that one can pass from one flat output to another by using only
a static change of variables. The multivariable case is clearly more complicated.
For example, for s = m = 2 it is easy to see that if y1 , y2 is a flat output then
(y1 , y2 + γ (y1(r ) )) is also a flat output, provided that γ () is smooth function and
r ≥ 0. Since the flat output of a system is not unique, it is preferable to select the flat
output which leads to simple computation for the linearization of the system and the
design of the feedback controller.

2.3.2 Differential Flatness and Trajectory Planning

2.3.2.1 Applications of Differential Flatness in Trajectory Planning

Next, it will be shown how differential flatness can be used to solve the problem
of trajectory planning (setpoints definition) for dynamical systems control. Assume
the following nonlinear system in which the control input u does not implement
feedback control
ẋ = f (x, u), x ∈ R n u ∈ R m (2.132)

with flat output y = h(x, u, u̇, . . . , u (r ) ). In such a manner, the system’s trajec-
tories (x(t), u(t)) are written as a function of the flat output y and its derivatives
x = φ(y, ẏ, . . . , y (q) ) and u = α(y, ẏ, . . . , y (q) ). The trajectory planning problem
contains a start and an arrival state. It is assumed that the flat output is a vector with
elements yi which are written as

yi (t) = Ai j λ j (t) (2.133)
j

where λ j , j = 1, . . . , N are basis functions. The problem of definition of the flat


output components yi becomes equivalent to finding its projections in the space
spanned by the basis functions λi .
2.3 Properties of Differentially Flat Systems 73

Next, it is assumed that the initial state of the system is x0 at t0 , while the final
state of the system is x f at t f . The coefficients Ai j should satisfy the following
 
yi (t0 ) = j Ai j λ j (t0 ) yi (t f ) = j Ai j λ j (t f )
··· ··· ··· (2.134)
(q)  (q) (q)  (q)
yi (t0 ) = j Ai j λ j (t0 ) yi (t f ) = j Ai j λ j (t f )

Without loss of generality it assumed that the vector of the flat output is of dimension
i = 1, that is y = [y1 ] (these results can be also generalized to the multidimensional
case). The following vectors are defined

(q)
ỹ0 = (y1 (τ0 ), . . . , y1 (τ0 ))
(q)
ỹ f = (y1 (τ f ), . . . , y1 (τ f )) (2.135)
ỹ = ( ỹ0 , ỹ f )

Using Eqs. (2.135) and (2.134) one has that


 
Λ(τ0 )
ỹ = A = ΛA (2.136)
Λ(τ j )

The elements of A should satisfy Eq. (2.136). The only condition for Eq. (2.136) to
have a solution, is that matrix Λ is a full rank one. This means that the space of
functions λ j has to be sufficiently rich. It can be concluded that the path planning
problem for the case of differentially flat systems ends up to linear algebra theory.

2.3.2.2 Planning Under Constraints

In this case, the objective is to find a trajectory going from point a to point b, which
will satisfy the constraints K (x, u, . . . , u (r ) ) ≤ 0 at each time instant. In the flat
coordinates, this consists in finding T > 0 and a function [0, T ] t → y(t) with
(y, . . . , y (q) ) to be given at t = 0 and T and to verify that ∀t ∈ [0, T ] the constraint
K (y, . . . , y (v) )(t) ≤ 0 will hold, for a certain v and a specific function K , obtained
from k, φ, and α, where k is the constraint condition and φ, α are the previously
defined mappings ẋ = φ(y, v̄) and u = α(y, v̄). The difficulty of this problem
increases when q = v = 0.
Next, it is simply assumed that the initial state Y0 and the final state Y f are equi-
libria. It is also assumed that the motion from the initial to the final state satisfies the
following constraint: there exists a path [0, 1] σ → Y (σ ) such that Y (0) and Y (1)
correspond to start and arrival equilibria , for all σ ∈ [0, 1], K (Y (σ ), 0, . . . , 0) < 0.
Therefore, there exists T > 0 and [0, T ] t → y(t) which is a solution to the
problem. It suffices to take Y (η(t/T )) where T is sufficiently large, and with η to be
a smooth increasing function [0, 1] s → η(s) ∈ [0, 1] with η(0) = 0, η(1) = 1,
and ddsηi = 0 for i = 1, . . . , max(q, v).
i
74 2 Differential Flatness Theory and Flatness-Based Control

The problem becomes more complicated in the case of trajectory planning for
systems subjected to nonholonomic constraints.

2.3.2.3 Planning of Trajectories with Singularities

With the previous analysis it has been shown that the endogenous transformation

Ψ (x, u, u (1) , . . .) = (h(x, ū), ḣ(x, ū), ḧ(x, ū), . . .) (2.137)

associated with the flat output y = h(x, ū) is defined everywhere, is smooth and
invertible in a manner that always enables state variable x and control input u to be
expressed as functions of the flat output and its derivatives

(y, ẏ, . . . , y (q) ) → (x, u) = φ(y, ẏ, . . . , y (q) ) (2.138)

However, a point of singularity may exist in the area of the state-space into which
the control tries to bring the system’s state vector (y is no longer invertible and
Eq. (2.138)) cannot be solved. As function φ cannot be defined in such a point, the
previous computations become meaningless. A manner to circumvent this problem
and to avoid the singularity is to choose a trajectory for the system

t → φ(y(t), ẏ(t), . . . , y (q) (t)) (2.139)

such that the point of potential singularity is bypassed. This procedure is depicted in
the following example:
Example: The following system with differentially flat dynamics is considered:

ẋ1 = u 1 ẋ2 = u 2 u 1 ẋ3 = x2 u 1 (2.140)

where the flat output is defined as y = (x1 , x3 ). In case that u 1 = 0 it holds that
ẋ1 = ẏ1 = 0 and a singularity arises because it holds
 
φ ẏ2 ÿ2 ẏ1 − ÿ1 ẏ2
(y, ẏ, ÿ) (x , x , x , u , u ) = y1 , ẏ1 , y2 , ẏ1 , (2.141)
→ 1 2 3 1 2 ẏ 3
1

and the inverse transformation φ is not defined at the points of singularity. However,
if one considers trajectories of the following form t → y(t) := (σ (t), p(σ (t))),
with σ and π being smooth functions he obtains that

y2 (t) p(σ (t))


= (2.142)
y1 (t) σ (t)

dp
ẏ2 (t) dσ (σ (t)) · σ̇ (t)
= (2.143)
ẏ1 (t) σ̇ (t)
2.3 Properties of Differentially Flat Systems 75

and
d2 p
ÿ2 ẏ1 − ÿ1 ẏ2 dσ 2
(σ (t)) · σ̇ 3 (t)
= (2.144)
ẏ13 σ̇ 3 (t)

Therefore, one can extend t → φ(y(t), ẏ(t), ÿ(t)) everywhere in time using
 
dp d2 p
t → σ (t), (σ (t)), p(σ (t)), σ̇ (t), (σ (t)) (2.145)
dσ dσ 2

Trajectory planning is performed in a similar manner as before: actually, functions


σ and p and their derivatives are constrained at the start and at the arrival point of
the trajectory, while elsewhere they are free. In this example, the avoidance of the
singularity is internally related with a symmetry of the system. Equations

ẋ1 = u 1 , ẋ2 = u 2 u 1 , ẋ3 = x2 u 1 (2.146)

are linear in u 1 . The transformation, t → t˜ = σ (t) and u 1 → ũ 1 = σ̇u(t)


1
, where only
the time t and the control input u change, leaves the equations invariants.

2.3.3 Differential Flatness, Feedback Control


and Equivalence

2.3.3.1 Closed-Loop Systems Under State Feedback Control


and Equivalence

The analysis of Sect. 2.3.2 referred to a system’s dynamics ẋ = f (x, u) in which


u was not specifically implementing a feedback control action. Next, the notion of
equivalence will be extended to the case of closed-loop control. To this end, the
initial system dynamics ẋ = f (x, u) and its equivalent description ẏ = g(y, v) are
considered
ẋ = f (x, u), (x, u) ∈ X × U ⊂ R n × R m
(2.147)
ẏ = g(y, v), (y, v) ∈ Y × V ⊂ R r × R p

∞ , F) and (Y × V × R ∞ , G), where


These correspond to the systems (X × U × Rm s
F and G are defined by

F(x, u, u (1) , . . .) := ( f (x, u), u (1) , u (2) , . . .)


(2.148)
G(y, v, v(1) , . . .) := (g(y, v), v(1) , v(2) , . . .)

Considering that these systems are equivalent, they have the same trajectories. A
question that arises is if a transition is possible from the system ẋ = f (x, u) to the
76 2 Differential Flatness Theory and Flatness-Based Control

system ẏ = g(y, v) by a feedback loop (primarily dynamic or alternatively static),


or inversely. For the transformed state vectors z and control inputs v one has

ż = α(x, z, v) z ∈ Z ⊂ R q
(2.149)
u = κ(x, z, v)

Next, the following theorem is introduced [338]:


Theorem: Assume that the systems ẋ = f (x, u) and ẏ = g(y, v) are equivalent.
Thus ẋ = f (x, u) can be transformed by a dynamic loop and change of coordinates
(dynamic feedback linearization) into

ẏ = g(y, v), v̇ = v(1) , v̇(1) = v(2) , . . . , v̇(μ) = w (2.150)

for an entity μ being sufficiently large. Inversely, ẏ = g(y, v) can be transformed by


a feedback loop (dynamic) and change of coordinates into

ẋ = g(x, u), u̇ = u (1) , u̇ 1 = u (2) , . . . , u̇ ( ) = w (2.151)

for an entity v being sufficiently large.


Proof : The notations F and G are used for the infinite dimensional vector fields
which represent the two systems. The equivalence shows that there exists an invertible
function
Φ(y, v̄) = (φ(y, v̄), α(y, v̄), α̇(y, v̄), . . .) (2.152)

such that
F(Φ(y, v̄)) = DΦ(y, v̄) · G(y, v̄) (2.153)

Next, one sets ȳ = (y, v, v(1) , . . . , v(μ) ) and w = v(μ+1) . For μ sufficiently large,
it holds that φ (respectively α) depends exclusively on ȳ (respectively on ȳ and w).
With these notations Φ is written as

φ( ỹ, w) = (φ( ỹ), α( ỹ, w̄), α̇( ỹ, w̄), . . .) (2.154)

and Eq. (2.153) implies in particular that

f (φ( ỹ, α( ỹ, w))) = Dφ( ỹ)ḡ( ỹ, w) (2.155)

where ḡ := (g, v(1) , . . . , v(k) ). Since Φ is invertible, and φ is of full rank it can thus
be completed by a function π to obtain a change of coordinates

ỹ → φ(ψ̃) = (φ( ỹ), π(ψ̃)) (2.156)


2.3 Properties of Differentially Flat Systems 77

Considering now the dynamic feedback, one has

u = α(φ −1 (x, z), w)


(2.157)
ż = Dπ(φ −1 (x, z)) · g̃(φ −1 (x, z), w)

which transforms ẋ = f (x, u) into


   
ẋ f (x, α(φ −1 (x, z), w))
= f˜(x, z, w) := (2.158)
z Dπ(φ −1 (x, z)) · g̃(φ −1 (x, z), w)

Using the previous example one has


   
f (φ( ỹ, α( ỹ, w))) Dφ( ỹ
f˜(φ( ỹ, w)) = = g̃( ỹ, w) = Dφ( ỹ) · g̃( ỹ, w)
Dπ( ỹ) · g̃( ỹ, w) Dπ( ỹ))
(2.159)

Thus, f˜ and g̃ are φ-conjugates which complete the proof.

A generic remark is that a differentially flat system is equivalent to a system in


the linear canonical (Brunovsky) form, and thus one arrives immediately at the fol-
lowing conclusion: A flat dynamics is linearizable by dynamic feedback and change
of coordinates.

2.3.3.2 Closed-Loop Systems and Equivalence Under Endogenous


Feedback

The dynamical system ẋ = f (x, u) is considered. The feedback loop

u = κ(x, z, w)
(2.160)
ż = α(x, z, w)

is called endogenous since the system’s dynamics in open loop ẋ = f (x, u) is


equivalent to the dynamics of the system in closed loop, the latter given by

ẋ = f (x, κ(x, z, w))


(2.161)
ż = α(x, z, w)

The term endogenous has the meaning that variables z and w are not included in the
state vector of the system (case also known as “zero dynamics”). Using the above one
arrives at a more refined definition of equivalence between systems and differential
flatness.
78 2 Differential Flatness Theory and Flatness-Based Control

Theorem: Two dynamics ẋ = f (x, u) and ẏ = g(y, v) are equivalent, if and only if,
ẋ = f (x, u) can be transformed by endogenous feedback and change of coordinates.

Corollary 1: A dynamics is flat, if and only if it is linearizable by dynamic endoge-


nous feedback and change of coordinates.

Corollary 2: Consider the system description

ẋ = f (x, κ(x, z, w))


(2.162)
ż = α(x, z, w)

where the constituents of the dynamic endogenous feedback are

u̇ = κ(x, z, w)
(2.163)
ż = α(x, z, w)

This system can be transformed by endogenous feedback into

ẋ = f (x, u), where u̇ = u (1) , . . . , u̇ (μ) = w (2.164)

for μ sufficiently large (thus finally the system’s control input contains multiple inte-
gral terms). This shows clearly the properties which are preserved by equivalence.
The property which is maintained by introducing integral terms and change of coor-
dinates is controllability. An endogenous feedback is actually reversible to the effect
of multiple integrators.

2.3.3.3 Trajectory Tracking in Feedback Control of Differentially


Flat Systems

The problem of trajectory tracking for the system ẋ = f (x, u) consists in finding a
controller u which will permit to the system state variables to track the reference set-
point t → (xr (t), u r (t)). It is convenient to add to the open loop control a correction
term Δu, which is a function of the state vector error Δx = x − xr . For differen-
tially flat systems, there is a systematic method to calculate Δu from the tracking
error Δx.
If the dynamics admits as flat output y = h(x, ū), one can use the corollary
that a differentially flat system is linearizable by (dynamic) feedback and change of
coordinates, into the linear canonical form y (μ+1) = w. For the linearized equivalent
(μ+1)
model, the control input is defined as yr − K Δ ỹ, where K is a gains vector and
Δy is a vector having as elements the flat output tracking error and its derivatives
up to order μ. By applying such a feedback control input, the tracking error dynamics
becomes
Δy (μ+1) = −K Δ ỹ (2.165)
2.3 Properties of Differentially Flat Systems 79

where yr (t) := (xr (t), ū r (t)) and ỹ := (y, ẏ, . . . , y μ ), and Δy represents the vector
of the flat output tracking error. Such a feedback control law assures asymptotic
tracking. There exists an invertible transformation

Φ( ȳ) = (φ( ȳ), α( ȳ), α̇( ȳ), . . .) (2.166)

which connects the infinite vector fields F(x, ū) := ( f (x, u), u, u (1) , . . .) and
G( ȳ) := (y, y (1) , . . .). From the proof of the theorem on the equivalence of two
systems (theorem given in Sect. 2.3.3.1), the above means that for the state vector
one has
x = φ( ỹr (t) + Δ ỹ) =
= φ( ỹr (t)) + Rφ (yr (t), Δ ỹ)Δ ỹ = (2.167)
= xr (t) + Rφ (yr (t), Δ ỹ)Δ ỹ

and for the control input one has

u = α( ỹr (t) + Δ ỹ, −K Δỹ) = 


(μ+1) Δ ỹ
= α( ỹr (t)) + Rα (yr (t), Δ ỹ) =
−KΔ ỹ  (2.168)
(μ+1) Δ ỹ
= u r (t) + Rα ( ỹr (t), yr (t), Δ ỹ, Δw)
−K Δ ỹ

where the following classical result of factorization has been used


1
Rφ (Y, ΔY ) := 0 Dφ(Y + tΔY )dt
1 (2.169)
Rα (Y, w, ΔY, Δw) := 0 Dα(Y + tΔY, w + tΔw)dt

Since Δy → 0 for t → ∞, this means that x → xr (t) and u → u r (t).

2.4 Flatness-Based Control and State Feedback for Systems


with Model Uncertainties

Up to now, for the systems used for analyzing differential flatness properties and
flatness-based control it has been assumed that an exact dynamic model was avail-
able. Flatness-based control can be also applied to systems characterized by model
uncertainties and exogenous disturbances. Denoting the coefficients vector of the
system as θ ∈ R p , the generalized system dynamics of Eq. (2.170) is written as

ẋ(t) = f (θ, x(t), u(t)) (2.170)


80 2 Differential Flatness Theory and Flatness-Based Control

In the generic case, the system’s coefficients θ are subject to uncertainty, i.e.,

θ = θ0 + θ̃ , θ̃i ∈ [θ i , θ̄i ], i = 1, . . . , p (2.171)

where θ0 is the nominal value of the parameter vector. In Eq. (2.170) the vector
field f : R p × R n × R m → R n is smooth. Denoting the flat output y(t) ∈ R
and parameters vector θ , the definition of differential flatness given in Sect. 2.2.2 is
rewritten as [189, 190]
y = h(θ, x, u, u̇, . . . , u (r ) )
x = φ(θ, y, ẏ, . . . , y (r −1) ) (2.172)
u = ψ(θ, y, ẏ, . . . , y (r ) )

where h, φ, and ψ are smooth functions defining mappings h : R p ×R n ×(R m )r +1 →


R m , φ : R p × (R m )r → R n and ψ : R p × (R m )r +1 → R m , respectively. It is also
assumed that the flat output y(t) is independent of the coefficients (parameters) vector
θ . Equation (2.172) shows that for every given trajectory of the flat output t → y(t)
the evolution of all other variables of the system t → x(t) and t → u(t) are given
without integration of any differential equation. Moreover, for a sufficiently smooth
desired trajectory of the flat output t → y ∗ (t) Eq. (2.172) can be used to design the
corresponding feed-forward control u ∗ (t) directly for the nominal system parameters
θ0 . The trajectory y ∗ is called the nominal trajectory, while the trajectory u ∗ is called
the nominal control. Thus, knowing the desirable system’s output, one can also find
the associated flat output y ∗ and subsequently the control input that makes the system
track the desirable trajectory is given by

u ∗ (t) = ψ(θ0 , y ∗ (t), ẏ ∗ (t), . . . , y ∗ (r ) (t)) (2.173)

which means that for each admissible nominal trajectory y ∗ (t) there is a nominal
control input u ∗ . The initial condition of the desired trajectory of the flat output
t → y ∗ (t) is defined as the vector y0∗ = [y ∗ (0), ẏ ∗ (0), . . . , y ∗ (r −1) (0)]T . The sys-
tem is consistent with respect to the initial conditions x0 if x0 = φ(θ, y0∗ ). The
following theorem has been proven [189]:

Theorem: If the desired trajectory of the flat output is consistent with the initial con-
dition x0 and θ = θ0 , then when applying the nominal control input of Eq. (2.173)
the system becomes equivalent, by a change of coordinates, to a linear system in
Brunovksy (canonical) form.

Without loss of generality, a single-input single-output flat system is considered.


It is easy to show that such a flat system can be represented as follows: Setting
y = [y, ẏ, . . . , y (n−1) ]T = [y1 , y2 , . . . , yn ]T the system can be transformed via the
diffeomorphism
y = h(θ, x) (2.174)
2.4 Flatness-Based Control and State Feedback for Systems … 81

where h = φ −1 with φ defined in Eq. (2.172), into the control normal (canonical)
form
ẏi (t) = yi+1 (t) i ∈ {1, . . . , n − 1}
(2.175)
ẏn (t) = α(θ, y(t), u(t))

where y (i) is the i − 1th order derivative of the flat output. From the second row of
Eq. (2.175), one can see that the nth order derivative of the flat output is finally written
as a nonlinear function of the parameters vector θ , of the flat output’s vector y(t) and
of the control input u(t). The system in canonical form described by Eq. (2.175) and
the system of Eqs. (2.170), (2.172), and (2.173) have the same solution t → y(t).
Defining the new control input v(t) = α(θ, y(t), u(t)), the Brunovsky form of
the transformed initial system is written as

ẏi (t) = yi+1 (t) i ∈ {1, . . . , n − 1}


(2.176)
ẏn (t) = v(t)

Once the system has been written in the Brunovksy (canonical) form of Eq. (2.176),
a control input that can assure tracking of any desirable trajectory ẏn∗ is given by

v = ẏn∗ + K T ē (2.177)

where the term K T ē corresponds to an error feedbackcontroller with an integral term


t
and thus processes the augmented error vector ē = [ 0 e1 (τ )dτ, e1 , e2 , . . . , en ]. The
feedback control term can be also of the form of a proportional-derivative controller
and in the latter case processes the error vector e = [e1 , e2 , . . . , en ], thus taking the
form
n
KTe = − kn+1−i ei (t), kn+1−i > 0 (2.178)
i=1

Thus, in case that the exact values of the model’s parameters θ are known and these
are equal to the nominal values θ0 , and no integration of the flat output error is
nin the feedback loop, i.e. the feedback control signal is of the form K e =
used T

− i=1 kn+1−i ei (t), the closed-loop system error vector dynamics become

ẏn = v ⇒ ẏn = ẏn∗ + K T e ⇒


ẏn = ẏn∗ − kn e1 − kn−1 e2 + · · · − k1 en ⇒
(2.179)
ẏn − ẏn∗ = −kn e1 − kn−1 e2 + · · · − k1 en ⇒
e + k1 e(n−1) + k2 e(n−2) + · · · + kn−1 ė + kn e = 0
(n)
82 2 Differential Flatness Theory and Flatness-Based Control


where ei = yi − yi∗ = y (i−1) − y (i−1) . The dynamics of the flat output tracking
error can be also written in a matrix form
⎛ ⎞ ⎛ ⎞⎛ ⎞
ė1 0 1 0 ··· 0 e1
⎜ ė2 ⎟ ⎜ 0 0 1 ··· 0 ⎟ ⎜ ⎟
⎜ ⎟ ⎜ ⎟ ⎜ e2 ⎟
⎜· · ·⎟ = ⎜ · · · · · · ··· ··· ··· ⎟ ⎜ ⎟
⎜ ⎟ ⎜ ⎟ ⎜· · ·⎟ (2.180)
⎝· · ·⎠ ⎝ 0 0 0 · · · 1 ⎠ ⎝· · ·⎠
ėn −kn −kn−1 −kn−2 · · · −k1 en

In case of the error dynamics of Eq. (2.180) to succeed elimination of the tracking
error it suffices to select the controller gains k1 , k2 , . . . , kn so as the polynomial
e(n) + k1 e(n−1) + k2 e(n−2) + · · · + kn−1 ė + kn e = 0 to be a Hurwitz one.
When that the model’s parameters θ are not precisely known, or have deviated
from their nominal values θ0 , one can apply again a control input of the form described
in Eqs. (2.177) and (2.178), and for specific magnitude of the exogenous disturbances
or parametric uncertainties can expect again satisfactory tracking of the reference
trajectory. In such a case, the robustness features of the closed loop can be analyzed
with the use of results from interval polynomial stability theory (e.g. Kharitonov’s
theory) or other results on interval polynomial analysis (e.g. see [431]). The problem
of robustness of a flatness-based controller in case of parametric uncertainties or
exogenous perturbations has been studied in [189, 190, 433, 443].

2.5 Classification of Types of Differentially Flat Systems

2.5.1 Criteria About the Differential Flatness of a System

2.5.1.1 Definition of 0-Flat Systems

The existence of a computable criterion so as to decide if the dynamical system


ẋ = f (x, u), x ∈ R n , u ∈ R m is differentially flat remains open. This means that
there is no systematic method to construct a flat output. This situation is somehow
equivalent to the definition of Lyapunov functions for nonlinear dynamical systems.
For even though Lyapunov functions are both theoretically and practically important
for the study of the stability features of nonlinear dynamical systems, there is no
systematic manner to define them.
The main difficulty in the computation of the flat output y = h(x, u, . . . , y (r ) )
remains in its dependence to the derivatives of the control input u, up to order r
which can be arbitrarily large. To know if the order of r admits an upper bound
(which can be dependent on n and m) remains a question. It is not known if for a
certain dimension of the state vector and for a certain dimension of the control inputs
vector such a finite boundary exists. In the following it will be noted that a dynamical
system is r -flat if it admits a flat output depending up to the r th order derivative of
2.5 Classification of Types of Differentially Flat Systems 83

the control input. Equivalently, in a 0-flat system its flat output depends exclusively
on the elements of the system’s state vector.
The next example shows that such an upper bound should depend, in the best
case, linearly to the dimension of the state vector. Consider the dynamical system
(a1 ) (a2 )
x1 = u 1 x1 = u 2 ẋ3 = u 1 u 2 (2.181)

The flat output is taken to be


α1 i (α1 −i) u (i−1) ,
y1 = x3 + i=1 (−1) x 1 2 y2 = x2 (2.182)

This system is r -flat, with r = min(α1 , α2 ) − 1. There is no flat output depending


on the derivatives of u which has an order equal or less than r − 1.

2.5.1.2 Systems Which Can Be Linearized Static and Dynamic State


Feedback

It has been shown that dynamical systems which can be linearized with static state
feedback can be also transformed to the linear canonical (Brunovsky) form. Thus,
such systems are differentially flat, with the flat outputs to be exclusively functions
of the state vector x (0-flat system). It is noted that a differentially flat system is
not always a system which can be linearized with static state feedback. There exist
systems which can be linearized through dynamic feedback linearization, that is their
state vector is extended by including as additional state variables the control inputs
and their derivatives (see previous examples on the linearization of the VTOL and
the hovercraft model, given in Sect. 2.2.2). Such systems can be also written in the
linear canonical form, and thus are also differentially flat.

2.5.1.3 Systems with Only One Control Input

Single-input dynamical systems, that is

ẋ = f (x, u) x ∈ R n , u ∈ R (2.183)

can be linearized with static state feedback linearization and can be finally written
in the linear canonical form. Such systems are differentially flat.

2.5.1.4 Systems Affine-in-the-Input of Codimension 1

A system of the form


n−1
ẋ = f 0 (x) + g j (x)u j x ∈ R n (2.184)
j=1
84 2 Differential Flatness Theory and Flatness-Based Control

that is systems in which the number of control inputs is by one less than the dimen-
sion of the system’s state vector, are 0-flat, as long as they are controllable (strongly
accessible in x). The problem becomes more complicated when the system is not an
affine-in-the-input one. However, the latter systems can be finally transformed into
affine-in-the-input ones too.

2.5.1.5 Systems Without Drift Term


m
These are systems of the form ẋ = i=1 f i (x)u i . Within this class of systems, one
can distinguish several cases. The following theorem holds [340]

Theorem 1: Systems without drift and with two control inputs

ẋ = f 1 (x)u 1 + f 2 (x)u 2 (2.185)

are flat if and only if, the generic rank of E k is equal to k + 2, for k = 0, . . . , n − 2,
where E 0 = { f 1 , f 2 } and E k+1 = {E k , [E k , E k ]}, k > 0. A dynamical system
without drift and with two control inputs is always 0-flat. Such a system can be
written in the chained form (which is a precursor of the linear canonical form),
through static state feedback and a change of variables. For example, for a system
of the form
ẋ1 = u 1 ẋ2 = u 2 ẋ3 = x2 u 1 · · · ẋn = xn−1 u 1 (2.186)

is a differentially flat one and the flat output is y = (x1 , xn ).

2.5.1.6 Systems in Triangular Form

The state-space description of systems in triangular form is as follows:

ẋ1 = f 1 (x1 ) + g1 (x1 )x2


ẋ2 = f 2 (x1 , x2 ) + g2 (x1 , x2 )x3
ẋ3 = f 3 (x1 , x2 , x3 ) + g3 (x1 , x2 , x3 )x4
···
(2.187)
ẋi = f i (x1 , x2 , . . . , xi ) + gi (x1 , x2 , . . . , xi )xi+1
···
ẋn−1 = f n−1 (x1 , x2 , . . . , xn−1 ) + gn−1 (x1 , x2 , . . . , xn−1 )xn
ẋn = f n (x1 , x2 , . . . , xn ) + gn (x1 , x2 , . . . , xn )u

The flat output for such systems is y = x1 .


2.5 Classification of Types of Differentially Flat Systems 85

Theorem 2: Driftless systems with a state vector of dimension n and n − 2 control


inputs. The system of the form
n−2
ẋ = f i (x)u i (2.188)
i=1

is a differentially flat one if it is controllable (strongly accessible for almost all x).
More precisely, such a system is 0-flat is n is an odd number and is a 1-flat one if n
is an even number.

2.5.2 A Sufficient Condition for Showing


that a System Is Not Differentially Flat

The following theorem provides a sufficient condition for showing that dynamical
systems are not differentially flat [340]:

Theorem: The criterion of the regulated variety. Assume that the dynamical system
ẋ = f (x, u) is a differentially flat one. Then, the projection to the p-dimensional
space of its state-space equation p = f (x, u) is a subvariety regulated for all x.

This criterion signifies that the elimination of the control input u from the n
equations ẋ = f (x, u) leads to n − m equations of the form F(x, ẋ) = 0 with the
following property: For all (x, p) such that F(x, p) = 0 there exists α ∈ R n , α = 0
such that
∀λ ∈ R F(x, p + λa) = 0 (2.189)

Proof : Consider (x̄, ū, p̄) such that p̄ = f (x̄, ū). Generally, f is of the order m =
dim(u) with respect to u. If x is removed from the state-space description then one
arrives at n−m equations which are based exclusively on x and p, that is F(x, p) = 0.
Thus one has the constraint about the trajectory around (x̄, ū) : F(x, ẋ) = 0. If the
system is differentially flat it holds that

x = φ(y, ẏ, . . . , y (q) ) (2.190)

˙ . . . , ȳ (q) ) such that x̄ =


where variable y is the flat output. Thus, there exists ( ȳ, ȳ,
˙ (q)
φ( ȳ, ȳ, . . . , ȳ ). Then, the following identity holds

˙ . . . , ȳ (q) ), φ y ẏ + φ ẏ ÿ + · · · + φ y (q) y (q+1) ) = 0


F(φ( ȳ, ȳ, (2.191)
86 2 Differential Flatness Theory and Flatness-Based Control

Taking now that the derivatives of function y at t = 0 up to order q are given by


y (r ) (0) = ȳ (r ) r = 0, . . . , q and y α (0) = ȳ q + ξ where ξ is an arbitrary vector in
R n , one has the following identity for all ξ ∈ R n

F(x̄, x̄ + φ y α ξ ) = 0 (2.192)

(q) ˙ . . . , ȳ (q) . From the point (x̄, p̄) of F(x, p) = 0


with φ y to be evaluated at ȳ, ȳ,
passes the affine space which is parallel to the image of φ y (q) , that is a space of
dimension at most equal to m and at least equal to 1.
Therefore by showing that there does not exist any flat output with derivatives
which are not coupled in the sense of an ODE (or equivalently it can be said that
there does not exist a flat output being differentially independent), one can prove
that a dynamical system is not differentially flat. This result is particularly simple.
It stands, however, for an efficient method to show that certain multi-input systems
are not differentially flat.
Example 1: The system

ẋ1 = u 1 , ẋ2 = u 2 , ẋ3 = (u 1 )2 + (u 2 )3 (2.193)

is not a differentially flat one. This is because the subvariety p3 = p12 + p23 is not a
regulated one. There does not exist an α ∈ R 3 , α = 0 such that

∀λ ∈ R p3 + λα3 = ( p1 + λα1 )2 + ( p2 + λα2 )3 (2.194)

Actually, the cubic term implies that α2 = 0 and the quadratic term implies that
α1 = 0 and thus one has α3 = 0.

2.5.3 Liouvillian and Nondifferentially Flat Systems

There are some nonflat systems which do not satisfy differential flatness properties.
Such systems cannot be linearized by state feedback (neither by static feedback
linearization nor by dynamic feedback linearization). For such cases, the notion
of Liouvillian systems has been introduced, which can be seen as an extension of
differentially flat systems.
Nonflat systems are algebraically characterized by an integer called the defect.
This integer is well defined by introducing the notion of maximal linearizing output.
Using an informal definition, a set of variables y = (y1 , . . . , ym ) is a maximal
linearizing output if the number of system variables which can be expressed as a
differential function of y is maximal. Therefore, the maximal linearizing output
characterizes the largest subsystem which satisfies the differential flatness property.
This largest subsystem is called a flat subsystem.
2.5 Classification of Types of Differentially Flat Systems 87

The defect represents the number of the system’s variables which do not belong
to the flat subsystem. A nonlinear system is said to be Liouvillian or integrable by
quadratures if the elements which do not belong to the flat subsystem can be obtained
by elementary integrations of the elements of the flat subsystem. In the following
examples, the notion of integrability by quadratures and that of Liouvillian systems
is explained [340]

Example 1:

ẋ1 = x2 + x32 , ẋ2 = x3 , ẋ3 = u (2.195)

This system is not linearizable by static or dynamic state feedback. The system is of
defect equal to 1 and is found to be Liouvillian (there is a state variable which does
not belong to the flat subsystem). A maximum linearizing output is given by y = x2
and x1 is the only variable that does not belong
 to the flat subsystem. However, x1
can be obtained from the integration x1 = y + ẏ 2 , that is x1 is given by a pure
integral of a differential function of y.

Example 2: The following dynamic model is considered

ẋ1 = u 1 , ẋ2 = u 2 , ẋ3 = x1 u 2 − x2 u 1 , ẋ4 = x3 u 1 ẋ5 = x3 u 2 (2.196)

This system is nilpotent and completely controllable since it is driftless and sat-
isfies the Lie algebra rank condition. However, the system is not flat and can-
not be transformed into the canonical form. Nevertheless, there is a subsystem
within it defined by the first four equations, which is differentially flat and con-
sequently the system’s defect is equal to 1. The maximal linearizing output of
the system is given by y = (y1 , y2 ), where y1 = x1 and y2 = (zx1 − x4 )/3,
with z to be defined by z = (x1 x2 − x3 )/2. Indeed z = ẏ2 / ẏ1 , thus x4 =
y1 z − 3y2 = α(y1 , ẏ1 , y2 , ẏ2 ), x3 = ẋ4 / ẏ1 = b(y1 , ẏ1 , ÿ1 , y2 , ẏ2 , ÿ2 ), x2 =
(2z + x3 )/y1 = c(y1 , ẏ1 , ÿ1 , y2 , ẏ2 , ÿ2 ), u 2 = ẋ2 = q(y1 , . . . , y1(3) , y2 , . . . , y2(3) ).
  (3)
Since x5 = x3 u 2 = b(y1 , . . . , ÿ2 )q(y1 , . . . , y2 ) one gets that the above system
of Eq. (2.196) is a Liouvillian one.

2.6 Elaborated Criteria for Checking Differential Flatness

2.6.1 Implicit Control Systems on Manifolds of Jets

Up to now the Lie-Backlünd approach to equivalence and flatness of nonlinear


dynamical systems has been used. The Lie-Backlünd approach states that a sys-
tem is differentially flat if and only if it is equivalent to (it can be transformed to)
the trivial system, that is to a system in the linear canonical Brunovsky form. There
88 2 Differential Flatness Theory and Flatness-Based Control

are elaborated criteria that enable to determine if a system is differential flat [286].
These state that flatness is equivalent to the property of strong closedness of the ideal
1-form representing the differentials of all possible trivializations.
For a nonlinear dynamical system ẋ = f (x, u) (that is a system in the explicit
form) which is described by a set of ordinary differential equations, its implicit
description is obtained after eliminating the control input from the state-space model.
This takes the form:
F(x, ẋ) = 0 (2.197)

Next, a manifold description is introduced. Considering the solutions of Eq. (2.197)


the infinite dimensional manifold is considered: X = X × R∞ n or equivalently X =

X × R × R · · · R . It is assumed that the infinite set of global coordinates X is


n n n

given by

X = (x1 , . . . , xn , ẋ1 , . . . , ẋn , ẍ1 , . . . , ẍn , . . . , x1(k) , . . . , xn(k) ) (2.198)

Moreover, the so-called Cartan vector field is defined


n  ( j+1) ∂
τX = x ( j)
(2.199)
i=1 j≥0 i ∂ xi

while also the Lie derivative of function φ ∈ C ∞ (X, R) along vector field τX is
introduced
dφ n  ( j+1) ∂φ
= L τX φ = x ( j)
(2.200)
dt i=1 j≥0 i ∂x i

( j) ( j) ( j) ( j+1)
Since it holds that dtd
xi = L τX xi = ẋi = xi , the Cartan vector field acts
on coordinates as a shift to the right. Variable (X, τX ), comprising the state vector
of the nonlinear system and its successive derivatives with respect to time, as well
as the Lie derivatives of the mapping transformation function φ along a vector field
defined by the state vector elements and their derivatives is called manifold of jets of
infinite order or diffiety.
Thus, in regular implicit control systems, one has no longer the description of the
system in the state-space form but uses a description based on the state vector and
its derivatives, as well as the derivatives of the mapping φ. Next, the definition of a
regular implicit control system is given:
Definition: A regular implicit control system is defined as a triple (X, τX , F) with
X = X × R∞ n , τ is the trivial Cartan field on X and F ∈ C ∞ (TX; R n−m ), satisfying
X
∂F
rank( ∂ x = n − m) in a suitable open dense subset of TX.
2.6 Elaborated Criteria for Checking Differential Flatness 89

2.6.2 The Lie-Backlünd Equivalence for Implicit Systems

The notion of the Lie-Backlünd equivalence for explicit control systems is now
extended to implicit control systems (systems described by manifolds of jets or
diffieties). Two regular implicit control systems are defined [286].
Definition 1: Let X, τX , F and Y, τY , G be two regular implicit systems. These are
Lie-Backlünd equivalent at (x̄0 , ȳ0 ) ∈ X0 × Y0 if and only if
(i) There exist neighborhoods X0 of x̄0 ∈ X0 and ȳ0 ∈ Y0 and a one-to-one map-
ping Φ = (φ0 , φ1 , . . .) ∈ C ∞ (Y0 ; X 0 ) with C ∞ (Y0 ; X 0 ) inverse Ψ , satisfying
Φ( ȳ0 ) = x̄0 and such that the restrictions of the trivial Cartan fields τY|y0 are
Φ-related, namely Φ ∗ τY|y0 = τX|x0
(ii) The C ∞ (Y0 |X0 ) inverse mapping Ψ = (ψ0 , ψ1 , . . .) is such that Ψ (x̄0 ) = ȳ0
and Ψ ∗ τX|x0 = τY|y0 .
The mappings Φ and Ψ are called mutually inverse Lie-Backlünd isomorphisms at
(x0 , y0 ).
It holds that two explicit control systems are Lie-Backlünd equivalent if and
only if the associated implicit control systems are Lie-Backlünd equivalent. This is
analytically stated as follows:
Two implicit systems (X, τX , F) and (Y, τY , G) are given and two vector fields f
and g compatible with (X, τX , F) and Y, τY , G, respectively are defined. The corre-
sponding explicit systems ẋ = f (x, u) and ẏ = g(y, v) are differentially equivalent
or Lie-Backlünd equivalent at the pair (x0 , u 0 , u̇ 0 ), . . . , and (y0 , v0 , v̇0 ), . . . (with u 0
such that ẋ0 = f (x0 , u 0 ) and v0 such that ẏ0 = g(x0 , v0 )), if and only if (X, τX , F)
and (Y, τY , G) are Lie-Backlünd equivalent in accordance to the previous Definition
1, at (x0 , ẋ0 , . . .) and (y0 , ẏ0 , . . .).
Next, it is pointed out once more that an explicit system is flat, if and only if, it
is equivalent to the trivial system (linear canonical Brunovsky form). This enables
to define also necessary and sufficient condition for implicit systems to be differen-
tially flat.
Definition 2: The implicit system (X, τX , F) is flat at x̄0 if and only if there exists
y0 ∈ R∞ m , such that (X, τ , F) is Lie-Backlünd equivalent at ( x̄ , ȳ ) ∈ X × R n
X 0 0 0 ∞
to the m-dimensional trivial implicit system (R∞m , τ , 0). In this case, the mutually
m
inverse Lie-Backlünd isomorphisms Φ and Ψ are called inverse trivializations.
Having denoted the implicit system as F(x, ẋ), its differential can be defined next

n  
∂ Fi ∂ Fi
dF = dx j + d ẋ j i = 1, . . . , n − m (2.201)
j=1 ∂x j ∂ ẋ j

Moreover, one defines the smooth mapping Φ of the 1-form (vector) ω to X as


follows:
  ∂φi
j
(l)
Φ ∗ ω( ȳ) = ωij (Φ(ψ̄)) (l) (ψ̄)dyk (2.202)
k,i i, j ∂ yk
90 2 Differential Flatness Theory and Flatness-Based Control

j ( j)
where it holds that φi (ψ̄) = xi . Then the following theorem holds about the
differential flatness of the implicit system
Theorem: The implicit system (X, τX , F) is flat at x̄0 , with x̄0 ∈ X0 if and only if
there exists ȳ0 ∈ R∞ m and a local Lie-Backlünd isomorphism Φ from R m to X
∞ 0
satisfying Φ( ȳ0 ) = x̄0 and such that Φ ∗ · dF = 0.

2.6.3 Conditions for Differential Flatness of Implicit Systems

To formulate necessary and sufficient conditions for the differential flatness of


implicit systems some preliminary definitions on polynomial matrices are used.
The following polynomial matrices are introduced where the indeterminate is the
d
differential operator dt

∂F ∂F d or d(φ 0 ) ∂φ 0 d j
P(F) = ∂x + ∂ ẋ dt P(φ 0 ) = j=0 ∂ y ( j) dt j
(2.203)

with P(F) (respectively P(φ 0 )) to be of size (n − m) × n (respectively n × m).


Next, the following theorem about the Smith decomposition (or diagonal reduction)
of matrices is given [286]:
Theorem: Given a matrix M ∈ M p,q [ dt d
] (the module of p × q matrices over [ dt
d
]),
there exist matrices V ∈ U p [ dt ], such that
d

 p , 0 p,q−p ) if p ≤ q
VMU = (Δ
Δq (2.204)
VMU = if p > q
0 p−q,q

where 0 p,q− p (respectively 0 p−q,q ) is the q × (q − p) (respectively ( p − q) × q)


matrix with entries that are all zeros, and with Δ p a p × p (respectively Δq a q × q)
diagonal matrix with elements δ1 , . . . , δσ , 0, . . . , 0 are such that δi is a nonzero dt
d

polynomial for i = 1, . . . , σ and is divisor of δ j for all for all σ ≥ j ≥ i. Moreover,


Δ p (respectively Δq ) is unique up to multiplication by a regular diagonal matrix in
 p× p (respectively q×q ).
Since matrix P(F) of the differential description P(F) ∈ Mn−m,n [ dt d
] of the
implicit system admits the Smith decomposition, it can be written as

VP(F)U = (Δ, 0n−m,m ) (2.205)

Moreover, the definition of hyper-regular matrices is given:


Definition: Given a matrix M ∈ M p,q [ dt
d
], it is said that M is hyper-regular if and
only if its Smith decomposition gives (Δ p , 0 p,q− p ) = (I p , 0 p,q− p ) if p ≤ q and
2.6 Elaborated Criteria for Checking Differential Flatness 91
   
Δq Iq
= if p ≥ q (2.206)
0 p−q,q 0 p−q,q

Other definitions associated with the Smith decomposition of the differential matrix
P(F) of the implicit system F(x, ẋ) are as follows:
It holds that VP(F)U = (Δ, 0n−m,m ) and matrix U is denoted as R-Smith(P(F)).
Next one denotes  
0
Û = U n−m,m (2.207)
Im

Moreover, there exists matrix Q 0 defined as


 
0m,n−m Im
Q0 = U −1 ∈ L − Smith(Û ) (2.208)
In−m 0n−m,m

and the associated matrices which satisfy


 
Q̃ 0 = Im 0m,n−m (2.209)

Q̂ 0 = (0n−m,m , In−m )Q 0 (2.210)

Next, it is considered that U is the right matrix in the Smith decomposition of the
implicit system’s differential matrix P(F), that is U ∈ R − Smith(P(F)). Then the
following m-dimensional vector 1-form ω is defined
⎛ ⎞ ⎛  ⎞
n j α
ω1 (x̄) j=1 α≥0 Q 1,a ( x̄)d x j |X0
⎜ ⎟
ω(x̄) = ⎝ · · · ⎠ = Q̃ 0 d x|X0 = ⎝ ··· ⎠ (2.211)
n 
ωm (x̄) j=1 α≥0 Q
j
m,a ( x̄)d x α|
X0 j

Using the above one arrives at a criterion for defining flat outputs.
Definition: Variational flat outputs. The vector 1-form ω = Q̃ 0 d x|X0 , defined in
Eq. (2.211), using matrices Q 0 and Q̃ 0 defined in Eqs. (2.229) and (2.210), respec-
tively, is a flat output of the variational system.
The following relations are defined next:
Definition: It is said that the [ dt
d
]-ideal T generated by τ1 , . . . , τΓ is strongly closed,
if there exists a matrix M ∈ Um [ dτ d
] such that d(Mτ ) = 0.
Theorem: A necessary and sufficient condition for systems X, τX , F to be flat at
(x̄0 , ȳ0 ) (over the class of meromorphic functions) is that there exist U ∈ R −
Smith(P(F)) and Q ∈ L = Smith(Û ), with Û to be given by
 
0n−m.m
Û = U (2.212)
Im
92 2 Differential Flatness Theory and Flatness-Based Control

such that the [ dt


d
]-ideal Ω which is generated by the 1-forms ω1 , . . . , ωm defined
in Eq. (2.211) to be strongly closed in X0 .
The following operator is defined

D(H )κ = d(H κ) − H dκ (2.213)

for all m-dimensional vector p-form κ in Λ p (( X ))m , all p ≥ 1 and all H ∈ Um [ dt


d
].
Then, the following theorem holds [286]:
Theorem: The [ dt d
]-ideal Ω generated by the components of the vector 1-form ω
defined in Eq. (2.211) is strongly closed in X0 , or equivalently the system (X, τX , F)
is flat, if and only if, there exists μ ∈ L 1 (Λ(( X ))m ) and a matrix M ∈ Um [ dt
d
] such
that
dω = μω D(μ) = μ2 D(M) = −Mμ (2.214)

The condition given in Eq. (2.214) may be seen as a generalization in the framework
of manifolds of jets of infinite order of the well-known moving frame structure
equations. Furthermore, the general matrix solution μ = (μik )i,k=1,...,m of dω = μω,
with ω defined in Eq. (2.211) is given by

m or d(μ) j,k j,k (α) dβ


μik = (Γi,α,β + vi,α,β )ω j ∧ (2.215)
j=1 α,β=0 dτ β
with
 j,k k, j
vi,α,β = vi,α,β ∀i, j, k = 1, . . . , m ∀α, β = 0, . . . , or d(μ), α = β or j = k
k,k
vi,α,α arbitrary ∀i, k = 1, . . . , m ∀α = 0 · · · or d(μ)
(2.216)

the integer ord(μ) being arbitrary but otherwise finite and satisfying or d(μ) ≥
j,k
or d(Γ ), the Γi,α,β being given by the following relation

or d(Γ ) m j,k (α) (β)


dωi = Γ ω ∧ ωk (2.217)
α,β=0 j,k=1 i,α,β j

j,k
and where vi,α,β ’s are meromorphic functions depending on successive derivatives
of x.
Moreover, the following hold:
The [ dt
d
]-ideal Ω generated by the components of the vector 1-form ω defined
in Eq. (2.211) is strongly closed in X0 , or equivalently the system (X, τX , F) is flat,
if and only if, there exists μ ∈ L 1 (Λ(X)m ), and two matrices M ∈ Mm,m [ dt d
] and
N ∈ Mm,m [ dt ], such that
d

dω = μω, D(μ) = μ2 , D(M) = −Mμ, D(N ) = μN , MN = NM = I (2.218)


2.6 Elaborated Criteria for Checking Differential Flatness 93

The procedure for testing if a system is differentially flat and for computing the
associated flat outputs is:
1. Write the system in the implicit form F(x, ẋ) by eliminating the control input
from its state-space equations.
2. Compute the differential matrix of the system P(F).
3. Perform Smith decomposition of P(F) and retain the R-Smith matrix U .
4. Compute matrix Û from Eq. (2.228).
5. Compute matrices Q 0 and Q̃ 0 from Eqs. (2.210) and (2.231), respectively.
6. Compute the vector 1-form that is described in Eq. (2.211). The elements of the
ω vector are the flat outputs of the system.
If for some or d(μ), the algorithm produces an invertible M, a flat output is obtained
by integration of dy = Mω, which is possible since d(Mω) = 0. In the opposite
case, the system is not differentially flat.

2.6.4 Example of Elaborated Differential Flatness Criteria


to Nonlinear Systems

An example is given next, about the application of elaborated differential flatness


criteria for implicit systems.
The unicycle robot: The kinematic model of the unicycle robot is considered [286]:

ẋ = vcos(θ )
ẏ = vsin(θ ) (2.219)
θ̇ = vl tan(φ)

The system is written in implicit form F(x, ẋ) = 0. It has n = 3 states and m = 2
inputs, with n − m = 1 and thus it is equivalent to a single implicit equation which
is obtained
F(x, y, θ, ẋ, ẏ, θ̇ ) = ẋsin(θ ) − ẏcos(θ ) = 0 (2.220)

Next, one computes


 
∂F ∂F d ∂F ∂F d ∂F ∂F d
P(F) = ∂x + ∂ ẋ dt ∂ y + ∂ ẏ dt ∂θ + ∂ θ̇ dt

(2.221)
 
P(F) = sin(θ ) dt
d
, −cos(θ ) dt
d
, ẋcos(θ ) + ψ̇sin(θ )

Setting E = ẋcos(θ ) + ẏsin(θ ) one applied the Smith decomposition algorithm to


vector P. The Smith decomposition (or diagonal reduction) of a polynomial matrix
is as follows:
94 2 Differential Flatness Theory and Flatness-Based Control

Given a μ× polynomial matrix A over the noncumulative ring [ dt d


], there
exist matrices V ∈ Uμ [ dt ] and U ∈ U [ dt ], such that V AU = (Δ, 0) if μ ≥
d d

where Δ is a μ × μ (respectively × ) diagonal matrix, with diagonal elements


δ1 , . . . , δn ,0, . . . , 0 such that δi is a nonzero dt
d
-polynomial for i = 1, . . . , σ and is
divisor of δ j for all σ ≥ j ≥ 1.
 
δ
V AU = (2.222)
0

if μ ≥ , where Δ is a μ × μ (respectively × ) diagonal matrix, whose diagonal


elements δ1 , . . . , δn ,0, . . . , 0 are such that δi is a nonzero dt
d
polynomial
Moving the last column (of degree zero) to the first place by permutation with the
two others one gets
 
P(F)U0 = E, −cos(θ ) dt
d
, sin(θ ) dt
d
(2.223)

with ⎛ ⎞
001
U0 = ⎝0 1 0⎠ (2.224)
100

and next by right-multiplying P(F)U0 with U1 where


⎛1 cos(θ) d

E E dt − sin(θ)
E dt
d

U1 = ⎝ 0 1 0 ⎠ (2.225)
0 0 1

finally gives  
P(F)U = 1 0 0 (2.226)

with matrix U to be computed by


⎛ ⎞
0 0 1
U = U0 U1 = ⎝ 0 1 0 ⎠ (2.227)
1 cos(θ) d
E E dt − sin(θ)
E dt
d

It also holds that vector P(F) is hyper-regular and that


⎛ ⎞
  0 1
01,2
Û = U =⎝ 1 0 ⎠ (2.228)
I2 cos(θ)
E
d
dt − sin(θ)
E dt
d
2.6 Elaborated Criteria for Checking Differential Flatness 95

with I2 being the identity matrix in R 2 . Next by defining matrix Q 0 as


 
0m,n−m Im
Q0 = U −1 ∈ L − Smith(Û ) (2.229)
In=m 0n−m,m

and matrices Q̃ 0 , Q̂ 0 as  
Q̃ 0 = Im 0m,n−m Q 0 (2.230)
 
Q̂ 0 = 0n−m In−m Q 0 (2.231)

one has ⎛ ⎞
0 1 0
Q0 = ⎝ 1 0 0⎠ (2.232)
sin(θ) d
L dt − cos(θ)
L dt
d
1
 
010
Q̃ 0 = (2.233)
100

Multiplying Q 0 by the vector d X = [d x, dy, dθ ]T the last line of this product


becomes

Q0d X = E (sin(θ )d ẋ − cos(θ )d ψ̇ + ( ẋcos(θ ) + ψ̇sin(θ )dθ ))


1

Q 0 d X = E1 d(ẋsin(θ ) − ẏcos(θ )) ⇒ (2.234)
Q0d X = 0

which comes from using Eq. (2.220) about the implicit system dynamics. Next matrix
Q̃ 0 is defined as
Q̃ 0 = (Im , 0m,n−m )Q 0 (2.235)

and by multiplying Q̃ 0 with vector d X = [d x, dy, dθ ]T one gets


⎛ ⎞
dx  
ω1
Q̃ 0 ⎝dy ⎠ = (2.236)
ω2

which finally gives ω1 = dy and ω2 = d x. Thus, the ideal Ω that is generated by


Ω1 , Ω2 is trivially strongly closed with M = I2 . Consequently, one finally concludes
that the flat output of the system is y1 = y and y2 = x.
96 2 Differential Flatness Theory and Flatness-Based Control

2.7 Distributed Parameter Systems and Their


Transformation into the Canonical Form

Up to now the analysis on differential flatness properties was focused on lumped


parameter systems, that is systems described by ordinary differential equations. By
applying differential flatness theory it is also possible to transform into the canonical
form distributed parameter systems which are described by nonlinear partial differ-
ential equations of the parabolic, elliptic and hyperbolic type. This is particularly
significant for developing efficient nonlinear control and filtering methods for such
a type of systems. To demonstrate this, the model of nonlinear heat diffusion PDE
will be used as an example.

2.7.1 State-Space Description of a Heat Diffusion Dynamics

The following nonlinear heat diffusion equation is considered, describing the spa-
tiotemporal variations of temperature in a surface

∂φ ∂ 2φ
= K 2 + f (φ) + u(x, t) (2.237)
∂t ∂x
Using the approximation for the partial derivative in the partial differential equation
given in Eq. (12.38) one has

∂ 2φ φi+1 − 2φi + φi−1


= (2.238)
∂x2 Δx 2
and considering spatial measurements of variable φ along axis x at points x0 +
iΔx, i = 1, 2, . . . , N one has

∂φi K 2K K
= φi+1 − φi + φi−1 + f (φi ) + u(xi , t) (2.239)
∂t Δx 2 Δx 2 Δx 2
By considering the associated samples of φ given by φ0 , φ1 , . . . , φ N , φ N +1 one has

∂φ1
∂t = K
φ
Δx 2 2
− 2K
φ
+ Δx
Δx 2 1
K
2 φ0 + f (φ1 ) + u(x 1 , t)
∂φ2
∂t = K
φ
Δx 2 3
− 2K
φ
+ Δx 2 φ1 + f (φ2 ) + u(x2 , t)
Δx 2 2
K
∂φ3
∂t = K
φ
Δx 2 4
− 2K
φ
+ Δx
Δx 2 3
K
2 φ2 + f (φ3 ) + u(x 3 , t)
(2.240)
···
∂φ N −1
∂t = Δx
K
2 φ N − Δx 2 φ N −1 + Δx 2 φ N −2 + f (φ N −1 ) + u(x N −1 , t)
2K K
∂φ N
∂t = Δx 2 φ N +1 − Δx 2 φ N + Δx 2 φ N −1 + f (φ N ) + u(x N , t)
K 2K K
2.7 Distributed Parameter Systems and Their Transformation … 97

By defining the following state vector


 
x T = φ1 , φ2 , . . . , φ N (2.241)

one obtains the state-space description

ẋ1 = K
x
Δx 2 2
− 2K
x
Δx 2 1
+ ΔxK
2 φ0 + f (x 1 ) + u(x 1 )
ẋ2 = K
x
Δx 2 3
− 2K
x
Δx 2 2
+ Δx 2 x1 + f (x2 ) + u(x2 )
K

ẋ3 = K
x
Δx 2 4
− 2K
x
Δx 2 3
+ ΔxK
2 x 2 + f (x 3 ) + u(x 3 )
(2.242)
···
ẋ N −1 = Δx K
2 x N − Δx 2 x N −1 + Δx 2 x N −2 + f (x N −1 ) + u(x N −1 )
2K K

ẋ N = Δx 2 φ N +1 − Δx 2 x N + Δx
K 2K K
2 x N −1 + f (x N ) + u(x N )

Next, the following state variables are defined

y1,i = xi
(2.243)
y2,i = ẋi

and the state-space description of the system becomes as follows:

ẏ1,1 = Δx K
2 y1,2 − Δx 2 y1,1 + Δx 2 φ0 + f (y1,1 ) + u(y1,1 )
2K K

ẏ1,2 = Δx K
2 y1,3 − Δx 2 y1,2 + Δx 2 y1,1 + f (y1,2 ) + u(y1,2 )
2K K

ẏ1,3 = Δx 2 y1,4 − Δx 2 y1,3 + Δx 2 y1,2 + f (y1,3 ) + u(y1,3 )


K 2K K

···
(2.244)
···
ẏ1,N −1 = Δx 2 y1,N − Δx 2 y1,N −1 + Δx
K 2K K
2 y1,N −2 + f (y1,N −1 )
+u(y1,N −1 )
ẏ1,N = Δx K
2 φ N +1 − Δx 2 y1,N + Δx y1,N −1 + f (y1,N ) + u(y1,N )
2K K

The dynamical system described in Eq. (13.52) is a differentially flat one with flat
output defined as the vector ỹ = [y1,1 , y1,2 , . . . , y1,N ]. Indeed all state variables can
be written as functions of the flat output and its derivatives. Moreover, by defining
the new control inputs

v1 = Δx K
2 φ0 + f (y1,1 ) + u(y1,1 )
v2 = f (y1,2 ) + u(y1,2 )
v3 = f (y1,3 ) + u(y1,3 )
(2.245)
···
v N −1 = f (y1,N −1 ) + u(y1,N −1 )
v N = Δx K
2 φ N +1 + f (y1,N ) + u(y1,N )
98 2 Differential Flatness Theory and Flatness-Based Control

the following state-space description is obtained

⎛ 2K ⎞
⎛ ⎞ − Δx 2 ΔxK
2 0 0 ··· 0 0 0 0 ⎛ ⎞
ẏ1,1 ⎜ K − 2K K
0 ··· 0 0 0 0 ⎟ y1,1
⎜ ẏ1,2 ⎟ ⎜ Δx 2 Δx 2 Δx 2 ⎟⎜
⎟ ⎜ y1,2 ⎟
⎜ ⎟ ⎜ K
− Δx 2 Δx 2 · · ·
2K K ⎟
⎜ ··· ⎟ = ⎜ 0 0 0 0 0 ⎟⎜
⎟⎜ ··· ⎟ ⎟+
Δx 2
⎜ ⎟ ⎜
⎜ · · · · · · ··· ··· ··· ··· ··· ··· ··· ⎟⎝
⎝ ẏ1,N −1 ⎠ ⎜ ⎟ y1,N −1 ⎠
⎝ 0 0 0 0 ··· 0 K
− Δx
2K K ⎠
ẏ1,N Δx 2 2 Δx 2 y1,N
0 0 0 0 ··· 0 0 K
Δx 2
− Δx
2K
2

⎛ ⎞⎛ ⎞
1 0 0 ··· 0 0 v1
⎜ 0 1 0 · · · 0 0 ⎟ ⎜ v2 ⎟
⎜ ⎟⎜ ⎟
⎜ 0 0 1 · · · 0 0 ⎟ ⎜ v3 ⎟

+⎜ ⎟ ⎜ ⎟
⎟⎜ ⎟
⎜· · · · · · · · · · · · ⎟ ⎜ · · · ⎟
⎝ 0 0 0 · · · 1 0 ⎠ ⎝v N −1 ⎠
0 0 0 ··· 0 1 vN
(2.246)

Assuming that all measurements from the set of points x j j ∈ [1, 2, . . . , m] are
available, the associated observation (measurement) equation becomes
⎛ ⎞
⎛ ⎞ y1,1
⎛ ⎞ 1 0 0 ··· 0 0 ⎜
z1 ⎟
⎜ ⎟ ⎜ y1,2 ⎟
⎜ z 2 ⎟ ⎜ 0 1 0 · · · 0 0 ⎟ ⎜ y1,3 ⎟
⎜ ⎟ = ⎜· · · · · · · · · · · ·⎟ ⎜ ⎟ (2.247)
⎝ · · ·⎠ ⎜ ⎟⎜ ⎟
⎝ 0 0 0 ··· 1 0 ⎠⎜ ··· ⎟
zm ⎝ y1,N −1 ⎠
0 0 0 ··· 0 1
y1,N

Thus, in matrix form one has the following state-space description of the system

ỹ˙ = A ỹ + Bv
(2.248)
z̃ = C ỹ

Moreover, denoting a = Dx K
2 and b = − Dx 2 , the initial description of the system
2K

given in Eq. (13.54) is rewritten as follows


2.7 Distributed Parameter Systems and Their Transformation … 99
⎛ ⎞
⎛ ⎞ b a 0 0 0 ··· 0 0 0 0 0 0 ⎛ ⎞
ẏ1,1 ⎜ a b a 0 0 ··· 0 0 0 0 0 0 ⎟ y1,1
⎜ ẏ1,2 ⎟ ⎜ ⎟⎜ ⎟
⎜ ⎟ ⎜ 0 0 a b a · · · 0 0 0 0 0 0 ⎟ ⎜ y1,2 ⎟
⎜ ··· ⎟=⎜ ⎟⎜ ··· ⎟
⎜ ⎟ ⎜ ⎟⎜ ⎟
⎝ ẏ1,N −1 ⎠ ⎜· · · · · · · · · · · · · · · · · · · · ·⎟ ⎝ y1,N −1 ⎠
⎝ 0 0 0 0 0 0 0 ··· a b a 0 ⎠
ẏ1,N y1,N
0 0 0 0 0 0 0 ··· 0 0 a b
⎛ ⎞⎛ ⎞
1 0 0 ··· 0 0 v1
⎜ 0 1 0 · · · 0 0 ⎟ ⎜ v2 ⎟
⎜ ⎟⎜ ⎟
⎜ 0 0 1 · · · 0 0 ⎟ ⎜ v3 ⎟
+⎜ ⎟⎜ ⎟
⎜· · · · · · · · · · · ·⎟ ⎜ · · · ⎟ (2.249)
⎜ ⎟⎜ ⎟
⎝ 0 0 0 · · · 1 0 ⎠ ⎝v N −1 ⎠
0 0 0 ··· 0 1 vN

2.7.2 Differential Flatness of the Nonlinear


Heat Diffusion PDE

The previously defined state vector of the PDE model is considered without the effect
of the external control input u(x, t).

∂φ ∂ 2φ
= K 2 + f (φ) (2.250)
∂t ∂x

The state vector is again Ỹ = [y1,1 , y1,2 , . . . , y1, i, . . . , y1,N −1 , y1,N ], where y1,1 =
V1 , y1,2 = V2 , . . . , y1,i = Vi , . . . , y1,N −1 = VN −1 and y1,N = VN . It will be shown
in a different manner that the state-space description of the nonlinear PDE dynamics,
which has as control input only the boundary condition φ0 is a differentially flat one.
One has
2K K K
ẏ1,1 = − 2 y1,1 + φ0 + f (y1,1 ) + y1,2 (2.251)
Δx Δx 2 Δx 2
2K K K
ẏ1,2 = − y1,2 + y1,1 + f (y1,2 ) + y1,3 (2.252)
Δx 2 Δx 2 Δx 2
2K K K
ẏ1,3 = − y1,3 + y1,2 + f (y1,3 ) + y1,4 (2.253)
Δx 2 Δx 2 Δx 2
··· ···
2K K K
ẏ1,i = − y1,i + y1,i−1 + f (y1,i ) + y1,i+1 (2.254)
Δx 2 Δx 2 Δx 2
··· ···
2K K K
ẏ1,N −1 = − y1,N −1 + y1,N −2 + f (y1,N −1 ) + y1,N (2.255)
Δx 2 Δx 2 Δx 2
100 2 Differential Flatness Theory and Flatness-Based Control

2K K K
ẏ1,N = − y1,N + y1,N −1 + f (y1,N ) + φ N +1 (2.256)
Δx 2 Δx 2 Δx 2
The flat output is considered to be the state variable y1,N , which is denoted as
y = y1,N . Next, it is shown that all state variables which stand also for virtual
control inputs of the system αi = y1,N −i , can be written as functions of the flat
output y = y1,N
From Eq. (13.62) and considering that φ N +1 is constant one obtains

y1,N −1 = α1 = 1
[ ẏ
K /Δx 2 1,N
+ Δx
2K
2 y1,N − 2Δx 2 φ N +1 − f (y1,N )]
K
(2.257)
⇒y1,N −1 = h 1 (y, ẏ, · · · )

and following a similar procedure, from Eq. (13.61) one gets

y1,N −2 = α2 = 1
[ ẏ
K /Δx 2 1,N −1
+ 2K
y
Δx 2 1,N −1
− 2Δx K
2 y1,N − f (y1,N −1 )]
(2.258)
⇒y1,N −2 = h 2 (y, ẏ, · · · )

Continuing in a similar manner, from Eq. (13.60) one obtains

y1,i−1 = α N −i+1 = K /Δx


1
2 [ ẏ1,i + Δx 2 y1,i − 2Δx 2 y1,i+1 − f (y1,i )]
2K K
(2.259)
⇒y1,i−1 = h N −i+1 (y, ẏ, · · · )

From Eq. (13.59) one obtains

y1,2 = α N −2 = 1
[ ẏ
K /Δx 2 1,3
+ Δx2K
2 y1,3 − Δx 2 y1,4 − f (y1,3 )]
K
(2.260)
⇒y1,2 = h N −2 (y, ẏ, · · · )

From Eq. (13.58) one obtains

y1,1 = α N −1 = 1
[ ẏ
K /Δx 2 1,2
+ Δx2K
2 y1,2 − Δx 2 y1,3 − f (y1,2 )]
K
(2.261)
⇒y1,1 = h N −1 (y, ẏ, · · · )

Finally, From Eq. (13.57) one obtains

φ0 = α N = 1
[ ẏ
+ Δx
K /Δx 2 1,1
2K
2 y1,1 − Δx 2 y2 − f (y1,1 )]
K
(2.262)
⇒φ0 = h N (y, ẏ, · · · )

The above procedure confirms that all state variables of the model

y1,1 y1,2 y1,3 · · ·


(2.263)
y1,i · · · y1,N −1 y1,N
2.7 Distributed Parameter Systems and Their Transformation … 101

and the control input which is the boundary condition φ0 can be written as functions of
the flat output y = y1,N and of the flat output’s derivatives. Consequently, differential
flatness for the heat PDE is shown.
Additionally, one can consider decomposition of the PDE state-space equation
into submodels, where at each submodel the virtual control input is αi = y1,N −i

ẏ1,i = − Δx
2K
2 y1,i +
K
y
Δx 2 1,i−1
+ f (y1,i ) + K
y
Δx 2 1,i+1 (2.264)
··· ···

and with local flat output y1,i one can confirm that all subsystems are differentially
flat.
Chapter 3
Nonlinear Adaptive Control Based
on Differential Flatness Theory

3.1 Introduction

As explained in Chap. 2, the assumption about complete knowledge of the system’s


dynamic model does not always hold. Therefore, there is need for flatness-based
control schemes, capable of functioning efficiently under parametric model uncer-
tainty and even without any prior knowledge about the system’s dynamics. To this
end, flatness-based adaptive fuzzy control methods are developed.
First the chapter analyzes flatness-based adaptive neuro-fuzzy control for single-
input nonlinear dynamical systems. Such systems can be written in the Brunovsky
form via a transformation of their state variables and control input. The resulting
control signal is shown to contain nonlinear elements, which in case of unknown
system parameters can be approximated using neuro-fuzzy networks. Using Lya-
punov stability analysis it is shown that one can compute an adaptation law for the
neurofuzzy approximators which assures stability of the single-input control loop.
Next the chapter proposes flatness-based adaptive neuro-fuzzy control for uncer-
tain multi-input multi-output (MIMO) nonlinear dynamical systems. The considered
control scheme, based on differential flatness theory, extends the class of MIMO
systems in which indirect adaptive fuzzy control can be applied. MIMO nonlin-
ear systems satisfying the differential flatness property can be written in the linear
canonical (Brunovsky) form via a transformation of their state variables and control
inputs. The resulting control signal is shown to contain again nonlinear elements,
which in case of unknown system parameters can be calculated using neuro-fuzzy
approximators. By applying again Lyapunov stability analysis it is shown that one
can find an adaptation law for the neuro-fuzzy approximators which assures stability
of the MIMO control loop.

© Springer International Publishing Switzerland 2015 103


G.G. Rigatos, Nonlinear Control and Filtering Using Differential
Flatness Approaches, Studies in Systems, Decision and Control 25,
DOI 10.1007/978-3-319-16420-5_3
104 3 Nonlinear Adaptive Control Based on Differential Flatness Theory

3.2 Flatness-Based Adaptive Neuro-Fuzzy Control for SISO


Systems

3.2.1 Overview

As analyzed in Chap. 2, flatness-based control can be designed so as to cope effi-


ciently with model uncertainties and parametric changes in nonlinear dynamical
systems [427, 465, 495]. This chapter proposes flatness-based adaptive fuzzy con-
trol for nonlinear dynamical systems with unknown parameters. Actually, the pro-
posed flatness-based control method can work effectively even in the case of no-prior
knowledge about the system’s dynamics.
As explained in Chap. 2, all single-input systems are differentially flat and can be
transformed to the linear canonical (Brunovsky) form. After such a transformation,
the resulting control input is shown to contain nonlinear elements which depend
on the system’s parameters. If the parameters of the system are unknown, then the
nonlinear terms which appear in the control signal can be approximated with the
use of neuro-fuzzy networks. In the chapter it is shown that a suitable learning law
can be defined for the aforementioned neuro-fuzzy approximators so as to preserve
the closed-loop system stability. Lyapunov stability analysis proves also that the
proposed flatness-based adaptive fuzzy control scheme results in H∞ tracking per-
formance, in accordance with the results of [409, 410, 413].
Adaptive fuzzy control is suitable for compensation of model uncertainties and
external perturbations in nonlinear dynamical systems [7, 87, 96, 104, 168, 210,
302, 394, 407, 413, 427, 443, 504, 593]. The adaptive fuzzy control system based
on differential flatness theory extends the class of systems to which indirect adaptive
fuzzy control can be applied. Unlike other adaptive control schemes which are based
on several assumptions about the structure of the nonlinear system as well as about the
uncertainty characterizing the system’s model, the proposed adaptive fuzzy control
scheme based on differential flatness theory offers an exact solution to the design
of fuzzy controllers for unknown dynamical systems. The only requirement for the
design of the controller and for succeeding H∞ tracking performance for the control
loop is that there exists a solution for a Riccati equation associated with the linearized
error dynamics of the differentially flat model. This condition is shown to be true
for several nonlinear systems, thus providing a systematic approach to the design of
reliable controllers for such systems [426, 433].
3.3 Flatness-Based Adaptive Fuzzy Control for SISO Dynamical Systems 105

3.3 Flatness-Based Adaptive Fuzzy Control for SISO


Dynamical Systems

3.3.1 Transformation of SISO Nonlinear Systems


into a Canonical Form

A single-input differentially flat dynamical system is considered next:

ẋ = f s (x, t) + gs (x, t)(u + d̃), x ∈ R n , u ∈ R, d̃ ∈ R (3.1)

where f s (x, t), gs (x, t) are nonlinear vector fields defining the system’s dynamics,
u denotes the control input and d̃ denotes additive input disturbances. Knowing
that the system of Eq. (3.1) is differentially flat, the next step is to try to write it
into a Brunovsky form. It has been shown that, in general, transformation into the
Brunovsky (canonical) form can be succeeded for systems that admit static feedback
linearization [340]. Single input differentially flat systems, admit static feedback
linearization, and can be transformed into the Brunovksy form.
The selected flat output is denoted by y. Then, as analyzed in Sect. 3.4.2, for the
state variables xi of the system of Eq. (3.1) it holds that

xi = φi (y, ẏ, . . . , y (r −1) ), i = 1, . . . , n (3.2)

while for the control input it holds that

u = ψ(y, ẏ, . . . , y (r −1) , y (r ) ) (3.3)

Introducing the new state variables y1 = y and yi = y (i−1) , i = 2, . . . , n, the initial


system of Eq. (3.1) can be written in the Brunovsky form:
⎛ ⎞ ⎛ ⎞⎛ ⎞ ⎛ ⎞
ẏ1 0 1 0 ··· 0 y1 0
⎜ ẏ2 ⎟ ⎜ 0 0 1 · · · 0 ⎟ ⎜ y2 ⎟ ⎜ 0 ⎟
⎜ ⎟ ⎜ ⎟⎜ ⎟ ⎜ ⎟
⎜ · · · ⎟ ⎜· · · · · · · · · · · · · · ·⎟ ⎜ · · · ⎟ ⎜· · ·⎟
⎜ ⎟=⎜ ⎟⎜ ⎟ ⎜ ⎟
⎜ · · · ⎟ ⎜· · · · · · · · · · · · · · ·⎟ ⎜ · · · ⎟ + ⎜· · ·⎟ v (3.4)
⎜ ⎟ ⎜ ⎟⎜ ⎟ ⎜ ⎟
⎝ ẏn−1 ⎠ ⎝ 0 0 0 · · · 1 ⎠ ⎝ yn−1 ⎠ ⎝ 0 ⎠
ẏn 0 0 0 ··· 0 yn 1

where v = f (x, t) + g(x, t)(u + d̃) is the control input for the linearized model, and
d̃ denotes additive input disturbances. Thus one can use

y (n) = f (x, t) + g(x, t)(u + d̃) (3.5)

where f (x, t), g(x, t) are unknown nonlinear functions, while as mentioned above,
d̃ is an unknown additive disturbance. It is possible to make the system’s state vector
106 3 Nonlinear Adaptive Control Based on Differential Flatness Theory

x follow a given bounded reference trajectory xd . In the presence of model uncertain-


ties and external disturbances, denoted by wd , successful tracking of the reference
trajectory is provided by the H∞ criterion [308, 413, 524]:
T T
0 e T Qedt ≤ ρ 2 0 wd T wd dt (3.6)

where ρ is the attenuation level and corresponds to the maximum singular value of
the transfer function G(s) of the linearized model associated to Eqs. (3.4) and (3.5).
The concept of H∞ control comes from the need to compensate for the worst
type of disturbances that may affect a nonlinear dynamical system. This was initially
formulated for linear dynamics described with the use of transfer functions. The
H∞ norm of a linear system with transfer function G(s), is denoted by ||G||∞ and
is defined as ||G||∞ = supω σmax [G( jω)] where σmax is the system’s maximum
singular value [407, 410, 413]. The term sup denotes the supremum or least upper
bound of the function σmax [G( j (ω)], and thus the H∞ norm of G(s) is the maximum
value of σmax [G( j (ω)] over all frequencies ω. H∞ norm has a physically meaningful
interpretation when considering the system y(s) = G(s)u(s). When this system is
driven with a unit sinusoidal input at a specific frequency, σmax |G( jω)| is the largest
possible output for the corresponding sinusoidal input. Thus, the H∞ norm is the
largest possible amplification over all frequencies of a sinusoidal input.

3.3.2 Adaptive Control Law for SISO Nonlinear Systems

For the measurable state vector x of the system of Eqs. (3.4) and (3.5), and for
uncertain functions f (x, t) and g(x, t) an appropriate control law is
1 (n)
u= [y − fˆ(x, t) − K T e + u c ] (3.7)
ĝ(x, t) d

with e = [e, ė, ë, . . . , e(n−1) ]T and e = y − yd , K T = [kn , kn−1 , . . . , k1 ], such


that the polynomial e(n) + k1 e(n−1) + k2 e(n−2) + · · · + kn e is Hurwitz. The term u c
denotes the supervisory (supplementary) control input that is used for unmodeled
dynamics and external perturbations. The control law of Eq. (3.7) results in

e(n) = −K T e + u c + [ f (x, t) − fˆ(x, t)] + [g(x, t) − ĝ(x, t)]u + g(x, t)d̃


(3.8)

where the supervisory control term u c aims at the compensation of the approximation
error

w = [ f (x, t) − fˆ(x, t)] + [g(x, t) − ĝ(x, t)]u (3.9)


3.3 Flatness-Based Adaptive Fuzzy Control for SISO Dynamical Systems 107

as well as of the additive disturbance term d1 = g(x, t)d̃. The above relation
can be written in a state-equation form. The state vector is taken to be e T =
[e, ė, . . . , e(n−1) ], which after some operations yields

ė = (A − B K T )e + Bu c + B{[ f (x, t) − fˆ(x, t)] + [g(x, t) − ĝ(x, t)]u + d1 }


(3.10)
where
⎛ ⎞ ⎛ ⎞
0 1 0 ··· ··· 0 0
⎜ 0 0 1 ··· ··· 0 ⎟ ⎜0⎟
⎜ ⎟ ⎜ ⎟
⎜· · · · · · · · · · · · · · · · · ·⎟ ⎜· · ·⎟
A=⎜ ⎜ ⎟ ⎜ ⎟
· · · · · · · · · · · · · · · · · · ⎟ , B = ⎜· · ·⎟ (3.11)
⎜ ⎟ ⎜ ⎟
⎝ 0 0 0 ··· ··· 1 ⎠ ⎝0⎠
0 0 0 ··· ··· 0 1

and K = [kn , kn−1 , . . . , k2 , k1 ]T . This is again a canonical form for the dynamics of
the tracking error. As explained above, the control signal u c is an auxiliary control
term, used for the compensation of d̃ and w, which can be selected according to H∞
control theory:

u c = − r1 B T Pe (3.12)

3.3.3 Approximators of SISO System Unknown Dynamics

The approximation of functions f (x, t) and g(x, t) of Eq. (3.5) can be carried out
with neuro-fuzzy networks (Fig. 3.1). The estimation of f (x, t) and g(x, t) can be
written as [543, 544]:

fˆ(x|θ f ) = θ Tf φ(x), ĝ(x|θg ) = θgT φ(x), (3.13)

where φ(x) are kernel functions with elements


n
i=1 μ A (xi )
l
φ l (x) =
N n i l l = 1, 2, . . . , N (3.14)
l=1 i=1 μ A (xi )
i

It is assumed that the weights θ f and θg vary in the bounded areas Mθ f and Mθg
which are defined as

Mθ f = {θ f ∈ R h : ||θ f || ≤ m θ f },
(3.15)
Mθg = {θg ∈ R h : ||θg || ≤ m θg }
108 3 Nonlinear Adaptive Control Based on Differential Flatness Theory

Fig. 3.1 Neuro-fuzzy approximator: G i Gaussian basis function, Ni normalization unit

with m θ f and m θg positive constants. The values of θ f and θg that give optimal
approximation are:

θ ∗f = arg minθ f ∈Mθ [supx∈Ux | f (x) − fˆ(x|θ f )|]


f (3.16)
θg∗ = arg minθg ∈Mθg [supx∈Ux |g(x) − ĝ(x|θg )|]

The approximation error of f (x, t) and g(x, t) is given by

w = [ f (x, t) − fˆ(x, |θ ∗f )] + [g(x, t) − ĝ(x|θ ∗f )]u ⇒


(3.17)
w = {[ fˆ(x|θ f ) − fˆ(x|θ ∗f )] + [ f (x, t) − fˆ(x|θ f )]}+
+{[ĝ(x|θg ) − ĝ(x|θg∗ )] + [g(x, t) − ĝ(x|θg )]}u

where: (i) fˆ(x|θ ∗f ) is the approximation of f for the best estimation θ ∗f of the weights’
vector θ f , (ii) ĝ(x|θg∗ ) is the approximation of g for the best estimation θg∗ of the
weights’ vector θg .
The approximation error w can be decomposed into wa and wb , where

wa = [ fˆ(x|θ f ) − fˆ(x|θ ∗f )] + [ĝ(x|θg ) − ĝ(x|θg∗ )]u


(3.18)
wb = [ fˆ(x|θ ∗f ) − f (x, t)] + [ĝ(x|θg∗ ) − g(x, t)]u

Finally, the following two parameters are defined as

θ̃ f = θ f − θ ∗f
(3.19)
θ̃g = θg − θg∗ .

A difference between the neuro-fuzzy approximator given in Fig. 3.1 and a radial
basis functions (RBF) neural network is the normalization layer that appears between
the Gaussian basis functions layer and the weights output layer. After normalization,
3.3 Flatness-Based Adaptive Fuzzy Control for SISO Dynamical Systems 109

the sum (over the complete set of rules) of the fuzzy membership values of each
input pattern becomes equal to 1.

3.3.4 Lyapunov Stability Analysis for SISO Dynamical Systems

The adaptation law of the weights θ f and θg as well as of the supervisory control term
u c is derived by the requirement for negative derivative of the quadratic Lyapunov
function
1 T 1 T 1 T
V = e Pe + θ̃ θ̃ f + θ̃ θ̃g (3.20)
2 2γ1 f 2γ2 g

Differentiating Eq. (3.20) gives

1 T ˙ 1 T ˙
V̇ = 21 ė T Pe + 21 e T P ė + γ1 θ̃ f θ̃ f + γ2 θ̃g θ̃g ⇒ (3.21)

Next, substituting Eq. (3.17) into Eq. (3.21) gives

V̇ = 21 e T {(A − B K T )T P + P(A − B K T )}e+


+B T Pe(u c + w + d1 ) + γ11 θ̃ Tf θ̃˙ f + γ12 θ̃gT θ̃˙ g
(3.22)

Assumption 1: For given positive definite matrix Q and coefficients r and ρ there
exists a positive definite matrix P, which is the solution of the following matrix
equation:

T 2 1
(A − B K T ) P + P(A − B K T ) − PB( − 2 )B T P + Q = 0 (3.23)
r ρ

Substituting Eq. (3.23) into V̇ yields after some operations

V̇ = − 21 e T Qe + 21 e T PB( r2 − 1
ρ2
)B T Pe + B T Pe(− r1 e T PB)+
(3.24)
+B T Pe(w + d1 ) + γ11 θ̃ Tf θ̃˙ f + γ12 θ̃gT θ̃˙g

It holds that

θ̃˙ f = θ̇ f − θ˙∗f = θ̇ f
(3.25)
θ̃˙g = θ̇g − θ˙g∗ = θ̇g

The following weight adaptation laws are considered [543]:



−γ1 e T PBφ(x) i f ||θ f || < m θ f
θ̇ f = (3.26)
0 ||θ f || ≥ m θ f
110 3 Nonlinear Adaptive Control Based on Differential Flatness Theory

−γ2 e T PBφ(x)u c i f ||θg || < m θg
θ̇g = (3.27)
0 ||θg || ≥ m θg

θ̇ f and θ̇g are set to 0, when

||θ f || ≥ m θ f , ||θg || ≥ m θg . (3.28)

The update of θ f stands for a gradient algorithm on the cost function 21 ( f − fˆ)2 .
The update of θg is also of the gradient type, while u c implicitly tunes the adaptation
gain γ2 . Substituting Eqs. (3.26) and (3.27) into V̇ finally gives

V̇ = − 21 e T Qe − 1 T
2ρ 2
e PBB T Pe + e T PB(w + d1 )−
−e T PB(θ f − θ ∗f )T φ(x) − e T PB(θg − θg∗ )T φ(x)u c ⇒
(3.29)

V̇ = − 21 e T Qe − 1 T
2ρ 2
e PBB T Pe + e T PB(w + d1 ) + e T PBwα .

Denoting w1 = w + d1 + wα one gets

V̇ = − 21 e T Qe − 1 T
2ρ 2
e PBB T Pe + e T PBw1 or equivalently,
(3.30)
V̇ = − 21 e T Qe − 1 T
2ρ 2
e PBB T Pe + 21 e T PBw1 + 21 w1T B T Pe

Lemma: The following inequality holds:


1 T
2 e PBw1 + 21 w1T B T Pe − 1 T
2ρ 2
e PBB T Pe ≤ 21 ρ 2 w1T w1 (3.31)

Proof : The binomial (ρa − ρ1 b)2 ≥ 0 is considered. Expanding the left part of the
above inequality one gets

ρ2a2 + 1 2
ρ2
b − 2ab ≥ 0 ⇒ 21 ρ 2 a 2 + 2ρ1 2 b2 − ab ≥ 0 ⇒
(3.32)
ab − 1 2
2ρ 2
b ≤ 21 ρ 2 a 2 ⇒ 21 ab + 21 ab − 2ρ1 2 b2 ≤ 21 ρ 2 a 2

The following substitutions are carried out: a = w1 and b = e T PB and the previous
relation becomes
1 T
2 w1 B T Pe + 21 e T PBw1 − 1 T
2ρ 2
e PBB T Pe ≤ 21 ρ 2 w1T w1 (3.33)

The previous inequality is used in V̇ , and thus one arrives at


1 1
V̇ ≤ − e T Qe + ρ 2 w1T w1 (3.34)
2 2
3.3 Flatness-Based Adaptive Fuzzy Control for SISO Dynamical Systems 111

The attenuation coefficient ρ can be chosen such that the right part of Eq. (3.34) is
always upper bounded by 0. For instance, it suffices at any iteration of the control
algorithm to have

− 21 e T Qe + 21 ρ 2 ||w||21 ≤0⇒
− 21 ||e||2Q + 21 ρ 2 ||w||21 ≤0⇒ (3.35)
||e||2
ρ 2 ≤ ||w||Q2
1

Without knowledge of the uncertainty and disturbances term ||w||1 a sufficiently


small value of ρ can assure that the above inequality holds and thus that the control
loop stability can be assured. Actually, ρ should be given the least value that permits
to obtain a solution for the Riccati equation of Eq. (3.23).
Equation (3.34) can be used to show that the H∞ performance criterion is satisfied.
The integration of V̇ from 0 to T gives
T T T
0 V̇ (t)dt ≤ − 21 0 ||e||2 dt + 21 ρ 2 0 ||w1 ||2 dt ⇒
(3.36)
T T
2V (T ) + 0 ||e|| Q dt
2 ≤ 2V (0) + ρ 2 0 ||w1 ||2 dt

Moreover, if there exists a positive constant Mw > 0 such that


∞
0 ||w1 ||2 dt ≤ Mw (3.37)

then one gets


∞
0 ||e||2Q dt ≤ 2V (0) + ρ 2 Mw (3.38)
∞
Thus, the integral 0 ||e||2Q dt is bounded. Moreover, V (T ) is bounded and from the
definition of the Lyapunov function V in Eq. (3.20) it becomes clear that e(t) will be
also bounded since e(t) ∈ Ωe = {e|e T Pe≤2V (0) + ρ 2 Mw }.
According to the above and with the use of Barbalat’s Lemma one obtains the
asymptotic elimination of the tracking error, that is, lim t→∞ e(t) = 0 (Fig. 3.2).

3.3.5 Simulation Tests

3.3.5.1 Control of an Inverted Pendulum Model

The performance of the proposed flatness-based adaptive fuzzy controller was first
tested in the benchmark problem of cart-pole balancing. The derivation of the state
equations of the cart-pole system stems from the solution of the associated Euler-
Lagrange equation. The model presented here follows [543, 544] and considers only
the dynamics of the pole (inverted pendulum). Denoting by θ the angle of the pole
112 3 Nonlinear Adaptive Control Based on Differential Flatness Theory

Fig. 3.2 The cart-pole balancing problem

(with respect to the vertical axis), m the mass of the pole, M the mass of the cart,
and l the length of the pole, one gets

θ̈ = f (x, t) + g(x, t)u (3.39)

where the nonlinear functions f (x, t) and g(x, t) are given by


mlx22 sin(x1 )cos(x1 )−(M+m)gsin(x1 )
f (x, t) = mlcos 2 (x1 )−2l(M+m)
and
(3.40)
cos(x1 )
g(x, t) = mlcos 2 (x1 )−2l(M+m)

Setting x1 = θ and x2 = θ̇ the state equation of the cart-pole system is obtained as



ẋ1 01 x1 0
= + v (3.41)
ẋ2 00 x2 1

where v = f (x, t) + g(x, t)u + d̃. Equation (3.41) describes a system in the
Brunovksy form. The flat output is taken to be y = x1 . It can be easily proven
that all state variables of the system of Eq. (3.41) and the associated control input can
be written as functions of the flat output y and its derivatives. Indeed, it holds that

x1 = y
x2 = ẏ (3.42)
u = g(y,
1
ẏ) [ ÿ − f (y, ẏ)]
3.3 Flatness-Based Adaptive Fuzzy Control for SISO Dynamical Systems 113

The following parameter values were chosen: m = 0.1 kg, M = 1.0 kgr, l = 0.5 m.
The basis functions used in the estimation of f (x, t) and g(x, t) were μ A j (x̂) =
x̂−c j 2
e( σ ) , j = 1, . . . , 5. Since there are two inputs x1 and ẋ1 and each fuzzy input
variable consists of 5 fuzzy sets there will be 25 fuzzy rules of the form:

R l : IF x is Al1 AND ẋ is Al2 THEN fˆl is bl and



25 (3.43)
ˆl 2 μl (xi )
l=1 f
fˆ(x, t) =
i=1 Ai

25 2
l=1 i=1 μ A (xi )
l
i

(l)
The centers ci , i = 1, 2 and the variances v(l) of each rule are as follows:

(l) (l)
Rule c1 c2 v(l)
R (1) −0.3 −0.03 3
R (2) −0.3 −0.01 3
R (3) −0.3 0.00 3
R (4) −0.3 0.01 3
R (5) −0.3 0.03 3
R (6) −0.1 −0.03 3
··· ··· ··· ···
··· ··· ··· ···
R (25) 0.3 0.03 3

The estimation ĝ(x, t) was derived in a similar way. A measurable state vector was
assumed and used for the training of the neuro-fuzzy approximators. The positive
definite matrix P was found from the solution of the algebraic Riccati equation (3.23),
where Q was chosen to be a multiple of the identity matrix I2 .
Two different setpoints were studied: (i) a sinusoidal signal of amplitude 0.1 and
period T = 15 s, (ii) a seesaw setpoint of amplitude 0.15 and period T = 15 s.
At the beginning of the second half of the simulation time an additive sinusoidal
disturbance of amplitude A = 1.0 and period T = 7.5 s was applied to the system.
The approximations fˆ and ĝ were used in the control law, given by Eq. (3.7). The
position and velocity variations for the sinusoidal setpoint are depicted in Fig. 3.3a, b,
respectively.
The performance of the proposed flatness-based adaptive fuzzy control is also
tested in the tracking of a seesaw setpoint. The associated position and velocity vari-
ation are demonstrated in Fig. 3.4a, b, respectively. The control signal in the case of
tracking of a sinusoidal setpoint is shown in Fig. 3.5a, while the control signal when
tracking a seesaw setpoint is shown in Fig. 3.5b. Finally, the approximation of func-
tion g(x, t) in the case of tracking of a sinusoidal setpoint is shown in Fig. 3.6a (and
is marked as a dashed line), while when tracking a seesaw setpoint the approximated
function g(x, t) is shown in Fig. 3.6b.
114 3 Nonlinear Adaptive Control Based on Differential Flatness Theory

(a) 1.5 (b) 1

1
0.5
position x1 of the pendulum

velocity x2 of the pendulum


0.5
0

−0.5
−0.5

−1
−1

−1.5 −1.5
0 5 10 15 20 25 30 0 5 10 15 20 25 30
t (sec) t (sec)

Fig. 3.3 a Tracking of a sinusoidal position setpoint (red line) by the angle of the pendulum.
b Tracking of a sinusoidal velocity setpoint (red line) by the angular velocity of the pendulum

(a) 1.2 (b) 1.5

1
1
position x1 of the pendulum

velocity x2 of the pendulum

0.8
0.5
0.6

0.4 0

0.2 −0.5

0
−1
−0.2
−1.5
−0.4

−0.6 −2
0 5 10 15 20 25 30 0 5 10 15 20 25 30
t (sec) t (sec)

Fig. 3.4 a Tracking of a seesaw position setpoint (red line) by the angle of the pendulum. b Tracking
of a seesaw velocity setpoint (red line) by the angular velocity of the pendulum

Comparing the proposed flatness-based adaptive fuzzy control method with other
adaptive fuzzy control approaches and with the analysis on neural adaptive control
methods given in the relevant bibliography (e.g., [167, 168, 205]), the following
can be noted: (i) the transformation of the initial nonlinear system into the lin-
earized Brunovksy (canonical) form does not require the computation of partial
derivatives or Lie derivatives, (ii) there is no need to make restrictive assumptions
about the number of truncated higher order terms in the linearization of the system’s
nonlinear model or about a bounded error in the linearization of the output of the
neural/fuzzy approximators, (iii) the number of adaptable parameters involved in the
training of the neural/fuzzy approximators remains small and there is no need to use
an excessive number of neural/fuzzy approximators to produce the control signal,
3.3 Flatness-Based Adaptive Fuzzy Control for SISO Dynamical Systems 115

(a) 50 (b) 60

50
40

control signal of the pendulum


control signal of the pendulum

40

30
30

20 20

10
10

0
−10

−10 −20
0 5 10 15 20 25 30 0 5 10 15 20 25 30
t (sec) t (sec)

Fig. 3.5 a Control input of the pendulum when tracking a sinusoidal setpoint. b Control input of
the pendulum when tracking a seesaw setpoint

(a) 0 (b) 0

−0.1 −0.1
real vs estimated function g

real vs estimated function g

−0.2 −0.2

−0.3 −0.3

−0.4 −0.4

−0.5 −0.5

−0.6 −0.6

−0.7 −0.7
0 5 10 15 20 25 30 0 5 10 15 20 25 30
t (sec) t (sec)

Fig. 3.6 a Approximation of function g(x, t) of the pendulum model when tracking a sinusoidal
setpoint. b Approximation of function g(x, t) of the pendulum model when tracking a seesaw
setpoint

(iv) the tracking performance of the neuro-fuzzy control loop is evaluated with the use
of specific metrics (e.g., H∞ tracking performance), and (v) the proposed flatness-
based control method can also be extended to MIMO systems [426, 433].
It is also noted that the proposed flatness-based adaptive fuzzy control law assures
stability of the control loop and the asymptotic elimination of the tracking error.
Therefore, it can be ensured that θ̃g = θg − θg∗ →0 which means that ĝ(x)→g(x).
Provided that function g(x) does not become zero as long as x remains bounded, then
ĝ(x) will be also different from zero. For the cart-pole system described in Eqs. (3.39)
and (3.40) it holds that g(x) = 0 for x1 = θ = 0, however, for x1 ∈ (0, π ) this case is
116 3 Nonlinear Adaptive Control Based on Differential Flatness Theory

not going to occur, even if ideally there is no function approximation error and ĝ(x)
coincides with g(x). In the generic case, to assure the avoidance of singularities in
the proposed control scheme one has to exclude singularity points from the reference
trajectory that the system’s state vector has to track.
Singularities may appear not only in the proposed adaptive fuzzy control scheme
but in all control systems that are based on static feedback linearization. For exam-
ple, linearization of the system through the use of a new control input of the form
v = f (x) + g(x)u means that u = g(x)−1 [v − f (x)], which does not exclude
the appearance of singularities. Therefore, singularities do not concern only the
proposed control method but the whole class of static feedback-based linearization
schemes. Modifications, as described in Chap. 2, can be introduced in the design of
the controller to prohibit the appearance of singularities, for example, a change of
coordinates that results in a new state-space representation that does not include any
points of singularity [340].

3.4 Flatness-Based Adaptive Fuzzy Control for MIMO


Systems

3.4.1 Overview

The results of Sect. 3.2 and can be extended toward adaptive fuzzy control based on
differential flatness theory for multi-input multi-output (MIMO) nonlinear dynamical
systems. There are numerous control problems for electromechanical systems with
MIMO nonlinear dynamics. The application of geometric techniques and mainly of
the feedback linearization method has enabled advancements in this research direc-
tion [428, 434, 524, 543, 544]. These techniques can be applied to nonlinear systems,
of uncertain or unknown dynamics. Based on the universal approximation theorem,
many stable adaptive fuzzy control schemes have been developed for unknown multi-
input multi-output (MIMO) dynamical systems [89, 91, 92, 289, 301, 501, 508, 526,
527]. The capability of neuro-fuzzy controllers to compensate for model parametric
uncertainties, external disturbances, as well as for incomplete measurement of the
system’s state vector has been analyzed in several studies [14, 110, 288, 484, 523,
524]. Moreover, results on neural and fuzzy control have been presented for MIMO
dynamical systems subjected to parametric changes and external perturbations, as
well as for systems in which model uncertainty may come from the inability to mea-
sure precisely the complete state vector. [101, 164, 302, 393, 527]. To improve the
robustness of these control schemes a supervisory control term is added to the control
signal, which can take the form of sliding mode control or H∞ control [92, 96, 291].
In this chapter an approach to the design of robust controllers for MIMO nonlinear
dynamical systems of unknown dynamics will be developed according to flatness-
based control theory. This approach extends the class of nonlinear systems to which
adaptive fuzzy control can be applied.
3.4 Flatness-Based Adaptive Fuzzy Control for MIMO Systems 117

Flatness-based control is shown to be efficient for systems characterized by model


uncertainties and exogenous disturbances [189, 190]. In this chapter, the results of
Sect. 3.2 are generalized and applied to multi-input multi-output (MIMO) dynamics
systems. The chapter is concerned with differentially flat multi-input multi-output
(MIMO) dynamical systems which can be written in the Brunovksy (canonical) form.
Transformation into the Brunovksy form can be succeeded for systems that admit
static feedback linearization (i.e., a change of coordinates for both the system state
variables and the system’s control input). For such flat multi-input systems necessary
and sufficient conditions that allow an endogenous transformation into Brunovsky
coordinates will be also stated. In subsequent parts of this book the results on adaptive
fuzzy control based on differential flatness theory will be extended to MIMO systems
that admit only dynamic feedback linearization (Chaps. 6 and 10).
After transforming a MIMO system into canonical form, the resulting control
inputs are shown to contain nonlinear elements which depend on the system’s para-
meters. If the parameters of the system are unknown, the nonlinear terms that appear
in the control inputs can be approximated with the use of neuro-fuzzy networks. In
this chapter it is shown that a suitable learning law can be defined for the aforemen-
tioned neuro-fuzzy approximators so as to preserve the closed-loop MIMO system
stability. Lyapunov stability analysis proves also that the proposed flatness-based
adaptive fuzzy control scheme results in H∞ tracking performance, in accordance
to the results of [407, 408, 413, 433].

3.4.2 Differential Flatness for MIMO Nonlinear Dynamical


Systems

3.4.2.1 Conditions for Applying Differential Flatness Theory

The transformation of MIMO nonlinear systems into the canonical (Brunovsky) from,
through the application of differential flatness theory, are explained first. Next, a new
control method for such systems are developed, also in accordance with differential
flatness theory. It is shown that the proposed control and filtering methods can be
efficiently applied to the model of the nonlinear MIMO dynamical systems.
The MIMO nonlinear dynamical system can be written as a state-space model
of the form ẋ = f (x, u). Moreover, the previous state-space description can be
transformed to the form of an affine in-the-input system by adding an integrator to
each input [55, 286]. In the latter case one obtains

m
ẋ = f (x) + i=1 gi (x)u i (3.44)

The following definitions are now used [437]:


(i) Lie derivative: L f h(x) stands for the Lie derivative L f h(x) = (∇h) f and
the repeated Lie derivatives are recursively defined as L 0f h = h for i = 0,
L if h = L f L i−1 i−1
f h = ∇ L f h f for i = 1, 2, . . ..
118 3 Nonlinear Adaptive Control Based on Differential Flatness Theory

(ii) Lie Bracket: ad if g stands for a Lie Bracket which is defined recursively as
ad if g = [ f, ad i−1
f g] with ad f g = g and ad f g = [ f, g] = ∇g f − ∇fg.
0

If the system of Eq. (3.44) can be linearized by a diffeomorphism z = φ(x) and a


static state feedback u = α(x) + β(x)v in the following form:

ż i, j = z i+1, j for 1≤ j≤m and 1≤i≤v j − 1


(3.45)
ż vi, j = v j

with mj=1 v j = n, then y j = z 1, j for 1≤ j≤m are the 0-flat outputs which can be
written as functions of only the elements of the state vector x. In accordance with the
linearization criteria provided in Chap. 1, and to provide conditions for transforming
the system of Eq. (3.44) into the canonical form described in Eq. (3.45) the following
theorem has been stated [55]:
Theorem: For nonlinear systems described by Eq. (3.44) the following variables
are defined: (i) G 0 = span[g1 , . . . , gm ], (ii) G 1 = span[g1 , . . . , gm , ad f g1 , . . . ,
j
ad f gm ], . . . (k) G k = span{ad f gi for 0≤ j≤k, 1≤i≤m}. Then, the linearization
problem for the system of Eq. (3.44) can be solved if and only if: (1) The dimension
of G i , i = 1, . . . , k is constant for x ∈ X ⊆R n and for 1≤i≤n −1, (2) The dimension
of G n−1 if of order n, (3) The distribution G k is involutive for each 1≤k≤n − 2.

3.4.2.2 Transformation of the Nonlinear MIMO Dynamics


into Canonical State-Space Form

It is assumed now that after defining the flat outputs of the previous state-space
description of the nonlinear MIMO dynamics and after expressing the system’s state
variables and control inputs as functions of the flat output and of the associated
derivatives, the system can be transformed into the Brunovsky canonical form:

ẋ1 = x2
···
ẋr1 −1 = xr1

p
ẋr1 = f 1 (x) + j=1 g1 j (x)u j + d1

ẋr1 +1 = xr1 +2
··· (3.46)
ẋ p−1 = x p
p
ẋ p = f p (x) + j=1 g p j (x)u j + d p

y1 = x1
···
y p = xn−r p +1

where x = [x1 , . . . , xn ]T is the state vector of the transformed system (according to


the differential flatness formulation), u = [u 1 , . . . , u p ]T is the set of control inputs,
3.4 Flatness-Based Adaptive Fuzzy Control for MIMO Systems 119

y = [y1 , . . . , y p ]T is the output vector, f i are the drift functions and gi, j , i, j =
1, 2, . . . , p are smooth functions corresponding to the control input gains, while d j
is a variable associated to external disturbances. It holds that r1 + r2 + · · · + r p = n.
Having written the initial nonlinear system in the canonical (Brunovsky) form it
holds that
p
(r )
yi i = f i (x) + j=1 gi j (x)u j + d j (3.47)

Next, the following vectors and matrices can be defined: f (x) = [ f 1 (x), . . . ,
f n (x)]T , g(x) = [g1 (x), . . . , gn (x)]T , with gi (x) = [g1i (x), . . . , g pi (x)]T , A =
diag[A1 , . . . , A p ], and B = diag[B1 , . . . , B p ], C T = diag[C1 , . . . , C p ], d =
[d1 , . . . , d p ]T , where matrix A has the MIMO canonical form, i.e., with block-
diagonal elements
⎛ ⎞
0 1 ··· 0
⎜0 0 · · · 0 ⎟
⎜ ⎟
⎜ ⎟
Ai = ⎜ ... ... · · · ... ⎟
⎜ ⎟
⎝0 0 · · · 1 ⎠
(3.48)
0 0 · · · 0 r ×r
i i

 
BiT = 0 0 · · · 0 1 1×r
  i
Ci = 1 0 · · · 0 0 1×r
i

Thus, Eq. (3.47) can be written in state-space form

ẋ = Ax + Bv + B d̃
(3.49)
y = Cx

where the control input is written as v = f (x) + g(x)u. The system of Eqs. (3.48)
and (3.49) is in controller and observer canonical form.
The reference setpoints for the system’s outputs y1 , . . . , y p are denoted as
y1m , . . . , y pm , thus for the associated tracking errors it holds that

e1 = y1 − y1m
e2 = y2 − y2m
(3.50)
···
e p = y p − y pm

The error vector of the outputs of the transformed MIMO system is denoted as

E 1 = [e1 , . . . , e p ]T
ym = [y1m , . . . , y pm ]T
(3.51)
···
ym(r ) = [y1m
(r )
, . . . , y (r ) T
pm ]
120 3 Nonlinear Adaptive Control Based on Differential Flatness Theory

(r )
where yim denotes the r th order derivative of the ith reference output of the MIMO
dynamical system. Thus, one can also define the following vectors: (i) a vector
containing the state variables of the system and the associated derivatives, (ii) a
vector containing the reference outputs of the system and the associated derivatives
r −1 T
x = [x1 , . . . , x1r1 −1 , . . . , x p , . . . , x pp ] (3.52)

r1 −1 r −1
Ym = [y1m , . . . , y1m , . . . , y pm , . . . , y pm
p
]T (3.53)

while in a similar manner one can define a vector containing the tracking error of the
system’s outputs and the associated derivatives
r −1 T
e = Ym − x = [e1 , . . . , e1r1 −1 , . . . , e p , . . . , e pp ] (3.54)

It is assumed that matrix g(x) is a nonsingular one, i.e., g −1 (x) exists and is bounded
for all x ∈ Ux , where Ux ⊂R n is a compact set. In any case, the problem of singular-
ities in matrix g(x) can be handled by adding to ĝ(x) a small perturbation ĝ which
results in avoidance of the singularity points and which is asymptotically eliminated
by the robustness of the control loop.
The objective of the adaptive fuzzy controller, denoted as u = u(x, e|θ ) is: (i)
all the signals involved in the controller’s design are bounded and it holds that
lim t→∞ e = 0, (ii) the H∞ tracking performance criterion is succeeded for a pre-
scribed attenuation level.
As in the case of adaptive fuzzy control for single-input dynamical systems
described in Sect. 3.2, successful tracking of the reference signal is denoted by the
H∞ criterion. This has already been formulated as [413, 524]:
T T
0 e T Qedt ≤ ρ 2 0 wd T wd dt (3.55)

where ρ is the attenuation level coefficient and denotes the aggregate effect of model
uncertainty and external perturbations.

3.4.3 Flatness-Based Adaptive Fuzzy Control for MIMO


Nonlinear Systems

3.4.3.1 Control Law for MIMO Nonlinear Systems

The control signal of the MIMO nonlinear system which has been transformed into
the Brunovsky form as described by Eq. (3.49) contains the unknown nonlinear func-
tions f (x) and g(x), which can be approximated by

fˆ(x|θ f ) = Φ f (x)θ f
(3.56)
ĝ(x|θg ) = Φg (x)θg
3.4 Flatness-Based Adaptive Fuzzy Control for MIMO Systems 121

where

Φ f (x) = (ξ 1f (x), ξ 2f (x), . . . ξ nf (x))T (3.57)

with ξ if (x), ı = 1, . . . , n being the vector of kernel functions (e.g., normalized fuzzy
Gaussian membership functions), where

ξ if (x) = (φ i,1 i,2 i,N


f (x), φ f (x), . . . , φ f (x)) (3.58)

thus giving
⎛ ⎞
φ 1,1 1,2 1,N
f (x) φ f (x) · · · φ f (x)
⎜ 2,1 ⎟
⎜φ f (x) φ 2,2 2,N
f (x) · · · φ f (x)⎟

Φ f (x) = ⎜
⎜ ··· (3.59)
⎝ ··· ··· ··· ⎟ ⎠
φ n,1
f (x) φ n,2
f (x) · · · φ n,N
f (x)

while the weights vector is defined as


 
θ f T = θ 1f , θ 2f , · · · θ Nf (3.60)

j = 1, . . . , N is the number of basis functions used to approximate the components


of function f , which are denoted as i = 1, . . . , n. Thus, one obtains the relation of
Eq. (3.56), i.e. fˆ(x|θ f ) = Φ f (x)θ f .
In a similar manner, for the approximation of function g one has
 T
Φg (x) = ξg1 (x), ξg2 (x), · · · ξgN (x) (3.61)

with ξgi (x), ı = 1, . . . , N being the vector of kernel functions (e.g., normalized fuzzy
Gaussian membership functions), where
 
ξgi (x) = φgi,1 (x), φgi,2 (x), . . . , φgi,N (x) (3.62)

thus giving
⎛ ⎞
φg1,1 (x) φg1,2 (x) · · · φg1,N (x)
⎜ 2,1 2,2 2,N ⎟
⎜φ (x) φg (x) · · · φg (x)⎟
Φg (x) = ⎜ g ⎟ (3.63)
⎝ ··· ··· ··· ··· ⎠
φgn,1 (x) φgn,2 (x) · · · φgn,N (x)

while the weights vector is defined as


 p T
θg = θg1 , θg2 , . . . , θg (3.64)
122 3 Nonlinear Adaptive Control Based on Differential Flatness Theory

where the components of matrix θg are defined as


 
j
θg = θgj1 , θgj2 , · · · θgjN (3.65)

j = 1, . . . , N is the number of basis functions used to approximate the components


of function g which are denoted as i = 1, . . . , n. Thus, one obtains about matrix
θg ∈ R N × p
⎛ 1 2 p ⎞
θg1 θg1 · · · θg1
⎜ 1 2 p ⎟
⎜ θ θ · · · θg2 ⎟
θg = ⎜ g2 g2 ⎟ (3.66)
⎝··· ··· ··· ···⎠
p
θg1N θg2N · · · θg N

It holds that
⎛ ⎞ ⎛ 1 p⎞
g1 g1 g12 · · · g1
⎜ g2 ⎟ ⎜ p⎟
⎟ ⎜ g2 g22 · · · g2 ⎟
1
g=⎜
⎝ · · ·⎠ = ⎜ ⎟ (3.67)
⎝· · · · · · · · · · · ·⎠
gn p
gn1 gn2 · · · gn

Using the above, one finally has the relation of Eq. (3.56), i.e., ĝ(x|θg ) = Φg (x)θg .
If the state variables of the system are available for measurement then a state-
feedback control law can be formulated as
(r )
u = ĝ −1 (x|θg )[− fˆ(x|θ f ) + ym + K T e + u c ] (3.68)

where fˆ(x|θ f ) and ĝ(x|θg ) are fuzzy models to approximate f (x) and g(x), respec-
tively. u c is a supervisory control term, e.g., H∞ control term which is used to com-
pensate for the effects of modeling inaccuracies and external disturbances. Using the
system’s state-space description of Eq. (3.49) the control term u c is defined as

u c = − r1 B T Pe (3.69)

Moreover, K T is the feedback gain matrix that assures that the characteristic poly-
nomial of matrix A − B K T will be a Hurwitz one.

3.4.4 Flatness-Based Control for a MIMO Robotic


Manipulator

Adaptive fuzzy control for MIMO nonlinear dynamical systems with the use
of differential flatness theory will be explained through an application example.
3.4 Flatness-Based Adaptive Fuzzy Control for MIMO Systems 123

A 2-DOF rigid link robotic manipulator is considered. The dynamic model of the
robot is a differentially flat one. Indeed, it holds that

M11 M12 θ̈1 F1 (θ, θ̇ ) G 1 (θ ) T
+ + = 1 (3.70)
M21 M22 θ̈2 F2 (θ, θ̇ ) G 2 (θ ) T2

where M ∈ R 2×2 is the robot’s inertia matrix, F ∈ R 2×1 is the Coriolis and cen-
trifugal forces matrix and G ∈ R 2×1 is the gravitational effects matrix. The above
dynamic model is obtained with the use of the Euler-Lagrange method [160]. Equiv-
alently,
−1
θ̈1 M11 M12 F1 (θ, θ̇ )
=− −
θ̈2 M21 M22 F2 (θ, θ̇ )
−1 −1 (3.71)
M11 M12 G 1 (θ ) M11 M12 T1
− +
M21 M22 G 2 (θ ) M21 M22 T2

Denoting the inverse of the inertia matrix as



M11 M12 N11 N12
= (3.72)
M21 M22 N21 N22

one obtains

θ̈1 N11 N12 F1 (θ, θ̇ )
=− −
θ̈2 N21 N22 F2 (θ, θ̇ )
(3.73)
N11 N12 G 1 (θ ) N11 N12 T1
− +
N21 N22 G 2 (θ ) N21 N22 T2

which can be also written as

θ̈1 = −N11 F1 (θ, θ̇ ) − N12 F2 (θ, θ̇ )−


(3.74)
−N11 G 1 (θ ) − N12 G 2 (θ ) + N11 T1 + N12 T2

θ̈2 = −N21 F1 (θ, θ̇ ) − N22 F2 (θ, θ̇ )−


(3.75)
= N21 G 1 (θ ) − N22 G 2 (θ ) + N21 T1 + N22 T2

The following state variables are defined:

x1 = θ1 , x2 = θ̇1 , x3 = θ2 , x4 = θ̇2 (3.76)

It holds that

ẍ1 = f 1 (x) + g1 (x)u


(3.77)
ẍ3 = f 2 (x) + g2 (x)u
124 3 Nonlinear Adaptive Control Based on Differential Flatness Theory

where

f 1 (x) = −N11 F1 (θ, θ̇ ) − N12 F2 (θ, θ̇ )−


−N11 G 1 (θ ) − N12 G 2 (θ ) ∈ R 1×1

g1 (x) = [N11 N12 ] ∈ R 1×2


(3.78)
f 2 (x) = −N21 F2 (θ, θ̇ ) − N22 F2 (θ, θ̇ )−
−N21 G 1 (θ ) − N22 G 2 (θ ) ∈ R 1×1

g2 (x) = [N21 N22 ] ∈ R 2×2

The flat output is defined as

y = [θ1 , θ2 ] = [x1 , x3 ] (3.79)

It holds that

ẋ1 = x2
ẋ2 = f 1 (x) + g1 (x)u
(3.80)
ẋ3 = x4
ẋ4 = f 2 (x) + g2 (x)u

therefore, all system state variables can be written as functions of the flat output y
and its derivatives. The same holds for the control input u

x1 = [1 0]y T x2 = [1 0] ẏ T
(3.81)
x3 = [0 1]y T x4 = [0 1] ẏ T

Moreover, from Eq. (3.80) it holds that



ẍ1 f 1 (x) g1 (x)
= + u i.e.
ẍ3 f 2 (x) g2 (x)
(3.82)
−1  
g (x) ẍ1 f (x)
u= 1 − 1
g2 (x) ẍ3 f 2 (x)

Knowing that x = h(y, ẏ) one finally obtains


−1  
g1 (h(y, ẏ)) [1 0] ÿ T f 1 (h(y, ẏ))
u= − (3.83)
g2 (h(y, ẏ)) [0 1] ÿ T f 2 (h(y, ẏ))

Therefore, the considered robotic system is a differentially flat one. Next, taking
into account also the effects of additive disturbances to the joints of the robotic
manipulator the dynamic model becomes
3.4 Flatness-Based Adaptive Fuzzy Control for MIMO Systems 125

ẍ1 = f 1 (x, t) + g1 (x, t)u + d̃1


(3.84)
ẍ3 = f 2 (x, t) + g2 (x, t)u + d̃2

ẍ1 f 1 (x, t) g1 (x, t) d̃
= + u+ 1 (3.85)
ẍ3 f 2 (x, t) g2 (x, t) d̃2

The following control input is defined:


−1  d T 
ĝ (x, t) ẍ1 fˆ1 (x, t) K1 u
u= 1 · − ˆ − e + c1 (3.86)
ĝ2 (x, t) ẍ3d f 2 (x, t) K 2T u c2

where [u c1 u c2 ]T is a robust control term that is used for the compensation of the
model’s uncertainties as well as of the external disturbances and the vector of the
feedback gain is K iT = [k1i , k2i , . . . , kn−1
i , kni ].
Substituting Eq. (3.86) into Eq. (3.85) the closed-loop tracking error dynamics is
obtained
−1
ẍ1 f (x, t) g (x, t) ĝ1 (x, t)
= 1 + 1 ·
ẍ3 f 2 (x, t) g2 (x, t) ĝ2 (x, t)
   (3.87)
ẍ1d fˆ1 (x, t) K 1T u c1 d̃1
− − e + +
ẍ3d fˆ2 (x, t) K 2T u c2 d̃2

Equation (3.87) can now be written as



ẍ1 f 1 (x, t)
= +
ẍ3 f 2 (x, t)
  −1
g1 (x, t) − ĝ1 (x, t) ĝ1 (x, t) ĝ1 (x, t)
+ + · (3.88)
g2 (x, t)
− ĝ2 (x, t)  ĝ

2 (x, t)

ĝ2 (x, t)

ẍ1d fˆ (x, t) K 1T u d̃
· d − ˆ1 − e + c1 + 1
ẍ3 f 2 (x, t) K 2T u c2 d̃2

and using Eq. (3.86) this results in



ë1 f (x, t) − fˆ1 (x, t) g1 (x, t) − ĝ1 (x, t)
= 1 + u−
ë3 f (x, t) − fˆ2 (x, t) g2 (x, t) − ĝ2 (x, t)
 2  (3.89)
K 1T u d̃
− e + c1 + 1
K 2T u c2 d̃2

The following description for the approximation error is defined:



f 1 (x, t) − fˆ1 (x, t) g1 (x, t) − ĝ1 (x, t)
w= + u (3.90)
f 2 (x, t) − fˆ2 (x, t) g2 (x, t) − ĝ2 (x, t)
126 3 Nonlinear Adaptive Control Based on Differential Flatness Theory

Moreover, the following matrices are defined:


⎛ ⎞ ⎛ ⎞
0100 00
⎜0 0 0 0⎟ ⎜1 0 ⎟
A=⎝ ⎜ ⎟ , B=⎝ ⎟ ⎜
0 0 0 1⎠ 0 0⎠
0000 01 (3.91)
1 1 1 1
K1 K2 K3 K4
KT =
K 12 K 22 K 32 K 42

Using matrices A, B, K T , Eq. (3.89) is written in the following form:



f 1 (x, t) − fˆ1 (x, t)
ė = (A − B K )e + Bu c + B
T
ˆ +
 f 2 (x, t) − f 2 (x, t) (3.92)
g (x, t) − ĝ1 (x, t)
+ 1 u + d̃
g2 (x, t) − ĝ2 (x, t)

Next, the following approximators of the unknown system dynamics are defined:

fˆ (x|θ f ) x ∈ R 4×1 fˆ1 (x|θ f ) ∈ R 1×1
fˆ(x) = ˆ1 (3.93)
f 2 (x|θ f ) x ∈ R 4×1 fˆ2 (x|θ f ) ∈ R 1×1

with kernel functions


n
j=1 μ A j (x j )
i
i, j
φ f (x) =
N n (3.94)
i=1 j=1 μ A (x j )
i
j

where l = 1, 2 and μ Ai (x) is the ith membership function of the antecedent (IF) part
j
of the lth fuzzy rule. Similarly, the following approximators of the unknown system
dynamics are defined:

ĝ (x|θg ) x ∈ R 4×1 ĝ1 (x|θg ) ∈ R 1×2
ĝ(x) = 1 (3.95)
ĝ2 (x|θg ) x ∈ R 4×1 ĝ2 (x|θg ) ∈ R 1×2

The values of the weights that result in optimal approximation are

θ ∗f = arg minθ f ∈Mθ f [supx∈Ux ( f (x) − fˆ(x|θ f ))]


(3.96)
θg∗ = arg minθg ∈Mθg [supx∈Ux (g(x) − ĝ(x|θg ))]

where the variation ranges for the weights are defined as

Mθ f = {θ f ∈ R h : ||θ f ||≤m θ f }
(3.97)
Mθg = {θg ∈ R h : ||θg ||≤m θg }

For the value of the approximation error defined in Eq. (3.90) that corresponds to the
optimal values of the weights vectors θ ∗f and θg∗ one has
3.4 Flatness-Based Adaptive Fuzzy Control for MIMO Systems 127
 
w= f (x, t) − fˆ(x|θ ∗f ) +
  −1 (3.98)
+ g(x, t) − ĝ(x|θg∗ ) ĝ(x, t) u

which is next written as


 
w = f (x, t) − fˆ(x|θ f ) + fˆ(x|θ f ) − fˆ(x|θ ∗f ) +
  −1 (3.99)
+ g(x, t) − ĝ(x|θg ) + ĝ(x|θg ) − ĝ(x|θg∗ ) ĝ(x, t) u

which can be also written in the following form:


 
w = wa + wb (3.100)

where
 −1
wa = {[ fˆ(x, θ f ) − fˆ(x|θ ∗f )] + [ĝ(x, θg ) − ĝ(x|θg∗ )]} · ĝ(x, t) u (3.101)

wb = {[ f (x, t) − fˆ(x|θ f )] + [g(x, t) − ĝ(x|θg )]}


 −1 (3.102)
ĝ(x, t) u

Moreover, the following weights error vectors are defined:

θ̃ f = θ f − θ ∗f
(3.103)
θ̃g = θg − θg∗

3.4.5 Lyapunov Stability Analysis for MIMO Nonlinear


Systems

3.4.5.1 Stability Proof for the Control Loop

The following quadratic Lyapunov function is defined:


1 T 1 T 1
V = e Pe + θ̃ f θ̃ f + tr [θ̃gT θ̃g ] (3.104)
2 2γ1 2γ2

Parameter γ1 is the learning rate used in the adaptation of the weights of the neu-
rofuzzy approximator for f (x), while parameter γ2 is the learning rate used in the
adaptation of the weights of the neurofuzzy approximation for g(x). It holds that

1 ˙T ˙T
V̇ = 21 ė T Pe + 21 e T P ė + γ1 θ̃ f θ̃ f + γ2 tr [θ̃g θ̃g ]
1 (3.105)
128 3 Nonlinear Adaptive Control Based on Differential Flatness Theory

The tracking error dynamics is described by



f 1 (x, t) − fˆ1 (x, t)
ė = (A − B K T )e + Bu c + B ˆ +
 f 2 (x, t) − f 2 (x, t) (3.106)
g (x, t) − ĝ1 (x, t)
+ 1 u + d̃
g2 (x, t) − ĝ2 (x, t)

and defining the approximation error



f (x, t) − fˆ1 (x, t) g1 (x, t) − ĝ1 (x, t)
w= 1 + u (3.107)
f 2 (x, t) − fˆ2 (x, t) g2 (x, t) − ĝ2 (x, t)

the previous relation can be also written as

ė = (A − B K T )e + Bu c + B(w + d̃) (3.108)

From Eq. (3.105) one obtains

V̇ = 21 {e T (A − B K T )T + u cT B T +
+(w + d̃)T B T }Pe + 21 e T P{(A − B K T )e+ (3.109)
+Bu c + B(w + d̃)} + γ11 θ̃˙ Tf θ̃ f + γ12 tr [θ̃˙gT θ̃g ]

which in turn gives

V̇ = 21 e T {(A − B K T )T P + P(A − B K T )}e+


2 2e PBu c + 2 2B Pe(w + d̃)+
1 T 1 T
(3.110)
˙
+ γ11 θ̃ Tf θ̃ f + γ12 tr [θ̃˙gT θ̃g ]

Assumption 1: For given positive definite matrix Q there exists a positive definite
matrix P, which is the solution of the following matrix equation:

T
(A − B K T ) P + P(A − B K T ) − PB( r2 − 1
ρ2
)B T P+Q=0 (3.111)

Substituting Eqs. (3.111) and (3.69) into V̇ yields after some operations

V̇ = 21 e T {−Q + PB( r2 − 1
ρ2
)B T P}e+
(3.112)
e T PB{− r1 B T Pe} + B T P(w + d̃) + γ11 θ̃˙ Tf θ̃ f + γ12 tr [θ̃˙gT θ̃g ]
3.4 Flatness-Based Adaptive Fuzzy Control for MIMO Systems 129

Therefore, it holds that

V̇ = − 21 e T Qe − 1 T
2ρ 2
e PBB T Pe + e T PB(w + d̃)+
(3.113)
1 ˙T ˙T
γ1 θ̃ f θ̃ f + γ2 tr [θ̃g θ̃g ]
1

It also holds that


θ̃˙ f = θ̇ f − θ̇ ∗f = θ̇ f
(3.114)
θ̃˙g = θ̇g − θ̇g∗ = θ̇g

The following weights adaptation law is used:

θ̇ f = −γ1 Φ(x)T B T Pe
(3.115)
θ̇g = −γ2 Φ(x)T B T Peu T

where assuming N fuzzy rules and associated kernel functions the matrix dimensions
are θ f ∈ R N ×1 , θg ∈ R N ×2 , Φ(x) ∈ R 2×N , B ∈ R 4×2 , P ∈ R 4×4 and e ∈ R 4×1 .
Therefore, it holds that

V̇ = − 21 e T Qe − 2ρ1 2 e T PBB T Pe + e T PB(w + d̃)+


+ γ11 (−γ1 )e T PBΦ(x)(θ f − θ ∗f )+ (3.116)
+ γ12 (−γ2 )tr [ue T PBΦ(x)(θg − θg∗ )]

or

V̇ = − 21 e T Qe − 2ρ1 2 e T PBB T Pe + e T PB(w + d̃)+


+ γ11 (−γ1 )e T PBΦ(x)(θ f − θ ∗f )+ (3.117)
+ γ2 (−γ2 )tr [ue T PB(ĝ(x|θg ) − ĝ(x|θg∗ )]
1

Taking into account that u ∈ R 2×1 and e T PB(ĝ(x|θg ) − ĝ(x|θg∗ )) ∈ R 1×2 it holds
that

V̇ = − 21 e T Qe − 2ρ1 2 e T PBB T Pe + e T PB(w + d̃)+


+ γ11 (−γ1 )e T PBΦ(x)(θ f − θ ∗f )+ (3.118)
+ γ12 (−γ2 )tr [e T PB(ĝ(x|θg ) − ĝ(x|θg∗ ))u]

Since e T PB(ĝ(x|θg ) − ĝ(x|θg∗ ))u ∈ R 1×1 it holds that

tr (e T PB(ĝ(x|θg ) − ĝ(x|θg∗ )u) =


(3.119)
= e T PB(ĝ(x|θg ) − ĝ(x|θg∗ ))u
130 3 Nonlinear Adaptive Control Based on Differential Flatness Theory

Therefore, one finally obtains

V̇ = − 21 e T Qe − 2ρ1 2 e T PBB T Pe + e T PB(w + d̃)+


+ γ11 (−γ1 )e T PBΦ(x)(θ f − θ ∗f )+ (3.120)
+ γ12 (−γ2 )e T PB(ĝ(x|θg ) − ĝ(x|θg∗ ))u

Next the following approximation error is defined:

wα = [ fˆ(x|θ f ) − fˆ(x|θ ∗f )] + [ĝ(x|θg ) − ĝ(x|θg∗ )]u (3.121)

Thus, one obtains

V̇ = − 21 e T Qe − 1 T
2ρ 2
e PBB T Pe+
(3.122)
+e T PB(w + d̃) + e T P Bwα

Denoting the aggregate approximation error and disturbances vector as

w1 = w + d̃ + wα (3.123)

the derivative of the Lyapunov function becomes

V̇ = − 21 e T Qe − 1 T
2ρ 2
e PBB T Pe + e T PBw1 (3.124)

which in turn is written as

V̇ = − 21 e T Qe − 2ρ1 2 e T PBB T Pe+


(3.125)
+ 21 e T PBw1 + 21 w1T B T Pe

Next, a Lemma is introduced:


Lemma: The following inequality holds:
1 T
2 e PBw1 + 21 w1T B T Pe − 1 T
2ρ 2
e PBB T Pe ≤ 21 ρ 2 w1T w1 (3.126)

Proof : The binomial (ρa − ρ1 b)2 ≥ 0 is considered. Expanding the left part of the
above inequality one gets

ρ2a2 + 1 2
ρ2
b − 2ab ≥ 0 ⇒ 21 ρ 2 a 2 + 2ρ1 2 b2 − ab ≥ 0 ⇒
(3.127)
ab − 1 2
2ρ 2
b ≤ 21 ρ 2 a 2 ⇒ 21 ab + 21 ab − 2ρ1 2 b2 ≤ 21 ρ 2 a 2

The following substitutions are carried out: a = w1 and b = e T PB and the previous
relation becomes
1 T
2 w1 B T Pe + 21 e T PBw1 − 1 T
2ρ 2
e PBB T Pe ≤ 21 ρ 2 w1T w1 (3.128)
3.4 Flatness-Based Adaptive Fuzzy Control for MIMO Systems 131

The previous inequality is used in V̇ , and the right part of the associated inequality
is enforced
1 1
V̇ ≤ − e T Qe + ρ 2 w1T w1 (3.129)
2 2
As explained in the SISO systems control case, the attenuation coefficient ρ can be
chosen such that the right part of Eq. (3.129) is always upper bounded by 0. For
instance, it suffices at every iteration of the control algorithm to have

− 21 e T Qe + 21 ρ 2 ||w1 ||2 ≤ 0⇒ − 21 ||e||2Q + 21 ρ 2 ||w1 ||2 ≤ 0⇒


||e||2Q (3.130)
2 ρ ||w1 || ≤ 21 ||e||2Q + ⇒ρ 2 ≤
1 2 2
||w1 ||2

Again without knowledge of the uncertainties and disturbance term ||w1 || a suffi-
ciently small value of ρ can assure that the above inequality holds and thus that the
loop’s stability is assured. Actually, ρ should be given the least value which permits
to obtain a solution of the Riccati equation (3.111).
Equation (3.129) can be used to show that the H∞ performance criterion is satis-
fied. The integration of V̇ from 0 to T gives
T T T
0 V̇ (t)dt ≤ − 21 0 ||e||2 dt + 21 ρ 2 0 ||w1 ||2 dt ⇒
(3.131)
T T
2V (T ) + 0 ||e|| Q dt
2 ≤ 2V (0) + ρ 2 0 ||w1 ||2 dt

Moreover, if there exists a positive constant Mw > 0 such that


∞
0 ||w1 ||2 dt ≤ Mw (3.132)

one gets
∞
0 ||e||2Q dt ≤ 2V (0) + ρ 2 Mw (3.133)
∞
Thus, the integral 0 ||e||2Q dt is bounded and according to Barbalat’s Lemma one
obtains lim t→∞ e(t) = 0.
In the presented adaptive fuzzy control approach there is no prior assumption
about bounded weights of the neuro-fuzzy approximators. It is the Lyapunov stability
analysis that assures that the tracking error of the control loop will follow the H∞
tracking performance criterion and that the weights values will remain bounded.
The only assumption needed for the design of the controller and for succeeding H∞
tracking performance for the control loop is that there exists a solution for a Riccati
equation associated to the linearized error dynamics of the differentially flat model.
This assumption is quite reasonable for several nonlinear systems, thus providing a
systematic approach to the design of reliable controllers for such systems.
132 3 Nonlinear Adaptive Control Based on Differential Flatness Theory

It is also noted that the training of the neuro-fuzzy networks and the approximation
of the nonlinear system dynamics is efficient if the persistence of excitation condi-
tion holds. The problem of persistence of excitation in the training of neuro-fuzzy
approximators has been studied in several research articles [98, 179, 542]. According
to [179], a Persistence of Excitation condition on the input variables of the neuro-
fuzzy model holds if the input patterns belong to domains around the network nodes
centers. In the case of a neuro-fuzzy approximator that comprises Gaussian basis
functions centered on a regular mesh, these domains cover part of the input domain
volume. Therefore, sufficient coverage of the input space by basis functions makes
the Persistence of Excitation condition hold.

3.4.5.2 The Role of Riccati Equation Coefficients in H∞ Control


Robustness

The linearized tracking error dynamics of Eq. (3.108) is considered again, i.e.,

ė = (A − B K T )e + Bu c + B(w + d̃)

The aim of H∞ control is to eliminate the impact of the modeling errors w =


[ f (x, t) − fˆ(x, t)] + [g(x, t) − ĝ(x, t)]u and the external disturbances d̃ which are
not white noise signals. This implies the minimization of the quadratic cost function
[259, 316]:
T
J (t) = 21 0 e T (t)e(t) + r u cT (t)u c (t)−
(3.134)
−ρ 2 (w + d̃)T (w + d̃)dt, r, ρ > 0

The weight r determines how much the control signal should be penalized and the
weight ρ determines how much the disturbances influence should be rewarded in the
sense of a mini-max differential game. The H∞ control law is u(t) = − r1 B T Pe(t)
where P is the positive definite symmetric matrix derived from the algebraic Riccati
equation Eq. (3.111).
The parameter ρ in Eq. (3.134) is an indication of the closed-loop system robust-
ness. If the values of ρ > 0 are excessively decreased with respect to r , then the
solution of the Riccati equation is no longer a positive definite matrix. Consequently,
there is a lower bound ρmin of ρ for which the H∞ control problem has a solution.
The acceptable values of ρ lie in the interval [ρmin , ∞). If ρmin is found and used in
the design of the H∞ controller, the closed-loop system will have increased robust-
ness. Unlike this, if a value ρ > ρmin is used, then an admissible stabilizing H∞
controller will be derived but it will be a suboptimal one. The Hamiltonian matrix
 
A −( r2 − ρ12 )B B T
H= (3.135)
−Q −A T
3.4 Flatness-Based Adaptive Fuzzy Control for MIMO Systems 133

provides a criterion for the existence of a solution of the Riccati equation Eq. (3.111).
A necessary condition for the solution of the algebraic Riccati equation to be a positive
semidefinite symmetric matrix is that H has no imaginary eigenvalues [132].

3.4.6 Simulation Tests

The performance of the proposed flatness-based adaptive fuzzy MIMO controller was
tested in the nonlinear dynamic model of the 2-DOF rigid-link robotic manipulator
(Fig. 3.7). The control loop is depicted in Fig. 3.8. The differentially flat model of the
robot and its transformation to the Brunovksy form has been analyzed in Sect. 3.4.
The flat outputs were taken to be the robot’s joint angles y1 = x1 and y2 = x3 . It has
been proven that all state variables of the robotic model and the associated control
inputs, i.e., the torques applied by the motors to the links’ joints can be written as
functions of the flat output [y1 , y2 ] and of the associated derivatives.
The state feedback gain was K ∈ R 2×4 . The basis functions used in the estimation
x̂−c j 2
of f i (x, t), i = 1, 2 and gi j (x, t), i = 1, 2, j = 1, 2 were μ A j (x̂) = e( σ ) , j =
1, . . . , 3. Since there are four inputs x1 , ẋ1 and x2 , ẋ2 and the associated definition
sets (universe of discourse) consist of 3 fuzzy sets, for the approximation of functions
f i (x, t) i = 1, 2, there will be 81 fuzzy rules of the form:

R l : IF x1 is Al1 AND ẋ1 is Al2


(3.136)
AND x3 is Al3 AND ẋ3 is Al4 THEN fˆil is bl

81 4
ˆl i=1
l=1 f i μlA (xi ) (l)
and fˆi (x, t) =
81 4 i
. The centers ci , i = 1, . . . , 4 and the variances
l=1 i=1 μ Ai (xi )
l

v(l) of each rule are as follows:

Fig. 3.7 A 2-DOF rigid-link Y


robotic manipulator

θ2

θ1 + θ2

θ1
X
O
134 3 Nonlinear Adaptive Control Based on Differential Flatness Theory

Fig. 3.8 Flatness-based adaptive-fuzzy control loop for the robotic manipulator

In the considered fuzzy rule-base there are four input parameters in the antecedent
parts of the fuzzy rules, i.e., x1 = θ1 , x2 = θ̇1 , x3 = θ2 and x4 = θ̇2 . Each parameter
is partitioned into 3 fuzzy sets. Therefore, as mentioned before, by taking all possible
combinations between the fuzzy sets one has 34 = 81 fuzzy rules. The finer the par-
tition of the input variables into fuzzy sets is, the more accurate the approximation of
the nonlinear system dynamics by the neuro-fuzzy model is expected to be (although
some of the rules of the fuzzy rule base may not be sufficiently activated due to
little coverage of the associated region of the patterns space by input data). However,
considering a large number of fuzzy sets for each input variable induces the curse
of dimensionality, which means that there is an excessive and rather unnecessary
increase in the number of the adaptable parameters that constitute the neuro-fuzzy
model (Table 3.1).
The estimation of the control input gain functions ĝi j (x, t) i = 1, 2 was derived in
a similar way. The time step was taken to be 0.01 s. In the beginning of the training of
the neuro-fuzzy approximators their weights were initialized to zero. Moreover, the
elements of the robot’s state vector were also initialized to zero. The positive definite
matrix P ∈ R 4×4 stems from the solution of the algebraic Riccati equation (3.111),
for Q also positive definite.
Two different setpoints were studied: (i) a sinusoidal signal of variable amplitude
and frequency, (ii) a seesaw setpoint of amplitude 0.30 and period T = 20 s. The
3.4 Flatness-Based Adaptive Fuzzy Control for MIMO Systems 135

Table 3.1 Parameters of the fuzzy rule base


Rule c1(l) c2(l) c3(l) c4(l) v(l)
R (1) −1.0 −1.0 −1.0 −0.5 3
R (2) −1.0 −1.0 −1.0 0.0 3
R (3) −1.0 −1.0 −1.0 −1.0 3
R (4) −1.0 −1.0 0.0 −0.5 3
R (5) −1.0 −1.0 0.0 0.0 3
R (6) −1.0 −1.0 0.0 0.5 3
··· ··· ··· ··· ··· ···
··· ··· ··· ··· ··· ···
R (81) 1.0 1.0 1.0 0.5 3

approximations fˆ and ĝ were used in the derivation of the control law, given by
Eq. (3.115). To show the disturbance rejection capability of the proposed adaptive
fuzzy controller, at the beginning of the second half of the simulation time additive
sinusoidal disturbances of amplitude A = 0.5 and period T = 10 s were applied to
the robot’s joints. The external disturbances which appear as additive torques to the
robot’s joints can be due to a force F exerted on the manipulator’s end-effector (e.g.,
due to contact with a surface) and which through the relation T = J T F (J stands for
the Jacobian matrix of the robot’s kinematic model) generates torques on the joints
(Fig. 3.9).
In the simulation results that follow the position and velocity setpoints are noted
as continuous line while the position and velocity signals of the robot’s joints are
denoted as dashed lines. The position variation for the first joint of the robotic

(a) 2.5 (b) 30

2
20
1.5
state variable x2 of the robot
state variable x1 of the robot

1
10
0.5

0 0

−0.5
−10
−1

−1.5
−20
−2

−2.5 −30
0 5 10 15 20 25 30 35 40 0 5 10 15 20 25 30 35 40

t (sec) t (sec)

Fig. 3.9 a Tracking of sinusoidal position setpoint by joint 1 of the robot. b Tracking of sinusoidal
velocity setpoint by joint 1 of the robot
136 3 Nonlinear Adaptive Control Based on Differential Flatness Theory

(a) 2.5 (b) 30

2
20
1.5
state variable x3 of the robot

state variable x4 of the robot


1
10
0.5

0 0

−0.5
−10
−1

−1.5
−20
−2

−2.5 −30
0 5 10 15 20 25 30 35 40 0 5 10 15 20 25 30 35 40

t (sec) t (sec)

Fig. 3.10 a Tracking of sinusoidal position setpoint by joint 2 of the robot. b Tracking of sinusoidal
velocity setpoint by joint 2 of the robot

(a) 300 (b) 300

200 200
control signal of joint 1

control signal of joint 2

100 100

0 0

−100 −100

−200 −200

−300 −300
0 5 10 15 20 25 30 35 40 0 5 10 15 20 25 30 35 40
t (sec) t (sec)

Fig. 3.11 a Tracking of a sinusoidal setpoint: Control input to joint 1. b Tracking of a sinusoidal
setpoint: Control input to joint 2

manipulator when tracking a sinusoidal setpoint is depicted in Fig. 3.9a, while the
velocity variation is shown in Fig. 3.9b. For the second joint of the 2-DOF robot the
tracking of the position setpoint is depicted in Fig. 3.10a while the tracking of the
velocity setpoint is shown in Fig. 3.10b. The control inputs (motor torques) applied
to the first and second joints of the robotic manipulator are shown in Fig. 3.11a, b,
respectively.
The performance of the proposed flatness-based adaptive fuzzy control is also
tested in the tracking of a seesaw setpoint. It is shown that after suitable tuning
of the feedback gain matrix K defined in Eq. (3.91) precise tracking of the seesaw
setpoint can be succeeded, with fast elimination of the tracking error. The controller
3.4 Flatness-Based Adaptive Fuzzy Control for MIMO Systems 137

(a) 2.5 (b) 30

2
20
1.5
state variable x1 of the robot

state variable x2 of the robot


1
10
0.5

0 0

−0.5
−10
−1

−1.5
−20
−2

−2.5 −30
0 5 10 15 20 25 30 35 40 0 5 10 15 20 25 30 35 40
t (sec) t (sec)

Fig. 3.12 a Tracking of a seesaw position setpoint by joint 1 of the robot. b Tracking of a seesaw
velocity setpoint by joint 1 of the robot

(a) 2.5 (b) 30

2
20
1.5
state variable x3 of the robot

state variable x4 of the robot

1
10
0.5

0 0

−0.5
−10
−1

−1.5
−20
−2

−2.5 −30
0 5 10 15 20 25 30 35 40 0 5 10 15 20 25 30 35 40
t (sec) t (sec)

Fig. 3.13 a Tracking of a seesaw position setpoint by joint 2 of the robot. b Tracking of a seesaw
velocity setpoint by joint 2 of the robot

is also suitable for compensating the effects of the additive torques disturbance that
is applied to the robot’s joints.
The position variation of the first joint is demonstrated in Fig. 3.12a, while the
velocity variation is shown in Fig. 3.12b. Similarly, the tracking of the position
reference setpoint for the second joint is depicted in Fig. 3.13a, while the tracking of
the associated velocity setpoint is given in Fig. 3.13b. The control signal in the case
of tracking a seesaw setpoint by the two joints of the robotic manipulator is shown
in Fig. 3.14a, b, respectively.
138 3 Nonlinear Adaptive Control Based on Differential Flatness Theory

(a) 300 (b) 300

200 200

control signal of joint 2


control signal of joint 1

100 100

0 0

−100 −100

−200 −200

−300 −300
0 5 10 15 20 25 30 35 40 0 5 10 15 20 25 30 35 40
t (sec) t (sec)

Fig. 3.14 a Tracking of a seesaw setpoint: Control input to joint 1. b Tracking of a seesaw setpoint:
Control input to joint 2

(a) 1.4 (b) 1.4


1.2 1.2
real vs estimated function g2b

real vs estimated function g2b

1 1

0.8 0.8

0.6 0.6

0.4 0.4

0.2 0.2

0 0
0 5 10 15 20 25 30 35 40 0 5 10 15 20 25 30 35 40
t (sec) t (sec)

Fig. 3.15 a Approximation of function g22 (x, t) when tracking a sinusoidal setpoint. b Approxi-
mation of function g22 (x, t) when tracking a seesaw setpoint

Finally, the approximation of function g22 (x, t) in the case of tracking of a sinu-
soidal setpoint is shown in Fig. 3.15a (and is marked as a dashed line), while when
tracking a seesaw setpoint the approximated function g22 (x, t) is shown in Fig. 3.15b.
The RMSE (root mean square error) of the examined control loop is also calculated
(assuming the same parameters of the controller) in the case of tracking of previous
setpoints (a) sinusoidal setpoint of variable amplitude/frequency and (b) seesaw
setpoint. The results are summarized in Table 3.2. It can be observed that the examined
controller, apart from elimination of tracking error for the parameters of the robot’s
state vector, succeeds also in good transient performance. Taking into account that
no prior knowledge about the robot’s dynamics has been used by the controller, and
3.4 Flatness-Based Adaptive Fuzzy Control for MIMO Systems 139

Table 3.2 RMSE of joints’ Parameter θ1 θ2


angles
RMSEa 0.0085 0.0028
RMSEb 0.0175 0.0145

at the first iterations of the control loop the controller undergoes self-tuning (learning
of values for specific gains) the transient characteristics of the control scheme can
be also deemed as quite satisfactory.
Chapter 4
Nonlinear Kalman Filtering Based
on Differential Flatness Theory

4.1 Introduction

A first type of uncertainties that flatness-based control has to cope with is the one
associated with parametric changes and external perturbations. This was analyzed
in Chap. 3, through flatness-based adaptive fuzzy control. A second type of uncer-
tainties in dynamical systems modeling and control has to do with the inability to
measure specific elements of the system’s state vector. To this end, the present chapter
introduces nonlinear Kalman Filtering based on differential flatness theory.
The chapter analyzes first the Derivative-free nonlinear Kalman Filter for SISO
and MIMO nonlinear dynamical systems. The considered nonlinear filtering scheme
which is based on differential flatness theory extends the class of systems to which
Kalman Filtering can be applied without the need for calculation of Jacobian matri-
ces. As explained, nonlinear systems satisfying the differential flatness property can
be written in the Brunovsky form via a transformation of their state variables and
control inputs. The Derivative-free nonlinear Kalman Filter consists of the Kalman
Filter recursion applied on the linearized equivalent of the system together with an
inverse transformation based on differential flatness theory that enables to retrieve
estimates for the state variables of the initial nonlinear model. In terms of accuracy
of the provided state estimation, the performance of the new filter is equivalent to
the one of the Unscented Kalman Filter and significantly improved comparing to
the Extended Kalman Filter. In terms of speed of computation, the Derivative-free
nonlinear Kalman Filter outperforms all other nonlinear estimation algorithms.
Aiming also at finding more efficient implementations of distributed nonlinear
filtering, in this chapter a derivative-free approach to Extended Information Filtering
is introduced and applied to state estimation-based control of nonlinear dynamical
systems, such as robots. First, the system undergoes a linearization transformation
and next state estimation is performed by applying the Kalman Filter recursion to the
linearized model. At a second level, the standard Information Filter is used to fuse the
state estimates obtained from local derivative-free Kalman filters running at the local

© Springer International Publishing Switzerland 2015 141


G.G. Rigatos, Nonlinear Control and Filtering Using Differential
Flatness Approaches, Studies in Systems, Decision and Control 25,
DOI 10.1007/978-3-319-16420-5_4
142 4 Nonlinear Kalman Filtering Based on Differential Flatness Theory

information processing nodes. This approach has significant advantages because


unlike the Extended Information Filter (i) it is not based on local linearization of the
nonlinear dynamics (ii) it does not assume truncation of higher order Taylor expan-
sion terms thus preserving the accuracy and robustness of the performed estimation,
(iii) it does not require the computation of Jacobian matrices. The Derivative-free
Extended Information Filter appears to be faster than the previously mentioned non-
linear filtering methods (i.e., Extended Information Filter, Unscented Information
Filter, and Distributed Particle Filter) while also providing very accurate (in terms
of variance) state estimates.

4.2 The Derivative-Free Nonlinear Kalman Filter

4.2.1 Overview

State estimation of nonlinear dynamical systems with the use of filters is a significant
topic in the area of control systems design, robotics, and mechatronics since it can
provide improved methods for sensorless control of electromechanical systems. For
nonlinear systems, and under the assumption of Gaussian noise, the Extended Kalman
Filter (EKF) is frequently applied for estimating the nonmeasurable state variables
through the processing of input and output sequences. This has been analyzed in [31,
51, 192, 229, 372, 417]. The Extended Kalman Filter is based on linearization of
the system using a first-order Taylor expansion [405, 408, 412, 422, 573]. Although
EKF is efficient in several estimation problems, it is characterized by cumulative
errors due to the local linearization assumption and this may affect the accuracy of
the state estimation or even risk the stability of the observer-based control loop.
Aiming at finding more efficient implementations of nonlinear Kalman Filtering,
in this chapter a derivative-free approach to Kalman filtering is introduced and applied
to state estimation-based control of a wide class of nonlinear electromechanical
systems. In the proposed derivative-free Kalman Filtering method the system is
first subject to a linearization transformation that is based on differential flatness
theory and next state estimation is performed by applying the standard Kalman
Filter recursion to the linearized model. Unlike EKF, the proposed method provides
estimates of the state vector of the nonlinear system without the need for derivatives
and Jacobian matrices calculation. By avoiding linearization approximations, the
proposed filtering method improves the accuracy of estimation of the system state
variables, and results in smooth control signal variations and in minimization of the
tracking error of the associated control loop. The chapter extends the results of [424,
429, 434] toward single-input single-output (SISO) and multi-input multi-output
(MIMO) nonlinear dynamical systems.
4.2 The Derivative-Free Nonlinear Kalman Filter 143

4.2.2 Extended Kalman Filtering for Nonlinear


Dynamical Systems

4.2.2.1 The Continuous-Time Kalman Filter for Linear Systems

First, the continuous-time dynamical system of Eq. (4.1) is assumed [408]:



ẋ(t) = Ax(t) + Bu(t) + w(t), t ≥ t0
(4.1)
z(t) = C x(t) + v(t), t ≥ t0

where x ∈ R m×1 is the system’s state vector, and z ∈ R p×1 is the system’s output.
Matrices A, B, and C can be time-varying and w(t), v(t) are uncorrelated white
Gaussian noises. The covariance matrix of the process noise w(t) is Q(t), while the
covariance matrix of the measurement noise is R(t). Then, the Kalman Filter is a
linear state observer which is given by

⎪ ˙
⎨x̂ = A x̂ + Bu + K [z − C x̂], x̂(t0 ) = 0
K (t) = PC T R −1 (4.2)


Ṗ = A P + P A T + Q − PC T R −1 CP

where x̂(t) is the optimal estimation of the state vector x(t) and P(t) is the covariance
matrix of the state vector estimation error with P(t0 ) = P0 . The Kalman Filter
consists of the system’s state equation plus a corrective term K [z−C x̂]. The selection
of gain K corresponds actually to the solution of an optimization problem. This is
expressed as the minimization of a quadratic cost functional and is performed through
the solution of a Riccati equation. In that case the observer’s gain K is calculated
by K = PC T R −1 considering an optimal control problem for the dual system
(A T , C T ), where the covariance matrix of the estimation error P is found by the
solution of a continuous-time Riccati equation of the form

Ṗ = AP + P A T + Q − PC T R −1 CP (4.3)

where matrices Q and R stand for the process and measurement noise covariance
matrices, respectively.
144 4 Nonlinear Kalman Filtering Based on Differential Flatness Theory

4.2.2.2 The Discrete-Time Kalman Filter for Linear


Dynamical Systems

In the discrete-time case, a dynamical system is assumed to be expressed in the form


of a discrete-time state model [408, 422]:

x(k + 1) = A(k)x(k) + L(k)u(k) + w(k)


(4.4)
z(k) = Cx(k) + v(k)

where the state x(k) is a m-vector, w(k) is a m-element process noise vector, and A
is a m × m real matrix. Moreover, the output measurement z(k) is a p-vector, C is
a p × m-matrix of real numbers, and v(k) is the measurement noise. It is assumed
that the process noise w(k) and the measurement noise v(k) are uncorrelated.
Now the problem of interest is to estimate the state x(k) based on the sequence
of output measurements z(1), z(2), . . . , z(k). The initial value of the state vector
x(0), and the initial value of the error covariance matrix P(0) is unknown and an
estimation of it is considered, i.e., x̂(0) is a guess of E[x(0)] and P̂(0) is a guess of
Cov[x(0)].
For the initialization of matrix P one can set P̂(0) = λI , with λ > 0. The
state vector x(k) has to be estimated taking into account x̂(0), P̂(0), and the output
measurements Z = [z(1), z(2), . . . , z(k)]T , i.e., x̂(k) = αn (x̂(0)), P̂(0), Z (k)).
This is a linear minimum mean squares estimation problem (LMMSE) formulated
as x̂(k + 1) = an+1 (x̂(k), z(k + 1)). The process and output noise are white and their
covariance matrices are given by: E[w(i)wT ( j)] = Qδ(i − j) and E[v(i)vT ( j)] =
Rδ(i − j).
Using the above, the discrete-time Kalman filter can be decomposed into two parts:
(i) time update (prediction stage), and (ii) measurement update (correction stage).
The first part employs an estimate of the state vector x(k) made before the output
measurement z(k) is available (a priori estimate). The second part estimates x(k)
after z(k) has become available (a posteriori estimate). The following measurement
processing stages are distinguished:
• When the set of measurements Z − = {z(1), . . . , z(k − 1)} is available. From
Z − an a priori estimation of x(k) is obtained which is denoted by x̂ − (k) and this
denotes the estimate of x(k) given Z − .
• When z(k) is available, the output measurements set becomes Z = {z(1), . . . , z(k)},
where x̂(k) and this denotes the estimate of x(k) given Z .
The associated estimation errors are defined by e− (k) = x(k) − x̂ − (k)= the a priori
error, and e(k) = x(k)− x̂(k)= the a posteriori error. The estimation error covariance
matrices associated with x̂ − (k) and x̂(k) are defined as P − (k) = Cov[e− (k)] =
E[e− (k)e− (k) ] and P(k) = Cov[e(k)] = E[e(k)e T (k)], respectively [229]. From
T

the definition of the trace of a matrix, the mean square error of the estimates can
be written as MSE(x̂ − (k)) = E[e− (k)e− (k) ] = tr(P − (k)) and MSE(x(k)) =
T

E[e(k)e T (k) = tr (P(k)).


4.2 The Derivative-Free Nonlinear Kalman Filter 145

Finally, the linear Kalman filter equations are:


measurement update:

K (k) = P − (k)C T [C·P − (k)C T + R]−1


x̂(k) = x̂ − (k) + K (k)[z(k) − C x̂ − (k)] (4.5)
P(k) = P − (k) − K (k)C P − (k)

time update:

P − (k + 1) = A(k)P(k)A T (k) + Q(k)


(4.6)
x̂ − (k + 1) = A(k)x̂(k) + L(k)u(k)

4.2.2.3 The Extended Kalman Filter

State estimation can be also performed for nonlinear dynamical systems using the
Extended Kalman Filter recursion. The following nonlinear state model is considered
[408, 422]:
x(k + 1) = φ(x(k)) + L(k)u(k) + w(k)
(4.7)
z(k) = γ (x(k)) + v(k)

where x ∈ R m×1 is the system’s state vector and z ∈ R p×1 is the system’s out-
put, while w(k) and v(k) are uncorrelated, Gaussian zero mean noise processes with
covariance matrices Q(k) and R(k), respectively. The operators φ(x) and γ (x) are the
vectors φ(x) = [φ1 (x), φ2 (x), . . ., φm (x)]T , and γ (x) = [γ1 (x), γ2 (x), . . . , γ p (x)]T ,
respectively. It is assumed that φ and γ are sufficiently smooth in x so that each
one has a valid series Taylor expansion. Following a linearization procedure, φ is
expanded into Taylor series about x̂:

φ(x(k)) = φ(x̂(k)) + Jφ (x̂(k))[x(k) − x̂(k)] + · · · (4.8)

where Jφ (x) is the Jacobian of φ calculated at x̂(k):


⎛ ∂φ1 ∂φ1 ∂φ1 ⎞
∂ x1 ∂ x2 ··· ∂ xm
⎜ ∂φ ∂φ ⎟
⎜ 2 2
··· ∂φ2 ⎟
∂φ ⎜ ∂ x1 ∂ x2 ∂ xm⎟
Jφ (x) = |x=x̂(k) = ⎜
⎜ .. .. ..

.. ⎟ (4.9)
∂x ⎜ .
⎝ . . . ⎟

∂φm ∂φm ∂φm
∂ x1 ∂ x2 ··· ∂ xm

Likewise, γ is expanded about x̂ − (k)


146 4 Nonlinear Kalman Filtering Based on Differential Flatness Theory

γ (x(k)) = γ (x̂ − (k)) + Jγ [x(k) − x̂ − (k)] + · · · (4.10)

where x̂ − (k) is the estimation of the state vector x(k) before measurement at the
kth instant to be received and x̂(k) is the updated estimation of the state vector after
measurement at the kth instant has been received. The Jacobian Jγ (x) is
⎛ ∂γ1 ∂γ1 ∂γ1 ⎞
∂ x1 ∂ x2 ··· ∂ xm
⎜ ∂γ ∂γ ⎟
⎜ 2 2 ··· ∂γ2 ⎟
∂γ ⎜ ∂ x1 ∂ x2 ∂ xm ⎟
Jγ (x) = |x=x̂ − (k) = ⎜
⎜ .. .. ..

.. ⎟ (4.11)
∂x ⎜ .
⎝ . . . ⎟

∂γ p ∂γ p ∂γ p
∂ x1 ∂ x2 ··· ∂ xm

The resulting expressions create first-order approximations of φ and γ . Thus the


linearized version of the system is obtained:

x(k + 1) = φ(x̂(k)) + Jφ (x̂(k))[x(k) − x̂(k)] + w(k)


(4.12)
z(k) = γ (x̂ − (k)) + Jγ (x̂ − (k))[x(k) − x̂ − (k)] + v(k)

Now, the EKF recursion is as follows: First, the time update is considered: by x̂(k)
the estimation of the state vector at time instant k is denoted. Given initial conditions
x̂ − (0) and P − (0) the recursion proceeds as:
• Measurement update. Acquire z(k) and compute:

K (k) = P − (k)JγT (x̂ − (k))·[Jγ (x̂ − (k))P − (k)JγT (x̂ − (k)) + R(k)]−1
x̂(k) = x̂ − (k) + K (k)[z(k) − γ (x̂ − (k))] (4.13)
P(k) = P − (k) − K (k)Jγ (x̂ − (k))P − (k)

• Time update. Compute:

P − (k + 1) = Jφ (x̂(k))P(k)JφT (x̂(k)) + Q(k)


(4.14)
x̂ − (k + 1) = φ(x̂(k)) + L(k)u(k)

The schematic diagram of the EKF loop is given in Fig. 4.1.


Indicative applications of the Extended Kalman Filter in control of electromechan-
ical systems have been presented in [102] where the EKF has been used in state
estimation-based control of electrohydraulic actuators, in [480] where the EKF has
been used as a disturbance observer resulting in improved control of a direct cur-
rent motor, in [298] where the EKF has been used in sensorless control of nonlinear
brushless DC motor models, in [307] where the EKF has been used for estimating
the electromagnetic torque of direct-torque controlled brushless DC motors and for
implementing a sensorless control scheme, and in [514] where the EKF has been
applied for rotor resistance estimation of a DC motor, for position and velocity esti-
mation and finally for state estimation-based control. Examples on nonlinear filtering
4.2 The Derivative-Free Nonlinear Kalman Filter 147

Fig. 4.1 Schematic diagram of the EKF loop

for electric machines tasks have been given in [138] where an EKF-based fault diag-
nosis scheme for actuators has been studied, in [578] where the EKF has been pro-
posed for residual generation and diagnosis of incipient faults in DC electric motors,
and in [13] where the EKF has been used in fault diagnosis of an electrohydraulic
actuation system.

4.2.2.4 Unscented Kalman Filter

Next, the functioning of the Unscented Kalman Filter (UKF) will be explained.
The UKF belongs to a wider class of nonlinear estimators known as Sigma-Point
Kalman Filters (SPKF) [224, 225, 231]. Unlike EKF, in the Unscented Kalman Filter
no analytical Jacobians of the system equations need to be calculated. Some basic
operations performed in the UKF algorithm are summarized as follows:

(1) Denoting the current state mean as x̂, √ a set of 2n + 1 sigma points is taken
from√the columns of the n × n matrix (n + √ λ)Pxx as follows: x = x̂, x =
0 i

x̂ +[ (n + λ)Pxx ]i , i = 1, . . . , n, x = x̂ −[ (n + λ)Pxx ]i , i = n+1, . . . , 2n,


i

and the associate weights are computed as:

(m) λ (c) λ
W0 = (n+λ) W0 = (n+λ)+(1−α 2 +b)
(4.15)
(m) (c)
Wi = 1
2(n+λ) Wi = 2(n+λ)1
148 4 Nonlinear Kalman Filtering Based on Differential Flatness Theory

where i = 1, 2, . . . , 2n and λ = α 2 (n + κ) − n is a scaling parameter, while


α, β, and κ are constant parameters. Matrix Pxx is the covariance matrix of the
state x.
(2) Transform each of the sigma points as z i = h(x i ) i = 0, . . . , 2n.
(3) Mean and covariance estimates for z can be computed as
2n (m) i
ẑ  i=0 Wi z
2n (c) i
(4.16)
Pzz = i=0 Wi (z − ẑ)(z
i − ẑ)T

(4) The cross-covariance of x and z is estimated as


2n (c) i
Pxz = i=0 Wi (x − x̂)(z i − ẑ)T (4.17)

The matrix square root of positive definite matrix Pxx means a matrix A = Pxx such
that Pxx = A A T and a possible way for calculation is Singular Value Decomposition
(SVD). As in the case of the Extended Kalman Filter, the Unscented Kalman Filter
also consists of prediction stage (time update) and correction stage (measurement
update) [225, 469].
Time update: Compute the predicted state mean x̂ − (k) and the predicted covariance
Pxx − (k), using the Unscented Transform (UT):

[x̂ − (k), Pxx


− (k)] = UT( f , x̂(k − 1), P (k − 1))
d xx
− (4.18)
Pxx (k) = Pxx (k − 1) + Q(k − 1)

Measurement update: Obtain the new output measurement z(k) and compute the pre-
dicted mean ẑ(k) and covariance of the measurement Pzz (k), and the cross-covariance
of the state and measurement Pxz (k)

[ẑ(k), Pzz (k), Pxz (k)] = U T (h d , x̂ − (k), Pxx


− (k))
(4.19)
Pzz (k) = Pzz (k) + R(k)

Then compute the filter gain K (k), the state mean x̂(k), and the covariance Pxx (k),
conditional to the measurement y(k)

K (k) = Px z (k)Pzz−1 (k)


x̂(k) = x̂ − (k) + K (k)[z(k) − ẑ(k)] (4.20)
Pxx (k) = − (k) −
Pxx K (k)Pzz (k)K (k)T

The filter starts from the initial mean m(0) and covariance Px x (0). The stages of
state vector estimation with the use of the Unscented Kalman Filter algorithm are
depicted in Fig. 4.2.
4.2 The Derivative-Free Nonlinear Kalman Filter 149

Fig. 4.2 Schematic diagram


of the Unscented Kalman
Filter loop

4.2.3 Derivative-Free Kalman Filtering to SISO


Nonlinear Systems

4.2.3.1 Conditions for Derivative-Free Kalman Filtering in SISO


Nonlinear Systems

Differential flatness theory will be used for arriving at a filtering method that will have
improved performance compared to the Extended Kalman Filter. It will be shown
that through a nonlinear transformation it is possible to design a state estimator for
a class of nonlinear systems, which can substitute for the Extended Kalman Filter.
The results will be towards derivative-free Kalman Filtering for nonlinear systems.
The following continuous-time nonlinear single-output system is considered [334,
335, 434].
p
ẋ = f (x) + q0 (x, u) + i=1 θi qi (x, u), or
ẋ = f (x) + q0 (x, u) + Q(x, u)θ x ∈ R n , u ∈ R m , θ ∈ R p (4.21)
z = h(x), z ∈ R

with qi : R n × R m → R n , 0 ≤ i ≤ p, f : R n →R n , h: R n →R, smooth functions,


h(x0 ) = 0, q0 (x, 0) = 0 for every x ∈ R n ; x is the state vector, u(x, t): R + →R m
is the control which is assumed to be known, θ is the parameter vector which is
supposed to be constant, and y is the scalar output.
The first main assumption on the class of systems considered is the linear depen-
dence on the parameter vector θ . The second main assumption requires that systems
of Eq. (4.21) are transformable by a parameter independent state-space change of
coordinates in R n
150 4 Nonlinear Kalman Filtering Based on Differential Flatness Theory

ζ = T (x), T (x0 ) = 0 (4.22)

into the system p


ζ̇ = Ac ζ + ψ0 (z, u) + i=1 θi ψi (z, u)⇒
ζ̇ = Ac ζ + ψ0 (z, u) + Ψ (z, u)θ (4.23)
z = Cc ζ

with ⎛ ⎞
0 1 0 ··· 0
⎜0 0 1 ··· 0⎟
⎜ ⎟
Ac = ⎜ . .. .. .. .. ⎟ (4.24)
⎝ .. . . . .⎠
0 0 0 ··· 0
 
Cc = 1 0 0 · · · 0 (4.25)

and ψi : R × R m →R n smooth functions for i = 0, . . . , p. The necessary and suffi-


cient conditions for the initial nonlinear system to be transformable into the form of
Eq. (4.23) have been given in [334, 335, 434] and are summarized in the following:
(i) rank{dh(x), d L f h(x), . . . , d Ln−1 h(x)} = n, ∀x ∈ R n (which implies local
f
observability). It is noted that L f h(x) stands for the Lie derivative L f h(x) =
(∇h) f and the repeated Lie derivatives are recursively defined as L0f h =
h for i = 0, Lif h = L f Li−1 i−1
f h = ∇ L f h f for i = 1, 2, . . ..
j
(ii) [adif g, ad f g] = 0, 0 ≤ i, j ≤ n − 1. It is noted that adif g stands for a Lie
Bracket which is defined recursively as adif g = [ f, adi−1
f g] with ad f g = g
0

and ad f g = [ f, g] = ∇g f − ∇ f g.
(iii) [qi , adif g] = 0, 0 ≤ i ≤ p, 0 ≤ j ≤ n − 2 ∀ u ∈ R m .
(iv) the vector fields adif g, 0 ≤ i ≤ n − 1 are complete, in which g is the vector
field satisfying ⎛ ⎞ ⎛ ⎞
dh 0
⎜ .. ⎟ ⎜ .. ⎟
<⎝ . ⎠ , g >= ⎝ . ⎠ (4.26)
d(Ln−1
f h) 1

∂h
where dh has been defined as dh = ∂x = [ ∂∂h ∂h ∂h
x1 , ∂ x2 , . . . , ∂ xn ]. Then for every
parameter vector θ , the system
p
ζ̂ = Ac ζ̂ + ψ0 (z, u) + i=1 θi ψi (z, u) + K (z − Cc ζ̂ )
(4.27)
x̂ = T −1 (ζ̂ )
4.2 The Derivative-Free Nonlinear Kalman Filter 151

is an asymptotic observer for a suitable choice of K provided that the state x(t) is
bounded, with estimation error dynamics
⎛ ⎞
−k1 1 0 ··· 0
⎜ −k2 0 1 ··· 0⎟
⎜ ⎟
ė = (Ac − K Cc )e = ⎜
⎜ ··· ··· ··· ··· · · ·⎟
⎟e (4.28)
⎝−kn−1 0 0 ··· 1⎠
−kn 0 0 ··· 0

The eigenvalues of Ac − K Cc can be arbitrarily placed by choosing the vector K ,


since they coincide with the roots of the polynomial s n + k1 s n−1 + · · · + kn .
From, Eq. (4.27) it can be noticed that to obtain estimates of the state vector of
the initial nonlinear system, knowledge of the inverse transformation T −1 (diffeo-
morphism) is needed. At a later part of the book (Chap. 7) it will be shown that the
inverse transformation needs the inverse of the Jacobian matrix J that is computed
for the transformed state vector of the system.

4.2.3.2 State Estimation for SISO Systems with the Derivative-Free


Nonlinear Kalman Filter

Since Eq. (4.27) provides an asymptotic observer for the initial nonlinear system of
Eq. (4.21) one can consider a case in which the observation error gain matrix K can
be provided by the Kalman Filter equations given initially in the continuous-time
KF formulation, or in discrete-time form by Eqs. (10.62) and (10.63). The following
single-input single-output nonlinear dynamical system is considered

x (n) = f (x, t) + g(x, t)u(x, t) (4.29)

where z = x is the system’s output, and f (x, t), g(x, t) are nonlinear functions. It
can be noticed that the system of Eq. (4.29) belongs to the general class of systems of
Eq. (4.21). Moreover, Eq. (4.29) is the canonical form one obtains after the application
of a differential flatness theory-based transformation. Assuming the transformation
ζi = x (i−1) , i = 1, . . . , n, and x (n) = f (x, t) + g(x, t)u(x, t) = v(ζ, t), i.e.,
ζ̇n = v(ζ, t), one obtains the linearized system of the form

ζ̇1 = ζ2
ζ̇2 = ζ3
··· ··· (4.30)
ζ̇n−1 = ζn
ζ̇n = v(ζ, t)
152 4 Nonlinear Kalman Filtering Based on Differential Flatness Theory

which in turn can be written in state-space equations of the canonical form, as


⎛ ⎞ ⎛ ⎞⎛ ⎞ ⎛ ⎞
ζ̇1 0 1 0 ··· 0 ζ1 0
⎜ ζ̇2 ⎟ ⎜ 0 0 1 ··· 0⎟ ⎜ ζ2 ⎟ ⎜ 0 ⎟
⎜ ⎟ ⎜ ⎟⎜ ⎟ ⎜ ⎟
⎜ · · · ⎟ = ⎜· · · ··· ··· ··· · · ·⎟ ⎜ ⎟ ⎜ ⎟
⎜ ⎟ ⎜ ⎟ ⎜ · · · ⎟ + ⎜· · ·⎟ v(ζ, t) (4.31)
⎝ζ̇n−1 ⎠ ⎝ 0 0 0 ··· 1 ⎠ ⎝ζn−1 ⎠ ⎝ 0 ⎠
ζ̇n 0 0 0 ··· 0 ζn 1
 
z = 1 0 0 ··· 0 ζ (4.32)

The system of Eqs. (4.31) and (4.32) has been written in the form of Eq. (4.23),
which means that Eq. (4.27) is the associated asymptotic observer. Therefore, the
observation gain K appearing in Eq. (4.27) can be found using either linear observer
design methods (in that case the elements of the observation error gain matrix K
have fixed values), or the recursive calculation of the continuous-time Kalman Filter
gain described in Sect. 4.2.2.2. If the discrete-time Kalman Filter is to be used then
one has to apply the recursive formulas of Eqs. (4.5) and (4.6) on the discrete-time
equivalent of Eqs. (4.31) and (4.32).

4.2.4 Simulation Tests

4.2.4.1 DC Motor Model

The model of the linear DC motor shown in Fig. 4.3 is described by the set of equations

L I˙ = −ke ω − R I + V
(4.33)
J ω̇ = ke I − kd ω − Γd

with the following notations L: armature inductance, I : armature current, ke : motor


electrical constant, R: armature resistance, V : input voltage, taken as control input,
J : motor inertia, ω: rotor rotation speed, kd : mechanical dumping constant, Γd :
disturbance torque. Assuming Γ˙d = 0 and denoting the state vector as [x1 , x2 , x3 ]T =
[θ, θ̇ , θ̈ ]T , a linear model of the DC motor is obtained:
⎛ ⎞ ⎛ ⎞⎛ ⎞ ⎛ ⎞
ẋ1 0 1 0 x1 0
⎝ẋ2 ⎠ = ⎝0 0 1 ⎠ ⎝x2 ⎠ + ⎝ 0 ⎠ V (4.34)
ẋ3 −ke2 −kd R −J R−kd L x3 ke
0 JL JL JL

Next, control for a nonlinear DC motor model will be presented. Usually, the DC
motor model is considered to be linear by neglecting the effect of armature reaction
or by assuming that the compensating windings remove this effect. Introducing the
armature reaction leads to a nonlinear system. In that case the dynamic model of the
4.2 The Derivative-Free Nonlinear Kalman Filter 153

Fig. 4.3 Parameters of the DC motor model

DC motor model can be written as an affine in-the-input system [202]:

ẋ = f (x) + g(x)u (4.35)

with ẋ denoting the derivative of the motor’s state vector, x = [x1 , x2 , x3 ]T =


[θ, θ̇ , i α ] (θ is the position of the motor, θ̇ is the angular velocity of the motor,
and i α is the armature current). Functions f (x) and g(x) are vector field functions
defined as:
⎛ ⎞ ⎛ ⎞
x2 0
f (x) = ⎝k1 x2 + k2 x3 + k3 x32 + k4 T1 ⎠ , g(x) = ⎝ 0 ⎠ (4.36)
k5 x 2 + k6 x 2 x 3 + k7 x 3 k8

where k1 = −F/J , k2 = A/J , k3 = B/J , k4 = −1/J , k5 = −A/L, k6 = −B/L,


k7 = −R/L, k8 = −1/L, R, and L are the armature resistance and induction,
respectively, and J is the rotor’s inertia, while F is the friction. Now, considering
k4 T1 as disturbance, the state-space equation of the DC motor can be rewritten as

ẋ1 = x2
ẋ2 = k1 x2 + k2 x3 + k3 x32 + k4 T1 (4.37)
ẋ3 = k5 x2 + k6 x2 x3 + k7 x3 + k8 u

where T1 the load torque and u is the terminal voltage. From the second row of
Eq. (4.37) one obtains,

ẍ2 = k1 ẋ2 + k2 ẋ3 + 2k3 x3 ẋ3 ⇒


(4.38)
ẍ2 = k1 ẋ2 + k2 ẋ3 + 2k3 k5 x2 x3 + 2k3 k6 x2 x32 + 2k3 k7 x32 + 2k3 k8 x3 u
154 4 Nonlinear Kalman Filtering Based on Differential Flatness Theory

Thus the input–output relation can be written as

ẍ2 = f¯(x) + ḡ(x)u (4.39)

where, f¯(x) = k1 ẋ2 + k2 ẋ3 + 2k3 k5 x2 x3 + 2k3 k6 x2 x32 + 2k3 k7 x32 , and ḡ(x) =
2k3 k8 x3 . Taking k1 = 0 and considering the torque T1 as external disturbance, the
nonlinear DC motor model of Eq. (4.37) becomes

ẋ1 = x2
ẋ2 = k2 x3 + k3 x32 (4.40)
ẋ3 = k5 x2 + k6 x2 x3 + k7 x3 + k8 u

Then, setting the output to be y = x1 one can see that all state variables xi , i = 1, 2, 3
and the control input u can be expressed as functions of this output and its derivatives.
Indeed it holds
x1 = y
x2 = ẏ

−k2 + |k22 +4k3 ÿ| (4.41)
x3 = 2k3
u = ḡ(x)
1
[y (3) − f¯(x)]

The aforementioned system of Eq. (4.40) can be written in the Brunovsky (canonical)
form: ⎛ ⎞ ⎛ ⎞⎛ ⎞ ⎛ ⎞
ẏ1 010 y1 0
⎝ ẏ2 ⎠ = ⎝0 0 1⎠ ⎝ y2 ⎠ + ⎝0⎠ v (4.42)
ẏ3 000 y3 1

where v = f¯(x, t) + ḡ(x, t)u. Denoting the state vector of the transformed descrip-
tion of the system as y = [y1 , y2 , y)3]T , the measurement (observation) equation
becomes
z 1 = y1 ⇒
(4.43)
z 1 = [1 0 0]y

(r )
Finally, using a control input of the form u = ḡ(x̂, t)−1 [− f¯(x̂, t)+ ym + K cT e +u c ]
it is possible to make the electric motor’s angle track any desirable setpoint.

4.2.4.2 Evaluation Experiments

The dynamic model of the DC motor given in Eq. (4.39) is considered. The control
law described above is used to make the motor track the desirable trajectory. It is
assumed that only encoder measurements are available (angle θ ), thus the state vector
x used in the control law is not directly measured and has to be estimated through
filtering. First, state estimation-based control is implemented with the use of the
4.2 The Derivative-Free Nonlinear Kalman Filter 155

Extended Kalman Filter. The associated covariance matrices Q and R were taken to
be diagonal, both having diagonal elements equal to 10−3 . The feedback controller’s
gain appearing was taken to be K T = [60, 30, 20]. The initial value of the system’s
state vector was x(0) = [0, 0, 0]T while the initial value of the estimated state vector
was x̂(0) = [1, 1, 1]T . The estimation error covariance matrix P ∈ 3×3 and the
EKF gain K ∈ 3×1 were used in Eqs. (4.5) and (4.6). The sampling period was
taken to be Ts = 0.01 s. The obtained results for the case of a seesaw and a sinusoidal
setpoint are shown in Figs. 4.4, 4.5, 4.6 and 4.7. The reference setpoint in denoted
by the red line, the state vector variables of the motor are denoted by the dashed blue
line, while the estimated state vector elements are described by the green line.
Next, state estimation-based control was implemented with the use of the
Unscented Kalman Filter. As explained the UKF does not require linearization of
the system’s dynamical model and does not incorporate the calculation of Jacobians.
Since linearization errors are avoided, the Unscented Kalman Filter results in more
robust state estimation thus also making more accurate the tracking of the reference
setpoints by the associated control loop. It can be also noticed that the variations of
the control signal are quite smooth. The associated simulation results are depicted
in Figs. 4.8, 4.9, 4.10 and 4.11.
Finally, in the case of state estimation-based control with the use of the derivative-
free nonlinear Kalman Filter (DKF), the estimation of the state vector x̂ is obtained
by applying derivative-free Kalman Filtering to the linearized model of Eqs. (4.44)
and (4.45), according to Eqs. (4.5) and (4.6). Starting from Eq. (4.39) and defining
ζ1 = θ , ζ2 = θ̇ , and ζ3 = θ̈ the state-space equations of the motor are written as:

(a) 1.5
EKF − x1 (b) 1.5
EKF − x1

1 1
position x of the motor (rad)

position x 1 of the motor (rad)

0.5 0.5

0 0
1

−0.5 −0.5

−1 −1

−1.5 −1.5
0 5 10 15 20 0 5 10 15 20
t (sec) t (sec)

Fig. 4.4 Variable x1 of the state vector in state estimation with use of the Extended Kalman Filter,
a when tracking a seesaw setpoint, b when tracking a sinusoidal setpoint
156 4 Nonlinear Kalman Filtering Based on Differential Flatness Theory

(a) 3
EKF − x2 (b) 3
EKF − x2

velocity x of the motor (rad/sec)


velocity x2 of the motor (rad/sec)

2 2

1 1

0 0

2
−1 −1

−2 −2

−3 −3
0 5 10 15 20 0 5 10 15 20
t (sec) t (sec)

Fig. 4.5 Variable x2 of the state vector in state estimation with use of the Extended Kalman Filter,
a when tracking a seesaw setpoint, b when tracking a sinusoidal setpoint

(a) 6
EKF − x3 (b) 6
EKF − x3
acceleration x of the motor (rad/sec2)
acceleration x of the motor (rad/sec2)

4 4

2 2

0 0

−2 −2
3

−4 −4

−6 −6

−8 −8
0 5 10 15 20 0 5 10 15 20
t (sec) t (sec)

Fig. 4.6 Variable x3 of the state vector in estimation performed with use of the Extended Kalman
Filter, a when tracking a seesaw setpoint, b when tracking of a sinusoidal setpoint

⎛ ⎞ ⎛ ⎞⎛ ⎞ ⎛ ⎞
ζ̇1 010 ζ1 0
⎝ζ̇2 ⎠ = ⎝0 0 1⎠ ⎝ζ2 ⎠ + ⎝0⎠ v(ζ, t) (4.44)
ζ̇3 000 ζ3 1
 
z= 100 ζ (4.45)

where v(ζ, t) = f¯(x, t) + ḡ(x, t)u(x, t). To perform state estimation-based (sensor-
less) control only measurements of the rotor’s angle θ were used. As in the EKF case
the associated covariance matrices Q and R were taken to be diagonal, both having
4.2 The Derivative-Free Nonlinear Kalman Filter 157

(a)
control signal Vin of the motor (v.u.)
400
EKF − control input (b) 400 EKF − control input

control signal Vin of the motor (v.u.)


300 300

200 200

100 100

0 0

−100 −100

−200 −200

−300 −300

−400 −400
0 5 10 15 20 0 5 10 15 20
t (sec) t (sec)

Fig. 4.7 Control signal of the Extended Kalman Filter-based control loop, a when tracking a seesaw
setpoint, b when tracking a sinusoidal setpoint

(a) 1.5
UKF − x1 (b) 1.5
UKF − x1
position x1 of the motor (rad)

1 1
position x of the motor (rad)

0.5 0.5

0 0
1

−0.5 −0.5

−1 −1

−1.5 −1.5
0 5 10 15 20 0 5 10 15 20
t (sec) t (sec)

Fig. 4.8 Variable x1 of the state vector in state estimation with use of the Unscented Kalman Filter,
a when tracking a seesaw setpoint, b when tracking a sinusoidal setpoint

diagonal elements equal to 10−3 . The tracking performance of the derivative-free


nonlinear Kalman Filter-based control loop, in the case of a seesaw and a sinusoidal
setpoint are depicted in Figs. 4.12, 4.13, 4.14 and 4.15.
Moreover, results on the accuracy of the performed estimation are presented in
Tables 4.1 and 4.2. Table 4.1 shows the accuracy of the setpoint tracking in state
estimation-based control implemented with the use of the considered nonlinear filters.
Table 4.2 shows the accuracy of estimation when the nonlinear filters were used only
for reconstructing the motor’s state vector out of output measurements, while control
was implemented with feedback of the complete state vector. The measure used for
evaluating the accuracy of the estimation performed by the nonlinear filters, as well
158 4 Nonlinear Kalman Filtering Based on Differential Flatness Theory

(a)
velocity x2 of the motor (rad/sec)
3
UKF − x2 (b) 3
UKF − x2

velocity x2 of the motor (rad/sec)


2 2

1 1

0 0

−1 −1

−2 −2

−3 −3
0 5 10 15 20 0 5 10 15 20
t (sec) t (sec)

Fig. 4.9 Variable x2 of the state vector in state estimation with use of the Unscented Kalman Filter,
a when tracking a seesaw setpoint, b when tracking a sinusoidal setpoint

(a) UKF − x3 (b) UKF − x3


6 6
acceleration x of the motor (rad/sec2)

acceleration x of the motor (rad/sec 2)

4 4

2 2

0 0

−2 −2
3

−4 −4

−6 −6

−8 −8
0 5 10 15 20 0 5 10 15 20
t (sec) t (sec)

Fig. 4.10 Variable x3 of the state vector in estimation was performed with use of the Unscented
Kalman Filter, a when tracking a seesaw setpoint, b when tracking of a sinusoidal setpoint

as the accuracy of tracking of the state estimation-based control loops was the Mean
Square Error (MSE). Alternatively, the Cramer–Rao Lower Bound (CRLB) could
have been considered [574].
It can be observed that comparing to EKF the derivative-free nonlinear Kalman
Filter results in smaller estimation errors for the system’s state variables and con-
sequently the accuracy of tracking of the reference setpoints is also improved. The
ranges of variation of the control signal are also kept small. Using the derivative-
free nonlinear Kalman Filter the performance of the state estimation-based control
is comparable to the one obtained when using the Unscented Kalman Filter for
4.2 The Derivative-Free Nonlinear Kalman Filter 159

(a) UKF − control input (b) UKF − control input


400 400
control signal Vin of the motor (v.u.)

control signal Vin of the motor (v.u.)


300 300

200 200

100 100

0 0

−100 −100

−200 −200

−300 −300

−400 −400
0 5 10 15 20 0 5 10 15 20
t (sec) t (sec)

Fig. 4.11 Control signal of the Unscented Kalman Filter-based control loop, a when tracking a
seesaw setpoint, b when tracking a sinusoidal setpoint

(a) 1.5
DKF − x1 (b) 1.5
DKF − x1

1 1
position x of the motor (rad)
position x of the motor (rad)

0.5 0.5

0 0
1
1

−0.5 −0.5

−1 −1

−1.5 −1.5
0 5 10 15 20 0 5 10 15 20
t (sec) t (sec)

Fig. 4.12 Variable x1 of the state vector in state estimation with use of the derivative-free Kalman
Filter, a when tracking a seesaw setpoint, b when tracking a sinusoidal setpoint

estimating the nonmeasurable state vector parameters. It can be also noted that in
terms of computation cost the proposed derivative-free nonlinear Kalman Filtering
(DKF) approach has some advantages comparing to the Unscented Kalman Filter:
since the DKF follows the fast recursion of the standard Kalman Filter it does not
need to update sigma points at each iteration, to propagate the nonlinear estimation
through these sigma points and to calculate cross-covariance matrices.
The performance of the nonlinear filtering schemes was also tested in state
estimation-based control for the tracking of a setpoint of variable amplitude, fre-
quency, and phase. The associated results for the Extended Kalman Filter have
160 4 Nonlinear Kalman Filtering Based on Differential Flatness Theory

(a)
velocity x 2 of the motor (rad/sec)
3
DKF − x2 (b) 3
DKF − x2

velocity x2 of the motor (rad/sec)


2 2

1 1

0 0

−1 −1

−2 −2

−3 −3
0 5 10 15 20 0 5 10 15 20
t (sec) t (sec)

Fig. 4.13 Variable x2 of the state vector in state estimation with use of the derivative-free Kalman
Filter, a when tracking a seesaw setpoint, b when tracking a sinusoidal setpoint

(a) 6
DKF − x3 (b) 6
DKF − x3
acceleration x of the motor (rad/sec 2)

acceleration x3 of the motor (rad/sec )


2

4 4

2 2

0 0

−2 −2
3

−4 −4

−6 −6

−8 −8
0 5 10 15 20 0 5 10 15 20
t (sec) t (sec)

Fig. 4.14 Variable x3 of the state vector in estimation was performed with use of the derivative-free
Kalman Filter, a when tracking a seesaw setpoint, b when tracking of a sinusoidal setpoint

been given in Figs. 4.16 and 4.17, for the Unscented Kalman Filter have been given
in Figs. 4.18 and 4.19, while for derivative-free Kalman filter have been given in
Figs. 4.20 and 4.21. Again the reference setpoint is denoted by the red line, the state
vector variables of the motor are denoted by the dashed blue line, while the estimated
state vector elements are described by the green line. The improved performance suc-
ceeded by the derivative-free nonlinear Kalman Filter (DKF) can be noticed once
more.
4.2 The Derivative-Free Nonlinear Kalman Filter 161

(a) DKF − control input (b) DKF − control input


400 400
control signal Vin of the motor (v.u.)

control signal Vin of the motor (v.u.)


300 300

200 200

100 100

0 0

−100 −100

−200 −200

−300 −300

−400 −400
0 5 10 15 20 0 5 10 15 20
t (sec) t (sec)

Fig. 4.15 Control signal of the derivative-free Kalman Filter-based control loop, a when tracking
a seesaw setpoint, b when tracking a sinusoidal setpoint

Table 4.1 MSE for state x1 x2 x3


estimation-based control
EKF 4.104e − 2 6.416e − 2 2.579e − 1
UKF 4.034e − 2 6.258e − 2 2.546e − 1
DKF 3.978e − 2 6.069e − 2 2.451e − 1

Table 4.2 MSE for nonlinear x1 x2 x3


filters
EKF 1.103e − 4 3.223e − 4 2.748e − 3
UKF 1.277e − 6 5.399e − 4 1.839e − 3
DKF 1.566e − 6 1.974e − 5 2.960e − 5

Using the derivative-free nonlinear Kalman Filter, process and measurement


noises affecting the motor’s model are taken into account in the filter’s recursion
and an optimal state estimate can be obtained despite the effects of these noises.
This holds if the uncertainties described as process noise are bounded. Moreover,
to compensate for additive external disturbances and model uncertainties one can
consider results on disturbance observers within a Kalman Filter framework [427,
570].
The proposed derivative-free Kalman Filtering approach can contribute to the
development of improved industrial control and fault diagnosis methods. First, the
transformation of the initial nonlinear system to the observer canonical form and the
previously analyzed design of the state estimator, assures stability of the nonlinear
filter and asymptotic elimination of the estimation error. Second, the derivative-free
162 4 Nonlinear Kalman Filtering Based on Differential Flatness Theory

(a) 1.5
EKF − x1 (b) EKF − x2
3

velocity x2 of the motor (rad/sec)


1 2
position x of the motor (rad)

0.5 1

0 0
1

−0.5 −1

−1 −2

−1.5 −3
0 10 20 30 40 50 60 0 10 20 30 40 50 60
t (sec) t (sec)

Fig. 4.16 State estimation-based control with the use of the Extended Kalman Filter for tracking a
sinusoidal setpoint of variable amplitude, frequency, and phase: a state variable x1 , b state variable
x2

(a) 6
EKF − x3 (b) EKF − control input
400
acceleration x of the motor (rad/sec2)

control signal Vin of the motor (v.u.)

4 300

200
2

100
0
0
−2
3

−100
−4
−200

−6 −300

−8 −400
0 10 20 30 40 50 60 0 10 20 30 40 50 60
t (sec) t (sec)

Fig. 4.17 State estimation-based control with the use of the Extended Kalman Filter for tracking a
sinusoidal setpoint of variable amplitude, frequency, and phase: a state variable x3 , b control input

Kalman Filtering approach and the transformation to the observer canonical form
make possible the application of smoothing algorithms (initially designed for linear
systems) that compensate for the effects of delayed sensor measurements in the
control loop. This can be particularly useful in the case of networked control and
fault diagnosis schemes where communication delays and packet drops can affect
the accuracy of the state estimation.
4.2 The Derivative-Free Nonlinear Kalman Filter 163

(a) UKF − x1 (b) UKF − x2


1.5 3

velocity x of the motor (rad/sec)


1 2
position x of the motor (rad)

0.5 1

0 0
1

2
−0.5 −1

−1 −2

−1.5 −3
0 10 20 30 40 50 60 0 10 20 30 40 50 60
t (sec) t (sec)

Fig. 4.18 State estimation-based control with the use of the Unscented Kalman Filter for tracking a
sinusoidal setpoint of variable amplitude, frequency, and phase: a state variable x1 , b state variable
x2

(a) UKF − x3 (b) UKF − control input


6 400
acceleration x of the motor (rad/sec 2)

control signal Vin of the motor (v.u.)

4 300

200
2
100
0
0
−2
3

−100
−4
−200

−6 −300

−8 −400
0 10 20 30 40 50 60 0 10 20 30 40 50 60
t (sec) t (sec)

Fig. 4.19 State estimation-based control with the use of the Unscented Kalman Filter for tracking
a sinusoidal setpoint of variable amplitude, frequency, and phase: a state variable x3 , b control input

4.2.5 Derivative-Free Kalman Filtering for MIMO


Nonlinear Systems

The results of Chap. 3 about transformation of MIMO nonlinear systems into the
canonical form will be generalized toward Derivative-free Kalman Filtering for
MIMO nonlinear dynamical systems. The proposed method for derivative-free
Kalman Filtering for MIMO nonlinear systems will be analyzed through an applica-
tion example. A 2-DOF rigid-link robotic manipulator is considered. The dynamic
164 4 Nonlinear Kalman Filtering Based on Differential Flatness Theory

(a) 1.5
DKF − x1 (b) 3
DKF − x2

velocity x of the motor (rad/sec)


1 2
position x of the motor (rad)

0.5 1

0 0
1

2
−0.5 −1

−1 −2

−1.5 −3
0 10 20 30 40 50 60 0 10 20 30 40 50 60
t (sec) t (sec)

Fig. 4.20 State estimation-based control with the use of the derivative-free nonlinear Kalman Filter
for tracking a sinusoidal setpoint of variable amplitude, frequency, and phase: a state variable x1 ,
b state variable x2

(a) DKF − x3 (b) DKF − control input


6 400
acceleration x of the motor (rad/sec 2)

control signal Vin of the motor (v.u.)

4 300

200
2

100
0
0
−2
3

−100
−4
−200

−6 −300

−8 −400
0 10 20 30 40 50 60 0 10 20 30 40 50 60
t (sec) t (sec)

Fig. 4.21 State estimation-based control with the use of the derivative-free nonlinear Kalman Filter
for tracking a sinusoidal setpoint of variable amplitude, frequency, and phase: a state variable x3 ,
b control input

model of the robot has been analyzed in Chap. 3 and it has been shown that (i) it satis-
fies differential flatness properties, (ii) it can be transformed into the linear canonical
form.
As previously shown this robotic system is a differentially flat one. Next, consid-
ering also the effects of additive disturbances to the joints of the robotic manipulator
the dynamic model becomes
4.2 The Derivative-Free Nonlinear Kalman Filter 165

ẍ1 = f 1 (x, t) + g1 (x, t)u + d̃1


(4.46)
ẍ3 = f 2 (x, t) + g2 (x, t)u + d̃2
       
ẍ1 f (x, t) g (x, t) d̃
= 1 + 1 u+ 1 (4.47)
ẍ3 f 2 (x, t) g2 (x, t) d̃2

Moreover, considering that the model’s structure and parameters are known and
that the additive input disturbance d̃i , i = 1, 2, . . . are also known, the following
feedback linearizing control input is defined
 −1        
g1 (x̂, t) ẍ1d f 1 (x̂, t) K 1T u c1
u= − − e+ (4.48)
g2 (x̂, t) ẍ3d f 2 (x̂, t) K 2T u c2

where [u c1 u c2 ]T is a supervisory control term that is used for the compensation


of the model’s uncertainties as well as of the external disturbances and K iT =
[k1i , k2i , . . . , kn−1
i , kni ] are the rows of the error feedback gain matrix [407, 410].
It is also noted that to perform efficient state estimation under such model uncer-
tainties and external disturbances one can consider results on disturbance observers
within a Kalman Filter framework [427].
Finally, the differentially flat robotic model is written in the Brunovsky (canonical)
form. Considering the state vector x ∈ R 4×1 , with the state variables defined in
Eq. (3.76), the following matrices are defined
⎛ ⎞ ⎛ ⎞
0100 00  
⎜0 0 0 0⎟ ⎜1 0 ⎟ 1000
A=⎝ ⎜ ⎟ ⎜ ⎟
, B = ⎝ ⎠, C = (4.49)
0 0 0 1⎠ 00 0010
0000 01

Using the matrices of Eq. (4.49) one obtains the Brunovsky form of the MIMO robot
model dynamics
ẋ = Ax + Bv
(4.50)
y = Cx

where the new input v is given by


     
f 1 (x, t) g (x, t) d̃
v= + 1 u+ 1 (4.51)
f 2 (x, t) g2 (x, t) d̃2

Prior to performing discrete-time Kalman Filtering for the model of Eq. (4.50) matri-
ces A, B, and C of Eq. (4.49) are turned into discrete-time ones using common dis-
cretization methods. These discrete-time matrices are denoted as Ad , Bd , and Cd ,
respectively.
For the robotic model of Eqs. (4.50) and (4.51) state estimation can be performed
using the standard Kalman Filter recursion, as described in Eqs. (4.5) and (4.6).
166 4 Nonlinear Kalman Filtering Based on Differential Flatness Theory

4.2.6 Simulation Tests

The performance of the proposed derivative-free nonlinear Kalman Filter was tested
in the nonlinear state estimation-based control for a 2-DOF rigid-link robotic manip-
ulator (Fig. 3.7). The differentially flat model of the robot and its transformation to
the Brunovksy form has been analyzed in Sect. 4.2.5. The flat outputs were taken to
be the robot’s joint angles y1 = x1 and y2 = x3 . It has been proven that all state
variables of the robotic model and the associated control inputs, i.e., the torques
applied by the motors to the links’ joints can be written as functions of the flat output
[y1 , y2 ] and of the associated derivatives.
The position and velocity variations for the sinusoidal setpoint for the first joint of
the robotic manipulator are depicted in Fig. 4.22. For the second joint of the 2-DOF
robot the tracking of the position and velocity setpoints is depicted in Fig. 4.23. The
control inputs (motor torques) applied to the first and second joint of the robotic
manipulator are shown in Fig. 4.24.
The performance of the state estimation-based control has been also tested in the
tracking of a seesaw setpoint. The position and velocity variations of the first joint
are demonstrated in Fig. 4.25. Similarly, the tracking of the position and velocity
reference setpoints for the second joint are depicted in Fig. 4.26. The control signal
in the case of tracking of a tracking a seesaw setpoint by the two joints of the robotic
manipulator is shown in Fig. 4.27. The estimated state variables were denoted as
green line whereas the real state variables were denoted as blue lines.

(a) 1.5 (b) 2

1.5
1
state variable x of the robot

state variable x of the robot

1
0.5
0.5
1

0 0

−0.5
−0.5
−1
−1
−1.5

−1.5 −2
0 5 10 15 20 0 5 10 15 20
t (sec) t (sec)

Fig. 4.22 Derivative-free Kalman Filtering: a tracking of a sinusoidal position setpoint (dashed
line) by the angle of the first joint of the robot (continuous line), b tracking of a sinusoidal velocity
setpoint (dashed line) by the angular velocity of the first joint of the robot (continuous line)
4.2 The Derivative-Free Nonlinear Kalman Filter 167

(a) 1.5 (b) 2

1.5
1

state variable x4 of the robot


state variable x3 of the robot

1
0.5
0.5

0 0

−0.5
−0.5
−1
−1
−1.5

−1.5 −2
0 5 10 15 20 0 5 10 15 20
t (sec) t (sec)

Fig. 4.23 Derivative-free Kalman Filtering: a tracking of a sinusoidal position setpoint (dashed
line) by the angle of the second joint of the robot (continuous line), b tracking of a sinusoidal
velocity setpoint (dashed line) by the angular velocity of the second joint of the robot (continuous
line)

(a) 60 (b) 26
24
55
22
control signal of joint 1

control signal of joint 2

50
20

45 18

16
40
14
35
12

30 10
0 5 10 15 20 0 5 10 15 20
t (sec) t (sec)

Fig. 4.24 Tracking of a sinusoidal setpoint by the 2-DOF robotic manipulator with the use of the
derivative-free Kalman Filter: a control input (motor torque) applied to the first joint, b control
input (motor torque) applied to the second joint

Moreover, the derivative-free nonlinear Kalman Filter was tested against the
Extended Kalman Filter which is among the most commonly used estimation meth-
ods for nonlinear dynamical systems. In the latter case, the position and velocity
variations for the sinusoidal setpoint for the first joint of the robotic manipulator are
depicted in Fig. 4.28. For the second joint of the 2-DOF robot the tracking of the
168 4 Nonlinear Kalman Filtering Based on Differential Flatness Theory

(a) 0.6 (b) 2

0.5 1.5

state variable x 2 of the robot


state variable x1 of the robot

0.4 1

0.3 0.5

0.2 0

0.1 −0.5

0 −1

−0.1 −1.5

−0.2 −2
0 5 10 15 20 0 5 10 15 20
t (sec) t (sec)

Fig. 4.25 Derivative-free Kalman Filtering: a tracking of a seesaw position setpoint (dashed line)
by the angle of the first joint of the robot (continuous line), b tracking of a seesaw velocity setpoint
(dashed line) by the angular velocity of the first joint of the robot (continuous line)

(a) 0.6 (b) 2

0.5 1.5
state variable x of the robot
state variable x of the robot

0.4 1

0.3 0.5
4
3

0.2 0

0.1 −0.5

0 −1

−0.1 −1.5

−0.2 −2
0 5 10 15 20 0 5 10 15 20
t (sec) t (sec)

Fig. 4.26 Derivative-free Kalman Filtering: a tracking of a seesaw position setpoint (dashed line)
by the angle of the second joint of the robot (continuous line), b tracking of a seesaw velocity
setpoint (dashed line) by the angular velocity of the second joint of the robot (continuous line)

position and velocity setpoints is depicted in Fig. 4.29. The control inputs (motor
torques) applied to the first and second joint of the robotic manipulator are shown in
Fig. 4.30.
The performance of the state estimation-based control, with the use of the
Extended Kalman Filter is also shown in the tracking of a seesaw setpoint. The
position and velocity variations of the first joint are demonstrated in Fig. 4.31. Simi-
larly, the tracking of the position and velocity reference setpoints for the second joint
4.2 The Derivative-Free Nonlinear Kalman Filter 169

(a) 60 (b) 30
55
25
50
control signal of joint 1

control signal of joint 2


20
45

40 15

35
10
30
5
25

20 0
0 5 10 15 20 0 5 10 15 20
t (sec) t (sec)

Fig. 4.27 Tracking of a seesaw setpoint by the 2-DOF robotic manipulator with the use of the
derivative-free Kalman Filter: a control input (motor torque) applied to the first joint, b control
input (motor torque) applied to the second joint

(a) 1.5 (b) 2

1.5
1
state variable x of the robot
state variable x of the robot

1
0.5
0.5
2
1

0 0

−0.5
−0.5
−1
−1
−1.5

−1.5 −2
0 5 10 15 20 0 5 10 15 20
t (sec) t (sec)

Fig. 4.28 Extended Kalman Filtering: a tracking of a sinusoidal position setpoint (dashed line) by
the angle of the first joint of the robot (continuous line), b tracking of a sinusoidal velocity setpoint
(dashed line) by the angular velocity of the first joint of the robot (continuous line)

are depicted in Fig. 4.32. The control signal in the case of tracking a seesaw setpoint
by the two joints of the robotic manipulator is shown in Fig. 4.33.
Comparing the estimation performed by the derivative-free MIMO nonlinear
Kalman Filter with the one performed by the Extended Kalman Filter it can be
noticed that the derivative-free filtering approach results in more accurate state
170 4 Nonlinear Kalman Filtering Based on Differential Flatness Theory

(a) 1.5 (b) 2

1.5
1
state variable x3 of the robot

state variable x4 of the robot


1
0.5
0.5

0 0

−0.5
−0.5
−1
−1
−1.5

−1.5 −2
0 5 10 15 20 0 5 10 15 20
t (sec) t (sec)

Fig. 4.29 Extended Kalman Filtering: a tracking of a sinusoidal position setpoint (dashed line)
by the angle of the second joint of the robot (continuous line), b tracking of a sinusoidal velocity
setpoint (dashed line) by the angular velocity of the second joint of the robot (continuous line)

(a) 60 (b) 30
59 29

58 28
control signal of joint 1

control signal of joint 2

57 27

56 26

55 25

54 24

53 23

52 22

51 21

50 20
0 5 10 15 20 0 5 10 15 20
t (sec) t (sec)

Fig. 4.30 Tracking of a sinusoidal setpoint by the 2-DOF robotic manipulator with the use of the
Extended Kalman Filter: a control input (motor torque) applied to the first joint, b control input
(motor torque) applied to the second joint

estimates. The precision of the provided estimation is the one depicted in Tables 4.1
and 4.2 of Sect. 4.2.4 for the case of the DC motor. Moreover, comparing the associ-
ated state estimation-based control loop that was based on the derivative-free MIMO
nonlinear Kalman Filter to the control that was based on the Extended Kalman
4.2 The Derivative-Free Nonlinear Kalman Filter 171

(a) 0.7 (b) 2

0.6 1.5
state variable x of the robot

state variable x of the robot


1
0.5
0.5
0.4
1

2
0
0.3
−0.5
0.2
−1

0.1 −1.5

0 −2
0 5 10 15 20 0 5 10 15 20
t (sec) t (sec)

Fig. 4.31 Extended Kalman Filtering: a tracking of a seesaw position setpoint (dashed line) by
the angle of the first joint of the robot (continuous line), b tracking of a seesaw velocity setpoint
(dashed line) by the angular velocity of the first joint of the robot (continuous line)

(a) 0.7 (b) 2

0.6 1.5
state variable x of the robot

state variable x of the robot

1
0.5

0.5
0.4
3

0
0.3
−0.5
0.2
−1

0.1 −1.5

0 −2
0 5 10 15 20 0 5 10 15 20
t (sec) t (sec)

Fig. 4.32 Extended Kalman Filtering: a tracking of a seesaw position setpoint (dashed line) by
the angle of the second joint of the robot (continuous line), b tracking of a seesaw velocity setpoint
(dashed line) by the angular velocity of the second joint of the robot (continuous line)

Filter it was observed that the first control scheme was significantly more robust and
capable of tracking with better accuracy the desirable trajectories. These findings
show the suitability of the considered derivative-free MIMO nonlinear Kalman Fil-
ter for tracking, control, and fault diagnosis tasks.
172 4 Nonlinear Kalman Filtering Based on Differential Flatness Theory

(a) 60 (b) 35

50 30
control signal of joint 1

control signal of joint 2


25
40

20
30
15

20
10

10
5

0 0
0 5 10 15 20 0 5 10 15 20
t (sec) t (sec)

Fig. 4.33 Tracking of a seesaw setpoint by the 2-DOF robotic manipulator with the Extended
Kalman Filter: a control input (motor torque) applied to the first joint, b control input (motor
torque) applied to the second joint

4.3 The Derivative-Free Distributed Nonlinear


Kalman Filter

4.3.1 Overview

This part of the chapter extends the use of the Derivative-free nonlinear Kalman
Filter toward distributed state estimation-based control of nonlinear MIMO systems.
Up to now an established approach for performing distributed state estimation has
been the Extended Information Fitter [427]. In the Extended Information Filter the
local filters do not exchange raw measurements but send to an aggregation filter
their local information matrices (local inverse covariance matrices which can be also
associated to Fisher Information Matrices) and their associated local information
state vectors (products of the local information matrices with the local state vectors)
[264, 414]. The Extended Information Filter performs fusion of state estimates from
local distributed Extended Kalman Filters which in turn are based on the assump-
tion of linearization of the nonlinear system dynamics by first-order Taylor series
expansion and truncation of the higher order linearization terms [329, 369, 402].
Moreover, the Extended Kalman Filter requires the computation of Jacobians which
in the case of high order nonlinear dynamical systems can be a cumbersome proce-
dure. This approach introduces cumulative errors to the state estimation performed
by the local Extended Kalman Filter recursion which is finally transferred to the mas-
ter filter where the aggregate state estimate of the controlled system is computed.
Consequently, these local estimation errors may result in the deterioration of the
performance of the associated control loop or even risk its stability [415, 427].
4.3 The Derivative-Free Distributed Nonlinear Kalman Filter 173

To overcome the aforementioned weaknesses of the Extended Information Filter, a


differential flatness theory-based approach to distributed nonlinear Kalman Filtering
has been proposed [424, 434]. Distributed filtering is now based on a derivative-
free implementation of Kalman Filtering which is shown to be applicable to MIMO
nonlinear dynamical systems [430, 437]. In the proposed derivative-free Kalman
Filtering method the system is first subject to a linearization transformation that is
based on differential flatness theory [429, 495]. Next state estimation is performed by
applying the standard Kalman Filter recursion to the linearized model. Unlike EKF,
the proposed method provides estimates of the state vector of the nonlinear system
without the need for derivatives and Jacobians calculation. By avoiding linearization
approximations, the proposed filtering method improves the accuracy of estimation
of the system state variables, and results in smooth control signal variations and in
minimization of the tracking error of the associated control loop. The chapter extends
the results of [429, 437] towards a networked control scheme that is distorted by
random delays and measurement packets drop.
Finally, the chapter shows that the aggregate state vector produced by a derivative-
free distributed nonlinear Kalman Filter, suitably modified to compensate for com-
munication delays and packet drops, can be used for sensorless control and robotic
visual servoing (see Fig. 5.24). The problem of visual servoing over a network of
synchronized cameras has been previously studied in [478]. In this chapter, visual
servoing over a cameras network is considered for the nonlinear dynamic model of a
multi-DOF robotic manipulator (the considered robotic model stands for a nonlinear
MIMO dynamical system). The position of the robot’s end effector in the carte-
sian space (and equivalently the angles of the robotic links) is measured through m
cameras. In turn, these measurements are processed by m-distributed derivative-free
Kalman Filters thus providing m different estimates of the robot’s state vector. Next,
the local state estimates are fused with the use of the standard Information Filter.
After all, the aggregate estimation of the state vector is used in a control loop which
enables the robotic link to perform trajectory tracking.

4.3.2 Overview of the Extended Information Filter

4.3.2.1 Fusing Estimations from Local Distributed Filters

Again, the discrete-time nonlinear system of Eqs. (4.46) and (4.47) is considered. The
Extended Information Filter (EIF) performs fusion of the local state vector estimates
which are provided by local Extended Kalman Filters, using the Information matrix
and the Information state vector [264]. The Information Matrix is the inverse of the
state vector covariance matrix, and can be also associated to the Fisher Information
matrix [414]. The Information state vector is the product between the Information
matrix and the local state vector estimate
174 4 Nonlinear Kalman Filtering Based on Differential Flatness Theory

Y(k) = P −1 (k) = I (k)


−1 (4.52)
ŷ(k) = P − (k) x̂(k) = Y(k)x̂(k)

The update equation for the Information Matrix and the Information state vector are
given by

Y (k) = P − (k)−1 + JγT (k)R −1 (k)Jγ (k) = Y− (k) + I (k)


ŷ(k) = ŷ− (k) + JγT R(k)−1 [z(k) − γ (x(k)) + Jγ (k)x̂ − (k)] = ŷ− (k) + i(k),
(4.53)

where I (k) = JγT (k)R ( k)−1 Jγ (k) is the associated information matrix and, i(k) =
JγT (k)R ( k)−1 [(z(k) − γ (x(k))) + Jγ x̂ − (k)] is the information state contribution.
The predicted information state vector and Information matrix are obtained from

ŷ− (k) = P − (k)−1 x̂ − (k)


−1 (4.54)
Y− (k) = P − (k) = [Jφ (k)P − (k)Jφ (k)T + Q(k)]−1

It is assumed that an observation vector z i (k) is available for the N different sensor
sites (vision nodes) i = 1, 2, . . . , N and each vision node observes the robot accord-
ing to the local observation model, expressed by z i (k) = γ (x(k)) + vi (k), i =
1, 2, . . . , N , where the local noise vector vi (k)∼N (0, R i ) is assumed to be white
Gaussian and uncorrelated between sensors. The variance of a composite observa-
tion noise vector vk is expressed in terms of the block diagonal matrix R(k) =
diag[R(k)1 , . . . , R N (k)]T . The information contribution can be expressed by a lin-
ear combination of each local information state contribution i i and the associated
information matrix I i at the ith sensor site
N iT −1 i −
i(k) = i=1 Jγ (k)R (k) [z (k) − γ (x(k)) + Jγ (k) x̂ (k)]
i i i
N i T −1 i
(4.55)
I (k) = i=1 Jγ (k)R (k) Jγ (k).
i

Thus, the update equations for fusing the local state estimates is
N
ŷ(k) = ŷ− (k) + iT −1 i −
i=1 Jγ (k)R (k) [z (k) − γ (x(k)) + Jγ (k) x̂ (k)]
i i i
N i T (4.56)
Y(k) = Y− (k) + i=1 Jγ (k)R i (k)−1 Jγi (k)

It is noted that in the Extended Information Filter an aggregation (master) fusion


filter produces a global estimate by using the local sensor information provided by
each local filter. As in the case of the Extended Kalman Filter the local filters which
constitute the Extended information Filter can be written in terms of time update and
measurement update equations.
4.3 The Derivative-Free Distributed Nonlinear Kalman Filter 175

Measurement update: Acquire z(k) and compute

Y (k) = P − (k)−1 + JγT (k)R(k)−1 Jγ (k)


or Y (k) = Y − (k) + I (k)
where I (k) = JγT (k)R −1 (k)Jγ (k), and, (4.57)
ŷ(k) = ŷ − (k) + JγT (k)R(k)−1 [z(k) − γ (x̂(k)) + Jγ x̂ − (k)]
or ŷ(k) = ŷ − (k) + i(k)

Time update: Compute

−1
Y − (k + 1) = P − (k + 1) = [Jφ (k)P(k)Jφ (k)T + Q(k)]−1
−1 −
(4.58)
and y − (k + 1) = P − (k + 1) x̂ (k + 1)

If the derivative-free nonlinear Kalman Filter is used in place of the Extended Kalman
Filter then in the EIF equations the following matrix substitutions should be per-
formed: Jφ (k)→Ad , Jγ (k)→Cd , where matrices Ad and Cd are the discrete-time
equivalents of matrices Ac and Cc which have been defined in Eq. (4.49). Matrices
Ad and Cd can be computed using established discretization methods, as already
explained in Chap. 3. Moreover, the covariance matrices P(k) and P − (k) are the
ones obtained from the linear Kalman Filter update equations given in Sect. 4.2.2.

4.3.2.2 Calculation of the Aggregate State Estimation

The outputs of the local filters are treated as measurements which are fed into the
aggregation fusion filter (see Fig. 4.34) [264]. Then each local filter is expressed by
its respective error covariance and estimate in terms of information contributions and
is described by

−1
Pi −1 (k) = Pi− (k) + JγT (k)R(k)−1 Jγ (k)x̂i (k) =
= Pi (k)(Pi− (k)−1 x̂i− (k)) + JγT (k)R(k)−1 [z i (k) − γ i (x(k)) + Jγi (k)x̂i− (k)]
(4.59)

The global estimate and the associated error covariance for the aggregate fusion filter
can be rewritten in terms of the computed estimates and covariances from the local
filters using the relations
176 4 Nonlinear Kalman Filtering Based on Differential Flatness Theory

Fig. 4.34 Fusion of the distributed state estimates with the use of the Extended Information Filter

JγT (k)R(k)−1 Jγ (k) = Pi (k)−1 − Pi− (k)−1 and


JγT (k)R(k)−1 [z i (k) − γ i (x(k)) + Jγi (k)x̂ − (k)] = (4.60)
= Pi (k)−1 x̂ i (k) − Pi (k)−1 x̂ i (k − 1)

For the general case of N local filters i = 1, . . . , N , the distributed filtering archi-
tecture is described by the following equations
N −1 − P − (k)−1 ]
P(k)−1 = P − (k)−1 + i=1 [Pi (k) i
N (4.61)
x̂(k) = P(k)[P − (k)−1 x̂ − (k) + i=1 (Pi (k)−1 x̂i (k) − Pi− (k)−1 x̂i− (k))]

The global state update equation in the above distributed filter can be written in
terms of the information state vector and of the information N matrix, i.e., ŷ(k) =
ŷ − (k) + i=1
N
( ŷi (k) − ŷi− (k)), and Ŷ (k) = Ŷ − (k) + i=1 (Ŷi (k) − Ŷi− (k)). From
Eq. (4.61) it can be seen that if a local filter (processing station) fails, then the local
covariance matrices and the local state estimates provided by the rest of the filters
will enable an accurate computation of the monitored system’s state vector.
4.3 The Derivative-Free Distributed Nonlinear Kalman Filter 177

4.3.2.3 Derivative-Free Extended Information Filtering

As mentioned above, for the system of Eqs. (4.46) and (4.47), state estimation is
possible by applying the standard Kalman Filter. The system is first turned into
discrete-time form using common discretization methods and then the recursion of
the linear Kalman Filter described in Eqs. (4.5) and (4.6) is applied.
If the derivative-free Kalman Filter is used in place of the Extended Kalman Filter
then in the EIF equations the following matrix substitutions should be performed:
Jφ (k)→Ad , Jγ (k)→Cd , where matrices Ad and Cd are the discrete-time equivalents
of matrices A and C which have been defined Eq. (4.49) and which appear also in
the measurement and time update of the standard Kalman Filter recursion. Matrices
Ad and Cd can be computed using established discretization methods. Moreover, the
covariance matrices P(k) and P − (k) are the ones obtained from the linear Kalman
Filter update equations given in Sect. 4.2.2.

4.3.3 Distributed Filtering for Sensorless Control

4.3.3.1 Visual Servoing Over a Network of Synchronized Cameras

The example to be presented describes the control of a planar robot with the use of
a position-based visual servo that comprises multiple fixed cameras. The chapter’s
approach relies on neither position nor velocity sensors, and directly sets the motor
control current using only visual feedback. Direct visual servoing is implemented
using a distributed filtering scheme which permits to fuse the estimates of the robot’s
state vector computed by local filters, each one associated to a camera in the cameras
network (see Fig. 4.35). The cameras’ network can be based on multiple cameras
connected to a computer with a frame grabber to form a vision node (see Figs. 4.35
and 4.36).
The master computer communicates video synchronization information over the
network to each vision node. Typical sources of measurement noise include charge-
coupled device (CCD) noise, analog-to-digital (A/D) noise, and finite word-length
effects. Under ideal conditions, the effective noise variance from these sources should
remain relatively constant. Occlusions can be also considered as a noise source.
Finally, communication delays and packet drops in the transmission of measure-
ments from the vision sensors to the information processing nodes induce additional
disturbances which should be compensated by the virtual servoing control loop.
178 4 Nonlinear Kalman Filtering Based on Differential Flatness Theory

Fig. 4.35 Distributed cameras network and distributed information processing units for visual
servoing

4.3.3.2 Distributed Filtering for Fusion of the Robot’s State Estimates

Fusion of the local state estimates which are provided by filters running on the vision
nodes can improve the accuracy and robustness of the performed state estimation,
thus also improving the performance of the robot’s control loop [126, 478, 506,
507, 594]. Under the assumption of Gaussian noise, a possible approach for fusing
the state estimates from the distributed local filters is the derivative-free distributed
nonlinear Kalman Filter. As explained in Sect. 4.3.2, this filter (that is also named
derivative-free Extended Information Filter) provides an aggregate state estimate by
weighting the state vectors produced by local Kalman Filters with the inverse of the
associated estimation error covariance matrices.
Visual servoing over the previously described cameras network is considered for
the nonlinear dynamic model of a two-link robotic manipulator. The robot can be
programmed to execute a manufacturing task, such as disassembly or welding [532].
The position of the robot’s end effector in the cartesian space (and consequently
the angle for the robotic link) is measured by the aforementioned m distributed
4.3 The Derivative-Free Distributed Nonlinear Kalman Filter 179

Fig. 4.36 Visual servoing based on fusion of state estimates provided by local derivative-free
nonlinear Kalman Filters

cameras. The proposed multi-camera based robotic control loop can be also useful
in other vision-based industrial robotic applications where the vision is occluded or
heavily disturbed by noise sources, e.g., cutting. In such applications there is need to
fuse measurements from multiple cameras so as to obtain redundancy in the visual
information and permit the robot to complete safely and within the specified accuracy
constraints its assigned tasks [365, 594].

4.3.4 Simulation Tests

The performance of the proposed derivative-free distributed nonlinear Kalman Filter


was tested in the benchmark problem of state estimation-based control for a 2-DOF
rigid-link robotic manipulator (Fig. 3.7). The differentially flat model of the robot and
its transformation to the Brunovksy form have been analyzed in subsection Chap. 3.
It was assumed that only measurements of the angle of the robot’s joints could be
obtained through the robot’s encoders. The reference setpoint for each joint was a
sinusoidal signal of amplitude 1.0 and period T = 10 s. At the beginning of the
180 4 Nonlinear Kalman Filtering Based on Differential Flatness Theory

(a) 1.5 (b) 2

1.5
1
state variable x1 of the robot

state variable x2 of the robot


1
0.5
0.5

0 0

−0.5
−0.5
−1
−1
−1.5

−1.5 −2
0 5 10 15 20 0 5 10 15 20
t (sec) t (sec)

Fig. 4.37 Derivative-free Kalman Filtering: a tracking of a sinusoidal position setpoint (dashed
line) by the angle of the first joint of the robot (continuous line), b tracking of a sinusoidal velocity
setpoint (dashed line) by the angular velocity of the first joint of the robot (continuous line)

second half of the simulation time an additive sinusoidal disturbance of amplitude


A = 0.5 and period T = 10 s was applied to the system. The estimated state variables
were denoted as green lines whereas the real state variables were denoted as blue
lines. The approximations f (x̂) and g(x̂) were used in the derivation of the control
law, given by Eq. (3.86).

(a) 1.5 (b) 2

1.5
1
state variable x of the robot

state variable x4 of the robot

1
0.5
0.5
3

0 0

−0.5
−0.5
−1
−1
−1.5

−1.5 −2
0 5 10 15 20 0 5 10 15 20
t (sec) t (sec)

Fig. 4.38 Derivative-free Kalman Filtering: a tracking of a sinusoidal position setpoint (dashed
line) by the angle of the second joint of the robot (continuous line), b tracking of a sinusoidal
velocity setpoint (dashed line) by the angular velocity of the second joint of the robot (continuous
line)
4.3 The Derivative-Free Distributed Nonlinear Kalman Filter 181

(a) 60 (b) 26
24
55
22
control signal of joint 1

control signal of joint 2


50
20

45 18

16
40
14
35
12

30 10
0 5 10 15 20 0 5 10 15 20
t (sec) t (sec)

Fig. 4.39 Tracking of a sinusoidal setpoint by the 2-DOF robotic manipulator with the use of the
derivative-free Kalman Filter: a control input (motor torque) applied to the first joint, b control
input (motor torque) applied to the second joint

The position and velocity estimates for the first joint of the robot when tracking a
sinusoidal setpoint are depicted in Fig. 4.37. For the second joint of the 2-DOF robot,
and in case of tracking again a sinusoidal setpoint, the position and angular velocity
estimates are depicted in Fig. 4.38. The control inputs (motor torques) applied to the
first and second joint of the robotic manipulator are shown in Fig. 4.39.
Chapter 5
Differential Flatness Theory
and Industrial Robotics

5.1 Overview

In this chapter, the application of differential flatness theory to the design of


controllers and state estimators for industrial robotic manipulators is analyzed. First,
an adaptive neuro-fuzzy controller is designed for a class of underactuated nonlinear
robotic manipulators, under the constraint that the system’s model is unknown. The
control algorithm aims at satisfying the H-infinity tracking performance criterion,
which means that the influence of the modeling errors and the external disturbances
on the tracking error is attenuated to an arbitrary desirable level. After transforming
the robotic system into the canonical form, the resulting control inputs are shown to
contain nonlinear elements which depend on the system’s parameters. The nonlinear
terms which appear in the control inputs are approximated with the use of neuro-fuzzy
networks. It is shown that a suitable learning law can be defined for the aforemen-
tioned neuro-fuzzy approximators so as to preserve the closed-loop system stability.
With the use of Lyapunov stability analysis it is proven that the proposed adaptive
fuzzy control scheme results in H-infinity tracking performance. The efficiency of
the proposed adaptive fuzzy control scheme is checked in the case of a 2-DOF planar
robotic manipulator that has the structure of a closed-chain mechanism.
Next, the chapter proposes a solution to the problem of observer-based adaptive
fuzzy control for MIMO nonlinear dynamical systems, such as multi-DOF indus-
trial robotic manipulators. A flatness-based adaptive fuzzy controller is designed
for a class of nonlinear systems, under the constraint that only the system’s output
is measured and that the system’s model is unknown. This is a control problem of
elevated difficulty because uncertainty exists not only about the system’s dynamic
model but also about the system’s state vector measurements. The control algorithm
aims at satisfying the H-infinity tracking performance criterion, which means that
improved robustness is provided against modeling errors and external disturbances.
By applying differential flatness theory, the MIMO robotic system is transformed
into the canonical form. The resulting control inputs are shown to contain nonlinear

© Springer International Publishing Switzerland 2015 183


G.G. Rigatos, Nonlinear Control and Filtering Using Differential
Flatness Approaches, Studies in Systems, Decision and Control 25,
DOI 10.1007/978-3-319-16420-5_5
184 5 Differential Flatness Theory and Industrial Robotics

elements which depend on the system’s parameters. The nonlinear terms which
appear in the control inputs of the robot are approximated with the use of neuro-fuzzy
networks. Moreover, since only the system’s output is measurable the complete state
vector has to be reconstructed with the use of a state observer. It is shown that a suit-
able learning law can be defined for the aforementioned neuro-fuzzy approximators
so as to preserve the closed-loop system stability. With the use of Lyapunov stability
analysis, it is proven that the proposed observer-based adaptive neuro-fuzzy control
scheme results in H-inifnity tracking performance.
The chapter also shows that apart from adaptive control for the robotic manipula-
tors, it is possible to develop Kalman Filter-based control with the use of differential
flatness theory. The Derivative-free nonlinear Kalman Filter is used for developing
a robust controller which can be applied to underactuated MIMO robotic systems.
The control problem for underactuated robots is nontrivial and becomes further com-
plicated if the robot are subjected to model uncertainties and external disturbances.
Using differential flatness theory, it is shown that the model of a closed-chain 2-DOF
robotic manipulator can be transformed to linear canonical form. For the linearized
equivalent of the robotic system, it is shown that a state feedback controller can be
designed. Since certain elements of the state vector of the linearized system cannot
be measured directly, it is proposed to estimate them with the use of the differential
flatness theory-based method for state estimation (analyzed in Chap. 4) which is the
Derivative-free nonlinear Kalman Filter. Moreover, by redesigning the Kalman Filter
as a disturbance observer, it is shown that one can estimate simultaneously exter-
nal disturbances terms that affect the robotic model or disturbance terms which are
associated with parametric uncertainty. The efficiency of the proposed Kalman Filter-
based control scheme is checked in the case of a 2-DOF planar robotic manipulator
that has the structure of a closed-chain mechanism.
Another section of the chapter analyzes a distributed filtering scheme for robotic
visual servoing capable of compensating for modeling uncertainties and external
disturbances. The visual servoing robotic scheme that was introduced in Chap. 4 is
revisited. This time, the following disturbances are assumed to affect the control
loop: (i) Contact forces at the manipulator’s end effector, (ii) missing measurements
about the robot’s motion characteristics (the measurements transmission link used for
network-based control exhibits delays or data losses). First, it is assumed that during
the compliance task performed by the robot unknown or varying forces are exerted
on its end effector. The derivative-free Extended Information Filter (derivative-free
distributed nonlinear Kalman Filter) is suitably modified through the use of concepts
from disturbance observers theory to compensate for the effect of these perturbations.
Subsequently, the chapter examines the use of the Derivative-free nonlinear
Kalman Filter in the compensation of delayed measurements and data losses in
robotic visual servoing. An analysis is given about the problem of distributed non-
linear filtering over a communication/sensors network, and the use of the estimated
state vector in a control loop. Distributed filtering is now based on a derivative-free
implementation of nonlinear Kalman Filtering. It is shown how the proposed distrib-
uted filtering method can succeed compensation of random delays and packet drops
5.1 Overview 185

which may appear during the transmission of measurements and of state vector esti-
mates, thus assuring a reliable performance of the distributed filtering-based control
scheme. Evaluation tests confirm the improved performance of the Derivative-free
distributed nonlinear Kalman Filter against the Extended Information Filter.

5.2 Adaptive Fuzzy Control of Underactuated


MIMO Robots

5.2.1 Overview

Control of underactuated robots is an important problem for industrial systems tech-


nology. The design of robotic mechanisms that can be controlled with a smaller
number of actuators of actuators than their degrees of freedom enables to reduce
cost and weight of robots and to succeed robustness in the case of actuators’ fail-
ures. The control problem of underactuated robotic manipulators has been studied
in several research articles during the last years [159, 201, 261, 262, 325, 366, 572,
597]. In [159], the property of differential flatness for a class of planar underactuated
open-chain robots having a specific inertia distribution, but driven by only a small
number of actuators has been analyzed. In [596], it was shown that closed-chain
underactuated robots satisfy differential flatness properties and this enables their
transformation into a linearized form for which the design of a feedback controller
becomes easier. In [572], energy-based control for underactuated robotic manipula-
tors has been proposed. In [261, 262] a Lyapunov-based approach to the design of
efficient control for underactuated robots is proposed. In [366], passive velocity field
control and decoupling vector field has been applied to the control of underactuated
mechanical systems. In [325], the problem of point-to-point control for underac-
tuated robotic manipulators has been presented. In [201], an open-loop vibrational
control for an underactuated mechanical system has been studied.
After transformation of the underactuated robotic model to the linear canonical
form, the resulting control input for the underactuated robotic mechanism is shown
to contain nonlinear elements which depend on the system’s parameters. If the para-
meters of the robot are unknown, then the nonlinear terms which appear in the control
signal can be approximated with the use of neuro-fuzzy networks. In this section, it
is shown that a suitable learning law can be defined for the aforementioned neuro-
fuzzy approximators so as to preserve the closed-loop system stability. Lyapunov
stability analysis proves also that the proposed flatness-based adaptive fuzzy control
scheme results in H∞ tracking performance, in accordance to the results of [405,
410, 413, 433].
It is shown that the only assumption needed for the design of the controller and
for succeeding H∞ tracking performance for the control loop is that there exists a
solution for a Riccati equation associated to the linearized error dynamics of the
186 5 Differential Flatness Theory and Industrial Robotics

differentially flat model. This condition holds for underactuated robotic systems,
thus providing a systematic approach to the design of reliable controllers for such
systems [426, 433].

5.2.2 Dynamic Model of the Closed-Chain 2-DOF


Robotic System

5.2.2.1 The 2-DOF Planar Underactuated Robot

The considered closed-chain 2-DOF robotic system depicted in Fig. 5.1 consists of
four bodies: (i) Bodies 1 and 2 are two sliders with masses m1 and m2 , respectively
[159, 597]. Body 3 is connected with a revolute joint to body 1 and has mass m3 ,
length l3 while its moment of inertia is I3 . Similarly body 4 is connected to body 2
with a revolute joint, has mass m4 , length l4 while the associated moment of inertia
is I4 . The motion of the system takes place in the 2D xy plane depicted in Fig. 5.1
while its dynamics is subjected to gravity.
The state variables for the robotic system are as follows q = [q1 , q2 , q3 , q4 ]T : q1
is the displacement of mass m1 along the x-axis, q3 is the turn angle of body 3 round
the revolute joint A. q2 is the displacement of m2 along the x-axis and q4 is the turn
angle of body 4 round the revolute joint B. The following geometric constraints hold:

l3 sin(q3 ) = l4 sin(q4 )
(5.1)
q1 + l3 cos(q3 ) = q2 + l4 cos(q4 )

The control inputs exerted on the robotic model are the horizontal force F1 that
causes the displacement of mass m1 along the x-axis, the torque T3 that causes the
rotation of the link with length l3 round the revolute joint A, the horizontal force

Fig. 5.1 A two-part


underactuated robotic system
constituting a closed-chain
mechanism
5.2 Adaptive Fuzzy Control of Underactuated MIMO Robots 187

F2 that causes the displacement of mass m2 along the x-axis and the torque T4 that
causes the rotation of the link with length l4 round the revolute joint B. Thus, in the
most generic case the input vector can be u = [ f1 , T3 , f2 , T4 ]T . According the Euler-
Lagrange analysis, the dynamic model of the robotic manipulator is obtained [597]

A(q)q̈ + h(q, q̇) = u (5.2)

where ⎛ ⎞
a11 a12 0 0
⎜a21 a22 0 0 ⎟
A(q) = ⎜
⎝ 0
⎟ (5.3)
0 a23 a24 ⎠
0 0 a43 a44

with a11 = m1 + m3 , a12 = a21 = −m3 lc3 sin(q3 ), a22 = m3 lc23 + I3 , a33 = m2 + m4 ,
a34 = a43 = −m4 lc4 sin(q4 ), a44 = m4 lc24 + I4 , and
⎛ ⎞
−m3 lc3 cos(q3 )q̇32
⎜ m3 glc cos(q3 ) ⎟
h(q, q̇) = ⎜ 3
⎝−m4 lc4 cos(q4 )q̇2 ⎠
⎟ (5.4)
4
m4 glc4 cos(q4 )

5.2.2.2 Proof of the Robot’s Dynamic Model Using


the Euler-Lagrange Method

The closed-chain robotic system of Fig. 5.1, presented initially in Sect. 5.2.2 is con-
sidered again. This comprises four masses, out of which mass m1 and mass m2 slide
along the x-axis, while masses m3 and m4 associated with links l3 and l4 perform
both translational and rotational motion in the xy-plane.
For mass m1 one has that the potential energy is P1 = 0 while the kinetic energy
is K1 = 21 m1 q̇12 . For mass m2 one has again that the potential energy is P2 = 0 while
the kinetic energy is K2 = 21 m2 q̇22 .
For mass m3 the potential energy is given by

P3 = m3 glc3 sin(q3 ) (5.5)

The kinetic energy of mass m3 (link l3 ) is due to both translational motion and
rotational motion. Denoting by I3 the moment of inertia for the rotation of the link
l3 , one has the kinetic energy that is associated with the rotational motion is K3,1 =
1 2
2 I3 q̇3 . The kinetic energy of link l3 that is associated with the translational motion
is denoted as K3,2 and is given by

K3,2 = 21 m3 Ċ3 Ċ3T (5.6)


188 5 Differential Flatness Theory and Industrial Robotics

Ċ3 is the velocity of the center of gravity of mass (link) 3 in cartesian coordinates.
Using that the position of the center of gravity of link 3 is the vector

C3 = [q1 + lc3 cos(q3 ), lc3 sin(q3 )] (5.7)

its velocity is computed as follows

Ċ3 = [q̇1 − lc3 sin(q3 )q̇3 , lc3 cos(q3 )q̇3 ] (5.8)

Thus, using Eq. (5.8) the kinetic energy of link 3 that is due to its translational motion
is given by

K3,2 = 21 m3 Ċ3 Ċ3T ⇒


K3,2 = 21 m3 [(q̇1 − lc3 sin(q3 )q̇3 )2 + (lc3 cos(q3 )q̇3 )2 ]⇒ (5.9)
K3,2 = 2 m3 [q̇1
1 2 + lc23 q̇32 − 2lc3 sin(q3 )q̇1 q̇3 ]

Using K3,1 and K3,2 one has that the aggregate kinetic energy of mass (link) m3 is

K3 = 21 I3 q̇32 + 21 m3 [q̇12 + lc23 q̇32 − 2lc3 sin(q3 )q̇1 q̇3 ] (5.10)

For mass m4 the potential energy is given by

P4 = m4 glc4 sin(q4 ) (5.11)

The kinetic energy of mass m4 (link l4 ) is due to both translational motion and
rotational motion. Denoting by I4 the moment of inertia for the rotation of the link
l4 , one has the kinetic energy that is associated with the rotational motion is K4,1 =
1 2
2 I4 q̇4 . The kinetic energy of link l4 that is associated with the translational motion
is denoted as K4,2 and is given by

K4,2 = 21 m4 Ċ4 Ċ4T (5.12)

Ċ4 is the velocity of the center of gravity of mass (link) 4 in cartesian coordinates.
Using that the position of the center of gravity of link 4 is the vector

C4 = [q2 + lc4 cos(q4 ), lc4 sin(q4 )] (5.13)

its velocity is computed as follows

Ċ4 = [q̇2 − lc4 sin(q4 )q̇4 , lc4 cos(q4 )q̇4 ] (5.14)

Thus, using Eq. (5.14) the kinetic energy of link 4 that is due to its translational
motion is given by
5.2 Adaptive Fuzzy Control of Underactuated MIMO Robots 189

K4,2 = 21 m4 Ċ4 Ċ4T ⇒


K4,2 = 2 m4 [(q̇2 − lc4 sin(q4 )q̇4 )2 + (lc4 cos(q4 )q̇4 )2 ]⇒
1
(5.15)
K4,2 = 21 m4 [q̇42 + lc24 q̇42 − 2lc4 sin(q4 )q̇2 q̇4 ]

Using K4,1 and K4,2 one has that the aggregate kinetic energy of mass (link) m4 is

K4 = 21 I4 q̇42 + 21 m4 [q̇22 + lc24 q̇42 − 2lc4 sin(q4 )q̇2 q̇4 ] (5.16)

The Lagrangian of the considered robotic system (closed kinematic mechanism) is


given by
 
L = 4i=1 Ki − 4i=1 Pi ⇒

L = 21 m1 q̇12 + 21 m2 q̇22 +
+ 21 I3 q̇32 + 21 m3 [q̇12 + lc23 q̇32 − 2lc3 sin(q3 )q̇1 q̇3 ]+ (5.17)
+ 21 I4 q̇42 + 2 m4 [q̇2
1 2 + lc24 q̇42 − 2lc4 sin(q4 )q̇2 q̇4 ]+
−m3 glc3 sin(q3 ) − m4 glc4 sin(q4 )

Next, it can be computed that


∂L
∂ q̇1 = m1 q̇1 + m3 q̇1 + m3 lc3 sin(q3 )q̇3 (5.18)

and by differentiating Eq. (5.18) with respect to time gives


∂ ∂L
∂t ∂ q̇1 = (m1 + m3 )q̈1 − m3 lc3 cos(q3 )q̇32 − m3 lc3 sin(q3 )q̈3 (5.19)

while one also obtains


∂L
∂q1 =0 (5.20)

In a similar manner, one computes


∂L
∂ q̇2 = m2 q̇2 + m4 q̇2 − m4 lc4 sin(q4 )q̇4 (5.21)

and by differentiating Eq. (5.21) with respect to time gives


∂ ∂L
∂t ∂ q̇2 = (m2 + m4 )q̈2 − m4 lc4 cos(q4 )q̇42 − m4 lc4 sin(q4 )q̈4 (5.22)

while one also obtains


∂L
∂q2 =0 (5.23)

In an equivalent way one finds


∂L
∂ q̇3 = I3 q̇3 + m3 lc23 q̇3 − m3 lc3 sin(q3 )q̇1 (5.24)

and by differentiating Eq. (5.24) with respect to time gives


190 5 Differential Flatness Theory and Industrial Robotics

∂ ∂L
∂t ∂ q̇3 = I3 q̈3 + m3 lc23 q̈3 − m3 lc3 cos(q3 )q̇1 q̇3 − m3 lc3 sin(q3 )q̈1 (5.25)

while one also obtains


∂L
∂q3 = −m3 lc3 cos(q3 )q̇1 q̇3 − m3 glc3 cos(q3 ) (5.26)

Following the same procedure one gets


∂L
∂ q̇4 = I4 q̇4 + m4 lc24 q̇4 − m4 lc4 sin(q4 )q̇2 (5.27)

and by differentiating Eq. (5.27) with respect to time gives


∂ ∂L
∂t ∂ q̇4 = I4 q̈4 + m4 lc24 q̈4 − m4 lc4 cos(q4 )q̇2 q̇4 − m4 lc4 sin(q4 )q̈2 (5.28)

while one also obtains


∂L
∂q4 = −m4 lc4 cos(q4 )q̇2 q̇4 − m4 glc4 cos(q4 ) (5.29)

Next, by using the previous equations and by applying the Euler-Lagrange principle
one gets
∂ ∂L ∂L
∂t ∂ q̇1 − ∂q1 = F1 ⇒ (5.30)
(m1 + m3 )q̈1 − m3 lc3 sin(q3)q̈3 − m3 lc3 cos(q3 )q̇32 = F1

∂ ∂L ∂L
− ∂q
∂t ∂ q̇2 = F2 ⇒
2 (5.31)
(m2 + m4 )q̈2 − m4 lc4 sin(q4)q̈4 − m4 lc4 cos(q4 )q̇42 = F2

∂ ∂L ∂L
− ∂q
∂t ∂ q̇3 3
= T1 ⇒
−m3 lc3 sin(q3 )q̈1 + (I3 + m3 lc23 )q̈3 − m3 lc3 cos(q3 )q̇1 q̇3 +
+m3 lc3 cos(q3 )q̇1 q̇3 + m3 glc3 cos(q3 ) = T1 ⇒ (5.32)

−m3 lc3 sin(q3 )q̈1 + (I3 + m3 lc23 )q̈3 + m3 glc3 cos(q3 ) = T1

∂ ∂L ∂L
− ∂q
∂t ∂ q̇4 4
= T2 ⇒
−m4 lc4 sin(q4 )q̈2 + (I4 + m4 lc24 )q̈4 − m4 lc4 cos(q4 )q̇2 q̇4 +
+m4 lc4 cos(q4 )q̇2 q̇4 + m4 glc4 cos(q4 ) = T2 ⇒ (5.33)

−m4 lc4 sin(q4 )q̈2 + (I4 + m4 lc24 )q̈4 + m4 glc4 cos(q4 ) = T2

By considering the state vector q̃ = [q1 , q3 , q2 , q4 ]T and by grouping together


Eqs. (5.30), (5.32) and (5.31), (5.33) one has

(m1 + m3 )q̈1 − m3 lc3 sin(q3)q̈3 − m3 lc3 cos(q3 )q̇32 = F1


(5.34)
−m3 lc3 sin(q3 )q̈1 + (I3 + m3 lc23 )q̈3 + m3 glc3 cos(q3 ) = T1
5.2 Adaptive Fuzzy Control of Underactuated MIMO Robots 191

(m2 + m4 )q̈2 − m4 lc4 sin(q4)q̈4 − m4 lc4 cos(q4 )q̇42 = F2


(5.35)
−m4 lc4 sin(q4 )q̈2 + (I4 + m4 lc24 )q̈4 + m4 glc4 cos(q4 ) = T2

Equations (5.34) and (5.35) can now be written in matrix form


⎛ ⎞⎛ ⎞
(m1 + m3 ) −m3 lc3 sin(q3 ) 0 0 q̈1
⎜−m3 lc3 sin(q3 ) (I3 + m3 lc2 ) 0 0 ⎟ ⎜q̈2 ⎟
⎜ 3 ⎟⎜ ⎟+
⎝ 0 0 (m2 + m4 ) −m4 lc4 sin(q4 ) ⎠ ⎝q̈3 ⎠
0 0 −m4 lc4 sin(q4 ) (I4 + m4 lc24 ) q̈4
⎛ ⎞ ⎛ ⎞
−m3 lc3 cos(q3 )q̇32 F1
⎜ m3 glc cos(q3 ) ⎟ ⎜T1 ⎟
+⎜ ⎟ ⎜ ⎟
⎝−m4 lc4 cos(q4 )q̇2 ⎠ = ⎝F2 ⎠
3

4
m4 glc4 cos(q4 ) T2
(5.36)
Equation (5.36) can also take the compact matrix form

A(q̃)q̃¨ + h(q̃, q̃)


˙ = ũ (5.37)

This is the description of the robotic mechanism which has been given in Eqs. (5.2),
(5.3) and (5.4) .

5.2.2.3 Feedback Linearizability of the Robot’s Dynamic Model

Next, the case in which l3 = l4 is examined. Moreover, it is considered that the mass
m2 is connected to a spring with elasticity k2 . Finally, it is assumed that the only
inputs applied to the robotic model are u1 = f1 and u2 = T3 . Then the dynamic
model of the robot becomes [597]

A(ql )q̈ + h(ql , q̇l ) = [u1 , u2 ]T (5.38)

where ql = [q1 , q3 ]T and q = [q1 , q2 , q3 , q4 ]T . The inertia and Coriolis matrices


are defined as

M1 + M2 −2M2 l3 sin(q3 )
A(ql ) = (5.39)
−2M2 l3 sin(q3 ) I3 + I4 + 4M2 l32 sin2 (q3 )

−2M2 l3 q̇32 cos(q3 ) + k2 ld


h(ql , q̇l ) = (5.40)
k4 (q3 − π ) + 2l3 sin(q3 )(2M2 l3 q̇32 cos(q3 ) − k2 ld )

where M1 = m1 + m2 , M2 = m2 + m4 , ld = q1 + 2l3 cos(q3 ) − L. Denoting


x = [q1 , q3 , q̇1 , q̇3 ]T , the robot’s dynamic model can be written in the following
state-space form:
ẋ = f (x) + g1 (x)u1 + g2 (x)u2 (5.41)
192 5 Differential Flatness Theory and Industrial Robotics

where
⎛ ⎞
q̇1
⎜ q̇3 ⎟
⎜ −k l (I +I )+2l M (k (π −q )sin(q )+(I +I )q̇2 cos(q )) ⎟
⎜ 2d 3 4 3 2 4 3 3 3 4 3 3 ⎟
f (x) = ⎜
⎜ M2 (I3 +I4 )+M1 (I3 +I4 +4M2 l32 sin2 (q3 )) ⎟
⎟ (5.42)
⎜ ⎟
⎝ ⎠
k4 (M1 +M2 )(π −q3 )+2I3 M1 sin(q3 )(k2 ld −2l3 M2 q̇3 cos(q3 ))
2

M2 (I3 +I4 )+M1 (I3 +I4 +4M2 l32 sin2 (q3 ))

⎛ ⎞
0
⎜ 0 ⎟
⎜ ⎟
⎜ I3 +I4 +4M2 l32 sin2 (q3 ) ⎟
g1 (x) = ⎜ ⎟
⎜ (I3 +I4 )M2 +M1 (I3 +I4 +4M2 l3 sin (q3 )) ⎟
2 2 (5.43)
⎜ ⎟
⎝ ⎠
2M2 l3 sin(q3 )
(I3 +I4 )M2 +M1 (I3 +I4 +4M2 l32 sin2 (q3 ))

⎛ ⎞
0
⎜ 0 ⎟
⎜ 2M2 l3 sin(q3 ) ⎟
⎜ ⎟
g2 (x) = ⎜ (I3 +I4 )M2 +M1 (I3 +I4 +4M2 l32 sin2 (q3 )) ⎟ (5.44)
⎜ ⎟
⎝ ⎠
M1 +M2
(I3 +I4 )M2 +M1 (I3 +I4 +4M2 l32 sin2 (q3 ))

The robotic system is underactuated when only one of the control inputs is enabled.
It can be proven that when the only input is u1 = F1 then the robotic system is not
static feedback linearizable.
Next, the case in which the only control input is u2 = T3 is examined. When
k2 = 0 and k4 = 0 then the robotic model admits static feedback linearization.
Equivalently, with the use of the feedback linearization criteria stated in Chap. 1
this means that (i) the distribution D3 = [g(x), adf (x) g(x), adf2(x) g(x), adf3(x) g(x)]
has full rank and (ii) the vector fields D0 = [g(x)], D1 = [g(x), adf (x) g(x)] and
D2 = [g(x), adf (x) g(x), adf2(x) g(x)] are involutive.

5.2.3 Linearization of the Closed-Chain 2-DOF Robotic


System Using Lie Algebra Theory

After having proven that the closed-chain robotic manipulator admits static feedback
linearization, its transformation to a linear form will be attempted using suitably
chosen feedback linearizing outputs. The following linearizing output is defined first

z1 = y = h1 (q) = (M1 + M2 )q1 + 2M2 l3 cos(q3 ) (5.45)


5.2 Adaptive Fuzzy Control of Underactuated MIMO Robots 193

Applying Lie-algebra theory, it holds that [238]


⎛ ⎞
f1
⎜ ⎟
∂h1 ∂h1 ∂h1 ∂h1 ⎜f2 ⎟
z2 = Lf h1 = ∂q1 ∂q3 ∂ q̇1 ∂ q̇3 ⎝ ⎠ ⇒
f3
f4 ⎛ ⎞
f1
 ⎜f2 ⎟ (5.46)
z2 = Lf h1 = (M1 + M2 −2M2 l3 sin(q3 ) 0 0) ⎜ ⎟
⎝ f3 ⎠ ⇒
f4
z2 = Lf h1 = (M1 + M2 )f1 − 2M2 l3 sin(q3 )f2 ⇒
z2 = Lf h1 = (M1 + M2 )q̇1 − 2M2 l3 sin(q3 )q̇3

Similarly, it holds
⎛ ⎞
f1
⎜f ⎟
∂z2 ∂z2 ∂z2 ∂z2 ⎜ 2 ⎟
z3 = Lf2 h1 = ∂q1 ∂q3 ∂ q̇1 ∂ q̇3 ⎝f ⎠ ⇒
3
f4 ⎛ ⎞
f1 (5.47)
 ⎜ f2 ⎟

z3 = Lf h1 = 0 −2M2 l3 cos(q3 )q̇3 (M1 + M2 ) −2M2 l3 sin(q3 ) ⎝ ⎠ ⇒
2 ⎟
f3
f4
z3 = Lf2 h1 = (M1 + M2 )f3 − 2M2 l3 sin(q3 )f4 − 2M2 l3 cos(q3 )q̇3 f2

It holds that

q̈1 = f3 + ga3 u1 + gb3 u2 ⇒q̈1 = f3 + gb3 u2 ⇒f3 = q̈1 − gb3 u2


(5.48)
q̈3 = f4 + ga4 u1 + gb4 u2 ⇒q̈4 = f4 + gb4 u2 ⇒f4 = q̈3 − gb4 u2

Therefore, it holds

z3 = (M1 + M2 )f3 − 2M2 l3 sin(q3 )f4 − 2M2 l3 cos(q̇3 )f2 ⇒


z3 = (M1 + M2 )q̈1 − (M1 + M2 )gb2 u2 − 2M2 l3 sin(q3 )q̈3 + (5.49)
+2M2 l3 sin(q3 )gb4 u2 − 2M2 l3 cos(q3 )q̇32

or equivalently
z3 = (M1 + M2 )q̈1 − 2M2 l3 sin(q3 )q̈3

(M1 +M2 )2M2 l3 sin(q3 )


− (I u2
3 +I4 )M2 +M1 (I3 +I4 +4M2 l3 sin (q3 ))
2 2

(5.50)
(M1 +M2 )2M2 l3 sin(q3 )
+ (I u2
3 +I4 )M2 +M1 (I3 +I4 +4M2 l3 sin (q3 ))
2 2

−2M2 l3 cos(q3 )q̇32


194 5 Differential Flatness Theory and Industrial Robotics

Consequently, it holds that

z3 = (M1 + M2 )q̈1 − 2M2 l3 sin(q3 )q̈3 − 2M2 l3 q̇32 cos(q3 ) (5.51)

Using Eqs. (5.38)–(5.40) one obtains that

(M1 + M2 )q̈1 − 2M2 l3 sin(q3 )q̈3 = 2M2 l3 q̇32 cos(q3 ) − k2 ld + u1 (5.52)

with u1 = 0 due to underactuation. Therefore, it holds

z3 = 2M2 l3 q̇32 cos(q3 ) − k2 ld − 2M2 l3 q̇32 cos(q3 )⇒


(5.53)
z3 = −k2 ld ⇒z3 = −k2 (q1 + 2l3 cos(q3 ) − L)

Similarly, one has


⎛ ⎞
f1
⎜f ⎟
∂z3 ∂z3 ∂z3 ∂z3 ⎜ 2 ⎟
z4 = Lf3 h1 (q) = ∂q1 ∂q3 ∂ q̇1 ∂ q̇3 ⎝f ⎠ ⇒
3
f4
⎛ ⎞ (5.54)
f1
 ⎜f2 ⎟
z4 = −k2 2k2 l3 sin(q3 ) 0 0 ⎜ ⎟
⎝ f3 ⎠ ⇒
f4
z4 = −k2 f1 + 2k2 l3 sin(q3 )f2 ⇒z4 = −k2 q̇1 + 2k2 l3 sin(q3 )q̇3

Moreover, it holds that

ż4 = Lf4 h1 + Lga Lf3 h1 u1 + Lgb Lf3 h1 u2 (5.55)

Therefore,
⎛ ⎞
f1
f ⎟
∂z4 ∂z4 ∂z4 ∂z4 ⎜
Lf h1 = ∂q1 ∂q3 ∂ q̇1 ∂ q̇3 ⎜
4 2⎟
⎝ f3 ⎠ ⇒
f4 ⎛ ⎞
f1
 ⎜f2 ⎟ (5.56)
Lf h1 = 0 2k2 l3 cos(q3 )q̇3 −k2 2k2 l3 sin(q3 ) ⎜
4 ⎟
⎝ f3 ⎠ ⇒
f4
Lf4 h1 = 2k2 l3 cos(q3 )q̇3 f2 − k2 f3 + 2k2 l3 sin(q3 )f4 ⇒
Lf4 h1 = 2k2 l3 cos(q3 )q̇32 − k2 f3 + 2k2 l3 sin(q3 )f4
5.2 Adaptive Fuzzy Control of Underactuated MIMO Robots 195

It holds that u1 = 0 and


⎛ ⎞
gb1
g ⎟
∂z4 ∂z4 ∂z4 ∂z4 ⎜ ⎜ b2 ⎟
Lgb Lf3 h1 = ∂q1 ∂q3 ∂ q̇1 ∂ q̇3 ⎝g ⎠ ⇒
b3
gb4 ⎛ ⎞ (5.57)
gb1
 ⎜gb2 ⎟
Lgb Lf3 h1 = 0 2k3 l3 cos(q3 )q̇3 −k2 2k2 l3 sin(q3 ) ⎜ ⎟
⎝gb3 ⎠
gb4

which can be also written as


2M2 l3 sin(q3 )
Lgb Lf3 h1 = −k2 (I +
3 +I4 )M2 +M1 (I3 +I4 +4M2 l3 sin (q3 ))
2 2
M1 +M2
+2k2 l3 sin(q3 ) (I3 +I4 )M2 +M1 (I3 +I4 +4M2 l32 sin2 (q3 ))

(5.58)
2k2 l3 sin(q3 )M1
Lgb Lf3 h1 = (I3 +I4 )M2 +M1 (I3 +I4 +4M2 l32 sin2 (q3 ))

Using next the relation

ż4 = Lf(4) h1 + Lga Lf3 h1 u1 + Lgb Lf3 h1 u2 = v (5.59)

and that ż1 = z2 , ż2 = z3 , ż3 = z4 one has that the robotic model can be written in
the linear canonical (Brunovsky) form
⎛ ⎞ ⎛ ⎞⎛ ⎞ ⎛ ⎞
ż1 0 1 0 0 z1 0
⎜ż2 ⎟ ⎜0 0 1 0⎟ ⎜ z2 ⎟ ⎜ 0 ⎟
⎜ ⎟=⎜ ⎟⎜ ⎟ + ⎜ ⎟v (5.60)
⎝ż3 ⎠ ⎝0 0 0 1 ⎠ ⎝ z3 ⎠ ⎝ 0 ⎠
ż4 0 0 0 0 z4 1

For the linearized system, a suitable feedback control law is

v = ż4d − k1 (z4 − z4d ) − k2 (z3 − z3d ) − k3 (z2 − z2d ) − k4 (z1 − z1d ) (5.61)

5.2.4 Differential Flatness of the Underactuated Manipulator

5.2.4.1 Differential Flatness of the Closed-Chain 2-DOF Robotic System

Next, a linearized equivalent description for the robot’s kinematic chain will be
obtained with the use of differential flatness theory. The following flat output is
chosen
y = (M1 + M2 )q1 + 2M2 l3 cos(q3 ) (5.62)
196 5 Differential Flatness Theory and Industrial Robotics

It holds that

ẏ = (M1 + M2 )q̇1 − 2M2 l3 sin(q3 )q̇3 ⇒


(5.63)
ÿ = (M1 + M2 )q̈1 = 2M2 l3 sin(q3 )q̈3 − 2M2 l3 cos(q3 )q̇32

Using Eqs. (5.2)–(5.4) it holds that

(M1 + M2 )q̈1 − 2M2 l3 sin(q3 )q̈3 = 2M2 l3 q̇32 cos(q3 ) − k2 ld + u1 (5.64)

where due to underactuation one has u1 = F1 = 0. Therefore, it holds

ÿ = −k2 ld ⇒ÿ = −k2 (q1 + 2l3 cos(q3 ) − L) (5.65)

Consequently
y(3) = −k2 [q̇1 − 2l3 sin(q3 )q̇3 ] (5.66)

and, respectively

y(4) = −k2 q̈1 + 2k2 l3 cos(q3 )q̇32 + 2k2 l3 sin(q3 )q̈3 (5.67)

From Eq. (12.112) describing the flat output and from the equations of its higher
order derivatives one has a set of equations which can be solved with respect to the
state variables q1 , q3 , q̇1 and q̇3 . It holds that
k2 y−M2 ÿ+M2 k2 L
q1 = k 2 M1 (5.68)

2 q1 −k2 L
q3 = cos−1 ( ÿ+k2k 2 l3
) (5.69)

k2 ẏ+M2 y(3)
q̇1 = k 2 M1
(5.70)

(M1 +M2 )q̇1 −ẏ


q̇3 = 1
sin(q3 ) 2M2 l3 (5.71)

Having expressed the elements of the state vector q as functions of the flat output and
its derivatives and knowing that q̈1 = f3 +ga3 u1 +gb3 u2 and q̈3 = f4 +ga4 u1 +gb4 u2 ,
it holds that the control inputs u1 and u2 can be also written as functions of the flat
output and its derivatives. Therefore, the robotic system stands for a differentially
flat model.

5.2.4.2 Design of a Flatness-Based Controller for the Closed-Chain


2-DOF Robotic System

From the relation q̇ = f (q) + ga (q)u1 + gb (q)u2 and the associated relations about
f (q), ga q and gb (q) it holds
5.2 Adaptive Fuzzy Control of Underactuated MIMO Robots 197

q̈1 = f3 + ga3 u1 + gb3 u2 ⇒q̈1 = f3 + gb3 u2 ⇒

−k2 ld (I3 +I4 )+2l3 M2 [k4 (π −q3 )sin(q3 )+(I3 +I4 )q̇32 cos(q3 )]
q̈1 = M2 (I3 +I4 )+M1 (I3 +I4 +4M2 l32 sin2 (q3 ))
+ (5.72)
2M2 l3 sin(q3 )
+ (I +I )M +M (I +I +4M l2 sin2 (q )) u2
3 4 2 1 3 4 2 3 3

Equivalently, one has

q̈3 = f4 + ga4 u1 + gb4 u2 ⇒q̈3 = f3 + gb4 u2 ⇒

k4 (M1 +M2 )(π −q3 )+2l3 M1 sin(q3 )[K2 ld −2l3 M2 q̇32 cos(q3 )]
q̈3 = M2 (I3 +I4 )+M1 (I3 +I4 +4M2 l32 sin2 (q3 ))
+ (5.73)
1 +M2
+ (I +I )M +M M u2
1 (I3 +I4 +4M2 l3 sin (q3 ))
2 2
3 4 2

Consequently, it holds

y(4) = −k2 q̈1 + 2k2 l3 cos(q3 )q̇32 + 2k2 l3 sin(q3 )q̈3 ⇒


y(4)
= −k2 (f3 + gb3 )u2 + 2k2 l3 cos(q3 )q̇32 + 2k2 l3 sin(q3 )(f4 + gb4 u2 )⇒
(4)
y = 2k2 l3 cos(q3 )q̇32 − k2 f3 + 2k2 l3 sin(q3 )f4 + [−k2 gb3 + 2k2 l3 sin(q3 )gb4 ]u2 ⇒
y(4) = fv + gv u⇒y(4) = v
(5.74)
where v = fv + gv u2 with

fv = 2k2 l3 cos(q3 )q̇32 − k2 f3 + 2k2 l3 sin(q3 )f4


(5.75)
gv = −k2 gb3 + 2k2 l3 sin(q3 )gb4

The following new state variables are defined z1 = y, z2 = ẏ, z3 = ÿ and z4 =


y(3) . For the new state variables, a description of the system in the linear canonical
(Brunovsky) form is obtained
⎛ ⎞ ⎛ ⎞⎛ ⎞ ⎛ ⎞
ż1 0 1 0 0 z1 0
⎜ż2 ⎟ ⎜0 0 1 0⎟ ⎜ z2 ⎟ ⎜ 0 ⎟
⎜ ⎟=⎜ ⎟⎜ ⎟ + ⎜ ⎟v (5.76)
⎝ż3 ⎠ ⎝0 0 0 1 ⎠ ⎝ z3 ⎠ ⎝ 0 ⎠
ż4 0 0 0 0 z4 1

Considering that the linear displacement of the left part of the kinematic chain q1 is
measurable, and that the same holds for the turn angle q3 of joint A one has that the
flat output y = (M1 + M2 )q1 + 2M2 l3 cos(q3 ) is also a measurable variable.
Using the description of system in the linear canonical form, the appropriate
control law is

v = ż4d − k1 (z4 − z4d ) − k2 (z3 − z3d ) − k3 (z2 − z2d ) − k4 (z1 − z1d ) (5.77)
198 5 Differential Flatness Theory and Industrial Robotics

Moreover, using that the transformed control input that is applied to the robot is
v = fv + gv u2 , one can compute the real control input u2 = gv−1 (v − fv ).

5.2.5 Flatness-Based Adaptive Fuzzy Control


for the Underactuated Robot

5.2.5.1 Design of an Indirect Adaptive Controller

After transforming the dynamic model of the robotic mechanism into the linear
canonical form, the design of a state feedback controller becomes possible. To cope
with the lack of knowledge about the model’s parameters adaptive fuzzy control will
be implemented. The design of the adaptive fuzzy control scheme for the robotic
model that is transformed to the canonical (Brunovsky) form has been explained
in Chap. 3. Moreover, the stages of the associated Lyapunov stability analysis have
been given, and it has been explained that the proposed adaptive fuzzy control method
succeeds H∞ tracking performance for the closed-loop.
The unknown dynamics of the robot is modeled with the use of neuro-fuzzy
approximators. These have as inputs the state variables of the robotic model xi , i =
1, . . . , 4. Thus one arrives at the approximation of the unknown dynamics of the
robot fˆ (x) and ĝ(x), which in turn are used for the computation of the control signal
u.

5.2.6 Simulation Tests

The efficiency of the proposed adaptive fuzzy control scheme for the underactuated
robotic manipulator was evaluated in the tracking of various setpoints for state vari-
able q1 i.e., the linear displacement of mass M1 of the mechanism and state variable
q3 , i.e., the rotation angle of joint A. As it can be observed in Figs. 5.2, 5.3 and 5.4,
the proposed control scheme enabled accurate tracking of the reference setpoints
by the robot’s state variables. Indicative results about the estimation of unknown
functions fv (x, t) and gv (x, t) in the robot’s dynamics by the neuro-fuzzy approxi-
mators is shown in Fig. 5.5. By including an additional term in the control loop that
was based on the disturbances estimation, it became possible to compensate for the
disturbances effects.
5.3 Observer-Based Adaptive Fuzzy Control of MIMO Robots 199

(a) 20
x1 − xd1 3 (b) 20 2.5

x2 − xd2

x1 − xd1

x2 − xd2
2.5
10 10 2
2
0 0 1.5
1.5
−10 1 −10 1
0 20 40 60 0 20 40 60 0 20 40 60 0 20 40 60
time (sec) time (sec) time (sec) time (sec)
6 0.6 6 0.3
x3 − xd3

x4 − xd4

x3 − xd3

x4 − xd4
4 0.4 4 0.2
2 0.2 2 0.1
0 0 0 0
−2 −0.2 −2 −0.1
0 20 40 60 0 20 40 60 0 20 40 60 0 20 40 60
time (sec) time (sec) time (sec) time (sec)

Fig. 5.2 Convergence of the robot’s state variables: a setpoint 1, b setpoint 2

(a) 15 2.5 (b) 20 3


x1 − xd1
x1 − xd1

x2 − xd2

x2 − xd2
10 2.5
2 10
5 2
1.5 0
0 1.5
−5 1 −10 1
0 20 40 60 0 20 40 60 0 20 40 60 0 20 40 60
time (sec) time (sec) time (sec) time (sec)
6 0.3 6 0.6
x3 − xd3

x4 − xd4

x3 − xd3

x4 − xd4

4 0.2 4 0.4
2 0.1 2 0.2
0 0 0 0
−2 −0.1 −2 −0.2
0 20 40 60 0 20 40 60 0 20 40 60 0 20 40 60
time (sec) time (sec) time (sec) time (sec)

Fig. 5.3 Convergence of the robot’s state variables: a to setpoint 3, b to setpoint 4

5.3 Observer-Based Adaptive Fuzzy Control


of MIMO Robots

5.3.1 Overview

The chapter also proposes a solution to the problem of observer-based adaptive


fuzzy control for MIMO nonlinear dynamical systems (e.g., robotic manipulators).
The objective of this section is to design an adaptive fuzzy controller for a class of
nonlinear systems, under the constraint that only the system’s output is measured
and that the system’s model is unknown. The control algorithm aims at satisfying the
H∞ tracking performance criterion, which means that the influence of the modeling
200 5 Differential Flatness Theory and Industrial Robotics

(a) 20
x1 − xd1 3 (b) 30 3

x2 − xd2

x1 − xd1

x2 − xd2
2.5 20 2.5
10
2 10 2
0
1.5 0 1.5
−10 1 −10 1
0 20 40 60 0 20 40 60 0 20 40 60 0 20 40 60
time (sec) time (sec) time (sec) time (sec)
6 x4 − xd4 0.6 6 0.6

x3 − xd3

x4 − xd4
x3 − xd3

4 0.4 4 0.4
2 0.2 2 0.2
0 0 0 0
−2 −0.2 −2 −0.2
0 20 40 60 0 20 40 60 0 20 40 60 0 20 40 60
time (sec) time (sec) time (sec) time (sec)

Fig. 5.4 Convergence of the robot’s state variables: a to setpoint 5, b to setpoint 6

(a) 100 50
80 45
real vs estimated function g
real vs estimated function f

60 40
40 35
20 30
0 25
−20 20
−40 15
−60 10
−80 5
−100 0
0 10 20 30 40 50 60 0 10 20 30 40 50 60
time (sec) time (sec)
(b) 100 50
80 45
real vs estimated function g
real vs estimated function f

60 40
40 35
20 30
0 25
−20 20
−40 15
−60 10
−80 5
−100 0
0 10 20 30 40 50 60 0 10 20 30 40 50 60
time (sec) time (sec)

Fig. 5.5 Estimation of functions fv (x, t) and gv (x, t) of the robot dynamics by neuro-fuzzy networks
when tracking: a setpoint 1, b setpoint 2
5.3 Observer-Based Adaptive Fuzzy Control of MIMO Robots 201

errors and the external disturbances on the tracking error is attenuated to an arbitrary
desirable level. Differential flatness theory is used to transform the MIMO robotic
system into the canonical form. The resulting control inputs are shown to contain
nonlinear elements which depend on the system’s parameters. Since the parameters
of the system are unknown, then the nonlinear terms which appear in the control
inputs have to be approximated with the use of neuro-fuzzy networks. Moreover,
since only the system’s output is measurable the complete state vector has to be
reconstructed with the use of a state observer. In the current section, it is shown that
a suitable learning law can be defined for the aforementioned neuro-fuzzy approxi-
mators so as to preserve the closed-loop system stability. Lyapunov stability analysis
also proves that the proposed observer-based adaptive fuzzy control scheme results
in H∞ tracking performance, in accordance to the results of [282, 407, 410, 413].
For the design of the observer-based adaptive fuzzy controller, one has to solve
two Riccati equations, where the first one is associated with the controller and the
second one is associated with the observer. Parameters that affect the closed-loop
robustness are: (i) The feedback gain vector K, (ii) the observer’s gain vector Ko ,
and (iii) the positive definite matrices P1 and P2 which come from the solution of
the two algebraic Riccati equations and which weigh the above-mentioned observer
and controller terms. The proposed control architecture guarantees that, the output
of the closed-loop system will asymptotically track the desired trajectory and that
H∞ performance will be achieved.

5.3.2 Estimation of the Robot’s State Vector

In the case of a system with non-completely measurable state vector, the structure
and the stability properties of a MIMO adaptive fuzzy controller based on differential
flatness theory have been explained in Sect. 3.4. Now, the problem of controller is
more demanding because one cannot use the complete state vector of the system in the
feedback loop. With the application of differential flatness theory, in Chap. 3 it was
shown that the 2-DOF robotic model can be decomposed into the trivial subsystems
of Eq. (3.47), that is
(r ) p
yi i = fi (x) + j=1 gij (x)uj + dj (5.78)

which can be also written in the vector form

y(r) = f (x) + g(x)u + d (5.79)

As noted, the control of the robotic system already depicted in Fig. 3.7 described by
Eq. (3.70) and by its equivalent canonical form of Eq. (3.49) becomes more compli-
cated when the state vector x is not directly measurable and has to be reconstructed
through a state observer. The following definitions are used
202 5 Differential Flatness Theory and Industrial Robotics

• error of the state vector e = x − xm


• error of the estimated state vector ê = x̂ − xm
• observation error ẽ = e − ê = (x − xm ) − (x̂ − xm )
When an observer is used to reconstruct the state vector, the control law of Eq. (3.68)
is written as
u = ĝ−1 (x̂|θg )[−fˆ (x̂|θf ) + ym
(r)
− K T ê + uc ] (5.80)

Applying Eq. (5.80) to the nonlinear system described by Eq. (5.79), results into

(r)
y(r) = f (x) + g(x)ĝ−1 (x̂)[−fˆ (x̂) + ym − K T ê + uc ] + d⇒
(r)
= f (x) + [g(x) − ĝ(x̂) + ĝ(x̂)]ĝ (x̂)[−fˆ (x̂) + ym − K T ê + uc ] + d⇒
y(r) −1
(r)
y(r) = [f (x) − fˆ (x̂)] + [g(x) − ĝ(x̂)]u + ym − K T ê + uc + d
(5.81)
(r)
It holds that e = x − xm ⇒ y(r) = e(r) + ym . Substituting y(r) in the above equation
gives
(r) (r)
e(r) + ym = ym − K T ê + uc + [f (x) − fˆ (x̂)]+
(5.82)
+[g(x) − ĝ(x̂)]u + d

and equivalently

ė = Ae − BK T ê + Buc + B{[f (x) − fˆ (x̂)]+


(5.83)
+[g(x) − ĝ(x̂)]u + d̃}

e1 = C T e (5.84)

where e = [e1 , e2 , . . . , ep ]T with ei = [ei , ėi , ëi , . . . , eiri −1 ]T , i = 1, 2, . . . , p and


equivalently ê = [ê1 , ê2 , . . . , êp ]T with êi = [êi , ėˆ i , ëˆ i , . . . , êiri −1 ]T , i = 1, 2, . . . , p.
Matrices A, B and C have been defined in Eq. (3.48).
A state observer is designed according to Eqs. (5.83) and (5.84) and is given by
[524]:
ê˙ = Aê − BK T ê + Ko [e1 − C T ê] (5.85)

ê1 = C T ê (5.86)

The feedback gain matrix is denoted as K ∈ Rn×p . The observation gain matrix is
denoted as Ko ∈ Rn×p and its elements are selected so as to assure the asymptotic
elimination of the observation error.
5.3 Observer-Based Adaptive Fuzzy Control of MIMO Robots 203

5.3.3 Application of Flatness-Based Adaptive Fuzzy Control

The dynamic model of the 2-DOF robotic manipulator was first analyzed in Chap. 3.
The considered 2-DOF robotic model consists of two rigid links which are rotated
by DC motors, as shown in Fig. 5.6. It has been proven that, the considered robotic
system is a differentially flat one.
Next, taking into account also the effects of additive disturbances to the joints of
the robotic manipulator the dynamic model becomes

ẍ1 = f1 (x, t) + g1 (x, t)u + d1


(5.87)
ẍ3 = f2 (x, t) + g2 (x, t)u + d2



ẍ1 f1 (x, t) g1 (x, t) d


= + u+ 1 (5.88)
ẍ3 f2 (x, t) g2 (x, t) d2

It was also proven that by applying the following control input



−1  d     

ĝ (x, t) ẍ1 fˆ1 (x, t) K1T u
u= 1 − ˆ − e + c1 (5.89)
ĝ2 (x, t) ẍ3d f2 (x, t) K2T uc2

where [uc1 uc2 ]T is a robust control term that is used for the compensation of the
model’s uncertainties as well as of the external disturbances and using the feedback
gain vector KiT = [k1i , k2i , . . . , kn−1
i , kni ], the closed-loop tracking error dynamics
becomes

Fig. 5.6 Rigid-link 2-DOF robotic manipulator and joints’ actuation with the use of DC motors
204 5 Differential Flatness Theory and Industrial Robotics
 
f1 (x, t) − fˆ1 (x, t)
ė = (A − BK T )e + Buc +B +
f2 (x, t) − fˆ2 (x, t)
(5.90)


g1 (x, t) − ĝ1 (x, t)
+ u + d̃
g2 (x, t) − ĝ2 (x, t)

where, matrices A, B, K T have been defined as


⎛ ⎞ ⎛ ⎞
0100 0 0
⎜0 0 0 0 ⎟ ⎜1 0⎟
A=⎜ ⎟ ⎜
⎝0 0 0 1 ⎠ , B = ⎝0

0⎠
0000 0 1 (5.91)

K11 K21 K31 K41


KT =
K12 K22 K32 K42

When the estimated state vector x̂ is used in the feedback control loop, equivalently
to Eq. (10.182) one has
 
f1 (x, t) − fˆ1 (x̂, t)
ė = Ae − BK T ê + Buc + B +
f2 (x, t) − fˆ2 (x̂, t)
(5.92)


g1 (x, t) − ĝ1 (x̂, t)
+ u + d̃
g2 (x, t) − ĝ2 (x̂, t)

and considering that the approximation error w is now denoted as


 

f1 (x, t) − fˆ1 (x̂, t) g1 (x, t) − ĝ1 (x̂, t)


w= + u (5.93)
f2 (x, t) − fˆ2 (x̂, t) g2 (x, t) − ĝ2 (x̂, t)

Equation (5.92) can be also written as

ė = Ae − BK T ê + Buc + Bw + Bd̃ (5.94)

The associated state observer will be described again by Eqs. (5.85) and (5.86).

5.3.4 Dynamics of the Observation Error

For the transformed state vector of the robot, the observation error is defined as
ẽ = e − ê = x − x̂. Substructing Eq. (5.85) from Eq. (5.83) as well as Eq. (5.86) from
Eq. (5.84) one gets
5.3 Observer-Based Adaptive Fuzzy Control of MIMO Robots 205

ė − ê˙ = A(e − ê) + Buc + B{[f (x, t) − fˆ (x̂, t)]+


+[g(x, t) − ĝ(x̂, t)]u + d̃} − Ko C T (e − ê)

e1 − ê1 = C T (e − ê)

or equivalently

ẽ˙ = Aẽ + Buc + B{[f (x, t) − fˆ (x̂, t)] + [g(x, t) − ĝ(x̂, t)]u + d̃} − Ko C T ẽ

ẽ1 = C T ẽ

which can be written as

ẽ˙ = (A − Ko C T )ẽ + Buc + B{[f (x, t) − fˆ (x̂, t)] + [g(x, t) − ĝ(x̂, t)]u + d̃}
(5.95)

ẽ1 = C T ẽ (5.96)

or equivalently, it can be written as

ẽ˙ = (A − Ko C T )ẽ + Buc + Bw + d̃ (5.97)

ẽ1 = C T ẽ (5.98)

5.3.5 Approximation of the System’s Unknown Dynamics

Next, the following approximators of the system’s unknown dynamics are defined
 
ˆ 4×1 fˆ (x̂|θ ) ∈ R1×1
ˆf (x̂) = f1 (x̂|θf ) x̂ ∈ R 1 f
(5.99)
fˆ2 (x̂|θf ) x̂ ∈ R4×1 fˆ2 (x̂|θf ) ∈ R1×1

with kernel functions n


j=1 μAj (x̂j )
i
i,j
φf (x̂) = N n (5.100)
i=1 j=1 μA (x̂j )
i
j

where l = 1, 2, x̂ is the estimate of the state vector and μAi (x̂) is the ith membership
j
function of the antecedent (IF) part of the lth fuzzy rule. Similarly, the following
approximators of the unknown system dynamics are defined with the use of the
estimated state vector x̂

ĝ1 (x̂|θg ) x̂ ∈ R4×1 ĝ1 (x̂|θg ) ∈ R1×2


ĝ(x̂) = (5.101)
ĝ2 (x̂|θg ) x̂ ∈ R4×1 ĝ2 (x̂|θg ) ∈ R1×2
206 5 Differential Flatness Theory and Industrial Robotics

The values of the weights that result in optimal approximation are

θf∗ = arg minθf ∈Mθf [supx̂∈Ux̂ (f (x) − fˆ (x̂|θf ))]


(5.102)
θg∗ = arg minθg ∈Mθg [supx̂∈Ux̂ (g(x) − ĝ(x̂|θg ))]

where the variation ranges for the weights are defined as

Mθf = {θf ∈ Rh : ||θf ||≤mθf }


(5.103)
Mθg = {θg ∈ Rh : ||θg ||≤mθg }

Using Eq. (5.93), the value of the approximation error that corresponds to the optimal
values of the weights vectors θf∗ and θg∗ one has

w = f (x, t) − fˆ (x̂|θf∗ ) + g(x, t) − ĝ(x̂|θg∗ ) u (5.104)

which is next written as