• No results found

Design and Implementation of an Active Horse Gait Simulator

N/A
N/A
Protected

Academic year: 2021

Share "Design and Implementation of an Active Horse Gait Simulator"

Copied!
94
0
0

Loading.... (view fulltext now)

Full text

(1)

Design and Implementation of an Active

Horse Gait Simulator

HAN YUAN, VIRINCHI JOGLEKAR

(2)

Design and Implementation of an Active Horse Gait

Simulator

Han Yuan, Virinchi Joglekar

Master of Science Thesis MMK 2012:61 MDA 441

KTH Industrial Engineering and Management

(3)

Sammanfattning

Detta projekt syftar till att utforma en aktiv h¨astg˚angsimulator samt att tillverka en prototyp och styrning. Syftet ¨ar att utbilda ryttare och ge dem en k¨ansla av att rida en riktig h¨ast. Den mekaniska strukturen samt kontrollen av denna anordning har utformats och genomf¨orts. Detta inkluderar en bakgrundsstudie om h¨astens stegr¨orelse, och trav, som ¨ar den g˚angart som ˚aterskapas av den aktiva stolen. Den inneh˚aller en analys av dessa g˚angarter och en studie av hur man b¨ast ˚aterskapar dessa r¨orelser p˚a ett f¨orenklat s¨att samt minskar niv˚an av mekaniska komplexitet fr˚an en verklig h¨ast till en enklare mekanisk maskin. Systemet har modellerats f¨or kontrollsyfte som ett tv˚a masse-system f¨orbundet med flexibla kopplingar. I projektet ing˚ar ¨aven en studie av modelleringsmetoder f¨or framg˚angsrik matematisk representering av systemet med tillr¨acklig noggrannhet. En ’Integral-Back-Stepping’ kontrollalgoritm utvecklades f¨or att kontrollera prototypen.

Den mekaniska strukturen kontrolleras med permanentmagnet synkrona v¨axelstr¨ oms-motorer. Dessa motorer kontrollerades med hj¨alp av en Siemens S120 kontroll enhet. H¨ogniv˚a-kontroll genomf¨ordes ocks˚a med dSPACE, med regleralgoritmer utvecklade i Matlab/Simulink.

(4)

Abstract

This project aims to design and prototype an active horse gait simulator device. The main objective is to train horse riders and give them the feeling of riding a real horse. The mechanical structure as well as the control of this device have been designed, implemented and tested. A background study of horse gaits, and of the trot, which is the gait to be recreated by the active chair, was performed. It in-cludes an analysis of these gaits and a study of how best to recreate these motions in a simplified manner, reducing the level of mechanical complexity from that of a real horse to a simpler mechanical machine. The mechanical structure has been modelled as a lumped two mass system for the purpose of performing the design of a high level controller which commands the Siemens SINAMICS S120 AC drive system to drive the mechanical structure. The high level controller was designed in Matlab/Simulink environment on the basis of an Integral Backstepping control approach and automatically implemented on a dSPACE DS1104 R&D Controller Board. An electronics board was designed to integrate the eletronics hardware sys-tem and a simple physical HMI was also designed in support of the interaction with the device.

(5)

FOREWORD

We would like to take this opportunity to express our thanks to Mats Hanson and Bengt Erikson, our supervisors at KTH during the period of this thesis work. We would also like to thank Lars Roepstorff of SLU for his guidance and ready support. Thanks also to Bj¨orn M¨oller for his design inputs and advice.

And last but not least, we are very much indebted to Staffan Qvarnstr¨om and Tomas ¨Ostberg for their invaluable help during the entire process.

(6)

NOMENCLATURE

ωa Anti-resonant frequency of the mechanical system (rad/sec)

ωl Load equivalent rotational speed (rad/sec)

ωm Motor shaft speed (rad/sec)

ωr Resonant frequency of the mechanical system (rad/sec)

θl Load equivalent rotation position (rad)

θm Motor shaft position (rad)

ζa Relative damping coefficient for anti-resonant frequency (N m/(rad/sec))

ζr Relative damping coefficient for resonant frequency (N m/(rad/sec))

bs Total torsional damping viscous friction coefficient (N m/(rad/sec))

Js Sum inertial of motor and load (kgm2)

Jload Inertial of all loads imposed on the nuts (kgm2)

Jmotor Motor inertial (kgm2)

ks Total stiffness of all flexible connections (N m/rad)

Tl Actual driving torque on load (N m)

Tm Output torque from the motor (N m)

Tld Equivalent torque of load disturbance (N m)

Abbrevations

KTH Kungliga Tekniska h¨ogskolan SLU Sveriges lantbruksuniversitet AHGS Active Horse Gait Simulator HMI Human Machine Interface

(7)

Contents

SAMMANFATTNING 1 ABSTRACT 2 FOREWORD 3 NOMENCLATURE 4 CONTENTS 5 1 INTRODUCTION 7 1.1 Background . . . 7 1.2 Purpose . . . 8 1.3 Delimitations . . . 8 1.3.1 Gait analysis . . . 8

1.3.2 Prototype development scope . . . 8

1.4 Method . . . 9

1.4.1 Horse biomechanics, essential and non-essential factors . . . . 9

1.4.2 Mechanical design and actuator selection . . . 9

1.4.3 Control structure and trajectory design . . . 9

1.4.4 Implementation on hardware . . . 9

1.4.5 Total system overview . . . 10

2 FRAME OF REFERENCE 11 2.1 Horse Biomechanics and Types of Gaits . . . 11

2.2 Available Data for Trot Gait Analysis . . . 14

2.3 Available Horse Gait Simulator Designs . . . 15

2.4 Ball Screw Drive Modelling Methods . . . 15

2.4.1 Lumped modelling . . . 16

2.4.2 Hybrid modelling . . . 18

2.4.3 Friction modelling . . . 18

2.5 Ball Screw Drive Control Approaches . . . 20

3 DESIGN AND IMPLEMENTATION 23 3.1 Horse’s Raw Data Analysis . . . 23

3.2 Degrees of Freedom Needed . . . 28

3.3 Trajectory Design . . . 28

3.3.1 Trajectory function estimation . . . 28

3.3.2 Additional instability in trot functions . . . 30

3.3.3 Ramped trajectory amplitude for smooth transition . . . 31

3.3.4 Random horse trot generator . . . 33

3.4 Mechanical Design and Fabrication . . . 35

3.4.1 Vertical motion . . . 36

3.4.2 Horizontal motion . . . 36

(8)

3.6 Electrical Actuator Selection . . . 39

3.7 Hardware Implementation . . . 40

3.7.1 Electronics board . . . 41

3.7.2 AC drive system . . . 41

3.7.3 DS1104 R&D controller board . . . 47

3.7.4 HMI and limit switches . . . 47

3.8 System Modelling . . . 49

3.8.1 System behaviour modelling . . . 49

3.8.2 System dynamics modelling . . . 51

3.9 Control Design and Simulation . . . 58

3.9.1 Controller algorithm design . . . 58

3.9.2 System simulation . . . 62

4 RESULTS 64 4.1 Mechanical Fabrication . . . 64

4.2 Hardware Implementation . . . 64

4.3 Controller Performance . . . 64

5 DISCUSSION AND CONCLUSION 73 5.1 Discussion . . . 73

5.1.1 Mechanical deisgn . . . 73

5.1.2 Trajectory generator design . . . 73

5.1.3 Hardware implementation . . . 73

5.1.4 Modelling and controller design . . . 73

5.2 Conclusion . . . 74

6 FUTURE WORK 75 6.1 Mechanical Hardware Upgrade . . . 75

6.2 Multiple Gait Implementation . . . 75

6.3 Stand-alone System Implementation . . . 75

REFERENCES 76 Academic References . . . 76

Commercial References . . . 77

APPENDICES 79

A MECHANICAL DESIGN STRESS CALCULATION 79 B MECHANICAL STRUCTURE DETAILS 85 C DRIVE SYSTEM ELECTRICAL DRAWING 88

D DIVISION OF WORK 90

(9)

1

INTRODUCTION

This section describes the necessity and aims of the thesis project, as well as the methodology used to carry out the work involved.

1.1

Background

Sveriges lantbruksuniversitet (SLU) is currently working on a project related to ‘Improved horse and rider health by riding’, which is primarily concerned with a physiological study of rider and horse biomechanical properties, and their interaction with each other. More specifically, it is concerned with studying the posture of a rider and it’s effect on both the rider and horse’s back. This would also give riders much information about how to change their riding posture for the better. To this end, SLU is interested in prototyping and possibly manufacturing an ‘active chair’, meant to simulate the movement of a horse, and which can be used for training purposes. At present, SLU already have a ‘passive chair’, used for preliminary training of riders, as shown in figure 1. However, this chair does not provide the user with any of the dynamics which they will experience on a real horse. Although the passive chair is useful for training different muscles from a physiological point of view, it does not help to improve riding skills, which naturally contribute a lot to the physiological interaction between the rider and the horse. An active chair which moves like a horse would better suit this purpose, and could be used as a simplified horse to train for specific situations in.

Figure 1: Photograph of currently available passive chair

(10)

which provides movement and instability that the ‘rider’ has to counter against in all directions. This chair is further used by riders to perform certain movements on, to accustom themselves to translations in different directions.

The Active Horse Gait Simulator (AHGS) chair would certainly not have such a wide range of freedom as far as the rider is concerned. This can be thought of as similar to actually riding a horse. The horse would move in a particular way. And although this way of movement would be interactive with the rider in the case of a real horse, its nature would be much more restricted than that of the passive chair. The horse would not move in this many different horizontal directions, not to mention the fact that it would introduce vertical movements as well.

1.2

Purpose

The goal of this project is to help acquire data for biomechanical research, to better define healthy riding postures for humans and horses. It also aims to provide a training tool for riders to use to improve their skills. This project would contribute towards the goal by making a prototype for the AHGS chair, and controlling it effectively to create the required motion of a horse, while attempting to minimise the weight and size of the machine. Horse gait simulators available today have a bulky size and are not considered very mobile. This project would attempt to create a functional AHGS with lower weight and more mobility. This would include the mechanical design and fabrication, the actuator selection, control algorithm design and implementation for the selected mechanics and actuators, as well as trajectory planning for the required movements. A user interface would also be developed, to allow manipulation of the AHGS by the user according to his needs, in order to vary its speed and range of movement.

1.3

Delimitations

The AHGS may further have much more development, in order to implement dif-ferent gaits, as well as further reduce the size and cost of the whole machine. At present, however, the objective of the AHGS project was limited based on the fol-lowing criteria.

1.3.1 Gait analysis

The AHGS chair was presently required only to simulate the ‘trot’ gait of a horse. (Different types of gait have been explained below, in section 2.1). The study of different gaits or walking and running styles of the horse has not been considered as a priority during the design and implementation of this prototype.

1.3.2 Prototype development scope

(11)

in-dependent active chair unit which could be transported and used in various locations. At present, however, this project aimed to prototype the system and implement a real-time feedback control loop using a PC equipped with the necessary software (dSPACE, STARTER) to interact with the actuators. The end result of this project would be a piece of laboratory equipment which would need its own dedicated com-puter for its operation.

1.4

Method

The different tasks involved in the project can be outlined and classified into different categories as shown below.

1.4.1 Horse biomechanics, essential and non-essential factors

The AHGS was required to be able to simulate the trot gait of the horse with acceptable accuracy, as judged by experienced riders. With this intent in mind, the horse gait characteristics and the biomechanical behaviour of the horse were studied, in order to analyse the movements required to be simulated. The biomechanics of an actual horse would be too complicated to mechanise, for the purpose of an active chair. Therefore, an initial step in the process was an analysis of the biomechanics of a horse while trotting, in order to ascertain which movements of the horse were necessary to be recreated. This would then dictate the degrees of freedom required in the machine, and would serve as a first pointer towards its conceptual mechanical design.

1.4.2 Mechanical design and actuator selection

Once the degrees of freedom required were determined, a conceptual mechanical design was prepared. The forces acting on this structure due to the rider and the structure’s inertia were analysed, for the purpose of actuator selection. The actuator selection would be a necessary step before modelling the control algorithms required to control the movement of the chair with acceptable accuracy.

1.4.3 Control structure and trajectory design

On completion of the mechanical design and actuator selection, the entire physical system could be modelled mathematically. This mathematical model was used for designing the control structure. The motion trajectories used to recreate the trotting horse with the AHGS were also then designed, and tested with the control structure. 1.4.4 Implementation on hardware

(12)

1.4.5 Total system overview

The final system integration was carried out to obtain an electromechanical system as shown in the system architecture in figure 2. It shows the mechanical design of the AHGS, along with the actuator control hardware blocks needed. It includes a PC with dSPACE for higher level control, as well as other software such as STARTER, MATLAB/Simulink etc. for development and commissioning purposes. It also in-cludes a dedicated control system for the synchronous motor current control for the chosen actuators. Finally, it also includes the Human-Machine-Interface (HMI) used to interact with the system. Further details about the selection and design criteria behind the various elements in the system architecture diagram are explained fur-ther on in this report, in section 3.

(13)

2

FRAME OF REFERENCE

This section describes the research of available data, methodologies and technology, which was conducted at the beginning of the thesis project. It includes the back-ground study of horse gaits and nature of movement, existing horse gait simulators, and of modelling and control methods.

2.1

Horse Biomechanics and Types of Gaits

Horses have many different methods of walking and running, known as ‘gaits’. Some of these gaits come naturally to horses, while others are taught to them with train-ing [1]. Generally speaktrain-ing, horses are said to have three basic gaits: The walk, trot and canter. The gallop is often also considered a different gait, but can also be considered as a variation of the canter. These basic gaits are widely understood to be natural gaits for horses, and are assumed to come naturally to most horses, irrespective of breed.

Aside from these basic gaits, horses can also use other gaits such as the pace, amble etc. These are not considered natural gaits, since they need to be trained for and are not as universally adopted by horses.

The walk, trot, canter and gallop are distinguished from each other on the basis of the sequence of the different feet of the horse touching and leaving the ground. This is because the feet touching the ground is an easily observable, measurable phe-nomenon. However, aside from the footfall, the nature of movement of the horse’s whole body, and the forces experienced by the rider during these different gaits are also significantly different.

The four gaits mentioned above can be distinguished on the basis of footfall as follows:

Walk

This is the slowest gait of a horse. As the name suggests, it most closely resembles the normal walking motion of humans in the nature of movement of the horse’s legs. It is the only gait in which all four legs of the horse are simultaneously on the ground, and there are always at least two legs of the horse touching the ground. A hind leg of the horse lifted and placed forward is always followed by the same foreleg being lifted and placed immediately afterwards. Thus, the sequence of footfall for a walking horse would be ‘Left hindleg-Left foreleg-Right hindleg-Right foreleg’. The walk, as with humans, is considered to be the most efficient mode of locomotion for the horse. It is a ‘four beat’ gait, meaning over one cycle of the horse’s legs performing the walk, four separate footfalls (or beats) can be heard. The different phases of the walk gait can be observed clearly in figure 3.

Trot

(14)

Figure 3: Phases in the walk [2]

legs is synchronised between two pairs of diagonal legs, which always move together. The trot also has intermediate phases of complete suspension, when none of the horse’s legs are touching the ground. As with human running, or with any kind of transportation method using stiff elements for motion, when a gait involves complete suspension, it will always result in a drastic increase in the vertical movement and inertia forces acting on the transported body. Although the footfall of the horse is always the same in this gait, the nature of its movement can be different in dif-ferent horses. This is not only because of the many biomechanical differences in different horses, but also because different horses use their legs in different roles. For instance, some horses travel most during the suspension phase. Thus they use their legs mainly for propelling their body forward. Others travel significantly by pulling with their legs on the floor, instead. As a result of variances such as these, the nature of movement observed or felt on a trotting horse can be different for each horse. Figure 4 shows the different phases of the trot.

Canter

The canter is a faster gait than the trot. It is a ‘three beat’ gait, in which one pair of diagonal legs of the horse move together, as one unit. The movement of the other two legs is not in sync. The diagonal pair represents the middle ‘beat’ in the cycle, which begins with the rear leg touching the ground. The phases of a canter are shown in figure 5. The canter, being faster, has a longer period of suspension (Phase 9) between two consecutive gait cycles.

Gallop

(15)

Figure 4: Phases in the trot [2]

Figure 5: Phases in the canter [2]

period of suspension of any of the horse’s gaits, and is also the fastest one. Con-sequently, it is also reasonable to assume that it has the most vertical movement as well, in order to sustain this high period of suspension. This means that the gallop would also have the highest inertia and impact forces acting on the horse and the rider. As seen in figure 6, the gallop has the most significant suspension phase (Phase 11) of the gaits discussed above.

(16)

Figure 6: Phases in the gallop [2]

on their footfall, there are various movements in the horse’s body which change with different gait pattern. One of these variations, as explained above, is due to the sus-pension period of the horse. Other sources of variation include lateral movement of the horse’s mid-region, in order to maintain balance, based on the configuration of the forces acting on the horse at the moment. These forces are determined among other things, by the position and number of supporting legs at the moment, the ve-locity and acceleration of the horse and in the case of a ridden horse, by the position and acceleration of the rider as well. The flexion of different muscle groups on the horse’s back and his legs causes variation in his physical profile as well, which is a further source of movement for the rider.

In short, the horse represents a very complex mechanically linked structure, which, in order to be represented with an inorganic structure would need to be simplified. More information on this simplification can be found further, in section 3.1.

2.2

Available Data for Trot Gait Analysis

(17)

was available for seven different horses. These horses have been referred to by their abbreviated names in this project, as CHA, GRA, LAS, LLA, PAL, RAM and SCH.

Figure 7: Test setup

It is important to note, however, that there are some differences between the horse’s kinematic behaviour while trotting on land and on a treadmill. These differences are supposed to be due to factors such as a lower air resistance, different behaviour of the rider, psychological adaptation by the horse etc [3]. It has been observed in previous studies that there was a difference in workload between the two cases which could be compensated with a 3.5% incline of the treadmill, or a 10% increase in speed [4]. However, this difference in behaviour of the horse has not been taken into consideration for the purpose of this project.

2.3

Available Horse Gait Simulator Designs

An extensive study of various devices currently available on the market was con-ducted during the background study phase of this project. Many different devices were found, which aim to recreate one or many of the horse’s gaits. However, it was observed that many of these devices provided only crude comparisons to an accurate horse’s gait. Some machines which provided more accuracy had very sophisticated designs. They also had very large interface equipment which made the machine very immobile.

2.4

Ball Screw Drive Modelling Methods

(18)

Figure 8: A typical ball screw drive composition [26]

are three different types of vibration modes: axial, rotational and flexural or lateral [5]. All of these three modes have to be investigated with respect to their influences on the transmission accuracy and precision in applications, such as high speed and high precision machine tools. In such a high-end application, the dynamics in all the three dimensions are essential for the development of sophisticated control strategies [6]. However, they are not all equally influential. Typically, the axial and rotational modes have demonstrated a dominant influence on the overall dynamics while the flexual mode’s influence is rather small [7]. So in most applications axial and rota-tional mode dynamics are often investigated more thoroughly. They are normally dictated by the geometry of the ball screw drive, specifically the diameter and the length of the shaft and their operating conditions. A typical frequency response of a ball screw drive is shown in figure 9 [6]. The frequencies f1 and f2 represent the

ax-ial resonant frequency and the rotational resonant frequency respectively with their values dependent on mechanical flexibilities, such as rigidity. These values dictate the closed loop bandwidth and tracking accuracy of the ball screw drive [9].

In the following subsections, the most frequently used modelling techniques, lumped modelling and hybrid modelling are presented.

2.4.1 Lumped modelling

The lumped element model simplifies the description of the behaviour of spatially distributed physical systems into a topology consisting of discrete entities that ap-proximate the behaviour of the distributed system under certain assumptions [27]. The torsional rigidity of the coupling is regarded as uniformly distributed and simply denoted as kcoupling, the axial rigidity of the fixed bearing as kbearing and the axial

rigidity of the nut as knut, which means the torsional rigidity of the coupling is

(19)

Figure 9: Typical frequency response of a ball screw drive

its length. The screw shaft is simply modelled as rigid with a rotary intertia Js,

mass ms, and pitch h which establishes the relation between the shaft’s rotational

movement and the nut’s linear movement. The model is as shown in figure 10. The

Figure 10: A ball screw drive lumped model[6].

(20)

krot =  1 kshaf trot + 1 kcoupling −1 kax=  1 kshaf tax + 1 kbearing −1 kshaf tax = πd2E 4lef f kshaf trot = Js(2fsπ) 2 fs = 1 4l s G ρ where:

E = Young modulus of the ball screw shaft (N/m2) d = Equivalent diameter (m) l = Total length (m) lef f = Effective length (m) Js = Rotational inertia (kgm2) G = Shear modulus (N/m2) ρ = Density (kg/m3) 2.4.2 Hybrid modelling

Hybrid modelling is a combination of lumped and distributed modelling. A mechan-ical system contains components with different mechanmechan-ical properties which have different magnitudes of impact on the overall dynamics. The choice of adopting a lumped model or a distributed model to represent each of the mechanical compo-nents is a tricky one. In the case of a ball screw drive, the ball screw is modelled in a distributed modelling fashion as a Timoshenko beam element [11] which recognizes the varying mechanical property of the ball screw at different positions along the ball screw. Other components like the coupling, bearing, and nut are modelled in a lumped modelling way. The torsional rigidity of the coupling is denoted as kcoupling,

the axial rigidity of the fixed bearing as kbearing and the axial rigidity of the nut as

knut as in the section 2.4.1. The Timoshenko beam element is modelled

mathemat-ically as in [11]:

Figure 11 shows the hybrid model graphically where krot and kax are the same

as in figure 10.

2.4.3 Friction modelling

(21)

Figure 11: A ball screw drive hybrid model [6].

nonlinear and dominant in system behaviours in some case that it has to be dealt with properly, otherwise it may cause steady state errors and continuous vibration, which deteriorate system’s performance. In the mechanical design stage, friction should be reduced as much as possible. The designed controller is supposed to be sufficiently robust to eliminate the friction effects. In the papers [16][33], fric-tion models were summarized comprehensively from static fricfric-tion models, such as the Coulomb friction model, Stiction friction, Viscous friction and a combination of these three to dynamic friction models such as the Dahl model and the Bristle model. Those model can be found in papers, so details are not given here. However a detailed description of a friction model called the General Static friction model is presented here.Figure 12 clearly expresses this model graphically.

(22)

F =    F (ν) if ν 6= 0 Fe if ν = 0 and |Fe| < Fs Fssgn(Fe) if ν = 0 and |Fe| ≥ Fs F (ν) = Fcsgn(ν) + (Fs− Fc)e−(ν/νs) δ sgn(ν) + kvν (N) where:

ν = Sliding velocity (m/sec) Fe = External Force (N )

Fs = Static (break away) friction force (N )

Fc= Coulomb friction force (N )

νs = Stribeck velocity (m/sec)

kv = Viscous friction coefficient (N/(m/sec))

Besides these already-established friction models, the friction model in specific ques-tion can actually be identified by utilizing the parameter identificaques-tion technique. In the paper [33], a friction observer was proposed to compensate for the actual friction. However in fact a friction model could be identified by analyzing the signal inputs and output of the friction observer block in figure 13. Since friction char-acteristics are highly dependent on a specific application and thus difficult to be captured by any available model, friction model parameter identification was a sug-gested technique to use if time was sufficient and control requirements were high.

Figure 13: Block diagram of the friction compensation based on a friction observer [33].

2.5

Ball Screw Drive Control Approaches

(23)

problems that controllers need to deal with include structural vibrations, unmodeled dynamics and external disturbances [12]. For the problem of structural vibrations, a notch filter was used to filter out the element of the control signal which may excite the vibrations [14]. A vibration suppression technique was also used to reduce the resonance by increasing the resonance frequency and decreasing the resonance am-plitude [16]. Sliding mode control is observed to be the most frequently used control approach to deal with the parameter variation and external disturbance problems. Feedforward control can be incorporated into the control structure to counteract disturbances such as friction if a good friction model can be achieved [15].

In applications without high requirements on system responses and positioning ac-curacy, a PID cascade control structure with feedforward control and disturbance observation and attenuation are often used [16]. In applications with high

require-Figure 14: Typical PID control structure with feedforward control and disturbance observer [16].

ments on system responses and positioning accuracy, for example high speed machine tools, sliding mode control has been proven effective and efficient. The basic idea is to drive the states onto a predefined sliding surface and then the states will be driven to the origin as illustrated in figure 15.

Pratical issues like chattering are the biggest drawback of the sliding mode control appraoch. The chattering phenomenon that can be observed in the sliding phase stems from the nature of the discontinuity of the control law due to the inclusion of a sign dependent term like sgn(s). In order to attenuate this problem, the disconti-nuity in the control law has to be removed. This is often done by replacing the term sgn(s) in the control law with a saturation function:

sat(s) = (

s/ρ, if |s| ≤ ρ sgn(s), if |s| >ρ

(24)

Figure 15: Sliding mode control principle [18].

(25)

3

DESIGN AND IMPLEMENTATION

This section describes in detail the process undertaken during the thesis project. It includes a description of the analysis and the resulting decisions made, as well as of the further mechanical and electronic design and software development performed to complete the project. It also describes the mathematical modelling and control algorithm development performed.

3.1

Horse’s Raw Data Analysis

As can be expected with any biomechanical motion, there are many different move-ments involved, each with variations based on different circumstances. The horses back moves vertically with each step(Z), and along the X-direction (front and back from the rider’s point of view). However, the rider also experiences Y-axis (left and right) translational movement, due to the horse’s back curving either way depend-ing on the position of its legs. Along with this, the hind legs, which are the horse’s real power source, also tend to tilt the horse’s hind (and hence the saddle) with each step, as one leg after the other is flexed and relaxed. The horse’s back also reacts to the weight of the rider himself, and would thus behave differently under such conditions as compared to when the horse was riding free. The relative motion between the front and back legs would also cause the horse’s back to rock back and forth, adding another angular motion which the saddle and rider would be subjected to. The convention adopted for the co-ordinate system, regarding all 6 degrees of freedom (3 translational and 3 rotational) is shown in figure 16. It should be noted that the motions studied below have been normalised, to neglect absolute offsets in co-ordinates. The origin of the co-ordinate system can thus be assumed to be at the centre of the horse’s back.

Apart from these motions, the impact forces of the horse’s hooves on the ground, and of the rider bouncing on its back, would create other movements as well, due to the flexibility of the horse’s physiology. Some of these movements may be significant if they concern contraction and relaxation of large muscle groups in the horse’s body. It was thus essential at an early stage to consider which movements of the horse were necessary to be recreated, in order to simulate a life-like riding experience. In other words, what was essential and what was superfluous?

The question of what is needed and what can be eliminated depends on which gait we are considering. This project deals with the trotting horse. It must be noted that significant additions or changes may be necessary before adapting the proposed design to other gaits.

(26)

stud-Figure 16: Co-ordinate system conventions for horse motion measurement ied at the ‘thoracic 13’ marker on the horse’s back. This is the 13th of the thoracic vertebrae, shown in figure 17, counted from the front. This marker was chosen for study because it most accurately represents the point on the horse’s spine directly below the rider, and would thus indicate the movement of the saddle as well. Ad-jacent markers have also been used where necessary, in order to evaluate angular motions.

Figure 18 shows the nature of the vertical motion of the thoracic 13 of one horse, (CHA). The amplitude of motion is observed to be roughly 100mm from crest to trough.

(27)

Figure 17: Horse anatomy overview

Figure 18: (CHA) thoracic 13 vertical displacement profile

Figure 19: (CHA) thoracic 13 horizontal (X) displacement profile the lower frequency disturbance.

(28)

Figure 20: (CHA) thoracic 13 (X) displacement profile, filtered

Figure 21: (CHA) thoracic 13 (Y) displacement profile

to study the angular motion of the saddle, about different axes. For this purpose, the thoracic 10 and thoracic 17 markers have also been used, as well as markers on the rider’s hips, from mounted tests. The angular motion of the saddle, as measured from this data, can be seen in figures 22 and 23. As can be seen from figure 22, the

(29)

Figure 23: (CHA) angle made by the saddle with the horizontal plane, about X axis the angle of the rider’s back, measured between the two femur markers (at the top of the thigh, near the hip) were used, to estimate the lateral angle of movement of the horse’s saddle. The variation in the pitch angle can be seen to be around 2 to 4 degrees, over the trot motion.

The same values and plots for seven different horses were studied, and it was con-cluded that although the different horses did indeed have their own unique styles of movement, which could be differentiated from one another, all showed consistent and similar types of motion. This can be best observed from the movement profiles of the thoracic 13 marker for different horses, as seen from the side. These profiles are shown in figure 24.

(30)

3.2

Degrees of Freedom Needed

The magnitude of movement observed along the different degrees of freedom is sum-marised in table 1. It can be seen that many of the movements are in fact of a much smaller magnitude as compared to the primary vertical (Z) and horizontal (X) movements. It is possible that some of these movements (for instance, the angu-lar motion of the saddle in the X-plane) would be very significant for other gaits. However, as far as the trot is concerned, from the data shown here, one can say that the primary movements to be recreated are the vertical (Z) and horizontal (X) translation of the horse’s saddle.

Direction/Sense Magnitude of Motion X 35 mm

Y 10 mm Z 100 mm ωx 2◦

ωy 5◦

Table 1: Movement ranges in trot gait

Hence, an initial prototype was aimed for, which would have two degrees of freedom, one vertical and one horizontal.

For such a 2 DOF prototype, the profile of motion required from the saddle would thus be similar to the profile curves shown in figure 24.

3.3

Trajectory Design

This section describes the procedure and results of trajectory design, to obtain suit-able trajectories to imitate the horse’s movement.

3.3.1 Trajectory function estimation

Initial simulations used for motor selection were carried out using sine wave trajec-tories, as these were judged to be quite similar to the movement of the thoracic 13, especially in the vertical direction.

(31)

as in equation (3.3.1.1):

y = a0+ a1cos(ωt) + b1sin(ωt) (3.3.1.1)

Where

ω = angular velocity of periodic motion (rad/sec) t = time (sec)

A function of the above form fits the vertical profile of the horse motion well, as can be seen in figure 25

Figure 25: Vertical motion profile and fit curve for (LAS) over one gait cycle The constants a0, a1 and b1 would thus define the simulated vertical motion profile,

for a given frequency.

As an example, for figure 25, the function obtained had coefficients as shown in table 2: The horizontal motion of the horse was observed to be more irregular, and

Table 2: Vertical fourier coefficient examples a0 a1 b1 ω

V alues 1495 -33.22 23.4 15.71

was greater affected by the changing instantaneous velocity and acceleration of the horse, during different phases of the trot. From experimental data, through trial and error, it was observed that a third degree Fourier curve was sufficient to represent this horizontal motion with acceptable accuracy. The horizontal motion would thus be represented as in equation (3.3.1.2):

x = (a0+ a1cos(ωt) + b1sin(ωt) + a2cos(2ωt) + b2sin(2ωt)

+a3cos(3ωt) + b3sin(3ωt))

(32)

figure 26

Figure 26: Horizontal motion profile and fit curve for (LAS) over one gait cycle

The coefficients obtained in the example curve shown in figure 26 are shown in table 3. In both profiles, a0 would represent the mean value of the displacement.

Table 3: Horizontal fourier coefficient examples

a0 a1 b1 a2 b2 a3 b3 ω

V alues 669 -14.81 -2.657 -3.407 0.1458 0.7208 0.3544 15.13

That is, it would represent the distance of the point of measurement from the ref-erence origin. In our case, therefore, it can be said that a0 = 0, since we are only

concerned with the nature of movement of the horse, and not its absolute position. The example curves shown above can be plotted against each other over time, to give a two dimensional motion profile. However, it is important to note that when considering both curves together, it is necessary to use a single frequency of motion for both degrees of translation, in order to get a regularly repeating curve with each cycle of the gait. In this case, a frequency of 15 rad/sec has been used. The obtained motion profile is shown in figure 27

This profile compares favourably with the filtered profile obtained from our original data for the same horse (LAS), shown in figure 28

3.3.2 Additional instability in trot functions

(33)

Figure 27: Thoracic 13 profile for (LAS) from fit curves

Figure 28: Thoracic 13 profile for (LAS) from real data

This random instability was introduced by adding a sine wave of random frequency and amplitude, limited by fixed bounds to ensure realistic values. This random in-stability variable can be considered to represent irregularities in the horse’s motion, as well as in the ground profile on which an imaginary horse would be trotting. This instability is not truly random in our case, as it is simply a periodic motion with a frequency differing greatly from the motion profile frequency. The addition of this ‘instability term’ in the calculated trajectories can be observed in figure 29, which shows the new horizontal profile of the same horse (LAS) over a longer period of time:

3.3.3 Ramped trajectory amplitude for smooth transition

Another factor to be considered during trajectory design was the start and stop phases of the trajectories. If the trajectory were to start immediately at its original amplitude, it would not only be an inaccurate representation of a horse’s movement, but more importantly, would be a possible source of injury for the rider.

(34)

Figure 29: Generated horizontal profile with added instability

at start up. It ramps down with a similar second order amplitude gain curve when stopping. These curves are obtained from constant ‘acceleration’ phases calculated to reach a gain of unity after a start-up phase of 3 seconds. Here acceleration refers to the second order rate of change of the amplitude gain. This time period of 3 seconds is based on estimation of the time taken for a horse’s acceleration to its normal speed. The gain profile curves are observed to be as shown in figure 30.

Figure 30: Gain profile for Fourier functions

This gain is then applied to the Fourier series functions for the profile trajectories, which are now represented as in equations (3.3.3.1) and (3.3.3.2):

Vertical displacement:

(35)

Horizontal displacement:

x = a0+ G (a1cos(ωt) + b1sin(ωt) + a2cos(2ωt) + b2sin(2ωt)

+a3cos(3ωt) + b3sin(3ωt))

(3.3.3.2)

Where G = Variable gain for trajectory functions

Applying this variable gain to the motion profile gives us a smooth varying move-ment profile, during starting and stopping of the movemove-ment, which can be observed in figures 31 and 32:

Figure 31: Ramped starting profile for generated trajectories

Figure 32: Ramped stopping profile for generated trajectories

3.3.4 Random horse trot generator

(36)

profiles. Although these profiles follow a very similar pattern, they cannot be said to be identical, as each horse does have its own unique motion. This uniqueness has been attempted to be represented in the mathematically modelled horse trot trajectories, using a statistical analysis of the trajectories observed from the data available on seven different horses.

A trajectory database was created, fitting mathematical functions as described above to different horses, at different time intervals during the gait cycle. Even the same horse would have varying functions, when fitted at different instants of data. This is because a horse would not move in exactly the same manner over time, and would experience slight variations. Based on these fitted trajectory functions, the mean and standard deviation of the different constant co-efficients of the two Fourier functions were obtained. These were then used to generate random Fourier functions with slight variations from those obtained from the available data. This would theoreti-cally result in the generation of a new ‘horse’ every time a trajectory was generated, giving the horse simulator more life-like performance characteristics.

It should be noted that there were some fitted functions which showed vastly different constant co-efficients but exhibited similar performance over one step of the horse. All these functions were not considered when obtaining the mean and standard de-viation for the co-efficients. Although this meant that some data was excluded in the final random horse profile generation algorithm, it ensured more life-like results, due to elimination of erratic variation in the co-efficient values. This was equivalent to manually limiting the observed standard deviation in observed co-efficient values, to a reasonable amount.

Samples of randomly generated horse profiles, using the models built as described above, are shown in the figure 33:

(37)

3.4

Mechanical Design and Fabrication

This section of the report deals with describing the mechanical hardware used in the AHGS prototype. The prototype, as explained in section 3.1, deals with motion in two degrees of freedom, along the X and Z axes, as represented in the co-ordinate system shown in figure 16, section 3.1. As established in the same section, the proto-type design was desired to have a range of movement to accomodate a displacement of 100 mm (Z) and 35 mm (X). The power required for the actuation along these two axes was found to be 1.7 kW (Z) and 700 W (X). The power requirement calculation process has been described in section 3.5. The hardware layout and assembly can be seen in figure 34 below.

Figure 34: Mechanical structure of AHGS chair

(38)

3.4.1 Vertical motion

The vertical motion components and their functionality have been highlighted in figure 35.

Figure 35: Z-direction motion in the AHGS

According to the colour scheme in figure 35, the vertical ball screw nut (blue) is flanged, and is connected to the nut plate (transparent blue), which supports the saddle structure. The saddle structure (brass) consists of support beams connected to this Nut Plate. Stationary beams (grey) pass through the nut plate, with guide rails (violet) connecting them. These stationary columns prevent the nut plate and the nut from rotating with the screw. The guide rails do not carry any load other than the normal force from the torque on the nut. Miniature rails with sufficient load bearing capacity have been selected. The vertical screw is connected to its ac-tuating motor (black) throught a bevel gearbox (dark grey) and a co-axial coupling (cyan). The gearbox and coupling have been represented only by their outermost dimensions, for design purposes.

The entire vertical ball screw, nut, support beams and saddle assembly is responsible for one degree of freedom, in the Z direction.

3.4.2 Horizontal motion

The horizontal motion components and their functionality have been highlighted in figure 36.

(39)

Figure 36: X-direction motion in the AHGS and the rider in the X direction, controlled by another ball screw.

The horizontal screw nut (blue) is also flanged, and connected to its own nut plate (green). This plate is connected to the base plate for the Z direction motion assem-bly (brass), in order to transfer force and motion from the nut to the assemassem-bly. The dimensions of the mechanical structure were designed based on the range of motion required, the frequency of the motion as ascertained in section 3.1 and the load bearing capacity and stress acting on the structural components. The structure is made of aluminium sheet metal. Aluminium was used because of its low weight, low cost and easy availability, which made it the ideal material for prototyping with. The load bearing support beams are 15 mm thick, while components not subjected to higher load are 10 mm thick. The support beams are made from two sheet metal components, to have a ‘T’ cross section which enables them to withstand higher mo-ments along either the X or Y axes. The stress analysis of the forces acting on the different components of the structure and the selection parameters and considera-tions for the guide rails, ball screws and couplings can be seen in appendices A and B.

3.5

Actuator Power Estimation

This section documents the calculations undergone to estimate the power require-ments of the motors needed to actuate the mechanical structure of the AHGS, de-scribed in section 3.4.

(40)

From the data described in Section 2.2, obtained from Prof. Lars Roepstorff, the frequency of the motion was estimated to be around 2.4 Hz. The torque required to produce the required force to accelerate the saddle and rider was calculated as follows:

The efficiency of power transmission of the ball screw [28] is given by: η = 1

1 + πd0

Phµ

(3.5.0.1)

Where

µ = friction constant, depending on material and type of ball screw and nut (In our case 0.006)

d0 = nominal diameter of screw shaft (m)

Ph = lead of screw (m)

The practical efficiency can then be further calculated as:

ηp = 0.9η (3.5.0.2)

The nominal torque while accelerating the ball-screw nut for a vertical screw is given by: Ttotal = Tf + Tpr+ Ph[F + mLµfg] 2000πηp + ˙ωΣI (3.5.0.3) Where

Tf = Torque from friction in support bearings, motors, seals etc. (Nm)

Tpr = Preload torque (In our case, 0) (Nm)

F = load (N)

mL= mass of the load (kg)

˙

ω = angular acceleration (rad/sec2)

ΣI = IM + IL+ ISl10−9

IM = Inertia of motor (kgm2)

IS = Inertia of screw shaft per metre (kgmm2/m)

l = length of the screw shaft (m)

Similarly, the nominal torque for a horizontal screw is given by: Ttotal = Tf + Tpr+

Ph[F + mLg]

2000πηp

+ ˙ωΣI (3.5.0.4)

(41)

Vertical ball screw parameters: Length of screw = 200 mm

Pitch (Lead) = 25 mm

Nominal diameter of screw shaft = 25 mm Mass of load = 100 kg

Horizontal ball screw parameters: Length of screw = 150 mm

Pitch (Lead) = 10 mm

Nominal diameter of screw shaft = 16 mm Mass of load = 150 kg

Since the gear ratio for the selected bevel gear for the vertical movement power train is 1:1, and the horizontal movement motor is co-axially connected to its ball screw, the torque received by the screw and the torque supplied by the motor are equal, aside from losses incurred by the real world efficiency of the transmission components.

Once the forces needed over the duration of the trot cycle were quantified, the torque profile over the trot cycle was calculated, from Equations (3.5.0.1), (3.5.0.2), (3.5.0.3) and (3.5.0.4) stated above, taking into consideration the efficiency of the transmission elements and motors as well. This torque profile was used to evaluate the RMS torque requirement for the motion.

Based on these calculations, the power requirement of the vertical and horizontal actuators was calculated to be 1.7 kW and 700 W respectively.

3.6

Electrical Actuator Selection

The choice of actuators to use for the chair was a critical point of the design process. Various options were considered, before finalising a suitable set of actuators for the prototype. These options and their relative advantages and disadvantages are listed below:

(42)

Brushless DC Motors: Similar to the brushed DC motors, brushless DC motors also proved to present a difficult choice, for similar reasons. Although the rotor inertia for brushless motors was lower than the corresponding brushed motors, it was still a problem to select suitable actuators which would be able to respond with high enough dynamics for the required application. Aside from this drawback, the current requirement for the actuators considered was also high for such a power output, and a suitable driver circuit to supply the required current turned out to be prohibitively expensive.

AC permanent magnet synchronous motor: An AC PMSM would have significantly lower rotor inertia than the DC alternatives. As another result of this constructional advantage, they would also have a smaller size and weight compared to the earlier alternatives. However, such motors would require more complicated control, as they would require a variable frequency drive, controlling the inverter switching to supply voltage to the stator coils. Many PMSM providers also supplied their own compatible VFDs to run the motor. However, these were seen to be con-siderably expensive, and would have to be integrated with a higher level controller if necessary, to facilitate the required motion control applications.

Hydraulic/Pneumatic actuators: Hydraulic actuators were considered for the application at hand. However, hydraulic or pneumatic actuators would require a compressor/pump to provide the necessary high pressure working material which was not easily available. Pneumatics would not easily be able to satisfy the force and power requirements, whereas hydraulics would have been a very low efficiency choice, especially for the horizontal motion actuation which required much less force than the vertical motion.

Chosen actuators: Based on the above factors and considerations, it was finally decided to implement the AHGS chair using AC permanent magnet synchronous mo-tors. The motors and the corresponding control drives selected have been described in the following section.

3.7

Hardware Implementation

(43)

Figure 37: All hardware components used in this project 3.7.1 Electronics board

As shown in figure 37 the eletronics board has connections with all the other four components for the purposes of adapting and transfering signals from or to those components. In this section an electronics board design and implementation is shown. It provides the mechanical and electrical interfaces to other components. In the electronics design, electrical properties of the interfaces on each component should be observed, for instance, input and output voltage level, high or low voltage level thresholds, current consumptions, and serial communication interface stan-dards particularly for encoder signals, in this case, RS422. This information can be easily tracked in the components’ datasheets, catalogs or manuals. The main electronic components used in this design are simple ones: capacitors, resistors, transistors, LEDs, and pins. The design was performed in CadSoft/EAGLE® and the schematics of the electronics design is shown in figure 38.

3.7.2 AC drive system

This section describes the AC drive system used to drive the designed mechanical structure. It includes a description of the components as well as of the installation and commissioning process.

Drive system composition:

(44)

Figure 38: Detailed electronics design for signal interfaces among dSPACE hardware, HMI, Drive system, and Limit switches

1. Terminal Modules: They particularly provide two analog input ports, used for interfacing the torque setpoint computed in the high-level controller with the drive system and two RS422 interfaces outputting TTL incremental encoder signals back to the high-level controller to form the feedback loop. In addition, they have extended digital input and output interfaces.

2. Control Unit: This module is designed especially for multi-axis operation and is in charge of communication among modules and the current loop control for motors. It is the central control of the drive system. Inside this unit, a CompactFlash card is inserted. It contains the firmware and allows system commissioning by means of provided software called STARTER. On this unit, a Basic Operator Panel is snapped, which provides an interface for the operator to observe and change the values of concerned parameters.

3. Smart Line Module: It is in effect a converter, converting 3 three phase AC power to adjustable DC voltage. It is able to work in infeed mode or regener-ative mode.

(45)

Figure 39: Photograph of Siemens AC 3 phases synchronous motors drive system

Figure 40: Photograph of AC 3 phases synchronous motors and heat-dissipating resistor

varying voltage level and frequency with values dependent on the speed and torque required by the high-level controller.

5. Control Supply Module: It supplies 24V DC voltage for electronic circuits in the drive system to work properly.

6. Braking Module: This module monitors the DC link voltage. If the regener-ative feedback function of the smart line module is deactivated and the DC link voltage becomes larger than the threshold voltage of 710V, it renders continuous energy dissipation through the resistor shown in figure 40.

(46)

system when the smart line module works in regenerative mode.

8. Line filter: It prevents conducted electromagnetic interferences, which may be caused by equipment on the same power supply network, from entering the drive system.

9. Circuit breaker: This is a safety component with an adjustable break-current. It cuts off the power supply when the current conducted through rises over the threshold current.

10. Line contact: In essence, it is a relay which allows the operator to safely switch on or off the potentially dangerous high voltage from the 380V AC power supply by switching on or off a DC 24V circuit during normal operation or under emergency circumstances.

11. Main switch: It is used to switch on or off the 380V 3 phase AC power supply. 12. Miscellaneous parts: These include two power cables with quick connectors, two encoder signal cables and DRIVE-CLiQ signal cables dedicated for com-munication among modules in the drive system.

Important features of SINAMICS S120:

ˆ Easily integrated with a high-level controller for motion control; ˆ Modular design, facilitating scalability and flexibility;

ˆ Easy sizing and friendly commissioning tools. Drive system electrical installation:

A drawing showing how these components are electrically wired is placed in Ap-pendix C. Figure 41 shows all the AC drive system’s signals which are interfaced with external hardware components, specifically the electronics board.

Drive system commissioning:

(47)

Figure 41: AC drive system signal interfaces with external hardware components

Figure 42: The topology of the modules on DRIVE-CLiQ cables

(48)

Figure 44: Specify the torque setpoint signal sources

(49)

Figure 46: dSPACE DS1104 R&D controller board and its connectors 3.7.3 DS1104 R&D controller board

In this thesis, the DS1104 R&D controller board shown in figure 46 is the hardware platform for implementations of the following functions (functions are designed in Matlab/Simulink® environment):

ˆ Event-triggered control (state-flow chart) ˆ Trajectory generator (lines of codes) ˆ Position Calibration (lines of codes)

ˆ Controller for trajectory following (lines of codes)

Since the control system is implemented on the controller board, almost all signals are eventually transfered via the electronics board to the controller board. An I/O layout from the controller board point of view is provided here in figure 47.

3.7.4 HMI and limit switches

In this section, the design of the last two harware components, HMI and a set of limit switches is covered. As shown in figure 48, an HMI consists of four buttons, START, STOP, EMSTOP, ACK, used for functions like starting the machine, stopping the machine in a normal operation, stopping the machine in an emergency situation and acknowledging possible faults appearing in emergency situations. This hardware component offers a means of interaction between the machine operator and the ma-chine. In figure 38, how the four buttons are connected with the electronics board can be easily reconized.

(50)

Figure 47: Detailed signal connections among dSPACE hardware, HMI, Drive sys-tem, and Limit switches from the point of view dSPACE hardware

Figure 48: HMI consisting of four buttons

(51)

that is, emergency stop. As said above, in this case, the fault has to be removed and acknowledged in order to restart the machine. The limit switches used in this project are reused components. They are called photomicrosensor or slotted in-terrupter relying on the internal phototransistor detector. They were produced by two companies, therefore in figure 49 two schematics are presented here. So far,

Figure 49: Limit Switch Schematics

the five hardware components design or/and their electrical interfaces design have been covered. The figure 50 shows the architecture of the five hardware compo-nents represented by five green boxes in the figure and reveals the relations between those components. As in figure 37, the electronics board is at the centre of this architecture, which indicates that all signals go through the electronics board to their destinations. A real hardware components implementation result is included in section 4.2.

3.8

System Modelling

The system features both event-triggered system behaviour changes and continuous motion dynamics in the time domain. Events like pressing the buttons and toggling switches cause the system to jump from one state to another. In different states, the system behaviour varies to a significant extent. The system behaviour modelling aims at clearly presenting the implicit logical relations among those behaviours. Modelling in Matlab/Stateflow Chart is one good approach to do this. System dynamics modelling aims to capture how the system behaves with respect to time when given a certain input, for example a torque step. Usually the changes of the system’s state variables, for instance speed and position, with respect to time can be described fairly accurately in a mathematical way. This section deals with system behaviour modelling and system dynamics modelling.

3.8.1 System behaviour modelling

(52)

Figure 50: Detailed interfaces among dSPACE hardware, HMI, Drive system, and Limit switches

further illustration is necessary to make it more comprehensible.

(53)

When the machine is powered on, and both main power (3 phase 380V) and electron-ics working power (24V) are switched on for the AC drive system and the dSPACE Controller Board is working, the system immediately enters the state “Standby1”, which means the machine is ready to go and awaiting further commands. Trigger-ing the event “start” by pressTrigger-ing the button “start” moves the system to the state “Calibrate” where the motors drive the saddle to its origin or home position, mean-ing that both nuts on the screws are in the middle position of the screw, that is half stroke away from either end of the screws respectively. A “ready” signal would be sent from the system itself to move the system on to the “Standby2” state upon completion of the calibration process. Pushing “start” again, ramps up the trot gait. At this stage, if the “stop” button was pushed, the system would enter “Stop” state, and the trot of the AHGS would be ramped down. After 10 seconds, it automatically returns to “Standby2” state, from which the machine can be started running again without calibration first if the “start” button is pressed. In the state “Standby2” all control loops are still working and the position of the nuts are maintained at their home positions. If instead the “emstop” button was pressed, the system would transition to the “EmergencyStop” state and the movement of the AHGS would be stopped immediately. In addition, for safety reasons, four limit switches installed at both ends of the two screws could be the sources of the event as well, trigger-ing the system into the “EmergencyStop” state. The “acknowledge” button has to be pressed in order to move the system back to the “Standby1” state. The final designed system behaviour model is as shown in figure 51.

3.8.2 System dynamics modelling

The system dynamics modelling aims to formulate the causes of the motion and the changes in the motion mathematically. In this section mechanical system dynamics modelling including kinematics will be handled. To a great extent, the kinematics depends on the mechanical system’s mechanism and dynamics is dictated by both mechanism and the nature of the system for instance the stiffness and the damping ratio. Figure 52 depicts the mechanical structure in question.

Figure 52: Mechanical structure representation [7].

The mechanical structure analysis:

(54)

screws and nuts, couplings, bearings, guide-rails and a workbench for bearing the load. The stiffness of the material of these components and viscous effects in their relative movements result in mechanical flexibilities. Mechanical design could have a great impact on the total stiffness and damping ratio of the whole mechanical sys-tem. In this mechanical design, the following should be kept in mind when modelling and later designing the controller.

1. Rigidity is not well guaranteed. In the mechanical design, the screw shaft is mounted in a fixed-to-simple way. That means one end of the ball screw is rigidly mounted with respect to both axial and radial loads (fixed) while the other is rigidly mounted only with respect to radial loads (simple). This mounting method features degraded rigidity, but it reduces the average stress which the shaft may be subject to due to time-varying load and thermal ex-pansion effects.

2. The nut bears not only the axial force but also some effective radial force and moment. For the ball-screw application, in principle the nut should be pre-vented from any radial or bending load, because they will significantly reduce its life. For the horizontal movement, the nut is supposed to transmit only axial acceleration force and the force overcoming friction; and for the vertical movement, besides these two types of forces, the nut also bears all the weight of the load. The guide rail is supposed to be subject to the aforementioned radial and moment load. However, in practice the misalignment between the nut and the table or guide rail and the flexible connection between the nut and the table would contribute together to the introduction of unexpected forces or moments.

However, apart from these effects, there are possibly a great number of factors which may unfavourably affect the mechanical system. Estimating these influences on the modelling accuracy is a very complicated process. These factors are reflected in the movement errors in three dimensions, namely lateral, axial and torsional [10]. Several modelling methods are described in section 2, which consider some of these factors. For a ball screw drive in this application, the lateral force is quite small and axial force and torsional torque are the two main sources contributing to the axial errors.

ˆ Torsional stiffness gives rise to angular difference which further produces axial displacement error with its value dictated by the screw pitch.

ˆ Elongation of the shaft as a result of external axial load and thermal expansion contributes to the axial error as well.

Those effects are well illustrated in the figure 53. where:

Tm = System controlled input, representing motor torque, N m;

Tl = Driving torque on load, N m;

(55)

Figure 53: Error sources ∆x = Axial strain (deformation), m;

∆θ = torsional deformation, rad.

Lumped modelling without non-linearity:

In section 2, many kinds of ball screw modeling techniques are summarized. In this application, only torque is considered and a lumped model will be built since the stroke of the screw is comparably short in terms of the error accumulation rate along the screw and low precision requirements are imposed on the recreation of the gait. The dynamics of the system including the motor in this application are modeled as a lumped two-mass system connected by a spring and a damper. The spring and damper effects originate from mechanical flexibilities which have been explained above. The two-mass system model is depicted in figure 54. However, for simplicity sake the two-mass system modelling includes neither any non-linearity element such as instance friction nor any possible dynamic load disturbance and system parameter variation with respect to time. A friction model will be built later and model uncertainty and external disturbances will be handled when the controller is designed in the section 3.9.1.

Figure 54: Two-mass system model where:

Jmotor = motor inertia (kgm2)

Jload = load inertia on the motor side (kgm2)

Tm = System controlled input, representing motor output torque (N m)

Tl= Driving torque on load (N m)

Tld = Equivalent torque of load disturbance (N m)

ωm = Motor shaft speed (rad/sec)

θm = Motor shaft position (rad)

(56)

θl= Load equivalent rotation position (rad)

ks= Flexible connection stiffness (N m/rad)

bs= Viscous damping friction coefficient (N m/(rad/sec))

∆θ = Torsional angular difference (rad)

The whole system can be divided into three parts as in equations (3.8.2.1), (3.8.2.2), (3.8.2.3) and (3.8.2.4). G1 = 1 Jss + Kd (3.8.2.1) G2 = 1 + 2ζa/ωas + 1/ω2as2 1 + 2ζr/ωrs + 1/ωr2s2 (3.8.2.2) G3 = 1 + 2ζa/ωas 1 + 2ζa/ωas + 1/ω2as2 (3.8.2.3) G = G1G2G3 (3.8.2.4) where:

Js is the sum of the motor inertial and the load inertial on the motor side (kgm2)

Kd is the damping constant of the motor (N m/(rad/sec))

ωr and ωa are the resonant and anti-resonant frequencies of the system;

ζr and ζa are the relative damping coefficients of the mechanical system.

ωr= s ks Jload  1 + Jload Jmotor  ωa= r ks Jload ζr = s b2 s 4ksJload  1 + Jload Jmotor  ζa = s b2 s 4ksJload where:

ks is the total torsional stiffness of the mechanical complex;

bs is the total viscous damping of mechanical complex;

It can be observed that the natural resonance frequency depends on the system’s total stiffness, motor inertia and load inertia.

The physical meaning of these four transfer functions can be interpreted as follows: G1 can be interpreted as the transfer function from the input torque to the ideal

speeds of both the motor and the load with the assumption that the connec-tion between them is totally rigid without any flexible elements. Under this assumption, the motor and the load share the same speed;

G2 can be interpreted as the transfer function from the ideal motor speed to the

(57)

G3 can be interpreted as a transfer function from the actual motor speed to the

actual load speed, taking the flexibile connection into consideration;

G thus represents the transfer function from input torque to actual load speed in reality.

The figures 55, 56, 57, and 58 show the bode diagrams for transfer functions from torque to motor speed and from torque to load speed.

From the bode diagram, the natural resonance frequency for the vertical movement is around 300Hz and for the horizontal movement is around 800Hz. The values of some important parameters are in table 4.

Table 4: The parameter estimates of the stationary motor model Direction Jm Kt Kd Jl ks bs

Horizontal 0.00032 1.86 0.0006 0.00032 180 0.006 V ertical 0.00122 2.83 0.004 0.0039 110 0.002

Table 5: The parameter estimates of the stationary motor model Direction ωr ωa ζr ζa

Horizontal 788.15 555.6 0.0079 0.0056 V ertical 327.8 159.62 0.0033 0.0016

Friction model:

(58)

Figure 55: Bode diagram for transfer function from input torque to motor speed as output, vertical movement.

(59)

Figure 57: Bode diagram for transfer function from input torque to motor speed as output, horizontal movement.

(60)

accurate values has to be acquired by performing a parameter identification process. Due to the limited time, this work was not carried out in this project. Instead, in simulation larger than usual values were used for the friction model to evaluate the robustness of the designed controller against load disturbance.

Table 6: The parameter estimates of the stationary motor model Direction Fs Fc kv vs σ

Horizontal 60 50 0.006 30 1.5 V ertical 40 30 0.001 35 1.5

The friction model is not included in the system transfer function for the controller algorithm design, but is included in the simulation model as in figure 59 when the controller performance was examined.

Figure 59: Dynamics model of the to-be-controlled ball screw drive system.

3.9

Control Design and Simulation

In section 3.8, the designed mechanical structure analysis was presented, error sources were investigated and a dyamic model of the system was constructed. In this section a controller algorithm design and implementation in Matlab/Simulink and the integrated system model including the user inputs which simulate the event occurence sequences, system behaviour, trajectory generation, controller and the to-be-controlled process i.e. system dynamics will be presented.

3.9.1 Controller algorithm design

References

Related documents

Industrial Emissions Directive, supplemented by horizontal legislation (e.g., Framework Directives on Waste and Water, Emissions Trading System, etc) and guidance on operating

46 Konkreta exempel skulle kunna vara främjandeinsatser för affärsänglar/affärsängelnätverk, skapa arenor där aktörer från utbuds- och efterfrågesidan kan mötas eller

The increasing availability of data and attention to services has increased the understanding of the contribution of services to innovation and productivity in

Parallellmarknader innebär dock inte en drivkraft för en grön omställning Ökad andel direktförsäljning räddar många lokala producenter och kan tyckas utgöra en drivkraft

I dag uppgår denna del av befolkningen till knappt 4 200 personer och år 2030 beräknas det finnas drygt 4 800 personer i Gällivare kommun som är 65 år eller äldre i

Det har inte varit möjligt att skapa en tydlig överblick över hur FoI-verksamheten på Energimyndigheten bidrar till målet, det vill säga hur målen påverkar resursprioriteringar

Detta projekt utvecklar policymixen för strategin Smart industri (Näringsdepartementet, 2016a). En av anledningarna till en stark avgränsning är att analysen bygger på djupa

&#34;Body is an Experiment of the Mind&#34; is an intimation of corporeality; a thought that describes the self as a socially and environmentally vulnerable concept of body and