II by wuyunqing


									              Mechatronics design from an object oriented point of view
                             Thierry SORIANO, Adel SGHAIER , Ngo Van HIEN
                            Centre d’Etudes Supérieures des Techniques Industrielles
                                   Maison des technologies 83000 Toulon

Abstract: Engineering activities using an object approach are often encountered in software technologies. We
have experimented that under conditions on the system developed and tools available for realization it was
possible to apply some object oriented tools for mechatronics. An application is a detector for persons carried on
an escalator.

Key-words: iterative cycle, objects, patterns, hybrid automaton, mechatronics

1 Introduction                                               2 Different efficient tools
Many industrial compact systems now integrate                Our experience on object technology applied to
mechanical, electronic and software features and when        industrial systems leads us to think that some tools
the degree of integration of the different technologies      points are very useful:
needed to realise these kinds of systems is high and lead    - use cases to capture interactions
to intelligent machines, they can be considered as           - use of sub-systems in successive cycles and patterns
mechatronics systems [1].                                    - use of hybrid automaton specialized for analysis and
There are efficient methods and CAD tools for                verification of control systems
mechanical objects and control analyse; they combine         - use of iterative approach
geometric design and dynamic behaviour computation.          We will see know how we adapted both last ones.
We have experimented that the formalism of hybrid
automaton is useful for behaviour modelling [8].             2.1 Hybrid automaton
There are also efficient methods for software features       A hybrid automaton [9] is defined by data of
especially now with UML 2.0 [2] [11] tools and models.        H (Q, X,, A,Inv,F,q0, x0) where:
An important difference which remains between                    — Q , is a set of states describing operational
methods for mechanical systems and methods of
                                                             modes of the system, called situations; q0 is the initial
software for producing a real system is the use of
iterative macro-cycle and rapid prototyping for software
                                                                 — X , presents the continuous state space of the
systems; it is naturally easier and faster to realise
                                                             automaton, X n ; x0 is the initial value of this
several versions of a software than doing the same for
material systems.                                            space;
On the other hand, a point which is becoming more and            —  , is a finite set of events;
more common in mechanical and software design is the             — A , is a set of transitions being defined by
use of patterns; it was historically a strong aspect of      (q,Guard,,Jump,q') and represented by an arc between
mechanical design and it has become the case in              situations, where:
software engineering with recent contributions [3] [ 4].                   Q 
                                                                      – q ,q' Q ,
         We have recently experimented these points, in               – Guard , is a subset of the state space in which
the framework of an industrial work. The application is      the continuous state must be, so that the transition can
a video detector for persons carried on a escalator. It      be crossed,
involves an image processing system, an axis control                  – Jump , represents the continuous state
and a software for decisions linked to security.
                                                             transformation during the change of situation; it is
In this paper we will firstly present the tools used and
                                                             generally expressed by a state value function, before
then an recent application involving them
                                                             communication, whose result is affected like initial
                                                             value of the continuous state in the new situation;
        –  , presents the event being associated to
the transition; this association does not imply to give an      It has to be noted first that this iterative cycle is
input or output direction to the event;                         described as continuous and passing from one cycle to
    — Inv , is an application, which associates a               the other is shown as a continuous process of the
subset of the state space to each situation; It is called the   software. This is naturally an essential property of
invariant of the situation, in which the continuous state       software to support it.
must remain, when the situation is q, the continuous state      In fact, there is a discontinuity because some package
must verifies xinv(q) ;                                        or sub-systems of one prototype are reused and some
    — F , is defined for each situation; the evolution          others are given up. There is a jump between cycles
of continuous state is occurred when the situation is           which can be represented as in Fig. 1; this is a first point
active; this evolution of continuous state is generally         and it will be emphasized with mechatronics systems.
expressed by a differential equation. It will be named          realization                                     test
continuous fluid F.

The automaton is very often used to model interactions
between the developed system and external actors. In
particular, in the hybrid automaton, the invariant concept
is an attribute on the continuous state, which is associated
with a discrete situation. This attribute must be satisfied                                                  analysis
so that the situation is active; thus when a situation is
active and its invariant becomes false, then a transition
must be started; moreover, a transition cannot be started                     Fig. 1: Discontinuous iterative cycle
and activate a new situation if the invariant of this
situation is not satisfied after release. The hybrid            Mechatronics systems integrate mechanics, electronics,
automaton makes it possible to make the verification            optronics and software technologies. Analysis and
because there are tools for analysis such us HYTECH             design phases are supported by different and efficient
[HEN95b]. That explains why we choose the hybrid                CAD tools.
automaton to specify in order to realize industrial control     Fundamentally, activities within these phases of
sub-system                                                      analysis and design can be compared from one
                                                                technology to another; they are engineering activities
To describe a control system with the hybrid automaton’s        and they produce design packages (mechanical,
formalism, we introduce the following constraints:              electronics ...).
                                                                The last phases of a system development, which are
    — Events  are considered in term of
                                                               realization and testing, strongly depend on technology.
inputs/outputs and internal/external;                           For software systems, there is a quite continuous
    — X contains input/output signals;                          engineering process to produce codes. However, for
    — The global continuous evolution F can come                mechanical systems, machine tools and specialized
from an functional block diagram.                               personnel are needed, material prices and manufacturing
                                                                time are important; this introduces a great distinction
We have developed in [8] a method to implement an               between design and realization, the cost of prototyping
hybrid automaton from uses cases and we have used it            is high and it takes much time. This leads usually to the
in the application                                              fact that the iterative cycle is not considered as a good
                                                                methodology when the system under development
                                                                contains mechanical technology.
2.2 Iterative cycle
Our approach is based on the iterative macro cycle
                                                                Having said this, let us consider the case of a
which contains phases such as analysis, design,
                                                                mechatronics system where design involves an
realisation and tests of a prototype. This cycle, which is
                                                                assembly of components on a small mechanical
more exactly a spiral, comes from a methodology
                                                                structure which respects geometrical constraints.
commonly used in software engineering [5] especially
                                                                Let us consider also that the structure can be produced
when an object language is used [2] [4]. Some authors
                                                                quickly by rapid prototyping with a stereo lithography
have also tested rapid prototyping in mechatronics but
they did not include mechanical features [6].
                                                                Let us consider that the components (motors, encoders)
This approach is generally recognized as good,
                                                                can be found quickly in specialized companies.
particularly for risk reducing in projects.
Then the realization phase can be conducted quickly at       verification had to be implemented. That was the first
an acceptable cost and the iterative cycle can be            set of key points.
reconsidered with its owns properties for the risk           For the second one, we had to test camera movement
reducing of the project and the quality improvement of       control (especially angular precision). The image
the product.                                                 processing package had to be reused from a previous
Once placed in the case presented above, the first           application with several video fixed cameras. Security
particular point is then to evaluate for the complete        rules from transportation systems had to be taken into
process, which are the sets of key points to be tested in    account. That was the second key points set.
each cycle and what is the best order in which apply to      For the third one, we wanted to achieve global modes
them.                                                        and security properties, to improve external features like
A second particular point of this approach is this one;      weigh and occupied space, and to finish the
when in the engineering phase, at each cycle end, it is      implementation (‖Fig 3‖).
necessary to determine what are the software packages
and sub-systems which will be re-used for the next
prototype, and naturally the same type of question exists           3 - modes and external design

for the material (optical, electronics, mechanical) sub-
systems. It is also necessary then to precise and                   2 - movement control, security, image test
complete the initial set of key points for the next cycle.
                                                                    1 - use cases, geometrical positions and deadlines,
                                                                    optics for image processing

3 An application
The industrial application was initiated by a company            Fig. 3: Cycles and sets of key points to be tested
which produces mechanical escalators for railway
stations. The company wanted to produce a system             3.1 Cycle of the first prototype
based on a moving camera connected to the control
system of the escalator motors (―Fig. 2‖). The purpose,      3.1.1 Structure
linked to ―persons‖ security,          was to verify         An overall analysis and design for material equipment
automatically if there was someone standing on an            has been undertaken. For reliability considerations of
escalator before it started moving in the morning or         the camera linked to security function, we have opted
after a failure.                                             for an architecture based on a fixed camera associated
                                                             with a mobile mirror. The first cycle had to include
                                                             preliminary material choices of components to be
                                                             integrated. The specifications of the sweeping system
                                                             led us to take a step motor for the motion and an
                                                             absolute angular encoder for the verification of the
                                                             instantaneous angular position needed for the security
                                                             function. Considering geometrical specification and
                                                             more generally functional specifications, system design
     Fig. 2: Escalator and the moving camera field           has used essentially an assembly method of components
                                                             (camera, encoder, motor, electrical transformer, control
This product is submitted to European security rules for     card, (―Fig. 4‖)).
transportation systems and there are certified state
organisms which validate that the technical solutions
chosen follow the security rules.
One of the security conditions was that the system had
to be able to ensure that, if the angular position of the
moving camera was wrong, then the escalator motor
control had to be informed to get into a failsafe manual
For the first prototype, we had to set up a general
structure with important mechanical functions linked to
the optical features of image processing. It was decided
to do it without taking into consideration the external          Fig. 4: Structure designed under Pro-engineer
geometric aspect. For the software macro cycle, uses
cases especially for simple motor control for deadline
An great part of this task was to choose the components;       3.1.3 Test of the first prototype
camera , encoder etc.. this is not developed here but can
be found in [7]                                                An important requirement for the system was that the
3.1.2 Software: Use-Cases and deadline verification            total duration for a cycle including three angular
                                                               positions to be reached must be under 500ms (constraint
A real time software, controlling modes, movements,            from image processing not developed here). This
verification operations on angular position was required.      requirement was satisfied since the cycle was done in
It has been decided [7] to develop this using the real         400ms at normal speed and only in 330ms at high
time UML approach with actors, use-case, objects and           speed.
associated state-machines [8, 9, 10].
 The Use-cases identified for the sweeping sub-system          At the end of this first cycle, it was clear that its key
to be created were ‖Secure‖, ―Sweeping‖,                       points were verified. Software sub-systems for the
―Maintenance‖ ―Configuration‖ and the actors were              motor could be re-used. Mechanical structure and
―User (passenger) ―, ― Maintenance personnel― , ―Video         patterns were also confirmed. It has been then added for
detector (image processing system) ― (―Fig. 5‖).               the next prototype, using the same structure topology,
                                                               to optimise mass and dimensions.

                                                               3.2 Cycle of the second prototype
Video detector
                                           <<extend>>          The design answer for security use case has been to
                                           >>>>>>>>            control the rotation of the camera through a step motor
                                                               within a position control opened loop and to measure
                                           Sweeping            the angular position with an optical encoder in an
    User                                                       independent verification channel. As said previously, an
                                           <<extend>>          objective of this prototype was to reduce the mass of
                                           >>>>>>>>            the mobile system. To do this, we have reviewed all the
                                                               equipments of the first prototype and smaller
                                                               components with the same functional properties have
                                                               been designed. For this prototype, the encoder was the
                                                               one revolution encoder planned. Using greater focal
      Maintenance                                              value provided two advantages. The first one was a
      personnel                              Configure         lower mirror size that enabled reduction of system size
                                                               and mass and the second advantage was the increasing
                 Fig. 5: Use-cases and actors                  of the distance camera-ground that reduced the number
                                                               of systems for the escalator test from two to only one.
The package ―step motor control‖ came from the motor           Reducing mirror size had also for consequence an
supplier and has been integrated.                              increase in angular speed. Concerning key points, we
In order to verify the ―Sweeping‖ use case deadlines, an       have added the verification channel to the initial control
algorithm for angular testing has been established and         channel. We have re-used the encoder package and we
coded in the ―mode and moving processing ― package (           have developed an angular verification package (―Fig.
―Fig. 6‖).                                                     7‖).

We have used our approach to pass from the use cases
to the hybrid automata for the ―modes and moving                       Angular
processing‖ sub-system [9]                                             position               transducer
                                                                               Fig. 7: Verification channel
        Modes and
                             Step motor                                                        *
        moving                                                 It has been noted during experimentation that the motor
                                                 motor power   did not loose a micro step during 900 cycles. The
                                                 card          adjustment corresponding to the highest speed enabled
                                                               the mirror to turn inside a 20° interval in 30ms with an
   Fig. 6: Both first sub-systems in control channel           accuracy of 1.10-6 radians per cycle.
Once the system had been tested in the laboratory with
satisfying results, it was decided to integrate it in a real                 As said previously, for the third one we wanted to
―test escalator‖. After an adaptation phase of the                           achieve global security properties, to improve external
escalator, experiments have been done in order to test                       features like weigh and occupied space, and finish the
the camera optical characteristics outside, (Fig. 8).                        implementation of modes of the system.
                                                                             One of the key points was to make the external aspect
                                                                             better for a pre-industrial version and to foresee some
                                                                             architectural consultations. So the structure was built
                                                                             almost completely in a block of resin instead of an
                                                                             assembling of plates. We have done it another time
                                                                             with stereo lithography (―Fig. ç‖).

              Fig. 8: Set up on test escalator                                                                          in resin

Tests permitted to verify that images taken with the
system fixed on the escalator had the same dimensions
as those found with CAD systems. At the end of the                                                                     motorized
second cycle, security considerations were integrated
with an appropriate package, movement control and
precision were verified. It was decided to do the image                             Fig. ç: The last prototype tested in the laboratory
processing package integration in the next prototype.

3.3 Cycle of the third prototype

                                               Escalator control

                System Available                   User detected

                            Image processing                           Modes and                               Step motor
                            Decision                                   moving                                  control
     Camera                                                                                                                          motor power

                                                                       Verification and
                                                                       internal processing
                 Control channel

                                               Failure Signal
                Verification channel
                                                                                                   Optical angular

                                       Fig. 10 The two channels security pattern adapted
Re-using the software produced in previous cycles       think that this approach enables us to handle with the
and connecting uses cases led us to a generic pattern   complexity of a mechatronics projects, to reduce
which is derived from one of those proposed in [4]      risks and to improve the final quality.
(Fig. 10). The image processing package has been
Tests have been conducted firstly with a static References
cylinder and then with different people and different
walking speeds. Different natural and artificial lights [1] N. Le Fort-Piat, A. Bourjault, Recent trends in
have been also tested.                                      Mechatronics APII         Journal européen des
Finally, it was decided that this prototype proved that     systèmes automatisés Vol 36 n°9 2002 Hermès
it was possible then to enter into the pre-                 Lavoisier France , pp. 1189-1190.
industrialization phase.                                [2] G. Booch, J. Rumbaugh, Y. Jacobson , The UML
                                                            Unified Modelling Language User Guide,
4 Conclusion                                                Addison Wesley, 1999.
                                                        [3] E. Gamma, R. Helm, R. Jonson, J. Vlissides ,
We have experimented that under conditions on the           Design      patterns    international   Thomson
system developed and tools available for realization        Publishing 1996.
(assembling, stereo lithography ) it was possible to    [4] Bruce Powell Douglas, Real time design patterns
apply an iterative cycle engineering method for             Addison Wesley 2002, pp. 432-438.
mechatronics and tools coming from object               [5] B.W. Boehm, A spiral model of software
technologies point of view like uses cases , patterns ,     development and enhancement IEEE Computer
sub-systems and packages. A specialized version of          May 1988.
hybrid automaton for control analysis can also be       [6] M. Glesner, A. Kirschbaum., F.M. Renner, B.
connected to the object model for analysis and              Voss, State of the art in rapid prototyping for
verification.                                               mechatronic systems. Mechatronics Vol 12 n°8
                                                            2002 Elsevier, pp. 987-998.
An application was a detector of persons for an         [7] Th. Soriano, J.P. Seguin Rapport final du projet
escalator.                                                  DPVB CNIM-CESTI Toulon France 2003.
For each cycle, we have synchronized two macro          [8] Ngo Van Hien, Une Méthode Industrielle de
cycles into one:                                            Conception de Commande par Automate Hybride
- The software macro-cycle                                  développée en Objets Thèse de l’université Aix-
There were important components integrated in the           Marseille III France Decembre 2001.
whole system under an overall controller developed      [9] N.V. Hien, Th. Soriano, Implementing Hybrid
with UML language and patterns for security system.         Automata      for developing industrial control
- The step motor control had its own electronic card        systems Proc. of IEEE ETFA Antibes France
and language.                                               2001, pp 129-137.
- The angular encoder had its own electronic and        [10] Th. Soriano, Integration de technologies de
software.                                                   l’information pour la conception et l’exploitation
- The image processing developed and implemented            de systèmes automatisés de production
by a specialized company was re-used from the               Habilitation à diriger des recherches Université
previous application.                                       de Toulon France Décembre 2002.
                                                         [11] UML 2.0 infrastructure and superstructure
- The mechanical macro-cycle                                specification . OMG Adopted Specification
 As it was said earlier, we have opted for an               ptc/03-09-15. 2003
assembled product and we have used a CAD system
with a stereo lithography machine that produces
mechanical parts to be assembled with integrated

At each test phase, they had to be synchronized to
produce a prototype. We verified then that the set of
key points of the cycle were obtained.

We have realized three prototypes of the system. The
system is now in the industrialization phase. We

To top