You are on page 1of 6

210

A SIMULINK ENVIRONMENT FOR SIMULATION AND CONTROL OF


FLEXIBLE MANIPULATOR SYSTEMS
M 0 Tokhi, A K M h a d , H Poerwanto, S Kourtis and M J Baxter
The University of Sheffield, UK.

Abstract This paper presents an investigation into the


development of an environment for simulation and
control of flexible manipulator systems using Simulink.
A constrained planar single-link flexible manipulator is
considered. An interactive and user friendly
environment incorporating a finite difference
simulation of the manipulator, shaped torque inputs
including bang-bang, Gaussian shaped and filtered
command is developed and implemented. simulation
results demonstrating and verifying the performance of
the environment and the control strategies are
presented and discussed.

Keywords: Dynamic simulation, flexible manipulators,


open-loop control.
1

This paper presents an investigation into the


development of an interactive and user friendly
environment for simulation and control of flexible
manipulators using Simulink. A constrained planer
single-link flexible manipulator is considered in this
work. A finite dimensional simulation of the
manipulator is developed by discretising the governing
dynamic equations of motion of the system using FD
methods. Various approaches of implementation of
the algorithm within Simulink are investigated and
assessed in terms of performance. Open-loop control
strategies using bang-bang, Gaussian shaped and
filtered command inputs are developed and
implemented within the simulation environment.
Simulated results verifying the performance of the
simulation environment and the control strategies are
presented and discussed.

INTRODUCTION

Flexible manipulator systems offer several advantages


in contrast to the traditional rigid ones. These include
faster response, lower energy consumption, requiring
relatively smaller actuators, less overall mass and, in
general, less overall cost, Book and Majette (1).
However, due to its flexible nature the control of the
system is to take account of both the rigid body as well
as flexible motions. It is important to recognise the
flexible nature of the manipulator and construct a
mathematical model for the system that accounts for
the interactions with actuators and payload, Tse et al
(2). Such a model can be constructed using partial
differential equations (PDEs). The finite element (FE)
method has been utilised to describe the flexible
behaviour of manipulators. The computational
complexity and consequent software coding involved in
the FE is a major disadvantage of this technique. An
alternative solution is to utilise a finite difference (FD)
method for simulating the system. The FD method has
previously been utilised to simulate flexible
manipulator systems using C++, Pascal and MATLAB
software environments, Azad (3). These environments
have proved to be effective in the simulation of the
system for test and verification of controller designs.
However, these do not incorporate features of
interactive and user friendly nature, desired especially
in computer aided research and learning. Such features
can be incorporated using Simulink.

SIMULATION OF FLEXIBLE
MANIPULATOR SYSTEMS

2.1 The Flexible Manipulator System

The flexible manipulator system under consideration is


modelled as a pinned-free flexible beam, with a mass at
the hub, which can bend freely in the horizontal plane
but is stiff in vertical bending and torsion. A schematic
representation of the manipulator with a moment of
inertia I , , hub inertia I,, a linear mass density p and
a length of I is shown in Figure 1. The payload mass
is M, and I , is the inertia associated with the payload.
A control torque z ( t ) is applied at the hub of the
manipulator by an actuator motor. The angular
displacement of the manipulator, in moving in the
POQ - plane, is denoted by 8 (t). The width of the link
is assumed to be much greater than its thickness, thus,
allowing the manipulator to vibrate (be flexible)
dominantly in the horizontal direction. The shear
deformation and rotary inertia effects are also ignored.
For an angular displacement 8 and an elastic
deflection U , the total (net) displacement y ( x , t ) of a
point along the manipulator at a distance x from the
hub can be described as a function of both the rigid

UKACC International Conferenceon CONTROL 96,2-5 September 1996, ConferencePublication No. 427 0IEE 1996

21 1

body motion 0(t) and elastic deflection u ( x , t )


measured from the line OX ;
y ( x , t ) = x 0 ( t ) + u(x,t)

(1)

2.2 Algorithm Development

A solution of the PDE in equation (2) can be obtained


as, Lapidus (9,Tokhi and Azad (6)

where

EIAt2
D,At
4EIAt2
a=2-- 6E1At2 , b=-, c=- pb4 , d = Pb4
Ph4
Pb2

P
Figure 1: Schematic representation of the flexible
manipulator system.

To obtain equations of motion of the manipulator, the


associated energies have to be obtained. These include
the kinetic, potential and dissipated energies. Thus,
using the Hamiltonian's extended method, the dynamic
equation of the flexible manipulator with the associated
boundary and initial conditions can be obtained as,
Tokhi et al(4)

Equation (3) gives the displacement of section i of the


manipulator at time step J + 1. It follows from this
equation that, to obtain the displacements yn.l,j+land
yn,j+l, the displacements of the fictitious points Y,,+*,~,
ymlJ and y,,+l,j.l are required. These fictitious
displacements can be obtained using the boundary
conditions related to the dynamic equation of the
flexible manipulator. The discrete form of the
corresponding boundary conditions, obtained in a
similar manner as above are

YOJ = o

(4)

a3y(z,t )
M,--a2Y(z,t ) EI-=O

ax2

ax3

where, E is the Young's modulus and I is the second


moment of inertia of the manipulator, D, is damping
constant and ~ ( x , t ) is the applied torque. For the
system under consideration, the torque T(X,C) is
applied at the hub of the manipulator, therefore, it can
be represented as .t(O,t) or simply 7 ( t ) . The PDE in
equation (2) describing the flexible manipulator system
is of a hyperbolic type and can be classified as a
boundary value problem. This can be solved using an
FD method.

Equations (3), (4), (5), (6) and (7) represent the


dynamic equation of the manipulator, for all the
defined points (stations) for the specified duration of
time (t), and characterises the behaviour of the system
in the presence of hub-inertia, damping and payload.
Manipulating equation (3) using equations (4) to (7) a
matrix form of the algorithm can be obtained, Tokhi et
al(7).

2.3 Simulink Implementation

Simulink is a program for simulating dynamic systems,


as an extension to MATLAB, The Mathworks Inc. (S),
(9). The FD algorithm is a recursive method for

212

calculating the angular displacement of a flexible


manipulator system.
Both MATLAB and Simulink can provide reduced
processing time if the algorithm can be implemented in
matrix form. Matrix form of the FD algorithm can,
therefore, be implemented in Simulink by simple blocks
provided by the library of the program (Figure 2).

in-1

&
p
Memory

Sum.

Controllers: Subgroup of various open-loop and


closed-loop strategies (open-loop control strategies
are reported in this paper):
z-domain and Various tools: Subgroups containing
frequently used existing blocks for Simulink libraries;
Data control: Subgroup used to generate displacement,
velocity, and acceleration signals for the hub and endpoint respectively. The input signal for the data
control block must be the output signal taken from the
block labelled FD arm which will give displacements
for all stations.
FD arm: FD simulation of the manipulator of a
physical dimensions 960 x 3.2 x 19 mm 3 .

buffer
zero delay

Figure 2: Simulink
representation
manipulator system.

of

flexible

The Memory and the feedback loop from out-1 in


Figure 2 provides the displacements y-, and X-2 of
the n stations. The buffer zero delay is used to break
the algebraic loop which Simulink has to solve in the
first iteration. Matrices A, B and C are calculated using
MATLAB script files. This was further developed by
replacing the blocks labelled A, B and C with a custom
Matlab function performing multiplication of two
matrices. This provides the fastest and the easiest to
modify for any foreseen alterations in the FD
algorithm. This realisation is fast since it requires less
data storage, unless the user chooses to store data
within the MATLAB workspace.

Fdarm

data
control

Figure 3: Simulink library for flexible manipulator


system.

To observe the response of the developed simulation


environment with a bang-bang torque input, for
instance, the torque is selected from the torque
generators subgroup and applied at the hub of the
system. The various outputs from the system are then
monitored which appear in forms of time-domain
representations and spectral densities. Such
representations of the input are also provided. The
resulting system diagram with this bang-bang input is
shown in Figure 4.

2.4 Simulation of the Flexible Manipulator Under


Sirnulink

For purposes of simulation of the flexible manipulator,


a Simulink library, ARM-LIB.M was built to help the
user to develop the system with various input torque
and controllers. Figure 3 shows the Simulink library for
the flexible manipulator system with various related
functions. Simulink is capable of analysing models with
variable time-steps. The FD algorithm, however, is
implemented with a constant time step specified by the
parameter c in equation (3), where the value of c must
be between 0 to 0.25 for the algorithm to be stable.
The description of the icons in Figure 3 is given below.
Torque generators: Subgroup of various torque input
signals bang-bang or Gaussian;

yo ut

Clock

Figure 4: FD model with bang-bang torque input.


To run the simulation in Figure 4, the FD algorithm
was set for the flexible manipulator with hub inertia, no
payload and no damping and a bang-bang torque input
with an amplitude of 0.3 Nm and duration of 0.6
seconds was used. Figure 5 shows the hub displacement
for this input. It is noted that the hub displacement
reaches a steady-statesituation within 0.6 seconds with
inherent vibrations throughout the movement.

213

-gauQian ilp
simulink

G
I

data

storage

To Workspace

control

Q)
gauss

Figure 6: Gaussian shaped input model.

30

25
-0

0.5

1.5

Time (sec.)

Figure 5: Hub displacement with bang-bang torque


input.

CONTROL METHODS

In this section the development of open-loop control


strategies to reduce vibrations of the flexible robot
manipulator system during its fast movement is
presented. The main source of system vibration is the
motion itself. Therefore, in this case input torque
profiles are developed that minimise input energy at
system natural frequencies. Three types of open-loop
shaped input control strategies are developed on the
basis of extracting the energies around the natural
frequencies, so that the vibration in the flexible
manipulator system is reduced during and after the
movement. These are (a) Gaussian shaped input, (b)
Lowpass filtered torque input, (c) Band-stop filtered
torque input.
3.1 Gaussian Shaped Input

A Gaussian shaped input torque profile, which is the


first derivative of the Gaussian distribution function is
examined here. The variation of frequency distribution,
duty cycle and amplitude of the Gaussian shaped input
torque with various parameters of this function as an
input profile has previously been investigated by
adopting a simple method of developing an input
torque profile for a flexible manipulator system, Azad
(3). The Gaussian shaped input torque has a smooth
start and stop behaviour. This is important for a
vibrationless movement of the system.
To study the performance with the Gaussian shaped
input torque under Simulink the system is connected as
shown in Figure 6. The block labelled gaussian i/n,
generates the input signal. Figure 7 shows the hub
displacement due to the Gaussian shaped input torque.
It is noted that the manipulator movement is much
smoother with the Gaussian shaped input as compared
to the bang-bang input.

5
Time (sec.)

Figure 7: Hub displacement with Gaussian input


torque
3.2 Low pass Filtered Torque Input

This approach is to use a bang-bang input and filter out


any spectral energy near the natural frequencies. One
method to achieve this is to pass the bang-bang input
through a lowpass filter. This will attenuate all
frequencies above the filter cut-off frequency. An
important design point i s that the input filtered signal
must have a steep roll-off at the cut-off frequency so
that energy can be passed at frequencies nearly up to
the lowest natural frequency of the flexible
manipulator. There are various type of lowpass filters,
Jackson (10). In this work digital Butterworth and
elliptic filters are utilised, Azad (3).
The sharpest transition from passband to stopband for
given cut-off frequencies and filter order can be
achieved by an elliptic filter design. Elliptic fiters
allow this objective to be achieved with a lower-order
filter for a given set of specifications, Ifeachor and
Jervis (11).
Figure 8 shows the connection diagram with elliptic
lowpass fdteitd torque input. The hub displacement is
shown in Figure 9. It is noted that the vibrations were
attenuated significantly in comparison to those with the
bang-bang torque input.

214

3.3 Band stop filtered torque input

The second approach adopted is to use band-stop filters


to minimise spectral energy fed in at the natural
frequencies of the system. This can be achieved by
using a set of bandstop filters, one for each mode, in
cascade. The design procedure for band-stop filters is
the same as for the lowpass filters; the transfer function
of the bandstop filter is calculated using an appropriate
low-pass to band-stop transformation, Banks (12).

Figure 11 shows the corresponding displacement at the


hub. It is noted that the vibration at the dominant
modes is reduced significantly in comparison to the
case of bang-bang input.

25-

20-

i15-

FD arm

w pass

data
controll

1 ylowe Istorage

out
To Workspace

:lo-

@
~

5-

lowe

Figure 8: Simulink model with lowpass filtered torque


input.

0.5

1.5

Time (sec.)

Figure 11: Hub displacement with band-stop filtered


input torque.
25-

20-

g15-

E
e
8

t
510-

5-

0.5

The development of an interactive and user friendly


Simulink environment for simulation and control of
flexible manipulator systems has been presented. An
FD simulation of a single-link flexible manipulator has
been developed and realised within Simulink. The
performance of the algorithm has been verified through
simulated exercises.

1.5

1
Time (sec.)

Figure 9: Hub displacement with low-pass filtered


input torque.
The filters were designed under MATLAB Signal
Processing Toolbox using IIR filter realisation
structure, The Mathworks Inc. (13). The response is
maximally flat in both the passband and stop-band.
Figure 10 shows the manipulator system with filtered
torque using three band-stop filters in cascade.

1toque
'p

bang bang

out
Band s d p
butterworth

amodes

y+JE+@
J
FD arm
lybandbd storage

CONCLUSION

data

To Workspace

6,

bs3b

Figure 10: Simulink model using band stop filtered


torque input.

Open-loop control strategies for flexible manipulator


systems have been developed and realised within
Simulink. Open-loop control methods involve the
development of the control input by considering the
vibrational properties of the flexible manipulator
system. The control input is to minimise the energy
input at system resonance modes so that system
vibrations are reduced. The first method applied and
investigated was the Gaussian shaped input. The result
obtained have shown remarkable reduction in the
system vibrations. The second method utilised has been
to pre-process a square pulse with various filter
arrangements.
The results obtained with filtered input torque profiles
have shown that lowpass filtered input torque will be
favoured specially when the natural frequency of the
system is relatively high, allowing a wide bandwidth
for the filtered input. On the other hand, if the
bandwidth is not sufficiently wide this will lead to an
inUeaSe in the reSponSe time. The reSPOnSe time for a
given displacement can be significantly reduced if some
excitation energy is permitted in the input function
above the lowest system natural frequency. This can be

215

achieved by introducing excitation energy above the


lowest natural frequency by reducing only the
frequencies in the square wave frequency spectrum that
correspond to system natural frequencies. This idea has
been investigated by introducing bandstop filters for
each system natural frequency up to the third mode.
The results have shown that, without affecting greatly
the total response time, it is possible to reduce system
vibration significantly. If further reduction of the
residual motion is needed, further higher modes must
be considered. This certainly increases the complexity
and the controller becomes less cost effective as
compared with the lowpass filter strategy.
The existing Simulink blocks can be utilised to
investigate various other aspects of active vibration
control in flexible manipulator systems. In this manner,
the incorporation of closed-loop control methods of
fixed and adaptive nature are currently being
investigated.

REFERENCES

1. Book W. J. and Majette M., 1983, Controller


design for flexible distributed parameter mechanical
arms via combined state-space and frequency domain
techniques, Transaction of ASME Journal of Dvnamic
Systems, Measurement and Control, 105,245-254

2. Tse F. S., Morse I. E. and Hinkle T. R., 1980,


Mechanical Vibrations Theory and Applications, Allyn
and Bacon Inc., Boston.
3. Azad A. K. M., 1994, Analysis and design of
control mechanisms for flexible manipulator systems,
PhD thesis, The University of Sheffield, UK
4. Tokhi M. O., Poerwanto H. and Azad A. K. M.,
1995, Dynamic simulation of flexible manipulator
systems incorporating hub inertia, payload and
structural damping, Machine Vibration, 4, 106-124

5. Lapidus L., 1982, Numerical solution of ~artial


differential eauation in science and engineering, John
Wiley and Sons, New York
6. Tokhi M. 0. and Azad A. K. M., 1995, Real-time
finite difference simulation of a single-link flexible
manipulator system incorporating hub inertia and
payload, Proceedings of IMechE-I: Journal of Svstems
and Control Engineering, m , 2 1 - 3 3

7. Tokhi M. O., Kourtis S., Poerwanto H. and Azad


A. K. M., 1995, Control of flexible manipulator
systems using filtered command inputs, Machine
Vibration, 4, 168-189

8. The Mathworks Inc., 1991, MATLAB for Sun


workstations, Users Guide, The Mathworks Inc.
Natwiok
9. The Mathworks Inc., 1992, SIMULINK. Users
Guide (for x window system1 The Mathworks Inc.
Natwick
10. Jackson L. B., 1989, Digital filters and signal
processing, Kluwer Academic Publishers, London
11. Ifeachor E. C. and Jervis B. W., 1993, Digital
Signal Processing: A Practical Approach, AddisonWesley Publishing Company, England

12. Banks S. P., 1990, Signal processing , Image


processing and pattern recognition, Prentice Hall,
Cambridge
13. The Mathworks Inc., 1988, MATLAB Signal
processing toolbox, The Mathworks Inc. Natwick

You might also like