第三章 Adaptive Fuzzy Control 3.1 Overview The design process for fuzzy controllers that is based on the use of heuristic information from human experts has found success in many industrial applications. Moreover, the approach to constructing fuzzy controllers via numerical input-output data is increasingly finding use. Regardless of which approach is used, however, there are certain problems that are encountered for practical control problems, including the following: (1) The design of fuzzy controllers is performed in an ad hoc manner so it is often difficult to choose at least some of the controller parameters. For example, it is sometimes difficult to know how to pick the membership functions and rule-base to meet a specific desired level of performance. (2) The fuzzy controller constructed for the nominal plant may later perform inadequately if significant and unpredictable plant parameter variations occur, or if there is noise or some type of disturbance or some other environmental effect. Hence, it may be difficult to perform the initial synthesis of the fuzzy controller, and if the plant changes while the closed-loop system is operating we may not be able to maintain adequate performance levels. As an example, we showed how our heuristic knowledge can be used to design a fuzzy controller for the rotational inverted pendulum. However, we also showed that if a bottle half-filled with water is attached to the endpoint, the performance of the fuzzy controller degraded. While we certainly could have tuned the controller for this new situation, it would not then perform as well without a bottle of liquid at the endpoint. It is for this reason that we need a way to automatically tune the fuzzy controller so that it can adapt to different plant conditions. Indeed, it would be nice if we had a method that could automatically perform the whole design task for us initially so that it would also synthesize the fuzzy controller for the nominal condition. In this chapter we study systems that can automatically synthesize and tune (direct) fuzzy controllers. There are two general approaches to adaptive control, the first of which is depicted in Figure 3.1. In this approach the "adaptation mechanism" observes the signals from the control system and adapts the parameters of the controller to maintain performance even if there are changes in the plant. Sometimes, the desired performance is characterized with a "reference model," and the controller then seeks to make the closed-loop system behave as the reference model would even if the plant changes. This is called "model reference adaptive control" (MRAC). In Section 3.2 we use a simple example to introduce a method for direct (model reference) adaptive fuzzy control where the controller that is tuned is a fuzzy controller. Next, we provide several design and implementation case studies to show how it compares to conventional adaptive control for a ship steering application, how to make it work for a PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.com.cn multi-input multi-output (MIMO) fault-tolerant aircraft control problem. Following this, in Section 3.4 we show several ways to "dynamically focus" the learning activities of an adaptive fuzzy controller. A simple magnetic levitation control problem is used to introduce the methods, and we compare the performance of the methods to a conventional adaptive control technique. Design and implementation case studies are provided for the rotational inverted pendulum (with a sloshing liquid in a bottle at the endpoint). Figure 3.1 direct adaptive controls. In the second general approach to adaptive control, which is shown in Figure 3.2, we use an on-line system identification method to estimate the parameters of the plant and a "controller designer" module to subsequently specify the parameters of the controller. Figure 3.2 indirect adaptive controls. If the plant parameters change, the identifier will provide estimates of these and the controller designer will subsequently tune the controller. It is inherently assumed that we are certain that the estimated plant parameters are equivalent to the actual ones at all times (this is called the "certainty equivalence principle"). Then if the controller PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.com.cn designer can specify a controller for each set of plant parameter estimates, it will succeed in controlling the plant. The overall approach is called "indirect adaptive control" since we tune the controller indirectly by first estimating the plant parameters (as opposed to direct adaptive control, where the controller parameters are estimated directly without first identifying the plant parameters). In Section 3.6 we explain how to use the on-line estimation techniques, coupled with a controller designer, to achieve indirect adaptive fuzzy control for nonlinear systems. We discuss two approaches, one based on feedback linearization and the other we name "adaptive parallel distributed compensation" since it builds on the parallel distributed compensator. 3.2 Fuzzy Model Reference Learning Control (FMRLC) A "learning system" possesses the capability to improve its performance over time by interacting with its environment. A learning control system is designed so that its "learning controller" has the ability to improve the performance of the closed-loop system by generating command inputs to the plant and utilizing feedback information from the plant. In this section we introduce the "fuzzy model reference learning controller" (FMRLC), which is a (direct) model reference adaptive controller. The term "learning" is used as opposed to "adaptive" to distinguish it from the approach to the conventional model reference adaptive controller for linear systems with unknown plant parameters. In particular, the distinction is drawn since the FMRLC will tune and to some extent remember the values that it had tuned in the past, while the conventional approaches for linear systems simply continue to tune the controller parameters. Hence, for some applications when a properly designed FMRLC returns to a familiar operating condition, it will already know how to control for that condition. Many past conventional adaptive control techniques for linear systems would have to retune each time a new operating condition is encountered. Figure 3.3 Fuzzy model reference learning controller The functional block diagram for the FMRLC is shown in Figure 3.3. It has four main parts: the plant, the fuzzy controller to be tuned, the reference model, and the learning mechanism (an adaptation mechanism). We use discrete PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.com.cn time signals since it is easier to explain the operation of the FMRLC for discrete time systems. The FMRLC uses the learning mechanism to observe numerical data from a fuzzy control system (i.e., r(kT) and y(kT) where T is the sampling period). Using this numerical data, it characterizes the fuzzy control system's current performance and automatically synthesizes or adjusts the fuzzy controller so that some given performance objectives are met. These performance objectives (closed-loop specifications) are characterized via the reference model shown in Figure 3.3. In a manner analogous to conventional MRAC where conventional controllers are adjusted, the learning mechanism seeks to adjust the fuzzy controller so that the closed-loop system (the map from r(kT) to y(kT)) acts like the given reference model (the map from r(kT) to ym(kT)). Basically, the fuzzy control system loop (the lower part of Figure 3.3) operates to make y(kT) track r(kT) by manipulating u(kT), while the upper-level adaptation control loop (the upper part of Figure 3.3) seeks to make the output of the plant y(kT) track the output of the reference model ym(kT) by manipulating the fuzzy controller parameters. Next, we describe each component of the FMRLC in more detail for the case where there is one input and one output from the plant (we will use the design and implementation case studies in Section 3.3 to show how to apply the approach to MIMO systems). 3.2.1 The Fuzzy Controller The plant in Figure 3.3 has an input u(kT) and output y(kT). Most often the inputs to the fuzzy controller are generated via some function of the plant output y(kT) and reference input r(kT). Figure 3.3 shows a simple example of such a map that has been found to be useful in some applications. For this, the inputs to the fuzzy controller are the error e(kT) = r(kT) — y(kT) and change in error () ()()ekTekTTckT T??= (i.e.,a PD fuzzy controller). There are times when it is beneficial to place a smoothing filter between the r(kT) reference input and the summing junction. Such a filter is sometimes needed to make sure that smooth and reasonable requests are made of the fuzzy controller (e.g., a square wave input for r(kT) may be unreasonable for some systems that you know cannot respond instantaneously). Sometimes, if you ask for the system to perfectly track an unreasonable reference input, the FMRLC will essentially keep adjusting the "gain" of the fuzzy controller until it becomes too large. Generally, it is important to choose the inputs to the fuzzy controller, and how you process r(kT) and y(kT), properly; otherwise performance can be adversely affected and it may not be possible to maintain stability. Returning to Figure 3.3, we use scaling gains ge,gc and gu for the error e(kT), change in error c(kT), and controller output u(kT), respectively. A first guess at these gains can be obtained in the following way: The gain ge , can be chosen so that the range of values that e(kT) typically takes on will not make it so that its values will result in saturation of the corresponding outermost input membership functions. The gain gc can be determined by experimenting with various inputs to the fuzzy control system (without the adaptation mechanism) to determine the normal range of values that c(kT) PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.com.cn will take on. Using this, we choose the gain so that normally encountered values of c(kT) will not result in saturation of the outermost input membership functions. We can choose gu so that the range of outputs that are possible is the maximum one possible yet still so that the input to the plant will not saturate (for practical problems the inputs to the plant will always saturate at some value). Clearly, this is a very heuristic choice for the gains and hence may not always work. Sometimes, tuning of these gains will need to be performed when we tune the overall FMRLC. Rule-Base The rule-base for the fuzzy controller has rules of the form jlmIfeisEandcisCthenuisU?????? where e? and c? denote the linguistic variables associated with controller inputs e(kT) and c(kT), respectively, u? denotes the linguistic variable associated with the controller output u, jE? and lC? denote the jth (lth) linguistic value associated with ()ec??, respectively, mU? denotes the consequent linguistic value associated with u?. Hence, as an example, one fuzzy control rule could be If error is positive-large and change-in-error is negative-small Then plant-input is positive-big (in this case e?= "error", 4E? = "positive-large", etc.). We use a standard choice for all the membership functions on all the input universes of discourse, such as the ones shown in Figure 3.4. Hence, we would simply use some membership functions similar to those in Figure 3.4, but with a scaled horizontal axis, for the c(kT) input. ()ekT EEE -1-2 0 1 2E E 0.60.40.2-0.2-0.4-0.6 1 -0.8-1 0.81 EEE-5 -3-45 43 Figure 3.4 Membership functions for input universe of discourse We will use all possible combinations of rules for the rule-base. For example, we could choose to have 11 membership functions on each of the two input universes of discourse, in which case we would have 112 = 121 rules in the rule-base. At first glance it would appear that the complexity of the controller could make implementation prohibitive for applications where it is necessary to have many inputs to the fuzzy controller. However, we must remind the reader of the results in Section 2.6 where we explain how implementation tricks can be used to significantly reduce computation time when there are input membership functions of the form shown in Figure 3.4. Rule-Base Initialization PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.com.cn The input membership functions are defined to characterize the premises of the rules that define the various situations in which rules should be applied. The input membership functions are left constant and are not tuned by the FMRLC. The membership functions on the output universe of discourse are assumed to be unknown. They are what the FMRLC will automatically synthesize or tune. Hence, the FMRLC tries to fill in what actions ought to be taken for the various situations that are characterized by the premises. We must choose initial values for each of the output membership functions. For example, for an output universe of discourse [-1, 1] we could choose triangular-shaped membership functions with base widths of 0.4 and centers at zero. This choice represents that the fuzzy controller initially knows nothing about how to control the plant so it inputs u = 0 to the plant initially (well, really it does know something since we specify the remainder of the fuzzy controller a priori). Of course, one can often make a reasonable best guess at how to specify a fuzzy controller that is "more knowledgeable" than simply placing the output membership function centers at zero. For example, we could pick the initial fuzzy controller to be the best one that we can design for the nominal plant. Notice, however, that this choice is not always the best one. Really, what you often want to choose is the fuzzy controller that is best for the operating condition that the plant will begin in (this may not be the nominal condition). Unfortunately, it is not always possible to pick such a controller since you may not be able to measure the operating condition of the plant, so making a best guess or simply placing the membership function centers at zero are common choices. To complete the specification of the fuzzy controller, we use minimum or product to represent the conjunction in the premise and the implication (in this book we will use minimum unless otherwise stated) and the standard center-of-gravity defuzzification technique. As an alternative, we could use appropriately initialized singleton output membership functions and centeraverage defuzzification. Learning, Memorization, and Controller Input Choice For some applications you may want to use an integral of the error or other preprocessing of the inputs to the fuzzy controller. Sometimes the same guidelines that are used for the choice of the inputs for a nonadaptive fuzzy controller are useful for the FMRLC. We have found, however, times where it is advantageous to replace part of a conventional controller with a fuzzy controller and use the FMRLC to tune it (see the fault-tolerant control application in Section 3.3). In these cases the complex preprocessing of inputs to the fuzzy controller is achieved via a conventional controller. Sometimes there is also the need for postprocessing of the fuzzy controller outputs. Generally, however, choice of the inputs also involves issues related to the learning dynamics of the FMRLC. As the FMRLC operates, the learning mechanism will tune the fuzzy controller's output membership functions. In particular, in our example, for each different combination of e(kT) and c(kT) inputs, it will try to learn what the best control actions are. In general, there is a close connection between what inputs are provided to the controller and the controller's ability to learn to control the plant for different reference inputs and plant operating conditions. We would like to be able to PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.com.cn design the FMRLC so that it will learn and remember different fuzzy controllers for all the different plant operating conditions and reference inputs; hence, the fuzzy controller needs information about these. Often, however, we cannot measure the operating condition of the plant, so the FMRLC does not know exactly what operating condition it is learning the controller for. Moreover, it then does not know exactly when it has returned to an operating condition. Clearly, then, if the fuzzy controller has better information about the plant's operating conditions, the FMRLC will be able to learn and apply better control actions. If it does not have good information, it will continually adapt, but it will not properly remember. For instance, for some plants e(kT) and c(kT) may only grossly characterize the operating conditions of the plant. In this situation the FMRLC is not able to learn different controllers for different operating conditions; it will use its limited information about the operating condition and continually adapt to search for the best controller. It degrades from a learning system to an adaptive system that will not properly remember the control actions (this is not to imply, however, that there will automatically be a corresponding degradation in performance). Generally, we think of the inputs to the fuzzy controller as specifying what conditions we need to learn different controllers for. This should be one guideline used for the choice of the fuzzy controller inputs for practical applications. A competing objective is, however, to keep the number of fuzzy controller inputs low due to concerns about computational complexity. In fact, to help with computational complexity, we will sometimes use multiple fuzzy controllers with fewer inputs to each of them rather than one fuzzy controller with many inputs; then we may, for instance, sum the outputs of the individual controllers. 3.2.2 The Reference Model Next, you must decide what to choose for the reference model that quantifies the desired performance. Basically, you want to specify a desirable performance, but also a reasonable one. If you ask for too much, the controller will not be able to deliver it; certain characteristics of real- world plants place practical constraints on what performance can be achieved. It is not always easy to pick a good reference model since it is sometimes hard to know what level of performance we can expect, or because we have no idea how to characterize the performance for some of the plant output variables (see the flexible robot application in Section 3.3 where it is difficult to know a priori how the acceleration profiles of the links should behave). In general, the reference model may be discrete or continuous time, linear or nonlinear, time-invariant or time-varying, and so on. For example, suppose that we would like to have the response track the continuous time model () 11Gs s=+ . Suppose that for your discrete-time implementation you use T = 0. 1 sec. Using a bilinear (Tustin) transformation PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.com.cn to find the discrete equivalent to the continuous-time transfer function G(s), we replace s with 211zTz?+ to obtain ( ) () () ( )121 1921 mYzzHz R +== ?.Where ( )mYz and ( )Rz are the z-transform of ym(kT) and r(kT), respectively. Now, for a discrete-time implementation we would choose () () ()()19112 2121mmykTTykTrkTTrkT+=+++ . This choice would then represent that we would like our output y(kT) to track a smooth, stable, first-order type response of ym(kT). A similar approach can be used to, for example, track a second-order system with a specified damping ratio ζ and undamped natural frequency ωn. The performance of the overall system is computed with respect to the reference model by the learning mechanism by generating an error signal Ye(kT)=ym(kT)-y(kT) . Given that the reference model characterizes design criteria such as rise-time and overshoot and the input to the reference model is the reference input r(kT), the desired performance of the controlled process is met if the learning mechanism forces ye(kT) to remain very small for all time no matter what the reference input is or what plant parameter variations occur. Hence, the error ye(kT) provides a characterization of the extent to which the desired performance is met at time kT. If the performance is met (i.e., ye(kT) is small), then the learning mechanism will not make significant modifications to the fuzzy controller. On the other hand if ye(kT) is big, the desired performance is not achieved and the learning mechanism must adjust the fuzzy controller. Next, we describe the operation of the learning mechanism. 3.2.3 The Learning Mechanism The learning mechanism tunes the rule-base of the direct fuzzy controller so that the closed-loop system behaves like the reference model. These rule-base modifications are made by observing data from the controlled process, the reference model, and the fuzzy controller. The learning mechanism consists of two parts: a "fuzzy inverse model" and a "knowledge-base modifier". The fuzzy inverse model performs the function of mapping ye(kT) (representing the deviation from the desired behavior), to changes in the process inputs p(kT) that are necessary to force ye(kT) to zero. The knowledge-base modifier performs the function of modifying the fuzzy controller's rule-base to affect the needed changes in the process inputs. We explain each of these components in detail next. Fuzzy Inverse Model Using the fact that most often a control engineer will know how to roughly characterize the inverse model of the plant (examples of how to do this will be given in several examples in this chapter), we use a fuzzy system to map ye(kT) , and possibly functions of ye(kT)such as ( ) ( ) ( )( )ceeykTykTykTTT=??(or any other closed-loop system data), to the necessary changes in the process inputs. This fuzzy system is sometimes called the "fuzzy inverse model" since information about the plant inverse dynamics is used in its specification. Some, however, avoid this terminology and simply view the fuzzy system in the adaptation loop in Figure 3.3 to be a controller that tries to pick p(kT) to reduce the PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.com.cn error ye(kT) . This is the view taken for some of the design and implementation case studies in the next section. Note that similar to the fuzzy controller, the fuzzy inverse model shown in Figure 3.3 contains scaling gains, but now we denote them with ey g , cy g and pg . We will explain how to choose these scaling gains below. Given that eye gyand cyc gy are inputs to the fuzzy inverse model, the rule-base for the fuzzy inverse model contains rules of the form is is is jlmeeccyYyYpPIFandThen?????? Where jeY? and lcY? denote linguistic values and mP? denotes the linguistic value associated with the mth output fuzzy set. In this book we often utilize membership functions for the input universes of discourse as shown in Figure 3.4, symmetric triangular-shaped membership functions for the output universes of discourse, minimum to represent the premise and implication, and COG defuzzification. Other choices can work equally well. For instance, we could make the same choices, except use singleton output membership functions and center-average defuzzification. Knowledge-Base Modifier Given the information about the necessary changes in the input, which are represented by p(kT), to force the error y, to zero, the knowledge-base modifier changes the rule-base of the fuzzy controller so that the previously applied control action will be modified by the amount p(kT). Consider the previously computed control action u(kT-T), and assume that it contributed to the present good or bad system performance (i.e., it resulted in the value of Y(kT) such that it did not match ym(kT) ). Hence, for illustration purposes we are assuming that in one step the plant input can affect the plant output; in Section 3.2.4 we will explain what to do if it takes d steps for the plant input to affect the plant output. Note that e(kT) and c(kT-T) would have been the error and change in error that were input to the fuzzy controller at that time. By modifying the fuzzy controller's knowledge-base, we may force the fuzzy controller to produce a desired output u(kT-T)+ p(kT), which we should have put in at time kT-T to make ye(kT) smaller. Then, the next time we get similar values for the error and change in error, the input to the plant will be one that will reduce the error between the reference model and plant output. Assume that we use symmetric output membership functions for the fuzzy controller, and let bm denote the center of the membership function associated with mU? . Knowledge-base modification is performed by shifting centers bm of the membership functions of the output linguistic value mU? that are associated with the fuzzy controller rules that contributed to the previous control action u(kT-T). This is a two-step process: 1. Find all the rules in the fuzzy controller whose premise certainty PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.com.cn ( ) ( )( ),0i ekTTckTTm ??> (3.1) and call this the "active set" of rules at time kT-T. We can characterize the active set by the indices of the input membership functions of each rule that is on (since we use all possible combinations of rules, there will be one output membership function for each possible rule that is on). 2. Let bm (kT) denote the center of the mth output membership function at time kT. For all rules in the active set, use ( ) ( ) ( )mmbkTbkTTpkT=?+ (3.2) to modify the output membership function centers. Rules that are not in the active set do not have their output membership functions modified. Notice that for our development, when COG is used, this update will guarantee that the previous input would have been u(kT-T) + p(kT) for the same e(kT-T) and c(kT-T) (to see this, simply analyze the formula for COG to see that adding the amount p(kT) to the centers of the rules that were on will make the output shift by p(kT) ). For the case where the fuzzy controller has input membership functions of the form shown in Figure 4.4, there will only be at most four rules in the active set at any one time instant (i.e., four rules with ( ) ( )( ),0i ekTTckTTm ??> at time kT ). Then we only need to update at most four output membership function centers via Equation (3.2). Example As an example of the knowledge-base modification procedure, assume that all the scaling gains for both the fuzzy controller and the fuzzy inverse model are one. Suppose that the fuzzy inverse model produces an output p(kT) = 0.5, indicating that the value of the output to the plant at time kT-T should have been u(kT-T) +0.5 to improve performance (i.e., to force ).Next, suppose that e(kT-T) = 0.75 and c(kT-T) = -0.2 and that the membership functions for the inputs to the fuzzy controller are given in Figure 3.4. Then rules 311 1 412 2 :Ifthen :Ifthen EisCU and EisCU ? ? ? ? are the only rules that are in the active set (notice that we chose to use the indices for the rule "1" and "2" simply for convenience). In particular, from Figure 3.4 we have 1 0.25m = and 2 0.75m = , so rules 1? and 2? are the only ones that have their consequent fuzzy sets (U1, U2) modified. Suppose that at time kT-T we had ( )1 1bkTT?= and ( )2 3bkTT?=. To modify these fuzzy sets we simply shift their centers according to Equation (3.2) to get ( ) ( ) ( )11 10.51.5bkTbkTTpkT=?+=+= PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.com.cn and ( ) ( ) ( )22 30.54.5bkTbkTTpkT=?+=+= Learning, Memorization, and Inverse Model Input Choice Notice that the changes made to the rule-base are only local ones. That is, the entire rule-base is not updated at every time step, just the rules that needed to be updated to force ye(kT) to zero. Notice that this local learning is important since it allows the changes that were made in the past to be remembered by the fuzzy controller. Recall that the type and amount of memory depends critically on the inputs to the fuzzy controller. Different parts of the rule-base are "filled in" based on different operating conditions for the system (as characterized by the fuzzy controller inputs), and when one area of the rule-base is updated, other rules are not affected. Hence, if the appropriate inputs are provided to the fuzzy controller so that it can distinguish between the situations in which it should behave differently, the controller adapts to new situations and also remembers how it has adapted to past situations. Just as the choice of inputs to the fuzzy controller has a fundamental impact on learning and memorization, so does the choice of inputs to the inverse model. For instance, you may want to choose the inputs to the inverse model so that it will adapt differently in different operating conditions. In one operating condition we may want to adapt more slowly than in another. In some operating condition the direction of adjustment of the output membership function centers may be the opposite of that in another. If there are multiple fuzzy controllers, you may want multiple inverse models to adjust them. This can sometimes help with computational complexity since we could then be using fewer inputs per fuzzy inverse model. The choice of inputs to the fuzzy inverse model shown in Figure 3.3 indicates that we want to adapt differently for different errors and error rates between the reference model and plant output. The inverse model may be designed so that, for example, if the error is small, then the adjustments to the fuzzy controller should be small, and if the error is small but the rate of error increase is high, then the adjustments should be larger. It is rules such as these that are loaded into the fuzzy inverse model. 3.2.4 Alternative Knowledge-Base Modifiers Recall that we had assumed that the plant input u(kT) would affect the plant output in one time step so that y(kT + T) would be affected by u(kT). To remove this assumption and hence generalize the approach, let d denote the number of time steps that it takes for an input to the plant u(kT) to first affect its output. That is, y(kT +dT) is affected by u(kT). To handle this case, we use the same approach but we go back d steps to modify the rules. Hence, we use ( ) ( )( ),0i ekTdTckTdTm ??> (3.3) to form the "active set" of rules at time kT-dT. To update the rules in the active set, we let ( ) ( ) ( )mmbkTbkTdTpkT=?+ (3.4) PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.com.cn (when d = 1, we get the case in Equations (3.1) and (3.2)). This ensures that we modify the rules that actually contributed to the current output y(kT) that resulted in the performance characterization ye(kT). For applications we have found that we can most often perform a simple experiment with the plant to find d (e.g., put a short-duration pulse into the plant and determine how long it takes for the input to affect the output), and with this choice we can often design a very effective FMRLC. However, this has not always been the case, Sometimes we need to treat d as a tuning parameter for the knowledge-base modifier. There are several alternatives to how the basic knowledge-base modification procedure can work that can be used in conjunction with the d-step back approach. For instance, note that an alternative to Equation (3.1) would be to include rules in the active set that have ( ) ( )( ),i ekTdTckTdTma??> Where 01a≤<. In this case we will not modify rules whose premise certainty is below some given threshold a . This makes some intuitive sense since we will then not modify rules if the fuzzy system is not too sure that they should be on. However, one could argue that any rule that contributed to the computation of u(kT-dT) should be modified. This approach may be needed if you choose to use Gaussian membership functions for the input universes of discourse since it will ensure that you will not have to modify all the output centers at each time step, and hence the local learning characteristic is maintained. There are also alternatives to the center update procedure given in Equation (3.2). For instance, we could choose ( ) ( ) ( ) ( )( ) ( ),mmmbkTbkTdTekTdTckTdTpkTm=?+?? so that we scale the amount we shift the membership functions by the mm certainty of their premises. Intuitively, this makes sense since we will then change the membership functions from rules that were on more by larger amounts, and for rules that are not on as much we will not modify them as much. Another modification to the center update law is also necessary in some practical applications to ensure that the centers stay in some prespecified range. For instance, you may want the centers to always be positive so that the controller will never provide a negative output. Other times you may want the centers no larger than some prespecified value to ensure that the control output will become no larger than this value, In general, suppose that we know a priori that the centers should be in the range[bmin, bmax] where bmin and bmax are given scalars. We can modify the output center update rule to ensure that if the centers start in this range they will stay in the range by adding the following two rules after the update formula: ( ) ( ) ( () minmin maxmax mmbkTbbkTb bkTbbkTb <= >= Ifthen I then PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.com.cn In other words, if the centers jump over the boundaries, they are set equal to the boundary values. Notice that you could combine the above alternatives to knowledge-base modification so that we set a threshold for including rules in the active set, scale the updates to the centers, bound the updates to the centers, and use any number of time steps back to form the active set. There are yet other alternatives that can be used for knowledge-base modification procedures. For instance, parts of the rule-base could be left intact (i.e., We would not let them be modified). This can be useful when we know part of the fuzzy controller that is to be learned, we embed this part into the fuzzy controller that is tuned, and do not let the learning mechanism change it. Such an approach is used for the vibration damping problem for the two-link flexible robot in Section 3.3. As another alternative, when a center is updated, you could always wait d or more steps before updating the center again. This can be useful as a more "cautious" update procedure. It updates, then waits to see if the update was sufficient to correct the error, before it updates again. We have successfully used this approach to avoid inducing oscillations when operating at a set-point. 3.2.5 Design Guidelines for the Fuzzy Inverse Model In this section we provide some design guidelines for the fuzzy inverse model and its scaling gains. The choice of a particular fuzzy inverse model is application-dependent, so we will use the case studies in Section 3.3 to show how it is chosen. There are, however, some general guidelines for the choice of the fuzzy inverse model that we will outline here. First, we note that for a variety of applications we find that the specification of the fuzzy inverse model is not much more difficult than the specification of a direct fuzzy controller. In fact, the fuzzy inverse model often takes on a form that is quite similar to a direct fuzzy controller. For instance, as you will see in the case studies in Section 3.3, the rule-base often has some typical symmetry properties. Second, for some practical applications it is necessary to define the inverse model so that when the response of the plant is following the output of the reference model very closely, the fuzzy inverse model turns off the adaptation (such an approach is used in the aircraft application in Section 3.3). In this way once the inputs to the fuzzy inverse model get close to zero, the output of the fuzzy inverse model becomes zero. We think of this as forcing the fuzzy inverse model to be satisfied with the response as long as it is quite close to the reference model; there is no need to make it exact in many applications. Designing this characteristic into the fuzzy inverse model can sometimes help ensure stability of the overall closed-loop system. Another way to implement such a strategy is to directly modify the output of the fuzzy inverse model by using the rule: ( ) ( ) 0ppkTpkTe>=Ifthen Where 0pe > is a small number that is specified a priori. For typical fuzzy inverse model designs (i.e., ones PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.com.cn where the size of the output of the fuzzy inverse model is directly proportional to the size of the inputs to the fuzzy inverse model), this rule will make sure that when the inputs to the fuzzy inverse model are in a region of zero, its output will be modified to zero. Hence, for small fuzzy inverse model inputs the learning mechanism will turn off. If, however, the error between the plant output and the reference input grows, then the learning mechanism will turn back on and it will try to reduce the error. Such approaches to modifying the adaptation on-line are related to "robustification" methods in conventional adaptive control. Next, we provide general tuning procedures for the scaling gains of a given fuzzy inverse model. For the sake of discussion, assume that both the fuzzy controller and fuzzy inverse model are normalized so that their input and output effective universes of discourse are all [-1,1]. Fuzzy Inverse Model Design Procedure 1 Generally, we have found the following procedure to be useful for tuning the scaling gains of the inverse model: 1. Select the gain ey g so that ye(kT) will not saturate the input membership function certainty (near the endpoints). This is a heuristic choice since we cannot know a priori how big ye(kT) will get; however, we have found that for many applications intuition about the process can be quite useful in determining the maximum value. 2. Choose the gain gp to be the same as for the fuzzy controller output gain gu . Let 0 cy g = . 3. Apply a step reference input r(kT) that is of a magnitude that may be typical during normal operation. 4. Observe the plant and reference model responses. There are three cases: (a) If there exist unacceptable oscillations in the plant output response about the reference model response, then increase ey g (we need additional derivative action in the learning mechanism to reduce the oscillations). Go to step 3. (b) If the plant output is unable to "keep up" with the reference model response, then decrease ey g . Go to step 3. (c) If the plant response is acceptable with respect to the reference model response, then the controller design is completed. We will use this gain selection procedure for the ship steering application in Section 3.3. Fuzzy Inverse Model Design Procedure 2 For a variety of applications, the above gain selection procedure has proven to be very successful. For other applications, however, it has been better to use an alternative procedure. In this procedure you pick the fuzzy controller and inverse model using intuition, then focus on tuning the scaling gain gp, which we will call the "adaptation gain" using an analogy with conventional adaptive controllers. The procedure is as follows: 1. Begin with gp = 0 (i.e., with the adaptation mechanism turned off) and simulate the system. With a well-designed PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.com.cn direct fuzzy controller you should get a reasonable response, but if there is good reason to have adaptive control you will find that the performance is not what you specified in the reference model (at least for some plant conditions). 2. Choose the gains of the inverse model so that there is no saturation on its input universes of discourse. 3. Increase gp slightly so that you just turn on the learning mechanism and it makes only small changes to the rule-base at each step. For small gp you will allow only very small updates to the fuzzy controller so that the learning rate (adaptation rate) will be very slow. Perform any necessary tuning for the inverse model. 4. Continue to increase gp and subsequently tune the inverse model as needed. With gp large, you increase the adaptation rate, and hence if you increase it too much, you can get undesirable oscillations and sometimes instability. You should experiment and then choose an adaptation rate that is large enough to make it so that the FMRLC can quickly adapt to changes in the plant, yet slow enough so that it does not cause oscillations and instability. This design approach is what we will use for the fault-tolerant aircraft control problem in Section 3.3, and it is one that we have successfully used for several other FMRLC applications. This approach has proven to be more effective than the one in Equation (3.2) for some applications; however, it is difficult to determine a priori which approach to use. We usually try the scaled approach if the one in Equation (3.2) does not seem to work well, particularly if there are some unwanted oscillations in the system that seem to result from excessive modification of output membership function center positions. 3.3 FMRLC: Design and Implementation Case Studies The FMRLC has been used in simulation studies for a variety of applications, including an inverted pendulum (translational for swing-up and balancing, and rotational for balancing); rocket velocity control; a rigid two-link robot; fault-tolerant control for aircraft; ship steering; longitudinal and lateral control for automated highway systems; antilock brake systems(ABSs); base braking control; temperature, pressure, and level control in a glass furnace; and others. It has been implemented for balancing the rotational inverted pendulum, a ball-on-abeam experiment, a liquid level control problem, a single-link flexible robot, the two-link flexible robot, and an induction machine. In this section we will study the cargo ship and fault-tolerant aircraft control problems in simulation and provide implementation results for the two-link flexible robot. The cargo ship application helps to illustrate all the steps in how to design an FMRLC. Moreover, we design two conventional adaptive controllers and compare their performance to that of the FMRLC. The fault-tolerant aircraft control problem helps to illustrate issues in fuzzy controller initialization and how to design a more complex fuzzy inverse model by viewing it as a controller in the adaptation loop. The two-link flexible link robot application is used to show how the FMRLC can automatically synthesize a direct fuzzy controller. It also illustrates how to develop and implement an FMRLC that can tune the fuzzy controller to compensate for changes in a MIMO plant—in this case, payload variations. PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.com.cn To improve fuel efficiency and reduce wear on ship components, autopilot systems have been developed and implemented for controlling the directional heading of ships. Often, the autopilots utilize simple control schemes such as PID control. However, the capability for manual adjustments of the parameters of the controller is added to compensate for disturbances acting upon the ship such as wind and currents. Once suitable controller parameters are found manually, the controller will generally work well for small variations in the operating conditions. For large variations, however, the parameters of the autopilot must be continually modified. Such continual adjustments are necessary because the dynamics of a ship vary with, for example, speed, trim, and loading. Also, it is useful to change the autopilot control law parameters when the ship is exposed to large disturbances resulting from changes in the wind, waves, current, and water depth. Manual adjustment of the controller parameters is often a burden on the crew. Moreover, poor adjustment may result from human error. As a result, it is of great interest to have a method for automatically adjusting or modifying the underlying controller. 3.3.1 Ship Model Generally, ship dynamics are obtained by applying Newton's laws of motion to the ship. For very large ships, the motion in the vertical plane may be neglected since the "bobbing" or“ bouncing" effects of the ship are small for large vessels. The motion of the ship is generally described by a coordinate system that is fixed to the ship [11,149]. See Figure 3.5. Figure 3.5 Cargo ship A simple model of the ship's motion is given by () () () ()()()3 121212 1111 Ktttttyyytdd ttt tt ????+++=+ ???????? ??? ??? (3.5) Where ψ is the heading of the ship and δ is the rudder angle. Assuming zero initial conditions, we can write Equation (3.5) as ( ) () ( ) ()() 3 12 1 11 sKs ssss yt dtt += ++ (3.6) Where K, 1t, 2t and 3t are parameters that are a function of the ship's constant forward velocity u and its length l. In particular, PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.com.cn 0 0 i=1,2,3ii uKK l l utt ??= ?? ?? ??= ?? ?? where we assume that for a cargo ship 01020303.86,5.66,0.38,0.89,161Kandandlttt=?==== meters [11]. Also, we will assume that the ship is traveling in the x direction at a velocity of 5 m/s. In normal steering, a ship often makes only small deviations from a straight-line path. Therefore, the model in Equation (3.5) is obtained by linearizing the equations of motion around the zero rudder angle (= 0). As a result, the rudder angle should not exceed approximately 5 degrees; otherwise the model will be inaccurate. For our purposes, we need a model suited for rudder angles that are larger than 5 degrees; hence, we use the model proposed in [20]. This extended model is given by () () ()() ()()()3 121212 1111 KttHtttyyytdd ttt tt ????+++=+ ???????? ??? ??? (3.7) Where ( )H y? is a nonlinear function of ( )ty? . The function ( )H y? can be found from the relationship between d and y? in steady state such that 0yyd===??? ?? . An experiment known as the "spiral test" has shown that ( )H y? can be approximated by ( ) 3Habyyy=+??? , where a and b are real-valued constants such that a is always positive. For our simulations, we choose the values of both a and b to be one. 3.3.2 Simulating the Ship . When we evaluate our controllers, we will use the nonlinear model in simulation. Note that to do this we need to convert the nth-order nonlinear ordinary differential equations representing the ship to n first-order ordinary differential equations; for convenience, let 3 121212 1 11 , , Kabct t t tt ????=+== ???????? and 12 Kd tt= (this notation is not to be confused with the d-step delay of Section 3.2.4). We would like the model in the form ( ) ( ) ( )( ) ()()()() ,xtFxtt ytGxtt d d = = ? where x(t) = [x1(t), x2(t), x3(t)]T and F = [F1 , F2, F3]T for use in a nonlinear simulation program. We need to choose ix? , so that Fi depends only on xi and δ for i = 1 , 2, 3. Choose ( ) ( ) ( )3xttctyd=? ????? , so that F3 will not depend on ( )ctd ? and ( ) ( ) ( )3xttctyd=??? PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.com.cn Choose ( ) ( )2xtty= ??? ,so that ( ) ( )2xtty= ? . Finally, choose ( ) ( )2xtty= ? . This gives us ( ) ( ) ( ) ( )( ) ()()()()()() ()()()()() 121 232 3 , , xtxtFxtt xtxtctFxtt xtatbHtdt d dd yyd == =+= =??+ ? ? ???? But ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )2 3 222,,txtcttxtandHxxtxtydy=+==+??? ,so ( ) ( ) ( )( ) ( ) ( )( ) ( )23332xtaxtctbxtxtdtdd=?+?++? This provides the proper equations for the simulation. Next, suppose that the initial conditions are ( ) ( ) ( )0000yyy===??? . This implies that ( ) ( )12000xx== and ( ) ( ) ( )3 000xcyd=??? or ( ) ( )3 00xcd=? . For a discrete-time implementation, we simply discretize the differential equations. We have ( ) ( ) ( )( ) ( ) ( )tatbHtctdtyyydd=?+?++??? ??? (3.8) Choose ( ) ( ) ( )3xttctyd=? ????? , so that F3 will not depend on ( )ctd ? and ( ) ( ) ( )3xttctyd=??? Choose ( ) ( )2xtty= ??? , so that ( ) ( )2xtty= ? . Finally, choose ( )1xt y= . This gives us ( ) ( ) ( ) ( )( ) ()()()()()() ()()()()() 121 232 3 , , xtxtFxtt xtxtctFxtt xtatbHtdt d dd yyd == =+= =??+ ? ? ???? But ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )2 3 3222,,txtcttxtandHxxtxtydy=+==+??? , so ( ) ( ) ( )( ) ( ) ( )( ) ( )23332xtaxtctbxtxtdtdd=?+?++? This provides die proper equations for the simulation. Next, suppose that the initial conditions are ( ) ( ) ( )0000yyy===??? . This implies that ( ) ( )12000xx== and ( ) ( ) ( )3 000xcyd=??? or ( ) ( )3 00xcd=? . For a discrete-time implementation, we simply discretize the differential equations. 3.3.3 FMRLC Design In this section we explain how to design an FMRLC for controlling the directional heading of the cargo ship. The PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.com.cn inputs to the fuzzy controller are the heading error and change in heading error expressed as ( ) ( ) ( )rekTkTkTyy=? and () ( ) ( )ekTekTTckT T??= respectively, where ( )r kTy is the desired ship heading (T = 5O milliseconds). The controller output is the rudder angle ( )kTd of the ship. For our fuzzy controller design, 11 uniformly spaced triangular membership functions are defined for each controller input, as shown in Figure 3.4. The scaling controller gains for the error, change in error, and the controller output are chosen via the design procedure to be 1eg p= (since the error e(kT) can never be over 180°), gc = 100 (since we have found via simulations that the ship does not move much faster than 0.01 rad/sec), and 818ug p= (since we want to limit δ between ±80°, we have 80180818ug pp==). The fuzzy sets for the fuzzy controller output are assumed to be symmetric and triangular-shaped with a base width of 0.4, and all centered at zero on the normalized universe of discourse (i.e., 121 output membership functions all centered at zero). The reference model was chosen so as to represent somewhat realistic performance requirements as ( ) ( ) ( ) ( )0.10.00250.0025mmmrttttyyyy++=??? Where ( )m ty specifies the desired system performance for the ship heading ( )ty . The input to the fuzzy inverse model includes the error and change in error between the reference model and the ship heading expressed as ( ) ( ) ( )emkTkTkTyyy=? and ( ) ( ) ( )cekTkTkTTTyy=?? respectively. For each of these inputs, 11 symmetric and triangular-shaped membership functions are defined that are evenly distributed on the appropriate universes of discourse (the same as shown in Figure 3.4 on page 306). The normalizing controller gains associated with ( )e kTy , ( )c kTy and ( )pkT are chosen to be 1/egy p= , 5 c gy = and 8/18pg p= respectively, according to design procedure 1 in Section 3.2.5. For a cargo ship, an increase in the rudder angle ( )kTd will generally result in a decrease in the ship heading angle (see Figure 3.5). This is the information about the inverse dynamics of the plant that we use in the fuzzy inverse model rules. Specifically, we will use rules of the form is is is ec jm ecpPyyyyIfandThen ????? ? In Table 3.1, e iy denotes the ith fuzzy set associated with the error signal ey , and c iy denotes the jth fuzzy set associated with the change in error signal cy . The entries of the table represent the center values of symmetric triangular-shaped membership functions ci,j with base widths 0.4 for output fuzzy sets Pm on the normalized universe of PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.com.cn discourse. Table 3.1 Knowledge-Base Array Table for the Cargo Ship Fuzzy Inverse Model The meaning of the rules in Table 3.1 is best explained by studying the meaning of a few specific rules. For instance, if i = j = 0 then we see from the table that ci,j=c0,0=0 (this is the center of the table). This cell in the table represents the rule that says "if ψe =0 and ψc=0 then y is tracking ym perfectly so you should not update the fuzzy controller." Hence, the output of the fuzzy inverse model will be zero. If, on the other hand i = 2 and j = 1 then ci,j=c0,0=-0.6 . This rule indicates that "if ψe is positive (i.e., ψm is greater than ψ ) and ψc is positive (i.e., ψm - ψ is increasing) then change the input to the fuzzy controller that is generated to produce these values of by decreasing it." Basically, this is because we want ψ to increase, so we want to decrease δ to achieve this (see Figure 3.5). We see that the inverse model indicates that whatever the input was in this situation, it should have been less so it subtracts some amount (the amount affected by the scaling gain gp). It is a good idea for you to convince yourself that other rules in Table 3.1 make sense. For instance, consider the case where i = -2 and j = -4 so that c-2,-4 =1: explain why this rule makes sense and how it represents information about the inverse behavior of the plant. It is interesting to note that we can often pick a form for the fuzzy inverse model that is similar inform to that shown in Table 3.1 (at least, the pattern of the consequent membership function centers often has this type of symmetry, or has the sequence of zeros along the other diagonal). At other times we will need to incorporate additional inputs to the fuzzy inverse model or we may need to use a nonlinear mapping for the output centers. For example, a cubic mapping of the centers is sometimes useful, so if y is close to ym we will slow adaptation, but if they are far apart we will speed up adaptation significantly. 3.3.4 Gradient-Based Model Reference Adaptive Control The controller parameter adjustment mechanism for the gradient approach to MRAC can be implemented via the PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.com.cn "MIT rule." For this, the cost function () ()212 eJtqy= , where q holds the parameters of the controller that will be tuned, () () ()emtttyyy=? and dJ dt q g q ?=? ? so that () ()e e td t dt yq gy q ?=? ? For developing the MIT rule for the ship we assume that the ship may be modeled by a second-order linear differential equation. This model is obtained by eliminating the process pole resulting from 2t in Equation (3.5) since its associated dynamics are significantly faster than those resulting from 1t. Also, for small heading variations the rudder angle derivative 8 is likely to be small and may be neglected. Therefore, we obtain the following reduced-order model for the ship: () () () 11 1Ktttyyd tt ????+= ??????????? (3.9) The PD-type control law that will be employed for this process may be expressed by ()(()() ()prdtkttktdyyy=??? (3.10) where kp and kd are the proportional and derivative gains, respectively, and ψr(t) is the desired process output. Substituting Equation (3.10) into Equation (3.9), we obtain ()() () () 11 pp r KkKkttttyyyy tt ????++= ??????????? (3.11) It follows from Equation (3.11) that () ()1 2 11 1 p r pd Kk ttKkKk pp tyy tt =??+ ++?? ?? (3.12) where p is the differential operator. The reference model for this process is chosen to be () ()222nm nn wtt pwpwy z= ++ (3.13) where to be consistent with the FMRLC design we choose 1z= and 0.05nw= . Combining Equations (3.13) and (3.12) and finding the partial derivatives with respect to the proportional gain kp and the derivative gain kd, we find that ()1 2 11 1 e r pp d K Kkk Kkpp y tyy tt ?? ??? =???+ ++?? ?? (3.14) PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.com.cn and 1 2 11 1 e pp d Kp Kkk Kkpp y ty tt ?? ??? =??+ ++?? ?? (3.15) In general, Equations (3.14) and (3.15) cannot be used because the controller parameters kp and kd are not known. Observe that for the "optimal values" of kp and kd, we have 222 11 1 2pd nn KkKkpppwpwz tt ??++=++ ???? Furthermore, the term 1/Kt may be absorbed into the adaptation gain g. However, this requires that the sign of 1/Kt be known since, g in general, should be positive to ensure that the controller updates are made in the direction of the negative gradient. For a forward-moving cargo ship the sign of 1/Kt happens to be negative, which implies that the term g with 1/Kt absorbed into it must be negative to achieve the appropriate negative gradient. After making the above approximations, we obtain the following differential equations for updating the PD controller gains: () 222 122 2 1 2 p e nn p re nn dk p dtpwpw dk dtpwpw gyyz gyyyz ??=? ??++?? =??++ where 1g and 2g are negative real numbers. After many simulations, the best values that we could find for the ig are 1 0.005g=? and 2 0.1g=? . Lyapunov-Based Model Reference Adaptive Control In this section we present a Lyapunov-based approach to MRAC that tunes a proportional derivative (PD) control law. Recall that the ship dynamics may be approximated by a second-order linear time-invariant differential equation given by Equation (3.9). We use a PD control law ()()()( ()prdtkttktdyyy=??? where kp and kd are the proportional and derivative gains, respectively, and ()rty is the desired process output. The dynamic equation that describes the compensated system is ccrAByyy=+? ,where [], Tyyy=? and PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.com.cn () 111 0 1 0 ,1 pccpdKkABKk Kk ttt ???? ????==+ ??? ?? ???? The reference model is given by mmmmrAByyy=+? (3.16) where , T mmmyyy??=??? and 22 0 10, 2mmnnnwwwz ????== ?????????? and where to be consistent with the FMRLC design we choose 1z and 0.05=. The differential equation that describes the error ()()()emtttyyy=?may be expressed by ()(()() (()())ememcmcrAtAtAtBtBtyyyy=+?+?? (3.17) The equilibrium point 0=in Equation (3. 17) is asymptotically stable if we choose the adaptation laws to be () T ceAtPgyy= ? (3.18) cerBtPgyy (3.19) where nnPR×∈ is a symmetric, positive definite matrix that is a solution of the Lyapunov equation 0m TAPPAQ+=?< Assuming that Q is a 2x2 identity matrix and solving for P, we find that 1 12 2122 25.0125 200.00 200.00 2005.00 ppP pp ????== ???????? Solving for kp and kd in Equations (3.18) and (3.19), respectively, the adaptation law in Equations (3.18) and (3.19) may be implemented as ()()12122peerkppgyyyy=?+? ?? (3.20) 22122deekppgyyy=?+?? (3.21) Equations (3.20) and (3.2 1 ) assume that the plant parameters and disturbance are varying slowly. In obtaining Equations (3.20) and (3.21), we absorbed the term 1/k into the adaptation gains 1 and 2g. Recall that for the cargo ship, 1/kt happens to be a negative quantity. Therefore, both 1 and 2 must be negative. We found that 1=-0.005 and 2g=-0.1 were suitable adaptation gains. 3.3.5 Comparative Analysis of FMRLC and MRAC PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.com.cn For the simulations for both the FMRLC and the MRACs, we use the nonlinear process model given in Equation (3.7) to emulate the ship's dynamics. Figure 3.6 shows the results for the FMRLC, and we see that it was quite successful in generating the appropriate control rules for a good response since the ship heading tracks the reference model almost perfectly. In fact, the maximum deviation between the two signals was observed to be less than 1° over the entire simulation. This is the case even though initially the right-hand sides of the control rules have membership functions with centers all at zero (i.e., initially, the controller knows little about how to control the plant), so we see that the FMRLC learns very fast. Figure 3.6 FMRLC simulation results Compare the results for the FMRLC with those obtained for the gradient-based and Lyapunov-based approaches to MRAC, which are shown in Figure 3.7 and 3.8. For the gradient-based and Lyapunov-based approaches, both system responses converged to track the reference model. However, the convergence rate of both algorithms was significantly slower than that of the FMRLC method (and comparable control energy was used by the FMRLC and the MRACs). The controller gains kp and kd for both MRACs were initially chosen to be 5. This choice of initial controller gains happens to be an unstable case for the second-order linear process model (in the case where the adaptation mechanism is disconnected). However, we felt this to be a fair comparison since the fuzzy controller is initially chosen so mat it would put in zero degrees of rudder no matter what the controller input values were. We would have chosen both controller gains to be zero, but this choice resulted in a very slow convergence rate for the MRACs. The final set of simulations for the ship was designed to illustrate the ability of the learning and adaptive controllers to compensate for disturbances at the process input. A disturbance is injected by adding it to the rudder command δ then putting this signal into the plant as the control signal. Specifically, the disturbance was chosen to be be a sinusoid with a frequency of one cycle per minute and a magnitude of 2° with a bias of 1° (see the bottom plot in Figure 3.9). The effect of this disturbance is similar to that of a gusting wind acting upon the ship. PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.com.cn Figure 3.7 Gradient-based MRAC simulation results Figure 3.8 Lyapunov-based MRAC simulation results Figure 3.9 illustrates the results obtained for this simulation. To provide an especially fair comparison with the FMRLC algorithm, we initially loaded the PD controllers in both MRAC algorithms with the controller gains that resulted at the end of their 6000-second simulations in Figures 3.7 and 3.8. However, the centers of the right-hand sides of the membership functions for the knowledge-base of the fuzzy controller in the FMRLC algorithm were initialized with all zeros as before (hence, we are giving the MRACs an advantage). Notice that the FMRLC algorithm was nearly able to completely cancel the effects of the disturbance input (there is still a very small magnitude oscillation). However, the gradient-and Lyapunov-based approaches to MRAC were not nearly as successful. 3.3.6 Discussion: A Control-Engineering Perspective In this section we summarize and more carefully discuss the conclusions from our simulation studies. The results in the previous section seem to indicate that the FMRLC has the following advantages: ? It achieves fast convergence compared to the MRACs. PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.com.cn ? No additional control energy is needed to achieve this faster convergence. ? It has good disturbance rejection properties compared to the MRACs. Figure 3.9 Simulation results comparing disturbance rejection for the FMRLC, the gradient-based approach to MRAC, and the Lyapunov-based approach to MRAC ? Its design is independent of the particular form of the mathematical model of the underlying process (whereas in the MRAC designs, we need an explicit mathematical model of a particular form) Overall, the FMRLC provides a method to synthesize (i.e., automatically design) and tune the knowledge-base for a direct fuzzy controller. As the direct fuzzy controller is a nonlinear controller, some of the above advantages may be attributed to the fact that the underlying controller that is tuned inherently has more significant functional capabilities than the PD controllers used in the MRAC designs. While our application may indicate that FMRLC is a promising alternative to conventional MRAC, we must also PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.com.cn emphasize the following: ? We have compared the FMRLC to only two types of MRACs, for only one application, for a limited class of reference inputs, and only in simulation. There is a wide variety of other adaptive control approaches that also deserve consideration. ? There are no guarantees of stability or convergence; hence, we can simply pick a different reference input, and the system may then be unstable (indeed, for some applications, we have been able to destabilize the FMRLC, especially if we pick the adaptation gain gp large). ? "Persistency of excitation"[77] is related to the learning controller's ability to always generate an appropriate plant input and to generalize the results of what it has learned earlier and apply this to new situations. In this context, for the ship we ask the following questions: (1) What if we need to turn the ship in a different direction? Will the rule-base be "filled in" for this direction? (2) Or will it have to learn for each new direction? (3) If it learns for the new directions, will it forget how to control for the old ones? ? In terms of control energy, we may have just gotten lucky for this application and for the chosen reference input (although with additional tests, this does not seem to be the case). There seem to be no analytical results that guarantee that the FMRLC or any other fuzzy learning control technique minimizes the use of control energy for a wide class of plants. ? This is a very limited investigation of the disturbance rejection properties (i.e., only one type of wind disturbance is considered). ? The design approach for the FMRLC, although it did not depend on a mathematical model, is somewhat ad hoc. What fundamental limitations will, for example, nonminimum phase systems present? Certainly there will be limitations for classes of nonlinear systems. What will these limitations be? It is important to note that the use of a mathematical model helps to show what these limitations will be (hence, it cannot always be considered an advantage that many fuzzy control techniques do not depend on the specification of a mathematical model). Also, note that due to our avoidance of using a mathematical model of the plant, we have also ignored the "model matching problem" in adaptive control [77]. ? There may be gains in performance, but are these gains being made by paying a high price in computational complexity for the FMRLC? The FMRLC is somewhat computationally intensive (as are many neural and fuzzy learning control approaches).The FMRLC can, however, require significant memory since we need to store each of the centers of the output membership functions of the rules, and with increased numbers of inputs to the fuzzy controller, there is an exponential increase in the numbers of these centers (assuming you use all possible combinations of rules). The FMRLC in this section required us to store and update 121 output membership function centers. PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.com.cn