CHAPTER 1. MODELING 1
1.1. Linear systems 1
1.2. Mechanical systems 2
1.3. Servomotors 4
1.4. Exercises 4
1.5. Solutions 21
CHAPTER 2. SIMULATION 47
2.1. Concept of vector field 47
2.2. Graphical representation 49
2.2.1. Patterns 50
2.2.2. Rotation matrix 50
2.2.3. Homogeneous coordinates 52
2.3. Simulation 54
2.3.1. Euler's method 54
2.3.2. Runge-Kutta method 55
2.3.3. Taylor's method 56
2.4. Exercises 56
2.5. Solutions 67
CHAPTER 3. LINEAR SYSTEMS 85
3.1. Stability 85
3.2. Laplace transform 87
3.2.1. Laplace variable 87
3.2.2. Transfer function 88
3.2.3. Laplace transform 88
3.2.4. Input-output relation 90
3.3. Relationship between state and transfer representations 90
3.4. Exercises 92
3.5. Solutions 103
CHAPTER 4. LINEAR CONTROL 127
4.1. Controllability and observability 128
4.2. State feedback control 129
4.3. Output feedback control 130
4.4. Summary 133
4.5. Exercises 134
4.6. Solutions 150
CHAPTER 5. LINEARIZED CONTROL 185
5.1. Linearization 185
5.1.1. Linearization of a function 185
5.1.2. Linearization of a dynamic system 187
5.1.3. Linearization around an operating point 187
5.2. Stabilization of a nonlinear system 188
5.3. Exercises 191
5.4. Solutions 207
1
Modeling
We will call modeling the step that consists of finding a more or less accurate state representation of the system we are looking at. In general, constant parameters appear in the state equations (such as the mass or the inertial moment of a body, the coefficient of viscous friction, the capacitance of a capacitor, etc.). In these cases, an identification step may prove to be necessary. In this book, we will assume that all the parameters are known, otherwise we invite the reader to consult Eric Walter's book [WAL 14] for a broad range of identification methods. Of course, no systematic methodology exists that can be used to model a system. The goal of this chapter and of the following exercises is to present, using several varied examples, how to obtain a state representation.
1.1. Linear systems
In the continuous-time case, linear systems can be described by the following state equations:
Linear systems are rather rare in nature. However, they are relatively easy to manipulate using linear algebra techniques and often approximate in an acceptable manner the nonlinear systems around their operating point.
1.2. Mechanical systems
The fundamental principle of dynamics allows us to easily find the state equations of mechanical systems (such as robots). The resulting calculations are relatively complicated for complex systems and the use of computer algebra systems may prove to be useful. In order to obtain the state equations of a mechanical system composed of several subsystems S1, S2, . . . , Sm, assumed to be rigid, we follow three steps:
1)
Obtaining the differential equations. For each subsystem
Sk, with mass
m and inertial matrix J, the following relations must be applied:
where the fi are the forces acting on the subsystem Sk, Mfi represents the torque created by the force fi on Sk, with respect to its center. The vector a represents the tangential acceleration of Sk and the vector represents the angular acceleration of Sk. After decomposing these 2m vectorial equations according to their components, we obtain 6m scalar differential equations such that some of them might be degenerate.
2)
Removing the components of the internal forces. In differential equations there are the so-called
bonding forces, which are internal to the whole mechanical system, even though they are external to each subsystem composing it. They represent the action of a subsystem
Sk on another subsystem
Sl. Following the action-reaction principle, the existence of such a force, denoted by f
k,
l , implies the existence of another force f
l,
k, representing the action of
Sl on
Sk, such that Through a formal manipulation of the differential equations and by taking into account the equations due to the action-reaction principle, it is possible to remove the internal forces. The resulting number of differential equations has to be reduced to the number
n of degrees of freedom
q1, . . . ,
qn of the system. 3)
Obtaining the state equations. We then have to isolate the second derivative from the set of
n differential equations in such a manner to obtain a vectorial relation such as:
where u is the vector of external forces that are not derived from a potential (in other words, those which we apply to the system). The state equations are then written as:
A mechanical system whose dynamics can be described by the relation will be referred to as holonomic. For a holonomic system, q and are thus independent. If there is a so-called non-holonomic constraint that links the two of them (of the form the system will be referred to as non-holonomic. Such systems may be found for instance in mobile robots with wheels [LAU 01]. Readers interested in more details on the modeling of mechanical systems may consult [KHA 07].
1.3. Servomotors
A mechanical system is controlled by forces or torques and obeys a dynamic model that depends on many poorly known coefficients. This same mechanical system represented by a kinematic model is controlled by positions, velocities or accelerations. The kinematic model depends on well-known geometric coefficients and is a lot easier to put into equations. In practice, we move from a dynamic model to its kinematic equivalent by adding servomotors. In summary, a servomotor is a direct current motor with an electrical control circuit and a sensor (of the position, velocity or acceleration). The control circuit computes the voltage u to give to the motor in order for the value measured by the sensor corresponds to the setpoint w. In practice, the signal w is generally given in the form of a square wave called pulse-width modulation (PWM) ). There are three types of servomotors:
- the
position servo. The sensor measures the position (or the angle)
x of the motor and the control rule is expressed as
u =
k (
x -
w). If
k is large, we may conclude that
x w; - the
velocity servo. The sensor measures the velocity (or the angular velocity) of the motor and the control rule is expressed as If
k is large, we have - the
acceleration servo. The sensor measures the acceleration (tangential or angular) of the motor and the control rule is expressed as If
k is large, we have
w.
1.4. Exercises
EXERCISE 1.1.- Integrator The integrator is a linear system described by the differential equation =
u. Find a state representation for this system. Give this representation in a matrix form.
EXERCISE 1.2.- Second order system Let us consider the system with input
u and output
y described by the second order differential equation: Taking x =(
y, ), find a state equation for this system. Give it in matrix form.
EXERCISE 1.3.- Mass-spring system Let us consider a system with input
u and output
q1 as shown in
Figure 1.1 (
u is the force applied to the second carriage,
qi is the deviation of the
ith carriage with respect to its point of equilibrium,
ki is the stiffness of the
ith spring and
a is the coefficient of viscous friction).
Figure 1.1. a) Mass-spring system at rest, b) system in any state
Let us take the state vector:
1) Find the state equations of the system. 2) Is this system linear?
EXERCISE 1.4.- Simple pendulum Let us consider the pendulum in
Figure 1.2. The input of this system is the momentum
u exerted on the pendulum around its axis. The output is
y(
t), the algebraic distance between the mass
m and the vertical axis: 1) Determine the state equations of this system. 2) Express the mechanical energy
Em as a function of the state of the system. Show that the latter remains constant when the momentum
u is nil.
EXERCISE 1.5.- Dynamic modeling of an inverted rod pendulum Let us consider the so-called
inverted rod pendulum system, which is composed of a pendulum of length
l placed in an unstable equilibrium on a carriage, as represented in
Figure 1.3. The value
u is the force exerted on the carriage of mass
M,
x indicates the position of the carriage,
? is the angle between the pendulum and the vertical axis and is the force exerted by the carriage on the pendulum. At the extremity
B of the pendulum, a point mass
m is fixated. We may ignore the mass of the rod. Finally,
A is the point of articulation between the rod and the carriage and is the rotation vector associated with the rod. 1) Write the fundamental principle of dynamics as applied on the carriage and the pendulum. 2) Show that the velocity vector at point
B is expressed by the relation Calculate the acceleration of point
B. 3) In order to model the inverted pendulum, we will take the state vector Justify this choice. 4) Find the state equations for the inverted rod pendulum.
Figure 1.2. Simple pendulum with state vector
Figure 1.3. Inverted rod pendulum
EXERCISE 1.6.- Kinematic modeling of an inverted rod pendulum In a kinematic model, the inputs are no longer forces or moments, but kinematic variables, in other words positions, velocities or accelerations. It is the role of servomotors to translate these kinematic variables into forces or moments. Let us take the state equations of the inverted rod pendulum established in the previous exercise: 1) Instead of taking the...