Development of a force feedback and measurement system for the analysis …fszufnar/... ·...

100
Development of a force feedback and measurement system for the analysis of the biomechanics of insect attachment organs Diploma Thesis in Applied Computer Science Faculty of Technology University of Bielefeld by Filip Szufnarowski Supervisors: Axel Schneider Faculty of Technology University of Bielefeld Walter Federle Department of Zoology University of Cambridge January, 2008

Transcript of Development of a force feedback and measurement system for the analysis …fszufnar/... ·...

Page 1: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

Development of a force feedback and measurementsystem for the analysis of the biomechanics

of insect attachment organs

Diploma Thesisin Applied Computer Science

Faculty of TechnologyUniversity of Bielefeld

by

Filip Szufnarowski

Supervisors:

Axel Schneider

Faculty of TechnologyUniversity of Bielefeld

Walter Federle

Department of ZoologyUniversity of Cambridge

January, 2008

Page 2: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose
Page 3: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

A C K N O W L E D G E M E N T S

I want to thank my supervisors Dr. Walter Federle for giving me theopportunity to work in his research group, precious insights into thefascinating world of insects and a very interesting topic for my thesis.I also want to thank Dr. Axel Schneider for his unceasing supportduring all stages of my work.

My words of gratitude also go to Thomas Endlein who allowed me touse many beautiful photographs in my thesis, to Nanna Evers for herdesign of the logo of the IPAMACS program, to Hendrik Buschmeierfor his typographical advice and to Christian Wurm from Physik In-strumente who gave me many insights into motor control practise.

Last but not least, I thank all the people who I have not mentionedhere explicitly but who have supported me during writing of this the-sis either by providing precious hints, critical feedback or just a wordof motivation.

Bielefeld, January 2008

Page 4: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose
Page 5: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

C O N T E N T S

1 Introduction 11.1 Biological motivation 1

1.1.1 Biomechanics 21.1.2 Adhesion in nature 21.1.3 Attachment organs 4

1.2 Experimental architecture 9

2 Hardware architecture 112.1 Micropositioning 11

2.1.1 Translatory stages 112.1.2 Physical model 14

2.2 Motion controller 152.2.1 Trajectory Generator 162.2.2 PID servo filter 17

2.3 Force measurement 182.3.1 Cantilever theory 192.3.2 Custom sensor 202.3.3 Calibration procedure 22

3 Development of the control software 273.1 Computer model of the architecture 27

3.1.1 Motion controller 293.1.2 Leadscrew drive 313.1.3 Force feedback mechanism 33

3.2 Control Software: IPAMACS 363.2.1 Program structure 373.2.2 Operation modes for movement patterns 383.2.3 Positioning operation modes 393.2.4 Force filtering and feedback 403.2.5 Velocity correction 42

4 Achieved functionality and tests 474.1 Micropositioning 47

4.1.1 Comparison of motor interfaces 484.1.2 Effect of velocity correction 50

4.2 Force measurement 524.2.1 Noise and drift in measurements 524.2.2 Example calibration of the force transducer 55

4.3 Force feedback performance 584.4 Camera synchronization 624.5 A biological experiment 64

I

Page 6: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

Contents

5 Discussion 695.1 Other experimental architectures 70

5.1.1 Microtester setup 705.1.2 Mechanical testing apparatus 72

5.2 Improvement proposals 745.2.1 Force measurement with a new sensor 745.2.2 Nanopositioning for force feedback 765.2.3 Timing issues 77

a IPAMACS 79a.1 Graphical user interface 79a.2 Input and output formats 82a.3 Movement patterns for calibration 86

Bibliography 89

Assertion 93

II

Page 7: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

1I N T R O D U C T I O N

The Insect Biomechanics Workgroup headed by Dr. Walter Federle inthe Department of Zoology at the University of Cambridge studiesthe functional morphology of insect attachment organs. For this pur-pose an experimental architecture consisting of a three-dimensionalmicropositioning system with a two-dimensional force sensor and avideo camera is employed.In this thesis a control software and a computer model of this archi-tecture have been developed. The architecture is analysed from thetheoretical point of view for the purpose of modelling and develop-ment of appropriate control algorithms.The experimental architecture is presented in chapter 2. Chapter 3presents the control software which makes use of the technical func-tionality by synchronizing the hardware components and by loggingthe experimental data for further analysis. The control software en-hances the capabilities of the experimental architecture with the pos-sibility to generate and to track linear and nonlinear movement trajec-tories as well as to improve the quality of noisy force measurements.The software also provides the experimenter with a convenient userinterface. The computer model of the experimental architecture hasbeen used together with the control software to implement a reliableforce feedback control mechanism.The achieved functionality is tested and evaluated in chapter 4 andchapter 5 summarizes this work by comparing the experimental ar-chitecture with similar setups, highlighting the problems which wereidentified during the software development and providing further en-hancement proposals.This chapter leads the reader from the open questions behind thebiological mechanisms of attachment to a list of requirements for atheoretical architecture which would be suitable for the analysis ofthe biomechanics of insect attachment organs.

1.1 biological motivation

This section provides the reader with the definition of biomechan-ics. It motivates the scientific interest in biological mechanisms ofattachment and describes the functional morphology of the attach-ment organs of insects while trying to highlight some of the manyopen questions regarding these mechanisms.

1

Page 8: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

introduction

1.1.1 Biomechanics

We try to understand the world and to make use of its natural phe-nomena for our own advantage. In this process nature has alwaysbeen a source of inspiration for new technological developments. Inthis context, one focus lies on biological systems. They have beenoptimized by natural selection for millions of years to act in differentenvironments and conditions in a successful and (energetically) effi-cient way. However, they often present capabilities which have notbeen understood yet but sometimes can be mimicked by means ofcurrent technology. Ramachandran describes them as “bag of tricks”(Ramachandran, 1990). Still, “the biological world is part of the phys-ical world and, therefore, the rules of mechanics also apply to livingsystems” (Fung, 1993).The mechanics of living systems is the subject of an integrative disci-pline called biomechanics. Biomechanics is the study of the mechan-ics and other physical aspects of living organisms and their parts.Biomechanics studies e. g. the forces that act on limbs, the aerody-namics of bird and insect flight, the hydrodynamics of swimming infish and locomotion in general across all forms of life, from individ-ual cells to whole organisms. Vogel (2003) gives an overview of thebroad field of this integrative discipline.

1.1.2 Adhesion in nature

Biological mechanisms of attachment are one particular field of inter-est in biomechanics. In this field nature’s solutions still greatly out-perform the state of art solutions in current technology. Strong anddurable adhesives like superglue have been developed which firmlyconnect two surfaces. However, these can not be disconnected eas-ily afterwards. At the other extreme, there are weak adhesives likethose used in sticky notes which do not provide any firm connectionbut which are easily releasable and can be used repeatedly. The tech-nological gap between these two extremes remains mostly unfilled.Moreover, technical adhesives are susceptible to contamination whichmakes them useless for many kinds of applications.In contrast, many biological systems are able to control the level ofstickiness in a highly dynamic manner. Some insects are able to holda weight which is more than 100 times bigger than their own bodyweight sticking upside down to a smooth surface and still walk (seeFigure 1.1). This requires relatively high adhesive forces which canbe established and released quickly as and when required. In thecourse of evolution, adhesive pads of insects have been optimised tosolve the conflict between attachment and locomotion (Gorb and Beu-tel, 2001). Leafcutter ants have to carry freshly-cut plant material totheir nest (Figure 1.2 A). The plant material is about 30 times heavier

2

Page 9: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

1.1 biological motivation

Figure 1.1.: A weaver ant (Oecophylla smaragdina) holding a weightwhich is more than 100 times bigger than its own bodyweight hanging upside down on a smooth surface. Photoby courtesy of T. Endlein.

than the ant itself. Still the ant is able to carry it and maintain firmattachment to a variety of surfaces with its smooth attachment organswhile being exposed to gusts of wind or attacks of parasitic flies.Another example of a skilful climber is the gecko (Figure 1.2 E). Theadhesive pads at the tip of a gecko’s foot are covered with micro-scopic hairs. A single hair, called seta, is split into hundreds of tipsabout 200 nanometers in diameter which interact with the surface ofcontact. Together, they create strong adhesive forces which allow thegecko to support its entire body weight with just a single toe. If everyof these hairs made contact with a surface, they would collectivelydevelop a force which would enable a mature, 70 g heavy, gecko tohold a weight of 133 kg aloft.Some animals use sticky devices in order to catch and hold their pray.The sticky tongue of a chameleon serves to catch prey items whichthe chameleon would otherwise never be able to reach because of itslack of locomotive speed (Figure 1.2 B). The tongue has a sticky endand hits the prey in about 30 thousandths of a second. Octopusesand squids use suction cups on their tentacles in order to grasp andcling to their pray.Mussels live attached to rocks and other hard surfaces (Figure 1.2 F).This protects them from predators and underwater currents. In orderto achieve a strong and durable attachment they produce a glue-likesubstance which works under water and would be effective even onnon-stick, e. g. teflon covered, surfaces.Another type of adhesion-related systems are those minimizing ad-hesion due to particular structure of their surface. These systemsare e. g. responsible for keeping the surface clean from dust parti-cles or parasites (Gorb and Scherge, 2001). The so called lotus ef-fect has inspired the scientists to create water repellent paints. Lotus

3

Page 10: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

introduction

plants grow in muddy rivers and lakes but their leaves and flowersalways remain clean because of the self-cleaning properties of theseplants (Figure 1.2 C). Stems of many Macaranga plants are covered bya bluish waxy layer. These surfaces consist of a carpet of microscopicwax crystals. As the crystals come off easily, the waxy stems are ex-tremely slippery for insects.Still some organisms have developed structures to overcome the lim-itations posed by anti-adhesive mechanisms. An example for thisare ant-plant interactions in the genera Macaranga and Nepenthes (Fig-ure 1.2 D). Macaranga ant-plants provide food and special living quar-ters inside their hollow stems for specific Crematogaster or Camponotusants. In return, the ants work as an army of bodyguards against leaf-feeding insects and stem-borers (Federle, 1997). Stems of Macarangaant-plants are extremely slippery for most insects but not for theirant partners. Thus, the plant creates an enemy-free space for the ants.Figure 1.2 illustrates some of the above mentioned examples.

There is still much to learn about the mechanisms behind biologicalattachment. The derivation of biomechanical rules governing thesephenomena would lead to many new biomimetic applications likemarine bioadhesives, self-cleaning tapes, surgical tools or climbingrobots. A particularly promising feature for science is the insects’ ca-pacity to precisely control attachment forces, because attachment or-gans clearly outperform currently existing technical adhesives. Theseare usually not or only slowly detachable, not controllable and sus-ceptible to contamination (de Crevoisier, 1999, Khongtong and Fergu-son, 2002).

1.1.3 Attachment organs

The question of how animals, and in particular insects, cling to sur-faces is a matter of debate. What are the detailed mechanisms givingrise to adhesive and frictional forces in insects? How do insects con-trol adhesion and friction during locomotion and how are they ableto reconcile the attachment to a contact surface while running? Someof the proposed mechanisms which try to explain attachment phe-nomena are electrostatic forces, suction, wet adhesion (by surface ten-sion and viscosity) or dry adhesion by intermolecular van der Waalsforces. Moreover, in some cases not a single mechanism but a com-bination of them is responsible for the overall adhesion effect. Adetailed explanation of these mechanisms can be found in Kinloch(1987) and Comyn (1997). However, the proposed mechanisms areonly valid for artificial or reduced systems and it is still not known towhat extend they can actually be used as an explanation for biologi-cal mechanisms of attachment. In order to test their validity variousexperiments, in which surface attachment and frictional forces are

4

Page 11: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

1.1 biological motivation

A B

C

D

E

F

Figure 1.2.: Examples for the role of adhesion in nature: (A) Leaf-cutter ants carrying leaves to their nest. (B) Chameleonextending its tongue to catch a prey. (C) A droplet of wa-ter on the surface of a lotus leaf. (D) A ’wax-runner’ onthe surface of a Macaranga plant. (E) Gecko clinging to aglass surface. (F) Mussels sticking to a rock during lowtide. (A: courtesy of T. Endlein; B: http://news.bbc.co.uk;C, E: http://www.flickr.com; D: courtesy of W. Federle; F:http://scriptkiller.de).

5

Page 12: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

introduction

measured, have been suggested. Many of them have been performedon whole-insects either connected to a force transducer or placed in acentrifuge. Federle (2000) used a centrifuge technique which allowsexperiments with no prior treatment of the insects and which is ap-plicable even to very small animals. This method has proved usefulfor measuring whole-body attachment forces on various substrates.However, whole-body measurements can only give limited insightsinto the detailed mechanisms of insect adhesion. Insects can controladhesive forces at different hierarchical levels like body kinematics,leg movement, tarsal movement and adhesive system (Federle andEndlein, 2004) and thus it is difficult to quantify the particular con-tributions to the overall adhesion effect in a single experiment. Thisleads to the idea of performing direct experiments on individual at-tachment organs in which the insect is fixed and only its attachmentorgan is exposed to experimental methods. Besides eliminating un-known contributions from other body parts this kind of experimenthas a further advantage over whole-body measurements. It allowsthe control of many experimental conditions (see sect. 1.2) more eas-ily.Attachment devices can be found in great variety among animalsand plants and include various sorts of barbs, hooks, suction cupsand sticky pads (Nachtigall, 1974). Figure 1.3 illustrates a selectionof such devices. A detailed overview is given in Gorb and Scherge(2001). Specialised attachment organs can be found in many insectspecies. Figure 1.4 shows a schematic of an insect leg and the magni-fication of an attachment organ in the ant species Oecophylla smarag-dina. Attachment organs can be roughly categorized as being either“hairy” or “smooth” (Gorb and Beutel, 2001). Both designs are flexi-ble cuticle structures which are able to maximize their effective areaof contact on different substrates (Gorb et al., 2000). However, thedetailed function of the pad cuticle is still unknown. In particular,the question how adhesive forces scale with pad size (contact area)remains open.Hairy attachment structures are common in many insect orders suchas flies (Walker et al., 1985), beetles (Ishii, 1987) and bugs (Edwardsand Tarkanian, 1970). These structures are composed of cuticle pro-tuberances of flexible adhesive hairs or setae (Gorb, 2001). Smoothadhesive pads are common in ants, bees, cockroaches, grasshoppersand stick insects (Gorb, 2001). Here, the structures located at the dis-tal end of the pre-tarsus are referred to as arolia. The arolium itself isa flexible, fluid filled, soft cuticle with a sac-like structure. The func-tional morphology of arolia differs between insect groups. Whereasants and bees are able to actively as well as passively extend and re-tract their arolium (Snodgrass, 1956, Federle et al., 2000), most otherinsects arolia only passively adopt to the surface roughness and act-ing load. The surface of an arolium is smooth and its cuticle consistsof rod-like chitin fibres oriented perpendicularly or at some angle to

6

Page 13: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

1.1 biological motivation

A B C

D E F

Figure 1.3.: Attachment organs are widespread in animal kingdom.The above figure shows a selection of various species withtheir attachment structures magnified in the correspond-ing inserts. Hairy structures can be found in (A) arach-nids and (C) many insects. Also (B) the gecko has micro-scopic hairs on its pads. Smooth structures can be foundin (E) insects and (F) amphibians. (D) shows a suctioncup of an octopus. (Insert A: T. Seidl; image and insertB: K. Autumn; image and insert C: T. Endlein; insert D:http://pharyngula.org; image E: T. Endlein; insert E: S. Gorb;image F: T. Endlein; insert F: W. Federle).

7

Page 14: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

introduction

Coxa

Femur

TibiaTrochanter

Tarsus

Pre-tarsus

A

B C

Cl

ClAr

Ar

Figure 1.4.: (A) Schematic of an insect leg and its morphological seg-ments. (B) Magnification of the pre-tarsus and (C) ex-tended attachment pad (arolium) with claws on bothsides in the ant species O. smaragdina. Ar: Arolium, Cl:Claw, [Scale bar in (C) = 100 µm]. Photos by T. Endlein.

the surface. Smooth surface geometries differ between insect groupson the micrometer level (Gorb, 2001). In all insects reported so farthe adhesion between the tarsal pads and the surface of contact ismediated by small volumes of fluid secreted into the contact zone(Walker et al., 1985, Edwards and Tarkanian, 1970, Ishii, 1987). Al-though the origin of the secretion and its method of transportation tothe space between the pad and the substratum have been identifiedin some insects (Gorb, 1998, Gorb and Beutel, 2001), these details areunknown for many other insect species. Also the detailed function ofthe secreted fluid is an open question. In particular, it is still unclearif insect attachment forces can be fully explained by “wet adhesion”models and how adhesion and friction forces depend on substrateproperties.

Attachment organs of insects are sophisticated and complex devicesin which many components play important but still not fully quanti-fied roles. In order to gain insight into the biomechanical principlesunderlying the way of functioning of insect attachment organs manyexperiments still have to be carried out. For this purpose a specialexperimental architecture is required.

8

Page 15: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

1.2 experimental architecture

1.2 experimental architecture

In the previous sections the scientific interest in biological mecha-nisms of attachment has been motivated and the experiments on in-sect attachment organs have been put into focus. This section for-mulates the requirements on a theoretical architecture for the analy-sis of the biomechanics of insect attachment organs which would besuitable for such experiments. Many of these requirements can bederived directly from the open biological questions which were pre-sented in the previous section.The theoretical architecture has to give the experimenter the possi-bility of single-pad measurement of frictional and attachment forcesas well as the contact area between the pad and a substratum whilecontrolling specific experimental conditions.The magnitude of the measured forces lies in the upper µN up to thelower mN range. The contact area has to be measured together withforce measurements with a variable frequency up to 1 kHz. The sub-strates have to be easily exchangeable in order to vary surface proper-ties (surface topography, chemistry etc.) before an experiment on anattachment organ but also in order to investigate surfaces after per-forming force measurements to study the secreted fluid or depositedparticles.During a typical experiment an insect pad is brought into contactwith a surface and sliding movements are (repeatedly) carried outwith a micropositioning system until the contact is released (pull-off).In order to examine the question of the effect of contact time on ad-hesion/friction this contact time has to be controlled precisely. More-over, the measured forces may depend on pull-off and sliding veloci-ties (Federle et al., 2004) as well as the pull-off angles at which the con-tact with the surface is broken. Therefore, the movements have to beperformed simultaneously in more than one direction under precisecontrol of the movement velocity. The velocity should span the rangebetween 1 µm and 10 mm/s. Figure 1.5 shows a schematic drawingillustrating a micropositioning system with a two-dimensional forcesensor and a video camera which could be used for the experimentalpurposes. Because of the small magnitude of the measured forcesthe whole system should be isolated from environmental vibrations.For this purpose a special vibration free table can be used. Anotherimportant requirement on the theoretical architecture is the abilityto precisely track movement trajectories. This would give the experi-menter the possibility to analyse the effect of accumulation or deple-tion of secretion on adhesion/friction. The experimental architecturehas to allow the definition of linear as well as nonlinear movementtrajectories with maximal displacements of at least 15 mm in one di-rection.The experimenter should also be able to control e. g. the level of nor-mal force acting on the attachment organ because adhesive and fric-

9

Page 16: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

introduction

video camera

motorised XYZmicropositioner

2D forcesensor

contact surface

force - contact arearelationship

F

A

attachment organ

vibration free table

Figure 1.5.: Theoretical experimental architecture for the analysis ofthe biomechanics of insect attachment organs consist-ing of a micropositioning system, two-dimensional forcetransducer and a video camera.

tional forces between insect pads and contact surfaces change in de-pendance of applied load. In order to control the level of appliednormal force the experimental architecture requires a reliable forcefeedback mechanism in the mN range.

A three dimensional micropositioning system with a two dimensionalforce transducer (see Figure 1.5) fulfils the above mentioned require-ments. With an appropriate control software such system could con-trol force levels with a force feedback mechanism and synchronize allpositioning and measurement tasks with contact area image record-ing by an external video camera. The development of control soft-ware for such experimental architecture on the basis of available hard-ware components is the topic of this thesis.

10

Page 17: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

2H A R D WA R E A R C H I T E C T U R E

This chapter acquaints the reader with the hardware architecturewhich is used for the micropositioning and force measurement tasks.In the micropositioning section (sect. 2.1) the choice of leadscrew-driven translation stages is motivated and their combination into athree dimensional micropositioning system is presented. This sectionalso provides a physical model of a leadscrew drive which will laterbe used in a computer simulation (sect. 3.1).Section 2.2 describes the structure of the motion controller softwarewhich runs on the motor controller card and which is responsible formovement generation and control in the translation stages.The force measurement section (sect. 2.3) introduces the concept offorce measurement by means of a cantilever equipped with straingauges. It also presents the custom designed two-dimensional forcetransducer used for force measurements in the experimental setup.

2.1 micropositioning

The experimental architecture has to support precise microposition-ing in all three translational dimensions. Such a setup enables theexperimenter to perform a controlled movement in two dimensionalplane while e. g. simultaneously controlling the force acting on a spec-imen in the third dimension. The movement range should be largeenough to cover continuous sliding movements of at least 15 mmwhile at the same time maintaining movement accuracy in the µmrange. The movements have to be performed with a well definedvelocity which could change in a nonlinear way allowing for acceler-ative movement patterns like e. g. a sinusoidal trajectory. The veloc-ities specified by the experimenter lie in the range between 1 µm/sand 5 mm/s.

2.1.1 Translatory stages

With regard to the above mentioned goals two different drive sys-tems were taken into consideration to combine range and precision.Firstly, piezoelectric actuators and secondly DC-motor-driven stages.The former are nanopositioning systems which offer a solution topositioning tasks which require high accuracy and speed. Based onfrictionless drive and guiding systems they achieve guiding accura-cies down to the sub-nanometre level. At the same time, classicalpiezoelectric drives are only capable of small movements in the range

11

Page 18: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

hardware architecture

of about 100− 400 µm due to mechanical deformation of their crystalstructure. Such movement range is approximately 100 times smallerthan required (see sect. 2.1). The latter are DC-motor-driven stageswith a gear mechanism (e. g. constructions using leadscrews) that donot achieve the level of accuracy of piezoelectric drives. The guidingin such stages generates frictional forces and the gear mechanism ex-hibits backlash. This causes their resolution and repeatability to belimited to the µm range. However, these systems have large travelranges of up to a few hundred millimetres.As a compromise between range and precision the translation stageM-126.PD1 with crossed roller bearings from Physik Instrumente (Phy-sik Instrumente (PI) GmbH & Co, Karlsruhe, Germany) was chosen(see Figure 2.1).

DL

A

A

B

B

leadscrew

DC-motorFaulhaber 3557 024 CS

carriage

guiding rail

Figure 2.1.: Top (upper) and side (bottom image) view of the M-126.PD1 translation stage. The leadscrew transforms therotatory movement of the DC-motor into a translationalmovement of the carriage. One full motor rotation resultsin the displacement of 0.5 mm of the carriage. The maxi-mal travel range of the carriage ∆L is 25 mm.

The M-126.PD1 is a leadscrew-driven translation stage with a travelrange of 25 mm and maximum velocity of 15 mm/s. The stage is ca-pable of carrying loads up to 20 kg and consists of a Faulhaber 3557024 CS DC-motor (Dr. Fritz Faulhaber GmbH & Co, Schonaich, Ger-many) whose shaft is directly coupled to a high precision steel lead-screw on which an aluminium carriage is mounted. The screw trans-forms the rotatory movement of the motor shaft into the translationalmovement of the carriage and has a pitch p of 2 revolutions/mm.The sliding movement of the carriage on a guiding rail is mediatedby precision crossed roller bearings. This provides straightness andflatness of travel of about 2 µm. The position of the carriage can be

12

Page 19: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

2.1 micropositioning

estimated with the maximal accuracy of 0.125 µm due to the 4000counts/revolutions resolution of the motor encoder which is placedon the motor shaft. However, sliding movement can only be repeatedwith maximal accuracy of 1 µm because of inherent backlash.In the experimental setup three M-126.PD1 stages are cross-stackedand combined with the M-125.90 Z-axis mounting bracket (PI) to pro-vide multi-axis motion as shown in Figure 2.2. The carriage of the X-stage is fixed to a metal platform. Its sliding movement results in theX-axis directed movement of the other stages which are placed aboveit. Similar holds for the Y-stage. The whole system can be seen as aleft-handed Cartesian configuration allowing for a three dimensionalmotion of any object fixed to the carriage of the Z-stage. The systemis interfaced from a computer via a C-843 motor controller card fromPI with integrated MC2100 motion controller from Performance Mo-tion Devices (Performance Motion Devices (PMD) Inc., Lincoln, MA).

X

X

ZZ

Y

Y

Angle BracketM-125.90

Platform

Figure 2.2.: Schematic of three M-126.PD1 translation stages arrangedinto a left-handed Cartesian configuration. The arrows il-lustrate the direction in which an object fixed to the car-riage of the Z-stage would move if a positive movementcommand was issued to the controller of the correspond-ing stage.

13

Page 20: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

hardware architecture

2.1.2 Physical model

The M-126.PD1 stage can be modelled as a leadscrew drive (see Fig-ure 2.3). The model consists of an armature controlled DC-motor, aleadscrew and a carriage on which a load is placed. The carriage to-gether with the load have a weight of W. The leadscrew (weightingWls) is directly coupled to the motor shaft and has a pitch of p. Therotatory movement of the motor shaft is translated via the rotationof the screw into translational movement of the carriage. One fullrotation of the shaft corresponds to the displacement of 1/p of thecarriage.

W

U

MLMM MFMA

i

R L

p

DC-Motor load

carriage

leadscrew ( )

w

v

g

Wls

Figure 2.3.: Schematic of a leadscrew drive showing a circuit diagramfor armature controlled DC-motor. The motor is directlycoupled to a leadscrew with a pitch of p.

The system can be described by a standard set of differential equa-tions for a DC-motor drive with some necessary adjustments for thecomputation of torques (Spong and Vidyasagar, 1989):

Li′ = U − Keω− RiMA = MM − MF − ML

(2.1)

The first equation in (2.1) results from Kirchhoff’s voltage law appliedto the motor circuit with i, i′, L and R being motor’s current and itstime derivative, motor inductance and resistance, respectively. U isthe applied voltage and Ke is the back emf constant – the voltage thatpushes against the current which induces it. The rotational velocityof the motor shaft is ω.The second equation in (2.1) describes the torque equilibrium. MM,MA, MF and ML are motor, acceleration, friction and load torques,respectively.In a DC-motor the motor torque is directly proportional to the motorcurrent with the motor torque constant, Km, being the proportionalityfactor:

MM = Kmi (2.2)

Frictional torque is proportional to the motor’s angular velocity witha proportionality factor µ:

MF = µω (2.3)

14

Page 21: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

2.2 motion controller

The load on the leadscrew has to be reflected back to motor resultingin the following expression for the load torque:

ML =W

2πp(2.4)

In order to compute acceleration torque MA the total inertia It, as“seen” by the motor, has to be estimated. It consists of motor inertiaIm, leadscrew inertia Ils and load inertia Il . Leadscrew inertia can beapproximated with a solid cylinder if the radius Rls and weight Wlsor the radius, length Lls and density ρls of the screw are known:

Ils ≈ WlsRls2

2g≈ πLlsρR4

ls2g

(2.5)

Load inertia has to be reflected back to the motor. It is described bythe following equation:

Il =Wg

1(2πp)2 (2.6)

with g being the gravitational constant.With the above considerations equation (2.1) can be rewritten as:

Li′ = U − Keω− Ri

(Im + Ils + Il)ω′ = Kmi− µω− W2πp

(2.7)

In this simplified linear model of the leadscrew drive some factorshave been neglected. Frictional forces between the leadscrew and thecarriage and leadscrew efficiency are not considered. Moreover, inprecise positioning application the leadscrew is often preloaded toreduce backlash. Such preload torque can be significant. Importantsystem nonlinearities like motor backlash or a deadzone are also notconsidered in this model. However, the latter factors play an impor-tant role in micropositioning applications (Kara and Eker, 2004) andwill have to be incorporated into the computer model of the systemin section 3.1.2. A much more detailed example of leadscrew drivemodelling can be found e. g. in Varanasi (2002).

2.2 motion controller

The motor stages at the micropositioning system as described in thelast section are controlled by a computer program via the C-843 motorcontroller card. The card has an integrated motion controller whichcan control up to 4 connected stages (also called axes). There are twoprincipal operation modes of the controller. The first is the open loopand the second is the closed loop mode (see Figure 2.4). In the open loopmode numeric values from the host control program are directly writ-ten into the motor command register at a specified axis. Their sign ismapped to the polarity and their absolute value to the duty cycle of

15

Page 22: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

hardware architecture

Motor commandregister

PID servofilter

Encoder

commanded

commandedvelocity

commandedacceleration

motor command

actual position

direct numericvalue

Trajectorygeneratorvelocity

acceleration

deceleration

position

position

open loop

closed loop

Figure 2.4.: Block diagram showing two possible mutually exclusiveoperation modes of the motion controller.

the subsequently generated PWM signal which is fed into the inputof the motor amplifier of the corresponding stage. In the closed loopmode 4 parameters can be varied by the host program. These param-eters are position, velocity, acceleration and deceleration. The firsttwo are the desired position and velocity of the stage. The last twodetermine the rate at which velocities are allowed to change1. Thesecommands are interpreted by the Trajectory Generator (TG) which isa subprogram of the motion controller. However, their interpretationdepends on one of 4 different modes in which the trajectory generatorcan work (two of them are described in section 2.2.1). The outputs ofthe TG are the commanded position, commanded velocity and commandedacceleration and are forwarded as reference inputs to another subpro-gram; the PID servo filter. This filter also obtains the informationon the motor’s actual position from the motor encoder and employsa variant of the PID algorithm to generate an output signal whichis subsequently written into the motor control register of the corre-sponding stage. The registers are updated every 0.00041 ms which isthe cycle period of the motion controller.

2.2.1 Trajectory Generator

The Trajectory Generator (TG) works in four different motion profilemodes which can be set independently for each axis. In this thesistwo of them are further considered. The first is the trapezoidal point-to-point profile, the second is the velocity contouring profile. In bothcases the TG performs calculations in order to determine the com-manded values (position, velocity and acceleration used by the PIDservo filter). However, the details of these calculations are not pub-lished by PMD and can only be characterised by the resulting move-

1 There are also some additional parameters which will not be further considered inthis thesis.

16

Page 23: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

2.2 motion controller

ment curves. An approximation of one of the movement profiles wasobtained for the purpose of creating a computer model of the experi-mental architecture and is described in section 3.1.1.

Trapezoidal point-to-point profile

Velocity

Timea

a

d

v1

v2

-v2

a

dv1 v2,

acceleration

deceleration

velocities

velocity changetarget position

change

Figure 2.5.: Example of a velocity curve in the trapezoidal point-to-point motion profile of the Trajectory Generator.

In the trapezoidal point-to-point profile, a host process specifies an ac-celeration, deceleration, velocity and target position. The stage accel-erates linearly at the programmed acceleration value until it reachesthe programmed velocity. This velocity is maintained until the stagereaches the target position after a linear deceleration phase. Figure 2.5shows a possible example of a velocity curve in this motion profile.

Velocity contouring profileIn the velocity contouring profile target position values are ignoredby the trajectory generator. After reaching the programmed velocitythe stage continues to move at the velocity until a different velocityor stop command is issued. Figure 2.6 shows an example for the ve-locity contouring profile.In any motion profile the output of the TG is forwarded to the PIDservo filter.

2.2.2 PID servo filter

The function of the PID servo filter is to minimize the deviation ofthe commanded position (output of the trajectory generator) from theactual motor position from motor encoder. To accomplish this, the ac-tual motor position is subtracted from the commanded position outputof the profile generator resulting in a position error which is passedthrough a variant of digital PID controller. The exact algorithm em-ployed by this controller is given by the following equation:

Mn =[KpEn + Kd(En − En−1) +

Ki

256

n

∑i=0

Ei +Kv f f

4V +

Ka f f

8A

]

17

Page 24: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

hardware architecture

Velocity

Time

d

d

v1 v1

-v1

a1

a1

v2

a2

dv1 v2,

a1 a2, accelerations

deceleration

velocities

velocityincrease

velocitydecrease

accelerationchange

Figure 2.6.: Example of a velocity curve in the velocity contouringmotion profile of the Trajectory Generator.

Mn := Mn × Kout

65536+ Bias (2.8)

where En position error at time n,Kp proportional gain,Ki integral gain,Kd derivative gain,Kv f f velocity feed-forward scale factor,Ka f f acceleration feed-forward scale factor,Kout scale factor for the output command,Bias motor offset.

The scaling factors in equation 2.8 are predefined and motion con-troller dependent. Besides the standard proportional, integral andderivative terms, equation 2.8 includes the additional factors Kv f f andKa f f for scaling the commanded velocity and commanded acceleration out-puts of the trajectory generator. However, they have not been used inthe control software developed for the experimental architecture. Kout

is a scaling factor and the motor bias can be used to compensate for anet external force in one direction e. g. if the axis is pulled downwardby gravity. The actual PID algorithm also employs two limiting val-ues. The first is an integration limit which provides an upper boundfor the accumulated error and the second is an output limit whichlimits the entire motor command output of the PID servo filter.

2.3 force measurement

During the experiments on adhesive organs of insects frictional andadhesive forces in the µN to mN range have to be measured. When aforce acts on an object it causes its position and structure to change.If the relationship between the force and the change is known, theinformation on the force magnitude can be obtained by measuringthe structural or positional change in an object. A common force

18

Page 25: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

2.3 force measurement

sensor which makes use of this principle is a cantilever equippedwith strain gauges.

2.3.1 Cantilever theory

A cantilever is a beam supported on only one end (see Figure 2.7).In many cases, it has the form of a rectangular parallelepiped with

F

L

y

x

Y

X

W

H

cross section

support

A

B

Figure 2.7.: Schematic of a cantilever bending beam with length Land an uniform rectangular cross section of height H andwidth W. A force F acts upon the tip of the cantilever andcauses a deflection of x along the X-axis.

length L, height H and width W. When a bending force F is appliedto the cantilever at point y along its longitudinal axis Y, it causes adeflection x(y) in the direction of bending. The Euler-Bernoulli beamequation describes the deflection characteristics of the beam:

EId2xdy2 = −F(L− y) (2.9)

In the above equation E is the Young’s modulus, a property of thematerial the beam is made of which is a measure for its stiffness.I is the area moment of inertia, a property of the shape of the beamwhich is used to predict its resistance to bending and deflection abouta specified axis. For a cantilever with a rectangular cross section thearea moment of inertia about the Y-axis is given by:

I =WH3

12(2.10)

At the fixed end of the beam (y = 0) the following conditions hold:

dx = 0 (2.11)

and

dxdy

= 0 (2.12)

In the load case a vertical downward force F is applied at the tip ofthe beam. Given that the beam is not moving (static state), it can be

19

Page 26: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

hardware architecture

assumed that the equilibrium of forces and torques holds. Therefore,there is a resisting moment −FL and a vertical upward force −F atthe support of the cantilever beam. At any point y along the beamthere is a moment F(y− L). Integrating equation (2.9) with respectto y delivers:

EIdxdy

= −F(Ly− y2

2) + C1 (2.13)

with C1 = 0 because of condition (2.12) at y = 0. Integration ofequation (2.13) results in:

EIx = −F(Ly2

2− y3

6) + C2 (2.14)

with C2 = 0 due to condition (2.11). At the tip of the cantilever (y = L)equation (2.14) is simplified to:

x = −FL3

3EI(2.15)

Substituting equation (2.10) for I into (2.15) results in:

ktip =Fx

= −EWH3

4L3 ∼ −L−3 (2.16)

Equation (2.16) defines the spring constant ktip of the cantilever at itstip and thus establishes a linear relationship between the bendingforce acting on the cantilever at its end and the deflection which iscaused. This deflection can be measured e. g. by an optical systemlike in atomic force microscopy or by capacitive sensors. Anothermeasurement method involves the application of strain gauges. Aload applied to the cantilever results in a bending moment in thegauge area. This moment causes local deformations of the cantileverstructures (elongation or contraction) and thus a change in the electri-cal resistance of the strain gauges placed in this area. The relationshipbetween the deflection and the resistance change is approximatelylinear and has to be derived through a calibration procedure as de-scribed in section 2.3.3.

2.3.2 Custom sensor

The measurement of frictional and adhesive forces between an insectpad and the contact surface requires a two dimensional force sensor(force transducer). In a typical experiment an insect pad is broughtinto contact with a transparent surface which exhibits specific mate-rial properties. A video camera is placed above the contact surface.The camera is focused on the insect pad and records the contact areawhile sliding and pull-off movements are performed. In this configu-ration, the insect and the camera are fixed with respect to each otherand only the surface of contact together with the force transducer

20

Page 27: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

2.3 force measurement

is moved. Thus, a typical experiment poses two additional require-ments on the construction of the force sensor. Firstly, it has to bemoveable so that there is no necessity of tracking the pad with thecamera and secondly it has to allow for easily exchangeable surfaces.No commercial solutions with exactly these properties are available.In order to fulfil the above mentioned requirements a two dimen-sional force transducer was constructed. Figure 2.8 shows a schematicof the mechanical setup. The transducer consists of a bending beam

Figure 2.8.: Schematic of the two-dimensional force transducer (A)with a perspective, side and top view. The strain gaugesmeasure the amount of deformation of the bending beamdue to external forces and are numbered in red (for lat-eral) and blue (normal forces). (B) shows the transduceras it is attached to the micropositioning system via an in-termediate travel stage.

made of a sheet metal plate. The plate has a specific shape that al-lows bending in two orthogonal directions and thus can be thoughtof as consisting of two cantilevers – one measuring deflection in thelateral (X) and one in the normal (Z) direction. On each flat side ofthe plate two strain gauges 1-LY13-3 with gauge factor of 2.04 ± 1%and resistance of 350 Ω ± 0.35% manufactured by Hottinger BaldwinMesstechnik (Hottinger Baldwin Messtechnik GmbH (HBM), Darm-stadt, Germany) are placed and connected via a half-bridge circuitto an amplifier. The strain gauges measure the strain of the beamthrough a proportional change in their electrical resistance. The ana-log output of the amplifier (GSV1T8 manufactured by ME-Systeme,ME-Systeme GmbH, Germany) is connected via a BNC-2120 connec-tor from National Instruments (National Instruments Corporation

21

Page 28: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

hardware architecture

Ltd. (NI), Newbury, UK) to a 6035E I/O card (NI) where the sig-nal is digitalized.The bending beam is fixed to a brass bar at one end and a transparentsurface is glued to it at the other end. The whole construction is con-nected to the carriage of the Z-stage of the micropositioning systemvia an intermediate fastener and an LT1 travel stage from ThorLabs(ThorLabs Ltd., Ely, UK) to allow for manual position adjustments ofthe force transducer.

The custom made force transducer presented in this section is anapproximation of an ideal cantilever beam. The attached glass plateas well as the glued strain gauges make it different from the theoret-ical model from section 2.3.1. The theoretical model does not takeinto account heterogenous construction materials or the effect of glueviscosity on the elasticity of the beam. Furthermore, in the customdesigned force transducer the bending elements are not cast into asolid support. This is especially a problem for the front part (nor-mal force measurement, Z-axis) of the force transducer because themechanical influence of the rear elements responsible for the verticalforce measurement (X-axis) is not considered in the model at all. Inorder to circumvent the problems and estimate the spring constant ofthe custom force sensor a calibration procedure has to be carried out(see next section).

2.3.3 Calibration procedure

The calibration procedure as used in this work has two main pur-poses. Firstly, the relationship between the measured voltages andthe actual forces acting upon the bending beam has to be established.Secondly, a feasible approximation of the spring constant of the bend-ing beam for different leverarm lengths has to be found. The calibra-tion has to be done for both (lateral and normal) force measurementdirections. This section presents the theory underlaying the calibra-tion procedure. A practical example is given in section 4.2.2 .

The relationship between the deflection of a cantilever and the forceF acting on it at a given point of contact y is supposed to be linearwithin some physical limits as described in section 2.3.1. The sameassumption is made for the relationship between the deflection of acantilever and the voltage U generated by the measurement bridge.With these both assumptions the purpose of the calibration is to finda linear relationship of the form U

F = aL + b between voltages andforces.In the first part of the calibration procedure m voltages have to bemeasured for forces F1, . . . , Fm acting on the glass plate of the forcetransducer at n different points of contact (leverarm lengths) L1, . . . , Ln.Figure 2.9 illustrates this for four different leverarm lengths and two

22

Page 29: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

2.3 force measurement

U [V]

y [mm]

F1

F1 F1 F1 F1

L 1

L 1

F2

L 2

L 2

L 3

L 3

A

B

LoffsetxLoffsetz

LoffsetzL 4

L 4

Figure 2.9.: Schematic of the calibration procedure for the estimationof voltage/force-leverarm relationship in the normal forcedirection. (A) side view of the force transducer with aforce F1 acting upon the glass plate at four different lever-arm lengths: L1, L2, L3 and L4; (B) diagram illustratingregression lines for voltage measurements with two differ-ent forces F1 (crosses) and F2 (circles). Lo f f setx and Lo f f setz

are the y coordinates of solid support for the theoreticallateral and normal force cantilevers, respectively.

forces acting in the normal direction. The calibration for lateral forcesis similar. With a set of voltage measurements U11, U12, . . . , Unm−1, Unm

a linear model can be formed:

U11F1

U21F1...

Un1F1...

U1mFm...

UnmFm

=

L1 1L2 1...

...Ln 1...

...L1 1...

...Ln 1

(ab

)+

ε11

ε21...

εn1...

ε1m...

εnm

(2.17)

or in a compact notation:

−→U = X−→β +−→ε (2.18)

23

Page 30: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

hardware architecture

with −→U mn x 1 vector of observations,X mn x 2 matrix of regressors,−→β 2 x 1 vector of parameters,−→ε mn x 1 vector of random disturbances.

The linear model is solved by means of multiple linear regression.Random disturbances are measurement errors and are assumed tobe independent and normally distributed with mean zero and someconstant variance. The least squares estimated solution for the vectorβ of the parameters a and b is then given by:

β =(

ab

)= (XTX)−1XT−→U (2.19)

With the solution of equation (2.19) the length of a theoretical can-tilever beam Lo f f set from its support to the glass plate (L1 in Figure 2.9)can be computed. At its support the theoretical beam can not be de-flected (conditions 2.11 and 2.12) and thus no voltage change can bemeasured by the strain gauges:

UF

= aLo f f set + b = 0

Lo f f set = − ba

(2.20)

The second part of the calibration procedure deals with the estimationof the spring constant of the force transducer. Equation (2.14) definedthe non-linear force-deflection relationship for an ideal cantilever atan arbitrary point of contact along its longitudinal axis. In case of thecustom designed force transducer forces act on the glass plate whichis attached to the tip of a theoretical cantilever beam. This does notcorrespond to the geometry of the theoretical model from section 2.3.However, a polynomial approximation of its spring constant can stillbe found through calibration. Figure 2.10 illustrates an example forcalibration in the lateral direction. In general, the force transducer hasto be deflected by a fixed set of deflection values d0, d1, . . . , dm−1 (withd0 corresponding to no deflection) at n different leverarm lengths (ycoordinate) L1, L2, . . . , Ln. For each deflection voltages are measuredresulting in a set of nm measurements: U10, . . . , Unm−1. During cal-ibration the actual forces acting on the force transducer are not yetknown but only the measured voltages. Nevertheless, with the fol-lowing definition of leverarm-dependent spring constant k(y) poly-nomial coefficients a0, a1, . . . , as can be found for voltages and scaledfor forces afterwards via the linear force/voltage-leverarm relation-ship found during the first part of the calibration:

k(y) =∆U∆d

= asys + as−1ys−1 + . . . + a1y + a0. (2.21)

24

Page 31: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

2.3 force measurement

B

d [mm]

U [V] U [V] U [V] U [V]

L 1 L 2 L 3 L 4

1d 2d 3d0 1d 2d 3d0 1d 2d 3d0 1d 2d 3d0

A

L 1 L 2 L 3

LoffsetxLoffsetz

L 4

1d 2d 3d

Figure 2.10.: Schematic of the calibration procedure for the estimationof the spring constant in the lateral force direction. (A)top view of the force transducer with an exaggerated de-flection d1 at leverarm length L3; (B) diagram of voltagemeasurements (crosses) for four different deflection (in-cluding no deflection) at four different leverarm lengths.Lo f f setx and Lo f f setz are the y coordinates of solid supportfor the theoretical lateral and normal force cantilevers,respectively.

For a given leverarm length Li an average spring constant ki can becomputed as:

ki =1

m− 1

m−1

∑j=1

(Uij −Uij−1

dj − dj−1). (2.22)

This results in a set of n values (Li, ki)nj=1 for which the least squares

polynomial approximate of order s has to be found. In matrix nota-tion, the equation for a polynomial fit is given by:

1 L1 L21 . . . Ls

11 L2 L2

2 . . . Ls2

......

.... . .

...1 Ln L2

n . . . Lsn

a0

a1...

as

=

k1

k2...

kn

(2.23)

or in a compact form:

L−→a =−→k . (2.24)

25

Page 32: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

hardware architecture

The solution of equation (2.24) is, similarly to the first part of thecalibration, given by:

−→a = (LTL)−1LT−→k (2.25)

and can be obtained with numerical methods. The order s of the poly-nomial approximation to the spring constant (equation (2.21)) shouldbe small in order to avoid oscillations about the measured values of kitypical for high order polynomials. The control software introducedin the next chapter uses a second order approximation. This choice isfurther motivated in section 4.2.2.

The micropositioning setup together with the force transducer and anexternal video camera are the basic hardware components of the ex-perimental architecture for the analysis of the biomechanics of insectattachment pads. However, in order to obtain a usable experimentalarchitecture all hardware components have to be synchronously con-trolled by a host process. For this purpose a control software had tobe developed.

26

Page 33: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

3D E V E L O P M E N T O F T H E C O N T R O L S O F T WA R E

After the basic hardware components have been introduced in chap-ter 2, the goal of this chapter is to describe the software componentsof the experimental architecture. The software has to give the ex-perimenter the possibility to define movement trajectories, to acquireand store all essential experimental data for further analysis and tocontrol the forces acting on the insect tarsus with a force feedbackmechanism. Furthermore, to record the images of contact area be-tween an insect pad and a contact surface an external camera has tobe triggered with a variable frequency of up to 1 kHz. All these taskshave to be synchronized in time.Section 3.1 presents the development of a simplified model of theexperimental architecture which was used in order to analyse the sta-bility of the force feedback mechanism. The set of force controllerparameters obtained from the model via an optimization procedurewas used afterwards in the actual control software – the IPAMACSprogram. Section 3.2 describes the structure and main functionalityof the IPAMACS program.

3.1 computer model of the architecture

A computer model is a computer program that attempts to simulatean abstract model of a particular system. Chapter 2 introduced thetheoretical models of a leadscrew drive (sect. 2.1.2) and a cantilever(sect. 2.3.1) together with the polynomial approximation of the lat-ter’s spring constant (sect. 2.3.3). It also described the functionalityof the motion controller program (sect. 2.2). In this section a simpli-fied computer model of the experimental architecture based on thetheoretical models from chapter 2 is presented. The model was de-veloped in order to analyze the stability of the force feedback controlmechanism of the experimental architecture. It was used to find a setof parameters for the force controller via an optimization procedure– a task which would be much more difficult and time-consuming incase of the real system (Dorf and Bishop, 2004).

In order to describe the relationship between measured input andoutput signals models of different complexity can be used. A generalmodel structure as introduced by Soderstrom and Stoica (2001) canbe seen in Figure 3.1. The model consists of a transfer function Gwhich describes a relationship between some input signal u(t) andoutput signal y(t) at time t. The signals are sampled at discrete time

27

Page 34: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

development of the control software

e(t)

u(t) y(t)SG( )q -1

H( )q -1

Figure 3.1.: Block diagram of the model structure. u(t), e(t) andy(t) are the input, disturbance and output signals, respec-tively. G and H are transfer functions and q−1 is the delayoperator.

intervals of T. Random disturbances in the output are modelled viaanother transfer function H whose input is a sequence of indepen-dent and identically distributed random variables e with mean zero.The functions G and H can be described as rational functions of thedelay operator (backward shift operator) q−1 by specifying their nu-merator and denominator coefficients. The delay operator is definedas:

q−nx(t) = x(t− n). (3.1)

A commonly used model of this kind is the ARX model (Soderstromand Stoica, 2001):

G(q−1) = q−nk B(q)A(q)

(3.2)

H(q−1) =1

A(q)(3.3)

A(q) = 1 + a1q−1 + . . . + anaq−na (3.4)

B(q) = b1 + b2q−1 + . . . + bnbq−nb+1 (3.5)

with nk corresponding to the number of delays from input to output.The order of the A(q) polynomial corresponds to the number of pastoutputs and B(q) of past inputs which are taken into account in thecomputation of the actual model output. An ARX model can be usedto model any linear system or even compensate for some nonlinear-ities in nonlinear systems if the order of the polynomials is chosento be high enough (Soderstrom and Stoica, 2001). With given poly-nomial orders and a set of input and corresponding output signalssampled at a sample rate T the coefficients of A(q) and B(q) can beestimated via a least squares estimation method.In the following, computer models for the motion controller and lead-screw drive are presented. Section 3.1.3 shows how they are coupled

28

Page 35: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

3.1 computer model of the architecture

together into a working system model. All input-output data usedfor model estimation and validation was acquired by custom writtensoftware either using the logging capabilities of the MC2100 motioncontroller directly or via the logging functionality of the control soft-ware presented in section 3.2.

3.1.1 Motion controller

The motion controller was already introduced in section 2.2. It con-sists of two subprograms, the Trajectory Generator (TG) and the PIDfilter. The details of the implementation of the TG are not known,whereas the algorithm underlying the function of the PID filter isgiven by equation (2.8). Therefore, two different methods were usedin order to obtain a model of the motion controller. For the TG anARX model was estimated using the Matlab System IdentificationToolbox (Matlab, The MathWorks Inc., Natick, MA). For the PID servofilter a Simulink (Simulink, The MathWorks Inc., Natick, MA) modelwas created.The force feedback mechanisms works in closed loop mode in velocitycontouring motion profile of the TG. With acceleration and decelerationinputs set to their maximal valid values and the commanded velocityand commanded acceleration outputs ignored by the PID filter, the TGcan be modelled as a single-input-single-output (SISO) transfer func-tion whose input is velocity and output is commanded position. In orderto estimate an ARX model of such system a set of sinusoidal velocitysignals with increasing frequency was fed into the input of the TGand the corresponding commanded position outputs were logged. TheTG was assumed to approximate an integration procedure and there-fore a low order ARX model was assumed. Figure 3.2 shows evalu-ation results for the following ARX model estimated with the leastsquares method:

A(q) = 1− q−1

B(q) = 0.0006602q−1 (3.6)

As model quality criterion the coefficient of determination R2 (Frohn,2001) was used:

R2 = 1−1n~e

T~e1n~y

T~y− y2(3.7)

~e = ~y− y

with ~y nx1 vector of system output values,y nx1 vector of model output values,y average system output.

The linear model explains most of the variability in the system out-put for input frequencies up to 2 Hz. For higher frequencies the realsystem shows a significant drift in the output signal which the linear

29

Page 36: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

development of the control software

0.9

0.3

0.8

0.7

0.6

0.5

0.4

f [Hz]

R2

0.1 0.2 0.5 1 2 5

1.0

0.2

B

Com

manded V

elo

city

time [s]

A

Co

mm

an

de

d V

elo

city

time [s]

Com

manded V

elo

city

time [s]

C

Figure 3.2.: Diagram comparing the TG with its computer model. Si-nus signals with increasing frequency f were used as sys-tem inputs and measured system outputs were comparedwith corresponding model outputs by means of the coeffi-cient of determination R2. Inserted plots illustrate system(cyan continuous curve) and model (black dotted curve)outputs for input signals with frequency of (A) 0.1, (B) 1and (C) 5Hz.

model does not explain. However, the real force controller works withmaximal frequency of 50 Hz which should be at least 10 times higherthan the force process to be controlled (Dorf and Bishop, 2004). Thisallows for force input signals with frequency components only up to5 Hz. With this assumption model (3.6) is good enough to simulatethe TG in the force controller simulation (see sect. 3.1.3).

In order to simulate the PID servo filter a Simulink model was de-veloped. The model is a direct implementation of equation 2.8. Theinput to the PID filter is the position error which is defined as the dif-ference between commanded position set by the TG and actual positiondelivered by the motor encoder – position error. There is no possibilityof setting this input directly. In order to evaluate the Simulink modela set of sinusoidal signals with frequencies ranging from 0.1 to 20 Hzwas fed into the TG while logging the corresponding values of com-manded position, actual position and motor command (the output of thePID filter). The difference of the first two was used as input signal forthe model. Comparison between system and model output showedR2 values always higher than 0.97 . Figure 3.3 shows an example for a5 Hz sinusoidal input signal. The model output overlaps system out-put almost completely and the residuals (model output errors) showno trends having a white noise-like structure.

30

Page 37: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

3.1 computer model of the architecture

0

200

-200

positio

n e

rror

[counts

]

time [s]

0

15

-15

moto

r com

mand [%

]

time [s]

time [s]

resid

ual [%

]

0

0.02

-0.02

residual [%]0.02-0.02

0

5

10

15

20

25

no. of valu

es

A B

C D

R = 0.9822

Figure 3.3.: (A) position error input signal resulting from 5 Hz sinu-soidal signal given onto the TG; (B) motor command PIDfilter system (cyan) and model (black) outputs – the out-puts overlap; (C) residuals plotted over time; (D) approx-imately normal distribution of the residuals.

3.1.2 Leadscrew drive

A theoretical model of leadscrew drive was already introduced in sec-tion 2.1.2. This section presents a Simulink model (see Figure 3.4) ofa DC-motor based on equation 2.1. The model can be used in a lead-screw drive simulation if its angular velocity output is transformedinto translational velocity of the leadscrew carriage. The transfor-mation occurs via multiplication with 2π

p , where p is the leadscrewpitch. Additionally, the torques have to be computed according toleadscrew theory. The model in Figure 3.4 differs from equation (2.1)insofar as it contains additional nonlinear elements: a dead zone, avelocity dependent friction and a backlash nonlinearity. The deadzone nonlinearity occurs when the armature voltage of the DC-motoris around zero and the system stays motionless. This is a result ofthe fact that the mechanical system cannot respond immediately toinput signal commands when it is at rest. The system can only startto move when the driving torque is large enough to overcome the

31

Page 38: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

development of the control software

S

S

+

+

--

-

-

R

1/LKe

Km

ML

1/Jt

U

dead zone

backlash

friction

win

wout

i

Figure 3.4.: Nonlinear Simulink model of a leadscrew drive. Jt is thetotal system inertia. The DC-motor parts correspond tothe ODE-system as shown in equation (2.1).

static friction torque for driving voltages U above or below some pre-determined limiting values U+ and U−, respectively:

deadzone(U) =

(U −U+) , U ≥ U+(U −U−) , U ≤ U−

0 , otherwise(3.8)

Friction can be modelled in different ways (Ogata, 1990). In the lead-screw model a simple Coulomb and viscous friction of the followingform has been assumed:

f riction(ω) = µ ·ω (3.9)

with the friction coefficient µ being some proportionality factor.The backlash block element implements a system in which a changein input causes an equal change in output. However, when the inputchanges direction, an initial change in input has no effect on the out-put. The amount of side-to-side play in the system is referred to asthe deadband D. The following equation is used as a backlash model:

backlash(ωin) =∫

ω′out dt (3.10)

ω′out =

ω′in , |ωout −ωin| = D

and ω′in(ωin −ωout) > 0

0 , otherwise

with ωin and ωout being the motor angular velocity input and outputof the backlash block element, respectively.The choice of nonlinear elements is motivated in Kara and Eker (2004).A linear DC-motor model could for example not explain flat spotsaround the change in direction of motor rotation as they can be seenin Figure 3.5.

32

Page 39: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

3.1 computer model of the architecture

40

30

20

10

0

-10

-20

-30

-40

-500 1 2 3 4 5 6 7 8 9 10

angula

r ve

locity

time [s]

w [r

ad

/s]

R = 0.9472

Figure 3.5.: Diagram showing motor angular velocity output (cyancontinuous curve) and model output (black dotted curve)in response to a sinusoidal voltage input signal with fre-quency of 1 Hz.

In order to use the Simulink model in a simulation, model param-eters had to be estimated. Many motor specific parameters couldbe obtained directly from technical documentation or estimated ex-perimentally. Others, like friction coefficient µ and motor backlash,were estimated with the Simulink Response Optimization Toolbox.In the latter case, the model’s response to sinusoidal input for vary-ing model parameters was matched against the real response of themotor to the same input signal. The model explains over 90 % ofthe variance in motor output for a frequency range between 0.1 and20 Hz. Figure 3.5 illustrates an example.

3.1.3 Force feedback mechanism

With computer models of the motion controller and the leadscrewdrive it was possible to create a model of the experimental architec-ture. The purpose of the model was to simulate the force feedbackmechanism in order to find a set of controller parameters for the PIDcontrol algorithm presented in section 3.2.4. Figure 3.6 illustrates theblock diagram of this model. The model was created in Simulink. Itconsists of the TG, PID filter and leadscrew drive models presented insections 3.1.1 and 3.1.2 and additional block elements implemented inSimulink. The algorithms underlying the force controller and velocitycorrection elements are presented in section 3.2.4 and 3.2.5, respec-tively. The force controller employs a variant of digital PID control

33

Page 40: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

development of the control software

SForce

controllerVelocity

correction

SLeadscrew

drivePID filter

Trajectorygenerator

-

-

referenceforce

measured force

actual position

commanded position

Force sensor

Figure 3.6.: Block diagram illustrating simplified model of the forcefeedback mechanism in the experimental architecture.

algorithm and has three controller parameters, the gain G, the deriva-tive time constant Td and the integrator time constant Ti. The modelof the force sensor is a dead zone dynamics Simulink block. It hasthe following definition:

f orce(d, y) =

k(y)(d− dist+) , d ≥ dist+k(y)(d− dist−) , d ≤ dist−

0 , otherwise(3.11)

with k(y) leverarm length y dependent spring constant,d displacement in the force feedback direction,dist± positive and negative distances between the sensor,

and objects of contact.

Additionally, a white noise signal of predetermined variance (seesect. 4.2.1) was superimposed on the model sensor output to simu-late noisy voltage measurement in the real sensor. The overall modelfrom Figure 3.6 was used together with the control software fromsection 3.2 and a qualitative comparison between the real force feed-back system and the model was made. The real system was alwaysmore stable. The reason for this is possibly inherent damping in thebending beam of the force transducer which is not modelled by thedead zone dynamics Simulink block. However, the question of big-ger system stability was not pursued further. The model showedthat smoothing of the measured force signal with a lowpass filter(see sect. 3.2.4) would introduce oscillations into the system (see Fig-ure 3.7). The real system shows the same behaviour. Also the modeland system responses for the same input signals show similar dy-namic and static behaviour. Figure 3.8 illustrates this for the caseof a step response. However, there are also differences between thesystem and model outputs. The model overshoots the reference sig-nal multiple times, whereas the real system is more stable under thispoint of view. Both system and model responses have similar risetimes but the noisiness of their response is different. While a white

34

Page 41: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

3.1 computer model of the architecture

time [s]time [s]

forc

e [m

N]

forc

e [m

N]

A B

Figure 3.7.: Diagrams showing force step responses of the feedbackmechanism model (A) without and (B) with lowpasssmoothing of the measured force signal. The cutoff fre-quency of the lowpass filter was set to 10 Hz.

Gaussian noise with mean zero and variance computed from realforce signal measurements is superimposed on the force signal mea-sured by the model, the real system seems to show a more regularpattern in the signal noise. Nevertheless, Fourier analysis of this noisedid not show any significant frequency peaks.The system noise depends on the quality of the electronic circuits ofthe force transducer and their influence on the measurements is notexactly known. Thus, a white noise approximation of this influenceseems to be an oversimplification. Good agreement between system

time [s]

forc

e [m

N]

Figure 3.8.: Step response of the force feedback mechanism model(blue) and the real force feedback system (red). Thedashed line indicates the reference signal.

and model behaviour motivates the force controller parameter estima-tion in a simulation. For this task Simulink Parameter Tuning Tool-box was used. A step force signal was used as reference input for the

35

Page 42: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

development of the control software

model and a gradient descent optimization procedure was used to de-termine a set of parameters for which the model output matched anideal step response most closely. The estimated parameters (the gainG, the derivative time constant Td and the integrator time constant Ti)are used in the real system.

3.2 control software: ipamacs

This section describes the control software (further also referred to ashost software or host program) which was developed in this projectto integrate the basic tasks of micropositioning, data acquisition andforce feedback. Because of its purpose the host program was giventhe name: Insect Pad Adhesion Measurement And Control System(IPAMACS). Two points were given high priority with regard to thechoice of software development environment for the program. Firstly,broad support for hardware components and secondly ease of cre-ation of user interfaces. The program was developed in LabView.This choice was motivated by the fact that a software interface forthe translation stages as well as the data acquisition card written forLabView was already provided by Physik Instrumente (PI) and Na-tional Instruments (NI) respectively. Another important factor wasthe inherent support for multithreading in LabView as the multipletasks which the control software integrates have to run simultane-ously and be coordinated in time.LabView as a development environment employs dataflow program-ming language called G. Abelson and Sussman (1996) mention threedistinctive characteristics of every programming language:

• language primitives

• means of composition

• means of abstraction

In G common datatypes like numeric values, strings and boolean val-ues are supported. They can be combined into multidimensional ar-rays of the same type or clusters of different types. A LabView pro-gram consists of a set of subroutines called virtual instruments (VIs).Every VI has three components: a block diagram, a front panel anda connector pane. The front panel constitutes a user interface, theblock diagram contains the program logic and the connector panedefines input and output terminals of the VI. Data flows betweendifferent VIs through wires which connect the VIs. The wire connec-tions implicitly define execution sequence of the program because noVI can execute before it has been provided with refreshed data at allits input terminals. G supports common control flow statements likewhile loops or case conditionals and defines additional timed structureswhich allow the programmer to put time constraints onto the execu-

36

Page 43: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

3.2 control software : ipamacs

tion of a loop or define time dependencies between elements of anexecution sequence. Loops implicitly run in separate threads.

3.2.1 Program structure

On the highest level the host program consists of three loop compo-nents. These are model, view and controller (see Figure 3.9). Thisemploys a variant of a well-established design pattern (Gamma andHelm, 1995). All loops run independently in separate threads andshare information through global variables with access protection pre-venting race-conditions (Tanenbaum, 2001).

M

V CI

P

ET = 1/f

cf

Figure 3.9.: Schematic showing abstract structure of IPAMACS pro-gram (I). The program consists of model (M), view (V)and controller (C) loops. The model loop contains patternloop (P) which embeds execution loop (E). Level of shad-ing indicates the priority which the particular loop runswith (with more shading standing for higher priority).

The main program starts all three loops and is responsible for theinitialization of hardware components. During the latter procedureevery motor stage is positioned in the middle of its valid travel rangethus defining the origin of three dimensional coordinate system (fur-ther referred to as the zero position). Additionally, a counter outputof the 6035E I/O data acquisition card is initialized for video cameratriggering tasks. Furthermore, the amplifier to which the lateral andnormal force measurement channels of the force transducer are con-nected is reset in order to settle the voltages on a definite level.The controller and view loops are responsible for the interaction withthe user and the model loop contains main program logic responsiblefor hardware control and data acquisition. It processes program in-put consisting of movement patterns (see sect. 3.2.2) in its pattern loopand starts a video camera triggering task at some pattern-dependent

37

Page 44: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

development of the control software

frequency c f while entering the innermost execution loop. The cam-era triggering task runs in parallel to the IPAMACS program in a6035E I/O card (NI) for the amount of time specified for the cur-rent movement pattern. An external camera is triggered by using thecounter output (a series of TTL pulses) of the 6035E I/O card. Thecard supports triggering frequencies of up to a few hundreds kHz.The execution loop is a timed structure and has an operation period ofT defined as the inverse of the operation frequency f which the usercan set to a maximal value of 50 Hz. During a time frame of T theexecution loop has to acquire and process measurement data and is-sue motor control commands based on this data as described in thefollowing sections. There are three different ways of interfacing themotor axes from the IPAMACS program. The first one, General Com-mand Set (GCS) interface, makes use of high level VIs provided by PIand allows for setting of motor travel ranges in mm and velocities inmm/s for all axes directly. Another possibility is to write the travelrange and velocity values into corresponding registers of the motioncontroller in controller-dependent units of counts and counts/cycle,respectively. This has to be done for each motor axis separately withaid of low level C libraries also provided by PI. The latter method isfurther referred to as the QMC interface. Its advantage are short exe-cution times. The last possibility, which is actually employed by theIPAMACS program, is to call an external C library developed in thiswork. This library was created in order to combine the GCS function-ality with low time penalties of the QMC interface. It will be furtherreferred to as Motor Interface Library (MIL). A comparison of thesethree methods is given in section 4.1.1.Data acquisition tasks comprise the retrieval of positional informationfrom motor encoders for each motor stage as well as voltage measure-ments for both force channels. The execution loop reiterates until itreaches the execution time for the current movement pattern. After allmovement patterns have been processed the acquired data is writteninto a logfile.

3.2.2 Operation modes for movement patterns

The input to the program consists of a text file which defines a setof movement patterns for a given biological experiment. Every move-ment pattern has a duration in milliseconds (execution time), definesan operation mode for each axis (motor stage) and the video cameratriggering rate. There are three possible operation modes:

• absolute positioning mode

• position formula mode

• force feedback mode

38

Page 45: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

3.2 control software : ipamacs

The latter defines an expression whose evaluation at any multiple ofthe operation period T within the execution time texc results in a newforce reference value for the force controller. This value together withthe measured force signal is used to compute a new velocity for thecorresponding stage. The force feedback mode is further described insection 3.2.4.The absolute positioning and position formula operation modes defineexpressions for movement patterns and are described in the next sec-tion. Their evaluation results in new position and velocity values atany multiple of T. However, the computed velocity values are not for-warded directly to the motion controller but undergo a velocity cor-rection procedure (either type I or II) as it is described in section 3.2.5.Figure 3.10 illustrates the relationship between the different opera-tion modes, velocity correction procedures and the motion profilesof the motion controller which underlie the operation modes in theIPAMACS program.

absolute positioningmode

position formulamode

force feedbackmode

trapezoidal point-2-pointprofile

velocity contouringprofile

velocity correctiontype II

velocity correctiontype I

IPAMACS

mC

position

velocity

velocity

duration

triggeringrate

mode X

mode Y

mode Z

movementpattern

Figure 3.10.: A movement pattern defines an operation mode foreach motor axis. The velocity computations performedin each operation mode undergo a velocity correctionprocedure before they are forwarded to the motioncontroller.

3.2.3 Positioning operation modes

Absolute positioningIn the absolute positioning mode the particular stage is supposed tomove to some absolute position pnew given as a constant in millime-tres within the valid travel range of the stage. The position is called“absolute” because it is given relating to the zero position as implicitlyset during program initialization (or explicitly redefined afterwards).The stage is supposed to reach the new position travelling with someconstant velocity v within the execution time texc for the particular

39

Page 46: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

development of the control software

movement pattern. The distance d to be travelled is computed as thedifference between the actual absolute position pabs and pnew :

d = pnew − pabs (3.12)

and the velocity v is then simply:

v =d

texc(3.13)

However, this velocity is subject to a velocity correction procedureof type I. The reason for this is the way how the trapezoidal point-to-point motion profile of the motion controller which underlies thisoperation mode works. A further explanation can be found in sec-tion 3.2.5.

Position formulaIn the position formula operation mode new distances to be travelledare computed at each multiple of operation period T by substituting thecurrent discrete time value for a variable t in a given position formulaf (t). The formula may have the form of a polynomial, sinusoidal,logarithmic or exponential function or a combination of them1. Thedistance dn+1 to be travelled within the time frame T between time tn

and tn+1 is:

dn+1 = f (tn+1)− f (tn) (3.14)

and the associated travel velocity vn+1 is computed as:

vn+1 =dn+1

T(3.15)

The motion profile which underlies this operation mode is velocitycontouring. It requires a different velocity correction procedure (typeII) than in the absolute positioning mode (sect. 3.2.5).

3.2.4 Force filtering and feedback

Section 2.3.3 described how voltages from the normal and lateralchannels of the force transducer are converted into correspondingforce values. Voltages are sampled by a 6035E I/O data acquisitioncard with the frequency of 1 kHz and up to 20 values can be obtainedwithin the operation period without causing big time delays for the ex-ecution loop. The voltage signal delivered by the force transducer isnoisy (see sect. 4.2.1) and undergoes an additional smoothing proce-dure before it is converted into the force signal. The host softwareprovides three different ways of signal smoothing:

1 Every mathematical function from the C mathematics library as defined in <math.h>

is supported.

40

Page 47: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

3.2 control software : ipamacs

• mean filter

• median filter

• low-pass filter.

The mean filter is the arithmetic average of a set of values. For a setof measured voltages: U1, . . . , Un the mean voltage U is defined as:

U =1n

n

∑i=1

Ui (3.16)

The median of a set of values is computed by sorting them in anascending order and taking the middle one or the mean of two centralvalues for an odd or even number of elements, respectively. For a setof sorted voltages U1 ≤ . . . ≤ Un their median is:

U =

U n+1

2n odd

12 (U n

2+ U n

2 +1) n even(3.17)

The low-pass filter performs signal filtering in time. It passes low-frequency signals but attenuates signals with frequencies higher thanits cutoff frequency fc. It is a continuous-time filter but can be ap-proximated in a program by a digital version:

Ulpn = αUn + (1− α)Ulp

n−1 (3.18)

with

α =T

12π fc

+ T(3.19)

and T being the sampling period corresponding to the operation pe-riod. In the above equation Ulp

n and Ulpn−1 are the current and previous

value of the low-pass-filtered signal and Un is the currently measuredvoltage.

The measured force signal is always used for data logging purposesfor the X- and Z-axis as described in section 2.3.2. Additionally, itis used for force feedback operation mode if this mode is chosen fora specific translatory stage. Because of the current setup of the forcetransducer, force feedback operation mode is only supported for X- andZ-axis. However, the IPAMACS software features this mode for allaxes in the case that a force transducer might also be integrated forthe Y-axis in the future. In the force feedback operation mode forcereference values for the force controller are computed similarly to po-sition values in the position formula mode by substituting the currentmultiple t of operation period T into some kind of force expression F(t)and evaluating it. From the so computed force reference value F ref

the currently sensed force signal F sense for given axis is subtracted,resulting in an error value err. This value as well as the previous

41

Page 48: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

development of the control software

error err prev and the overall sum of errors err sum which occurreduntil the current point of execution are used by a discrete PID con-trol algorithm to compute a deflection which would compensate forthe error. The computations are consistent with the cantilever beamtheory (sect. 2.3.1 and 2.3.3) and are performed with a maximum fre-quency of 50 Hz.

1 dist = abs(offset) + pos;

2 k = a_2*dist*dist + a_1*dist + a_0;

3 k = k / (a*dist + b);

4

5 err = F_ref - F_sense;

6 i_term = (1/Ti) * err_sum;

7 d_term = Td*(err - err_prev) / T;

8

9 disp = G*(err + i_term + d_term) / k;

10 v = disp/T;

Listing 3.1: Code snippet presenting the discrete PID control algo-rithm used by the force controller in a C-like syntax.

The code snippet in Listing 3.1 illustrates the PID control algorithmemployed by the host software. The leverarm length dist consists ofa theoretical cantilever beam offset 2 (Lo f f set in sect. 2.3.3) and theactual motor position pos in the Y-direction. The spring constant k iscomputed for given leverarm length y with a quadratic polynomialapproximation. The polynomial coefficients are estimated for mea-sured voltages and have to be subsequently scaled for forces usingthe force-voltage linear relationship also estimated during the calibra-tion procedure (see sect. 2.3.3 and 4.2.2).Knowing the force error and the spring constant at a given lever-arm length the force controller computes a displacement and velocitywhich compensates for the error. The so computed velocity is thenchecked against velocity limits and trimmed if needed. It is also sub-jected to the velocity correction procedure of type II as in the positionformula operation mode (see previous section).The PID parameters, gain G and the time constants Ti and Td wereobtained from the simulation through an optimization procedure (seesect. 3.1.3).

3.2.5 Velocity correction

In section 2.2 the motion controller and its trajectory generator wereintroduced. Section 2.2.1 presented two motion profiles of the trajec-tory generator. The trapezoidal point-to-point and the velocity con-touring profile which are used in the absolute positioning and posi-

2 The parameters offset, a, b as well as the spring constant polynomial coefficients(a 0, a 1 and a 2) and the controller parameters (G, Ti and Td) are axis-specific.

42

Page 49: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

3.2 control software : ipamacs

tion formula operation modes of the host software, respectively.The position controller and the feedback from the motor encoder en-ables the motion processor to move the stage at the specified veloc-ity and to reach the specified target position (in trapezoidal point-to-point profile) within the system limits and precision. However, inthis notion the time aspect is neglected. The overall system accuracysuffers from time limitations. Small position errors take a relativelylong time to be corrected because of the way the PID controller wasparametrised by PI (see equation (2.8)). The integral part of the al-gorithm has to sum up many small positional deviations before thiscauses the stage to move. Moreover, if the stage is supposed to travela specified distance during a fixed time frame, simple distance/timecomputation for the travel velocity may not give satisfactory results.This is because in the velocity computation also the acceleration and

v

t

vact

vref

vnew

v

t

vact

vref

vnew

v

t

vact

vref

vnew

v

t

vact

vref

vnew

v

t

vact

vref

vnew

v

t

vact

vref

vnew

A

B

C

D

E

F

0

0

0

0

0

0

texc

texc

texc

texc

texc

texc

Figure 3.11.: Velocity correction of type I for the trapezoidal point-to-point profile used in the absolute positioning opera-tion mode. Left column diagrams illustrate three possi-ble cases for a positive and right column diagrams for anegative value of the instantaneous velocity vact. Lightshaded area has positive while dark shaded area nega-tive sign.

deceleration phases as they occur in the respective motion profileof the trajectory generator have to be considered. This is especiallyimportant in the position formula operation mode where velocity com-mands are issued to the stage with a high frequency while the relativedistances to be travelled have to be preserved. This enforces velocity

43

Page 50: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

development of the control software

correction which takes into account the instantaneous travel velocityof the system and adjusts the velocity command in such a way thatthe correct travel distance will occur at the end of the given timeframe T (or texc in the absolute positioning mode). In the following,the correction procedures employed in the absolute positioning (type I)and position formula as well as force feedback operation modes (type II)of the host software are derived.In any case the stage is travelling at some instantaneous velocity vact

when a velocity vre f is commanded. Before a new command will be is-sued, time T (or texc) has to pass and during this time frame the stageis supposed to travel the distance of vre f T (or vre f texc). All velocitychanges occur with a fixed acceleration of ±a. Figure 3.11 illustratesthe six possible situations, depending on the value of vact and vre f , inthe trapezoidal point-to-point and Figure 3.12 in the velocity contour-ing motion profile of the motion processor. The host software hasto compute the corrected velocity vnew in such a way that the overallshaded area for each case (with positive sign for light and negativesign for dark shaded area) is equal to either vre f T (or vre f texc) for thecases A, B and C or −vre f T (or vre f texc) for the cases D, E and F.

v

t

T

vact

vref

vnew

v

t

T

vact

vref

vnew

v

tT

vact

vref

vnew

v

tT

vact

vref

vnew

v

tT

vact

vref

vnew

A

v

tT

vact

vref

vnew

B

C

D

E

F

0 0

0

0

0

0

Figure 3.12.: Velocity correction of type II for the velocity contouringmotion profile used in the position formula operationmode. The six different cases are similar to those in Fig-ure 3.11.

In the trapezoidal point-to-point profile the stage has to stop at theend of time frame texc. The six cases from Figure 3.11 reduce to thethree following equations:

44

Page 51: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

3.2 control software : ipamacs

Equation Cases

vre f texc = vnewtexc − 12a (vnew − vact)2 − 1

2a v2new A, F

vre f texc = vnewtexc + 12a (vnew − vact)2 + 1

2a v2new C, D

vre f texc = vnewtexc + 12a (vnew − vact)2 − 1

2a v2new B, E

In the velocity contouring profile the stage continues to travel at vnew

at the end of time frame T. The six cases reduce to only two equa-tions:

Equation Cases

vre f T = vnewT − 12a (vnew − vact)2 A, C, D and F

vre f T = vnewT + 12a (vnew − vact)2 B and E

All of the above equations are quadratic and may have up to twodifferent real solutions. If two solutions vnew1 and vnew2 are found,the one closer to vre f is chosen. If no real solution can be obtained thevelocity is not corrected and vre f is used directly.

45

Page 52: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose
Page 53: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

4A C H I E V E D F U N C T I O N A L I T Y A N D T E S T S

This chapter presents the functionality achieved in the IPAMACS pro-gram with regard to the basic tasks of micropositioning, force mea-surement, force feedback control and triggering of an external videocamera. In any case, the functionality is evaluated with help of cus-tom designed experiments or test measurements which try to high-light the particular aspect of the program’s performance as well as toillustrate the limitations of the experimental architecture.The micropositioning section (sect. 4.1) compares different motor in-terfacing methods and shows the advantages of a custom written mo-tor interface library (MIL) as compared to the solutions provided byPhysik Instrumente (PI). It also illustrates the effect of velocity correc-tion on the trajectory tracking capabilities of the IPAMACS program.Section 4.2.1 acquaints the reader with the effect of noise and drift onthe quality of force measurements and shows how the effect of noiseis reduced by signal smoothing. Nevertheless, the level of remainingnoise is still a serious limitation for the experimental architecture andhas a bearing on the performance of the force feedback control mech-anism which is described in section 4.3.Motor movements and force measurements have to by synchronizedin time with the image recording by an external video camera. Sec-tion 4.4 shows the quality of this synchronization. Additionally, sec-tion 4.2.2 shows an example of force transducer calibration and sec-tion 4.5 presents an example of a biological experiment which wasperformed with the experimental architecture under the control ofthe IPAMACS program.

4.1 micropositioning

The micropositioning system consists of three identical M-126.PD1translatory stages. The stages are capable of performing continu-ous movements in the range of 25 mm with a maximum velocity of15 mm/s (see sect. 2.1.1). However, if a movement pattern, in whichthe movement parameters (travel distance and velocity) vary in time,has to be carried out several problems occur. The most important ofthese are timing and velocity correction problems. The former wereaddressed by the development of a special motor interface library(see sect. 3.2.1) and the latter by employing a velocity correction pro-cedure (see sect. 3.2.5). This section illustrates the effects of thesesolutions and the improvement in the trajectory tracking capabilitiesof the IPAMACS program as compared to the solutions delivered by

47

Page 54: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

achieved functionality and tests

PI.All experiments presented in this section have been conducted withone particular stage but could also be performed with an arbitrarystage. The results can also be generalized easily for the case of amulti-axis movement by means of superposition.

4.1.1 Comparison of motor interfaces

There are three different possibilities of interfacing the translatorystages from the IPAMACS program. They were already introducedin section 3.2.1. The GCS and QMC interfaces are provided by PIand a special motor interface library MIL was developed in this work.This section illustrates the problems connected with the first two inter-faces and shows why it was necessary to employ a custom solution.In order to evaluate the performance of different interfacing meth-ods a M-126.PD1 stage was supposed to move forwards and back-wards with a constant velocity of ±0.5 mm/s. The direction changesoccurred every second for a total time of 9 seconds. In an ideal casethis movement should result in a sawtooth trajectory. Thus, the goalof the experiment was to evaluate the performance of the IPAMACSprogram in tracking a sawtooth trajectory. This can be seen in Fig-ure 4.1. During the experiment movement commands were fed into

0 21 3 4 5 6 7 8 9

0.4

0.2

0

-0.2

-0.4

-0.6

-0.8

time [s]

actu

al positio

n [m

m]

GCS

QMC

MIL overlappingideal sawtooth

Figure 4.1.: Diagram showing the results of tracking an ideal saw-tooth trajectory (dashed line) by means of the GCS(green), QMC (red) and custom written library (MIL, blueline) motor interfaces.

the stage with the operation frequency of 50 Hz in position formula op-eration mode (see sect. 3.2.2). No velocity correction procedure (seesect. 3.2.5) was used in any of the cases. The experiment was repeated

48

Page 55: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

4.1 micropositioning

5 times for all three interface methods. During each experiment (run)the actual position of the stage was logged. This positional data werethen compared to an ideal sawtooth trajectory by means of the coeffi-cient of determination (see equation [3.7]). The results can be seen inTable 4.1. From Figure 4.1 and Table 4.1 it can be seen that the MIL

Run 1 2 3 4 5MIL 0.9959 0.9941 0.9939 0.9943 0.9946QMC 0.8484 0.8567 0.8563 0.8725 0.8575GCS 0.2296 0.2431 0.2667 0.2748 0.2918

Table 4.1.: Values of the coefficient of determination for an ideal saw-tooth trajectory compared to 15 logged trajectories result-ing from three different interface methods and 5 iterationsfor each of them.

interface outperforms both of the interfacing methods provided byPI. The GCS interface overshoots the ideal sawtooth trajectory, has aphase shift and a weak repeatability (different form of each sawtooth),whereas the QMC interface does not reach the turning points of theideal trajectory but its repeatability is good. The trajectory resultingfrom the usage of the MIL interface almost overlaps with the refer-ence sawtooth trajectory in Figure 4.1 and its R2 values are all closeto 1.Figure 4.2 illustrates some problems which are typical for the solu-tions from PI. The GCS interface suffers from low resolution prob-

com

manded p

ositio

n [counts

]

1.16x 10

5

1.14

1.12

1.1

1.08

1.06

1.04

1.02

1

0.98

0 1 2 3 4 5 6 7 8time [s]

com

manded v

elo

city [counts

/cycle

]

x 105

2.5

2

1.5

0.5

0

-0.5

-1

1

-1.5

-2

-2.50 1 2 3 4 5

time [s]

A B

Figure 4.2.: (A) Commanded velocity output of the TG for same saw-tooth movement pattern when using the GCS (green) andQMC (red curve) interfaces. A dashed rectangle high-lights a region where the resolution differences betweenboth interface methods can be seen. (B) Commanded posi-tion output of the TG illustrating a nondeterministic ex-ecution problem (dashed circle) of the QMC interfacingmethod (shown in red). The corresponding output forthe MIL interface is shown in blue.

49

Page 56: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

achieved functionality and tests

lems. Although the same movement commands were fed into themotion controller, the commanded velocity output of the TG was alwaysfiner for the lowlevel QMC interface. The GCS interface is also slowerthan QMC. This can be seen in the delay of velocity sign changes inFigure 4.2.(A). The MIL interface makes use of the same lowlevel li-braries as the QMC interface and does not suffer from resolution ortime penalty problems. However, when the QMC interface is used atleast three separate library calls have to be issued before there is aneffect on the motor. This leads to the problem of nondeterminism inthis interfacing method. Motors are interfaced from one thread run-ning in the IPAMACS program and this thread can be interruptedby other threads before it finished executing all of its library calls.This leads to delays when updating the movement commands. Fig-ure 4.2.(B) shows an example of this problem. The MIL interfacecircumvents this problem by making only one external library callwhich unites all the functionality of the QMC interface.The interfaces provided by PI are not suited for the purpose of fre-quently changing movement commands even for linear movementpatterns and thus were not further evaluated for nonlinear trajecto-ries.

4.1.2 Effect of velocity correction

In this section the effect of velocity correction procedure (see sect. 3.2.5)on the trajectory tracking capabilities of the IPAMACS program isevaluated. There are two different velocity correction procedures de-pending on the operation mode of the program (see sect. 3.2.2). Thefirst one is used in the absolute positioning mode in which only lineartrajectories can be tracked. The second one is used in both position for-mula and force feedback modes in which tracking of nonlinear trajecto-ries is possible. The first velocity correction procedure was evaluatedwith the same sawtooth movement pattern as in the previous section.The second one with three different sinusoidal patterns:

sine1 = 0.5 · sin(3t) (4.1)

sine2 = 0.25 · sin(10t) (4.2)

sine3 = 0.1 · sin(30t) (4.3)

As in the previous experiment, movement commands were fed intoa M-126.PD1 stage with an operation frequency of 50 Hz. However,during this experiment the stage was always interfaced via the MILinterface. The stage was supposed to track a sawtooth trajectory inabsolute positioning and three different sinusoidal trajectories (equa-tions [4.1], [4.2] and [4.3]) in position formula operation mode. Eachtracking test was carried out with and without velocity correctionand repeated 5 times. Figure 4.3 illustrates the results of one of thesetests and Table 4.2 summarizes all test results by comparing the cor-

50

Page 57: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

4.1 micropositioning

0 1 2 3 4 5 6 7 8 9 10time [s]

actu

al positio

n [m

m]

0.1

0

-0.1

-0.2

-0.3

-0.4

-0.5

-0.6

actu

al positio

n [m

m]

1 2 3 4 5 6 7 8 9 10time [s]

0.6

0.4

0.2

0

-0.2

-0.4

-0.6

-0.8

actu

al positio

n [m

m]

1 2 3 4 5 6 7 8 9 10time [s]

0.6

0.4

0.2

0

-0.2

-0.4

-0.6

-0.8

actu

al positio

n [m

m]

0 1 2 3 4 5 6 7 8 9 10time [s]

0.7

0.6

0.5

0.4

0.3

0.2

0.1

0

-0.1

-0.2

A B

C D

Figure 4.3.: Diagrams illustrating movement trajectories with (blue)and without (red curves) velocity correction for (A) a saw-tooth pattern in absolute positioning operation mode; (B)sine1, (C) sine2 and (D) sine3 movement patterns in posi-tion formula operation mode.

responding ideal trajectory and the actually logged positional datawith the help of the coefficient of determination (see equation [3.7]).From the evaluation results it can be seen that velocity correction has

Test 1 2 3 4 5sawtooth c 0.9988 0.9985 0.9987 0.9987 0.9986

nc 0.9959 0.9942 0.9940 0.9944 0.9946sine1 c 0.9989 0.9991 0.9991 0.9991 0.9991

nc 0.9883 0.9878 0.9889 0.9944 0.9883sine2 c 0.9866 0.9857 0.9867 0.9867 0.9859

nc 0.7567 0.8451 0.9285 0.8817 0.9353sine3 c 0.8715 0.8791 0.8791 0.8791 0.8680

nc 0.1935 0.3275 0.3957 0.2198 0.4780

Table 4.2.: Values of the coefficient of determination for ideal saw-tooth and sinusoidal trajectories compared to the corre-sponding logged trajectories with (c) and without (nc) ve-locity correction procedures. All tests were repeated 5times.

51

Page 58: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

achieved functionality and tests

little effect on the tracking performance in absolute positioning opera-tion mode. However, in position formula mode the effect of velocitycorrection is noticeable and becomes even more significant for highfrequent movement patterns. If no velocity correction is applied asevere drift in the logged positional data is observed.

4.2 force measurement

The force transducer presented in section 2.3.2 measures forces in thelateral (X-) and normal (Z-channel) direction. However, these mea-surements suffer from noise and drift. These problems are illustratedin the following section.Furthermore, force can be measured only if a mapping between therecorded voltage and the force responsible for the change in volt-age level is known. Section 2.3.3 introduced a calibration procedurewhich establishes such mapping. In section 4.2.2 a real calibrationexample for the normal force channel is presented.

4.2.1 Noise and drift in measurements

The force measurement is corrupted by noise components in the sig-nal. The level of noise depends on the quality of the electronic circuitsof the force transducer and affects the precision with which force canbe measured. The effect of noise can be reduced by smoothing of theforce signal with the help of one of the techniques described in sec-tion 3.2.4. In the IPAMACS program a mean filter is employed (filterlength = 10). Using more than ten values for smoothing purposesis not feasible because of time constraints during program execution(see sect. 3.2.1).To quantify the effect of noise on the measured force signal a series offour measurements with different deflection levels of the cantileverbeam was carried out. The beam was either free hanging (no de-flection) or brought into contact with an object. The object was notmoveable and thus caused a deflection of the elastic force transducer.Force measurements were done for three increasing deflection levels(further referred to as small, medium and large). Although the exactamplitudes of these deflections were not measured, the experimentcan be repeated for similar deflection levels by deflecting the beamuntil similar voltage values can be measured. The measurementswere done with and without smoothing of the force signal and thewhole experiment was carried out for both force measurement chan-nels by deflecting the cantilever beam in the corresponding direction.Figure 4.4 and Table 4.3 illustrate the results.The recorded data show significant noise levels in both measure-ment channels and the importance of signal smoothing for the qual-ity of the force measurements. A smoothed signal shows up to three

52

Page 59: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

4.2 force measurement

4

5

1

0

-10 20 40 60 80 100 120 140

time [s]

forc

e [

mN

]

4

5

1

0

-10 20 40 60 80 100 120 140

time [s]

forc

e [

mN

]

0 20 40 60 80 100 120 140

time [s]

forc

e [

mN

]

0.5

0

-0.5

-1

-2.5

-30 20 40 60 80 100 120 140

time [s]

forc

e [

mN

]

0.5

0

-0.5

-1

-2.5

-3

A B

C D

0.04030.2743

1.1005

4.4562

0.03420.2659

1.0880

4.4485

0.0178

-0.1095

-0.5958

-2.5809

0.0461

-0.1686

-0.7105

-2.8358

Figure 4.4.: Force signals illustrating noise problems in force measure-ments for the X- (A and B) and Z-channel (C and D) ofthe force transducer. Green curves show the measuredsignal for an undeflected beam. Cyan, yellow and redcurves for increasing levels of deflection. The signals inthe right column were smoothed using a mean filter on10 measurements, whereas the left column shows unfil-tered data. Numbers next to each curve indicate the cor-responding average force value. Note the different scalingof the force-axes in A and B as compared to C and D.

no small medium largeFig.4.4 deflection deflection deflection deflection

A Xns 122.0054% 15.5618% 3.9424% 0.9735%B Xs 37.1826% 5.5162% 1.3231% 0.3803%C Zns 128.5455% 28.8705% 3.5349% 0.7472%D Zs 17.1021% 12.7300% 1.7935% 0.4348%

Table 4.3.: Standard deviation of the measured force signal in percent-age of its average value for the X- and Z-channel withoutsignal smoothing (ns) and with signal smoothing (s). Thedata correspond to the force signals as shown in Figure 4.4.

53

Page 60: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

achieved functionality and tests

times smaller deviation from its average value in both channels. Nev-ertheless, the level of noise makes any force measurement of lessthan 50 µN unreliable with the custom designed force transducer thatis used in the experimental architecture. The maximal force levelswhich can be measured depend on the level of deflection of the can-tilever beam for which the linear relationship with the voltage gener-ated by the bridge circuit still holds. They were not estimated exactlybut the sensor is able to measure forces with magnitudes of about50 mN.Additionally, the force signal in the Z-channel shows irregular peakswhich are probably caused by external and environmental factors.The glass plate attached to the force transducer has a large contactarea with the surrounding air and thus an air movement can causeits deflection in the Z-direction.Force measurements are also affected by the problem of a drift. Fig-ure 4.5 shows a drift example for both channels of the force trans-ducer. In this example the force signal was logged for 500 seconds

A B

time [s] time [s]

forc

e [m

N]

forc

e [m

N]

Figure 4.5.: Drift in three independent force measurements in (A) theX- and (B) the Z-channel of the force transducer.

on three different days directly after the amplifier was switched on.The force transducer was not brought into contact with any objectsduring this experiment.Both force channels show recognizable trends (drift) in the measuredforce signal. The drift is not an accidental but a repeatable phe-nomenon and can be seen in all three measurements. Its magnitudelies in the lower mN range and thus has a significant effect on theforce measurement. The drift in the Z-channel is worse than that inthe X-channel.Drift is caused by environmental conditions like changing tempera-ture or lighting. Variations in temperature cause a variety of effects.The resistance of the strain gauges change and the thermal expansion(or shrinkage) of the cantilever beam affects the strain measurement.These effects can be partially circumvented by thermal compensation

54

Page 61: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

4.2 force measurement

techniques in the construction of the bridge circuit. Therefore, afterswitching on the setup, the measurements should not be carried outbefore the electric circuits have reached the final temperature level.

4.2.2 Example calibration of the force transducer

This section presents an example of the calibration procedure for thenormal force measurement channel of the force transducer. Both,the voltage/force-leverarm length relationship and the spring con-stant part of the calibration procedure are presented. The exampleis a practical realization of the calibration procedure as described insection 2.3.3. All computations necessary for the estimation of thevoltage/force-leverarm relationship and the spring constant were car-ried out in Matlab on the position and voltage data logged by theIPAMACS program.In the first part of the calibration a known weight was placed on theglass plate of the force transducer at four different leverarm lengthsL1, L2, L3 and L4 and the corresponding voltage levels were mea-sured. Figure 4.6 shows an example measurement for a weight of100 mg. The weight can be placed at predefined leverarm lengths

time [s]

voltage [V

]

1L

2L

3L

4L

Figure 4.6.: Voltage/force-leverarm length calibration example. Thediagram shows voltage levels for a weight of 100 mgplaced onto the glass plate of the force transducer at fourdifferent leverarm lengths L1, L2, L3 and L4.

with a high position accuracy because the micropositioning system(see sect. 2.1.1) was employed for this task. A wooden rod was placedabove the longitudinal axis of the force transducer and a detachableweight was attached to the stick. The weight had the shape of a wire

55

Page 62: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

achieved functionality and tests

and was positioned above the point where the glass plate is gluedto the sheet metal plate of the force transducer. If the Z-stage of themicropositioning system moved up the force transducer made con-tact with the wire which was then completely supported by the glassplate because at the same moment, the contact with the wooden rodwas lost. When the Z-stage moved down again the wire returned toits initial position on the wooden rod and lost contact with the glassplate. Leverarm length could be varied by moving the Y-stage whilethere was no contact between the glass plate and the weight. Whenthe weight was detached from the rod by making contact with theglass plate oscillations in the measured voltage could be observed.Because of this, the voltage was logged for a predefined amount oftime (10 seconds) which was longer than the duration of the oscilla-tions before the Z-stage started to move back down. All voltage datalogged during this predefined amount of time were then averagedand this average was used as a representative voltage value for thegiven leverarm length. The whole procedure could be repeated withdifferent weights in order to obtain more measurement data for equa-tion (2.17) and thus to increase the reliability of its solution.The first part of the calibration procedure was evaluated by repeat-ing the calibration process described above with 5 different weightsand converting the measured voltages into forces via the relationshipfrom equation (2.19) gained by the calibration. It was expected thatthe measured forces would be the same for a given weight indepen-dently of the leverarm length and would correspond to the actualweight of the wire. Table 4.4 illustrates the results. The standard

L1 L2 L3 L4 mean true error√

σ2

43 mg 0.4165 0.4508 0.4118 0.4330 0.4280 0.4218 1.46% 0.017751 mg 0.5365 0.5535 0.5386 0.5506 0.5448 0.5003 8.89% 0.008566 mg 0.5843 0.6055 0.6358 0.6353 0.6152 0.6474 4.97% 0.0250

100 mg 0.9024 0.9482 0.9393 0.9682 0.9395 0.9810 4.23% 0.0275168 mg 1.6312 1.6125 1.5711 1.5730 1.5970 1.6481 3.10% 0.0298

Table 4.4.: Evaluation of the first part of the calibration procedure(voltage/force-leverarm calibration). The entries in the ta-ble show average force readings (in mN) for five differentweights put onto the glass plate of the force transducer atfour different leverarm lengths (L1, L2, L3 and L4). Next toeach row of readings their mean value, the expected (true)force value and the relative error between these two areshown. The last column shows the standard deviation inthe corresponding force measurements.

deviation in force measurements for the same weight and differentleverarm lengths was always smaller than 0.03 mN but the maximalobserved relative error between the measured and the expected force

56

Page 63: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

4.2 force measurement

value was approximately 10 %. However, these results lie in the samerange as the noise level for small deflections as shown in the previoussection.In the second part of the calibration, the spring constant of the can-tilever beam had to be estimated. For this purpose, the beam wasdeflected by four different deflection levels d1, d2, d3 and d4 againat four different leverarm lengths L1, L2, L3 and L4. During thisprocess, voltages were measured and logged. Figure 4.7 illustratesexample measurements. The amount of deflection was known by

time [s]

voltage [V

]

1L

2L

3L

4L

1d

1d

1d

1d2

d 2d

2d

2d3

d 3d

3d 3

d4d 4d

4d 4d

Figure 4.7.: Spring constant calibration example. The diagram showsvoltage levels for four different deflections (d1, d2, d3 andd4) of the bending beam at four different leverarm lengths(L1, L2, L3 and L4).

employing the micropositioning system. At the beginning of the cali-bration a hard, pointed object was placed under the force transducerand brought into contact with the glass plate at the point where theglass plate is glued to the sheet metal plate. The object was movedtowards the glass plate with a micromanipulator until a change involtage could be observed on the screen of an oscilloscope indicatingthat the contact has been established. At this point, the actual cali-bration procedure could begin. By moving the Z-stage downwardsby a specified distance the cantilever beam was deflected by the samemagnitude as the travelled distance. The leverarm length was var-ied by changing the position of the Y-stage. For each deflection andleverarm length voltage levels were logged and the average springconstant at the given leverarm length computed as in equation (2.22).This set of measured spring constant values was used to find a poly-nomial approximation of the leverarm length dependent spring con-

57

Page 64: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

achieved functionality and tests

stant. Figure 4.8 shows that a quadratic approximation is sufficientfor this purpose. It provides a monotonically decreasing approxima-

k1 k2 k3 k

4k

5

spring c

onsta

nt [ V

/ m

m]

leverarm length y [mm]

DD

a y + by + c2

1~

y3

Figure 4.8.: Polynomial approximation of the spring constant. Thegreen curve is a quadratic approximation used in the IPA-MACS program, while the blue dashed one is a theo-retical approximation motivated by equation (2.16). Redcrosses show the actually measured values of the springconstant for which both approximations were estimatedvia least squares methods.

tion (no oscillations) to the measured spring constants with R2 valuesclose to 1.The calibration in the lateral force measurement direction is similar.If the force transducer is rotated 90 degrees around its longitudinalaxis, the same movement patterns as in the above calibration can beused.

4.3 force feedback performance

The purpose of the force feedback control mechanism is to controlthe position of the force transducer in such a way that the measuredforce values correspond to the force reference signal for a given axis.In principle, each axis can work in the force feedback operation mode(see sect. 3.2.4). However, in the current setup only the X- and Z-axisare equipped with force transducers. Therefore, only these two axeshave dedicated force measurement channels. The axes influence thelevel of measured force by performing a movement in the correspond-ing direction and thus changing the deflection of the cantilever beam.The IPAMACS program employs a discrete PID control algorithm in

58

Page 65: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

4.3 force feedback performance

order to minimize the difference between the measured and the ref-erence force value. The parameters used by the force controller wereestimated in a simulation by means of an optimization procedure (seesect. 3.1.3). They have the following values for the Z-axis which wereused in the experiment described below:

gain G = 0.3555

integrator time constant Ti = 107

derivative time constant Td = 0.01983

In order to evaluate the performance of the force feedback controlmechanism a metal needle with an epoxy sphere on one of its endswas prepared. The other end was glued to the force transducer in-stead of a glass plate and a calibration procedure was carried out forthis setup. Afterwards, a metal wedge with an inclination α of 5 de-grees was placed under the needle. The needle was supposed to movedown until it made contact with the wedge deflecting the cantileverbeam to the point at which a prescribed force level was measured.Furthermore, this force level was to be maintained by the force feed-back control mechanism (constant normal force) while a movementin the X-direction was performed forth and back at a velocity ±v. TheX directed movement caused the deflection in Z-direction to changebecause of the inclination of the wedge. To minimize the friction be-tween the wedge and the epoxy sphere a teflon band was glued to thewedge and a layer of grease was put onto the band. Figure 4.9 showsa schematic drawing illustrating the experiment. The experiment was

a

vacos

1

v

wh

l

lA B

teflon band

teflon band

grease

wedge

wedge

needle

epoxy sphereforce transducer

X

Z

Figure 4.9.: (A) Side and (B) top view of the experimental setup whichwas used to evaluate the performance of the force feed-back control mechanism. The wedge has width w, lengthl, height h and an inclination of α. A teflon band with alayer of grease is glued to the wedge. An epoxy sphereperforms a sliding movement at a velocity v in X-directionwhile maintaining contact with the teflon band.

carried out for 5 different reference force levels f1 to f5 (10, 5, 1, 0.5 and0.2 mN) at 5 different velocities v1 to v5 (0.01, 0.05, 0.25, 1 and 5 mm/s,respectively) resulting in 25 different test runs. Figure 4.10 illustratesthe force levels logged in the normal force measurement channel (Z-channel) during the whole experiment. At the beginning of each run

59

Page 66: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

achieved functionality and tests

time [s]

forc

e [m

N]

1.8%

3.6%

16%

34%

86%

0.40 s

0.45 s

1.00 s

1.80 s

3.50 s

v1

v = 50.02

v = 250.3

v = 1.004

v = 5.00 [mm/s]5

= 0.01

f1

f2

f3

f4

f5

Figure 4.10.: Performance of the force feedback control mechanismillustrated for 5 different reference force values ( f1 to f5,indicated by green dashed lines) and 5 sliding velocities(v1 to v5). The red numbers (left column) show the timewhich elapsed until the reference force was reached andthe magnitude of offset in percentage of the referencevalue for the sliding velocity of 5 mm/s (right column).

a reference force was commanded. Depending on its magnitude andthus the magnitude of the error between the reference force and theinitially measured force of 0 mN the force feedback mechanism man-aged to reach the reference force value with different velocities. Thisis indicated by the time values in the leftmost column of Figure 4.10(the initial distance between the epoxy sphere and the teflon band wasabout 7 mm and remained the same for each run). The commandedforce had to be maintained for the duration of the test run. After 7

60

Page 67: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

4.3 force feedback performance

seconds a sliding movement at a constant velocity in X-direction wasperformed upwards the wedge for 2 seconds, followed by a down-wards movement of 2 more seconds. The force feedback controllermanaged to keep the force levels at the reference value for most ofthe cases but for velocities bigger than 1 mm/s an offset could be ob-served. The offset had a value of about 0.2 mN and was movementdirection dependent for sliding velocities of 5 mm/s. This is indicatedas percentage of the force reference value in the rightmost column ofFigure 4.10.The experiment showed an overall good performance of the forcefeedback control mechanism but also indicated its limits for low ref-erence force values and high sliding velocities. However, because ofhigh noise level in the measured force signal (see sect. 4.2.1) forcefeedback control for force values below 0.5 mN is not reliable even ifthe reaction time of the force controller could be improved. Further-more, the offset visible in measurements for high sliding velocitiescould be reduced by adjusting the controller parameters in a task de-pendent way. As already mentioned, the controller parameters wereestimated in a simulation via an optimization procedure which mini-mized the mean square error between the step response of the forcecontroller and an ideal step function. For example, the offset couldbe minimized by decreasing the value of the integrator time constantTi and/or increasing the value of the gain G. Figure 4.11 showsan example for a reference force value of 1 mN and sliding veloci-ties of ±5 mm/s (compare with Figure 4.10, third row, rightmost col-umn). The controller overshoots the reference value in the beginning

6 %

time [s] time [s]

forc

e [m

N]

forc

e [m

N]

A B

Figure 4.11.: Effect of parameter adjustments on the performance ofthe force feedback controller. The dashed line indicatesthe force reference value. (A) Increasing the gain G to0.5 causes an overshot but reduces the magnitude of theoffset from the reference value (from 16 % to 6 %). (B)Setting the gain G to 0.5 and the integrator time constantto 100 additionally reduces the time offset.

(t = 2.5 s) because of a higher gain but the offset becomes smaller. Ad-

61

Page 68: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

achieved functionality and tests

ditionally, when the integrator time constant is smaller the controllerincreasingly minimizes the offset until the reference value is reached.

All experiments described above were carried out only for the nor-mal force measurement direction (Z-channel) but similar results canbe expected for the lateral direction (X-channel) if the orientation ofthe wedge, movement directions and the controller parameters wereadjusted, accordingly.

4.4 camera synchronization

In those biological experiments in which detailed information on therelative movement of insect attachment organs and the contact sur-face is needed, a video camera can be used to observe this so calledcontact area. The camera should be able to record the images witha high and adjustable frequency because the contact area can changedynamically. Moreover, the images from the camera have to be syn-chronized in time with e. g. the corresponding force measurements.The IPAMACS program can start an external video camera trigger-ing task (see sect. 3.2.1) at a movement pattern dependent frequencywhich can vary from 0 to a few hundreds kHz because of the capa-bilities of the 6035E I/O card (NI). The operation frequency of the IPA-MACS program is 50 Hz. Nevertheless, the triggering task remainssynchronized with the program execution after it has been started be-cause it runs as an independent process in the 6035E I/O card. Thisallows much higher triggering rates than the operation frequency of thehost program while preserving the triggering execution times withhelp of the precise hardware clock which is built into the 6035E I/Ocard.This section shows the quality of the synchronization of an externaltriggering task and the execution of the IPAMACS program. In orderto test the synchronization a thin metal needle was fixed to the tipof the force transducer and illuminated from above. Above the nee-dle a Redlake PCI 1000S camera (Redlake Inc., Tucson, USA) with amagnifying lens was positioned. The trigger input of the camera wasconnected to the counter output of the 6035E I/O card. The camerawas also connected to an external monitor so that the magnificationlevel and position of the camera could be adjusted with regard to thesize and position of the needle. The needle was supposed to move for-wards and backwards in the X-direction at a constant velocity whilethe movement images of the tip of the needle had to be recorded. Forthis purpose a sawtooth movement pattern (with the peak-to-peakamplitude of 0.5 mm and slope of ±0.5 mm/s) with the overall du-ration of 4 seconds and video camera triggering rate of 50 Hz wasdefined and then set in the IPAMACS program. The camera was cali-brated before the experiment for different magnification levels so that

62

Page 69: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

4.4 camera synchronization

the actual size of an image pixel was known for each level. With thisinformation the time course of the position of the motor (from motorencoder) and the position of the tip of the needle as recorded by thecamera could be compared. Figure 4.12 shows the results of this expe-riment. The red line illustrates the motor position. The position of the

0.1

0

-0.1

-0.2

-0.3

-0.4

-0.5

-0.60 0.5 1 1.5 2 2.5 3 3.5 4

time [s]

po

sitio

n [

mm

]

offset 32ms offset 32ms

offset 32ms offset 32msoffset 32ms

Figure 4.12.: Tracking of an ideal sawtooth trajectory (black dashedline) by the position of a motor stage (red line) and theposition of a metal needle (green line) in a series of videocamera recorded images. Image insets illustrate examplepositions of the needle as recorded during the experi-ment. The tip of the needle is highlighted by the centreof dashed circles (red).

tip of the needle was estimated by marking its pixel position in therecorded image frames and then using the calibration data to obtainthe actual position in mm. The position, as estimated with those im-age data, is depicted by the green line in Figure 4.12. The line is notcompletely smooth (little bumps on its surface) because the pixelswere marked manually which caused some inaccuracy. The experi-ment showed that there is a constant offset between the movement ofthe motor and the image recording of the corresponding change inthe position of the tip of the needle. The offset was initially estimatedto be 40 ms (2 frames at the recording rate of 50 frames per second)but another recording at a higher frame rate of 250 frames per secondshowed that it is actually 32 ms. This shows that the triggering task isstarted before the actual motor movement begins. An improvementproposal to this problem is given in section 5.2.3.The magnitude of the offset (32 ms) does not cause serious problemswith regard to the synchronization task between the IPAMACS pro-gram and an external video camera as long as it remains constant.

63

Page 70: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

achieved functionality and tests

The offset in the recorded sequence of images can be compensatedfor with help of any video processing software.

4.5 a biological experiment

In the previous sections of this chapter different aspects of the func-tionality of the experimental architecture together with its controlsoftware (further referred to as the system) were tested. The testsconcentrated always on specific aspects of the system’s performancefrom a technical point of view. The purpose of this section is to showhow the different aspects of the system’s functionality can be com-bined in a real biological experiment. The presented experiment isnot meant to have any biological significance (otherwise it must havebeen repeated on many insects and the results analysed with statisti-cal methods) but serves the purpose of illustration only.In insect adhesive organs surface contact is mediated by an adhesiveliquid (Walker et al., 1985, Ishii, 1987). The liquid film between thepad and the contact surface is the basis for generation of adhesiveforces due to surface tension and viscosity. Federle (2002) showedthat the adhesive secretion consists of two separate liquid phases (Liq-uid A and Liquid B). Liquid A does not form a homogenous film, butoccurs in droplets between the pad and the surface. These dropletsare surrounded by liquid B. Liquid A is also highly volatile becausedroplets exposed to air evaporate within fractions of a second. Theremaining hydrophobic footprint material mainly consists of liquid B,which is highly persistent. Thus, liquid A is apparently hydrophilic.Moreover, it was shown that the presence of liquid A depends on thenature of the surface. It was abundant on glass, but absent on hy-drophobic Polyimide surfaces.In the following experiment the question of the influence of the two-phasic liquid on frictional forces between an insect pad and a contactsurface had to be examined. For this purpose a stick insect, Carausiusmorosus, was immobilized in a plastic tube and its tarsus exposed.The insect was placed under a custom made glass plate attached tothe force transducer. The glass plate consisted of three separate glasspieces placed next to each other. The pieces were coated with a layerof Polyimide and heated in an electric oven for a different amount oftime (1, 4 and 18 hours). The longer the baking time was the more“glass-like” the surface properties had become and the less secretionwas absorbed by the corresponding surface. However, the reason forthis change is not known. Figure 4.13 shows the custom made glassplate. During the experiment the insect pad was brought into a con-tact with one of the three surfaces. After a pause of 90 seconds, dur-ing which a film of secretion between the pad and the surface (withor without the presence of liquid A) had built up, a sliding movementin X-direction at a constant velocity of 0.05 mm/s was performed for

64

Page 71: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

4.5 a biological experiment

putty-like adhesive

Carausius morosus

plastic tube

metal wire

adhesive organ

adhesive foil

custom made glass plate

1 h4 h

18 h

Figure 4.13.: The custom made glass plate consisting of three Poly-imide covered surfaces with different backing times (1, 4and 18 hours) as it was attached to the force transducer.Under the glass plate an immobilized stick insect (Carau-sius morosus) with an exposed adhesive organ is placed.

40 seconds while the normal force acting on the pad was kept at theconstant level of 0.5 mN by the force feedback control mechanism inorder to eliminate any unwanted influences due to changing adhe-sion levels. Afterwards, a pause of 3 minutes followed during whichthe normal force was still kept at 0.5 mN and changing friction lev-els could be observed. Then a pull-off movement in Z-direction (at0.5 mm/s) was performed releasing the contact between the pad andthe surface while measuring the magnitude of the adhesive force. Af-ter this stage of the experiment the micropositioning system changedthe position of the glass plate in the XY-plane slowly (so that the accu-mulated fluid could evaporate) in such a way that the insect pad waslocated under a surface with a different baking time afterwards andthe experiment could be repeated for the new surface. Figure 4.14 il-lustrates the different stages of the experiment. The surface with theshortest backing time (1 hour) would absorb more secretion than theother two surfaces with the same level of absorbtion despite of dif-ferent baking times (4 and 18 hours). However, on the surface withthe baking time of 18 hours the presence of Liquid A was observed,whereas there was only Liquid B (in different amounts) on the sur-faces with baking times of 1 and 4 hours. The frictional forces wereexpected to be large for the surface with a short baking time becauseit would allow for less fluid to accumulate and smaller for the othertwo surfaces. The effect of the presence of Liquid A on friction levels

65

Page 72: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

achieved functionality and tests

surfacechange

press-down

pause(90 s)

slide at 0.05 mm/s(40 s)

pause(3 min)

pull-off at 0.5 mm/s

pause(5 min)

3 x

force feedbackat 0.5 mN

Figure 4.14.: Different stages of the experiment which were repeatedfor three surfaces with different material properties. Thered frame indicates at which point during the experi-ment the normal force was kept at a constant level bythe force feedback mechanism.

was to be examined. The results of the experiment did not confirmthe expectations. They are illustrated in Figure 4.15. The frictionlevel was smallest for the surface with the shortest baking time. Thepresence of Liquid A seems to increase the level of friction. Never-theless, the experiment showed that the IPAMACS program is able tounite the different tasks of synchronous multi-axis movement, forcemeasurement and force feedback control in a biologically plausibleexperiment.

The functional significance of the two-phasic nature of the adhesiveliquid is still unclear and requires further exploration. In a series ofexperiments to follow material properties and physical parameters ofthe adhesive contact will be varied and combined with measurementsof adhesion and friction in single pads of insects. The experimentalsetup described in this thesis will be used for this purpose.

66

Page 73: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

4.5 a biological experiment

time [s]

time [s]

positio

n [m

m]

forc

e [m

N]

slid

e

slid

e

slid

epull-

off

pull-

off

pull-

off

force feedbackforce feedback force feedback

18 h 1 h 4 h

A

B

Figure 4.15.: Experimental data logged by the IPAMACS programduring the biological experiment. (A) Positional datafrom motor encoders for the X-(red), Y-(green) and Z-(blue curve) translatory stage. The pull-off and slidingphases of the experiment are indicated. (B) Frictional(red) and adhesive (blue curve) forces measured by theforce transducer with indication of surface baking timesfor the measured friction force and the effect of forcefeedback control in the normal force direction.

67

Page 74: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose
Page 75: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

5D I S C U S S I O N

In this thesis the experimental architecture used by the Insect Biome-chanics Workgroup of Dr. Walter Federle in the Department of Zool-ogy at the University of Cambridge for the analysis of the biomechan-ics of insect attachment organs has been presented. The experimentalarchitecture consists of a three-dimensional micropositioning systemand a two-dimensional force sensor. These hardware componentswere presented in chapter 2.The micropositioning system employs three M-126.PD1 motorisedtranslatory stages from Physik Instrumente arranged in a left-handedCartesian configuration. The stages are able to cover a travel rangeof 25 mm in all three space dimensions with an accuracy of less than1 µm and a maximal travel velocity of 15 mm/s. The microposition-ing system is controlled by custom written software (the IPAMACSprogram) which has been developed in this thesis (see sect. 3.2). TheIPAMACS program synchronizes all hardware components by simul-taneously driving the translatory stages (axes), performing force mea-surements and triggering an external video camera. The positiondata from all three motor encoders as well as the measured forcesare logged for further analysis. All axes can be driven indepen-dently from each other in one of three possible operation modes (seesect. 3.2.2). In the absolute positioning mode a stage can be moved toa given position within its valid travel range at a predefined constantvelocity. In the position formula operation mode a stage moves at avelocity which varies in either linear or nonlinear way according tothe evaluation of a time-dependent mathematical expression. The su-perposition of movements of all three axes in this mode results inan arbitrary three-dimensional movement within the physical systemlimits. The third operation mode is the force feedback mode whichallows the definition of a mathematical expression for time-varyingforce reference values. These values are compared with the measuredforce values and the differences between them are fed into a PID con-troller. The PID controller minimizes this difference by deflecting theforce sensor accordingly. Force feedback control is possible for the X-and Z-axis. However, the IPAMACS program features the force feed-back mode for all axes in case that a three-dimensional sensor shouldbe used.The actual two-dimensional force sensor is custom made and consistsof two bending beams the deflection of which is measured by con-stantan foil strain gauge load cells. The application of constantan foilstrain gauges and the way they are used in this setup forbids forcemeasurements below 100 µN because of the small signal-to-noise ra-

69

Page 76: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

discussion

tios (see sect. 4.2.1). Forces can actually be measured in the rangeof approximately 50 µN to 50 mN through application of multiplemeasurements and subsequent smoothing of the measured signalsas realized in the control software. The force sensor is attached tothe micropositioning system and thus freely moveable in all direc-tions. A contact surface is glued to its top and can be exchangedeasily if different substratum properties are required. The calibrationof the force sensor is carried out with help of the micropositioningsystem (see sect. 4.2.2) and results in a polynomial approximation ofthe spring constant of the cantilever beams. This has the advantagethat the material properties of the bending beams do not have to beknown in advance and even their variation due to the usage of differ-ent contact surfaces or different amounts of glue can be compensatedfor by the polynomial approximation.If a video camera is placed above a transparent contact surface andan insect attachment organ brought into contact with the surface frombelow, the contact zone between the attachment organ and the surfacecan be recorded and used for the estimation of the contact area after-wards. The camera has to be focussed on the attachment organ anddoes not have to track it afterwards because only the position of theforce sensor can change. The camera can be triggered with a variablefrequency of up to 250 kHz which is only limited by the capabilitiesof the recording device.In the following, the experimental architecture is compared with otherarchitectures which are used in different studies on biological attach-ment mechanisms (see next section). Section 5.2 provides further im-provement proposals with regard to the force measurement, forcefeedback and program execution.

5.1 other experimental architectures

In this section two other experimental architectures which are usedto study the biological mechanisms of attachment are compared withthe experimental architecture described in this thesis. The first ofthese is the microtester setup used by the Biological MicrotribologyGroup headed by Dr. Stanislav Gorb (Max-Planck-Institut fur Metall-forschung, Stuttgart, Germany) for experiments on insect attachmentorgans. The second is the mechanical testing apparatus used at theLewis & Clark College (Portland Oregon, USA) for experiments ongecko setal arrays. The experimental architecture described in thisthesis is further referred to as the Cambridge setup.

5.1.1 Microtester setup

The experimental architecture (microtester setup) used by the Biolog-ical Microtribology Group of Dr. Stanislav Gorb is described in Gorb

70

Page 77: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

5.1 other experimental architectures

and Scherge (2000). Figure 5.1 illustrates the microtester setup. Itconsists of a two-dimensional micropositioning system and a two-dimensional force transducer. The micropositioning system employstwo piezoelectric actuators (X- and Z-piezo). This allows precisenanopositioning in two dimensions with resolution of 10 nm and trav-elling distances up to 150 µm. Forces are measured with help of adouble-leaf spring whose deflection (in both X- and Z-direction) is de-tected by a single-beam laser interferometer (Tetra GmbH, Germany)with a resolution of 1 nm. The spring is made of photo-structurableglass and has two bending beams whose spring constants are known.It allows measuring forces in the range from 50 nN to 1.5 mN in Xand from 500 nN to 1 mN in Z-direction with a resolution of 10 nN. Asilicon plate attached to the glass spring serves as the contact surface(upper sample). An insect attachment organ (lower sample) is placedonto a holder block which is attached to the X-piezo. Both samplesare approached by means of mechanical micropositioners and the fi-nal engagement is then achieved by expanding the Z-piezo. Slidingmovements at constant sliding velocity (except at both turning points)can be achieved by powering the X-piezo with a saw-tooth signal andthe normal force between samples can be adjusted by controlling thevoltage of the Z-piezo. For vibration isolation, the microtester is posi-tioned on a concrete block with a mass of 3 tonnes.

z

x

lower sample

upper sample

double-leaf spring

reflector

laser beam

piezoelectric actuators

bending beam

Figure 5.1.: Microtester setup used by the Biological MicrotribologyGroup of Dr. Stanislav Gorb. The glass spring consistsof a glass body and two 100µm wide beams serving todetect the deflection of the beam. (Image adapted fromGorb and Scherge, 2000).

The microtester setup allows micropositioning and force measure-ment with a higher precision than the Cambridge setup but becauseof the employment of precise piezoelectric actuators it covers onlysmall movement amplitudes of up to 150 µm. However, for some

71

Page 78: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

discussion

biological specimens much larger displacements are necessary. More-over, the microtester allows only two-dimensional movements whichreduce to one dimension if the Z-piezo is used for controlling the levelof normal force. For the latter purpose some kind of force feedbackmechanisms has to be employed. However, the details regarding thecontrol software used with the microtester setup are not published.In particular, the question remains if the setup is able to perform anyother kind of movement than oscillating sawtooth patterns at a con-stant velocity in X-direction. To the best of our knowledge, the publi-cations have not given any other examples (e. g. Gorb et al., 2000).Furthermore, in case of the microtester setup, force measurement re-quires an expensive interferometer-based apparatus and a very pre-cise calibration procedure. The force sensor itself is not freely move-able and because of its construction it does not allow video camerarecording of the contact area between the lower and the upper sample(they are covered by the double-leaf spring).

5.1.2 Mechanical testing apparatus

The research group of Prof. Kellar Autumn at the Lewis & Clark Col-lege focuses on biomechanics, physiology, and evolution of animallocomotion. For their research on adhesion phenomena in geckosthe group uses a mechanical testing apparatus consisting of 2 lin-ear stages driven by closed loop brushless DC servomotors (New-port 850G-HS actuator in the Y-axis and a Newport 850G actuator inthe Z-axis; Newport Corporation, Irvine, California, USA). The lin-ear stages have a resolution of about 1 µm and large travel range of50 mm. The maximal travelling velocities are 500 µm/s and 6 mm/sfor the Newport 850G and 850G-HS actuators, respectively (Autumnet al., 2006).Forces are measured with a Kistler 9328A 3-axis piezoelectric forcesensor (Kistler, Winterthur, Switzerland) which is attached to thestages and can be moved in the Y- and Z-direction. The force sensorcan measure forces up to the kN range in all three space dimensionswith a maximal resolution of about 10 mN. The stage and force sensorassembly are vertically mounted to a stainless steel “tombstone” ontop of a Newport RP Reliance breadboard table which damps envi-ronmental vibrations. Figure 5.2 shows a schematic illustration of thetesting platform as described in Autumn et al. (2006). The testing plat-form is used e. g. in experiments on setal arrays peeled from live adultTokay geckos (Gekko gecko). The specimens are created by mountingthe setal arrays on scanning electron microscope (SEM) stubs withhelp of a synthetic adhesive. Afterwards, the specimen chuck is at-tached to the force sensor and can be pressed against a test substrateby moving down the Z-axis. A sliding movement is achieved by mov-ing the Y-axis. The test substrate is held in place by toggle strap

72

Page 79: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

5.1 other experimental architectures

Y-axis actuator

vibration isolation table

contact substrate

test substrate

Z-a

xis

actu

ato

r

Position controller

Force dataacquisition

Computer controller

specimen holder

3-axis force sensor

vertical mounting block

Force sensoraxes

Y

Z

X

SEM stub mount

Figure 5.2.: Schematic of the Autumn testing platform. A servocon-troller drives two closed loop DC servomotors attachedto a 2-axis linear stage to produce µm scale displacementsof a test substrate (here setal arrays) bonded to scanningelectron microscope (SEM) stubs. A 3-axis piezoelectricforce sensor measures the forces associated with deforma-tion of setal arrays compressed against a contact substrate.(Schematic illustration adapted from Autumn et al., 2006).

clamps with spring plungers bolted to the breadboard table.The mechanical testing apparatus used by the research group of Au-tumn and co-workers consists of two translatory stages with similarcapabilities as the M-126.PD1 stages used in the Cambridge setup butwith a two times bigger travel ranges. However, while such big travelranges are advantageous in research on geckos, they are not neces-sary in experiments on insect attachment organs. Moreover, the me-chanical testing apparatus lacks the capability of a three-dimensionalmovement and it is not clear if its control software can move thestages at varying velocities (possibly even in a nonlinear way). Themaximal possible travelling velocities are smaller than in case of theCambridge setup.The force measurement covers a much bigger range than in case ofthe Cambridge setup and can be done in three and not only in twodimensions. Only two dimensions are used for the measurement ofadhesive and frictional forces and in the case of experiments on insectattachment organs the magnitude of the measured forces lies belowthe resolution of the Kistler 9328A sensor. Because of its constructionthe mechanical testing apparatus, like the Gorb setup, does not allowvideo camera recording of the contact area between a specimen and

73

Page 80: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

discussion

a substratum. The contact zone is covered by the mechanical parts ofthe apparatus.

5.2 improvement proposals

In this section, some of the remaining problems with the experimen-tal architecture as well as general improvement possibilities are dis-cussed. In particular, a new design for the construction of a two-dimensional force sensor which would allow force measurementswith a lower noise level is presented (see next section). Section 5.2.2introduces the idea of combining a piezoelectric actuator with a mo-torised stage in order to improve the movement accuracy of the mi-cropositioning system while retaining its current large travel distances.Finally, section 5.2.3 discusses the possibility of improving the overallexecution time of the IPAMACS program.

5.2.1 Force measurement with a new sensor

Section 4.2.1 introduced the problem of noise in the force signal mea-sured by the custom made force sensor in the Cambridge setup. Thehigh amplitude of the noise components in the measured signal hasstrong implications on the capabilities of the experimental architec-ture. First, it puts a limit on the force measurement resolution. Forforces below 50 µN the noise components become larger than theforce signal itself. Second, it has an influence on the performanceof the force feedback control mechanism. Because of the noise com-ponents in the sensed force signal the feedback can not remain stablefor reference forces below 0.5 mN. In this case, even if the actual levelof force remains the same, the noise components change the sensedsignal more than ±10 % of its average value in an unpredictable way.The force controller tries to compensate these deviations which leadsto small oscillations about the reference force value.The level of noise depends on the quality of the electronic circuits(bridge circuit, amplifier circuit, connecting cables) of the force trans-ducer. There are two main sources of noise in every electronic cir-cuit. These are electromagnetic interferences (EMI noise) and ther-mal noise (Malvino, 1993). The former type of noise is caused byelectromagnetic radiation emitted from external sources and electro-magnetic interferences between different circuit components. The lat-ter kind of noise results from random electron motion caused by thethermal energy of e. g. the surrounding air.In the custom made force sensor, the effect of thermal noise is re-duced by using a half-bridge circuit with two strain gauges. In sucha configuration, any change in the temperature affects both gaugesin the same way which does not change the ratio of their resistanceand thus does not have an effect on the output voltage of the bridge

74

Page 81: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

5.2 improvement proposals

1 mm

d = 0.25 mm

semiconductorstrain gauge

glass plate sheet metal plate

sheet metal plate

74

d

d

4 7

A B

basecut-out

Figure 5.3.: New mechanical design for the custom made force sensor(design by T. Endlein). Semiconductor strain gauges areplaced in the area with the highest level of deformation.(A) the shape of a single bending element with indicationof its two possible lengths (4 and 7 mm) and the thicknessd. (B) side and top view of the new force transducer. Thetransducer consists of two bending elements (indicatedwith different levels of shading) mechanically connectedin an orthogonal arrangement through a cut-out.

circuit. However, the custom sensor (Cambridge setup) employs con-stantan foil strain gauges (1-LY13-3 with gauge factor of 2.04 ± 1%,HBM) in its bridge circuit. The low output of foil-gauge transducersrequires the associated amplifier electronics to have a high gain forthe amplified signal to be useful. The high gain makes the systemmuch more susceptible to electromagnetic interference noise.The microtester setup presented in section 5.1.1 circumvents the prob-lem of noisy force measurements by using an interferometer-basedoptical technique to detect the deflection of the bending beam. Thistechnique is not suitable for the Cambridge setup in which the forcetransducer has to be freely moveable. However, the custom madeforce sensor could be redesigned in order to make use of more sensi-tive semiconductor strain gauges (with gauge factors about 100− 200).With this type of strain gauges smaller strains can be measured whilethe output of their bridge circuitry remains strong and does not re-quire high amplifications. Furthermore, the force sensor could be re-designed mechanically in order to increase the resonance frequencyof its bending elements. This can be achieved e. g. by using stifferbending materials or shortening the length of the bending elements.In both cases smaller deflections would have to be detected which

75

Page 82: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

discussion

would require semiconductor strain gauges. In a cantilever springelement, a relatively long beam has to convert the applied load intoa bending moment in the gauge area. At the same time this portionof the beam contributes significantly to the overall mass which is sub-jected to deflection. As a result, the spring element tends to have alow resonance frequency. The design of the bending elements can beimproved by concentrating the beam deformation in the gauge areaand reducing the effective beam mass. Figure 5.3 illustrates this con-cept. An additional advantage of the presented design is that bothbending elements can remain at the same distance from their baseand thus the same Lo f f set value can be used in the theoretical modelfrom section 2.3.3.

5.2.2 Nanopositioning for force feedback

The application of a new, stiffer force sensor (see previous section)would lead to the measurement of much higher force levels for thecorresponding level of deflection than in the currently employed forcetransducer. Accordingly, small force adjustments would require muchfiner positional adjustments of the force sensor than it is currently thecase. This has an implication on the force feedback control mecha-nism.The motorised translatory stages (M-126.PD1, PI) used in the Cam-bridge setup provide a minimal incremental motion of 0.25 µm. In theforce feedback operation mode the corresponding axis typically movesforwards and backwards in order to keep the sensed force levels inthe range of the reference force value. Because of backlash, the ac-tual movement resolution lies around 1 µm (bidirectional repeatabil-ity). For a bending element with a spring constant of 50 Nm−1 (arealistic value used e. g. in the microtester setup from sect. 5.1.1) thismeans that force adjustments of only 50 µN are possible. In the cur-rent setup this is the lower limit at which forces can be measured.With a new, stiffer sensor and improved quality/resolution of themeasured force signal the force feedback control mechanism wouldbe able to make smaller positional adjustments than it is possible withthe M-126.PD1 stages. As the µm range is the resolution limit forDC-motor-driven translatory stages (see sect. 2.1.1) a different drivesystem would have to be employed. High-end piezoelectric actuatorsachieve bidirectional repeatability of 1 nm but have too short travelranges to be useable as a replacement for DC-motor-driven stagesin the experimental architecture. However, a hybrid solution couldbe strived for. A piezoelectric actuator could be mounted on thecarriage of a motorised stage. The latter would cover large traveldistances to the point at which the travel range of the former wouldbe big enough to make fine adjustments to the position of the forcesensor. This solution would require an elaborate software interface

76

Page 83: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

5.2 improvement proposals

which could synchronize the movement of both drive systems withrespect to each other. If the piezoelectric actuator reached its travellimit at some point the motorised stage would have to move to thispoint while at the same time moving the piezoelectric actuator back.From the new position the latter could again make adjustments to theposition of the force sensor within its own valid travel range.With smaller reference force values than it is possible at the moment,the force feedback mechanism would require an additional change.Section 4.3 showed that the reaction times of the force controller de-crease for small forces. In order to compensate this e. g. the gainparameter could be increased but this, at the same time, would leadto overshoots and less stable feedback for small differences betweenthe sensed and the reference force. However, the controller couldmodify its parameters in a dynamic and adaptive manner. Such anadaptive controller could e. g. start with a high gain and decrease itwhile the sensed force approaches the reference value.

5.2.3 Timing issues

Section 3.2 discussed the IPAMACS program. The main programfunctionality consisting of force measurement, movement computa-tion, interfacing of motor stages and accumulation of log data is lo-cated in its innermost execution loop which has the maximal operationfrequency of 50 Hz. This limit depends on the computer architecture(number of CPUs, clock rate, operating system) and was set to 50 Hzfor a dual-core Pentium IV 2, 2 GHz computer running Windows XPas operating system. By increasing the operation frequency, the overallprogram performance would improve. In particular, the measureddata could be logged and the force controller would work at a higherrate. This could happen if either better hardware components wereprovided or software execution times could be improved.The IPAMACS program was developed as a LabView program be-cause of the inherent support of multithreading in this developmentenvironment and the provided software interfaces for hardware com-ponents. However, the time critical Motor Interface Library (MIL)had to be developed as an external C library in order to avoid theproblem of nondeterministic execution (see sect. 4.1.1). This reducedthe execution time of this program part. If more parts of the IPA-MACS program were implemented as external C libraries, the overallprogram performance would increase but at the same time the coor-dination between them as well as the program maintainability wouldbecome more difficult. A better solution is the employment of a real-time operating system with a flexible scheduling policy. In this case,most of the time critical processes responsible for data acquisition orinterfacing of the motor stages could be assigned a higher executionpriority. For this purpose a real-time Linux system could be chosen

77

Page 84: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

discussion

as there is also a LabView version available for this operating system.

Another time-related issue is the 32 ms long offset between the start ofa video camera triggering task and the beginning of the correspond-ing movement of the motor stages as indicated in section 4.4. Thisoffset could be eliminated by starting the triggering task from an ex-ternal library with a built-in delay of 32 ms but this would also requirea better scheduling policy of a real time operating system. The offsetcould also be eliminated if a different I/O card than the 6035E modelfrom NI was used. In some I/O cards a delay in the triggering taskcan be set explicitly.

78

Page 85: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

AI PA M A C S

a.1 graphical user interface

The graphical user interface (GUI) of the IPAMACS program can bedivided in four functional sections with panels. They are highlightedin Figure A.1. Figure A.2 shows the detailed view of execution con-trol panel in the first section. It contains widgets through which theuser can take influence on the execution of the program. These wid-gets are described below in more details. The second section containslive preview panel. It consists of two further scope panels showingthe currently measured force signal in both measurement channelsas well as the current position of all translatory stages. Below theseforce and position scopes there are three numeric indicators showingthe current value of the global runtime (sum of all movement patternexecution times up to now, see next section), the single runtime (exe-cution time of the current movement pattern) and the single runtimeleft which indicates how much time is left till the end of execution ofthe current movement pattern.The feedback controller panel contains three text fields for the inputof the PID force controller parameters (see sect. 3.2.4 and 4.3).

79

Page 86: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

ipamacs

A B C

D

Figure A.1.: IPAMACS GUI consisting of (A) execution control panel,(B) live preview panel, (C) feedback controller paneland (D) data plot panels.

80

Page 87: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

A.1 graphical user interface

1

2

3

45

6

7

8 9

10

Figure A.2.: Details of the execution control panel with enumeration(red numbers) of the control widgets.

The rightmost section contains three data plot panels. They are up-dated at the end of execution of all currently loaded movement pat-terns and show the values of the measured force and voltage signalsas well as the positional data from motor encoders of the translatorystages which were stored in the log file (see next section).

The execution of the IPAMACS program is controlled from the ex-ecution control panel. The program is started by pressing the whitearrow symbol which turns black afterwards and is indicated with a (1)in Figure A.2. The operation frequency of the program is set to the max-imum of 50 Hz but can be changed to a different predefined value bypressing the choice widget indicated with a (2). By pressing the but-ton (3) a storage directory for the log data output file can be chosen.The buttons (4) and (5) are used to load the input files with defini-tions of movement patterns and calibration coefficients, respectively.If there were no syntax errors in these files, the LED indicator markedwith a (6) turns green and the green START button (7) becomes active.The execution of the movement patterns is started by pressing thisbutton which then changes to a red STOP button. As long as themovement patterns are executed only the STOP button can be used tostop the execution. Additionally, there are two buttons (8) and (9).The former enables the user to define the position which is currentlyoccupied by the translatory stages as the new zero position (origin ofthe three-dimensional coordinate system of the micropositioning sys-tem). This has an effect on the subsequently logged positional dataand the valid travel ranges of all stages (initially 12.5 mm in each di-rection). Also the absolute positions used in the absolute positioningoperation mode are interpreted with regard to the new zero position.By pressing the button (9) the stages can be moved to the zero positionwithout the need of loading a corresponding movement pattern. Theexecution of the IPAMACS program is finished by pressing button(10).

81

Page 88: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

ipamacs

a.2 input and output formats

Both the input and the output to the IPAMACS program consist oftext files. There are two input files, one containing definitions ofmovement patterns and one containing the calibration coefficients forthe custom made force transducer. All measurements are logged intoone output file. In the following, the syntax of these files is discussed.

Movement patternsMovement patterns were already introduced in section 3.2.2. Everymovement pattern consists of a duration dt in milliseconds followedby a colon, an operation mode for all three axes of the microposi-tioning system followed by a comma and a video camera triggeringrate videoRate in Hz followed by a semicolon and a line break. Allentries are made in one text line and are separated by an arbitrarynumber of whitespaces. The axes are denoted as fx(t), fy(t) andfz(t) for the X-, Y- and Z-axis, respectively. Every axis can workin one of three possible operation modes (absolute positioning, positionformula and force feedback) with the exception of force feedback mode forthe Y-axis. The movement pattern syntax is summarized below in theBackus-Naur form:

<pattern > ::= <time >":" <axes > <video rate >";"<EOL >

<time > ::= "dt="<NONNEGATIVE INTEGER >

<axes > ::= "fx(t)="<mode >"," "fy(t)="<mode >",""fz(t)="<mode >","

<mode > ::= "abs("<FLOAT >")" | <EXPRESSION > |"F("<EXPRESSION >")"

<video rate > ::= "videoRate="<NONNEGATIVE INTEGER >

with EOF end of line character,NONNEGATIVE INTEGER arbitrary pos. integer number

or zero,FLOAT arbitrary float number,EXPRESSION arbitrary float number or arbitrary

mathematical expression usingfunctions from <math.h> in termsof the time variable t.

For the evaluation of <EXPRESSION> the current runtime value (as amultiple of operation period between 0 and the execution time dt) isused. The evaluation results in a position value in mm for the positionformula and a force reference value in mN for the force feedback oper-ation mode. In the former case, the position has to lie in the validtravel range of the stage.

82

Page 89: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

A.2 input and output formats

Sample Rate Buffer Sizeno rate specified 10 kS

0-100 Hz 1 kS100-10,000 Hz 10 kS

10,000-1,000,000 Hz 100 kS>1,000,000 Hz 1 MS

Table A.1.: Maximal number of triggering events (samples S) that canbe generated by the 6035E I/O card for a given triggeringfrequency (sample rate).

Every text line which begins with a hash symbol # is treated as a com-ment. In the example below, the first line is ignored by the IPAMACSprogram and the second line defines a 5 seconds long movement pat-tern during which a trigger signal is generated at 10 Hz. The X-axis issupposed to move with a sinusoidal wave motion forwards and back-wards in the range between 0.5 mm and −0.5 mm while the Z-axis iscontrolled by the force feedback controller for which a reference forcevalues of −1 mN are generated. The Y-axis performs no movement.

# Commentdt =5000: fx(t)=0.5* sin (5*t), fy(t)=0, fz(t)=F(-1),

videoRate =10;

The video camera triggering rate can be set to any nonnegative in-teger value with the constraints listed in Table A.1. The 6035E I/Ocard (NI) reserves a fixed buffer size for the number of generated trig-gering events (samples S) in dependance of the triggering frequency(indicated in the left column of Table A.1). Thus, the total numberof generated samples for a given execution time dt can not exceedtheir maximal admissible number indicated in the right column ofTable A.1.There is no limit on the number of movement patterns which can bedefined in one input file.

Calibration coefficientsThe input file with calibration coefficients contains numeric valueswhich specify the polynomial coefficients for the approximation ofthe spring constant of the force transducer and the coefficients for thevoltage-to-force conversion for both force measurement directions (X-and Z-channel). These values were estimated through a calibrationprocedure according to the theory from section 2.3.3. They are ex-pressed by means of the following syntax in the input file:

83

Page 90: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

ipamacs

<parameters > ::= <channel >":" <spring constant ><reserved > <offset > <crosstalk ><conversion >";"<EOL >

<channel > ::= "x-koef" | "z-koef"

<spring constant > ::= "a="<FLOAT >"," "b="<FLOAT >",""c="<FLOAT >","

<reserved > ::= "j=1, v_correct =1.0, v_max =10,"

<offset > ::= "l_ofs="<FLOAT >","

<crosstalk > ::= "crosstalk="<FLOAT >","

<conversion > ::= "slope="<FLOAT >", offset="<FLOAT >

The <channel> nonterminal specifies the measurement channel forwhich the coefficients are given. The numbers assigned to a, b and c

are the coefficients of the second order polynomial approximation ofthe spring constant as it is used by the force feedback controller (theycorrespond to a 2, a 1 and a 0 in Listing 3.1), whereas slope andoffset are the voltage-to-force conversion coefficients correspondingto a and b in Listing 3.1, respectively. The value of l ofs correspondsto Lo f f set from section 2.3.3 and offset in Listing 3.11.The <reserved> nonterminal does not have any significance and isnot further used by the IPAMACS program at the moment. Thecrosstalk term can be used to model the bidirectional influence be-tween the force measurements channel. However, this question wasnot pursued within the scope of this thesis.Also in case of the calibration coefficients file every text line begin-ning with a hash symbol # is treated as a comment. An example ofsuch file is presented below:

# Coefficients for the lateral force measurement# channelx-koef: a=4.3248e-005, b= -0.016406 , c=0.74106 , j=1,

v_correct =1.0, v_max=10, l_ofs=9, crosstalk=0,slope =0.0027836 , offset =0.041505;

# Coefficients for the normal force measurement# channelz-koef: a=0.0013044 , b= -0.099907 , c=2.5497 , j=1,

v_correct =1.0, v_max=10, l_ofs=27, crosstalk=0,slope =0.0052878 , offset =0.10033;

1 The disagreement in naming convention is due to backwards compatibility with aMatlab program which generates the calibration coefficients file from the calibrationdata. The same argument holds for the presence of additional terms in this filewhich are not used by the IPAMACS program.

84

Page 91: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

A.2 input and output formats

Column number Description1 measurement time2 camera triggered?3 position of the X-stage4 position of the Y-stage5 position of the Z-stage6 lateral force value7 normal force value8 voltage measured in X-channel9 voltage measured in Z-channel

Table A.2.: The meaning of numeric data stored in the correspondingcolumn of the log file.

Log fileThe output of the IPAMACS program is a log file containing 9 columnsof numeric log data. The columns are separated from each other bythe horizontal tab ASCII control character and contain the data listedin Table A.2. Each row of the log file corresponds to the data mea-sured at the time specified in the first column. This time is alwaysa multiple of the operation period and there are as many rows in thelog file as the number of measurements which were made during theoverall execution time of all movement patterns.The second column indicates if a trigger signal was generated foran external video camera at the corresponding time and has eitherthe value 1 (true) or 0 (false). Positional data is read from the mo-tor encoder of the corresponding stage and is stored in mm. Lateraland normal forces are computed from the voltages measured in theX- and Z-channel, respectively. The forces are stored in mN and thevoltages in V.

85

Page 92: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

ipamacs

a.3 movement patterns for calibration

Sections 2.3.3 and 4.2.2 presented the calibration procedure for thecustom made force transducer from both the theoretical and practi-cal point of view. This section shows example movement patternswhich could be used for the purpose of calibration. Any file withcalibration coefficients and a valid syntax can be used for calibrationbecause only the logged voltage data is used for the estimation oftrue calibration coefficients (see sect. 2.3.3).

Listing A.1: Example movement patterns for performing thevoltage/force-leverarm calibration.

1 ## initial detachment of the weight

2 dt =1000: fx(t)=0, fy(t)=0, fz(t)=abs(-5), videoRate =0;

3

4 # wait till oscillations die out

5 dt =3000: fx(t)=0, fy(t)=0, fz(t)=0, videoRate =0;

6

7 # weight on 0 mm

8 dt =1000: fx(t)=0, fy(t)=0, fz(t)=abs(0), videoRate =0;

9

10 # log voltage for 10 sec

11 dt =10000: fx(t)=0, fy(t)=0*t, fz(t)=0*t, videoRate =0;

12

13 ## detach

14 dt =1000: fx(t)=0, fy(t)=0, fz(t)=abs(-5), videoRate =0;

15

16 # move weight to 2 mm

17 dt =1000: fx(t)=0, fy(t)=abs(-2), fz(t)=0, videoRate =0;

18

19 # wait till the weight stops to swing

20 dt =3000: fx(t)=0, fy(t)=0, fz(t)=0, videoRate =0;

21

22 # weight on 2 mm

23 dt =1000: fx(t)=0, fy(t)=0, fz(t)=abs(0), videoRate =0;

24

25 # log voltage for 10 sec

26 dt =10000: fx(t)=0, fy(t)=0, fz(t)=0, videoRate =0;

27

28 ## repeat for different leverarm lengths

29 # 4 mm

30 dt =1000: fx(t)=0, fy(t)=0, fz(t)=abs(-5), videoRate =0;

31 dt =1000: fx(t)=0, fy(t)=abs(-4), fz(t)=0, videoRate =0;

32 dt =3000: fx(t)=0, fy(t)=0, fz(t)=0, videoRate =0;

33 dt =1000: fx(t)=0, fy(t)=0, fz(t)=abs(0), videoRate =0;

34 dt =10000: fx(t)=0, fy(t)=0, fz(t)=0, videoRate =0;

35 # 6 mm

36 dt =1000: fx(t)=0, fy(t)=0, fz(t)=abs(-5), videoRate =0;

37 dt =1000: fx(t)=0, fy(t)=abs(-6), fz(t)=0, videoRate =0;

38 dt =3000: fx(t)=0, fy(t)=0, fz(t)=0, videoRate =0;

39 dt =1000: fx(t)=0, fy(t)=0, fz(t)=abs(0), videoRate =0;

40 dt =10000: fx(t)=0, fy(t)=0, fz(t)=0, videoRate =0;

41 ## final detachment

42 dt =1000: fx(t)=0, fy(t)=0, fz(t)=abs(-5), videoRate =0;

86

Page 93: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

A.3 movement patterns for calibration

Listing A.2: Example movement patterns for performing the springconstant calibration.

1 ## start at zero position

2 dt =5000: fx(t)=0, fy(t)=0, fz(t)=abs(0), videoRate =0;

3

4 # deflect -0.2 mm

5 dt =1000: fx(t)=0, fy(t)=0, fz(t)=abs(-0.2), videoRate =0;

6

7 # log voltage for 5 sec

8 dt =5000: fx(t)=0, fy(t)=0, fz(t)=0, videoRate =0;

9

10 # deflect -0.4 mm

11 dt =1000: fx(t)=0, fy(t)=0, fz(t)=abs(-0.4), videoRate =0;

12

13 # log voltage for 5 sec

14 dt =5000: fx(t)=0, fy(t)=0, fz(t)=0, videoRate =0;

15

16 # deflect -0.6 mm

17 dt =1000: fx(t)=0, fy(t)=0, fz(t)=abs(-0.6), videoRate =0;

18

19 # log voltage for 5 sec

20 dt =5000: fx(t)=0, fy(t)=0, fz(t)=0, videoRate =0;

21

22 ## move to leverarm length -2 mm

23 dt =1000: fx(t)=0, fy(t)=abs(-2), fz(t)=abs(1), videoRate =0;

24 dt =1000: fx(t)=0, fy(t)=0, fz(t)=abs(0), videoRate =0;

25 dt =5000: fx(t)=0, fy(t)=0, fz(t)=0, videoRate =0;

26 dt =1000: fx(t)=0, fy(t)=0, fz(t)=abs(-0.2), videoRate =0;

27 dt =5000: fx(t)=0, fy(t)=0, fz(t)=0, videoRate =0;

28 dt =1000: fx(t)=0, fy(t)=0, fz(t)=abs(-0.4), videoRate =0;

29 dt =5000: fx(t)=0, fy(t)=0, fz(t)=0, videoRate =0;

30 dt =1000: fx(t)=0, fy(t)=0, fz(t)=abs(-0.6), videoRate =0;

31 dt =5000: fx(t)=0, fy(t)=0, fz(t)=0, videoRate =0;

32 ## move to leverarm length -4 mm

33 dt =1000: fx(t)=0, fy(t)=abs(-4), fz(t)=abs(1), videoRate =0;

34 dt =1000: fx(t)=0, fy(t)=0, fz(t)=abs(0), videoRate =0;

35 dt =5000: fx(t)=0, fy(t)=0, fz(t)=0, videoRate =0;

36 dt =1000: fx(t)=0, fy(t)=0, fz(t)=abs(-0.2), videoRate =0;

37 dt =5000: fx(t)=0, fy(t)=0, fz(t)=0, videoRate =0;

38 dt =1000: fx(t)=0, fy(t)=0, fz(t)=abs(-0.4), videoRate =0;

39 dt =5000: fx(t)=0, fy(t)=0, fz(t)=0, videoRate =0;

40 dt =1000: fx(t)=0, fy(t)=0, fz(t)=abs(-0.6), videoRate =0;

41 dt =5000: fx(t)=0, fy(t)=0, fz(t)=0, videoRate =0;

42 ## move to leverarm length -6 mm

43 dt =1000: fx(t)=0, fy(t)=abs(-6), fz(t)=abs(1), videoRate =0;

44 dt =1000: fx(t)=0, fy(t)=0, fz(t)=abs(0), videoRate =0;

45 dt =5000: fx(t)=0, fy(t)=0, fz(t)=0, videoRate =0;

46 dt =1000: fx(t)=0, fy(t)=0, fz(t)=abs(-0.2), videoRate =0;

47 dt =5000: fx(t)=0, fy(t)=0, fz(t)=0, videoRate =0;

48 dt =1000: fx(t)=0, fy(t)=0, fz(t)=abs(-0.4), videoRate =0;

49 dt =5000: fx(t)=0, fy(t)=0, fz(t)=0, videoRate =0;

50 dt =1000: fx(t)=0, fy(t)=0, fz(t)=abs(-0.6), videoRate =0;

51 dt =5000: fx(t)=0, fy(t)=0, fz(t)=0, videoRate =0;

52 ## return to zero position

53 dt =1000: fx(t)=0, fy(t)=abs(0), fz(t)=abs(0), videoRate =0;

87

Page 94: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose
Page 95: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

B I B L I O G R A P H Y

Abelson, H. and Sussman, G. J. (1996). Structure and Interpretation ofComputer Programs. The MIT Press, Cambridge, Massachusetts.

Autumn, K., Liang, Y., Hsieh, T., Zesch, W., Chan, W.-P., Kenny, T.,Fearing, R., and Full, R. (2000). Adhesive force of a single geckofoot-hair. Nature, 405:681–685.

Autumn, K., Majidi, C., Groff, R. E., Dittmore, A., and Fearing, R.(2006). Effective elastic modulus of isolated gecko setal arrays.Journal of Experimental Biology, 209:3558–3568.

Betz, O. (2002). Performance and adaptive value of tarsal morphol-ogy in rove beetles of the genus stenus (coleoptera,staphylinidae).Journal of Experimental Biology, 205:1097–1113.

Comyn, J. (1997). Adhesion Science. Royal Society of Chemistry, Lon-don.

Dai, Z., Gorb, S., and Schwarz, U. (2002). Roughness-dependentfriction force of the tarsal claw system in the beetle pachnodamarginata (coleoptera, scarabaeidae). Journal of Experimental Biol-ogy, 205:2479–2488.

de Crevoisier, G. e. a. (1999). Switchable tackiness and wettability ofa liquid crystalline polymer. Science, 285:1246–1249.

Dixon, A., Croghan, P., and Gowing, R. (1990). The mechanism bywhich aphids adhere to smooth surfaces. Journal of ExperimentalBiology, 152:243–253.

Dorf, R. C. and Bishop, R. H. (2004). Modern Control Systems. PrenticeHall, Upper Saddle River, NJ.

Drechsler, P. and Federle, W. (1997). Biomechanics of smooth adhe-sive pads in insects: Influence of tarsal secretion on attachmentperformance. Journal of Comparative Physiology A, 192:1213–1222.

Edwards, J. and Tarkanian, M. (1970). The adhesive pads of het-eroptera: a re-examination. Proceedings of the Royal EntomologicalSociety of London Series A, 45:1–5.

Federle, W. (1997). Slippery ant-plants and skilful climbers: selec-tion and protection of specific ant partners by epicuticular waxblooms in Macaranga (euphorbiaceae). Oecologia, 112:217–224.

Federle, W. (2006). Why are so many adhesive pads hairy? Journal ofExperimental Biology, 209:2611–2621.

89

Page 96: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

BIBLIOGRAPHY

Federle, W., Baumgartner, W., and Holldobler, B. (2004). Biome-chanics of ant adhesive pads: frictional forces are rate- andtemperature-dependent. Journal of Experimental Biology, 207:67–74.

Federle, W. and Bruening, T. (2006). Ecology and biomechanics ofslippery wax barriers and wax running to macaranga-ant mutu-alisms. Ecology and biomechanics, pages 163–184.

Federle, W. and Endlein, T. (2004). Locomotion and adhesion: dy-namic control of adhesive surface contact in ants. Arthropod Struc-ture & Development, 33:67–75.

Federle, W., Riehle, M., Curtis, A., and Full, R. (2002). An integrativestudy of insect adhesion: mechanics and wet adhesion of pre-tarsal pads in ants. Integrative and Comparative Biology, 42:1100–1106.

Federle, W., Rohrseitz, K., and Holldobler, B. (2000). Attachmentforces of ants measured with a centrifuge: better wax-runnershave a poorer attachment to a smooth surface. Journal of Experi-mental Biology, 203:505–512.

Frohn, J. (2001). Grundausbildung in Okonometrie. de Gruyter, Berlin,New York.

Fung, Y. C. (1993). Biomechanics: Mechanical Properties of Living Tissues.Springer-Verlag, Berlin.

Gamma, E. and Helm, R. (1995). Design Patterns. Elements of ReusableObject-Oriented Software. Addison-Wesley Longman, Amsterdam.

Gorb, S., Gorb, E., and Kastner, V. (2001). Scale effects on the attach-ment pads and friction forces in syrphid flies. Journal of Experi-mental Biology, 204:1421–1431.

Gorb, S. and Scherge, M. (2001). Biological Micro- and Nanotribology.Nature’s Solutions. Springer-Verlag, Berlin.

Gorb, S. N. (1998). The design of the fly adhesive pad: distal tenentsetae are adapted to the delivery of an adhesive secretion. Pro-ceedings of the Royal Society of London Series B Biological Sciences,265(1398):747–752.

Gorb, S. N. (2001). Attachment devices of insect cuticle. Kluwer Aca-demic Publishers, Dordrecht, London.

Gorb, S. N. and Beutel, R. G. (2001). Evolution of locomotory attach-ment pads of hexapods. Naturwissenschaften, 88:530–534.

90

Page 97: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

BIBLIOGRAPHY

Gorb, S. N., Jiao, Y., and Scherge, M. (2000). Ultrastructural architec-ture and mechanical properties of attachment pads in tettigoniaviridissima (orthoptera tettigoniidae). Journal of Comparative Phys-iology A Sensory Neural and Behavioral Physiology, 186:821–831.

Gorb, S. N. and Scherge, M. (2000). Biological microtribology:anisotropy in frictional forces of orthopteran attachment padsreflects the ultrastructure of a highly deformable material. TheRoyal Society Proc., 267:1239–1244.

Hansen, W. and Autumn, K. (2005). Evidence of self-cleaning in geckosetae. Proc. National Academy of Science, 102, no.2:385–389.

Ishii, S. (1987). Adhesion of a leaf-feeding ladybird epilachna vigin-tioctomaculata (coleoptera, coccinellidae) on a vertically smoothsurface. Applied Entomology and Zoology, 22:222–228.

Kara, T. and Eker, I. (2004). Nonlinear modeling and identification ofa dc motor for bidirectional operation with real time experiments.Energy Conversion & Management, 45:1087–1106.

Khongtong, S. and Ferguson, G. S. (2002). Roughness-dependentfriction force of the tarsal claw system in the beetle pachnodamarginata (coleoptera, scarabaeidae). Journal of the AmericanChemical Society, 124:7254–7255.

Kinloch, A. J. (1987). Adhesion and Adhesives: Science and Technology.Springer-Verlag, New York.

Lees, A. and Hardie, J. (1988). The organs of adhesion in the aphidmegoura viciae. Journal of Experimental Biology, 136:209–228.

Malvino, A. P. (1993). Electronic principles. McGraw-Hill, New York.

Nachtigall, W. (1974). Biological Mechanism of Attachment. Springer-Verlag, Berlin.

Ogata, K. (1990). Modern control engineering. Prentice Hall, UpperSaddle River, NJ.

Ramachandran, V. S. (1990). The Utilitarian Theory of Perception. Cam-bridge University Press, Cambridge.

Snodgrass, R. (1956). Anatomy and physiology of the honey-bee. McGraw-Hill Book Company, New York.

Soderstrom, T. and Stoica, P. (2001). System Identification. PrenticeHall, Cambridge.

Spong, M. W. and Vidyasagar, M. (1989). Robot Dynamics and Control.John Wiley & Sons, USA.

91

Page 98: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

BIBLIOGRAPHY

Stoica, P. and Moses, R. L. (1997). Introduction to Spectral Analysis.Prentice Hall, Cambridge.

Stork, N. (1980). Experimental analysis of adhesion of chrysolinapolita (chrysomelidae: Coleoptera) on a variety of surfaces. Jour-nal of Experimental Biology, 88:91–107.

Tanenbaum, A. S. (2001). Modern Operating Systems. Prentice HallInternational, London.

Varanasi, K. K. (2002). On the design of a precision machine forclosed-loop performance. Master’s thesis, MIT.

Vogel, S. (2003). Comparative biomechanics: life’s physical world. Prince-ton University Press, Princeton and Oxford.

Votsch, W., Nicholson, G., Muller, R., Stierhof, Y., Gorb, S., andSchwarz, U. (2002). Chemical composition of the attachment padsecretion of the locust locusta migratoria. Insect Biochemistry andMolecular Biology, 32(12):1605–1613.

Walker, G., Yule, A., and Ratcliffe, J. (1985). The adhesive organ ofthe blowfly, calliphora vomitoria: a functional approach. Journalof Zoology London, 205:297–307.

92

Page 99: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose

A S S E RT I O N

Ich versichere, dass ich die vorliegende Diplomarbeit selbstandig ver-fasst und keine anderen als die angegebenen Quellen und Hilfsmittelverwendet habe. Alle Stellen, die dem Sinn nach anderen Werken ent-nommen sind, habe ich in jedem einzelnen Fall unter genauer Angabeder Quelle deutlich als Zitat kenntlich gemacht.

Bielefeld, 28.01.2008 Filip Szufnarowski

93

Page 100: Development of a force feedback and measurement system for the analysis …fszufnar/... · 2008-01-26 · the functional morphology of insect attachment organs. For this pur-pose