Applying Intelligent System Concepts to Automatic Beamline Alignment
R.Pugliese F.Bille A.Abrami O.Svensson(*)
Sincrotrone Trieste S.C.p.A.
Strada Statale per Basovizza 14 km 163.5, 34012 Trieste, Italy
ESRF, BP 220, F-38043 Grenoble Cedex,
France (*)
Abstract
Increasingly, automatic systems are required to havehigh dynamical performance and robust behaviour, yetthey are expected to cope with more complex processes
which are under development and highly non-linear
dynamic. A very promising approach in dealing with thisscenario is through Intelligent Systems (IS). IS incorporatethe creative, abstract and adaptive attributes of a humanwhile minimising the undesirable aspects such as
unpredictability, inconsistency, fatigue, subjectivity andtemporal instability.
Even if the Autonomous Systems area has always
provided the demonstration platform of IS, themethodologies are applicable to a wider range of complex
problems. Synchrotron Radiation facilities or Free Electron
Lasers with their complex data acquisition, data analysis,
diagnostic and control problems provide a challenging
application area for Intelligent Systems.
The paper describes a framework for the conceptual
development of IS for Experimental Physics. The proposedframework, based on emerging technologies such as Soft
Computing (i.e. Fuzzy Logic, Neural Networks, Genetic
Algorithms ), Distributed Objects, Component Software,Java and WWW, has been tested on a pilot project: theautomatic beamline alignment.
1 Introduction
Synchrotron or Free Electron Laser Facilities can beusedforchemical,physicalandbiologicalexperiments. Due to the characteristics of the experiments
the light has to be collimated, monochromatized andfocused on the sample under test; this is realized by a"beamline" made of several sets of highly sophisticatedand expensive optic parts.
The success or performance of experiments is strongly
affected by the alignment conditions i.e. all the opticalcomponents must be set to optimize some parameters suchas flux or resolving power at the experimental station.
The manual alignment procedures currently used havesome drawbacks: they are time consuming, they require
well trained staff, they are boring for the optics experts andsometimes error prone, which could result in a sub-optimaluse of the light beam and hence in a sub-optimal quality ofthe experimental data.
An automatic alignment system could contributesignificantly to the reduction of these drawbacks and leadto an effective exploitation of extraordinary features of
the new generation of light sources.
The development of such a system is really difficult. The
propagation process of the light beam through thebeamline has a complex structure, which can be different
from experiment to experiment. Even the alignment
purpose itself can differ from beamline to beamline: themain goal could be optimization of flux, resolving
power or any combination of these or other parameters.
Many beamlines have not been designed with theautomatic alignment problem in mind: we have to copewith intrinsic limitations of sensors and actuators.
Moreover, if the beamline is already operational, thetime avalible to test an automatic alignment system isgenerally very limited.
The paper describes a framework for the conceptual
development of automatic beamline alignment systems andan interrelated set of tools. The framework based on IS
concepts was tested on two meaningful alignmentproblems.
2 Intelligent systems
Increasingly, automatic systems are required to havehigh dynamical performance and robust behaviour, yetthey are expected to cope with more complex processes
which are under development and high no-linear dynamic.
A very promising approach in dealing with this scenario isthrough IS[3,5]. IS incorporate the creative, abstract andadaptive attributes of a human while minimising theundesirable aspects such as unpredictability, inconsistency,fatigue, subjectivity and temporal instability.
Research of intelligent systems assimilates andintegrates concepts and methodologies from a range of
disciplines: artificial intelligence, operational research,
dynamic control theory and computer science.
Central to an IS design is the architecture which
determines how complexity is managed, which modules
are necessary for implementing the desired behaviour, as
well as the command and control infrastructure. A very
powerful system representation scheme, called Model
Reference architecture, has been recently proposed
to provide a convenient framework for the conceptual
development of Intelligent Autonomous Systems (IAS). In
this architecture, which combines the hierarchical andsubsumption architectures, the system is decomposed
vertically into various levels of abstraction and reasoning(i.e. servo, guidance, navigation, planning, etc.), andhorizontally into sensor processing, world modelling andtask decomposition.
Even if the Autonomous Systems area is thedemonstration platform of IS, the methodologies areapplicable to a wider range of complex problems.
Synchrotron Radiation facilities or Free Electron Lasers
with their complex data acquisition, data analysis,
diagnostic and control problems provide a challenging

application area for IS. Some preliminary tests[6]carried out at Elettra, pointed out that IS and “SoftComputing” techniques can be used to implement anautomatic beamline alignment system.
The Model Reference architecture can be applied to theintelligent control of the beamline. Within this framework,at the servo abstraction level, the IS will provide
the operator with functionalities such as the direct, possibly
remote, control of the actuators and the graphicalvisualisation of the data acquired from the beamlineinstrumentation. At the guidance reasoning level thesystem will provide functionalities like obstacle avoidance,that it will avoid situations potentially dangerous for thebeamline instrumentation. The automatic beamlinealignment can be considered a navigation goal: moving thebeamline to a situation where the light of desired quality
reaches the experimental chamber. Now, as the firsttwo levels are already present in a traditional beamline
control system, the alignment system will beimplemented on top of the installed beamline control.
3 A framework to develop automatic beamlinealignment systems
We can represent a beamline as a pipeline of opticalelements each with some degree of freedom. Sensors areplaced along the beamline to measure specific beamparameters.
Goal of the alignment process is to determine theposition of the optical elements which optimize therequired beam parameters, such as flux and resolving
power, at the experimental station.
Unfortunately, the complexity of the optical path results
in a difficult determination of equations binding thequality of the synchrotron light spot on the sample to theposition of the optical elements. In other terms, thebeamline alignment is really a hard task; as a matter of fact
it is a several hours work for a couple of well trained
scientists. Considering the inherent complexity of thealignment we have adopted a “divide et conquere”
approach to design our problem solving strategy which canbe be desribed as follows:•Split the alignment problem into small sub-problems
involving, for example, only one optical element andthe associated sensor;•Implement for each sub-problem an alignment moduleusing traditional or soft computing techniques;•Combine the modules by using the stategic,
behavioural knowledge of the optics expert.
The alignment modules should be designed as reusable
components, possibly powered with learning capabilities;
in this way they could be applied to different alignment
problems. The selected strategy has importantconsequences on the framework and the interrelated tools
which will be descibed in the following sub-sections.
3.1 The beamline simulator
A beamline simulator is necessary as an off-line
development tool to reduce the amount of beam-timenecessary to implement and test the alignment. Moreover,the simulator could be used on-line to overcome thelimitations of the sensors installed on the beamline (i.e. it
can be used as a reasoning aid and it can allow an easierdecomposition of the alignment problem).
The
simulator
wearedeveloping
isbased on object oriented ray tracing and provides
an operational model of the beamline. Implemented in C++,the simulator was designed to be extensible, flexible,portable and easily integrable. New optical elements can beeasily added to the already existing objects. The tool isdynamically configurable and can be embedded as acomponent of larger systems.
3.2 Yet Another software bus (YASB)
Another conseguence of the selected strategy is theneed of a very flexible system integration tool, a
middlelware which allows a rapid solution of system
integration problems. With this in mind we havedesigned YASB[8], an underlying control model
to co-ordinate information exchanges and networking
software to implement that model. The communication
substrate transparently manages the complexities of interprogram asynchronous interactions across networks ofheterogeneous computers.
YASB has been designed to be portable across different
platforms (Unix, LynxOS, MacOS, Win32). It can beintegrated with commercial tools and in-homedeveloped ones, using different programming languages (C,C++, Tcl/Tk, Java).
YASB co-ordination model is an extension of the basic
client/server model designed to address interacting
scenarios of decentralized, peer-to-peer collaborative
computing where applications can be modelled as a set ofinteracting but independent agents. Agents are independent
software machines, that is, active objects implemented insoftware, which are components of a computer system.
Programming with agents thus involves constructing
different specialized machines and then interconnecting
them in order to achieve the required higher-level
functionality. This is analogous to the way in which
hardware designers combine standard components
to construct specialized circuit boards. One of thebenefits of the agent paradigm is that agents tend to berelatively self-contained, autonomous and hence reusable
in different context. Communication between agents isbased on a message-passing model.
4 Examples
The framework and the interrelated tools have beentested on two non trivial alignment problems which aredescibed in the next sub-sections.
4.1 The vertical focussing mirror alignment module
The ELETTRA Spectromicroscopy beamline has been
designed to perform photoemission experiments with highspatial resolution. The Vertical Focusing Mirror (VFM)alignment module determines the VFM position whichcentres the beam at the Entrance Slit (ES) balancing thephoto-induced currents on the slit blades.

The architecture of the alignment system couples anartificial intelligence and a real-time sub-system as parallel,
cooperating components. The Intelligent Alignment Agentwas developed using FuzzyCLIPS1. FuzzyCLIPS can deal
with exact, fuzzy[1], and combined reasoning, allowing
fuzzy and normal terms to be freely mixed in the rules andfacts of the knowledge based system. The expert systemshell was integrated with the beamline control system(BCS) through YASB. The knowledge based system canthus control variables of the beamline equipment;
moreover fuzzy inferences can be triggered by beamline
equipment variable changes.
The alignment was implemented using a fuzzy logic
algorithm. At each step blade currents are acquired throughthe BCS, normalized and fuzzified (i.e. transformed into alinguistic beam position).
The fuzzy inference then transforms this fuzzy input set
into the output mirror movement fuzzy set which is thendefuzzified, denormalized and transformed in the actual
correction of the mirror position. The fuzzy algorithm isquite simple and easy to understand. As a matter of fact, it
consists of the following five lignuistic rules:
IF BeamPosIS LowBig THEN MirrorMov IS NegBig;
IF BeamPos IS Low THEN MirrorMov IS Neg;IF BeamPos IS Cented THEN MirrorMov IS Zero;IF BeamPos IS High THEN MirroMov IS Pos;
IF BeamPos IS HighBig THEN MirrorMov IS PosBig.
The following graph describes the behaviour of thesystem during an alignment session.

The system presents an architecture similar to thepreceding example. The alignment was implemented using
a fuzzy logic algorithm. The Beamline Simulator has
been used for the development of the linguistic rules. The
following picture describes the results of an alignment
session.
The two images on the left show the original beam while
the two on the right show the result of the alignment
process.

Fig.2:The behaviour of the toroidal mirror alignment
5 Conclusions

Fig.1: The behaviour of the VFM alignment module.
4.2 The toroidal mirror alignment module
The ESRF beamline BM 14, has been designed forMAD(Multi-WavelengthAnomalousDispersion)
phasing of protein crystals. The toroidal mirror is a very
complex focussing element with six degrees of freedom
potentially critical to the alignment. The Thoroidal Mirroralignment module has to optimise the spot shape andintensity assuming that the position of the X-ray beam isalready optimised. The setup for automatic optimisation on
BM14 consists of a small CCD camera controlled by a PC.
The CCD is moved to view the sample during thealignment and removed during experiments.

We have designed a framework for the conceptual
development of Automatic Beamline Alignment systems
based on Intelligent System concepts. We have alreadydeveloped a set of tools which are part of the proposed
framework. The framework has been tested to develop
some simple but non trivial alignment sub-systems and theresults are encouraging.
Further development work will concentrate on four main
directions: the development of new reusable alignment
modules; the introduction of maching learning techniques
to overcome the knowledge elicitation problem andto reduce the dependency and sensibility of an alignment
module to its environment; the extension andimprovement of the suite of support tools; theimplementation of alignment systems to solve more andmore challenging alignment problems.
Acknowledgements
We would like to thank Claudio Scafuri, Daniele
Cocco, Rudi Sergo, Michele Bertolo, Bill Pulford,
Claudio Ferrero, Andy Goets, Andy Thomson,
Marco Botta, Lorenza Saitta, Attilio Giordana, Manolis
Pantos for their support and their helpful suggestions.
References[1]

1

FuzzyCLIPS was developed by the Knowledge System
Laboratory, National Research Council Canada.

[2]

L.A.Zadeh, Fuzzy Sets - Inform. Control 8, 1965,
pag. 338,353.
R.M.Alder, Distribuited coordination Models for

[3]
[4]
[5]
[6]

Client/Server
Computing,IEEE
Computer,
April 1995.
P.Harmon,C.Hall,Intelligent
Software
Systems Development, Wiley, 1993.
B.Selic, G.Gullekson, P.T.Ward, Real Time
Object-oriented Modeling, Wiley, 1994.
M.Brown, C.Harris, Neurofuzzy adaptive modelingand control, Prentice Hall, 1994.
R.Pugliese, R.Poboni, Optimization of thesynchrotron beam alignment using a linguistic

[7]
[8]

[9]control
scheme,Proceedings
oftheICALEPCS, 1995.
N.Wilt, Object oriented ray tracing in C++, John
Wiley & Son Inc, 1994.
R. Pugliese, F. Billè, YASB: a development tool
fro intelligent multiplatform distributed control
systems, NIMA 389 (1997).
E.Gamma, R.Helm, R.Johnson, J.Vlissides, Design
Patterns: Elements of Reusable Object-OrientedSoftware, Addison Wesley, April 1997.