Вы находитесь на странице: 1из 10

C. Nataraj, Sreekanth Bolla and B.

Samanta

Analysis & Design Of An Adaptive Autopilot: Theory & Experiments


Abstract

The motion of a surface vehicle such as a boat or a ship is a complex dynamic process with several model parameters that vary in wide ranges with respect to ship load condition, speed and surrounding conditions (such as wind, currents, and waves). This makes the design of an eective and accurate autopilot quite a challenging The rising fuel and manning costs leading task. to a need for energy savings. This paper considers an adaptive autopilot for ships which ensures optimal accuracy and There are many applications for autopistability characteristics. The focus in this paper lots where loading conditions of the ship is on adapting to dierent speeds and parameter keep changing, like aircraft carriers, crude variations of the surface vehicle. The PD control oil carriers, cargo ships, etc., which make methodology is modied and parameters of a PD them dicult to control accurately with controller are designed to satisfy conditions for conventional controllers. an optimal objective function that is comprised Trac density in seas is increasing and of heading error, drift during changing of the ships need to be facilitated with more accourse, and loss of surge velocity. curate steering for both course keeping The controller is derived based on the Model and course changing. Reference Adaptive System (MRAS) control theory using the second order Nomoto model for The cost of digital hardware available in the surface vehicle. Numerical simulations have today market has become much cheaper been carried out to help tune the controller. In and it is possible to implement advanced addition, experiments are conducted with small control algorithms economically. model boats which have been equipped with a Generally, the autopilots are designed for controller and suitable sensors. Practical implementation shows, that in comparison with con- keeping a constant course. Some of them can ventional PID autopilots, the designed autopilot also be used for a variable course. They are composed of rather simple controllers to correct disperforms much better. turbances to the set course, and should also give the desired response as course changes. This can Introduction be achieved by adjusting the parameters of the controller in accordance with the steering charThe earliest autopilots used purely mechani- acteristics of the ship. For small variations in the cal components, where the rudder angle was pro- steering characteristics the feedback system corportional to the desired heading angle. Later rects the overall behavior. For large variations classical control theory was applied to course- the parameter settings of the autopilot must be keeping control, in the form of a PID con- adapted manually. Especially for supertankers the variations can troller, in which the measured heading angle is compared to the desired heading angle and the be large and they can appear suddenly, for inamount of error is given as an input to the con- stance when the depth of water changes. Due

troller, which then activates the servo mechanism accordingly. PID autopilots have a reasonably good performance; however, they exhibit poor performance with environmental disturbances and with large parametric variations. In the last few decades, the autopilot problem has been increasingly studied by researchers because of a few reasons.

to their size these ships are also manually difcult to handle. Therefore, autopilots that can be used to make accurate course changes in narrow costal waters will be of great importance. It is known that a variation of depth of water may even introduce course instability. Commonly applied autopilots have many parameter settings but they have to be set manually. The introduction of automatically adaptive autopilot permits the application of a course feedback system in those situations where varying conditions give rise to diculties. Some publications about adaptive autopilot designs have appeared in recent years. It has also stimulated research on criteria needed to dene optimal steering performance. Monitoring of the environmental conditions as a basis for adjustment of the autopilot has been described by Oldenburg et. al. [1], where, controller settings were adjusted by measuring the frequency of waves and intensity of wind. Using the measured data, models were developed and incorporated into the controller adjustment mechanism. Autopilots based on the theory of model reference adaptive systems have been reported by Honderd, Winkelman and Van Amerongen [2]. They developed dierent techniques to implement the model reference adaptive system on working models of boat, but the hardware used was very simple with minimal accuracy. Some other adaptive research includes [3] and [4]. Course keeping control of an autonomous boat using low cost sensors have been developed and presented by Zhenyu Yu and Kenzo Nomani [5]; this paper discusses the course keeping problem for a small autonomous boat using low cost sensors. Compared to full scale ships, a small boat is more sensitive to the environmental disturbances because of its small size and low inertia. Adaptive autopilot designs for an unmanned aerial vehicle have been presented by Shin and Carlisle [6]. This paper summarizes the application of two adaptive approaches to autopilot design and presents an evaluation and comparison of the two approaches in simulation for an unmanned aerial vehicle. Our present work investigates the performance of a PD controller on the heading control of a boat. Then, a gain scheduling controller is

presented that accounts for varying speeds and loading conditions. Finally, a controller is designed based on the Model Reference Adaptive System control theory. All the three controllers are implemented on a model boat under varying load conditions and experiments are conducted. The eectiveness of three controllers are then compared with each other.
Model

The motion of a ship is a complex nonlinear dynamic process and dees simple descriptions. Methods for accurately determining ship steering dynamics have been the focus of many studies over a long period of time. Of several mathematical models described in literature, the simplest one is the rst order model of Nomoto which describes the dynamics between the rudder deection () and the boats yaw angle (). T and K are constant parameters specic to the boats properties (such as loading conditions) as well as its forward speed. T + = K (1)

The complexity of a mathematical model depends on the purpose for which it is to be used. If one is interested in predicting the eects of dierent alternative constructions on the steering performance then a complex model will be required. These types of models, based on physical laws, require extensive knowledge of the phenomena involved and their mutual relations. These models could be used for the design of a controller as well. We will use a simple model here that only describes the most important dynamics since parameter identication gets quite involved with complex models. It should be noted that most autopilots are based on the Nomoto model described above.
Autopilot Analysis

Three kinds of controllers are implemented in this paper. 1. Conventional PD controller (with constant gains)

2. Gain Scheduling Controller 3. Adaptive Contoller


Constant gain feedback controller

Constant gain feedback controller is a simple PD controller Fig. . In this control technique gains of controller are maintained constant through out, for all loading conditions. PD gains can be computed beforehand for the best possible response for the Nomoto model.

y*

C(s)

Plant G(s)

or known nonlinearities of the process. It is controversial whether a system with gain scheduling should be considered as adaptive or not, because the parameters are changed in an open-loop or preprogrammed fashion. If we use an informal denition of adaptive systems, gain scheduling can be regarded as an adaptive controller. Gain scheduling is a very useful technique for reducing the eects of parameter variations. In fact it is the foremost method for handling parameter variations in ight control systems. There are also many commercial process control systems in which Gain Scheduling can be used to compensate for static and dynamic nonlinearities. Splitrange controllers that use dierent sets of parameters for dierent ranges of process output can be regarded as special types of Gain Scheduling controllers. Gain Scheduling can thus be viewed as a feedback control system in which the feedback gains are adjusted by using feed forward compensation.

FIG. 1: Constant gain feedback controller

Gain Scheduling
i Gain Scheduler

Auxiliary Measurements

In many cases it is possible to nd measurable variables that correlate well with changes in the process dynamics. These variables can then be used to change the controller parameters this approach is called gain scheduling because the scheme was originally used to measure the gain and then change, i.e., schedule the controller to compensate for changes in the process gain. The system can be viewed as having two loops: an inner loop composed of the process and the controller, and an outer loop that adjusts the controller parameters on the basis of operating conditions. Gain scheduling can be regarded as a mapping from process parameters to controller parameters. It can be implemented as a function or a table lookup. Gain Scheduling is easy to implement in computer-controlled systems, such as the one we are using for this research. Gain Scheduling, based on measurements of operating conditions of the process, is often a good way to compensate for variations in process parameters

Command Signal

Controller C()

u Boat

FIG. 2: Gain Scheduling

One drawback of gain scheduling is that it is an open loop compensation. There is no feedback to compensate for an incorrect schedule. Another drawback of gain scheduling is that the design may be time consuming. The controller parameters must be determined for many operating conditions, and the performance must be checked by extensive simulations. The main advantage of gain scheduling is that the controller parameters can be change very quickly in response to process changes. Since no estimation of parameters occurs, the limiting factors depend on how quickly the auxiliary measurements respond to process changes [7].

Speed in m/s K T 5.3 6.667 3.15 6 6.667 4.8 7.4 6.667 5.7 8.2 6.667 6 9.4 6.667 6.4
TABLE I: Gain-Scheduling Parameter Lookup Table

K 6.667 6.667 6.667 6.667

T 3.15 4.8 5.7 6

Kp 0.357 0.545 0.635 0.68

Kd 0.917 1.46 1.73 1.84

TABLE II: PD Gain Values for various values of parameters Lookup Table

Design of Gain-Scheduling Controller

where, Kp is the proportional gain of PD controller Kd is the derivative gain of PD controller wn is the natural frequency of yawing, here it is constant as we are using propellers to control the boat yawing (=0.15 rad/s). is the damping ratio ( = 1.2). L is the length of boat which is 58 cm U is speed of boat and considered to be constant for particular run (= 10 cm/sec)

It is dicult to give general rules for designing gain-scheduling controllers. The key question is to determine the variables that can be used as scheduling variables. Ideally there should be a simple expression for how the controller parameters relate to the scheduling variables. It is thus necessary to have a good insight into the dynamics of the process if gain scheduling is to be used. In the present situation, the boat dynamic model parameters K and T are the variables which are to be scheduled based on the error, which is the dierence between the actual heading of the boat and the desired heading. Not only the process parameters K and T are scheduled, the controller gains Kp and Kd are changed as these are dependent on the process variables. Many computer simulations of the model were performed with changing variables based on the error. Finally, for dierent values of speeds and loading conditions, dierent combinations of K and T are proposed. After the values of the boat model parameters K and T were estimated, the controller parameters Kp and Kd are determined by using the following formulae proposed by Van Amerongen [7].
2 Kp = (wn T /K)(L/U )2

ADAPTIVE CONTROL

Kd = 2

(Kp KT ) 1)/K)

Adaptive control is the attempt to redesign the controller while online, by looking at its performance and changing its dynamics in an automatic way. Adaptive control is a feedback law that looks at the process and the performance of the controller and reshapes the controller closed loop behavior autonomously. Adaptive controller can also be dened as a controller with adjustable parameters and a (2) mechanism for adjusting the parameters. Thus, the construction of an adaptive controller con(3) tains the following steps:

1. Characterize the desired behavior of the closed-loop system.


R
+ _

2. Determine a suitable control law with adjustable parameters. 3. Find a mechanism for adjusting the parameters. 4. Implement the control law. Various structures exist that may give a control system the possibility to react to variations in its parameters or to changing characteristics of the disturbances. A general feedback system also has the objective of decreasing the sensitivity for these types of variations. However, when the variations are large, even a well designed constant-gain feedback system will not operate satisfactorily. In such situations, a more complex controller structure is required and certain adaptive properties have to be introduced.
MODEL REFERENCE ADAPTIVE SYSTEMS (MRAS)

Controller

Process

C
Y-Plant _ Y-model

Adaption mechanism Reference model

e +

FIG. 3: Model reference adaptive system [7]

the output of the reference model. The ordinary feedback loop is called the inner loop, and parameter adjustment is called the outer loop. The mechanism for adjusting the parameters in a model reference adaptive system can be obtained in several ways; the method we present here uses a gradient method. The reference model for the rst order Nomoto model is chosen as [2], m (t) = where, m (t) is the output heading of the reference model, this is the value that boat should closely follow. r (t) is the desired heading for the boat, it is taken as input to the reference model. n is frequency of rudder angle uctuations. Here we consider the value of n to be 0.05 rad/s. is damping ratio. Here we consider the value of to be 1. The reference model equation of the form Eq. 4 can be represented in dierential form as, d2 m (t) dm (t) 2 2 + 2n + n m (t) = n r (t) 2 dt dt (5) The output of Eq. 5 is used in calculation of the adaptive controller gain values.
2 n (t) 2 r p2 + 2n p + n

The general idea behind Model Reference Adaptive System (MRAS, also known as an MRAC or Model Reference Adaptive Control) is to create a closed loop controller with parameters that can be updated to change the response of the system. The output of the system is compared to the desired response from a reference model. The control parameters are updated based on this error. The goal is for the parameters to converge to ideal values that cause the boat dynamic model response to match the response of the reference model. The model reference adaptive system (MRAS) is an important adaptive controller. It may be regarded as an adaptive servo system in which the desired performance is expressed in terms of a reference model, which gives the desired response to a command signal. The system has an ordinary feedback loop composed of the process and the controller and another feedback loop that changes the controller parameters. The parameters are changed on basis of feedback from the error, which is the dierence between the output of the system and

(4)

MIT RULE

process output. Substituting Eq. 8 in E1. 9 we obtain:


1 + KKd (t)+ T KKp (t)+ T (t) = KKp r (t) T (10)

The MIT rule is the original approach to model reference adaptive control, the name is derived from the fact it was developed at the instrumentation lab at MIT. To present the MIT rule we will consider a closed system in which the controller has one adjustable parameter . The desired closed loop response is specied by a model whose output is m (t), which is determined by the above explained procedure. let e (t) be the error between the the output of closed loop system and the output of the model. One possibility is to adjust the parameters in such a way that 1 2 J() = e (t) 2

It follows from Eq. 10 that,


(t) = p2 +
KKp T 1+KKd p T

KKp T

r (t)

(11)

d where, p is the dierential operator ( dt ). The reference model for this process is chosen to be, 2 n (t) 2 r p2 + 2n p + n

m (t) =

(12)

Combining Eqs. 11 and 12 and nding the (6) partial derivatives with respect to proportional gain Kp and derivative gain Kd , we get,
e = Kp p2 +
K T 1+KKd T

is minimized. To make J small it is reasonable to change the parameters in the direction of the negative gradient of J; i.e., d J e (t) = = e (t) dt (7)

p+
KKp T

( r (t)) (13)

e = Kd p2 +

Furthermore, the term may be absorbed into the adaption gain . However, this requires that the sign of K be known. T In general, should be positive in order to ensure that the controller updates are made in the direction of negative gradient. For a forward moving cargo ship the sign of K happens T 1 K to be negative which implies the term with (t) + (t) = (t) (8) K T T T absorbed into it must be negative to achieve the appropriate negative gradient. After making The PD-type control law which will be employed the above approximations, we obtain the followfor this processes is expressed as (input here is a ing dierential equations for updating the PD controller gains. step input), (t) = Kp r (t) (t) Kd (t) (9)
dKp = 1 dt 1 ( r ) e (16) 2 p2 + 2n p + n p2 1 e 2 + 2n p + n (17)

where, e (t) = m (t) (t). The partial derivative e (t) , which is called the sensitivity derivative determines how the error is inuenced by the adjustable parameter. If it is assumed that changes in parameters are slower than the other variables in the system. Then, the derivative e (t) can be evaluated on the assumption that is constant. After determining the reference model output m (t) for the boat, this value is used in calculation of the adaptive PD gains using the MIT rule. The rst order Nomoto model is written as,

K T p 1+KKd p T

+
KKp T

()

(14)

In general, Eqs. 13 14 cannot be used because the controller parameters Kp and Kd are unknown. Therefore for their optimal values we have,
p2 + 1 + KKd T p+ KKp T
K T
2 = p2 + 2n p + n

(15)

Kp and Kd are the proportional gain and derivative gains respectively, and r (t) is the desired

dKd = 2 dt

1 and 2 are negative real numbers; after many simulations the best value that we could nd for 1 and 2 were -0.005 and -0.1 respectively. A reference model is used in parallel with actual boat dynamic model and generates the desired response, and a tight control system forces the ship to follow closely the desired path taught by the reference model. When the user gives the input angle (r ) to the boat, the reference model takes the input and using the procedure explained above, it determines the output(m ). This output of the reference model is then used to calculate the heading error by using the actual heading () data of boat at each time step (this heading data is sent by an electronic compass on the boat every 0.0625 seconds). This heading error (e ) along with the actual heading data are then used to nd the gains of adaptive PD controller by using the MIT rule, which is explained in Section 3.5, in this way the PD gains are tuned adaptively each time a new message is sent from the boat to the computer. Depending on the adaptive gains each time, the heading angle which the boat should take as input in order to reach the desired angle given by the user is given and the process repeats until the desired angle is reached.
Results

Load Applied

FIG. 4: Load applied on right side of boat

is maintained constant for an entire run. This makes the boat run at constant rate of turn as the motors are running at a constant speed difference. The experimental run is performed, the heading angle data is recorder by the electronic compass on board and stored. The same experimental procedure is followed and tests are conducted for several dierent speeds and the recorded data in all the experimental runs is analyzed for estimating the parameters K and T of the Nomoto model.
Experimental Results and Discussion

In this chapter the results are presented which were obtained by practically implementing the Gain Scheduling technique, Adaptive algorithm (MRAS and MIT rule) and Constant Gain control on the boat that was designed and fabricated in our laboratory. Also, the behavior of the boat and eectiveness of algorithms were checked by varying the load conditions of the boat and conducting the test runs. The test results were used to compare the eectiveness of algorithms, both graphically and numerically.
Estimation of Boat Parameters

The following procedure is followed to estimate the parameters of boat. The user inputs the speed for both propellers with a certain amount of speed dierence and this speed

Implementation for the PD controller and the MRAS controller are straightforward. For GainScheduling, we correlate the process parameters (auxiliary variables) with the changes in process dynamics and then we reduce the eects of parameter variations simply by changing the parameters (gains) of the controller by using the lookup table of the auxiliary variables based on the error. Gain-Scheduling is thus performed as a feedback control system in which the feedback gains are adjusted by using feed forward compensation. We are very interested in evaluating the performance of the three techniques under varying load conditions of the boat. For this reason, we conducted 36 dierent test runs, 12 for each technique/algorithm with changing load conditions on the boat. A direct graphical comparison of performances of all the three algorithms are shown in Figs. 5 7 for a sample heading angle of 500 . Many more experiments are documented in [8]. It can seen that during the gain scheduling

220 Gain Scheduling MRAS Constant Gain

240 220 200 180 Gain Scheduling MRAS Constant Gain

200

180

160 Heading in degrees Heading in degrees 160 140 120 100 80 60 40 0 1 2 3 time is sec 4 5 6

140

120

100

80

60

40

3 time is sec

FIG. 5: Identical loading conditions for three dier- FIG. 6: Identical loading conditions for three dierent controllers: Desired angle is 500 with symmetric ent controllers: Desired angle is 500 and 1.735 pounds loading on right side

mode the boat tries to reach the desired angle by giving dierent speeds to the motors depending on the magnitude of the heading error. When the error range is high the speeds of motors are high; to reach the desired angle faster, when it starts approaching the desired angle the speeds tend to reduce and so it looks like a smooth curve in the graphs as it approach the desired angle. In contrast when boat is made to run in an adaptive mode, it tries to reach the desired angle in less time compared to gain scheduling. But the nal transition is not smooth compared to the gain scheduling because the gain-scheduling changes the speed of the motors for a range of heading error values whereas the MRAS keeps changing the speed of the motors continuously and so we observe many uctuations in the MRAS mode. In all instances, the adaptive controller proved to be more eective than the conventional PD controller and the gain scheduling controller. We compared the test results for the three FIG. 7: Identical loading conditions for three dieralgorithms implemented to have a better un- ent controllers: Desired angle is 500 and 1.735 pounds derstanding of the results for each implemented on left side
240 220 MRAS Constant Gain Gain Scheduling 200 180 Heading in degrees 160 140 120 100 80 60 40 0 1 2 3 time is sec 4 5 6

Desired Angle and Loading Constant Gain Gain Scheduling 100 , 1.735 lb right 1.3524 104 1.2800 104 100 , 1.735 lb left 1.2317 104 1.0529 104 100 , no load 1.2603 104 1.0725 104 500 , 1.735 lb right 1.3815 104 1.3782 104 0 , 1.735 lb left 3 50 9.4455 10 8.0598 104 500 , no load 9.7014 103 9.457 103 1000 , 1 .735 lb right 7.6493 103 6.2041 103 1000 , 1.735 lb left 6.4465 103 6.1651 103 1000 , no load 5.7801 103 5.4859 103 2500 , 1.735 lb right 2.1239 103 1.8975 103 2500 , 1.735 lb left 2.1699 103 2.0604 103 2500 , no load 2.2559 103 1.9916 103
TABLE III: Cumulative Error Table

MRAS 1.2652 104 9.7905 103 1.0687 104 1.2858 104 7.9419 104 7.4676 103 5.1873 103 4.6827 103 5.4845 103 1.7977 103 1.6929 103 1.5269 103

algorithm shown for 12 test runs for each algorithm. The cumulative heading error is calculated cumulatively over the entire range of the test run (from the starting angle until boat reaches the desired angle), and this is used to compare numerically the three algorithms. Listed in the table are the desired angle, the loading condition (amount of load), the side on

CONCLUSIONS

We modeled a small scale boat as with a rst order Nomoto model for the steering dynamics. The model was found to be both controllable and observable; hence, both state feedback and output feedback controllers can be successfully implemented. Three dierent controllers were developed and implemented for the system: a constant gain PD controller, a gain scheduling controller and a Modal Reference Adaptive Controller. They were successfully implemented on a working model of the boat to verify the eectiveness of each technique and to validate each

which load is applied and the implemented technique (algorithm) to reach that angle in each test run. It can be clearly observed that MRAS has the least cumulative error in every case compared to Constant Gain and Gain Scheduling techniques. It can also be observed that Gain Scheduling has less cumulative error compared to Constant Gain control. of these by extensive experiments. The loading condition on the boat was varied to determine the relative robustness of the controllers to the parametric variations. Analysis of the recordings of the data obtained indicate that better performance was achieved by Adaptive algorithm than Gain Scheduling and Constant Gain control. In MRAS mode, the desired angle is reached faster compared to the other two algorithms. One of our main goals was to emphasize on the controller eectiveness for varying load conditions, which was successfully implemented by all the three techniques. Future work will consider integration of more sensors such as for wind speed, as well as more complex dynamic steering models including nonlinear ones.

Research which supported much of this work. In particular, we would like to thank Marc SteinThe authors would like to gratefully acknowl- berg and John Metzer. edge the nancial support of the Oce of Naval
Acknowledgments

REFERENCES & AUTHOR INFORMATION


Inc. He is currently a Professor of Mechanical Engineering at Villanova University, and chair of the department. He founded and served as the Director of the Center for Nonlinear Dynamics & Control in the College Of Engineering for ve years. He has worked on various problems in machinery vibration, active control, electromagnetic bearings, mobile robotics and unmanned surface vehicles. His primary research areas are nonlinear dynamic analysis and control systems.

[1] Oldenburg, S., and Kojima, 2005. Monitoring of the environmental conditions as a basis for adjustment of the autopilot. In Proceedings of the IEEE. [2] van Amerongen, J., 1979. Model Reference adaptive Control applied to steering of ships, Vol. 24 of Lecture Notes in Control and Information Sciences. Springer, Berlin/Heidelberg. [3] Loannou, P., 1970. Robust Adaptive Control. University of Southern California. [4] Astrom, K., and Kallstrom, C., 1976. Identication of ship steering dynamics. Automatica, 12, pp. 922. [5] Zhenyu, Y., and Nomani, K., 2008. Course keeping control of autonomous boat, using low cost sensors. Journal of System Design and Dynamics, 2(1), pp. 389400. Special Issue on The Twelfth Asia Pacic Vibration Conference (APVC2007). [6] Shin, Y., and Calisle, A. J., 2005. Adaptive autopilot designs for an unmanned aerial vehicle. In AIAA Guidance, Navigation, and Control Conference. [7] van Amerongen, J., and Udink, A. J., 1975. A new ships autopilot design through a stochastic mode. Automatica, 11, pp. 441449. [8] Bolla, S., 2009. Adaptive autopilots for surface vehicles: theory and experiment. Masters thesis, Villanova University.

Sreekanth Bolla

Sreekanth graduated with his Bachelors degree in Mechanical Engineering from Jawaharlal Technological University, India in May 2006. While pursuing his bachelors degree in Mechanical Engineering, he worked as a teaching assistant, as a volunteer with National Students Service Organization teaching mathematics at various schools in dierent rural villages of South India, encouraging the village children to pursue further studies. He has a Masters degree from Villanova University specializing on autopilot analysis.
Dr. B. Samanta

Dr. B. Samanta has a PhD from Indian Institute of Technology and is currently a visiting professor in the Department of Mechanical EnDr. Nataraj has a BSME from Indian Instigineering at Villanova University. His research tute of Technology, and M. S. and Ph.D. from focus is on the computational intelligence techArizona State University. He worked for a year niques and control theory. as a research engineer with Trumpler Associates,
Dr. C. Nataraj

Вам также может понравиться