## Abstract

This paper presents a simple methodology for obtaining the entire set of continuous controllers that cause a nonlinear dynamical system to exactly track a given trajectory. The trajectory is provided as a set of algebraic and/or differential equations that may or may not be explicitly dependent on time. Closed-form results are also provided for the real-time optimal control of such systems when the control cost to be minimized is any given weighted norm of the control, and the minimization is done not just of the integral of this norm over a span of time but also at each instant of time. The method provided is inspired by results from analytical dynamics and the close connection between nonlinear control and analytical dynamics is explored. The paper progressively moves from mechanical systems that are described by the second-order differential equations of Newton and/or Lagrange to the first-order equations of Poincaré, and then on to general first-order nonlinear dynamical systems. A numerical example illustrates the methodology.

## 1. Introduction

The development of controllers for nonlinear mechanical systems has been an area of intense research over the last two decades or so. Many controllers that have been developed for trajectory tracking of complex nonlinear and multi-body systems rely on some approximations and/or linearizations (Slotine & Li 1991; Sastry 1999; Naidu 2003). Most control designs restrict controllers for nonlinear systems to be affine in the control inputs (Brogliato *et al*. 2007). Often, the system equations are linearized about the system's nominal trajectory and then the linearized equations are used along with various results from the well-developed theories of linear control. While this often works well in many situations, there are some situations in which better controllers may be needed. This is especially so when highly accurate trajectory tracking is required to be done in real time on systems that are highly nonlinear. Examples include the exact trajectory control of orbital, attitudinal and elastic motions of a multi-body spacecraft system that is required to perform precision tumbling.

To place this paper within the context of the enormous literature that has been generated in the area of tracking control of nonlinear systems and to highlight what is new in it, we provide a brief review of the methods that have been developed so far and that have been applied to numerous areas of application ranging from chemical process control to robotics. Brogliato *et al*. (2007) provide an exhaustive review of the methods that have been developed to date for the tracking control of systems along with over 500 references. They point out that methods developed to date rely heavily on PID-type control and, most often, a linear feedback is provided to track a given trajectory. Chaou & Chang (2004) also provide recent developments on trajectory tracking and deal with the same basic theme (linear feedback) along with numerous applications. The optimality criterion considered in the literature to date is the minimization of the control cost integrated over a suitable span of time. In the robotics literature (Brogliato *et al*. 2007), trajectory tracking using inverse dynamics and model reference control has been used for some time now, and the methods developed therein can be seen as particular subclasses of the formulation discussed in the present work. Nonlinear control methods using controlled Lagrangian and Hamiltonians have also been explored along with passivity theory (Brockett 1977). These methods limit the structure of the control for a mechanical system to be a nonlinear function of its generalized displacement and they usually do not address the issue of control optimality. No such assumptions are made in this paper. Trajectory tracking in the adaptive control context (which is not the subject of this paper) has also been explored together with specific parametrizations to guarantee linearity in the unknown parameters of a system (Sadegh 1990). Thus, the methods used to date primarily rely on linearizations and/or PID-type control, and they posit assumptions on the structure of the control effort.

By contrast, this paper takes a widely different approach that is based on recent results from analytical dynamics. Here the complete nonlinear problem is addressed with no assumptions on the type of controller that is to be used, except that it be continuous. In particular, we do not posit that the control is affine in the inputs, we do not use linearized equations of motion about the desired trajectory, nor do we assume any ‘feedback structure’ to the nonlinear control effort. Furthermore, the optimality criterion used is the minimization of the control cost at *each instant* of time. As far as is known, the results provided here yield new and explicit methods for the control of highly nonlinear systems. Moreover, we provide for the first time the entire class of nonlinear Lipschitz-continuous (LC) controllers that would track the desired trajectory of the system, and we identify from among these controllers the one that minimizes, at each instant of time, a specified weighted norm of the control effort.

Since we illustrate the power of the technique developed herein to ensure the tracking of a Rossler chaotic system by another Lorenz chaotic system, it is appropriate to indicate the state of the art in synchronization of nonlinear chaotic systems. Nearly all the work that has been done to date on the synchronization of chaotic systems deals with synchronization of identical chaotic oscillators that start from different initial conditions. This synchronization is performed by linear feedback between one or more of the phase states of the system (see Chen 2002; Lei *et al*. 2005). A recent monograph (with 350 references) points this out in detail (Boccaletti *et al*. 2002). It is only very recently that the synchronization between two non-identical, low-dimensional chaotic systems has begun to be investigated (Boccaletti *et al*. 2002). One of the few papers on this is by Pyras (1996), which uses linear feedback. Rulkov *et al*. (1995) showed that this type of synchronization could exist. Such synchronization studies have resulted in the so-called imperfect phase synchronization (Zaks *et al*. 1999) in which the systems get ultimately de-synchronized by having intermittent phase slips, and lag synchronization (Rosenblum *et al*. 1997) which results in a time lag between the synchronized systems. Linear feedback has been used in all these studies, with the aim of synchronizing *all* the states of one chaotic system with those of the other. In our example we use non-identical chaotic systems. Our methodology does not assume any *a priori* structure on the control for the synchronization; no restrictions on the chaotic systems being of low dimensionality is required; as illustrated in the example, we can opt to synchronize (at will) one or more of the phase space variables; and, we can obtain the entire set of controllers in closed form that would do the job. Finally, among all these controllers, in the example we show that we can explicitly provide the controller that synchronizes and minimizes a weighted norm of the control effort at each instant of time.

We begin by reformulating the trajectory control problem as a problem of constrained motion in the Lagrangian framework and use the underlying inspiration with which constrained motion in analytical dynamics is orchestrated by Nature (Udwadia & Kalaba 2002). We then expand and further develop this view by first considering mechanical systems described by first-order Poincaré equations and then general nonlinear systems. Closed-form expressions for all the continuous controllers required for trajectory tracking for nonlinear systems that do not make approximations, either in describing the nonlinear system or in the nature of the nonlinear controller employed, are obtained. Such closed-form results appear to be new. Furthermore, no approximations or linearizations are made here with respect to the trajectory that is being tracked, which may be described in terms of nonlinear algebraic equations, nonlinear differential equations or a combination thereof; these descriptions could explicitly involve time also. Moreover, the approach arrives not just at one nonlinear controller for controlling a given nonlinear system, but also at the entire set of continuous controllers that would cause a given set of trajectory descriptions to be exactly satisfied. Furthermore, we show that when the cost function is the weighted norm of the generalized control input, its minimization can be done to yield the optimal controller that minimizes not just the integrated cost over a span of time, but also the cost at each instant of time. Explicit closed-form expressions for the optimal control are obtained.

Section 2*a* of this paper begins with mechanical systems described by the second-order differential equations of the Newtonian and/or Lagrangian mechanics. Section 2*b* deals with Poincaré's first-order differential equations that describe the motion of mechanical systems; this takes us a step further towards general first-order nonlinear dynamical systems. Section 3 deals with the close connection that the set of controllers developed in §2 have with the way Nature seems to orchestrate the control of mechanical systems subjected to trajectory requirements (constraints). The development of such controllers and their close correspondence with (i) Gauss's principle of least constraint and (ii) the recently developed equations of motions for non-ideal constraints are provided. Lessons from the way Nature seems to control mechanical systems are adduced. Section 4 deals with the exact control of general dynamical systems described by a set of nonlinear, non-autonomous ordinary differential equations. Section 5 deals with a numerical example that demonstrates the closed-form development of the control required to be applied to a nonlinear chaotic dynamical system so that it tracks the motions of another different nonlinear chaotic system. Section 6 concludes the paper with some remarks and observations.

## 2. Development of the entire set of controllers that cause a mechanical system to track a given trajectory

### (a) Lagrangian and Newtonian descriptions

Consider an unconstrained nonlinear mechanical system described by the second-order differential equation of motion(2.1)where *q*(*t*) is the *n*-vector (*n* by 1 vector) of generalized coordinates; the dots indicate differentiation with respect to time; and the matrix *M*(*q*, *t*) is a positive-definite *n* by *n* matrix. Equation (2.1) can be obtained using either Newtonian or Lagrangian mechanics (Lagrange 1811; Hamel 1949; Goldstein 1976). The *n*-vector *Q* on the r.h.s. of equation (2.1) is a ‘known’ vector in the sense that it is a known function of its arguments. By ‘unconstrained’ we mean that the components of the initial velocity of the system can be independently assigned.

We next require that this mechanical system be controlled so that it tracks a trajectory that is described by the following consistent set of *m* equations:(2.2)and(2.3)We shall assume that the mechanical system's initial conditions are such as to satisfy these relations at the initial time. The latter set of equations, which are non-integrable, is non-holonomic (Hamel 1949).

In order to control the system so that it *exactly* tracks the required trajectory—i.e. satisfies equations (2.2) and (2.3)—we apply an appropriate control *n*-vector , so that the equation of motion of the controlled system becomes(2.4)where now the components of the *n*-vectors *q*_{0} and satisfy equations (2.2) and (2.3) at the initial time, *t*=0. Throughout this paper, we shall, for brevity, drop the arguments of the various quantities, unless needed for clarity.

We begin by expressing equation (2.4) in terms of the weighted accelerations of the system. For any positive-definite *n* by *n* matrix *N*(*q*, *t*), we define the matrix(2.5)and pre-multiplying equation (2.4) by *N*^{1/2} (*q*, *t*), the ‘scaled’ equation, which we denote using the subscript ‘s’, is obtained as(2.6)where(2.7)(2.8)and(2.9)In equation (2.8), we denote the acceleration of the uncontrolled system by In equation (2.9), can be viewed as the deviation of the acceleration of the controlled system from that of the uncontrolled system. We now differentiate equation (2.2) twice with respect to time *t*, and equation (2.3) once with respect to time, giving the set of equations(2.10)where *A* is an *m* by *n* matrix of rank *k* and *b* is an *m*-vector. Noting equation (2.7), equation (2.10) can be further expressed as(2.11)where . We now express the *n*-vector in terms of its orthogonal projections on the range space of and the null space of *B*_{s}, so that(2.12)In equation (2.12), the matrix *X*^{+} denotes the Moore–Penrose (MP) generalized inverse of the matrix *X* (Moore 1910; Penrose 1955). It should be noted that equation (2.12) is a general identity that is always valid since it arises from the orthogonal partition of the identity matrix . Using equation (2.11) in the first member on the r.h.s. of equation (2.12), and equation (2.6) to replace in the second member, we get(2.13)which, owing to equation (2.6), yields(2.14)But the general solution of the linear set of equations (2.14) is given by (Graybill 2001)(2.15)where the *n*-vector is *any* arbitrary *n*-vector. In the second equality above, we have used the property that in the two members on the r.h.s., along with the second MP-inverse property that . Using equation (2.9), the explicit control force that exactly tracks the trajectory by exactly satisfying the given relations (2.2) and (2.3) is then explicitly given by(2.16)where . We may take to be *C*^{1} (or, more generally, Lipschitz continuous (LC)) to ensure a unique solution to the system of equations (2.4). We hence have the following result.

Consider the mechanical system, which is described by the Lagrange (or Newtonian) equations of motion(2.17)where *M* is an *n* by *n* positive-definite matrix and *q* is an *n*-vector. The system is required to exactly track the trajectory described by the equations(2.18)and(2.19)The controlled system is described by the relation(2.20)where *Q*^{c} is the control.

Assuming that the initial conditions of the mechanical system satisfy these trajectory requirements, the set of all possible controls (or controllers) that causes the controlled system (2.20) to exactly track the required trajectory is explicitly given by(2.21)where is *any arbitrary n*-vector whose components are continuously differentiable—or LC—functions of its arguments; *N*(*q*, *t*) is *any* arbitrary *n* by *n* positive-definite matrix ; is an *m* by *n* matrix; is an *m* by *n* matrix of rank *k*, and is the *m*-vector defined in equation (2.10).

We can abbreviate the two components of the control vector given in equation (2.21) as(2.22)where(2.23)and(2.24)

*Relation* (*2.23*) *can also be given as*(2.25)

Using the relation and equation (2.8), we have , where is the acceleration of the uncontrolled system. The result then follows. ▪

Owing to the generality of the decomposition (2.13), relation (2.21) (alternatively, relations (2.22)–(2.24)) provides the *entire set* of continuous tracking controllers that cause the system to track the trajectory described by equations (2.18) and (2.19).

The explicit closed-form tracking control obtained in equation (2.21), which causes the system to exactly track the given trajectory described by equations (2.18) and (2.19), does *not* contain any Lagrange multipliers, nor does our derivation invoke the notion of a Lagrange multiplier.

We shall next show the following, somewhat remarkable, result.

We again consider the mechanical system described by the nonlinear Lagrange or Newtonian equation (2.17), which needs to be controlled through the addition of a control, *n*-vector , so that the trajectory described by equations (2.18) and (2.19) is exactly tracked. Assuming that the system satisfies the trajectory requirements initially, the optimal controller that causes the system to

exactly track the required trajectory

*and*minimize at

*each instant*of time*t*, the cost(2.26)for a given*n*by*n*positive-definite matrix*N*, is explicitly provided by(2.27)where*B*_{s},*b*and*a*_{s}are as defined before.

Let us define the vector(2.28)We note that by equation (2.26),(2.29)Then in view of equation (2.20), equation (2.28) can be rewritten as(2.30)so that we obtain, using equation (2.8),(2.31)We assume that at the initial time the values of *q*_{0} and satisfy the trajectory requirements, and upon differentiating equations (2.18) and (2.19) we have, as before,(2.32)Using relation (2.31) and denoting *B*_{s}=*AG*, equation (2.32) becomes(2.33)The solution of equation (2.33), subject to the condition that is a minimum, is then given by (Graybill 2001)(2.34)from which we obtain, by using relation (2.28), the explicit expression for the optimal control as(2.35)where we have written out the explicit result *in extensio*. The second equality in equation (2.27) follows from corollary 2.2. ▪

For a given choice of the weighting matrix *N*, we have obtained the explicit closed-form expression for the exact full state controller that tracks the trajectory described by equations (2.18) and (2.19) and minimizes the cost function , under the proviso that the initial conditions of the system satisfy the trajectory description. The minimum cost *J*(*t*) is given by(2.36)Note, as before, that the explicit result given in equation (2.27) does not contain any Lagrange multipliers, nor does our derivation invoke anywhere the notion of a Lagrange multiplier.

Result 2.5 and equation (2.23) show that for a given positive-definite matrix *N*(*q*, *t*) the optimal control that minimizes *J*(*t*) at *each instant* of time is explicitly obtained in closed form by setting in equation (2.22). One way (see corollary 2.8 below) of doing this would be by setting in equation (2.24) (or, in equation (2.21)). More precisely, we have the following result.

*At any instant of time t, at which the arbitrary LC vector* *belongs to the range space of* *, the control given by* (*2.21*) *becomes optimal, in the sense that it minimizes J*(*t*) *at that time*.

When belongs to the range space of at time *t*, we can give for some *m*-vector *γ*. Hence, by equation (2.24), becomes,(2.37)The second equality follows from the fourth MP-inverse property, and the last equality follows from the first MP-inverse property (Graybill 2001). ▪

(i) *The two components* *and* *of the control vector Q*^{c} *given in equation* (*2.22*) *are N-orthogonal to one another and* (ii) *is* (*MN*)*-orthogonal to the null space of the matrix A*.

(i) Since(2.38)The result follows by using the fourth and then the second MP-inverse property (Graybill 2001).

(ii) Substituting for *B*_{s} and using the identity we get(2.39)Any vector belonging to the null space of the matrix *A* satisfies the relation *Av*=0, whose explicit solution is(2.40)where *w* is any *n*-vector. Hence(2.41)since . ▪

*The component* *as defined in* (*2.23*) *belongs to the range space of the matrix* *, and the component* *as defined in equation* (*2.24*) *is N-orthogonal to the range space of* .

The first result is obvious from the expression for in equation (2.23). The second follows because any vector *α* in the range space of can be expressed as(2.42)for some *m*-vector *γ*, and so(2.43)Hence the result. ▪

We note that the range space of is the same as the range space of . This follows because for any vector *γ*, we can always find a vector *α* such that , and vice-versa.

The addition of the second component to the control so that , whatever the LC *n*-vector *z* may be, still ensures that the description of the trajectory given by equations (2.18) and (2.19) is exactly satisfied. However, it contributes an additional amount given by to the cost of the control, since the two components and are *N*-orthogonal to each other (corollary 2.9). Furthermore, if at any time *t* the function belongs to the null space of *B*_{s} this additional cost at that time simply becomes .

It is sometimes advantageous to describe the motion in terms of a system of first-order differential equations instead of a system of second-order equations. One obvious way of doing this is to *define* a new variable, an *n*-vector , so that the equation of motion takes the so-called state space form given by(2.44a)(2.44b)The first equation of this set is simply a definition, whereas the second equation of the set is the one that contains the actual dynamics. And while this is the form often used when numerically integrating equation (2.1), the description of the motion of a mechanical system in terms of a system of first-order differential equations goes far beyond just its use in numerical procedures. For, often these first-order descriptions (i.e. descriptions using first-order differential equations) arise when one wants to use descriptions of motion in terms of coordinates that may be more physically meaningful in the context of a particular problem. For example, the first-order Hamilton's equations describing the motion of mechanical systems are often useful when dealing with systems described by a Hamiltonian, and, more generally, the first-order set of Poincaré equations are often useful when dealing with rigid body and multi-body dynamics. We next obtain the entire set of explicit closed-form controllers for exactly tracking the trajectory of mechanical systems described by Poincaré's equations of motion.

### (b) Poincaré descriptions

The Poincaré equations (Poincaré 1901) are obtained by defining a new variable, an *n*-vector , where is a non-singular matrix whose elements are known functions of *q* and *t*. Denoting the inverse of the matrix by *H*(*q*, *t*), so that , the Lagrange equation (2.1) can be rewritten in first-order form as (Udwadia & Phohomsiri 2007)(2.45)(2.46)where the state variables are now the *n*-vectors *q* and *s*. In rigid body dynamics, the 3-vector *s* is often chosen to constitute the three components of the angular velocity of the body. Here the matrix *M*_{p} is again positive definite. Though both first-order equations are, mathematically speaking, on a par, the first equation of the set (equation (2.45)) is a kinematic relation involving the definition of the new variable *s*—hence, an identity as in equation (2.44*a*)—while the second equation (equation (2.46)) is the dynamical equation of motion. The system is required to track the trajectory described by the consistent relations(2.47)(2.48)The subscripts and superscripts ‘p’ indicate that we are dealing with the Poincaré description of the motion of the dynamical system. In order to control the system so that it exactly tracks this trajectory, we apply a control so that the equation of motion of the controlled system now becomes(2.49)(2.50)and the initial conditions *q*_{0} and *s*_{0} satisfy the trajectory requirements (2.47) and (2.48). The explicit expression for the control force, yielding the entire set of all controllers that will cause the dynamical system described by equations (2.45) and (2.46) to track the required trajectory described by equations (2.47) and (2.48) will now be obtained.

As before, we define the matrix(2.51)where the matrix *N*(*q*, *t*) is any positive-definite matrix, and the scaled variables(2.52)so that relation (2.50) on pre-multiplication with *N*^{1/2} becomes(2.53)which we note is of the same form as equation (2.6), except that we now have *s* instead of *q*, and first derivatives instead of second derivatives with respect to time.

On differentiating equation (2.47) twice with respect to time and differentiating equation (2.48) once with respect to time, and using relation (2.49), we then obtain the matrix equation(2.54)which, upon using the first equation of the set (2.52), can be rewritten as(2.55)where we define the *m* by *n* matrix *B*_{s} of rank *k* by the relation(2.56)Again we note the similarity between equations (2.10) and (2.11) and equations (2.54) and (2.55). We next decompose the *n*-vector as(2.57)in a manner similar to equation (2.12), with the matrix *B*_{s} now defined by equation (2.56). Proceeding along with similar lines as before (equations (2.13)–(2.16)), we then find that(2.58)where is any arbitrary *n*-vector. To ensure a unique solution of equations (2.49) and (2.50), we may then take the components of to be *C*^{1} functions (or, more generally, LC functions) of *q*, *s* and *t*.

Following the same lines as in §2*a*, for any Poincaré system described by equation (2.45) that is required to exactly track the trajectory described by relations (2.47) and (2.48), we now obtain results that are analogous to those given in results 2.1 and 2.5. Using *a*_{s} defined in relation (2.52), and in (2.56), we simply make the following variable changes: , , , , , , and , in the expressions given in equations (2.21) and (2.27) to obtain the corresponding control forces.

We can prove corollaries similar to corollaries 2.2, 2.8–2.10. The same goes for remarks 2.3, 2.4, 2.6, 2.7, 2.11.

## 3. The close connection between nonlinear control and analytical dynamics

Since almost all mechanical systems are nonlinear in their behaviour, including even simple ones like a pendulum, we will be mainly addressing nonlinear systems here. The problem of control can be placed within the context of analytical mechanics by reinterpreting constrained motion in mechanical systems. Consider a mechanical system described by equation (2.17). When the system is further subjected to the trajectory requirements (2.18) and (2.19)—i.e. subjected to further constraints—additional control (constraint) forces are brought into play by Nature so that the controlled (constrained) system moves in such a manner that it satisfies these trajectory requirements (constraints). Thus, the additional control (constraint) that Nature provides may be thought of as the control it generates in order for the system to satisfy the trajectory requirements given by equations (2.18) and (2.19). One might imagine Nature as a control engineer, attempting to control the mechanical system so that it satisfies the given trajectory requirements described by equations (2.18) and (2.19). However, to entertain such an interpretation, one is led to ask the following three questions.

To what extent might Nature be perceived as acting like a control engineer?

Does Nature appear to be performing the control in any kind of an optimal manner?

If so, what is the cost function (or functional) it appears to minimize?

We shall start answering these questions by first asserting that Nature appears to choose the weighting matrix in equation (2.21). Here *M* is the so-called ‘mass matrix’ and appears on the l.h.s. of equation (2.17).

Nature seems to control a mechanical system described by equation (2.17), so it exactly satisfies the trajectory described by the requirements (2.18) and (2.19) by choosing the weighting matrix to be(3.1)

Setting equation (2.21) now yields(3.2)where and . But equation (3.2) is exactly the equation of motion of a general constrained mechanical system, as given by Udwadia (2000) and Udwadia & Kalaba (2002). Hence the result. ▪

If we assume that Nature observes d'Alembert's principle, then it appears to be minimizing the cost(3.3)at *each* instant of time while controlling the system defined by equation (2.17) so it exactly satisfies the trajectory described by the requirements (2.18) and (2.19).

Setting in result 2.5, equation (2.27), which gives the optimal control while minimizing *J*(*t*), yields(3.4)Using this expression for *Q*^{c} in equation (2.20), we find that we obtain the correct equation of motion of a constrained mechanical system that obeys d'Alembert's principle, as given by Udwadia & Kalaba (1992, 1996). ▪

Result 3.2 connects directly with the basic principles of analytical dynamics. In fact, d'Alembert's principle, which is a principle that leads to a mathematical description of motion, which is in close conformity with observations, and which is one of the pivotal assumptions of analytical dynamics, is equivalent to Gauss's principle (Gauss 1829; Udwadia & Kalaba 1996). And Gauss's principle states that: of the entire set of constraint (control) forces that cause a constrained (controlled) mechanical system (2.17) to exactly satisfy the constraints (trajectory) described by requirements (2.18) and (2.19), Nature seems to choose that constraint force that minimizes *J*_{Nature} (*t*) *at each instant of time*.

Thus we find that (i) Nature seems to choose the weighting matrix and (ii) if we assume that d'Alembert's principle is true, then Nature seems to pick the one controller given in result 3.2 that minimizes the cost *J*_{Nature} (*t*). Nature appears to go well beyond what most modern control engineers would try to do, by minimizing the cost *J*_{Nature} given in relation (3.3) *at each instant of time*, rather than minimizing the *integral* of this cost over any given *span* of time, as is the common practice in the field of controls.

When d'Alembert's principle is assumed to be satisfied, Nature appears to be performing *acceleration* feedback control, where the control force is given by(3.5)It is made up of the gain matrix and the feedback error *e*(*t*)≔(*Aa*−*b*). The quantity *e*(*t*) is simply the extent to which the acceleration of the uncontrolled system does not satisfy the trajectory requirements imposed on it by relation (2.10). Hence, Nature appears to be behaving like a control engineer, using feedback control. The minus sign in equation (3.5) is taken so as to be compatible with the control concept of negative feedback. While most modern control engineers usually use integral, velocity and proportional feedback in mechanical systems, few use acceleration feedback as Nature appears to be using. This acceleration feedback does not require the measurement of acceleration because *a* is a function of and , and can be obtained from their measurement, since . Also, the gain matrix *K*_{Nature} used by Nature is complex and its elements are, in general, highly nonlinear functions of *q*, and *t*.

The component of the constraint force used by Nature is always orthogonal to the null space of the matrix *A* given in equation (2.10). By corollary 2.9(ii), is always *MN*-orthogonal to the null space of *A*. Since Nature picks , the result follows. The null space of *A* in analytical dynamics is called the space of virtual displacements and d'Alembert's principle simply posits the assumption that the control (constraint) force *n*-vector is orthogonal to the null space of *A*, or in more analytical dynamics terms: the ‘work done’ by the constraint force *Q*^{c} under virtual displacements at each instant of time is zero.

Many mechanical systems, however, do not satisfy d'Alembert's principle (Goldstein 1976). In such systems, the control (constraint force) does work under virtual displacements. To obtain the equation of motion for such systems one requires additional information about the work done by the control forces under virtual displacements. One then needs to prescribe, for a *specific* mechanical system, the *C*^{1} vector such that(3.6)where *w*(*t*) is any virtual displacement, i.e. any *n*-vector in the null space of *A*. In that case, the equation of motion of the constrained mechanical system is known to be described by the relation (Udwadia & Kalaba 2002)(3.7)This same result also follows directly from equations (2.20) and (2.21) by setting and . Thus, if a mechanical system is non-ideal, the non-idealness being described by relation (3.6) in which is specified at each instant of time, then Nature chooses the *n*-vector *z*(*t*) in relation (2.21) to be , so that condition (3.6) is satisfied along with relations (2.18) and (2.19) at each instant of time for the specific system at hand!

## 4. General systems described by first-order differential equations

In this section, we proceed to general dynamical systems that are described by *n* first-order, non-autonomous, differential equations given by(4.1)where we shall again take *M*_{g} to be a positive-definite *n* by *n* matrix. We require that this dynamical system track a trajectory described by the equations(4.2)where we assume that the trajectory described is feasible and the system of *m* equations is consistent. In order to track this trajectory, we apply a control *f*^{c} so that the equation describing the time evolution of the controlled dynamical system becomes(4.3)where we assume that the initial conditions satisfy the trajectory requirements (4.2).

As before, we differentiate these *m* equations (4.2) with respect to time to give the relation(4.4)where *A*_{g}(*x*, *t*) is an *m* by *n* matrix of rank *k*, and set(4.5)Pre-multiplying equation (4.3) by *N*^{1/2} we get(4.6)where(4.7)Here, We note that equations (4.6) and (4.7) have the same form as equations (2.53) and (2.52), respectively. Furthermore, equation (4.4) can be expressed as(4.8)where(4.9)Expressing in terms of orthogonal components, we get(4.10)and replacing on the r.h.s. of (4.10) by yields(4.11)from which we get the following result by following the same lines as in equations (2.13)–(2.16).

Consider the nonlinear, non-autonomous dynamical system (4.1). The system is required to track the trajectory described by equation (4.2). Assuming that the initial conditions satisfy the trajectory described by equation (4.2), all the possible LC continuous controls that exactly track this trajectory are explicitly given by(4.12)where *z*_{g}(*x*, *t*) is *any arbitrary n*-vector whose components are continuously differentiable (or more generally are LC) functions of their arguments; *N*(*x*, *t*) is *any* arbitrary *n* by *n* positive-definite matrix, ; is an *m* by *n* matrix; *A*_{g} is the *m* by *n* matrix of rank *k*, and *b*_{g}(*x*, *t*) is the *m*-vector defined in equation (4.4).

Consider the nonlinear dynamical system described by equation (4.1) that needs to be controlled through the addition of a control , so that the trajectory described by equation (4.2) is exactly tracked. Assuming that the system satisfies the trajectory requirements initially, the optimal controller that causes the system to (i) exactly track the required trajectory *and* (ii) minimize at *each instant* of time *t*, the cost(4.13)for a given *n* by *n* positive-definite matrix *N*, is explicitly provided by(4.14)where *B*_{s}, *b*_{g} and *a*_{s} are defined in relations (4.9), (4.8) and (4.7), respectively.

Similar to, and along with the same lines as, the proof of result 2.5. ▪

Denoting(4.15)where(4.16)and(4.17)we have the following remarks.

We can prove corollaries similar to corollaries 2.2, 2.8–2.10. Four important results that emerge from this are (i) the two components and of the control vector *f*^{c} are *N*-orthogonal to one another, (ii) is (*MN*)-orthogonal to the null space of the matrix *A*, (iii) the minimum cost is and it occurs at those times when =0, and (iv) the control cost contributed by is given by .

So far, it has been assumed that the equations that describe the trajectory are consistent. This may not happen in practical situations; errors due to numerical computations, for example, could make these equations inconsistent. Hence, instead of equation (4.8) we would have the equation(4.18)where is the error caused by the inconsistency of the trajectory equation (4.2) (as also, analogously, for the equation sets (2.18)–(2.19), and (2.47)–(2.48)). We would then need to replace equation (4.11) with(4.19)where is the error. The least-squares solution to this inconsistent equation remains(4.20)as before, pointing out that results 4.1 and 4.2 (and similarly results 2.1 and 2.5) provide the control in this least-squares sense, even when the trajectory description is inconsistent.

## 5. Example

In this section, we present an application of the results obtained by considering the trajectory tracking of a chaotic Rossler system (Rossler 1976) by a Lorenz system (Strogatz 1994). We begin by considering the scaled Lorenz oscillator as a system that we would like to control. Its description is given by the three first-order differential equations,(5.1)where we take *σ*=10, *r*=28, *b*=8/3 and *δ*=10. This system exhibits chaotic motion for the chosen values of the parameters (Strogatz 1994). We want the motion of the first two components, *x*_{1}(*t*) and *x*_{2}(*t*), of this chaotic Lorenz system to track the first two components, *y*_{1}(*t*) and *y*_{2}(*t*), respectively, of a very different chaotic system—a Rossler system—which is described by the equations (Rossler 1976),(5.2)with *a*=0.1, *c*=18 and *d*=0.3. For these parameter values, the Rossler system is also known to be chaotic (Strogatz 1994). Thus, the aim is to find the control inputs needed to be applied to one chaotic system (the Lorenz system here) so that it tracks two of the components of the motion of another different chaotic system (the Rossler system).

The control input 3-vector *f*^{c} that needs to be applied to the Lorenz system is required to be found so that the cost is minimized at each instant of time. The weighting matrix *N*_{L} is taken to be the diagonal matrix, . This weighting matrix is guaranteed to be positive definite. A simple way to formulate this nonlinear trajectory tracking problem is to consider the augmented dynamical system,(5.3)Our task would be to find a control input 6-vector which causes the system(5.4)to satisfy the following trajectory tracking requirements:(5.5)(5.6)Differentiating and with respect to time we get the relations and . Since our theory requires that the given initial conditions satisfy the above-mentioned two trajectory requirements, and they do not, we shall modify the trajectory requirements to(5.7)where *α*>0 is chosen to be a suitable parameter. We note that asymptotic solutions of equation (5.7) as *t*→∞ are *ϕ*_{i}(*t*)=0, *i*=1, 2 as required by (5.5). The parameter *α* in the numerical example is chosen to be 0.5. The trajectory description given by (5.7) and (5.6) then leads to (see equation (4.4))(5.8)The weighting matrix *N* for the augmented six-dimensional dynamical system given in equation (5.4) will also need to be augmented so it is a diagonal 6 by 6 matrix. Owing to the trajectory requirement *h*^{c}(*t*)≡0, we can choose its last three diagonal entries to be each equal to unity; the first three diagonal entries remain the same as those of the matrix *N*_{L}. The explicit control input that causes the trajectory described by (5.6) and (5.7) to be tracked is then given by equation (4.14) with , since the 6 by 6 matrix *M*_{g} is an identity matrix.

All the computations are performed using Matlab and the integration is carried out using a relative error tolerance of 10^{−10} and an absolute error tolerance of 10^{−13}. Figure 1 shows the dynamics of the first component of the two separate dynamical systems described by equations (5.1) and (5.2).

On application of the optimal control input, the tracking errors *e*_{1}(*t*)≔*x*_{1}(*t*)−*y*_{1}(*t*) and *e*_{2}(*t*)≔*x*_{1}(*t*)−*y*_{1}(*t*) are shown in figure 2. These errors, as time increases, go down to the same order of magnitude as the tolerance used in the numerical integration of the differential equations as shown in figure 2*b*.

Figure 3*a* shows the control inputs acting on the Rossler system. They are theoretically supposed to be zero, as required by the second trajectory requirement (5.6). They are seen to be very small, and of the same order of magnitude as the tolerances with which the integration is carried out. Figure 3*b* shows the control inputs required to be given to the Lorenz system so that it tracks the first two components of the Rossler system. The third component of the control input to the Lorenz system is seen to be zero, since we require only the first two components to be tracked. The optimal control cost *J*(*t*) is shown in figure 4.

The projection of the phase trajectory of the controlled Lorenz system on to the (*x*_{1}, *x*_{2}) plane (solid line) and the projection of the corresponding phase trajectory of the Rossler system on to the (*y*_{1}, *y*_{2}) plane (dashed line) are shown in figure 5. The figure shows the manner of convergence of these projected trajectories, which start with different initial conditions. Because the third component of the Rossler system is not tracked, the three-dimensional phase portrait looks very different for the controlled Lorenz system. The phase space portraits of these two systems are shown in figure 6.

## 6. Conclusions and remarks

The methodology for the tracking control of nonlinear systems proposed herein has been inspired by results in analytical dynamics. This paper begins by developing this methodology for systems described by second-order differential equations, as commonly found in the Lagrangian and Newtonian mechanics, as well as first-order differential equations, as found in the Hamiltonian and Poincaré formulations of mechanics. It then extends the methodology to full state control of general nonlinear dynamical systems. The main contributions of the paper are the following:

The development of an explicit closed-form expression that provides the entire set of continuous tracking controllers that can exactly track a given trajectory description, assuming that the system's initial conditions satisfy the description of the trajectory. We obtain explicit closed-form expressions for the controllers, which can be computed in real time.

The development of a simple formula that explicitly gives the tracking control that minimizes the control cost

*J*(*t*) at each instant of time. An explicit expression for the minimal cost is also obtained.For a general, first-order, nonlinear system ,

*x*(0)=*x*_{0}, the entire set of controllers needed to satisfy the trajectory described by the consistent equations*ϕ*_{i}(*x*,*t*)=0,*i*=1, …,*m*, is explicitly given by(6.1)where*z*_{g}(*x*,*t*) is any LC function;*N*(*x*,*t*) is any positive-definite weighting matrix; and*a*_{s},*b*_{g}and*B*_{s}are as defined in equations (4.7)–(4.9).For a given weighting matrix

*N*, the total control input can be split into two parts: a part that solves the optimal control problem that minimizes*J*(*t*) while exactly tracking the trajectory, and a second additive part that is*N*-orthogonal to the first. While the addition of the second part to the optimal control effort allows the trajectory requirements to be still exactly satisfied, the norm of the control cost increases, in general, when it is added. The minimum cost , and the corresponding controller that yields this minimum cost is . The addition of the second part , so that , increases the cost beyond the optimal by . At each instant of time*t*, when*z*_{g}(*x*,*t*) belongs to the range space of , , so that , hence making the control at that instant of time optimal.The close connection between nonlinear control and analytical mechanics is pointed out. Here we see that Nature seems to control a mechanical system so that it satisfies a given set of trajectory requirements—or alternatively stated, tracks a given trajectory—by using feedback control, much like a control engineer,

*except*that instead of proportional, integral or derivative feedback control, which is commonly used by the control engineer, it uses acceleration feedback. While considerable work has been done on PID control, acceleration feedback seems to be far less studied by modern-day control engineers. Following Nature's cue, the results developed in this paper point perhaps towards the need for more work in the area of acceleration feedback in mechanical systems. Furthermore, Nature seems to minimize the control cost at*each instant*of time, and it appears to use for the weighting matrix*N*. Nature's choice of this weighting matrix can be understood when thought of in terms of a multi-body mechanical system that is required to satisfy a given trajectory description (a set of constraints), and so track a given trajectory. Since it takes a larger control effort to move a body belonging to the multi-body system that has a larger inertia, Nature, in its effort to make the entire system satisfy the given trajectory description, appears to prefer applying control forces to bodies with the smaller inertias. Again, following Nature's cue, the use of as a weighting matrix for defining the control cost may be useful in many other dynamical systems, especially mechanical ones.While we have demonstrated the methodology by illustrating its use in determining the control required to be applied to a chaotic Lorenz system so that it tracks some components of the motion of another chaotic Rossler system, the general methodology can be used for more complex nonlinear mechanical systems dealing with, for example, orbital mechanics (Lam 2006).

Finally, we note that the methodology presented herein does not include any magnitude constraints on the control, and work on this topic is currently being pursued. Furthermore, the results provided herein deal with full state control and further developments along the lines pursued herein to underactuated robotic systems would be useful. The effects of model errors and disturbance control also need to be investigated.

## Footnotes

- Received January 28, 2008.
- Accepted March 28, 2008.

- © 2008 The Royal Society