Você está na página 1de 121

Republic of Iraq Ministry of Defense Military College of Engineering Electrical and Electronic Engineering Department

Neural Network Controller For BTT-CLOS of Surface To Air Missile


A thesis submitted to the Electrical and Electronic Engineering Department- Military College of Engineering in partial fulfillment of the requirements for the Degree of Master of Science in Electrical and Electronic Engineering Department ( Control and Guidance )

By

Yousif Ismail Mohammed Al Mashhadany


Rajab 1420 October 1999

Chapter one

Introduction

Ch.1: Introduction.

Chapter One Introduction.


1.1 Introduction: Research on Neural Network (NN) control system has received a considerable attention over the past several years. This is simply because of ability of NN's to approximate any non linear function defined on a compact set to a prespectified accuracy and most control systems exhibit certain type of unknown nonlinearities [1]. As a result, many methods have been developed and successfully applied to some real industrial processes which include chemical processes, aeronautical engines and automatically guided vehicles, etc. This work investigates a specific application of NN's in a non linear control and guidance system, that is designing neuro-controller by using the direct model reference adoptive control for (BTT-CLOS) missile. This chapter gives general overview of BTT-CLOS and the use of NN in its control system.

1.2. Bank-to-Turn Command-To-Line-Of-Sight Technology: CLOS guidance is one approach to missile control in short-to-medium range engagement [2]. The controller is based on the ground, and its objective is to try to keep the missile on the line of sight(LOS) between launch point and target by generating suitable guidance command. In CLOS system (see Fig.1) the controller tries to drive angular error( e ) to zero and keep it zero while the LOS moves. There are many types of LOS system, all of which incorporate a separate target tracker, which may be either an independent control loop or a manually operated arrangement. A typical system would also contain a second tracker, which follows the missile by means of an attached flare. The signals available on the ground are then ( e ) and

Ch.1: Introduction.

(usually) the LOS rate and acceleration.These signals are processed by the guidance controller to produce acceleration commands, which are sent to the missile via radio link. In response to these, the missile then accelerates in such a way as to remain on the LOS. -Z-Axis

Target

Launch Point
e

Missile X-Axis

Station

Fig (1.1): CLOS Guidance For Motion In The Vertical Plane. The acceleration commands sent to the missile may be either Cartesian or polar, for example, if the position of the missile to the LOS were as indicated in Fig.(1.2); the Cartesian command would tell (where, g is gravity acceleration) it to accelerate at (say) (4g) up ward and (3g) to the right, while the corresponding polar command would be to accelerate at (5g) at an angle of (37) to the vertical [3]. LOS LOS

Cartesian

Bank To - Turn

Fig (1.2): Cartesian And Bank To Turn Control.

Ch.1: Introduction.

Two basic methods of controlling the attitude of missile are used to achieve the acceleration commanded by the guidance low or Skid-To-Turn (STT) and BTT. In the former, the angle may be either held constant or uncontrolled; in other case, the magnitude and orientation of the body acceleration vector is achieved by permitting the missile to develop both an angle of attack ( ) and a slip side angle ( ). The presence of the sideslip imports a "skidding" motion to the missile; hence, the name "STT" "BTT" missile on the other hand, should ideally not have any sideslip. To achieve the desired orientation of the missile, it is rolled (banked) so that the plane of maximum aerodynamic normal force is oriented to the desired direction and the magnitude of the force is controlled by adjusting the attitude (angle of attack) in that plane [4]. A BTT missile maneuvers by means of two sets of control surfaces; elevators and ailerons. The elevators produce pitch motion, causing the missile to accelerate perpendicular to the wing plan under the action of a lift force of magnitude (F) and orientation ( m ) (see Fig.1.3), note: the axes and sign convention used here is constant with reference (2). The aileron causes the missile to roll until the wing plane (and hence the lift force) is in the correct orientation. The guidance commands consist of the magnitude and orientation of the demanded lift force [2,5]. Z.Axis F Pseudo-target

Missile Missile path in Vertical plane Y-Axis

Fig.(1.3): Maneuvering of a BTT Missile.

Ch.1: Introduction.

Hence a BTT missile is controlled to fly in a manner similar to that of an aircraft. Upon receiving a guidance command, the missile first rolls to an attitude in which the required acceleration vector lies in the pitch plane prior to generating lift in that direction. Fast response is achieved by a combined rollpitch maneuver, with the roll control system rapidly rotating the missile's maximum lifting orientation into the desired maneuver direction and the pitch control system simultaneously developing the required magnitude of acceleration in the maximum orientation [6].

1.3. Neural Network and Control: To provide a rational assessment of new method it is important to compare and contrast the emerging technologies with established and traditional techniques. One way to do this is to list the key characteristics of competing methods in the context of the field under study. With specific reference to neural network in control the following characteristics and properties of NN's are important: [7,8]. *Nonlinear systems: NN's have greatest promise in the realm of nonlinear control problems. This stems from their theoretical ability to approximate arbitrary nonlinear mappings. *Parallel distributed processing: NN's have a highly parallel structure, which leads itself to produce implementation. Such as implementation can be expected to achieve a higher degree of fault tolerance than conventional schemes. *Hardware implementation: This is closely related to the preceding point. Not only network implementation is in parallel, a number of vendors have recently introduced dedicated VLSI hardware implementations. This brings additional speed and increases the scale of network, which can be implemented.

Ch.1: Introduction.

*Learning and adaptation: Networks are trained using past data records from the system under study. A suitably trained network then has the ability to generalize when presented with inputs not appearing in the training data. Network can also be adopted on-line. *Data fusion: NN can operate simultaneously on both quantitative and quantitative data. In this respect network stands where some in the middle ground between traditional engineering systems (quantitative data) and processing techniques from the artificial intelligence field (symbolic data). *Multivariable system: NN's naturally process many inputs; they are readily applicable to multivariable systems. It is clear that a modeling paradigm, which has all of above features, has great promise. From the control theory point view the ability of NN's to deal with nonlinear system is perhaps most significant. The great diversity of nonlinear system is the primary reason why no systematic and generally applicable theory for nonlinear control design has yet evolved. A range of "Traditional" methods for specific classes of nonlinear systems exit: Phase plane methods, linearization techniques and describing functions are three examples. However, it is the ability of NN to represent nonlinear mappings and hence to model nonlinear systems, which is the feature to be most readily exploited in the syntheses of nonlinear controllers. Our view of the general relationship between the fields of control science and NN is shown in Fig.(1.4). Blank boxes are used when no obvious parallel exists.

Ch.1: Introduction.

Technical Process

Hiology

Psychology

Physiology

Control

Neural Network

Adaptive Systems

Supervised Learning Graded Learning Self - Learning

Nonlinear Models 2nd. Their Inverses Feedback System Theory Nonlinear System Theory

Feed forward Networks Recurrent Networks

Fig.(1.4): Relation Between Control and Neural Network.

Ch.1: Introduction.

1.4. Literature Survey: *BTT - CLOS: The concepts of BTT are not new. Airplane designs have relied on BTT to maximize range payload, and maneuverability. Successful application of the BTT concept to missiles began by Emmert et al.[9] presented analytically define by BTT steering mechanization approaches ,preliminary subsystem specification and other complementary control system elements Emmert et al[10] used the result of the previous work to improve missile performance through a detailed optimization of the guidance system and autopilot design. The analytical result of two previous studies demonstrated that BTT steering is capable of providing increased maneuverability with high guidance accuracy, however, hardware feasibility questions such as cost, mechanization approach, sensor requirements and performance degradation due to hardware implementation of the design were important points that remained unresolved. McGehee [11] described the mechanism and hardware demonstrations of BTT in short range air-to-air weapons. Roddy and Irwin [3] employed the linear optimal control theory and continuos system simulation techniques in combination with design of a closed loop controller for the nonlinear system, which represents the physical description of BTT-CLOS. Roddy et al [12] applied quadratic optimal control theory to solve the problem of BTT in CLOS guidance system. Both stationary and moving targets are treated and simulation results using a practical autopilot model confrim that these new controllers give improved guidance accuracy and reduced susceptibility to pitch-yaw cross coupling. Arrow [13] presented a summary of the current status of autopilot development for anti air preferred orientation control tactical missile and identified the associated critical coupling paths and parameters impacting stability and control characteristics. Lin and Lee [14] presented a missile auto pilot system with constant gains which has been

Ch.1: Introduction.

designed using a generalized singular linear quadratic control technique. The control system consists of a robust output feedback controller and an adaptive feed forward loop. Caughlin and Bullock [15] discussed some of the aspects of BTT guidance utilizing real-time sampled data on nonlinear control. The control law, first demonstrated on 6-DOF first under simulation, has been incorporated into a large high fidelity. Roddy et al [16] presented two different approaches to optimize the performance of the roll loop in a BTT -CLOS guidance system which are considered. The first minimizes integral squared error, while the second produces a design which is optimal in a minimum time sense. Roddy and Irwin [17] proposed three ways in which optimal control theory can be used to design a controller for fixed wing angle BTT missile. The first design minimizes integral square error but tends to produce unsatisfactory roll rate demands. In the second design a penalty on roll rate demand is included in the cost via a weighing parameter. The third controller is based on two bang-bang compensatory. Fleming and Irwin [18] employed the linear quadratic Kalman filtering theory to modify a deterministic CLOS guidance system to BTT control for use in stochastic conditions. Both stationary and moving targets are treated. Williams et al [4] used the state-space techniques of modern control theory to develop a methodology for the design of autopilots for BTT missile. The methodology accommodates the gyroscopic and coriolis cross-coupling between the pitch and the yaw axes that result from the high roll rates is constant but not zero. Fleming and Irwin [19] applied the coloured-noise Kalman filtering theory to ideal with glint noise on the position error measurement in a BTT-CLOS guidance system. Frequency domain analysis suggests that a white-filter controller without significant loss in performance could replace the colouredfilter controller. Wise [20] presented the steps of the design and analysis procedure and demonstrated them in designing a BTT missile autopilot at

Ch.1: Introduction.

10

a single flight condition by using linear quadratic Gaussian/Loop.Hussain [6] presented the response of Autopilot for BTT channels without the crosscoupling between them. Using modern control theory does this. Rasheed [5] designed and analysied discrete longitudinal autopilot to an extended medium range Air -to - Air technology (EMRAAT) high perfofmance missile. Majeed [21] presented the design of autopilot by using linear quadratic regulator technique and entered the noise signal. Al-Fais and Al-Mashhidina [22] explain the ability of BTT-CLOS to decrease the effect of cross coupling between missile air frame (pitch, yaw and roll) channels. The process of transfer the movement of missile from 3-D to 2-D by banking the missile to target plane gives the ability to capture any target with any maneuvering, detailed simulation studies are then used for a wide range of engagement sinearieous for trajectory of missile/target interception. *neural network: The first set of ideas of learning in NN's was contained in Hebb's book entitled The Organization of Behavior in 1949. Before Hebb's work, it was believed that some physical change must occur in a NN to support learning. Edmonds and Minsky [23] built the learning machine by using Hebb's idea. Resenblatt [23] coined the name "perceptron" and devised an architecture which has subsequently received much attention, the real beginning of a meaningful neuron-like network learning can be traced to the work of Resenblatt [24] invented a class of simple neuron-like learning networks which are perceptron based. Widrow and Hoff [24] developed learning rate, which usually either bears their names; or is designed using the least mean squares or delta rule. Minsky and Papert [24] introduced a rigorous analysis of the perceptron. Anderson [25] started his research in NN's with associative memory networks. Two of the reasons for the quiet years of the 1970's were the failure of single

Ch.1: Introduction.

11

layer prceptrons to be able to solve such simple problems (mappings) as the XOR function and the lack of a general method of training a multilayer network. Werbos [25] discovered a method for propagating information about error at the output unit back to the hidden units. This method was also discovered independently by David Parker. Psaltis et al [26] proposed three different methods for using error back-propagation to train a feedforward NN controller to act as the inverse of the plant. Chen [27] applied back propagation NN to a nonlinear self-tuning tracking problem. Traditional self-tuning adaptive control techniques can only deal with linear system or some special nonlinear systems. The emerging back-propagation NN's have capability to learn arbitrary nonlinear and show target potential for adaptive control applications. Naidu et al [28] presented detailed studies reavaled that the proposed pattern recognition approach to failure detection using back-propagation holds significant promise and the main advantages of the proposed approach over existing methods are the method's ability to capture nonlinear characteristic, the possibility for on-line training, and its speed during on-line implementation. There is no reason, to assume that back-propagation its necessarily the beast paradigm for sensor failure detection. Narendra [29] showed that static and dynamic backpropagation can be used in identification and control using military and recurrent networks in many configurations. Chu et al [30] presented two approaches for utilization of NN's in identification of dynamical system. In the first approach a Hopfield network is used to implement a least-squares estimation for time-varying and time invariant system. The second, which is in the frequency domain, utilized a set of orthogonal basis functions and Fourier analysis to construct a dynamic system in terms of its Fourier coefficient. Narendra and Parthasarathy [31] presented a prescriptive method for the optimal adjustment of the parameters of a NN which is part of a complex dynamical system.

Ch.1: Introduction.

12

The method can be regarded as an extension of static back-propagation method to dynamical systems and hence is termed dynamic back-propagation. It is based on the fact that gradient methods used in linear dynamical systems in the 1960's can be combined with back-propagation methods for NN to obtain the gradient of a performance index of nonlinear dynamical systems. Kuschewski and Zak [32] discussed methods for identification and control of dynamical systems by adaptive linear element (ADALINE),two-larger feedforward neural networks (FNN's) and three-larger (FNN's), each equipped with generalized adaptation algorithms and presented two application examples, each involving a nonlinear dynamical system. The first is application of the system's forward and inverse dynamics. The second application is control of the system using feedforward and feedback control combined with the inverse dynamics identification scheme. Tanomaru [33] presented two configurations for nonlinear system identifiers based on multilayer NN's. The first one consists of using a feedforward NN to simulate the input-output behavior of the unknown system based on a regressive model. The second approach is based on the state variable representation of the system to be identified. Kosmato Poulos et al [34] discussed the identification of high order dynamical systems by using recurrent NN. Levin and Narendra [35] presented approach based on the realization that if the linearization of a system around an equilibrium point is "well behaved" (controllable, observable, etc) then locally the nonlinear system will exhibit behavior that is topologically equivalent to that of a linear system. Equipped with this insight one can determine the form of the model with which the system should be identified, and specify the objectives that need to be set controlling the procedure we are able to derive practical methods for the identification and control of nonlinear systems. Narendra and Mukhopadhyay [36] introduced two classes of approximation

Ch.1: Introduction.

13

models of nonlinear auto-regressive moving average (NARMA). Which identify the unknown plant the greatest significance for the use of NN in the control of nonlinear dynamical systems is the fact that the NARMA-L1 and NARMA-L2 models are more tractable analytically than the NARMA model, that is done by simulation studies and examples. Guez et al [37] indicated that features of NN's can be used for adaptive control through the use of NN computation algorithms. The utilization of NN's for adaptive control offers definite speed advantages over traditional approaches for very large scale systems. Kraft and Campagna [38] compared an NN based controller similar to that cerebeller model articulation controller (CNAC) with two traditional adaptive controllers, a self tuning regulator (STR), and a Lyapunov-based model reference adaptive controller (MRAC). Comparisons are made with respect to closed-loop system stability, speed of adaptation, noise rejection, the number of required calculations, system tracking performance and the degree of theoretical development. Chen and Khalil [39] presented a first attempt to address issues related to adaptive control using NN's in a theoretical framework. The main challenge in this problem is the fact that the output of the NN depends nonlinearily on the weights. Morles and Mort [40] proposed an adaptive NNbased control scheme and its performance was digitally simulated using an unknown plant which belongs to certain class of nonlinear systems. Lan [41] demonstrated the feasibility of developing an adaptive controller based on NN for controlling an unknown single-input-single-output (SISO), linear, dynamical plant and the learning rate or the neuron's gain is so chosen that the system becomes unstable; increasing the number of neurons used in the hidden layer will not stabilize the system. If a high gain is used in the neuron's activation function, the learning rate of the network must be small, and vice verse. Lightbody and Irwin [42] investigated in detail the possible application of NN to

Ch.1: Introduction.

14

the modeling and adaptive control of nonlinear system the results are in three areas nonlinear plant modeling, direct MRAC and nonlinear model based adaptive control. Nariga and Wang [1] presented a NN based direct adaptive control strategy for general unknown nonlinear system by using the combination of feedforward NN and un optimization scheme to obtain the control signal. A few papers were published on the application of NN to the control and guidance of missile because of the limitation on using and impossibility to build hardware for scheme. Marco [43] developed a hopfield NN architecture to solve the optimal control problem for homing guidance. A linear quadratic optimal control problem is formulated in the form of an efficient parallel computing device known as a hopfield NN. Convergence of the hopfield is analyzed from a theoretical perspective showing that the network is a dynamical system approach with a unique fixed point, which is the solution to the control problem at any instant during the missile pursuit. Lightbody and Irwin [44] investigated in detail the possible application of NN to direct MARC and discussed in detail the defalcates involved in training the neural controller imbedded with the closed loop. This is applied to the control of a nonlinear BTT - CLOS missile constrained to operate with the single plane and with actuator saturation assumed. Other published papers on application of NN to dynamical system control can be found in: Adnan [45] presented the identification of an adaptive control of linear and nonlinear dynamics by using the dynamic back propagation training algorithm and applied this technique to two different models of missile, by using the pitch plane motion. Wissam [46] presented many types of turning algorithm for feedforward multilayer NN's. He applied this technique to controller satellite altitude by using the adaptive control. Kais [47] proposed the nonlinear internal model control (IMC) strategy based on NARMA model.

Ch.1: Introduction.

15

The IMC controller consists of inverse controller and robustness filter with a single tuning parameter. Al - Anbak.[48] designed a neuro - controller to act like a conventional three term PID controller and used this controller in longitudinal displacement autopilot to control two types of aircraft pitch dynamics.

1.5. Scope of the Work: Although many different papers are published on BTT-CLOS, we can not find any paper which explains the trajectory of missile in BTT-CLOS guidance and presents the manner in which the missile operating in this trajectory and what problems there are in this method. The main objectives of this work. The first objective is to get trajectory of missile, analyzing it and presenting the problem in this approach. The second and most important objective is to get the suitable neural controller structure for the non linear BTT-CLOS missile and study this structure. The last objective is to get the same trajectory for conventional approach but by using NN and to compare between these two results. The structure of this work is divided as follows: 1. Chapter one contains the general introduction to BTT-CLOS guidance and explains the relation between NN and control system. 2. Chapter two presents the mathematical models of BTT- missile and target, simulation of this system and gives the results as table and graphs. 3. Chapter three presents the various neuro-control structures which are used in control system. 4. Chapter four contains the designing of direct neural model control by using hybrid controller for BBT- CLOS missile in pitch plane and 3-D, simulation this system and gives the results in table and graphs. 5. Chapter Five presents conclusions and suggestion for future work.

Chapter Two

Conventional Approach To BTT Guidance

Ch.2: Conventional approach to BTT guidance

17

Chapter Two Conventional Approach To BTT Guidance. 2.1 Introduction:


A guided missile is one which is usually fired in a direction approximately towards the target and subsequently receives steering commands from the guidance system to improve its accuracy. In the recent years, the application of BTT guidance to tactical missiles has generated considerable interest, motivated by certain advantages that a BTT control configuration can offer [49]. First, against high performance threats, there is a need for defensive missiles to develop increasingly higher lift accelerations, which requires banking maneuver to properly direct the control vector. Second, the need for greatly increased stand off ranges has led the design of tactical missiles towards air breathing propulsion system such as the ramjet. These designs generally have configuration geomatries that are not cruciform. Due to exposed inlets beneath the vehicle. As a result, there are often stringent limits on the sideslip angle that can be developed during engine operation, and this too, dictates some types of BTT control scheme. Third, acceleration takes place in a single plane, and as a consequence of this, only one pair of wings is required, leading to a reduction in drag forces and savings in storage space. A further consequence is that symmetrical airframe can be employed which exhibits high aerodynamic efficiency and improved controllability. The result is a missile, which is more maneuverable and has higher guidance accuracy potential. Saving in weight are also achieved since fewer control surface servos are necessary [12]. This chapter focuses on a conventional controller of BTT and explains operation in the single plane and in space.

Ch.2: Conventional approach to BTT guidance

18

2.2. Mathematical Model: 2.2.1. Missile Mathematical Model:


The mathematical model used in this work for a BTT missile referred to ground axes which is tenth - order and nonlinear: [12].

= z + q - p + z. q = m + mq q + m. = y r + p. r = n + nr r. p = 1 (lp p + l ). I = p. zm = U(z + z) cos + Uysin + g. ym = U(z + z)sin + Uycos.


.. .. . . . . .

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -( 2.1) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -( 2.2) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -( 2.3) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -( 2.4) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -( 2.5) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -( 2.6) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -( 2.7) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -( 2.8)

Constant aerodynamic derivatives are assumed and numerical values are employed, which correspond to a synthetic missile given in table (2.1). Realistic constant will be imposed on the magnitude of the control surface angles ( & ), and the servos driving them will be considered to have infinite bandwidth. By taking laplace transform (L.T) for Eq's (2.1 - 2.6) one can get the missile airframe transfer function in three planes (pitch, yaw & roll) they are:

Ch.2: Conventional approach to BTT guidance

19

(s + 9.2308) 0.625(s 1228.2907 ) (s) - 2 p(s) - - - - - - - -( 2.9 ) s + 11.9393s + 1964.2416 s + 11.9393s + 1964.2416 (s + 9.2308) (s) = 2 p (s) - - - - - - - - - - - - - - - - - - - - - - - - ( 2.10) s + 11.9393s + 1964.2416 (s) =
2

p(s) =

126050 .7 (s) s + 30

- - - - - - - - - - - - - - - - - - - - - - - - - ( 2.11 )

When missile parameters are applied on Eq's (2.9 - 2.11), we get the numerical form for missile airframe transfer function:
[( m + z (s m q )] (s - z )(s m q ) m (s - y )(s N r )+ ) + N I s - Lp l (s m q ) (s - z )(s m q ) m

(s) = (s) =

(s) -

p(s)

- - - - - - - - - ( 2.12 ) - - - - - - - - - -( 2.13)

p(s) =

- - - - - - - - - -( 2.14 ) I

From above it can be seen that the output of the airframe is represented by angle of attack (), sideslip angle () and roll angle (), while the aileron deflection ( ) is the input to roll channel. The cross-coupling of roll rate (p) and angle of attack () are the input to yaw channel and the cross-coupling of roll rate (p) and sideslip angle () and the elevator deflection () are input to pitch channel (see Fig.(2.1)) [21,12]. When the missile is assumed to operate in the pitch plane, the missile mathematical model (Eq's 2.1-2.8) is reduced to those in Eq's (2.15-2.17):
= z + q - p + z q = m + m q q + m
.. . .

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - ( 2.15 ) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ( 2.16) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ( 2.17 )

z = uz + uz

Ch.2: Conventional approach to BTT guidance

20

Fig (2.1): Controller / Autopilot In BTT Missile Guidance Loop

Ch.2: Conventional approach to BTT guidance

21

The output of Eq's(2.15-2.17) is the missile position in z-axis and two states (angle of attack () and pitch rate (q)). This can be got by using L.T for Eq's (2.15-2.17). The following is transfer function:
uz s 2 um q z s + ( uz m uz m ) s 2 [s 2 ( z + m q )s + ( z m q m )] z s + ( m m q z ) s ( z + m q )s + ( z m q m ) m s + ( m z m z ) s ( z + m q )s + ( z m q m )
2 2

Fz (s)

- - - - - - - - - - - - - - - - - - - - - - - -( 2.18 ) - - - - - - - - - - - - - - - - - - - - - - - - - ( 2.19) - - - - - - - - - - - - - - - - - - - - - - - - - ( 2.17 )

F (s) = Fq (s) =

When we apply the parameters value, we get:

Fz (s)

312.5s 2 2884.625s 2277238.3 = s 2 [s 2 + 11.9393s + 1964.2416] 0.625(s 1965.2652) F (s) = 2 s + 11.9393s + 1964.2416 1234.06(s 3.69064) Fq (s) = 2 s + 11.9393s + 1964.2416

- - - - - - - - - - - - - - - - - - - - - - - -( 2.21) - - - - - - - - - - - - - - - - - - - - - - - -( 2.22) - - - - - - - - - - - - - - - - - - - - - - - -( 2.23 )

The input to missile in planer motion is elevator deflection only.[3].


Zc Ze Zm

+ -

Controller Eq (2.30)

Zd

Limiter

Dynamics

Zm

1/s
2

Zm

Missile Eq's.( 2.15 - 2.17 )

Fig.(2.2).Control System For Planer Motion..

Ch.2: Conventional approach to BTT guidance

22

Table (2.1). Synthetic Missile Parameters. PARAMETERS Z Z M Mq M Y N Nr I Lp L U || 0.35 RAD & VALUE -2.7085 -0.625 -1939.24 -9.2308 1234.06 -2.7085 1939.24 -9.2308 0.0005 -0.015 63.03 500 RAD-1S-1 RAD-1S-1 RAD-1S-2 RAD-1S-1 RAD-1S-2 RAD-1S-1 RAD-1S-2 RAD-1S-1 KG.M2 NMS.RAD-1 NM.RAD-1 M.S-1

|| 0.06 RAD

2.2.2. Target Mathematical Model:


The general mathematical model of maneuvering target is given by Eq's(2.24-2.27) and Fig.(2.3) illustrates the corresponding relation between parameters.
Z-Axis

aT

VT

Y-Axis

Fig. (2.3): Maneuvering Target.

Ch.2: Conventional approach to BTT guidance

23

yT = vT .cosT z T = v T .sinT T = a T v T
. .

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - ( 2.24 ) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ( 2.25) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ( 2.26 )

2.3. Axes Transformation:


It is then necessary to transform the motion with respect to the missile axes down to the ground axes. This transformation can be achieved by using Euler angles made considerable more straight forward by assumption that the missile and ground x-axis are parallel. Assuming that acceleration due to gravity is (g), then the Cartesian acceleration of the missile with respect to the ground axes is described by table (2.2), Fig.(2.4) and Eq's(2.27-2.29) [44,50].
xm = xg z m = z g cos + ygsin y m = - z gsin + y g cos - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ( 2.27) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ( 2.28) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ( 2.29)

Table (2.2). Direction Cosines of Roll. FROM TO OXM OYM OZM OXG 1 0 OYG 0 Cos OZG 0 -sin

Sin

Cos

Ch.2: Conventional approach to BTT guidance

24

Yg Ym Xm, Xg Zg

Zm

Fig (2.4): Roll About Oxg By .

2.4. Missile Autopilot:


The missile autopilot consists of missile controller, cartesian to polar converter and the limiters for aileron and elevator deflections. The objective of autopilot (missile control system) is to generate the suitable polar commands. One approach to BTT - CLOS guidance is to control vertical and horizontal motions separately by means of two identical single plane controller. In Fig's(2.1 & 2.2) the corresponding controller is considered as double lead network with the following T.F and corresponding values:
1 + Ts 2 F(s) = k( ) 1 + Ts

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - ( 2.30 )

Where:

k=0.035

T=0.1

&

=0.03.

the controllers for both pitch and yaw loops are identical, represented as F(s), giving as output the desired Cartesian acceleration . The polar converter converts these cartesian acceleration by generating the desired roll angle (d) and the elevator deflection (d):

Ch.2: Conventional approach to BTT guidance

25

Zd = (zd) 2 + ( yd) 2 d = - tan -1 ( yd zd


.. ..

..

..

..

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - ( 2.31 ) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ( 2.32 )

separate roll loop is then required to drive the roll angle to (d). The roll loop controller must be chosen to give satisfactory roll response while avoiding strong pitch-yaw cross-coupling due to the (p) and (p) terms, explained in Eq's (2.1 & 2.3). A suitable roll loop controller is considered as lead network with the following T.F:
1 + TR s 2 FR (s) = k R ( ) 1 + R TR s

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - ( 2.33)

Where:

kR=0.054

TR=0.015

&

=0.3334.

The limiter is used to present the access of g-load limit (amax) which may occur during severe missile maneuver. Practically the value of deflection for aileron and elevator must not be increased to a certain limit by using a suitable limiter. This limit depends on the type and structure of the missile. From practical point of view the suitable limiters values for surface - to - air missile (SAM) are: ( || 0.35 rad and || 0.06 rad ) .

2.5. Simulated Results:


The system, which is illustrated in Fig.(2.1)( including the 10th -order nonlinear model of Eq's(2.1-2.8)),has been simulated on a computer using the Matlab Var.5.1-1997 package [54]. This simulation is done in two motions: a) missile planer motion:

Ch.2: Conventional approach to BTT guidance

26

Fig.(2.2) illustrates the missile planer system , the limiter value in this case is (+ 0.12). Fig.(2.5) represents the step response for nonlinear planer motion at the step changes: input of

zc = 50 - 20 20 - 50 0

-----------------------------

0 < t 5. 5 < t 10.

- - - - - - - - - - - - - - - 10 < t 15. - - - - - - - - - - - - - - - - 15 < t 20. - - - - - - - - - - - - - - - - 20 < t 25.

From this response it can be seen that the output of channel follows the input, with max. overshoot (Mp) of (50%), setting time (ts) is (3 sec) and rising time (tr) approaching to (1 sec). The response is improved by using the notch filter after the controller to reduce the oscillation and speed up the response. The resultant response is shown in Fig.(2.6), from which it can be seen that the effect of using notch filter is small, where it reduces the setting time , rising time and max. overshoot to (1.5) , (0.8) and (45%) respectively. Therefore, it can be said that the using of notch filter in planer motion improves the response by small percent. b) missile space motion: In this case the missile motion is considered into 3-D including the crosscoupling between autopilot channels. Missile motion is transformed from 3-D to 2-D by fast banking to the target plane using the BTT technique. The target model is considered as three cases:

Ch.2: Conventional approach to BTT guidance

27

case(1): stationary target: Fig.(2.7) represents the error response for stationary target, from which it can be seen that the missile achieved the target in z-channel and y-channel in the same time (3.26 sec) (see table (2.1)). The fast response was achieved by banking the missile to target plane and orienting to it. The capture time depends on target and missile velocities and initial range between them. In this case, the missile has ability to achieve any target with smooth trajectory, where the banking process is applied once. case(2): unmanoeuvering target: Fig's.(2.8 & 2.9) demonstrate the two cases for approaching and departuring targets and from which it can be seen that the effect of roll loop on airframe missile is seen made by cross-coupling between channels, where the (ye) signal in two cases has similar shape but the error response for z-channel is different in two cases because the missile in approaching case must make the banking many times rather than the departuring target. The capture time for departuring target is greater than approaching target, but with more severe trajectory, where the relative distance decreases in approaching target. Hence the most effective parameters are the target range and missile velocity. By banking the missile will decrease the effect of cross-coupling and the last task decreases the miss-distance depending on the range and velocity, therefore the capture time in approaching target is less than of departuring target, but with more severe trajectory. case(3): manoeuvering target: Fig's.(2.10-2.14) and table (2.1) illustrate the different maneuvers for approaching and departuring target with positive and negative g-load (+ ve at), from which it can be seen that the effect of roll loop on missile airframe is by cross-coupling between the pitch - roll channels (p) (see Fig.(2.15)) and yaw roll channels (p) (see Fig.(2.16)).

Ch.2: Conventional approach to BTT guidance

28

In this case the importance of BTT appears where the missile changes its orientation to target plane at each moment. This process is achieved by banking the missile to the target plane (see Fig.(2.17)). The effect of cross-coupling can be seen also on the value of sideslip angle where it conciliates the oscillate and approach to zero ( 0) by roll rate (p) cross the angle of attack () enter the yaw channel (see Fig's.(2.18 & 2.19)).

Table (2.1): Target Results. CASE PARAMETERS (1).(0)=/4 , ZT(0)=-200 , YT(0)=0. (2).(0)= /4 , ZT(0)=500 , YT(0)=800 , YM(0)=0 ZM(0)=0 a).In (0)=0 & aT=0 ; b).In (0)= & aT =0 ; (3).(0)= /4 , ZT(0)=500 , YT(0)=800 , YM(0)=0 ZM(0)=0 a).In (0)=0 & aT =3g b).In (0)=0 & aT =-3g c).In (0)= & aT =3g d).In (0)= & aT =-3g 0.928 0.4696 0.8078 0.9956 11.17 11.5 10.3 9.89 0.1723 0.4607 11.23 10.48 0.3245 3.26 MISS DISTANCE M.D(M) CAPTURE TIME(SEC)

Chapter Three

Neural Network Controller

Ch.3: Neural network controller

38

Chapter three Neural Network Controller


3.1. Introduction:

Neural networks are developed by morphologically and computationally simulating a human brain. Although, the precise operation details of artificial neural networks are quite different from human brains, they are similar in three aspects. First, a neural network consists of a very large number of simple processing elements (the neurons). Second, each neuron is connected to a large number of other neurons. Third, the functionality of the networks is determined by modifying the strengths of connections during a learning phase. Many efforts have been made to find efficient approaches for control from physiological studies of the brain. Research over the last twenty years has revealed the architecture and performance characteristics of the brain as a controller and has shown that neural network controllers have important advantages over conventional controllers. The first advantage is that neural network controllers can efficiently utilize a much larger amount of sensory information in planing and executing a control action than an industrial controller can. The second advantage is that a neural network controller has the collective processing capability that enables it to respond quickly to complex sensory inputs while the execution speed of sophisticated control algorithms in a conventional controller is severely limited. The last but also the most important advantage of a neural network controller is that good control can be achieved trough learning [7,26]. Four controllers have played important roles in research on neural control. They are: Albus's cerebeller model of articulation controller (CMAC), Kawato et al's hierarchical neural network controller. Psaltis et al's multilayered

Ch.3: Neural network controller

39

neural network controller and the internal model cotroller. Both (CMAS) and the hierarchical neural network controller were developed based on physiological research on the brain, but they are quite different in architecture for control. The neural controllers described above could all be regarded as inverse controllers as they are all based on modeling the inverse dynamics of the plant. In addition to these inverse-model based controllers, there are also other neural controllers originating from conventional control approaches, for example, those based upon the variable structure technique, the robust control strategy the model predictive method and the model reference PID-like controller [46] .For information on these important controllers see [51].

3.2 Series Neuro-Control Scheme: The series neuro-control scheme is shown in Fig.(3.1). This type of neurocontrol is referred to as direct inverse control, which means that the neural network may realize the inverse dynamics of the plant.
Reference Signal
r

Neural Network

Input u

Plant

Output
y

Fig. (3.1): Block Diagram of A Series Neuro - Control Scheme. Thus if we denote the input/output mapping of the plant by fp(u), that is,

y = f p (u)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -(3.1)

the neural network realize the inverse mapping as:


U= f 1p (y) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -(3.2)

where: f-1 denotes the inverse mapping of (f).

Ch.3: Neural network controller

40

Thus, if we give the reference signal (r) to the neural network, then the plant output (y) becomes (r), that is,

y = f p (u) = f p (f p (r)) = r
-1

- - - - - - - - - - - - - - - - - - - - - - - ( 3.3)

where u is the plant input corresponding to the reference signal (r) and (y) is the plant output to (u). In order to realize the configuration of Fig. (3.1), we can use the following two types.

*Specialized inverse mapping: This type is shown in Fig. (3.2). In


this Fig. the neural network is trained such that the squared error is minimized. If the error becomes almost equal to zero, then the neural network realizes the inverse dynamics of the plant. The part enclosed by the dotted lines, which is a feed forward path (FFP) can be regarded as a kind of neural networks whose output layer is hard-wired. In this case, we will show that the system's Jacobian is required in order to use the backpropagation algorithm. [23].
Reference Signal
r

FFP Neural Network


Input u

Plant

Output
y

+-

Fig.(3.2).Specialized Inverse Mapping Neuro - Control. In real applications there are some problems. One is the input/output mapping by the neural network of fig (3.2), which is not a dynamic, but rather a static mapping from (u) to (y). In the control application field dynamic mappings are more usual and hence, the neural network must provide many past inputs to the plant on-line or the past inputs must be stored. In the former case,

Ch.3: Neural network controller

41

the outputs of the neural network are not only [u(t)] but also [u(t-m), m=1,2,q] and in the latter case, the inputs of the neural network become [r(t-i), i=1,2, k]. Furthermore, we can provide more information to the input of the neural network in order to realize a fast convergence of learning. If we know some factors can prove the control signal, it is better to use such information as the input vectors of the neural network. Therefore, a general configuration for a series type neuro-controller can be shown in fig(3.3), where: I1,I2,..It denote additional information which may affect the control signal. However, if we do not know the time-delay(q) and (p) precisely, we can not use such a structure. In this case we may use the estimated values of (q) and (p) [31].
r (t) u (t)

Z - r (t-1)
u (t-1)

Z -1
I1 I2

r (t-p)

Plant
y (t)

fp( . )

u (t-k) It

Fig.(3.3). General Configuration For Series Type - Neuro - Controller.

*Neuro-emulator mapping: Another approach is to simulate the plant by using another neural network, which maps the input/output relation of the plant. Thus, such a neural network is used as a system identifier. In neural network field, this is called an emulator I nstead of a system identifier.

Ch.3: Neural network controller

42

Then using the emulator, the systems Jacobian can be calculated as if the emulator were the true plant. A simple training procedure for the emulator is described as in Fig (3.4). Input u Plant
+ -

Output y Estimate (y^ ) Error (e)

Neural Network
(Emulator)

Fig. (3.4). A Simple Training Configuration For Parallel Neuro Emulator.

In Fig (3.4), the neural network is trained such that predication error (e=yy^) is minimized where (y^) is an output of emulator which denotes the predicate estimate of (y). In a more detailed manner, the structure, which is given by fig (3.4), can be modified as Fig (3.5). If we know the orders of time-delays of the input and the output signals, then those values are used to determine (p) and (q) in Fig (3.5).
u(t) Input

Plant
Error e(t+1)

Output
+

y(t+1)

Z -1 Z -p Z -1 Z -q Estimate y^ (t+1)

Fig.(3.5). Internal Structure of a Neuro - Emulator.

Ch.3: Neural network controller

43

In order to speed up the convergence, we can use another model as an emulator, which is shown in Fig (3.6). In this figure, a simple mathematical model or a physically precise model is used as a conventional model even if it is complex and nonlinear. If there is discrepancy between an actual output and a model output, the neural network will adjust itself to minimize the error. The model output is denoted by (y1^) and the output of the neural network is (y2^). Their sum is the predicted value (y^) of the actual output (y) and error between (y) and (y^) is denoted by (). If () is not equal to zero the neural network will learn to decrease the error (). Thus, the emulator is regarded as the total sum of conventional model and neural network, but only the neural network can be adjusted. The modeling method is acceptable to control engineers since the conventional model may be insufficient to provide the perfect prediction of the actual output [23]. Input u Emulator Conventional Model y^2
+ Estimate (y^ )

Plant

Output y + Error -

Neural Network

y^1

Fig (3.6). An Alternative Modeling By Using Neural Network.

3.3 Parallel Control Scheme:

A parallel neuro-control architecture is shown in Fig (3.7) where a PID controller is used as the conventional controller. The parallel type neuro-

Ch.3: Neural network controller

44

controller is used to adjust the control input (u) to the plant, which is the output of a conventional controller, such that the plant output (y) could follow a desired reference signal (r) as precisely as possible. The function of the parallel type neuro-controller is to adjust a conventional control input (u1) if it can not provide good results. Neural Network r Conventional Model u1

u2 + u Plant y

Fig.(3.7). A Parallel Neuro - Control Scheme. *Learning for parallel control scheme:[23]

The general control configuration is illustrated in Fig.(3.8) for a parallel type neuro-controller. In the figure, NN1 is a neural network for plant emulator which provides an estimate (y^) of the plant output (y). The control signal (u2) that is an output by the neural network NN2 is used for correcting the control signal (u1) produced by the conventional controller such that the error between reference signal and plant output is minimized. Thus, NN1 is used to emulate the system Jacobian that is required to obtain the equivalent error at the output of NN2. Let us denote the error between the reference signal (r) and the actual plant output (y) by (e). The objective is to train NN2 such that a squared error can be minimized.

Ch.3: Neural network controller

45

NN2

u2 +

input u

Plant

Reference Signal (r)

PID

u1 NN1

output y + y
^

e + Fig.(3.8). Parallel Type Neuro - Controller With Emulator.

3.4 Self-Tuning Neuro-Control Scheme:

The self-tuning neuro-control scheme is illustrated in Fig. (3.9) where a neural network is used to tune the parameters of a conventional controller similar to the adjustment made by a human operator. [23]. desired value Conventional Controller input output

Plant

Neural Network

Fig.(3.9). A Self - Tuning Type Neuro - Control Scheme.

In this case the human operator has accumulated some experience and knowledge on the control system. However unlike a computer, it is rather impossible for the operator to store past data history of the system for any kind of operating conditions.

Ch.3: Neural network controller

46

A computer can store such information easily and retrieve it at once. Therefore, if we can include the operator's experience and knowledge in to a neural network and train it based on past data history, then the trained neural network may be used as means to tune the controller parameters in an on-line way. This approach has direct applications for many traditional control techniques, which include adaptive control methods. Many adaptive control methods have a number of parameters or user-defined polynomials that need to be selected or tuned in prior. These are usually chosen by trial and error. By integrating a neural network into the control scheme, it can then be used to tune these parameters in an on-line way. Thus, this self-tuning neuro-control strategy has possible applications in many traditional control approaches.

3.5. Adaptive Neuro-control Scheme:

In this case, we assume a mathematical model based on the physical phenomena and estimate the unknown parameters included in the mathematical model. Then a control law is determined to achieve some goals of the cost function by regarding the mathematical model, as the true system. Such an adaptive control approach is also based on linear system theory. If some changes in the plant or environment occur, we must re-build the model and determine a new control law for the model. Thus, we must check manually whether the model is adequate to describe the real physical system or not. Therefore, to control a linear time-invariant system adaptively, two distinct approaches have been used: [45]. *Direct neuro - adaptive control: Direct control is shown diagrammatically in Fig.(3.10). The parameters of the controller in direct control are directly adjusted to reduce some norm of the output error between the

Ch.3: Neural network controller

47

system output and the desired output. For nonlinear systems, methods for directly adjusting the parameter of the controller using this approach are not available. This is because the unknown nonlinear system lies between the controller and the output error, therefore the effect of changing the parameters of the controller on the output error cannot be computed.

Desired output (yr) Reference (r) signal error (e)

Neuro-controller input (u) Plant output (y)

Z-1 Z-1

Fig.(3.10). Direct Adaptive Control. *Indirect neuro - adaptive control: Indirect adaptive control is

shown in Fig.(3.11). In this approach the controller parameters are determined, using the estimated parameters of the system. Indirect adaptive control has proved successful for the adaptive control of linear systems and even when the controlled systems are nonlinear. Since this work is concerned with control of linear time - varying and nonlinear systems, indirect control will be used.

Ch.3: Neural network controller

48

desired (yr) output reference (r) signal (ep)


+

error output (y)

- (ec) NeuroController (N2)

input (u)

plant

Z-1 Z-1
Neuro-Identifier (N1) -+

(ei)

(ei) Z-1
Fig.(3.11). Indirect Adaptive Control.

To realize the above structure, we assume that the plants are stable in the bounded input - bounded output (BIBO) sense and there is sufficient knowledge about the plants to specify the goal of the control, also we assumed that the sites of the plant are directly observable without noise. Training of the controller started with off - line identification phase for N1, off - line training phase for controller cascaded of N2 and N1 and connect the plant as shown in Fig.(3.11) and train the controller by using (ei) to update N1 and backpropagate (ec) through N1 to calculate the error at the output of N2, which is denoted by (ep) and this error is used to update N2.

Ch.3: Neural network controller

49

3.6. Neural Model Reference Adaptive Control:

Adaptive systems, which make explicit use of models for control, are commonly referred to as MRAC systems. The implicit assumption in the formulation of the MRAC problem is that the designer is sufficiently familiar with the plant under consideration so that he can specify the desired behavior of the plant in terms of the output of the reference model. For any system with known input-output pair [(u),(y)], the desired output of the system (yr) is specified from certain input (r) (bounded function). The input-output pair [(u),(y)] is the required reference model. Mainly, the control problem is to determine the controller structure and adjust its parameters to minimize the error between the output of the system and the desired output such that: [|(yr-y)|<=]. The MRAC is shown in Fig (3.12). [45] Reference Signal (r) Reference Model Desired output (yr)
+ -

Error (e)

Input (u)

Plant

Output (y)

Fig.(3.12). Model Reference Adaptive Control.

The general nonlinear approximate capability of neural network referred to offers great potential for nonlinear control. In particular, a neural network can be employed to form the following nonlinear control law:
U(t)= f(xp (t), r(t), w(t) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ( 3.4)

Ch.3: Neural network controller

50

The network can be represented a wide variety of nonlinear control laws, with the same structure, simply by adjusting the weight in training to achieve the desired approximation accuractely. One possible MRAC structure, based on the ability of the neural network to form a nonlinear control law, is shown in Fig. (3.13) [41]. desired output ( yref (t)) N.N Training rule adjust weights

Calculate Measure Of performance.

e(t) -

setpoint. r(t) xp (t) neural network

control u(t)

Nonlinear Plant xp (t) system state

output yp(t)

Fig.(3.13). General Neural Model Reference Adaptive Control.

Psaltis. et. al [13] discussed the problems associated with this control structure, introducing the concepts of generalized and specialized learning of a neural control law. It was thought that off-line of a rough approximation to the desired control law should be performed first (i.e.) generalized learning. In this manner, the neural control would be capable of driving the plant over the operating range and without instability. A period of online specialized learning would be used to improve the control provided by the neural network controller. Hence, a linear fixed-gain controller was used in parallel with the neural control

Ch.3: Neural network controller

51

law. The first was chosen to stabilize the plant and to provide approximate control. The plant can then be adequately driven over the operating range, with the neural network tuned online to improve the control. The resulting structure adopted for neural model reference adaptive control of a SISO nonlinear plant is then as shown in Fig. (3.14). Here, the terms (kr) and (k) specify a nominal linear fixed-gain state-space control law. Linear Reference Model. xm(t) r (t) N.N u net(t) + Fixed gain Kr + K + u(t) Nnlinear Plant. xp(t) yp(t) Yref (T).

Fig.(3.14).Direct Neural MRAC Structure.

The complete nonlinear control provided by the network in parallel with a fixed-gain state-space controller is expressed in Eq (3.5), including for generality the state of the reference model xm (t):

Ch.3: Neural network controller

52

U(t)= krr(t), kTxp (t), nnet(t) Unet(t) = f (xp(t),xm(t),r(t)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - ( 3.5) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ( 3.6)

Due to the nonlinearities present both with the plant and within the neural network, suitable stability based training rules for direct neural controllers are still at the initial stages of development.

Chapter Four

Design And Analysis Of Direct Neural Controller.

Ch.4: Design and analysis of direct neural controller

54

Chapter Four Design And Analysis Of Direct Neural Controller 4.1. Introduction:
The NN's offer a number of potential benefits for application in the field of control engineering. Particular characteristics of NN's applicable in control include the approximation of nonlinear functions, learning through example and the ability to combine large amounts of data to form decisions or pattern recognition. In particular, neural technology offers much more benefit in the area of nonlinear direct MRAC. The control law utilized in most control system design is undoubtedly linear in nature, possibly being formed by a linear combination of state variables. To provide satisfactory control of nonlinear systems. it is common to employ an adaptive control strategy in which the gains of this linear controller are adjusted over time. Typically an adaptive controller consists of two loops, the control loop and the controller gain adjustment loop. The last mentioned loop attempts to adjust the control gains to force the plant to follow the desired response of the reference model over the nonlinear operating range. The direct neural adaptive control scheme will update the neural controller which connects parallel with classical controller to get response following the desired response of the reference model. In the field of aerospace engineering, NN's have been applied successfully to the control of aircraft such as optimal flight control or for automatic landing systems. A particular problem reported in BBT missiles are actuator saturation and the cross- coupling between channels of autopilot, a direct, nonlinear, neural controller is developed to improve the performance of a BTT-CLOS missile.

Ch.4: Design and analysis of direct neural controller

55

4.2 Neural Single-Plane of BTT-CLOS:


The classical control system in single plane for BTT-CLOS missile (see Fig.2.2) having conventional phase advance controller as given in Eq. (2-30) was chosen to achieve a phase margin of (480) with a gain margin of 6.8 dB. In practice there are many nonlinearities present in with the missile control system, such as actuator saturation and nonlinear variations of aerodynamic derivatives. As a first step, the problem of actuator saturation is addressed in this case study. To overcome actuator saturation problem we replace the conversion controller (see Fig. 4.1.a.) by neural controller (see Fig. 4.1.b). The neural control scheme of Fig.(4.1.b) takes account of the saturation nonlinearly simply by assuming a sigmoidal rather than a linear output activation function. zc +ze zm F(s) Eq.(2.30) limiter

(a)

q ze ze

F(xp) tangential activation function

F(s) Eq.(2.30)

Fd

(b) Fig. (4.1): a. Classical Controller. B. Hybrid Controller.

Ch.4: Design and analysis of direct neural controller

56

Control law for controller in Fig. (4.1.b) can be written as in Eq.(4.1). Here (Fd) represents the output of the linear controller which is used in parallel with the neural controller. f(xp) is the neural contribution formed in this case by using a multilayer network (4,20,1) with learning rate (r) equal to (0.009) and momentum term () equal to (0.05), the input to the network represented by vector consists of two states of system ( angle of attack and pitch rate ) and error signal with its derivative. The activation function, which is used in hidden layer is tangential function and pure linear function in output of network. The two outputs (neural controller output and conventional controller output) are summed and entered to tangential activation function.

= tanh[f(xp) + Fd]
where: xp=[ze , ze , , q]T.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -( 4.1)

The complete nonlinear single plane controller is shown in Fig (4.2). The input to the system is taken as step changes:

zc = 50 - 20 20 - 50 0

-----------------------------

0 < t 5. 5 < t 10.

- - - - - - - - - - - - - - - 10 < t 15. - - - - - - - - - - - - - - - - 15 < t 20. - - - - - - - - - - - - - - - - 20 < t 25.

The reference model Gref(s) is chosen so that its response is achievable by the closed loop system:

G ref (s) =
where: =0.8 rad

wn 2 s 2 + 2wns + wn 2
&

- - - - - - - - - - - - - - - - - - - - - - - - - - - ( 4.2)

wn=50 rad/s.

Ch.4: Design and analysis of direct neural controller

57

Fig.(4.2). Complete Neural Signal Plane Controller for BTT - CLOS.

Ch.4: Design and analysis of direct neural controller

58

The training of the NN is achieved by using backpropagation algorithm, where the output of missile is represented by (zm) and the output of reference model is represented by (zref). The error signal between them is backpropagated through the training algorithm to update the weight and bias of NN (see appendix A). The cost function which is used in training, is taken as root mean square error (RMS):
1

RMS = 1 [(zm (k))2 - (z ref (k))2 ] 2

- - - - - - - - - - - - - - - - - - - - - - - - - ( 4.3)

A second - order notch filter N(s) is added to the control structure of Fig. (4.1,b) at the output of the neural controller to remove the oscillation.

N (s) =

s 2 + 25s + 2100 s 2 + 35s + 1100

- - - - - - - - - - - - - - - - - - - - - - - - - ( 4.4)

4.3. Neural Controller For Space Motion:


The complete BTT - CLOS missile under closed - loop control is shown in Fig.(2.1). Here zc and yc represent the target positions in the missile plane. The controller for both pitch and yaw loops are identical, represented as F(s).(see Eq.2.30). The nonlinearities present within the BTT - missile control system are axes transformation, actuator saturation, aerodynamic derivatives and nonlinear cross - coupling between pitch yaw, roll - pitch and roll - yaw dynamic. The main problem in the space motion for BTT - missile is the nonlinear cross - coupling between airframe channels. Thus NN is used to reduce this effect by using hybrid controller (conventional and neural controllers (see Fig.4.1.b)).

Ch.4: Design and analysis of direct neural controller

59

instead of conventional controller. The complete neural controller space motion for BTT - CLOS missile is shown in Fig. (4.3). The suitable reference model is used for each channel of missile (y and z). The output of reference model for y-channel represents yref, compared with output of y-missile and uses the different signal (ym-yref) is used to update the neural controller for y-channel. The same thing is done with z-channel. Here the same structure of NN is used in planer motion and the inputs to neural controller of z-channel are the error signal (ze), its derivative (ze), angle of attack () and pitch rate (q), refereed to them by vector xp=[ze , ze , , q]T and the inputs to neural controller of y-channel are the error signal for y-coordinates of missile and target (ye), its derivative (ye), sideslip angle () and yaw rate ( r ),refereed to them by vector yp=[ye , ye , , r]T, therefore the control law for two channels can be written as:
z = tanh (f( xp ) + Fdz) y = tanh (f( yp ) + Fdy)
.. ..

- - - - - - - - - - - - - - - - - - - - - ( 4.5) - - - - - - - - - - - - - - - - - - - - - ( 4.6)

where:

xp=[ze , ze , , q]T

&

yp=[ye , ye , , r]T.

The output of two hybrid controllers is converted to polar commands by Cartesian to polar converter to produce elevator angle () and the desired roll angle (d) . The limiter on the elevator deflection is ignored, where the signal is limited by the tangential activation function at the output of hybrid controllers.

Ch.4: Design and analysis of direct neural controller

60

Fig.(4.4). Complete Neural Controller of BTT Missile in Space Motion.

Ch.4: Design and analysis of direct neural controller

61

4.4. Simulated Results:


The same procedure for simulation in chapter two is used here and the same computer package is used; the simulation consists of:

4.4.1. Analysis for Planer Motion:


The missile planer system, which is given in Fig.(4.2), is simulated with the input commanded step change (see table 2.2). Fig.(4.4) represents the missile time response with z-plane, from which can be seen that the output follows the input with expectable value for rising time, setting time and max. overshoot (see table 4.1). From Fig.(4.5) and table (4.1)it can be seen that the using of notch filter at the output of hybrid controller gives better response ,where the resultant response has less rising time, setting time and max. overshoot. Fig.(4.6) illustrates the effect of tuning neural controller, where by trial and error the satisfactory response is obtained at learning rate (r) equal to (0.00005) and the momentum term equal to (0.0009). The resultant response has rising time , setting time and max. overshoot smaller than the previous two cases.(see table 4.1). Fig.(4.7) illustrates two comparisons, the first compareds the response of neural approach with response of conventional approach. From which it can be seen that the NN controller has the ability to treat the actuator saturation, where it can be said the using hybrid controller is sufficient in planer motion to ignore the limiter on the elevator deflection.(see Fig.4.7.A). The second comparison is applied to using the notch filter in conventional and neural approaches. From Fig.(4.7.B) it can be seen that the notch filter in neural approach is more active than in the conventional approach.

Ch.4: Design and analysis of direct neural controller

62

Table 4.1. Time Response For Planer Motion.

CASE NN CONTROLLER WITHOUT NOTCH FILTER N.N CONTROLLER WITH NOTCH FILTER TUNING N.N CONTROLLER CONVENTIONAL CONTROLLER CONVENTIONAL CONTROLLER WITH NOTCH FILTER

RISING TIME (SEC)

SETTING TIME (SEC)

MAXIMUM OVERSHOOT (%)

0.5

25

0.4

0.5

0.4

0.3

1 0.8

3 2

50 45

4.4.2.Anaiysis For Space Motion:


Missile system of Fig.(4.3) is simulated on the computer and the target model is considered for three cases:
case (1): Stationary target :

From Fig.(4.8) it can be seen that the ability of NN - BTT-CLOS to achieve the target at very short time is less than the capture time in conventional approach , with more smoothness in the missile trajectory, this results from the ability of NN to control the nonlinear plant and the high speed for processing it.

Ch.4: Design and analysis of direct neural controller

63

case (2): unmaneuvering target :

Fig's(4.9 & 4.10) give the error time response of (ze & ye) for two cases, approaching and departuring target, from which it can be seen that the hybrid controller has the ability to reduce the capture time with more smooth trajectory with high percent when compared with the conventional approach (see table 4.2). The most important parameters are the missile velocity and target range also.
case (3): maneuvering target:

Fig's.(4.11-4.15) and table (4.2) demonstrate the different manoeuvers for approaching and departuring target with positive or negative G-load ( + ve at ). In this case it can be seen that the output of missile copies the input signal in ychannel faster than in z-channel. This came from the effect of cross - coupling between channels, where the input to yaw channel is cross-coupling (p) only while the inputs to pitch channel are the deflection of elevator and crosscoupling (p). This case shows the ability of NN to reduce the capture time, and gets target by smoother trajectory (see Fig.4.12). The ability of NN to reduce the cross coupling (roll-yaw channels (p) and roll-pitch channels (p)) can be seen from the Fig's (4.17 & 4.18). When we compare the values of cross coupling (p & p) in neural approach with conventional approach, we get the values at neural approach much less than the values at conventional approach. Fig (4.19) represents the comparison of missile trajectories for neural and conventional approaches, from which it can be seen that the missile achieves the target at small time and more smooth trajectory when the neural approach is used. Hence, the limiter of elevator deflection may be ignored when using the NN controller in planer motion. In space motion the using of NN will help in reducing the cross-coupling effects that occur in the complete 3-D missile guidance system.

Ch.4: Design and analysis of direct neural controller

64

Table (3): Target Results


MISS DISTANCE (M) IN CASE PARAMETERS CONVENTIONAL CONTROLLER MISS DISTANCE (M) IN NEURAL CONTROLLER CAPTURE TIME(SEC) IN CONVENTIONAL CONTROLLER CAPTURE TIME(SEC) IN NEURAL CONTROLLER

(1).(0)=/4 , ZT(0)=-200 , YT(0)=200. (2).(0)= /4 , ZT(0)=500 , YT(0)=800 , YM(0)=0 ZM(0)=0 a).In (0)=0 & aT=0 ; b).In (0)= & aT=0 ; 0.1723 0.4607 0.835 0.9913 11.23 10.48 4.77 2.54 0.3245 0.9925 3.26 1.12

(3).(0)= /4 , ZT(0)=500 , YT(0)=800 , YM(0)=0 ZM(0)=0 a).In (0)=0 & aT=3g b).In (0)=0 & aT=-3g c).In (0)= & aT=3g d).In (0)= & aT=-3g 0.928 0.4696 0.8078 0.9956 0.9237 0.6186 0.7943 0.8997 11.17 11.5 10.3 9.89 2.76 2.76 2.55 2.55

Chapter Five

Conclusions And Suggested Future Work

CH.5: Conclusions and suggested future work

78

Chapter Five Conclusions And Suggested Future 5.1 Conclusions:


The following conclusions may be drawn from the simulation results presented in previous chapters. A BTT missile in a CLOS is faced with guidance problem by transferring the movement of missile from 3-D to 2-D by banking the missile to target plane. This process gives the missile ability to capture any target with any maneuvering, where it deals with target as planar motion only. All these sineary reduce many problems, first decreasing the effect of cross - coupling between missile airframe channels, where after banking the missile operates by pitch channel only, second the axes transformation needs roll process only, this will conciliate the effect of saturation in the limiter of the elevator deflection. The effect of limitation for elevator deflection on the missile trajectory is greater than the effect of limitation of aileron deflection, because the task of roll loop is banking the missile while the elevator enters the limiting of missile coordinate (ym & zm). From all considered cases in conventional approach the most attractive case is the case for departure downward maneuvering target (-3g), because the missile capture the target in minimum time with less severe maneuver. From above it can be said that the main problems in conventional approach for BTT - CLOS missile is the actuator saturation especially in operating the missile for plane and the effect of cross - coupling between autopilot channels. NN has many structures, using parallel controller for MRAC approach avoids many problems in NN such as the identification of plant and initialization of the NN.

CH.5: Conclusions and suggested future work

79

In neural BTT - CLOS missile the ability of NN controller to solve the actuator saturation problem is clear, when using the proposed hybrid controller that combines neural and conventional control law at a sigmoidal output neuron. The notch filter is more active when it is used with N.N controller than using it with conventional controller, because at N.N controller the oscillation is very damped, while at conventional its effect is very small. The main problem with BTT - CLOS in space motion is the nonlinear cross - coupling between channels airframe missile. Direct neural MRAC has the ability to reduce this effect. This is shown from the time response for nonlinear cross - coupling (p) & (p), because their values are much smaller than the values when using conventional approach and their values when using NN have high dampness to zero. The effect of N.N controller to reduce the cross-coupling effect is very clear, when missile trajectory is considered, where the trajectory is much smooth and the capture time is smaller than that when using conventional controller.

CH.5: Conclusions and suggested future work

80

5.2. Suggestions For Future Works:


The following points are suggested for future works: Application of indirect adaptive controller structure with emulator to update the neuro-controller (inverse of the plant) through emulator, the process is applied without using conventional controller. Application of other types of training algorithm to speed up processing of training such as Levenberq-Marquardt and recurrent network by backpropagation,---etc. Fuzzy controller can be used to control the plant in the form of inverse plant without using the emulator for plant. Application of the proposed hybrid controller that combines neural and optimal control laws and comparing the results with the results which are obtained from hybrid controller for conventional and neural control law. Application of this technique to the other guidance methods such as homing missile in proportional navigation and TV - missile ---etc.

References

Appendices

Appendix A

89

Appendix A: Backpropagation Training Algorithm


A multilayer neural network with one layer of hidden unit (the Z units) is shown in Fig.(a.1). The output units (Y units) and the hidden units may also have biases. The bias on a typical output units (Yk) is denoted by Wok ; the bias on a typical hidden unit (Zj) is denoted by Voi . These bias terms act like weight on connections from unit whose output is always 1. Only the direction of information flow for the feedforward phase of operation is shown. During the backpropagation phase of learning, signals are sent in the reverse direction. The algorithm in this section is presented for one hidden layer, which is adequate for a large number of applications. 1 u1 X1 Z1 1

Y1

ui

Xi.

Zj.

Yk

un

Xn

vij

Zp

wik

Ym

Fig.(A.1). A Multilayer Neural Network. The nomenclature we use in the training algorithm for Bp network is as follows: U = Input training vector: U = (u1, , u i , , u n ).

Appendix A

90

Yd = Output target vector: Yd = (Yd1, , Ydi , , Ydm).


k = portion of error correction weight adjustment for wjk that is due to

an error at output unit yk , also the information about the error at unit yk is propagated back to the hidden units feed into unit yk. j= portion of error correction weight adjustment for vjk that is due to BP of error information from the output layer to the hidden zj. r= learning rate. XI= input unit I: for an input unit, the input signal and output signal are the same, namely ui. voj= bias on hidden unit j. zj= hidden unit j. The network input to zj is denoted (zin)j:
( Z in ) j = v oj + u i .v ij .
i n

The output signal (activation) of zj is denoted zj: Zj= f [(zin)j]. wok= bias on output unit k. yk= output unit k. The network input to yk is denoted (yin)k:
( y in ) k = w ok + z j .w jk .
j p

The output signal (activation) of yk is denoted vk: Yk= f [(yin)k]. The algorithm is as follows: Step 0: Initialize weights. ( set to small random values ).

Appendix A

91

Step 1: While stopping condition is false, do steps (2-9): Step 2: For each training pair, do steps (3-8): Feedforward: Step 3: Each input units (xI ,I=1,------,n) receives input signal uI and broadcasts this signal all units in the layer above (the hidden units). Step 4: Each hidden unit (zj , j=1,-------p) sums its weighted input Signal:
( Z in ) j = v oj + u i .v ij
i n

applies its activation function to compute its output signal. Zj= f [(zin)j]. and sends this signal to all units in the layer above (output units). Step 5: Each output unit (yk , k=1,-------,m) sums its weighted input signals
( y in ) k = w ok + z j .w jk
j p

applies its activation function to compute its output signal Yk= f [(yin)k]. and sends this signal to all units in the layer above (output units). Yk= f [(yin)k]. Backpropagation of error: Step 6: Each output unit (yk , k=1,-------,m) receives a target patterns corresponding to the input training pattern, computes its error information term.

Appendix A

92

k= (ydk - yk) f `[(yin)k]. Calculate its weight correction term (used to update wjk later). wjk= r.k.zj. Calculate its bias correction term (used to update wok later). wok= r.k. and sends (.k) to units in the layer below. Step 7: Each hidden unit (zj , j=1,-----,p) sums its delta input (from units in the layer above).
( in ) j = k .w jk .
k =1 m

Multiplies by the derivative of its activation function to calculate its error information term. j= (in)j f `[(zin)j]. Calculate its weight correction term (used to update vij later). vij= r.j.ui. Calculate its bias correction term (used to update voj later). voj= r.j. Update weights and biases: Step 8: Each output unit (yk , k=1,-----,m) updates its bias and wieghts (j=0,------,p). wjk(new) = wjk(old) + wjk. Each output unit (zj, j=1,-----,p) updates its bias and wieghts (i=0,------,n). vij(new) = vij(old) + vij. Step 9: Test stopping condition.

Appendix A

93

An epoch is one cycle through the entire set of training vectors typically, many epochs are required for training a BP neural network. Convergence is times some faster if a momentum term () is added to the weight update formulas. In order to use momentum, weights (or weight updates) from one or more previous training patterns must be saved. For example, in the simplest form of BP with momentum, the new weights for training steps (k) and (k-1). The weight date formula for Bp with momentum term are:
w jk ( k + 1) = w jk ( k ) + r . k .z j + [ w jk ( k ) w jk ( k 1)]. or w jk ( k + 1) = r . k .z j + w jk ( k ). and v ij ( k + 1) = v ij ( k ) + r . j .u i + [ v ij ( k ) v ij ( k 1)]. or v ij ( k + 1) = r . j .u i + v ij ( k ).

where, the momentum parameter () is constrained to be in the range from (0) to (1) exclusive of the end points [50,20]. To speed up the training process to get optimal weight for network the acceleration coefficient can be added to the algorithm, by using the previous training patterns, same as for momentum term, Therefore the finally weight update formula for BP becomes:

w jk ( k + 1) = r . k .z j + w jk ( k ) + w jk ( k ). and v ij ( k + 1) = r . j .u i + v ij ( k ) + v ij ( k ). where, the acceleration coefficient () has the same initial range for momentum parameter.[19]. The mean square error (MSE) is usually calculated to reflect the degree to which learning has taken place in the network. This measure reflects how close the network is to getting the correct answers.

Appendix B

94

Programs:

% ---------------------------------- PROGRAM NO. ONE-------------------------------------% This program used to simulation the conventional planer motion for % BTT missile:

%----------------------------------------------------------------------------------------------------clear ; Y=[]; sim=input('Enter simulation samples sim [3000]='); % ---------------------------------------------------------------------------------------------------T=.01; % sampling time.

nz=[-312.5 -2884.625 -2277238.3]; dz=[1 11.9393 1964.2416 0 0]; % z-channel transfer function. %----------------------------------------------------------------------------------------------------nx=[-.625 1228.3]; dx=[1 11.9393 1964.2416]; %angle of attack transfer function.

%----------------------------------------------------------------------------------------------------nq=[1234.06 4554.5]; dq=[1 11.9393 1964.2416]; %pitch rate transfer function.

%----------------------------------------------------------------------------------------------------% assuming a zero-order hold on the inputs and sample time T. [nzd,dzd]=c2dm(nz,dz,T,'zoh'); [nxd,dxd]=c2dm(nx,dx,T,'zoh'); [nqd,dqd]=c2dm(nq,dq,T,'zoh'); %------------------- Transfer function for classical controller -----------------------------nc=[-1.1667 -23.334 -116.67]; dc=[2.57143 171.42857 2857.1429]; % assuming a zero-order hold on the inputs and sample time T. [ncd,dcd]=c2dm(nc,dc,T,'zoh'); % ---------------------------------------------------------------------------------------------------zm=[0;0];X=[0;0];Q=[0;0];Fd1=[0;0]; for kk=1:sim; zc(kk)=10; end for kk=2:sim; % main loop.

% ----------------------------------------------------------------------------------------------------

Appendix B

95

ze(kk+1)=zc(kk)-zm(kk); % ---------------------------------------------------------------------------------------------------Dze(kk)=(ze(kk)-ze(kk-1))/.01; % ---------------------------------------------------------------------------------------------------if (kk)>0, a1=ze(kk); a3=Fd1(kk); else a1=0; a3=0; end if (kk-1)>0, a2=ze(kk-1); a4=Fd1(kk-1); else a2=0; a4=0; end % the output of conventional controller. Fd1(kk+1)=ncd(1,1)*ze(kk+1)+ncd(1,2)*a1+ncd(1,3)*a2-dcd(1,2)*a3-dcd(1,3)*a4; % --------------------------------------------------------------------------------------------------% the limiter value is :if Fd1(kk+1)>.12 Y11(kk)=.12; end if Fd1(kk+1) <-.12 Y11(kk)=-.12; else Y11(kk)=Fd1(kk+1); end if (kk)>0, bb1=Y11(kk); bb3=X(kk); else bb1=0; bb3=0; end if (kk-1)>0,

Appendix B

96

bb2=Y11(kk-1); bb4=X(kk-1); else bb2=0; bb4=0; end % the output of angle of attack:X(kk+1)=ncd(1,2)*bb1+ncd(1,3)*bb2-dcd(1,2)*bb3-dcd(1,3)*bb4; % ---------------------------------------------------------------------------------------------------if (kk)>0, d1=Y11(kk); d3=Q(kk); else d1=0; d3=0; end if (kk-1)>0, d2=Y11(kk-1); d4=Q(kk-1); else d2=0; d4=0; end % The output of pitch rate:Q(kk+1)=ncd(1,2)*d1+ncd(1,3)*d2-dcd(1,2)*d3-dcd(1,3)*d4; % ---------------------------------------------------------------------------------------------------if (kk)>0, c1=Y11(kk); c3=zm(kk); else c1=0; c3=0; end if (kk-1)>0, c2=Y11(kk-1); c4=zm(kk-1);

Appendix B

97

else c2=0; c4=0; end if (kk-2)>0, c5=Y11(kk-2); c6=zm(kk-2); else c5=0; c6=0; end if (kk-3)>0, c7=Y11(kk-3); c8=zm(kk-3); else c7=0; c8=0; end % The output of z-channel:zm(kk+1)=nzd(1,2)*c1+nzd(1,3)*c2+nzd(1,4)*c5+nzd(1,5)*c7-dzd(1,2)*c3dzd(1,3)*c4-dzd(1,4)*c6-dzd(1,5)*c8; % --------------------------------------------------------------------------------------------------end % for mean loop.

%----------------------------------------------------------------------------------------------------% --------------------------------- Program No.Two--------------------------------------------% ---------- This program used to simulation direct neural model ------------------------% -------------- reference adaptive control for BTT-CLOS in ----------------------------%---------------------------------- planer motion. ---------------------------------------------%----------------------------------------------------------------------------------------------------clear load o; Y=[];Y1=[];cc=[]; n=4; p=20; m=1; % input neurons for neural controller % No. of neurons in hidden layer % No. of output in neural network

alpha=.05; % learning rate mu=.09; % momentum term

% ---------------------------------------------------------------------------------------------------cla

Appendix B

98

sim=input('Enter simulation samples sim [3000]='); % ---------------------------- initialization for neural network-------------------------------%------------------------------------ all initial cond. = 0 ----------------------------------------for i=1:n; for j=1:p; w3(i,j)=0; dw3(i,j)=0; end end for j=1:p; b3(j)=0; db3(j)=0; end for i=1:m; for j=1:p; w4(i,j)=0; dw4(i,j)=0; end end b4=0.045; db4=0; T=.01; % sampling time.

nz=[-312.5 -2884.625 -2277238.3]; dz=[1 11.9393 1964.2416 0 0]; % T.F for z-channel.

%----------------------------------------------------------------------------------------------------nx=[-.625 1228.3]; dx=[1 11.9393 1964.2416]; %angle of attack

%----------------------------------------------------------------------------------------------------nq=[1234.06 4554.5]; dq=[1 11.9393 1964.2416]; %pitch rate

%----------------------------------------------------------------------------------------------------% assuming a zero-order hold on the inputs and sample time T. [nzd,dzd]=c2dm(nz,dz,T,'zoh'); [nxd,dxd]=c2dm(nx,dx,T,'zoh'); [nqd,dqd]=c2dm(nq,dq,T,'zoh'); %----------------------------------------------------------------------------------------------------%-------------------------- transfer function for classical controller -----------------------nc=[-1.1667 -23.334 -116.67];

Appendix B

99

dc=[2.57143 171.42857 2857.1429]; % assuming a zero-order hold on the inputs and sample time T. [ncd,dcd]=c2dm(nc,dc,T,'zoh'); % ---------------------------------- reference model --------------------------------------------nm=[50]; dm=[1 11.3137 50]; % reference model

% assuming a zero-order hold on the inputs and sample time T. [nmd,dmd]=c2dm(nm,dm,T,'zoh'); % Discrete TF G(Z) % ---------------------------------------------------------------------------------------------------for k=1:sim; opc(k)=o(k); end % The o/p for program 1 with the % same input below; % initialization for missile

zm=[0;0];X=[0;0];Q=[0;0];Fd1=[0;0];

iter=0;y(1)=0;Y1=[0;0];Y12=[0;0];Y13=[0;0]; % % The input step changes (zc):for k=1:500; zc(k)=50; end for k=500:1000; zc(k)=-20; end for k=1000:1500; zc(k)=20; end for k=1500:2000; zc(k)=-50; end for k=2000:sim; zc(k)=0; end

% ---------------------------------------------------------------------------------------------------yr(1)=0; % initial condition for model reference

%---------------------------- The output for model response:---------------------------------for k=1:sim; if (k)>0,

aa1=zc(k); aa3=yr(k);

Appendix B

100

else aa1=0; aa3=0; end if (k-1)>0, aa2=zc(k-1); aa4=yr(k-1); else aa2=0; aa4=0; end yr(k+1)=nmd(1,2)*aa1+nmd(1,3)*aa2-dmd(1,2)*aa3-dmd(1,3)*aa4; Y=[Y;yr(k+1)]; end % --------------------------- the main loop for process:- -------------------------------------for kk=2:sim; ze(kk+1)=zc(kk)-zm(kk); % Error signal

% ---------------------------------------------------------------------------------------------------Dze(kk)=(ze(kk)-ze(kk-1))/.01; % derivative for error signal

% ---------------------------------------------------------------------------------------------------x(1)=ze(kk); x(2)=Dze(kk); x(3)=X(kk); x(4)=Q(kk); % ----------------------------------------Forward propagation---------------------------------for j=1:p; zin=0.0 ; for i=1:n; zin = zin + x(i) * w3(i,j); end zin = zin + b3(j); z(j) = ( 1 - exp(-zin) )/ ( 1 + exp(-zin) ); end for i=1:m; yin=0.0 ; for j=1:p; yin = yin + z(j) * w4(i,j); end % processing (p-m) % bipolar activation function [-1,1], bounded % processing (n-p) % The input vector for neural controller % Xp=[a,q,ze,ze]T.

Appendix B

101

yin = yin + b4(i); y(i) = ( 1 - exp(-yin) ) / ( 1 + exp(-yin) ); end % The output for neural controller is :Y1=[Y1;y(i)]; if (kk)>0, a1=ze(kk); a3=Fd1(kk); else a1=0; a3=0; end if (kk-1)>0, a2=ze(kk-1); a4=Fd1(kk-1); else a2=0; a4=0; end % The output for conventional controller is :Fd1(kk+1)=ncd(1,1)*ze(kk+1)+ncd(1,2)*a1+ncd(1,3)*a2-dcd(1,2)*a3- dcd(1,3)*a4; % The summation for two controller is:Y12(kk+1)=Fd1(kk)+Y1(kk); % The output for tangetional sigmodial at output of hybrid controller is :Y13(kk+1)=( 1- exp(-Y12(kk+1) )) / ( 1 + exp(-Y12(kk+1)) ); if (kk)>0, bb1=Y13(kk); bb3=X(kk); else bb1=0; bb3=0; end if (kk-1)>0, bb2=Y13(kk-1); bb4=X(kk-1); else bb2=0; bb4=0; % buffer memory

Appendix B

102

end % The o/p for angle of attack:X(kk+1)=ncd(1,2)*bb1+ncd(1,3)*bb2-dcd(1,2)*bb3-dcd(1,3)*bb4; if (kk)>0, d1=Y13(kk); d3=Q(kk); else d1=0; d3=0; end if (kk-1)>0, d2=Y13(kk-1); d4=Q(kk-1); else d2=0; d4=0; end % The o/p for pitch rate :Q(kk+1)=ncd(1,2)*d1+ncd(1,3)*d2-dcd(1,2)*d3-dcd(1,3)*d4; if (kk)>0, c1=Y13(kk); c3=zm(kk); else c1=0; c3=0; end if (kk-1)>0, c2=Y13(kk-1); c4=zm(kk-1); else c2=0; c4=0; end if (kk-2)>0, c5=Y13(kk-2); c6=zm(kk-2); else c5=0;

Appendix B

103

c6=0; end if (kk-3)>0, c7=Y13(kk-3); c8=zm(kk-3); else c7=0; c8=0; end % The o/p for z-channel: zm(kk+1)=nzd(1,2)*c1+nzd(1,3)*c2+nzd(1,4)*c5+nzd(1,5)*c7-dzd(1,2)*c3... -dzd(1,3)*c4-dzd(1,4)*c6-dzd(1,5)*c8; %--------------------- Backward propagation process: ----------------------------------------% Error signal * derivative:errin1(i) = ( zm(kk+1) - Y(kk) )* ( 1 + y(i) ) * ( 1 - y(i) ); for j=1:p; sign=0; for i=1:m; sign = sign + errin1(i) * w4(i,j); end errin2(j) = sign * ( 1 + z(j) ) * ( 1 - z(j) ); end % ---------------------------------------------------------------------------------------------------for j=1:p; for i=1:m; dw4(i,j) = alpha * errin1(i) * z(j) + mu * dw4(i,j); end end for i=1:n; for j=1:p; dw3(i,j) = alpha * errin2(j) * x(i) + mu * dw3(i,j); end end for j=1:p; db3(j) = alpha * errin2(j); end db4 = alpha * errin1; % ------------------------------ The Updating process:- ---------------------------------------

Appendix B

104

for i=1:n; for j=1:p; w3(i,j) = w3(i,j) + dw3(i,j); end end for i=1:m; for j=1:p; w4(i,j) = w4(i,j) + dw4(i,j); end end for i=1:p; b3(i) = b3(i) + db3(i); end b4 = b4 + db4; % ---------------------------------------------------------------------------------------------------% - error processing iter=iter+1; we = abs( zm(kk) - Y(kk) ); % mean square error error(iter) = ( .5 * we * we ); error1(iter)=we; cla end % for main loop

% ---------------------------------------------------------------------------------------------------% ---------------------------------------------------------------------------------------------------% ----------------------------------------------------------------------------------------------------

Você também pode gostar