INTRODUCTION
Regarding the recent develops of technology in using robot and also industrial demand to the high speed and quality robots, the idea of using light robots is proposed. Because, a relative deformation happens in the manipulator of high speed robots with heavy load, therefore, the elastic robot is proposed. Thus, modeling and controlling of the robots with elastic links has its own problems. In addition dynamical structure of such robots includes nonlinear and uncertainty factors in model. So, designing an adaptive controller that is able to provide the performance characteristics such as tracing the reference input, eliminating the disturbance and the conditions of response speed.
In this study, in order to provide above parameters a hybrid controller is used. The controller consists of three parts: linear feedback (PD), a nonlinear Sliding Mode Controller (SMC) and an adaptive FuzzyNeural Network (FNN) controller. The total control signal is computed as follows: where is the linear feedback control, is the sliding mode control and is the adaptive neural control.
Talebi et al. (1998) presented designed simulation
and experimental results on the performance of neural networkbased controllers
for tip position tracking of flexiblelink manipulators. The controllers are
designed by utilizing the modified output redefinition approach. The performance
of the four proposed neural network controllers is illustrated by simulation
results for a twolink planar flexible manipulator and by experimental results
for a single flexiblelink testbed. Tian and Collins (2005)
described an adaptive neurofuzzy control system for controlling a flexible
manipulator with variable payload. The controller proposed in this paper is
comprised of a Fuzzy Logic Controller (FLC) in the feedback configuration and
two dynamic recurrent neural networks in the forward path. A dynamic Recurrent
Identification Network (RIN) is used to identify the output of the manipulator
system and a dynamic Recurrent Learning Network (RLN) is employed to learn the
weighting factor of the fuzzy logic. Simulations for determining the number
of modes to describe the dynamics of the system and investigating the robustness
of the control system are carried out. Yuangang (2006)
focused on tracking control problem of flexiblelink manipulators. In order
to alleviate the effects of nonlinearities and uncertainties, a combined control
strategy based on Neural Network (NN) and the concept of Sliding Mode Control
(SMC) is proposed systematically. Chalhoub et al.
(2006) designed a robust controllers and a nonlinear observer for the control
of a singlelink flexible robotic manipulator. The controllers consist of a
Conventional Sliding Mode Controller (CSMC) and a FuzzySliding Mode Controller
(FSMC). Moreover, the robust nonlinear observer has been designed based on the
sliding mode methodology. Kim and Inman (2001) used a
CSMC to damp out the vibrations of a flexible cantilevered beam with piezoelectric
actuators/sensors. No rigidbody motion is considered in this study.
MATHEMATICAL MODEL OF THE SYSTEM
The physical system consists of a flexible link connected to a revolute joint
(Fig. 1). The beam is made of aluminum and has an annular cross section. It
is restricted in its motion to the horizontal plane. The stiffness of the beam
in the longitudinal direction is much higher than in flexure. Therefore only
the in plane transverse deflection of the beam, W(x,t) is considered in addition
to its rigidbody motion.

Fig. 1: 
Flexible link geometry and coordinates 
The payload consists of a lumped mass mounted at the freeend of the beam.
The dynamic model retains all the coupling terms between the rigid and flexible
motions of the beam. The position vector of an arbitrary point on the flexible
link is given by:
where, x is the time invariant since the longitudinal vibration is neglected
(Fig. 1). The assumed modes method is implemented to approximate W(x,t), which
is considered here to be dominated by the first two elastic modes.
It is written as a linear combination of admissible functions, Φ_{i}
(x), of spatial coordinate and timedependent generalized coordinates, q_{2i}(t).
The admissible functions are chosen to be the first two eigenfunctions of a
clampedfree beam derived based on the Euler Bernoulli beam assumption. Similarly,
the position vector of the payload is determined by substituting x by L in Eq.
1. The velocity vector of an arbitrary point of the beam is given by:
where,
is equal to
The total kinetic energy of the system is written as:
The strain energy stored in the system is expressed as:
The total virtual work, done on the system, is determined as follows:
where, τ_{1} is the nonconservative generalized control torque applied at the base joint.
The second term reflects the stiffening effect of the beam induced by the centrifugal
force which
can be expressed as:
The variation of the inertial axial force,
due to the flexible motion is neglected in this formulation.
The equations governing the rigid and flexible motions of the beam are obtained
by implementing the Lagrange principle. The resulting equations of motion are
three highly nonlinear, coupled, stiff, secondorder ordinary differential equations.
These equations are then converted to a set of six first order ordinary differential
equations that can be written as:
where, the state vector is defined to be
The state equations are solved numerically by using the Gear’s method,
which is well suited for solving stiff systems. This model is used, in this
study, as a test bed for assessing the combined performances of the controllers
and the observer in the presence of both structured and unstructured uncertainties
of the plant.
However, it should be emphasized that a simplified version of the model, obtained
by ignoring the second elastic mode of the beam, has been used herein in the
design of the controllers and the observer. Its equations can be expressed as:
Where:
are obtained from
in Eq. 7 by deleting the entries and terms associated with
q_{22}(t) and its time derivative.
The expressions for f_{r}3 and f_{r}4 are:
Both controllers (FNN and SMC) are designed based on the following θ equation.
MATERIALS AND METHODS
We have studied linear feedback, a nonlinear sliding mode controller and adaptive neural network controllers which are considered in following parts.
Stable direct adaptive control: There have been several recent direct
adaptive control techniques which have been designed to guarantee overall system
stability. The method of uses Lyapunov stability theory in the design of the
network learning rule, rather than a gradient descent algorithm like back propagation.
The controller consists of three parts: linear feedback, a nonlinear sliding
mode controller and an adaptive neural network controller (Fig. 3). The total
control signal is computed as follows: where is the linear feedback control,
is the sliding mode control and is the adaptive neural control. The function
allows a smooth transition between the sliding and adaptive controllers, based
on the location of the system state:
where, u_{pd}(t) is the linear feedback control, u_{sl}(t)
is the sliding mode control and u_{ad}(t) is the adaptive neural control.
The function m(t) allows a smooth transition between the sliding and adaptive
controllers, based on the location of the system state:

Fig. 2: 
Controller regions 
where, the regions might be defined as in Fig. 2.
The sliding mode controller is used to keep the system state in a region where the neural network can be accurately trained to achieve optimal control. The sliding mode controller is turned on (and the neural controller is turned off) whenever the system drifts outside this region. The combination of controllers produces a stable system which adapts to optimize performance.
It should be noted that this neural controller uses the radial basis neural network. The radial basis output is a linear function of the network weights, which allows faster training and simpler analysis than is possible with multilayer networks. It has the disadvantage that it may require many neurons if the number of network inputs is large. It also requires that the centers and spread of the basis functions be selected before training.
Design of controller: It is discribed earlier that, the controller has four parts and we will design each of them separately. The resulted equations in the previous part for the robot with flexible link are all nonlinear in which indefinite terms are observed as well.
The inaccuracy in the model may be due to uncertainty in basic plan or because of ignoring dynamic parameters such as friction, coriolis acceleration etc. Therefore, designing a control with some robust parts seems inevitable. A SMC controller can be a good choice to protect against the abovementioned conditions. In addition, a SMC can guarantee system stability because Lyapunov criterion. However, a linear controller (PD) is suitable for the system transient respond. Such parameters of rise time and overshoot can be improved by setting coefficients K_{P}, K_{D}. Using a fuzzyneural controller, we consider the issue of the control’s adaptation with plant. The adaptive controller FNN improves the system through minimizing the tracking error of the steady state response.
Design of nonlinear sliding mode controller: In order to design nonlinear
sliding mode control (Tao et al., 2004), we should
look at Eq. 9 and 10. In these equations,
we choose the θ link angle with the horizon as the output of the system,
whereas the applied torque to the joint τ_{l} is considered as
the input of the system, so that the outcome system is an SISO.
All controllers are designed based on the following τ equation:
where, the term is
considered to be fully known. However, is
treated as an unknown term. It has been approximated by the following nominal
function ĝ_{rl}:
Only the upper bound of the model imprecision is assumed to be known. It is
defined as:
Since the task of the controller is to force θ to track the desired angular
displacement θ_{d}, then the tracking error is defined to be:
Accordingly, the sliding surface is expressed as:
Based on the nominal function ĝ_{rl} of the system, the continuous
control law τ_{leq}, satisfying is
expressed as:
Once on the surface, the dynamic response of the system is governed by:
The tracking error will be driven to zero by selecting λ to be a strictly
positive constant. To force the system trajectory to converge to the sliding
surface in the presence of both model uncertainties and disturbances, the feedback
control torque τ_{l} is defined as:
where, k is determined by satisfying the following sliding condition:
V_{l} = 1/2S^{2} is a positive definite function. It represents
the squared distance between the sliding surface and any representative point
of the system. The selection of η to be strictly positive will ensure that
is negative definite. Therefore, V_{l} becomes a Lyapunov function that
decreases along all trajectories of the system; thus, causing the sliding surface
to become an invariant set. It can be easily proven that the above inequality
is satisfied by selecting k to be:
To alleviate the chattering problem induced by the switching term in the control
signal, the sgn(s) term in Eq. 20 is often replaced by a
saturation function as follows:
where, Φ is the thickness of the boundary layer. It is considered herein to be timevariant.
Therefore, to ensure convergence of the system trajectory to the boundary layer,
the sliding condition in Eq. 21 had to be modified to the
following form:
The above condition can be satisfied by changing the expression of τ_{l}
as follows:
where, The
differential equation governing the behavior of It
is given by:
where, k(θ_{d}) is defined in Eq. 22.
Up to this stage, the formulation has only dealt with the design of the SMC.
Design of linear controller: To produce the control signal u_{pd}
(linear control output), we consider a simple controller with the following
transformation function:
where, e is the system error which is gained via e = θθ_{d}.
is
derivative of the system error.
Different methods are suggested for PID controller designing. All these methods, notice the process of choosing the control parameters in order to provide the desired operation characteristics. The method that we have used here is ZieglerNichols approximate method. Based on characteristics of transient response of the system under control, ZieglerNichols has proposed rules for determining proportional gain K_{p} and derivation time T_{d}.
Design of fuzzy neural network controller: Here, A feed forward four
layers fuzzy neural network is constructed that is presented by Lee
and Teng (2000). To implement the fuzzy control rules stated in Eq.
28 first layer accepts input variables. It nodes represent input linguistic
variables second layer is used to calculate gaussian membership values nodes
in this layer represent the terms of the receptive linguistic variables. Nodes
at third layer represent fuzzy rules.
The links between third layer and fourth layer are connected by the weighing
values
For a multiinput single output FNN system, let x be the input linguistic variable
and α_{j} as the firing strength of rule j, which is obtained by
the product of the grades of the membership function μA_{ij}(x)
in the antecedent. If w_{j} represents the jth consequence link weight,
the inferred value y, is then obtained by taking the weighted sum of its input.

Fig. 4: 
The configuration of the proposed FNN 
The proposed FNN (Fig. 4) realized the following fuzzy control
rules:
where, for i = 1,…, n, u_{ij} = x_{i}, A_{lj}, A_{nj} are fuzzy sets, w_{j} is a fuzzy singleton and n is the number of inputs.
Finally, the output of FNN is obtained:
Where:
Layered operation of the FNN: Next we shall indicate the signal propagation
and operation functions of the nodes in each layer. In the following description
denotes the ith input of a node in the kth layer, O^{k}_{j}
denotes the ith node output in layer k.
• 
Layer 1: Input layer: The nodes in this layer only transmit input
valve to the next layer directly: 
From this equation, the link weight at first layer
is unity:
• 
Layer 2: Membership layer: In this layer, each node performs
a membership function and acts as a unit of memory. The Gaussian function
is adopted here as a membership function, thus we have: 
where, m_{ij} and σ_{ij} are the center (or mean) and
width (or standard deviationSTD) of the Gaussian membership function. The subscript
ij indicates the jth term of the ith input x_{i}
• 
Layer 3: Rules layer: The nodes in this layer one called rate nodes,
the following AND operation is applied to each rule node to integrate these
fanin values: 
Where:
D_{i} 
= 
Diag [1/σ_{li}, 1/σ_{2i},…,1/σ_{ni}] 
u_{i} 
= 
[u_{li}, u_{2i},…,u_{ni}]^{T} 
m_{i} 
= 
[m_{li}, m_{2i},…,m_{ni}]^{T} 
The output
of a rule node represents the "firing strength" of its corresponding rule.
• 
Layer 4: Output layer: Each node in this layer is called an output
linguistic node. This layer performances the defuzzification operation.
The node output is a linear combination of consequences obtained from each
rule, That is: 
Where, (the
link weight) is the output action strength of the jth output associated with
the ith rule. The are
the tuning factors of this layer.
Finally, the overall representation of input x and the mth output y is:
where, m_{ij}, σ_{ij} and w_{mj} are tuning parameters.
Learning algorithm: Consider the single Output case for simplicity.
Present goal is to minimize the following cost function:
where, y(k) is the desired output and ĝí(k) = O^{4}(k) is the current output for each discrete time k. In each training cycle starting at the input nodes in the current output ĝí(k).
By using BP learning algorithm, the weighing vector of the FNN is adjusted
such that the error defined in Eq. 35 is less than a designed
threshold value after a given number of training cycles. The wellknown algorithm
may be written briefly as:
where, in this case η and w represent the learning rate and tuning parameters
of the FNN. Let e(k) = y(k)  ĝí(k) and w = [m, σ, w]^{T}
be the training error and weighting vector of the FNN, then the gradient of
error E(.) in Eq. 35 with respect to an arbitrary weighting
vector w is:
By recursive application of the chain rule, the error term for each layer is
first calculated, the parameters in the corresponding layers are adjusted, with
the FNN Eq. 34 and cost function defined in Eq.
35, derive the update rule of w_{ij}:
Where:
Similarly, the update laws of m_{ij}, σ_{ij} are
Where:
The BP algorithm is a widely used algorithm for training multilayer network
by means of error propagation via variation calculus. But its success depends
upon the quality of the training data.
Designing the modulator: In order to design a control switch capable of designating the appropriate control for the plan according to control areas of signal, we have tried to use a smooth transition. In the simplest form of the switch, a sigmoid function was used (Fig. 5) in which the average and variance of the function are related to system error. That is, the system error determines the output coefficient by which the function is to switch the two adaptive and sliding mode controls.
RESULTS AND DISCUSSION
At this stage, the equations are simulated with numerical values of the system listed: Cross sectional area of the beam (A) is equal 7.2839x10^{4} m^{2}, Outer radius of the beam (Ro) 0.0381 m , Inner radius of the beam (Ri) 0.0349 m, Length of the beam (L) 2.3 m, Mass of the beam (MB) 4.535 kg, Payload mass (mp) 3.405 kg and Density of aluminum (ρ) 270 kg m^{3}.
The deigned controller is applied the plant and the results, are then analyzed.
In simulating, the input torque is considered as step input and calculated
the step response of system. Figure 6 shows the system output.
The system error tends toward zero and the response is with a desirable rise
time and without overshoot.

Fig. 5: 
Modulator switch 

Fig. 6: 
Step response 


Fig. 7: 
Outputs of controllers, (a) SMC output, (b) linear controller, (c) Adaptive
Controller and (d) Sum of output 
It is observed that from an iteration of about 80,
that controller has switched to adaptive, system has suitable output and the
tracking error is approximately zero. In Fig. 7ad the control signal has also been looked at.
A control signal of SMC with a range of about 20 to 130 Nm without severe
vibration has resulted. The control signal of PD controller with the range of
0 to 10 Nm at iteration 40 has become zero because the system error has also
become zero at this iteration. FNN does not have a role in producing the total
control signal applied to the plan before the iteration of 40. However, when
the parameters of FNN network are formed based on error, it produces the required
control signal and takes the control of the system.
CONCLUSION
In this study, a kind of nonlinear hybrid controller as the direct adaptive
mode for controlling a robot with a flexible link was designed and simulated.
There were indefinite and nonlinear terms in the dynamic equations of the robot.
Nevertheless, with its robustness, the controller could well face these parameters.
Through minimizing the tracking error, the control also showed an adaptive quality.
Many studies have been carried out regarding the control of elasticlink robots;
while few of them have pursued compound works. By choosing the above compound
method, we tried to resolve the inefficiencies of conventional controllers.
Comparing the results with Chalhoub’s research (2006),
one can see that the system response is more desirable. The applied range of
torque to the plan is between 14 to 5 Nm, while in this reference with the
given equations, it even reaches 305 Nm. We managed to get the steady stat error
of system close to zero. That is to say, the control has eliminated all the
vibrations of the robot’s end effecter. The control signal applied to
the plan has also the minimum vibrations; therefore, it can be easily produced
and applied to the robot in the laboratory.