Keywords: . . . . . . . . . . . . . . . . . . . Modeling, Hysteresis, Port-Hamiltonian, Thermodynamics, smart materials

aux MSMA. L'originalité consiste en la prise en compte l'hystérésis lors de la commande par passivation. Une première loi de commande est proposée et ouvre de nombreuses perspectives pour la commande des matériaux actifs hystérétiques.

5.3.3

Magnetic Levitation Example . . . . . . . . . . . . . .

A PhD thesis is never an easy endeavor. Particularly this one would have been impossible without my 2 supervisors-Professor Yann Le Gorrec and Mr Arnaud Hubert. I thank them with all my heart for bearing with me when I was being stubborn, for encouraging me when I lost hope, for guiding me when I was clueless and more importantly for treating me as a friend and sometimes almost as a son. They rst of all deserve all my gratitude.

Secondly, I wish to thank the lovely people whom I have had the pleasure of meeting during the course of my PhD years. Some became good friends, others mere acquaintances but they all helped to make life easier. Worth mentioning among them are Baptiste Véron and Hectór Ramirez. Baptiste for a myriad of things (being my chaueur, teaching me how to swim, bringing my keys when I would forget them, encourage me when I was hopeless) among which the most important is how a good human being should be.

And Hectór for showing me how a human being should not be (Hectór if you ever read this, I love you). Also, I would like to thank Amélie Cot, Naresh Marturi and Margot Billot for tolerating my singing in the oce.

Thirdly, I would like to thank all the people of AS2M department for their welcome and constant warmth and friendship throughout my stay. Particularly I would like to thank Mr Michael Gauthier for his help during the last months of the thesis. Also, I would like to thank the CNRS and the french taxpayers without whose money this thesis would have been impossible.

Last but not least, I thank my parents for always pushing me to aspire for more. At great sacrice to themselves they gave my brother and me a good education and they made sure we never miss anything. This thesis is theirs as much as it is mine. i Résumé Dans cette thèse on s'intéresse à la modélisation et la commande d'un système micro-mécatronique à base de matériau actif appelé Alliage à Mémoire de Forme Magnétique (AMFM). La principale propriété de ce matériau est sa déformation sous l'action d'un champ magnétique ou d'une contrainte, avec des plages importantes de déformation le rendant intéressant d'un point de vue applicatif par rapport à ses homologues tels que les actionneurs piézoélectriques. Le matériau étant fortement dissipatif et hystérétique, une fois déformé par une stimulation externe, il ne revient pas à sa position initiale. C'est la raison pour laquelle il est principalement utilisé dans des congurations de type push-pull. Comme pour tout matériau actif, les champs d'application des AMFM sont très divers et on peut en particulier les utiliser comme actionneurs pour des déplacements à l'échelle millimétrique. Comme ils réagissent à la fois à une contrainte et à une déformation, ils peuvent être utilisés comme capteur de force, capteur de position et pour mesurer des champs magnétiques. Etant fortement dissipatifs, ils peuvent aussi être utilisés comme amortisseur pour le contrôle de vibrations. Enn il peuvent être utilisés comme transformateurs d'énergie dans le cadre de problématiques de récupération d'énergie. Pour toutes ces applications, il est nécessaire d'avoir un modèle précis du comportement dynamique du matériau pour pouvoir l'utiliser de manière optimale.

Etant donnés leur aspect multiphysique, leur structure cristalline complexe, leur caractère irréversible et non linéaire, la modélisation de ces matériaux reste un sujet de recherche ouvert. Dans la littérature, des modèles basés sur la thermodynamique irréversibles sont proposés. Ces modèles arrivent à prédire le comportement du matériau en mode quasi-statique. Malheureusement pour être précis et able comme actionneur il faut prendre en compte la dynamique. C'est dans ce domaine que cette thèse apporte toute sa contribution.

Une première partie de la thèse porte sur l'amélioration d'un modèle préexistant du MSMA et de l'actionneur.

Ce modèle inspiré d'une approche mécanicienne, repose sur un choix exhaustif des variables d'état et l'utilisation de contraintes algébriques associées à l'utilisation de multiplicateurs de Lagrange. L'approche Hamiltonienne généralisé proposé dans cette thèse a permis de réduire le nombre d'état et un changement approprié de iii variables a permis de projeter la solution sur un espace réduit aboutissant à un modèle sans contrainte algébrique et de dimension réduite. La cohérence thermodynamique et des problèmes de causalité liés au choix des variables manipulées (manipulables) et à l'aspect électro-magnéto-mécanique du système nous ont poussé à reprendre entièrement le modèle proposé.

La deuxième partie du travail a donc consisté à utiliser le formalisme de Hamiltonien à ports basé sur la thermodynamique pour proposer un modèle thermodynamiquement cohérent liant la dynamique du matériau et son énergie interne, en incluant les problématiques d'hystérésis par l'ajout de variables internes. Ce modèle est ensuite connecté au circuit électrique de l'actionneur par le biais des variables de port d'interaction, et ce de manière naturelle dans le cadre des systèmes Hamiltonien à ports, la partie électrique de l'actionneur étant modélisé de manière minimale. Ce modèle a été validé en simulation et confronté aux résultats expérimentaux issus de l'actionneur mis en oeuvre dans le cadre de la thèse.

La troisième partie de la thèse porte sur une première approche de commande de l'actionneur par le biais de techniques de type IDA-PBC. Pour cela nous nous sommes inspirés de la commande des systèmes de type lévitation magnétique qui présentent un couplage électro-magnétique assez similaire Contents Variation of α, θ with applied H 0 . . . . . . . . . . . . . . . .

3.7

Magnetization for dierent values of z. Dotted line shows a possible magnetization curve of the material as z changes. Solid lines show magnetization at constant z. . . . . . . . . .

3.8

Energy and Co-energy for Magnetic part of MSMA. . . . . . . At such a scale, scientists are able to tailor the structure and properties of materials to make them stronger, lighter, more reactive, and more conductive among many other traits. Furthermore, the electrical and magnetic characteristics are fundamentally dierent than their bulk counterpart. This has given rise to a number of applications such as nanoscale transistors which are faster, more powerful and increasingly energy ecient. Displays for TVs, laptops, phones and digital cameras now include nanostructured polymer lms known as organic light-emitting diodes, or OLEDS, which have considerably improved the viewing angles, the weight as well as the energy eciency and the lifetimes. A host of other applications are being engineered and researched everyday.

Just a few orders of magnitude of above the nanoscale lies the microscale.

Unlike the nanoscale, characteristics at this scale are not fundamentally different from those in the macro world. Nonetheless due to devices of this size being lighter, faster, more energy ecient, easier to integrate into systems and cost less to produce, they are also having an astounding success.

The range of applications for such devices are numerous. Micro-electromechanical-systems (MEMS) which in a single package contains the necessary mechanical and electronic components to make transducers have found their uses in a variety of elds. In the automotive industry, it is used in the airbag systems, vehicle security and active suspensions to name a few. In the consumer domain, video projectors, phones, cameras or ink-jet printers all embark one or two MEMS such as accelerometers, gyroscopes or DLP (Digital Light Projector).

Apart from MEMS, in the micro world there is lots of application which involve micro assembly and micro manipulation. Microrobotics [START_REF] Abbott | Robotics in the small, part i: microbotics[END_REF], a term used to dene micro manipulation of objects with characteristic dimensions in the millimetre to the micrometer range as well as the design and fabrication of robotic structures in a similar size range (micro robots), has been gaining momentum these last few years.

Examples of micro manipulation are the characterisation of biological cells and/or organic tissue. This is important in the domain of genetics where new DNA material has to be inserted in the cell. Mechanical characterisation to measure forces on cells is also done through micro manipulation. This is important in the development of tools for robotic surgery as forces requires to open a tissue, or carry out a microinjection are mostly in the micro newton range. Other uses of micro manipulation is to assemble parts called micro assembly.

Microassembly circumvents the limitations of the traditional way MEMS are built. To build MEMS, usually a silicon wafer is used on which lithography and etching are applied to create the appropriate parts. The major limitation is that as the micro fabrication process is planar, 3-D structures are impossible to achieve. With micro assembly this limitation can be circumvented and a whole new lot of applications can be developed.

To this end, sensors and actuators which can work at these scales are needed. Unfortunately to manipulate the small or micro, we need actuators of that size and who can work in that range.

Smart Materials, materials who reacts to a stimulus by either changing shape, colour, permittivity or permeability can be used for such purposes.

These materials are used in a variety of diverse elds ranging from automobile to sports. They are used as sensors and actuators. Often, they have the ability to 'self-sense', i.e the material in addition to being an actuator, it performs as a sensor as well. This is due to the strong coupling between the transduction mechanism. For example, a material which produces a strain when a voltage is applied can also produce a voltage when an external factor changes its shape. These eects are usually called the direct eect and, its opposite the converse eect. Being able to sense and actuate at the same time, obviously gives smart materials an added advantage over traditional actuators and sensors [START_REF] Hmjr Soemers | Mechatronics and micro systems[END_REF]. There are a varieties of these smart materials and they work on dierent transduction principles. Some of the most common are

• Piezomaterials [START_REF] Chaillet | Microrobotics for micromanipulation[END_REF] are very popular smart materials used as sensor and actuators. A mechanical change such as an elongation is observed when a voltage is applied to it. And when the material is compressed or extended, a voltage is developed across it.

• Magnetostrictive materials [START_REF] Claeyssen | Actuators, transducers and motors based on giant magnetostrictive materials[END_REF] will produce an induced mechanical strain when subjected to a magnetic eld. The property that changes is the permeability of the material. Hence on application of a mechanical deformation, the material will change its permeability which can be measured with a coil.

• Ionic Polymers or Electroactive polymers [START_REF]Electroactive Polymer Gels. Electroactive polymer (eap) actuators as articial muscles: reality, potential, and challenges[END_REF] will deform on application of a voltage. They are able to develop a large deformation while sustaining a large force.

• Shape Memory Alloys [START_REF] Ralph | Smart material systems: Model developments[END_REF] reacts to temperature. It will undergo phase transformations which will change its shape. It deforms to its 'martensitic' condition at low temperature and regains its original shape in its 'austenite' condition when heated (high temperature).

• Magnetic Shape Memory Alloys (MSMA) [START_REF] Buschow | Handbook of magnetic materials[END_REF] is also one such very promising material akin in some ways to Shape Memory Alloys (SMA).

It also deforms on application of heat but has the added advantage that it deforms under the action of a magnetic eld.

Overview of Magnetic Shape Memory Alloys

Magnetic Shape Memory Alloys (MSMA) are a relatively new class of material. Like Shape Memory Alloys, they deform under the action of a stress and in addition they are also responsive to a magnetic eld. The most common magnetic shape memory material that has been intensively investigated is an alloy of Ni-Mn-Ga. A great amount of research interest has been generated by this material due to its ability to produce large strains-upto 10%.

Compared to other other materials (see Fig. 1.2), MSMA work at a lower frequency than piezoelectric or magnetostrictive devices but have a higher deformation. Conversely, they have a higher operating frequency than classical Shape Memory Alloys but a lower deformation. Being placed roughly in the middle of the table, opens up a large amount of potential applications for MSMA such as sensors, actuators, energy harvesting, motion/vibration control etc. In Fig. 1.3, the material is shown along with a sensor and an actuator commercialised by a Finnish company named Adaptamat Ltd.

Each of the aforementioned application require that the MSMA operate either in the actuation or sensing mode. In actuation mode, on application of a magnetic eld, an elongation occurs which can be used to do work.

Conversely in sensing mode, on compression/elongation of the material, a change in magnetization is observed. By measuring the change in magnetisation, the change in length can be deduced. The coil in the sensor of Fig. 1.3 is used for such a purpose.

Apart from Adaptamat, a very basic actuator has been developed in Gauthier et al. [START_REF] Gauthier | Multistable actuator based on magnetic shape memory alloy[END_REF] whereas a sensing device is described in Sarawate [START_REF] Nandkumar | Characterization and Modeling of the Ferromagnetic Shape Memory Alloy Ni-Mn-Ga for Sensing and Actuation[END_REF].

An example of the actuator built by Gauthier et al. [START_REF] Gauthier | Multistable actuator based on magnetic shape memory alloy[END_REF] during his PhD thesis is shown in Fig. 1.4. It is a push-pull actuator which uses two MSM elements in an antagonistic manner to move a positioning stage. A detail description and the workings of this actuator as well as its design can be found in Gauthier et al. [START_REF] Gauthier | Multistable actuator based on magnetic shape memory alloy[END_REF]. MSMA are able to exhibit such large deformation due to a change in crystallographic arrangement of the martensitic variant. The material exists in 2 main phases-the high temperature phase which is called austenite and the low temperature phase which is called martensite. Figure 1.5 shows the dierent conditions under which the phases exist and within the martensitic phase how the dierent variants occur. The gure shows that all variants have 2 axis, a long axis ,a, and a short axis, c. These axis point in dierent directions for each variant. Depending on the external inputs such as stress or magnetic eld, a sample of the material can entirely consist of one variant only or a mixture of variants. This changing of conguration due to an external stimulus is the process responsible for the macroscopic change.

Unfortunately this macroscopic change is quite complex in nature. This limits the development and the widespread use of this material. The material (c) Workings of Push-Pull Actuator. has a non-linear hysteretic behaviour. Furthermore for an actuator to be able to operate with precision, the deformation of material needs to be controlled.

Since its discovery by Ullakko [START_REF] Ullakko | Magnetically controlled shape memory alloys: a new class of actuator materials[END_REF] most of the research carried on Magnetic Shape Memory alloys has been centered around its modelling. Irreversible thermodynamics has been extensively used to predict the behaviour of the material [START_REF] Hirsinger | Internal variable model for magneto-mechanical behaviour of ferromagnetic shape memory alloys ni-mn-ga[END_REF][START_REF] Kiefer | Phenomenological modeling of ferromagnetic shape memory alloys[END_REF][START_REF] Lagoudas | Shape memory alloys: modeling and engineering applications[END_REF][START_REF] Kiefer | Modeling the coupled strain and magnetization response of magnetic shape memory alloys under magnetomechanical loading[END_REF]. A variational approach has been used in Wang and Steinmann [START_REF] Wang | A variational approach towards the modeling of magnetic eld-induced strains in magnetic shape memory alloys[END_REF] which is very similar to the thermodynamics approach.

Unfortunately, these subsequent models have not been used to design the associated control system.

In the few works that have attempted [START_REF] Riccardi | Robust adaptive control of a magnetic shape memory actuator for precise positioning[END_REF][START_REF] Riccardi | A precise positioning actuator based on feedback-controlled magnetic shape memory alloys[END_REF] to design a control law for the material, the physics of the material has not been taken into consideration. Notably most of them use a linear dynamics model in series with a non linear hysteretic behaviour. The hysteresis is modelled and then inverted to linearise the plant. Then control strategies such as PI, PID or adaptive control [START_REF] Riccardi | Adaptive modied prandtl-ishlinskii model for compensation of hysteretic nonlinearities in magnetic shape memory actuators[END_REF]. are applied to them. The linear model identied can either be a rst or a second order model. Usually, a second order model is used as the material is pre-stressed by a load. The thermodynamics or variational model usually developed are almost never used to control the material.

M sat M sat M sat v a r ia n t 2 -M 2 v a r ia n t 3 -M 3 v a r ia n t 1 -M 1 z,[001]
x, [100] y, [010] (b) Crystallographic Structure To be able to take into account the physics of the material for the design of control law, a unied energy modelling seems most appropriate as the MSMA and any actuator based on it is highly multi physics. Since energy is a common denominator in all domains, an energetic approach has many advantages. Firstly physical system can be viewed as simpler subsystems which exchange energy among themselves and the environment [START_REF] Jeltsema | Multidomain modeling of nonlinear networks and systems[END_REF]. Secondly energy being a scalar, dierent energies from dierent domains can be combined by simply adding them up. Lastly, the role of energy and interconnections between subsystems provide the basis for various control strategies [START_REF] Ortega | Passivity-based control of Euler-Lagrange systems: mechanical, electrical and electromechanical applications[END_REF][START_REF] Anthony M Bloch | Controlled lagrangians and the stabilization of mechanical systems. i. the rst matching theorem[END_REF]. And nally they obey the laws of thermodynamics which is not the case for phenomenological models.

Unied Energy Modelling

To harness the full power of Magnetic Shape Memory alloys as actuator, control of the deformation is essential. Furthermore using a black box model or a linear model of the system does not allow us to use the full potential of the material as the physics of the material is obscured by approximations and linearization.

One way to overcome such limitations is to an energy framework as they are neither restricted by the domain of application nor by linearity. The port-Hamiltonian framework is an energy framework which has been rapidly developing and is an ongoing subject of research since many years now. The port-Hamiltonian framework combines Hamilton's equations of motion from analytical mechanics with network theory prevalent in electrical engineering [START_REF] Schaft | Port-hamiltonian systems: an introductory survey[END_REF].

The port-Hamiltonian framework rst and foremost models a system in a particular fashion i.e in terms of energy and co-energy variables. Energy is the ability to do work while co-energy is its complement. For example, in a spring with a linear constitutive equation (the relation between the force, F , and its displacement, x, is linear), we have, taking the stiness of the spring to be k:

F = kx
The energy E s is then given by

E s (x) = F dx = x 0 kx dx = 1 2 kx 2
whereas its co-energy E s is

E * s (F ) = x dF = F 0 F k dF = 1 2 F 2 k
We see that the the energy E s (x) is in terms of x, the energy variable and E * s (F ) in terms of F -the co-energy variable.

After formulating a port Hamiltonian model we then have a host of techniques such as IDA-PBC and energy shaping [START_REF] Ortega | Putting energy back in control[END_REF] at our disposal to control it. Since thermodynamics which is the science of energy is extensively used to model MSMA, it is natural that control strategies based on port Hamiltonian framework is a natural extension.

The main advantage of port-Hamiltonian systems as compared to the classic state space model is the appearance of the structure matrix (how elements are connected to each other-the topology or network structure of the system) explicitly.

Classical dynamical systems are usually written in the form

ẋ = f (x, u)
or in the linear case

ẋ =Ax + Bu y =Cx + Du
where x is the state variable matrix and u the input. In the port-Hamiltonian framework, the system is of the form

ẋ =(J -R) ∂H ∂x + gu y =g T u (1.1)
where

• J is the interconnection matrix (skew-symmetric matrix, J = -J T ).

It represents the connections between the elements of the system and denes its structure.

UNIFIED ENERGY MODELLING

• R is the dissipation matrix (diagonal matrix, symmetric and, in physical systems semi-positive denite R = R T ≥ 0).

• g the port connection of the system to the outside world. It transmits energy to/from the system through the port variables u and y.

• H(x) is the Hamiltonian of the system (usually the total stored energy of the system).

Also, J, R and g can be functions of the state variables where they are represented as J(x), R(x) and g(x). From (1.1), rate of change of the Hamiltonian which gives the power of the system is given by

dH dt = - ∂ T H ∂x R ∂H ∂x + u T y ≤ u T y (1.2)
which yields a passive system if R ≥ 0. J disappears in the power balance equation above due to its skew-symmetric nature.

We will now illustrate by means of an example, the port-Hamiltonian representation.

Example

Consider a mass-spring system as in Figure 1.6 in which a mass m is interconnected with a spring of stiness k. Choosing as state variables x, the spring deformation, and p, the momentum of the mass, we can model the two elements-mass and spring separately as follows:

k m F x (a) Mass-Spring System. ∑ m ∑ s v = ẋ F (b) Network Representation of Mass-Spring System.
m : ṗ = F y = p m (= v) s : ẋ = v y = -kx (= F ) (1.3) in which
m is the mass model and s is the spring model. In (1.3), F is the force applied to the mass by the spring and it is the output of subsystem s while v is the mass speed, the output of system m .

As shown in Figure 1.6b, the interconnection is in feedback. The mass integrates the force F to determine its speed while the speed v is integrated by the spring to calculate its deformation. This kind of behaviour is very general in dealing with physics of the systems. The only way systems can be connected is through feedback i.e there is a mutual inuence between interacting systems and this interaction can be revealed by analysing the kind of information exchanged.

As will be seen in the chapter on Bond Graphs, this exchange of information occurs through eort and ow variables. In this example, the eort is the force F while the ow is the velocity v. Their product is power F.v.

What happens is that one system takes in the eort F , in this case the mass and imposes the velocity v while the converse occurs in the spring-it takes in the velocity v and imposes the force F . Hence interconnection results in an exchange of power between the subsystems through ports. This become more obvious if the energy of the subsystems is considered.

The kinetic energy E k of the mass and the potential energy of the spring E p is given by

E k (p) = p 2 2m E p (x) = 1 2 kx 2 (1.4)
The variables p and x which are called state variables in classical system theory are in the port-Hamiltonian framework called energy variables. The time rate of change of the energies is then given by:

dE k dt = p m • ṗ = v.F = P dE p dt = (kx). ẋ = -F.v = -P (1.5)
where P is the power. The 2 relations in (1.5) expresses the well-known physical property of spring-mass system, a continuous conversion between kinetic and potential energy which results in the oscillatory behaviour of the system. This interaction is succinctly captured by the port-Hamiltonian framework in its structure matrix J. The port-Hamiltonian formulation for the mass-spring system is:

d dt x p Energy Variables = 0 1 -1 0 J ∂H ∂x = kx = F ∂H ∂p = v Co-Energy Variables + 0 1 input F y = 1 0 ∂H ∂x ∂H ∂p (1.6)
where H is the total stored energy of the system:

H(p, x) = 1 2 p 2 m + 1 2 kx 2 (1.7)
From (1.10) and (1.7), it is seen that to write the port Hamiltonian formulation, H need not be necessarily quadratic in the energy variables. For other energy functions which yield non-linear constitutive equations between effort and integrated ow or integrated ow and eort, it can just be as easily integrated into the formulation.

As for the power balance equation it is given by:

dH dt = - ∂ T H ∂x R ∂H ∂x + u T y = u T y (1.8)
Eq. 1.8 veries that energy is conserved. No loss occurs in the system. The rate of change of the Hamiltonian, H(x, p) is equal to the power injected into the system through the power port (u, y). If the input u is brought to and kept at 0, the system will continue to oscillate indenitely.

The above development is still not sucient to model systems since the mass-spring is a conservative system. We also need to be able to take care of dissipation which occurs in all systems. In the mass-spring-damper shown in Figure 1.7, energy is dissipated (lost) in the damper. The constitutive equation for the damper is taken to be linear i.e In the port-Hamiltonian formulation, dissipation is taken care by the R matrix. The Hamiltonian H stays the same while the formulation now includes R as follows

F d = b ẋ = bv
ẋ ṗ = 0 1 -1 0 J - 0 0 0 b R ∂H ∂x = kx ∂H ∂p = v + 0 1 F y = 1 0 ∂H ∂x ∂H ∂p (1.10)
In this case, power balance is given by:

dH dt = - ∂ T H ∂x R ∂H ∂x + u T y = u T y -bv (1.11)
And from 1.11, we infer that the system energy decreases. If input u is brought to and kept at 0 from some initial value, the system will stop after some time.

For simple systems, it is easy to nd the interconnection matrix J, but for large systems consisting of many elements such as inductors, capacitors, masses, springs and/or resistances, systematic approaches exist to nd the topology of the system. Two approaches are the bond-graph [START_REF] Henry | Analysis and design of engineering systems[END_REF] and the

Se : F 1 R : b I : m C : k F v F b v b F m v m F k v k (a) Bond Graph of Mass-Spring Damper.
The "1" junction indicates that all the bonds share the same velocity. linear graph [START_REF] Es Kuh | Basic circuit theory[END_REF]. More details about these 2 techniques will be given in subsequent chapters.

v 0 = 0 v 1 = v k = v b = v m
As a brief overview, both approaches are graphical in nature and they both make use of simple ideal elements such as generalised inductances or generalised capacitances to model elements. Bond graph makes use of junctions to connect elements whereas linear graph makes use of nodes as shown in Figure 1.8. The little vertical bars at the end of the bonds (half arrows)

in Figure 1.8a indicate causality i.e which elements imposes the force and which elements impose the velocity. This information, although not missing from linear graph, is not so evident. It has to do with trees (solid lines representing a causal tree) and co-trees (dashed lines) in Figure 1.8b. On the other hand, linear graphs is more akin to give the topology directly without regards to what type of element is connected between the nodes whereas a little manipulation is required in bond graphs to get the J -R interconnection matrix.

These 2 approaches can be used to nd the interconnection matrix J for 1.4. HYSTERESIS any domain, electrical circuits for example or a mixture of domains. Since

MSMAs are multi physics in nature, these 2 techniques are used to model the pathway of energy in the material.

The port Hamiltonian framework therefore seems well-adapted to model MSMA as there is a conversion of energy from electrical to mechanical. One further consideration regarding MSMAs and/or smart materials in general is their hysteretic behaviour [START_REF] Ralph | Smart material systems: Model developments[END_REF].

Hysteresis

Hysteresis is a non-linear eect that arises in diverse disciplines ranging from physics to biology, from material science to mechanics, and from electronics to economics [START_REF] Tan | Modeling and control of hysteresis[END_REF]. Ferromagnetism, illustrated in Figure 1.9, is a classical example of hysteresis in electrical engineering while in mechanical engineering, backslash and friction are the main source of hysteresis.

The physical causes of hysteresis are the existence of multiple metastable states of a free energy functional and energy dissipation [START_REF] Ram | Control of hysteretic systems through inverse compensation[END_REF]. In the micro magnetic theory of ferromagnetism, crystalline symmetry results in multiple minima for the thermodynamic free energy giving rise to multiple metastable states. These explanations are due to Landau and Lifshitz [START_REF] Lev | On the theory of the dispersion of magnetic permeability in ferromagnetic bodies[END_REF] who developed a qualitative theory of phase transitions which explains various kind of hysteretic behaviour.

This non-linear behaviour typically undermines our ability to control or perceive relations in physical, biological, and engineering systems. It is most of time seen as a detrimental and undesirable eect. Nonetheless it has been exploited successfully in some applications such as magnetic data storage and some emerging computer technology, such as ferroelectric nonvolatile thin-lm memories. In power electronics, thermostats and digital circuits, hysteretic switching prevents chattering and its associated consequences.

- Phenomenological model on the other hand are independent of physical systems. One of the most common model is the Preisach model which was originally developed to physically explain ferromagnetic hysteresis [START_REF] Preisach | Über die magnetische nachwirkung[END_REF][START_REF] Mayergoyz | Mathematical models of hysteresis[END_REF] but was later given a mathematical description and has since been mostly used as a phenomenological model. In brief, an elementary unit called a "relay" is used to construct the hysteresis operator. In its most basic form, the relay can switch between 2 states and a collection of such relays each switching at dierent values gives the hysteresis map. In the preisach model, a hysteron is totally dened by its values α and β. Or, it can be dened by its half width r and its centre s. Other elementary units derived from the preisach are the play and stop

H C H s H B B R
R α1,β1 R α2,β2 • • • • • • R αn,βn u(t) y(t) µ 1 µ 2 µ 3 µ 4 µ n (

OBJECTIVE OF THESIS AND OUTLINE OF MANUSCRIPT

operator which make up the Prandtl Ishlinskii operator [START_REF] Visintin | Mathematical models of hysteresis[END_REF]. Their advantage over the Preisach is that they are more easily invertible. Such a property is very important as in many control design involving plant with hysteresis, an inverse model of the hysteresis is used with a linear model of the plant.

Objective of thesis and Outline of Manuscript

The main objective of the thesis is to build an actuator capable of controlled displacement. Magnetic Shape Memory will be employed as the transducer.

It shall convert the electrical energy input to a mechanical energy output which can be used to do work. The port Hamiltonian framework which is energy based will be used to model and control the actuator. The outline of the thesis is as follows:

Chapter 2 presents a general actuator based on Magnetic Shape Memory Alloys. This actuator and its associated modeling was developed in a previous thesis by Gauthier [START_REF] Gauthier | Modélisation des Alliages e Memoire de Forme Magnetiques pour la conversion d'energie dans les actionneurs et leur commande[END_REF] and from which this thesis is inspired. We present his dynamic model of the actuator and improve it using the port Hamiltonian formulation.

These improvements still being insucient for a proper port-Hamiltonian control, we give in Chapter 3 the necessary theory for understanding MSMA.

This chapter also shows how the constitutive equations for the MSMA is derived mainly the total strain and the thermodynamic driving force. Furthermore, we extend the distributed parameter modelling present to lumped parameter model more understandable and better suited for control.

Chapter 4 is then devoted to the Bond Graph Modeling of the actuator.

The advantage of using Bond Graphs is rst to have a systematic way of modeling the interconnection. Secondly being graphical in nature, it quickly gives an overview of the dierent elements and their relationship with each other. Thirdly, being power based, it naturally ts the port-Hamiltonian framework and nally we show that it is a powerful tool to incorporate hysteresis into an energetic framework.

Finally in chapter 5 we give some rst ideas about possible control strategies for the actuator and some basic experimental results. And nally we conclude the thesis by giving some improvements and some future perspectives.

Chapter 2

A

Introduction

In this chapter we extend the work performed by Gauthier [START_REF] Gauthier | Modélisation des Alliages e Memoire de Forme Magnetiques pour la conversion d'energie dans les actionneurs et leur commande[END_REF] during his PhD. We start from his model of the MSMA, reported in [START_REF] Gauthier | Nonlinear hamiltonian modelling of magnetic shape memory alloy based actuators[END_REF], and cast it into a port-Hamiltonian model. We then discuss its merits and discrepancies from a Port-Hamiltonian point of view.

In Gauthier et al. [START_REF] Gauthier | Nonlinear hamiltonian modelling of magnetic shape memory alloy based actuators[END_REF], a classical Hamiltonian model [START_REF] Lanczos | The variational principles of mechanics[END_REF] was built which simulation. These results, reported in Calchand et al. [START_REF] Calchand | From canonical hamiltonian to port-hamiltonian modeling: Application to magnetic shape memory alloys actuators[END_REF], will be presented in this chapter. We start by detailing the actuator and then proceed to derive the Port-Hamiltonian model.

Description of actuator

The actuator shown in Figure 2.1 consists of a piece of ferromagnetic core around which a piece of wire is wound to make a coil. Located in the core is an air gap in which the Magnetic Shape Memory Alloy (MSMA) is placed. Fixed on the top of the MSMA is a load, m, which applies a stress on the material.

The purpose of the actuator is to convert electrical energy into mechanical energy. It can be divided into 3 subsystems namely the electrical subsystem, the MSMA, and the mechanical subsystem. The electrical subsystem is responsible for the generation of the magnetic eld. When a voltage, u(t), is applied at its terminals, a current ows in the wire which produces a magnetic eld inside the core and in the air gap. The magnetic eld in the air gap is converted by the second subsytem-the MSMA-into mechanical energy to lift the load which makes up the third system. This transduction mechanism i.e the conversion of electrical energy to mechanical energy by the MSMA is possible due to the existence of two stable variants of the material, M 1 and M 2. As shown in gure 2.2a, these 2 variants co-exist together in the material. Application of a stress favours variant M 1 while application of a magnetic eld favours variant M 2. Due to the dierent crystallographic arrangement of these variants, a macroscopic deformation is observed. Figure 2.2b shows a simplied structure of a unit cell of the MSMA. It has a long axis, a, and a short axis, c. An applied stress favours the M 1 variant which has its c-axis parallel to it wheras a magnetic eld favours the M 2 variant which again has its c-axis parallel to it. A maximum macroscopic strain of the order of 6% has been observed in this material [START_REF] Likhachev | Magnetic-eld-controlled twin boundaries motion and giant magneto-mechanical eects in nimnga shape memory alloy[END_REF]. For the actuator to be useful in a range of applications, the displacement,

x, of the material need to be controlled. For such purposes, appropriate models are needed to design the control systems. In Gauthier et al. [START_REF] Gauthier | Nonlinear hamiltonian modelling of magnetic shape memory alloy based actuators[END_REF], a classical Hamiltonian approach had been taken and in this work, we adopt the Port-Hamiltonian framework.

Modeling-Classical Hamiltonian Approach

In the classical Hamiltonian approach, a set of generalised coordinates denoted by q i and a set of generalised momentums denoted p i are used to describe a physical system [START_REF] Donald | Advanced dynamics[END_REF][START_REF] Richard | Principles of Analytical System Dynamics[END_REF]. For a conservative system without external inputs, the time evolution of the system is then given by

dq i dt = + ∂H ∂p i dp i dt = - ∂H ∂q i
where H is the Hamiltonian and corresponds to the total energy of the system. To take into account constraints, external inputs and dissipation, the extended formulation is used. In Gauthier et al. [START_REF] Gauthier | Nonlinear hamiltonian modelling of magnetic shape memory alloy based actuators[END_REF], it was described as

q ṗ = 0 I -I -R ∂H ∂q ∂H ∂p + 0 A T (q) • q λ + 0 B u(t) (2.1)
where λ represents the lagrange multipliers, A the matrix of constraints where A(q). q = 0, u(t) the external forces or inputs and R the dissipation while H is the total stored energy of the system. For the actuator shown in Fig. 2.1, the dierent energies of the system is given in Fig. 2.3. There is transformation of energy which occurs along the energy path. The MSMA block shown in the gure is particularly interesting as it shows that the transformation of energy between magnetic and mechanical allowing for loss in the hysteresis. Now we will describe the model proposed by [START_REF] Gauthier | Nonlinear hamiltonian modelling of magnetic shape memory alloy based actuators[END_REF] in the next subsections.

Coil

The electrical subsystem

The electrical subsystem consist of an electrical part and a magnetic part.

The electrical part generates a current in the coil which in turn produces a magnetic eld in the core. As the magnetic part is non ideal, there are parasitic eects which occur along it. These are the leakage ux and the fringing eect. The leakage ux is due to some magnetic eld lines not being conned to the core and the fringing eect is due to the distortion of the eld lines near the air gap. After accounting for these eects, the magnetic eld in the air gap depends on the inductance of the core and the inductance of the air gap. The core, air-gap, leakage ux and fringing eect have been modeled by inductances as shown in Figure 2. [START_REF] Birkett | The mathematical foundations of bond graphsiii. matroid theory[END_REF] The inductances considered 0 u(t) Strain, ε ε p ε are the leakage ux, L L2 , the inductance of the ferromagnetic core, L F E , the fringe eect, L L , and the inductance of the air gap, L a-g . The generalised coordinates, q i , and the generalised momentum for the electric part is given in Table 2.1.

1 r I 2 L L2 L L 4
i q i qi p i Coil 1 charge,q c I φ Fe-Si core 2 D F E H F E .l F E B F E .S F E Fringing Eect 3 D L H L .l L B L .S L Air-Gap 4 D a-g H a-g .l a-g B a-g .S a-g
For the coil, global 1 quantities are used where the generalised coordinate is the charge q c , the generalized velocity is the current, I, and the generalized momentum is the ux linkage, φ. For the rest of the circuit, the local 2 form is used. The path integral of H i l i over the path l i is taken to be the generalized velocities and the uxes B i .S i through a surface S i as the generalised momentum.

The MSMA subsystem

The MSMA itself only converts the electrical/magnetic energy into mechanical energy. The model used to quantify this conversion relies heavily on thermodynamics [START_REF] Herbert B Callen | THERMODYNAMICS & AN INTRO[END_REF][START_REF] Hartley | Thermodynamics: An Introductory Treatise Dealing Mainley with First Principles and Their Direct Applications[END_REF]. Furthermore, the Coleman-Noll procedure [START_REF] Bernard | Thermodynamics with internal state variables[END_REF] has been employed to introduce an internal variable, z, which models the material's dissipative nature and the memory eect of the material. Associated with this variable, there is a thermodynamic force which dictates the evolution of z. Physically, z, is the volume fraction of M 2-the eld preferred variant, in the material. Table 2.2 shows the generalised coordinates associated with the material. The magnetic eld applied produces an elongation which, through the z variable, produces a strain, ε.

1 Global quantities are variables integrated into subsystem to give lumped parameters. 2 Local quantities are density variables which gives distributed parameters

Energy of the Actuator

The total energy at play in the actuator is the sum of the energies of the dierent parts. For the electrical part, we have the energy associated with the air-gap, the energy stored in the ferromagnetic core, the energy associated with leakage ux and the enegy associated with the coil. These can be written as

H e = φ 2 2L L2 + V F E B F E 0 H F E (b)db + V L 1 2µ 0 B 2 L + V a-g 1 2µ 0 B 2 a-g (2.2)
where V i is the considered volume. For the material, it is the volume of the material . For the MSMA, the energy conversion process was quantied using irreversible thermodynamics [START_REF] Hirsinger | Internal variable model for magneto-mechanical behaviour of ferromagnetic shape memory alloys ni-mn-ga[END_REF] and is reported in [START_REF] Gauthier | Modeling rearrangement process of martensite platelets in a magnetic shape memory alloy ni2mnga single crystal under magnetic eld and (or) stress action[END_REF] . It is given by

H msma = V msma E 2 (ε -γz) 2 + K 12 .z.(1 -z) + B 0 H(b)db + p 2 z 2m z + p 2 ε 2m ε (2.3)
where E 2 (εγz) 2 is the strain energy in the material, K 12 .z.(1z) is an enegy interaction between the variants, B 0 H(b)db is the part of magnetic energy stored in the material p 2 z 2mz is the kinetic energy associated with the movement of z and nally p 2 ε 2mε which is the kinetic energy associated with the total strain of the material. Finally, the mechanical energy of the actuator is made up of the potential and kinetic energy which is given as

H mec = 1 2m p 2 x + mgx (2.4)

Hamilton Equations

The total Hamiltonian is then given by H(q, p) = H e + H msma + H mec (2.5)

The vector of generalized coordinates, q, generalized momentum, p and λ which takes into account the Lagrange multipliers are given in (2.6), (2.7) and (2.8).

q T = [q c , D F e , D L , D a-g , D, z, ε, x]

(2.6)

p T = [φ, B F e S F e , B L S L , B a-g S a-g , BS, p z , p ε , p x ]
(2.7)

λ T = (λ 1 , λ 2 , λ 3 ) (2.8)
From equation (2.5), the equations of motions for the system can then be obtained. For each generalised coordinate and each generalised momentum, an equation can be written which gives 16 equations. The 8 equations relating to the coordinates are obtained as follows

• the rst Hamilton equation is the denition of inductance L L2 :

L L2 qc = φ (2.9)
• the next four equation can be obtained from the denition of the mag-

netic eld H i for i ∈ {F e, L, a -g, ∅} Ḋi = l i H i (2.10)
where ∅ (absence of index) represents the magnetic eld in the MSMA.

• The next set of three equations relates the momentum p i to the velocities q i for q i ∈ {z, ε, x} and i ∈ {z, ε, x}.

p i = m i qi (2.11)
The 8 equations relating the momentum are given by the one Kircho 's voltage law, two magnetic conservation laws, one Newton' s law, one constitutive equation for the MSMA and nally by the 3 Lagrange multipliers.

• the dynamic electrical equation (Kircho 's voltage law):

u = rI + N Ḃ F e S F e
(2.12)

• the two equations for the conservation of magnetic uxes in the magnetic circuit:

ḂL S L = ḂF e S F e -Ḃa-g S a-g

(2.13) ḂS = Ḃa-g S a-g (2.14)
• the two dynamic equation for the load (Newton's Law):

mẍ = -mg -f ẋ -S msma σ (2.15)
• the quasi-static behaviour of the MSMA (constitutive equation)

π f (z, ż) = -σγ + K 12 (1 -2z) + ∂ B 0 H(b)db ∂z (2.16)
• the values of the three Lagrange multipliers:

λ 1 = ḂF e S F e λ 2 = Ḃa-g S a-g λ 3 =Sσ
related to the following 3 constraints:

N.I =H F E .l F E + H L .i L H L .l L =H a-g .l a-g + H.l x =l 0 .ε
The rst two constraints pertain to the electrical circuit and the last to the mechanical side. Integrating the constraints yield the following 3 equations

c 1 (q) =D F E + D l -N.q c = 0 c 2 (q) =D L -D a-g -D = 0 c 3 (q) =x -l 0 .ε = 0
Furthermore we need to dene the dissipation matrix, R. The actuator dissipates energy in the resistance, r, of the wire making up the coil and through the hysteretic behaviour of the material. The variable, z, was introduced to model such a dissipation. The thermodynamic force, π f , is related to the variable, z through the second law of thermodynamics and should obey the Clausius Duhem inequality which is dD = π f dz ≥ 0

(2.17)

In Gauthier et al. [START_REF] Gauthier | Modeling rearrangement process of martensite platelets in a magnetic shape memory alloy ni2mnga single crystal under magnetic eld and (or) stress action[END_REF], to describe the hysteretic nature of the material, an expression of the form

π f (z, ż) = λ C z + sign( ż) 2 - 1 2 + π cr .sign( ż) (2.18)
is used and it is depicted in gure 2.5. Then from 2.18 the power dissipated due to hysteresis is given as

P hyst = V M SM A . Ḋ (2.19) = V M SM A . λ C z + sign( ż) 2 - 1 2 + π cr .sign( ż) . ż (2.20) π z z M 2 ← M 1 M 2 → M 1 π - cr π + cr λ 0 0 1
∂P hyst ∂ ż / ż (2.

21)

.

Thus the dissipation matrix, R, becomes

R =              
r 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

∂P hyst ∂ ż / ż 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0               (2.22)
The last 2 matrices that are needed to complete the model are the constraint matrix ,A, and the input matrix, B. From the equations above, they are given by

A T =   -N 1 1 0 0 0 0 0 0 0 1 -1 -1 0 0 0 0 0 0 0 0 0 -l 0 1   (2.23)
and

B T = 1 0 0 0 0 0 0 0 (2.24)

The Port-Hamiltonian Approach

The previous section described the model as done by [START_REF] Gauthier | Nonlinear hamiltonian modelling of magnetic shape memory alloy based actuators[END_REF]. Though done with the Hamiltonian formalism, his model is not properly port-Hamiltonian.

There are variables which are in excess. As described in [START_REF] Stephen | Dynamics of mechanical and electromechanical systems[END_REF], for lumped electric circuits either (p) or (q) should be used. Using both results in redundancy. To cast that model in a proper port-Hamiltonian model, we will use linear graphs [START_REF] Es Kuh | Basic circuit theory[END_REF] to model the electric circuit in Figure 2.4. Then the MSMA element will be connected to the electrical circuit through its electrical port while the load will be connected at its mechanical port.

The advantage of using the port-Hamiltonian approach allows to separate the interconnection of the elements and the constitutive laws. The subsystem has been divided into two parts, the rst part consists of the electrical subsystem and the second part consists of the MSMA element and the load. The electrical subsystem is modelled using linear graphs and then interconnected with the second subsystem. model this circuit, we make use of linear graph theory-a brief introduction is given in appendix A. This approach gives us the topology of our system i.e how the elements in the circuits are interconnected to each other.

The electrical subsystem

Linear graph theory tend to translate the graphical representation of circuits into a mathematical form. It uses nodes and branches to represent voltages and current in elements. A node is similar to a potential whereas a branch is a connection between 2 nodes. Hence each branch represent an element (resistor, capacitor or inductor) in which a current ows whereas the nodes at the ends of the branch represent the voltage dierence in that element. A tree is then dened as a subgraph which contains all tree nodes and the maximum number of branches without making a loop. A co-tree is then dened as the subgraph made up of the remaining branches. These branches are also called links and they are not present in the tree. To then derive the equations of the circuits, Kircho 's Current Law (KCL) and Kircho 's Voltage Law (KVL) are applied. Figure 2.7 shows the linear graph of the electrical subsystem where u i has been used to denote the potential dierence across each branch. If all elements in a circuit were resistances and sources, the above concepts would have been enough to completely characterize circuits. But for circuits containing energy storage elements such as capacitors and inductors, a more systematic method is needed. Inductances should be put in the links while capacitors should be in tree [START_REF] Es Kuh | Basic circuit theory[END_REF]. Resistances can either be in the tree or co-tree. This makes deriving the equations easier and assures a minimal number of equations. Such a process is carried out because of the fundamental dierence in the type of energy they store. Furthermore if the concept of linear graph were extended to the other domains such as mechanical, thermal or uids, the concept of across and through variable should be used. Further details can be found in appendix A and [START_REF] Shearer | Introduction to system dynamics. Addison-Wesley series in systems and controls[END_REF].

0 3 2 1 4 u r u L 2 u L L u L Fe u M S M A u L a -g u
Furthermore, loop-sets are loops which contains only one link. This link voltage can then be expressed in terms of the tree branch voltages. Cut sets are those subgraphs which when the graph is divided(cut) into 2 separate parts contain only 1 tree branch. Hence this tree branch current can be expressed in terms of link currents. KVL is then applied to the loop set and KCL to the cut set. To understand why inductance should be in the link, we need to look at the constitutive equation for an inductor which is

v L = dφ dt = L di dt (2.25)
Hence φ should be expressed in terms of all other voltages which is exactly what loop set does. As the inductor is the link, it expresses the voltage across it as a sum of all other voltages present in the loop set. Naturally since loop sets contain only 1 link, no other independent inductor is present. The same argument goes for why capacitors should be in the tree and therefore their equations are obtained using cut sets.

Keeping in mind that inductances are the links, the tree and links (cotree) can be shown to be as in Figure 2.8. A closer inspection reveals that one of the inductances is not independent.

0 3 2 1 4 u r u L 2 u L L u L Fe u M S M A u L a -g u
No tree can be found without adding at least an inductor . This problem can be resolved by either rening the model by incorporating eddy current losses in the core or if the actual model is to be kept, adding a constraint between the dependent and independent variable making the former independent. This is the Lagrange multiplier technique. The latter course is taken.

0 3 2 1 4 u r u L 2 u L L u L Fe u M S M A u L a -g u u λ Loop set Cut Set
    u L2 u L F e u L L u L a-g     =     1 -1 0 -1 0 0 0 1 0 0 -1 1 0 0 1 0         u u r u msma u λ     (2.26)
and the 1 cutset equation is

i L 2 = i r (2.27)
Taking u and u msma as inputs and u λ as constraint, the Port-Hamiltonian formulation becomes:

    φL2 φL F e φL L φL a-g     =     -R 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0         i L2 i L F e i L L i L a-g     +     1 0 0 0 0 -1 0 1     u u msma +     -1 1 1 0     u λ (2.28)

The MSMA+Load Subsystem

The second subsystem consists of MSMA and the mechanical load. For this subsystem, as it was written in the thesis of [START_REF] Gauthier | Modélisation des Alliages e Memoire de Forme Magnetiques pour la conversion d'energie dans les actionneurs et leur commande[END_REF], the input consisted of an input voltage (the voltage across the MSMA in 2.6), u ext3 , two thermodynamic variables z and p z , the strain ε and nally the momentum of the mass p load . p ε shown in Table 2.2 is omitted. The energy, co-energy and input variables are given as

x II = φ msma z p z ε p load T , o cII = ∂H II ∂x II = i msma ∂H II ∂z ∂H II ∂pz ∂H II ∂ε ∂H II ∂p load T , o extII = u ext3 = u M SM A (voltage applied to msma).
where H II is the total stored energy of second subsystem.The resulting Port-

Hamiltonian equation is dx II dt =       0 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 1 0 0 0 -1 0       J II -R II • ∂H II ∂x II +       1 0 0 0 0       G II •u ext3 (2.29) with = (∂P hyst /∂ ż) ż
where P hyst is the dissipated power due to the irreversibility of msma (see [START_REF] Gauthier | Modélisation des Alliages e Memoire de Forme Magnetiques pour la conversion d'energie dans les actionneurs et leur commande[END_REF]). It can be shown, from the 2 nd law of thermodynamics (Clausius-Duhem Inequality), that

∂H II ∂x II T • R II • ∂H II ∂x II ≥ 0 and
hence subsystem II is passive.

Interconnection of system I and system II

The two subsystems are then interconnected where

u L a-g = u ext3 = u msma
This interconnection causes a second causality problem as the MSMA and air-gap modelling both have an inductive behaviour and since they connected in parallel: one of them is necessarily dependent on the other. In a similar way to subsystem I, a Lagrange multiplier is added with a constraint dened by a second leakage current i λ 2 parallel to the air gap and the MSMA branch/edge:

i λ 2 = -i L l + i L a-g + i M SM A = 0
Finally the Port-Hamiltonian equation for interconnection of subsystems I and II is:

d dt x I x II x = J I -R I 0 0 J II -R II J -R • ∂H I ∂x I ∂H II ∂x II ∂H ∂x +               -1 0 0 0 0 0 0 0 0               G • u ext u +               -1 0 1 0 1 -1 0 1 0 1 0 0 0 0 0 0 0 0               A • u λ1 u λ2 u λ (2.30)
With two constraint equations:

i λ1 = i L 2 -i L F e -i L l = 0 i λ2 = -i L l + i L a-g + i msma = 0
These two constraint equations can be assigned in the Port-Hamiltonian formalism:

i λ1 i λ2 y λ =i λ = -1 1 1 0 0 0 0 0 0 0 0 -1 1 1 0 0 0 0 A T • ∂H I ∂x I ∂H II ∂x II ∂H ∂x = 0 (2.31)
For quadratic dissipative systems, a Port-Hamiltonian output y power-conjugated with the external input u may be dened such as Schaft [START_REF] Schaft | Port-hamiltonian systems: an introductory survey[END_REF] d

H dt = - ∂H ∂x T • R • ∂H ∂x + y T • u ≤ y T • u (2.32)
For the device considered in this paper, the computation gives:

d H dt = ∂H ∂x T • dx dt = ∂H ∂x T • (J -R) • ∂H ∂x + G • u + A • u λ = ∂H ∂x T • J • ∂H ∂x - ∂H ∂x T • R • ∂H ∂x + G T • ∂H ∂x T • u + A T • ∂H ∂x T • u λ
Because J = -J T (antisymmetric in accordance with Tellegen principle [START_REF] Bdh Tellegen | A general network theorem, with applications[END_REF]) and A T • ∂H ∂x = 0 (constraints), the rst and the last parts of the second hands are nul and we obtain:

d H dt = - ∂H ∂x T • R • ∂H ∂x + G T • ∂H ∂x T • u (2.33)
The output y of this Port-Hamiltonian system is then dened as:

y = G T • ∂H ∂x = i L 2 (2.34)
The number of state variables is 9 in this Port-Hamiltonian modeling whereas it was 16 in the canonical Hamiltonian modeling. This systemoriented modeling procedure already allows to reduce the size of the dynamical problem by keeping only state variables instead of generalized coordinates and momenta. We also obtain a minimal realization of the system.

Model Reduction

The canonical Hamiltonian modeling procedure gives 2n + n c DAE in the case of n generalized coordinates constraint by n c interconnections. The Port-Hamiltonian modeling procedure gives n x + n cx DAE in the case of n x conservative components constraint by n cx equations. As previously noticed, it is still necessary to reduce them to gain insight into the design and control issues and especially to transform the DAE system into an ODE system This section presents the reduction of DAE Port-Hamiltonian equations into a set of ODE Port-Hamiltonian equations by using changes of variables and state space projection according to Schaft [START_REF] Van Der Schaft | L2-Gain and Passivity in Nonlinear Control[END_REF]. The rst step consists in decoupling the n cx Lagrange multipliers to n x -n cx states of the system. It is done by the following change of coordinates:

x = T A •x with T A = S A T s.t. A T • S = 0.
S being a real matrix of size (n x , n xn cx ). In our case the following matrix presents the required characteristics:

S T =          
1 1 0 0 0 0 0 0 0 0 -1 1 1 0 0 0 0 0 0 0 0 1 -1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1

          (2.35)
Because of the dissipative term R this rst coordinate transformation is not sucient. Indeed after this change of variables the Lagrange multipliers only act on the two last states of the system but these states remain connected to the other ones through T A (J -R) T T

A due to the dissipa- tive term R. Furthermore the input is still coupled to the constraints as:

T A • G = -1 0 0 0 0 0 0 1 0 T .
Hence, after the rst coordinate transformation T A a second transformation T G is applied to remove this residual coupling coming from the dissipation term:

x = T G • x = T G • T A T •x (2.36)
with the following matrix transformations:

T G =              
1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1

              , T =               1 1 0 0 0 0 0 0 0 -1 1 1 0 0 0 0 0 0 0 1 -1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 2 1 0 0 0 0 0 0 0 -1 1 1 0 0 0              
The change of states x → x gives the following Port-Hamiltonian equations:

                   d x dt = T • (J -R) • T T • ∂ H ∂ x + T • G • u + T • A • u λ y = (T • G) T • ∂ H ∂ x y λ = (T • A) T • ∂ H ∂ x = 0 (2.37)
With the following state vectors and matrix:

x =               φ L 2 + φ L F e -φ L F e + φ L l + φ L a-g φ L a-g -φ msma z p z ε p load 2φ L F e + φ L l -φ L l + φ L a-g + φ msma               , T • A =               0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 -1 -1 3               T • (J -R) • T T =              
-R 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 -1 * 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

              , T • G =               -1 0 0 0 0 0 0 0 0              
This model reduction procedure allows nally to isolate the two constraint equations (algebraic) from the rest of the other equations (ordinary dierential) as it can be seen in the last two rows of T•(J -R)•T T , T•G and T•A:

the corresponding 7 ODE can be solved independently of the 2 AE. The nal 7 order model usable for control can be derived by using projection.

This reduced model has been a very important milestone in this thesis.

Discussion

The model as described in Section 2.3 was developed in [START_REF] Gauthier | Modeling rearrangement process of martensite platelets in a magnetic shape memory alloy ni2mnga single crystal under magnetic eld and (or) stress action[END_REF][START_REF] Gauthier | Nonlinear hamiltonian modelling of magnetic shape memory alloy based actuators[END_REF]. This model as regards to port-Hamiltonian control is unsuitable. Firstly, in his approach, there is a mixture of local and global form. Either everything should be in local or everything should be global else the model becomes intractable.

Secondly, for the description of electric circuits, we have two choices. Either the circuit can be described in terms of charges and current or the system can be described in terms of voltages and ux linkages as explained in [START_REF] Stephen | Dynamics of mechanical and electromechanical systems[END_REF].

Then instead of having 2 equations for one conservative circuit element, only one is required. Considering the the rst line in Table 2.1, ∂H ∂φ = qc exists but ∂H ∂qc does not. Also, it is not seen how the MSMA converts the electrical energy to the mechanical energy. Though present, it has been drowned within equations.

Also, 3 Lagrange multipliers had to be used in both models. The rst one is used as the inductances modelled are not independent. The second because the MSMA also presents an inductive nature and the third was used because the MSMA was considered an eort source when in fact it is a ow source acting by means of variable z. The term eort and ow will be dealt with in later chapters.

And nally in treating hysteresis, no explicit expression for ż is given. In the static case, the dynamics of ż is not essential whereas for control purposes this dynamics becomes very important. An ad-hoc solution has been used to include hysteresis. The term

∂P hyst ∂ ż
is inconsistent with either the energy framework or state-space formulation in general.

The port-Hamiltonian model in this section, only solves the problem partially. It has reduced the number of states but the Lagrange multipliers and the hysteresis problem are still here. In the remaining of this thesis, we propose solutions to resolve these problems and give explicit dynamics on z.

We will also propose a model and a graphical view of the energy conversion process throughout the material.

The next chapter is the rst step towards resolving the problems. It details the physics of the MSMA as well as the derivation of the lumped parameters for the actuator.

Introduction

The purpose of this chapter is to explain the detailed working of the MSMA.

We start from the thermodynamics model done by Gauthier [START_REF] Gauthier | Modélisation des Alliages e Memoire de Forme Magnetiques pour la conversion d'energie dans les actionneurs et leur commande[END_REF] and extend it for our purposes. The rst aim is to understand how energies functionals proper to thermodynamics such as Gibbs free energy and/or Helmholtz free energies relates to energy functional as dened in the port Hamiltonian framework. Then, using constitutive equations for magnetization and strain, we derive the thermodynamic force which govern the evolution of the z variable. This model only takes into consideration the material but for the actuator, we need to also take into account the associated part such as the electromagnet and the load. In a second step therefore, we convert our model of the material to a lumped parameter model then extends it taking into account the associated parts. We will dierentiate between energy densities which will be written using the symbol W and lumped energy which will be written using W . We start by giving a brief overview of magnetism which will be used throughout this chapter.

Magnetism

In MSMA, magnetism plays a dominant role as it is this kind of energy that is converted to mechanical work. More specically, the material magnetization changes when there is an elongation and vice-versa. Hence, we dene some basics of magnetism to understand the terminology used in this chapter (see Appendix B for a brief treatment of magnetism).

The Magnetic Flux Density in free space

The magnetic ux density, B, produced by a current carrying conductor is given by the Biot-Savart law which states that

B(p) = µ 0 4π Ī × r r 2 = µ 0 I 4π d l × r r 2 (3.1)
where I is the current owing through the conductor, r is the vector between an element d l of the conductor and the point at which B is measured. I can be taken out of the integral since d l is in the same direction as the current I. µ 0 is called the permeability of free space and has a value of 4π × 10 -7 N/A 2 [START_REF] Jerey | Introduction to electrodynamics[END_REF][START_REF] Zahn | Electromagnetic Field Theory: a problem solving approach[END_REF].

Two results which will be stated without proof are the curl and divergence of B. The proof of these resu lts can be found in any standard textbook such as Griths [START_REF] Jerey | Introduction to electrodynamics[END_REF] and Zahn [START_REF] Zahn | Electromagnetic Field Theory: a problem solving approach[END_REF]. The divergence of B is

∇ • B = 0 (3.2)
which states that no magnetic monopoles exist. And the curl in free space is given by

∇ × B = µ 0 J (3.3)
where J is the current density. Apart from current, another source of the magnetic ux density are permanent magnets. They can produce a magnetic eld due to their magnetisation.

Magnetization

MSMA are ferromagnetic materials which gets magnetized in a magnetic eld. All magnetic phenomena are due to electric charges moving. In a material, there are electrons moving around orbits which produce a magnetic eld. These orbiting electrons can be considered to be magnetic dipoles.

Usually this magnetic eld cancel each other so that no net eld is observed.

The eect of applying an external magnetic eld to a material gives rise to three main types of magnetism. They are diamagnetism, paramagnetism and ferromagnetism.

In media where the induced dipole moment produces a eld which opposes B, is called "diamagnetic" medium. Some media contain permanent dipoles which are oriented at random even when there is no magnetic eld.

But under the action of a magnetic eld, the dipoles becomes oriented resulting in a dipole moment which is proportional to the external eld. These are called "paramagnetic" medium [START_REF] John | Electromagnetism[END_REF][START_REF] Jerey | Introduction to electrodynamics[END_REF].

The last type of magnetism which is ferromagnetism is an extreme case of paramagnetism. If the permanent dipoles are very close to each other in the medium, there proves to be an eect only, explainable only by quantum theory [START_REF] Jerey | Introduction to electrodynamics[END_REF], and called "exchange", which results in the strong tendency for the spins (direction of orbit of rotation of electron) of adjacent atoms or molecules to line up parallel to each other even in the absence of any eld. Such a parallel orientation can extend, in an unmagnetized body over volumes of a considerable scale on an atomic order, though a very small volume by ordinary standards. Such a volume is called a "domain", and an ordinary ferromagnetic body contains many such domains, each with a strong permanent moment, but oriented in dierent directions. In the presence of a magnetic eld, such domains change their orientation and align with the external eld until nally at very large eld all moments are aligned and the further increasing the eld has no eect. This is called saturation of the material. Reversing the eld reverses the moments, but there is an eect similar to friction, hindering this reorientation, so that, by the time the external eld is zero, there can still be a considerable moment. The eect of the moment lagging behind the eld is what gives rises to the phenomenon of hysteresis in ferromagnetic materials [START_REF] John | Electromagnetism[END_REF].

It has been shown that a magnetized [START_REF] Jerey | Introduction to electrodynamics[END_REF] body produces a magnetic eld outside it. Also, the magnetization can be attributed to surface and volume currents owing in the material. And these bounded currents can be calculated knowing the magnetization, M of the material. The bounded currents, J b , is given by

J b = ∇ × M (3.4)
The Magnetic eld intensity Now since the magnetic eld, B, derives from currents, we can rewrite it as a sum of free currents (those produced by a battery or a circuit), J f and bounded currents,

J b . ∇ × B = µ 0 (J f + J b ) (3.5)
which is equal to

∇ × B = µ 0 (J f + ∇ × M ) (3.6)
from which we can deduce

∇ × B µ 0 -M = J f (3.7)
The quantity B µ 0 -M is so important in engineering that it has been given a special name and symbol. Usually it is called the "magnetic eld intensity" and is denoted by H. Its importance lies in the fact that it gives the free current directly or can be calculated directly from free currents. The eld produced by a coil of wire is usually calculated using H instead of B. And in laboratory setting, it is the magnetic eld intensity H that we can control by varying the current passing in a circuit. The constitutive equation relating

B, H and M is B = µ 0 (H + M ) (3.8)
It has already been stated that in diamagnetic and paramagnetic materials, M is proportional to B and hence proportional to H we can therefore write

B = µ r µ 0 H (3.9)
where µ r is called the relative permeability of the material. Then the ratio of magnetization to magnetic eld intensity becomes

M = χ m H, µ r = 1 + χ m (3.10)
where χ m is the susceptibility of the material.

It will be seen later that MSMA exhibit nonlinear magnetization when subjected to a eld H 0 . Its relative permeability µ r and susceptibility χ varies with elongation of the material.

Physics of the MSMA

MSMA exhibit a deformation under the action of a magnetic eld. This magnetic induced deformation depends on the stress applied. The property which changes and can be exploited for sensor and actuator application is the permeability of the material. Figure 3.1 shows the deformation curve under dierent loading conditions [START_REF] Kiefer | Modeling the coupled strain and magnetization response of magnetic shape memory alloys under magnetomechanical loading[END_REF]. The stress dependent deformation is clearly visible as well as the highly hysteretic nature of the material.

Figure 3.1: Deformation with dierent applies stress [START_REF] Kiefer | Magnetic eld-induced martensitic variant reorientation in magnetic shape memory alloys[END_REF].

In MSMA, the macroscopic response is driven by 3 mechanisms 1. The motion of magnetic wall domains, 2. The local rotation of magnetization vectors,

The eld induced variant orientation

The rst two are common to ferromagnetic material whereas the last one is proper to Magnetic Shape Memory alloys. Nevertheless all of them contribute to the magnetization of the material. On cooling down from the austenite phase, all three martensite variants exists. Applying a stress in one direction say x[100], favours one particular variant, in gure 1.5 it would be variant M 2, which has its short axis, c, parallel to the stress.

This stress can be further increased until only one variant is present.

Then if this stress is lower than the blocking stress, martensitic variant orientation can still take place on applying a magnetic eld in the z[001] direction. Such a magnetic eld, would promote the appearance of variant M1.

At the blocking stress, σ b , this third mechanism will not take place hence no deformation will be observed.

Magnetic domains form in order to reduce the magnetization of the material and is termed the magnetostatic energy. They are separated by magnetic MSMA also behave in an anisotropic way. Such a behavior is characteristic of materials which have dierent magnetization along dierent crystallographic direction. Hence more energy is required to magnetize one direction than the other. The easy magnetization direction is called the easy axis whereas the hard axis is where more energy is required to magnetize.

Motion of Magnetic Wall

Before the application of a magnetic eld, the magnetization vectors are distributed in a positive and negative direction evenly in the material such that they cancel each other and there is no net magnetization. On application of a magnetic eld which coincides with the easy axis of magnetization, one of domain will grow at the expense of the other until all the magnetization vectors are in the same direction as the applied eld.

Rotation of Magnetization vector

When the applied eld is not in the direction of easy axis ,c, the magnetization has to rotate in order to align itself with the magnetic eld. Since in both domains, it is equally unfavorable, no domain wall motion is available to accommodate the magnetization. Energy has to be expended against the magnetocrystalline anisotropy energy. The amount of energy required is higher than that for domain wall motion. This therefore becomes the hard axis of magnetization. Figure 3.3 shows the normalized response to an applied magnetic eld for the hard and easy axis. It is clear that the magnetization energy which is dened as

U m = µ 0 M sat 0 H(M )dM (3.11)
is greater for the hard axis.

Strain Mechanism

When under no magnetic eld, there exists equal proportions of 3 variants. Since we are interested only in motion in the xy plane we will consider only 2 of them. The 2 variants called M1 and M2 are separated by a twin boundary.

Also, within each variants, magnetic domains exist which are seperated by 180 • walls. If no stress is applied to the material, the twin boundary will start to move, the eld preferred variant will grow at the expense of the stresspreferred variant. If a stress, greater than the blocking stress is applied, no deformation can take place. Hence the strain is governed by an interplay between the magnetic eld applied and the stress on the material.

Distributed Parameter Modelling of MSMA

In this section, we show how thermodynamics is applied to give the constitutive equation on the evolution of the volume fraction z. We use a continuum media description of the material. All the variables used in this section are densities.

In literature, numerous models have been developed for the characterization of the twinning rearrangement. Most of the models are based on the construction of a free energy function to nd equilibrium conguration for mechanical, magnetic and thermal load conditions. A model by James

and Wutting [START_REF] James | Magnetostriction of martensite[END_REF] relies on the theory of constrained micromagnetics. The terms contributing to the free energy are the Zeeman energy, the magnetostatic energy and the elastic energy. The magnetization is assumed to be xed to the magnetic easy axis of each martensitic variant because of high magnetic anisotropy. The microstructural deformations and the resulting macroscopic strain and magnetization response are predicted by detecting low-energy paths between initial and nal congurations. They conclude that the typical strains observed in martensite, together with the typical easy axes observed in ferromagnetic materials lead to layered domain structures that are simultaneously mechanically and magnetically compatible.

O'Handley [START_REF] Rorbert | Model for strain and magnetization in magnetic shape-memory alloys[END_REF] proposed a 2-D model in which two variants are separated by a single twin boundary and each variant itself consists of a single magnetic domain. The local magnetization is not necessarily constrained to the crystallographic easy axis. Depending on the magnitude of the magnetic anisotropy, either the magnetic anisotropy dierence (low magnetic anisotropy case) or the Zeeman energy (high magnetic anisotropy case) are identied as the driving force for twin boundary motion. For the intermediate case a parametric study is conducted showing the inuence of varying elastic and magnetic anisotropy energies. All cases assume an initial variant distribution that implies a remnant magnetization.

Likhachev and Ullakko [START_REF] Likhachev | Magnetic-eld-controlled twin boundaries motion and giant magneto-mechanical eects in nimnga shape memory alloy[END_REF] presented a model which identies the magnetic anisotropy energy dierence in the two variant twinned-martensite microstructure as the main driving force for the reorientation process. The eect of magnetic domains is taken into account in an average sense through the incorporation of curve tted magnetization data, corresponding to the magnetization along dierent crystallographic directions, into their model.

They argue that, regardless of the physical nature of the driving force, twin boundary motion should be initiated at equivalent load levels. With this assumption experimentally obtained detwinning-under-stress data in addition to the magnetization data of magnetic shape memory alloy martensite can be used to predict the constitutive behavior associated with the variant reorientation process under the application of external magnetic elds.

Hirsinger and Lexcellent [START_REF] Hirsinger | Internal variable model for magneto-mechanical behaviour of ferromagnetic shape memory alloys ni-mn-ga[END_REF] introduced the outline of a non-equilibrium thermodynamics based model. The free energy contains chemical, mechan-ical, magnetic and thermal contributions. The magnetic term is given by the Zeeman energy. Two internal state variables, the martensitic variant volume fraction and the magnetic domain volume fraction, are introduced to represent the inuence of the microstructure. The rate independent nature of their approach motivates the denition of driving forces for the twin boundary motion and the domain wall motion.

Mogylnyy et al. [START_REF] Mogylnyy | Crystal structure and twinning in martensite of ni< sub> 1.96</sub> mn< sub> 1.18</sub> ga< sub> 0.86</sub> magnetic shape memory alloy[END_REF] proposed a constitutive model for the martensitic twin rearrangement based on a statistical approach, in which the magneticeld-induced strains are related to the relaxation of the internal stresses in martensite due to magnetoelastic interactions. It should be mentioned that several other groups have contributed to the literature on modeling of MSMAs, which can not all be mentioned in this brief overview.

Representative Volume

To model our material, we will consider a small representative volume of the material which is transforming from M2 to M1 as shown in gure 3.4.

Internal variables as proposed in [START_REF] Hirsinger | Internal variable model for magneto-mechanical behaviour of ferromagnetic shape memory alloys ni-mn-ga[END_REF] are used to describe the micro-macro behaviour of the material. These variables are α, θ and z. When the material cools down from the austenite phase, equal amounts of variants M 1 and M 2 exist. Parameter α represents the fraction of domain wall which is aligned in the same direction as the eld whereas θ represents the angle between the applied magnetic eld and the natural orientation of the magnetization vector in M1. As discussed previously, on increasing the magnetic eld, domains walls in the same direction as the eld tends to grow whereas those not aligned disappear. Similarly for suciently high stress, when rearrangement is not possible, rotation of the magnetization vector occurs to align itself with the plane of the magnetic eld. there is an applied stress, the magnetization vector starts to rotate and there in an increase in the eld preferred variant. These processes are thought to occur simultaneously such that for some low stresses, complete reorientation does occcur while for stresses above a certain value, the magnetization vector saturates before complete reorientation and hence a mixture of both variants is present.

θ

(1 -z) M2 a c (z) M1 c a α θ (1 -α) H 0
twinning boundary domain wall

Thermodynamics of MSMA

Thermodynamics has proven a very useful tool to model this material as shown in Likhachev and Ullakko [START_REF] Likhachev | Magnetic-eld-controlled twin boundaries motion and giant magneto-mechanical eects in nimnga shape memory alloy[END_REF], Kiefer and Lagoudas [START_REF] Kiefer | Magnetic eld-induced martensitic variant reorientation in magnetic shape memory alloys[END_REF] and Sarawate [START_REF] Nandkumar | Characterization and Modeling of the Ferromagnetic Shape Memory Alloy Ni-Mn-Ga for Sensing and Actuation[END_REF]. There are two types of variables used in thermodynamics namley extensive and intensive. Extensive variables are those variables which depend on size of the system such as volume, mass, strain etc. whereas intensive variables are those variables which are energetically dual of extensive variables.

They are temperature, pressure, stress etc.

For the MSMA, the extensive variables are the magnetization, M , the strain of the material, ε and entropy S. The associated conjugate variable which is intensive in nature associated with each of the previous extensive variables are the magnetic eld, H 0 , the stress, σ and the temperature, T .

The extensive variables are the generalised coordinates whereas the intensive variables are the generalised forces. The internal energy U (M, ε, S) which depends on the extensive variables then completely characterises the state of the system at thermodynamic equilibrium. Futhermore, in our case we need 3 more variables, the internal variables, α, θ and z to complete the state during irreversible behaviour. The internal energy is then given by

U = U (M, ε, S, α, θ, z) (3.12)
In (3.12), the extensive variables are the independent variables i.e variables which can be varied independently by some external means. Unfortunately in our case, we cannot vary the magnetization or the strain. It is the applied magnetic eld, H 0 , which can be varied by changing the current.

And instead of the strain, we can control the stress by changing the load applied. Also, it is easier to work with the temperature, T , instead of entropy,

θ (1 -z) α M2 M1 θ (1 -α) (z) α (1 -α)
(a) On cooling both variants exist in same quantity.

θ

(1 -z) α M2 M1 θ (1 -α) (z) α (1 -α)
(b) Application of a magnetic eld makes α appears rapidly while θ rotates slowly.

θ θ

(1 -z) α M2 M1 (z)
(1 -z) α M2 θ (1 -α)
(g) On applying a very high stress with no magnetic eld, only M2 is present. All M1 dissappears. S for isothermal processes. For such purposes, instead of internal energy, U , we must make use of the Gibbs free energy, G, which is given by a Legendre transform as follows

G = U - n i X i q i (3.13)
where X i is the generalised force and q i the generalised coordinate.

Taking the independent variables as the stress, σ, the magnetic eld H 0 , the temperature, T , and the internal state variables α, θ and z, the constitutive dependencies are

G =G(σ, H 0 , T, α, θ, z) ε =ε(σ, H 0 , T, α, θ, z) M =M (σ, H 0 , T, θ, z)
And nally the main purpose of using thermodynamics is to derive a thermodynamic driving force, π z (H 0 , σ, T, α, θ, z) which gives the evolution of internal variable z. The driving force for α and θ are taken to be 0 as they are assumed to be reversible i.e purely magnetic hysteresis is negligible. On removal of the magnetic eld, α and θ return to their original position. To arrive at π z , a total Gibbs free energy, G, is derived and then dierentiated to obtain the driving force:

π z = - ∂G ∂z (3.14)
These constitutive dependencies, will follow in the following subsections.

Magnetization of MSMA

To quantify the magnetization, M , of the material in a eld of intensity, H 0 , all 3 internal variables α, θ, z are needed. In other words, M = f (α(H 0 ), θ(H 0 ), z). Variables α and θ take care of the saturation whereas z

gives the proportion of magnetization that each variant contribute. As proposed in Gauthier et al. [START_REF] Gauthier | Modeling rearrangement process of martensite platelets in a magnetic shape memory alloy ni2mnga single crystal under magnetic eld and (or) stress action[END_REF] and Hirsinger and Lexcellent [START_REF] Hirsinger | Internal variable model for magneto-mechanical behaviour of ferromagnetic shape memory alloys ni-mn-ga[END_REF], α, a function of H 0 , is taken to be

α = M 2M s + 1 2 = χ a H 0 2M s + 1 2 , α ∈ [0, 1] (3.15)
which gives

M = M s (2α -1) (3.16)
for the eld preferred variant M 2 and θ, also a function of H 0 , is taken to be

sin θ = M M s = χ t H 0 M s , θ ∈ [- π 2 , π 2 ]
(3.17) which gives for variant M 1

M = M s sin(θ) (3.18)
M s is the saturation magnetization, χ t and χ a are the domain susceptibilities.

Then again from Gauthier et al. [START_REF] Gauthier | Modeling rearrangement process of martensite platelets in a magnetic shape memory alloy ni2mnga single crystal under magnetic eld and (or) stress action[END_REF], Hirsinger and Lexcellent [START_REF] Hirsinger | Internal variable model for magneto-mechanical behaviour of ferromagnetic shape memory alloys ni-mn-ga[END_REF], it is proposed that the total magnetization is the sum of the magnetization for each variant (refer to gure 4.19 for a pictorial representation of α and θ).

M = M s (2α -1)z + (sin θ)(1 -z) (3.19)
Figure 3.6 shows the variation of α and θ where it can be seen that α saturates at a much lower value than θ.

Magnetic Energy

The magnetic energy stored or converted by the material can be found out from the constitutive (H 0 , M ) relationship. The work done by a battery is to establish the magnetic eld in the air gap as well as to increase the magnetization of the material (see Appendix B). Considering only the dierential work dW mag we require to magnetize the material, we have The energy density W mag is then obtained as follows

dW mag (M ) = µ 0 H 0 .dM (3.20) 0 0.2 0.4 0.6 0.8 0 0.2 0.4 0.6 0.8 1 µ 0 H 0 (Tesla) M M s z = 0.0 z = 0.1 z = 0.3 z = 0.5 z = 0.7 z = 0.8 z = 1.0 z = const.
W mag (M ) = M 0 µ 0 H 0 dM (3.21)
Due to the complicated nature of (3.19), no attempt has been made to invert it. In such cases, it is easier to work with the co-energy density. Figure 3.8

shows the co-energy (density) and energy (density) for the magnetization of the material. The energy is the area under the y-axis whereas co-energy is the area under the x-axis. It also depicts where α and θ get saturated.

From gure 3.8, we have

W mag + W * mag = µ 0 H 0 .M (3.22)
Dierentiating, we obtain

dW mag + dW * mag = µ 0 H 0 dM + µ 0 M dH 0 (3.23)
And nally replacing dW mag = µ 0 H 0 dM , results in

dW * mag = µ 0 M dH 0 (3.24)
The above steps is called a Legendre transformation, i.e we pass from an energy representation to a co-energy representation.

M Applying thermodynamics principles, we can now derive the magnetic Gibbs free energy, G mag . Starting from the internal energy (assuming it depends on M and T only) we have dU (M, S) = µ 0 H 0 dM + T dS

µ 0 H 0 W mag (M) (Energy) W * mag (H 0 ) (Co-Energy) dH 0 dM M = M s (2α(H 0 ) -1)z + (sin θ (H 0 )).(1 -z) α = 1 θ = π
We can then apply a Legendre transformation to make H 0 and T independent variables.

G mag (H 0 , T ) = U -T S -µ 0 HM Then dG mag =dU -T dS -SdT -µ 0 H 0 dM -µ 0 M dH 0 =µ 0 H 0 dM + T dS -T dS -SdT -µ 0 H 0 dM -µ 0 M dH 0 = -µ 0 M dH 0 -SdT
Since we are working at isothermal conditions, dT = 0. Then

dG mag = -µ 0 M dH 0 = -dW * mag (3.25)
The magnetic Gibbs free energy can then be calculated from the following equation

G mag = -W * mag (H 0 ) = - H 0 0 µ 0 M dH = - H 0 0 µ 0 M s (2α -1)z + (sin θ)(1 -z) dH 0 (3.26)
To be able to integrate (3.26), it has to be expressed in terms of H 0 . For this purpose, the saturation of α and θ has to be taken into consideration.

Note that we have 3 cases 1. α < 1 and θ < π 2 . H 0 < Ms χa .

2. α = 1 and θ < π 2 .

Ms

χa ≤ H 0 < Ms χt .

3. α = 1 and θ = π 2 . H 0 ≥ Ms χt .

For the rst case, the integral becomes

G mag = -µ 0 M s H 0 0 χ a H 0 M s z + χ t H 0 M s (1 -z) dH 0 = -µ 0 χ a H 2 0 2 z + χ t H 2 0 2 (1 -z) (3.27)
For the second case we have

G mag = -µ 0 M s Ms χa 0 χ a H 0 M s z dH 0 + H 0 Ms χa 1.z dH 0 + H 0 0 χ t H 0 M s (1 -z) dH 0 = -µ 0 H 0 M s - µ 0 M 2 s 2χ a z -µ 0 χ t H 2 0 2 (1 -z) (3.28)
and nally for the last case

G mag = -µ 0 M s Ms χa 0 χ a H 0 M s z dH 0 + H 0 Ms χa 1.z dH 0 + Ms χ t 0 χ t H 0 M s (1 -z) dH 0 + H 0 Ms χ t (1 -z) = -µ 0 M s H 0 - M s z 2χ a - M s (1 -z) 2χ t (3.29)
Equations (3.27), (3.28) and (3.29) will take part in the nal Gibbs free energy.

Mechanical Energy

The mechanical work done by or on the material consists of 2 parts. The rst part is the work done on the material to compress it elastically and the second part is the work done by the twinning strain in moving against the stress. If ε e is the elastic strain, γz the twinning strain, σ the applied and E the young modulus of the material, we have for innitesimal work dW mech = -σ dε e + γ dz The rst term on the right of (3.31) represents the elastic deformation of the material while the second term is the work done by the rearrangement of the martensite (twinning). σ is the stress applied to the material. γ

is the maximum deformation which can occur due to rearrangement of the martensite. It is typically taken as 0.06. Note that the elastic deformation is in opposition to the twinning rearrangement.

Since the elastic constant of the material is taken to be constant, the energy W mech is equal to the co energy W * mech .

W * mech (σ, z) = -

σ 2 2E + σγz (3.32)
This is the expression that will take part in constructing the Gibbs energy where G mech = -W * mech .

Gibbs Free Energy

The total Gibbs free energy can now be written

G(H 0 , σ, z) = G mag + G mech + K 12 z(1 -z) (3.33)
The last term in the left hand side of (3.33) is a term, called interaction energy, which has been added to account for the interaction between the variants. This term was taken from previous work [START_REF] Gauthier | Modélisation des Alliages e Memoire de Forme Magnetiques pour la conversion d'energie dans les actionneurs et leur commande[END_REF]. In later chapters, we will see how this term arises and give a proper explanation for its inclusion.

Explicitly, the Gibbs free energy can now be written as

G(H 0 , z, σ) = σγz - σ 2 2E + K 12 z(1 -z) -µ 0 M s z (2α -1)H 0 - M s 2χ a (2α -1) 2 +(1 -z) (sin(θ)H 0 - M s 2χ t sin 2 (θ) (3.34)
From (3.34), the thermodynamic potential appropritate to z can then be found

π z = - ∂G ∂z = σγ -K 12 (1-2z)+µ 0 M s (2α-1)H 0 - M s 2χ a (2α-1) 2 -H 0 sin θ+ M s 2χ t sin 2 θ (3.35)
which can be reduced to

π z = σγ -K 12 (1 -2z) -µ 0 M 2 s (1 -2α) sin θ χ t + (2α -1) 2 2χ a + sin 2 θ 2χ t (3.36)
π z is the thermodynamic potential that dictates the evolution of z and carries the dissipation of the material.

Lumped Parameters Modelling of MSMA

The purpose of this section is to write the model in terms of lumpedparameter variables. Lumped-parameters are dened as follows: the electromagnetic elds are quasi-static and electrical terminal properties can be described as functions of a nite number of electrical variables [START_REF] Woodson | Electromechanical Dynamics Part 1: Discrete Systems[END_REF].

In the last section, we derived the model of the MSMA element only in terms of eld parameters such as M and H 0 . For our purposes, we need to relate those parameters to lumped parameters such as current, i, and voltage, v as in a laboratory settings, these are the variables that can be measured. More specically we need to study the eect of induced emf due to the element's change in length on the circuit parameters of the actuator.

From the MSMA constitutive relations derived above, we will nd their lumped equivalent. Furthermore, instead of Gibbs free energy (G), we will use energy (W ) and co-energy(W * ) since we are assuming that our actuator will be working at constant temperature.

Terminal Variables

The lumped parameters of interest when magnetism is involved is the ux linkage, λ , the current, i and the induced emf, v ind when the magnetic eld changes. Consider the arrangement shown in gure 3.9. On application of a voltage to the terminals a and b, a magnetic ux Φ appears in the ferromagnetic core and the air-gap. From Faraday's Law it can be shown that the closed integral around the contour ab gives the induced emf [START_REF] Jerey | Introduction to electrodynamics[END_REF][START_REF] Zahn | Electromagnetic Field Theory: a problem solving approach[END_REF], v ind as follows Therefore, all the ux leaving the core, enters the air gap if we neglect leakage ux and fringing eect. Note in this case we have S t = S and thus we have Φ = SB.

v ind = L E.dl = -N dΦ dt = -N d dt St B.dS t (3.
To calculate B, we need to nd the magnetic eld intensities H c and H l and then use the relationship B = µ 0 H g for the air gap and B = µ 0 µ r H c for the core. This can be achieved by using Ampere circuital law [START_REF] Jerey | Introduction to electrodynamics[END_REF][START_REF] Zahn | Electromagnetic Field Theory: a problem solving approach[END_REF] which

is no more than ∇ × H = J f in integral form lc H.dl = H c .(l c -l g ) + H g .l g = I total enclosed = N i
The permeability µ r of the core is usually very high for a ferromagnetic material and can be approximated by an innite permeability. Then to keep the ux and the coil voltage constant, B has to be nite and H c should be zero.

lim µr→∞ = µ 0 µ r H c =⇒ H c = 0 B f inite (3.39)
Then we have all the magnetic eld intensity which appears across the airgap and is given by

H g = N i l g (3.40)
The magnetic ux density B is then given by

B = µ 0 H g = µ 0 N i l g (3.41) from which we can deduce Φ Φ = S.B = µ 0 SN i l g (3.42)
As Φ which is the ux for one loop cuts the coil N times, λ the magnetic ux linkage becomes

λ = N Φ = µ 0 SN 2 i l g (3.43)
from which the inductance, L, of the circuit is found to be

L = λ i = µ 0 SN 2 l g (3.44)
As seen from equation (3.44), the inductance depends only on the geometry of the circuit and in this case is a constant. In the case that µ r is not innity, we have

λ = µ 0 SN 2 i l g (1 -1 µr ) + lc µr = Li (3.45)
where L =

µ 0 SN 2 lg(1-1 µr )+ lc µr
. The dynamics of the system can then be written as

L di dt = v -iR (3. 46
)
where R is the resistance of the coil. The above development has shown how the eld variables can be related to the lumped parameters. Furthermore, it has been seen that inductance is a property of the whole circuit and we cannot subdivide a magnetic circuit into separate inductances as was done in Chapter 2. Although in theory, the latter is a very valid way of modeling, physically calculating individual inductances is not possible. To palliate this shortcoming, instead of inductances, reluctances should be used.

Reluctances

Magnetic circuits can be taken as analogous to resistive electronic circuit if we dene the magnetomotive force (MMF) F analogous to the voltage (EMF) as

F = N i (3.47)
The ux then becomes analogous to the current of electronic circuits so that the magnetic analog of resistance is reluctance, R dened as

R = F Φ = N 2 L (3.48)
The advantage of reluctances is that the rules of adding reluctances in series and parallel are the same as for a resistances in electric circuits. Figure 3.10 illustrates the concepts. For the iron core with innite permeability with 2 nitely permeable material, the reluctance of each gap is given by

R 1 = s 1 µ 1 a 1 D , R 2 = s 2 µ 2 a 2 D (3.49) r i u R leak R f er R eddy R air R msma
Φ = F R 1 + R 2 = N i R 1 + R 2 =⇒ L = N Φ i = N 2 R 1 + R 2 (3.50)
Again we see that the inductance, L, depends on the whole circuit whereas the reluctances characterize the individual element.

We will later see that reluctances are more equivalent to capacitors when bond graph modeling is introduced. In the static case, reluctances can be treated as equivalent resistances without any major problems but this cannot be so in the dynamic case. The main reason is that reluctances are energy storing element (an air gap stores magnetic energy) whereas resistances dissipate energy. The more appropriate electronic circuit element analogous to reluctance is the capacitor or more precisely 1 (Capacitor) . The reluctance of the air-gap, R f er , R gap , R msma can be calculated knowing their geometries whereas R leak should be measured. Now having the necessary tool to model electric and magnetic circuit, we proceed to nd the MSMA lumped parameters.

MSMA Actuator lumped Parameters

In this section, we will use the theory developed previously to write the lumped parameters of the MSMA actuator. Consider a MSMA sample in a magnetic eld H 0 as in Fig 3 .12. The sample length is l, its width is a and its depth is d. It is located in air gap of same width and depth but of dierent length w. In deriving the constitutive equations, as a rst approximation we will consider that the change in length of the MSMA is negligible i.e the air gap remains constant. We will use the magnetization M and the equation B = µ 0 (H 0 + M ) to nd the ux ,Φ. Then we will write the energy and co-energy of the magnetic part of the actuator. This will be useful for the port-Hamiltonian model.

Magnetization to Flux

From (3.19), the magnetisation of the material is given as :

∂G ∂H 0 = µ 0 M = µ 0 M s (2α -1)z + sin(θ)(1 -z) (3.51)
where α = χaH 0 2M s + 1 2 and sin(θ) = χtH 0 M s are the internal variables representing weiss domain and z is the volume fraction of variant M 2.

The three cases to be considered are

(α < 1, θ < π 2 ), (α = 1, θ < π 2 ) and (α = 1, θ = π
2 ). The magnetisation equation (3.51) then becomes:

M =    M s (2α -1)z + sin(θ)(1 -z) , if (α < 1, θ < π 2 ) M s z + sin(θ)(1 -z) , if (α = 1, θ < π 2 ) M s , if (α = 1, θ = π 2 ) (3.52)
Also from electromagnetic theory,

B = µ 0 (M + H 0 ) (3.53)
Hence in terms of B, (3.52) becomes :

B =    µ 0 χ a H 0 z + χ t H 0 (1 -z) + µ 0 H 0 , if (α < 1, θ < π 2 ) µ 0 M s z + µ 0 H 0 (χ t (1 -z) + 1), if (α = 1, θ < π 2 ) µ 0 M s + µ 0 H 0 , if (α = 1, θ = π 2 ) (3.54)
Since we are assuming that the permeability of the core generating the eld in the air gap is innite, all the magnetic eld appears in the air gap. And if it is generated from a solenoid containing N turns and in which a current of i amperes is owing, then it is given as:

H 0 = N i a (3. 55
)
where a is the width of the air gap (see Fig 3 .12).

Substituting (3.55) into (3.54), we obtain:

B =    µ 0 χ a z + χ t (1 -z) + 1 N i a , if (α < 1, θ < π 2 ) µ 0 M s z + µ 0 N i a (χ t (1 -z) + 1), if (α = 1, θ < π 2 ) µ 0 M s + µ 0 N i a , if (α = 1, θ = π 2 ) (3.56)
Having B we can relate it to the ux, φ msma , which passes through the MSMA.

φ msma = AB = ldB

(3.57)
where , A = l × d is the cross sectional area of the MSMA. Hence (3.57) can be writted as:

φ msma =    N iµ 0 ld a χ a z + χ t (1 -z) + 1 , if (α < 1, θ < π 2 ) µ 0 M s zld + N ildµ 0 a (χ t (1 -z) + 1), if (α = 1, θ < π 2 ) µ 0 M s ld + N ildµ 0 a , if (α = 1, θ = π 2 ) (3.58)

Constitutive Relations

Relations in the electrical domain can be derived as follows. The electrical part and magnetic part should be treated as a whole. Since the current i across the MSMA does not quite have a meaning, to derive the equations, we need to consider the whole circuit generating the H eld. Then only we can relate the current i owing in the solenoid to λ, the total ux linkage.

The net ux owing in the circuit is given by

φ =φ air + φ msma = N i(w -l)dµ 0 a + N iµ 0 ld a χ a z + χ t (1 -z) + 1 (3.59)
We know from electric circuits that λ = N φ

λ =      N 2 i(w-l)dµ 0 a + N 2 iµ 0 ld a χ a z + χ t (1 -z) + 1 , if (α < 1, θ < π 2 ) N 2 i(w-l)dµ 0 a + N µ 0 M s zld + N 2 ildµ 0 a (χ t (1 -z) + 1), if (α = 1, θ < π 2 ) N 2 i(w-l)dµ 0 a + N µ 0 M s ld + N 2 ildµ 0 a , if (α = 1, θ = π 2 ) (3.61)
which can be reduced to

λ =      N 2 i(w)dµ 0 a + N 2 iµ 0 ld a χ a z + χ t (1 -z) , if (α < 1, θ < π 2 ) N 2 i(w)dµ 0 a + N µ 0 M s zld + N 2 ildµ 0 a (χ t (1 -z)), if (α = 1, θ < π 2 ) N 2 i(w)dµ 0 a + N µ 0 M s ld, if (α = 1, θ = π 2 ) (3.62) Taking K 0 = N 2 (w)dµ 0 a , K 1 = N 2 (l)dµ 0 a and K 2 = N µ 0 M s ld further simpli- cation is possible. λ =    K 0 i + K 1 i χ a z + χ t (1 -z) , if (α < 1, θ < π 2 ) K 0 i + K 2 z + K 1 i(χ t (1 -z)), if (α = 1, θ < π 2 ) K 0 i + K 2 , if (α = 1, θ = π 2 ) (3.63)
i =        λ K 0 +K 1 (χaz+χtz(1-z)) , if (α < 1, θ < π 2 ) λ-K 2 z K 0 +K 1 (χt(1-z)) , if (α = 1, θ < π 2 ) λ-K 2 K 0 , if (α = 1, θ = π 2 ) (3.64)
Figure 3.13 shows the graph of the constitutive equations for dierent values of z. The gure was obtained using values shown in Table 3.1. These values are very close to the circuit values. The two saturation values α = 1 and θ = pi 2 are clearly seen. One dierence to be noted with the magne- tization curve of gure 3.7 is that no plateau of saturation exists. This is because of the air-gap present which never saturates. Finally, in deriving the equation, it was assumed that the air-gap is not aected by the change in length of the MSMA. This proved to be a valid assumption as seen from Figure 3.14. It is seen that very little change occurs due to this change in length. The deformation of the MSMA is related to z. At z = 1, the deformation is around 6%. This has been taken into consideration to produce these results.

Energy Considerations

As has been done for the case of the local parameters, we derived a thermodynamics force, π z , which gives the evolution of z, we will in this section derive the same driving force in terms of the lumped parameters. For such a purpose we will apply energy relations which is common for systems where there is a coupling between dierent domains.

It has been shown that the electrical terminal relations are in the form expressed by λ = λ(i, z)

(3.65)
Applying a force on the MSMA results in a change in "inductance" and hence in the magnetic energy stored. We can now make an assumption that the lumped driving force, f mag of magnetic origin which does work also depends on

f mag = f mag (i, z) (3.66)
Then if the total magnetic energy stored by the system is denoted by W mag , we can write idλ = dW mag + f mag dz Equation (3.67) states that the work done by the electric circuit is either stored as magnetic energy (in case the MSMA is blocked) or can be used to do work. The evaluation of the change in W mag when λ or z is varied is given by the integration of (3.67). This is a line integration through the variable space (λ, z). These two variables are the independent variables i.e they can be varied independently of each other. Suppose we want to nd the change in stored energy when the independent variables change from (λ a , z a ) to (λ b , z b ). Figure 3.15 shows the possible paths in the variable space. Thus using path C, we have

W mag (λ b , z b ) -W mag (λ a , z a ) = - z b za f mag (λ a , z)dz + λ b λa i(λ, z b ) (3.68)
One property of conservative systems is that the energy does not depend on the path taken. It is a state function. Our system though being dissipative in nature, we can divide it in a conservative part and a dissipative part. The dissipative part will be added later. Hence if we take the conservative part, we can choose any path which makes the integration easier. One commonly used method [START_REF] Woodson | Electromechanical Dynamics Part 1: Discrete Systems[END_REF] is to assemble the system mechanically keeping dλ = 0, then no force is required to overcome forces of magnetic origin hence f mag = 0. Then, we put the energy through the electrical ports by keeping the geometry xed (dz = 0). We then have all the energy accounted for only by

0 = i - ∂W mag ∂λ dλ -f mag + ∂W mag ∂z dz (3.72)
This from (3.72), we have Sometimes instead of the energy, it is easier to work with the co-energy, W * mag (i, z). One of the reason is because the constitutive relationships are easier in one sense than the other. For our case, the λ(i) relationship is easier to work with rather than the i(λ). Another reason is that the co-energy variables in a particular system are the independent variables rather than the energy variables. Such transformations are very common in thermodynamics where the co-energies are given dierent names such as Gibbs, Helmholtz etc.. The co-energy is obtained from a Legendre transformation such as

i = ∂W mag ∂λ f mag = - ∂W mag ∂z λ z λ a λ b z a z b dλ = 0 C dz = 0 D A B (1) (2) (4) (3)
W * mag (i, z) = iλ -W mag (λ, z) (3.73)
Using the co-energy, then the force of magnetic origin is given by

f mag = ∂W * mag ∂z (3.74)
To construct the energy and co-energy using a path where the system is assembled mechanically rst i.e all the energy input to the system is accounted by the electrical part only, we have to integrate the constitutive equations (3.64) and (3.63) taking into account the piecewise continuous nature of these equations. We will now derive in detail the co-energy functional and then for the energy functional and the associated driving force for z, the reader is referred to Table 3.2.

Taking into account the saturation, the corresponding current, i α for α = 1, using equations (3.15) and (3.54), becomes

i α = M s a N χ a (3.75)
and for θ = π 2 , the corresponding saturation current, i θ is

i θ = M s a N χ t (3.76)
The co-energy W * mag (i, z) is given by

W * mag (i, z) = i 0 λdi (3.77) Then for i < Msa N χa W * mag = i 0 (K 0 i + K 1 i χ a z + χ t (1 -z) )di (3.78) = 1 2 (K 1 χ a z + K 1 χ t (1 -z) + K 0 ) i 2 (3.79) for Msa N χa < i < Msa N χt W * mag = Msa χa 0 (K 1 χ a zi)di + i Msa N χa (K 2 z) + i 0 (K 0 i + K 1 iχ t (1 -z))di = 1 2 K 1 zM s 2 a 2 χ a N 2 + K 2 z i - M s a N χ a + 1 2 (K 1 χ t (1 -z) + k 0 ) i 2 (3.80)
and nally for i > Msa N χt

W * mag = Msa χa 0 (K 1 χ a zi) di + i Msa N χa (K 2 z) di + Msa N χ t 0 (K 1 iχ t (1 -z)) di + i Msa N χ t (K 2 (1 -z)) di + i 0 K 0 i di = 1 2 K 1 zM s 2 a 2 χ a N 2 + K 2 z i - M s a N χ a (3.81) + 1 2 K 1 (1 -z) M s 2 a 2 χ t N 2 + K 2 (1 -z) i - M s a χ t N + 1 2 K 0 i 2
The above development is also carried out for the energy function W mag (λ, z)

and then the driving force,f mag is given by

f mag = - ∂W mag ∂z = ∂W * mag ∂z (3.82)
The resulting equations are presented in Table 3.2 which shows that f mag depends only on the current but is a function of both λ and z. Using the values from Table 3.1 and the driving force equations from Table 3.2, Fig. 3.16 shows how f mag varies with current and Fig. 3.17 shows the same dependance on λ and z. In both cases, the same driving force is observed for whatever values of z as expected.

dW = idλ - f dz dW * = λdi + f dz Constitutive Equations i =        λ K 0 +K 1 (χaz+χ t z(1-z)) , (α < 1, θ < π 2 ) λ-K 2 z K 0 +K 1 (χ t (1-z)) , (α = 1, θ < π 2 ) λ-K 2 K 0 , (α = 1, θ = π 2 ) λ =    K0i + K1i χaz + χt(1 - z) , (α < 1, θ < π 2 ) K0i + K2z + K1i(χt(1 - z)), (α = 1, θ < π 2 ) K0i + K2, (α = 1, θ = π 2 )
Energy Relation

Wmag(λ, z) =        1 2 λ 2 K 0 +K 1 (χaz+χ t (1-z) , (α < 1, θ < π 2 ) 1 2 iαC1 + λ 2 -2K 2 zλ 2C 2 - C 2 1 -2K 2 zC 1 2C2 , (α = 1, θ < π 2 ) 1 2 iαC1 + C 2 3 -2K 2 zC 3 2C 2 - C 2 1 -2K 2 zC 1 2C2 + λ-K2 K 0 -C 3 -K 2 K 0 , (α = 1, θ = π 2 )
Co-Energy Relation

W * mag (i, z) =      1 2 (K1χaz + K1χt(1 - z) + K0)i 2 , (α < 1, θ < π 2 ) K 1 zM 2 s a 2 2χaN 2 + K2z i -Msa N χa + 1 2 (K1χt(1 - z) + K0)i 2 , (α = 1, θ < π 2 ) 1 2 K 1 M 2 s a 2 N 2 -K 2 Msa N z χa + (1-z) χ t + K2i + 1 2 K0i 2 , (α = 1, θ = π 2 )
Force Relation The other mechanism which drives the reorientation of martensite in MSMA is the stress applied to the material. And when subjected to both a magnetic eld and a stress, the thermodynamic driving force, f tot , is given by

- ∂Wmag ∂z =        1 2 λ 2 (K 1 (χa-χ t )) (K 0 +K 1 (χaz+χ t (1-z))) 2 , (α < 1, θ < π 2 ) iαC 1 2 -K 2 λ C 2 - K 2 λzC 2 C 2 2 - 2C 1 C 1 C 2 - C 2 1 C 2 C 2 2 + 2K 2 C 1 C 2 + K 2 zC 1 C2 + K 2 zC 1 C 2 C 2 2 , (α = 1, θ < π 2 ) , (α = 1, θ = π 2 ) ∂W * mag ∂z =      1 2 K1(χa - χt)i 2 , (α < 1, θ < π 2 ) K 1 M 2 s a 2 2χaN 2 + K2 i -Msa N χa -1 2 K1χti 2 , (α = 1, θ < π 2 ) 1 2 K 1 M 2 s a 2 N 2 -K 2 Msa N 1 χa -1 χ t , (α = 1, θ = π 2 ) Constants C1 = iαK1(χaz + χt(1 - z)), C2 = K0 + K1χt(1 - z), C3 = K0i θ + K2z + K1i θ χt(1 - z) iα = Msa N χa , i θ = Msa N χ t 0 0.5 1 1.5 2
f tot = f mag + f mech (3.83)
where f mech is the driving force due to the mechanical stress. and the mechanical co-energy is given by

W * mec = 1 2 F 2 ext k + F γlz (3.86)
The total strain x t is then given by Finally as in the thermodynamics case, the total energy is given by

x t = ∂W * mec ∂F ext = F ext k + γlz = x e + γzl
W (x e , z, λ) = W mag + W mec (3.89)
and the driving force, f z is given by

f tot z = ∂W mag ∂z + ∂W mech ∂z (3.90)
And nally if to be coherent with the thesis of Gauthier [START_REF] Gauthier | Modélisation des Alliages e Memoire de Forme Magnetiques pour la conversion d'energie dans les actionneurs et leur commande[END_REF], we add the term called interaction energy which gives

f tot z = ∂W mag ∂z + ∂W mech ∂z + K 12 (1 -2z) (3.91)

Discussion

In this chapter, we used thermodynamics to model the material. Thermodynamics being quite universal, from its premises we were able to derive two very important constitutive relations. The rst is the driving force which dictates the evolution of the internal variable z and the second was to obtain the relation between the total strain x t from the elastic and twinning strain.

In the distributed parameter section, we used thermodynamics free energies (Gibbs) to get to the driving force while in the lumped parameter section, we employed a more classical view. What we have called energy and denoted W in the lumped parameter part is actually the Helmholtz free energy, F . The Helmholtz free energy is actually F = U -T S and it gives the available energy at constant temperature.

Hence in the port Hamiltonian modelling for electric circuits, mechanical circuits where temperature and entropy are neglected, we are actually using the Helmholtz free energy.

Truly speaking if a strict view of energy is to be adopted as the ability to produce heat and/or work, we should always include entropy as it is a natural variable for internal energy.

Secondly we have shown that employing co-energies sometimes result in easier derivation of relationship between generalised forces and generalised coordinates. In any energetic framework, both energy and co-energy should be employed consistently as one representation may give better insight or simpler results than the other.

Furthermore, this chapter has given an explicit form of the magnetic and mechanical energy and their derivation in terms of the lumped parameters, something that was missing in [START_REF] Gauthier | Modélisation des Alliages e Memoire de Forme Magnetiques pour la conversion d'energie dans les actionneurs et leur commande[END_REF] and in general literature. Thus we can now embark to derive the port Hamiltonian equation of the actuator where these energies will play a central part. We will also give an explanation in the next chapter as to where the term K

69

To be able to control the MSMA actuator, it is important to know the entire dynamical trajectory. The bond graph approach provides a very systematic way to derive the mathematical model. Not only does it provide to derive the equations but it also helps visualise the ow of power in the system. The energy conversions and dierent couplings that exist between domains is easily discernible much unlike the 2 models in chapter 2 where it was impossible to see how the electrical energy of the actuator was converted to mechanical energy. Finally, it reveals one other very important feature of the actuator-its topology. Topology of a circuit refers to the way dierent elements are connected. The interconnection of these elements impose a set of constraints on the system which further determines the system behaviour.

Oster and Desoer [START_REF] Oster | Tellegen's theorem and thermodynamic inequalities[END_REF] states that there are 2 underlying structures to most physical models-one topological and one dynamic. The port Hamiltonian framework just employs such a representation. It separates the constitutive equations ('dynamic') from the interconnection ('topological') and it is very closely related to the bond graph methodology as both uses energy as a central theme.

Network Modelling

To model simple systems consisting entirely of mechanical or electrical domain, it is sucient to use the traditional methods such as Newton laws for mechanical systems or Kirchho current/voltage laws for electrical systems.

For more complicated systems, Lagrangian or Hamiltonian formalism can be used and they usually yield very good results.

But unfortunately for systems consisting of a large number of such elements the amount of equations can rapidly grow very large.

Linear graph theory or network graphs has been widely used [START_REF] Es Kuh | Basic circuit theory[END_REF] in electrical circuit analysis to analyze and establish their properties. This approach rst models the topology of the circuit without regards to any particular element and then afterward only the circuit elements are taken into consideration to derive the dynamical equations using through and across variables.

Bond Graphs, invented by Paynter [START_REF] Henry | Analysis and design of engineering systems[END_REF], is another systematic approach widely used to derive system equations. Using eort and ow variables, it models in a graphical way the power exchange between elements in a systems.

While linear graphs has a sound mathematical basis, bond graph does not possess such a rich mathematical background even though attempts have been made in [START_REF] Birkett | The mathematical foundations of bond graphsi. algebraic theory[END_REF][START_REF] Birkett | The mathematical foundations of bond graphsii. duality[END_REF][START_REF] Birkett | The mathematical foundations of bond graphsiii. matroid theory[END_REF].

Other methods such as behavioral modeling proposed by Willems [START_REF] Willems | The behavioral approach to open and interconnected systems[END_REF] is a very powerful method but it is mathematically very demanding.

These methods have the advantage that unlike an input/output (i/o) representation, the system description is viewed as a constraint on a set of variables and systems are connected without any i/o assignment beforehand.

State space description is derived from basic system representation only after having decided on the inputs and the outputs. or same electrical potential at same point etc [START_REF] Shearer | Introduction to system dynamics. Addison-Wesley series in systems and controls[END_REF].

A rapid review of bond graphs will follow in the following sections before deriving the MSMA actuator dynamic model.

Energy ow in Bond Graph

A set of primitive elements which form the building blocks for the construction of dynamic models for physical systems may be dened from energy ows within the system, and between the system and its environment. The principle of conservation of energy provides a fundamental basis for characterizing such elements.

Basically there are 4 types of elements, two energy storage elements, one dissipative element and source elements.

Example of source elements in the electrical domain would be a current source or a voltage source whereas in the mechanical domain it would be a velocity source such as a cam or a force source.

The dissipative element in electrical domain would be a resistor whereas in mechanical domain it would be a damper.

The 2 dierent energy storage are related to the type of energy they store. In mechanical domain, there exists the kinetic energy and the potential energy whereas in the electrical domain we can distinguish between electric energy (energy stored in a capacitor due to charges) and magnetic energy (energy stored in an inductor).

From the law of conservation of energy, the change in energy, ∆E, is equal to the work done ,∆W , by or on the system and the heat exchanged, ∆Q. Namely the power ow in any branch is given by

P(t) = ef f ort e × f low f = v × i electrical = F × v mechanical (4.1)
Furthermore two additional useful variables can be dened called generalized momenta, p, which is the integral of the eort variable and, q, the generalized displacement which is the integral of the ow variable as shown by equation (4. The rst 2 equations of (4.3) are energy which can be stored and retrieved later whereas the third one is energy loss as heat. Nonetheless, they suggest that 3 types of elements are responsible for energy exchange or conversion.

The inductive element

The inductive element or "I"-element is an energy storing device which is characterized by a static relationship between ow f and generalized momentum p. The constitutive equation is given by p = p(f )

(4.4)
For an inductor, the ux linkage (generalized momentum), λ, in the linear case is given by λ = Li The relationship between the ow (current, i) and the eort (voltage, v) variable is given by

dλ dt = L di dt v = L di dt
and the energy stored in the inductor is

E = λ 0 idλ = 1 2L λ 2 (4.6)
while the co-energy is given by

E * = i 0 λdi = 1 2 Li 2 (4.7)
A clear distinction will always be made between energy and co-energy as they are equal in the linear case but for the non-linear case, they are not.

The capacitive element

The capacitive element is one in which there is a static relationship between the generalized displacement and the eort variable.

q = q(e)

(4.8)
In a capacitor, the charge, q, is a generalized displacement variable and the eort variable is the voltage v across the plates. In a linear capacitor, q = Cv (4.9)

C is termed the capacitance.

In a similar fashion to the inductor, the energy and co-energy are given by:

E = q 0 vdq = 1 2C q 2 E * = v 0 qdv = 1 2 Cv 2

The resistive element

The resistive is an element in which power is dissipated. It relates the eort variable to the ow variable.

e(t) = e(f ) where D is called the content and the co-content is given by

D * = f 0 edf (4.
12)

The sum D + D is the total power supplied or extracted from the system.

Bond Graphs

The bond graph method [START_REF] Henry | Analysis and design of engineering systems[END_REF][START_REF] Dean C Karnopp | System Dynamics: Modeling, Simulation, and Control of Mechatronic Systems[END_REF] is a graphical approach to modeling in which component energy ports are connected by bonds that specify the transfer of energy between system components. Power, the rate of energy transport between components, is the universal currency of physical systems. The graphical nature of bond graphs separates the system structure from the equations, making bond graphs ideal for visualizing the essential characteristics of a system [START_REF] Gawthrop | Bond-graph modeling[END_REF].

In a bond graph a half arrow head is used to indicate the power ow between elements and junctions and they are called a bonds. The direction of the arrow is the direction of power ow and each arrow is labeled with an eort, e, and a ow variable, f . And these arrows connected to the elements above, junctions, transformers and gyrators makes up a bond graph.

Finally, causality, which relates cause to eect, helps to gain insight into the system. Due to the simplicity of the representation, causality appears naturally and is much more evident in bond graphs. In linear graph, causality is determined by the tree and co-tree whereas in bond graph it is a casual stroke (vertical line) added to the arrows. In this thesis, causality has been fundamental in determining relationships and equations which will be discussed shortly.

Junctions

Central to the idea of bong graph are junctions. There are two kinds of junctions the 0 -junction and the 1 -junction. These junctions are ideal in the sense that they neither store or dissipate power and mathematically they are just a simple graphical notation for a set of linear constraint equations such as KVL and KCL. Taking current to be ows and voltages to be eorts and assuming that all causalities are respected, the equation for the system are dervived as follows. Taking the inductor ux p = λ and the capacitor charge q as state variables, we have ṗ = e 5 and q = f 4 .

The junctions give the following relationship

f 3 = f 4 + f 5 , e 3 = e 4 = e 5 (0-junction). f 1 = f 2 = f 5 , e 1 = e 2 + e 3 (1-junction). (4.13)
while the constitutive relationships are q = f 4 , e 4 = 1 C q (Capacitor).

ṗ = e 5 , f 5 = 1 L p (Inductor). From the above relationships, we see that e 5 = e 4 and hence

f 2 = e 2 R , (Resistor).
ṗ = q C (4.15)
and

f 4 =f 3 -f 5 f 4 =f 3 - p L = e 2 R - p L = e 1 R - e 3 R - p L f 4 = q = u R - q RC - p L
which be can be written in port-Hamiltonian form. Since H(q, p) is

H = q 2 2C + p 2 2L
the port Hamiltonian representation becomes:

q ṗ = -1 R -1 1 0 q C = v C p L = i L + 1 R 0 u (4.16) y = 1 R 0 q C p L (4.17)

Transformers and Gyrators

In addition to elements such as Eort Source (Se), Flow Source (Sf ), Ielement, R-element, C-element, 0-junction and 1-junction, two other important elements are the gyrator(GY ) and the transformer(T F ). The former elements are called one-ports elements while gyrator and transformers are called two-port elements.

These elements are power converting elements i.e they either convert power within a single domain or from one domain to another. As in an electrical transformer, in a bond graph transformer also, the ratio of eorts is equal to the inverse ratio of ows whereas in a gyrator, the eort at one end of the port depends on ow at the other port and vice-versa. Examples of transformers are gear trains and electrical transformer among others whereas an example of gyrator would be the conversion of electrical energy to mechanical energy in DC motors or the voice coil transducer. and for a gyrator:

e 2 f 2 = 0 r 1 r 0 e 1 f 1

Causality

Causality is an important feature of modeling. It dictates which bond sets the eort and which bond set the ow. It represents a constraint between the ow and eort variable. One immediate consequence is that the ow and eort cannot be specied independently. For example if a mass is being pulled with a certain velocity, then the force, F, experienced by the mass, m, at velocity, v is given by:

F = m dv dt (4.18)
On the other hand if the mass is subjected to a force then the velocit is given by:

v(t) = v 0 + t 0 F m dt (4.19)
Equation (4.18) is called derivative causality whereas equation (4.19) is called integral causality. It can be shown that all independent energy elements can be represented in integral causality. This also dictates the input and output of such an element.

Once the bond graph has been obtained, it is acausal in nature. Once the input has been decided, a state space model can be found. Furthermore, for a state space model, integral causality is preferred as it does take into consideration initial conditions. Causality is also important in simulations as it reveals if algebraic loops are present in the systems. Systems in which causality cannot be assigned are usually ill-posed.

In bond graph, causality is indicated by means of the casual stroke added at the end or at the start of a bond. The element adjacent to the casual stroke sets f whereas the other element sets e as shown in gure 4.5.

In bond graph, eorts and ows sources always have xed causality which is natural. Eort sources will set e whereas ow sources will set f as shown in gure 4. gating causalities, the integral form cannot be assigned, then there is either a problem in the model or there are storage elements which are dependent.

This will give rise to algebraic loops in the simulation. It is to be noted that on a 0-junction there is only 1 causal stroke whereas on a 1-junction, all but 1 bond has a casual stroke. This is due to the fact that on a 0-junction only 1 bond sets the eort and on a 1-junction, only 1 bond sets the ow.

I : L f = 1 L e dt
In addition, for comparison, the voltage input was changed to a current input and the bond graph is shown in 4.10a. This completely changes the dynamics of the circuits. Firstly, the resistor is no longer the element which sets the current as is shown by the causality change. This can also be seen in the state space equation (4.20).

q ṗ = 0 -1 1 0

v c i l + 1 0 i (4.

Bond Graph Examples

Till now, we have only seen an electrical example, all the power of bond graphs shows up in modelling coupled domains. We will illustrate examples which will help us understand the MSMA.

Mechanical Example

Figure 4.11 shows an example of a mechanical system and its corresponding bond graph. The systems is a class mass-spring system but with an additional velocity input. For mechanical systems, force is taken as the eort variable whereas velocity is taken as the ow. The bond graph is then written as follows, a "1" is written for each distinct velocities and then "0" added where there is common force. Once the bond graph is obtained, the power ow as well as the causality are found and then the equations can be written as described above. For this particular system, the state space equations are:

q ṗ = 0 1 m -k -b m q p + 0 -1 1 -b F ω (4.21)
Taking the Hamiltonian H to be

H = kq 2 2 + p 2 2m
the port Hamiltonian representation becomes:

q ṗ = 0 1 -1 -b kq p m + 0 -1 1 -b F ω (4.22) y = 1 0 0 1 kq p m (4.23)

Electromechanical Example

The DC motor is a very popular electromechanical device. It converts electrical energy to mechanical energy. As seen in the bond graph of gure 4.12, it is the gyrator which couples the electrical side and the mechanical side.

The back emf induced is proportional to the speed at which the motor is turning wheras the torque is proportional to the current. This constant of proportionality is K, found on the gyrator.

E =Kω τ =Ki

The state space equation for this dc motor is given by:

L R V ω Se : V 1 R : R L : L GY : K 1 L : J R : b e 1 f 1 e 2 f 2
ṗe ṗm = -R L -K J K L -b J p e p m + 1 0 V (4.24)

A non-linear example: Magnetic Levitation

The magnetic levitation system is a good example of a non-linear system.

The system consists of a sphere of ferromagnetic material which is levitated using a magnetic eld. In this typical example, the inductance varies with the position, q, of the ball. An approximate constitutive law can be given by L(q) = k a + q where a and k are constants. The energy stored in the magnetic eld is given by

W = λ 2 .(a + q) 2k (4.26)
This energy has been represented by an "IC" eld. It is commonly used to represent energy elements who depend on multiple set of coordinates. This does not add any more complexity to our model except that our constitutive equation now depends on more than one variable. In the maglev case, the constitutive equations are

i(λ, q) = ∂W ∂λ = λ(a + q) k F (λ, q) = ∂W ∂q = λ 2 2k
The state equations are then found to be as follows:

e 3 = λ f 3 = ∂W ∂λ = λ(a + q) k λ = e 1 -e 2 λ = u -Rf 2 = u -Rf 3 λ = u -R λ(a + q) k e 4 = ∂W ∂q = λ 2 2k f 4 = q = f 5 q = p m e 5 = ṗ f 5 = p m e 5 = e 6 -e 4 ṗ = mg - λ 2 2k
By taking x 1 = λ, x 2 = q and x 3 = p, the Port Hamiltonian model can be written as:

ẋ =       0 0 0 0 0 1 0 -1 0   J -   R 0 0 0 0 0 0 0 0   R     ∂H ∂x +   1 0 0   u (4.27)
with H being the Hamiltonian of the system.

H = x 2 1 .(a + x 2 ) 2k -mgx 2 + x 2 3 2m (4.28)

MSMA Actuator Bond Graph

The purpose of this section is to derive the dynamic equations of the actuator.

In chapter 3, we only considered the actuator in a static case. We derived all the necessary constitutive equations. Thermodynamics methods were applied to derive the constitutive relation between z and the thermodynamic driving force π (distributed parameter). As explained in the last chapter, this parameter is integrated to give the lumped parameter, f . It is an intensive parameter with its dual z the extensive parameter. It is an eort variable just like voltage/force in electrical/mechanical domain.

Electric Subsystem

Q elec MSMA Subsystem Q hyst Mechanical Subsystem Q mech λ i F int żγl v i F ext ẋ
Environment at constant temperature.

MSMA Actuator. As stated before, the actuator consists of 3 parts. The electric/magnetic part, the MSMA part and the mechanical part. Figure 4.14 depicts a schematic diagram of the actuator. It exchanges energy with its environment through an electrical port and a mechanical port. Losses in the form of heat is dissipated to its surroundings. Q elec is the joule heating which occurs in the resistor of the electrical circuit, Q hyst is the losses due to hysteresis and Q mech is the heat generated by viscous friction on the mechanical side.

Each part will be considered separately and they will be connected together. Also, hysteresis which has been treated sparsely will be detailed and it will be shown how an energy consistent formulation can be made.

Electric/Magnetic Subsystem Bond Graph

For the electric/magnetic part, there are 2 possible representations depending on the level of detail that is required. We can adopt an inductance representation or a reluctance representation.

For an inductance representation, lets consider the electric circuit of the actuator shown in Figure 4.15a. This circuit shows the resistance of the coil as r as well as a non-linear inductor. This non-linear inductor represent the relationship between λ, i and z. The relationship between these 3 variables is given in (3.63). From an energetic point of view, it means that the energy stored in the inductor is aected by both the electrical side and the MSMA side. For a xed current, this energy can be changed by applying a force on the MSMA or for a xed applied force, this energy can be modied by changing the current. As in the magnetic levitation model, when the energy depends on more than one coordinate, an "IC" eld as seen in gure 4.15b

, is used to model such phenomena. Using W mag (from Table 3.2), as the energy stored in the "IC" eld, the equation for the electrical subsystem is derived as follows:

u(t) r i λ = f (i, z) λ (a) Electric circuit of MSMA Actu- ator. f (i, z) denotes that the ux linkage λ is a function of i and z. MSMA Se : u 1 R : R IC e 1 = u f 1 = i e 2 = v r f 2 = i e 3 = λ f 3 = i e 4 = f mag f 4 = ż (b) Bond Graph of Electric subsystem.
e 3 = λ f 3 = ∂Wmag ∂λ e 3 = e 1 -e 2 λ = u -Rf 3 = u -R ∂W mag ∂λ (4.29)
The port-Hamiltonian representation of this circuit, taking u as input and i as output, given the Hamiltonian H e = W mag is

λ = (0 -R) J -R ∂H e ∂λ + u y elec = ∂H e ∂λ = i
so that the product of input and output is power.

Reluctance Model Bond Graph

Just for the sake of completeness, we show in Figure 4.16 the bond graph of the reluctance circuit shown in Figure 3.11. The reluctances have been modelled by capacitors as they are energy storing elements. Throughout this thesis, we have assumed that all the magnetic eld H 0 produced by the coil appears in the air gap. This assumption relies on the fact that we have neglected parasitic eects, eddy current losses and we have taken the permeability of the ferromagnetic core to be innite. Usually this is not the case. The reluctance circuit is useful if we need a ner model and it helps to model each individual magnetic element separately. Also, it gives access to one more measurement, the magnetic eld in the air gap. Furthermore, if any saturation is present in the ferromagnetic core, this can easily be incorporated with this model.

The model shows that the MSMA and the air gap have been lumped

together. This has been done for 2 reasons. Firstly since they are in parallel they are not independent (causality problem) and secondly it is easier to incorporate it in the "IC" eld in this manner. Our constitutive equations for the "IC" thus remain the same else we would have to separate the air gap part from the msma part. This model will not be further discussed, we will adopt its ideal circuit equivalent to keep things manageable else the number of equations will quickly get unwieldy.

Se : u 1 R : r GY : N 0 C leak 1 C f er R f er MSMA + Air e 1 f 1 e 2 f 2

Mechanical subsystem Bond Graph

The MSMA mechanical model is shown in and the displacement due to twinning strain γzl which is

x z = l 0 γz dl = γzl (4.31)
The variable γ is the maximum twinning strain achievable. Finally, the momentum of the mass is denoted by p t .

The bond graph of the mechanical model in Figure 4.17b shows that there exists a constraint between ẋe , γ żl and ẋt . Notably only 2 of them are independent.

ẋt = γ żlẋe

(4.32)
It should be emphasized that the direction of x e and γzl are opposite when operating in actuation mode whereas in sensing mode, they would be in the same direction. The bond (e 8 , e 9 ) can take both directions. Hence it depends really how power is owing-i.e is the magnetic eld increasing or decreasing when the applied load is constant. The kinetic energy of the mechanical system is given by

W k (p t ) = 1 2 p 2 t m (4.33)
and the potential energy is and again (F ext . ẋt ) is a power.

W p (x t , z) = 1 2 kx 2 e = 1 2 k(x t -γzl)
H m = 1 2 k(x t -γzl) 2 + 1 2 p 2 t m (4.37) is ẋt ṗt 0 1 -1 -b J -R ∂Hm ∂xt ∂Hm ∂pt + 0 1 B F ext mg (4.

MSMA subsystem Bond Graph

The bond graph of the MSMA is made up of two ports. The electric port represented by the "IC" eld and the mechanical port represented by the transformer "TF" as shown in Figure 4.18. The 2 ports represents the energy conversion process between the electrical subsystem to the MSMA subsystem and then from the MSMA subsystem to the mechanical subsystem.

The "IC" eld is used because of the non-linear energy function. In fact it is just a non-linear capacitor coupled to a non-linear inductor through a nonlinear transformer. These kinds of energy storage element are very common where the energy stored depends on one or more generalised coordinate and one or more generalised momentum. A common example is the solenoid [81, chap. 3] or the previously explained magnetic levitation system where the energy stored depends both on the ux and the position.

In the MSMA, thus, both types of conservative elements exists (I and C), since z is the volume fraction, a change in its value directly related to the change in the elongation of the material. Hence from a bond graph point of view, on the mechanical side, it is a transformer.

MSMA

Electric IC 1 On the electrical side on the other hand, the two internal variables α and θ were taken to be reversible variables. Figure 4.19 shows the elementary representative volume. The eect of the magnetic eld H 0 is to make domains parallel to it align in the same direction i.e α grows and θ aligns with the plane of the magnetic eld as shown in gure 4.19. Once the magnetic eld is removed they return to their original position if the pre-stress is sucient i.e the energy which can be recovered depends greatly on the value of z. This is due to the hysteretic nature of z.

R : hysteresis T F: γl Mechanical e 3 = λ f 3 = i e 4 = f mag f 4 = ż e 5 = f tot f 5 = ż e 6 = f mech f 6 = ż e 7 = σ A f 6 = γ żl
θ The hysteretic part (e 5 , f 5 ) in gure 4.18 has as input the eort e 5 (deduced from location of causal stroke) which is the total thermodynamics driving force related to the mechanical part and the electrical part. As the dynamics of z is related to these 2 competing forces, it is this force that moves the z. The mechanical thermodynamics driving force is given by

(1 -z) M2 a c (z)
Se : u 1 R : r IC 1 TF:γl Hysteresis 0 C : k 1 I : m R : b Se : mg u i u r i u λ = λ i f mag ż f mech ż f total ż σ .A ẋtw = γ żl σ .A ẋe σ .A ẋt σ I .A ẋt σ R .A ẋt σ mg .A ẋt
f mech = ∂H m ∂z
whereas the electrical thermodynamics driving force is given by

f mag = ∂H e ∂z
where H m and H e are the Hamiltonians of the electric and mechanical subsystem. From the bond graph, it is seen that this total thermodynamics driving force, f tot is

f tot = -f mag -f mech (4.40)
and that ż is common to all the bonds in the MSMA subsytem. Hence the R : hysteresis part takes in the eort e 5 = f total and gives ż to the system hence ż = g(.)

where g(.) is a possibly non-linear operator which characterises hysteresis.

The latter will be made explicit in the next section.

As of now, our bond graph for the actuator is as shown in gure 4.20.

Taking the Hamiltonian to be

H(λ, x t , p t , z) = H e (λ, z) + H m (xt, p t , z) = W mag (λ, z) + W k (p t ) + W p (x t , z) (4.42)
Its port-Hamiltonian formulation is

        λ ż ẋt ṗt         =         -r 0 0 0 0 g(.) 0 0 0 0 0 1 0 0 -1 -b                 ∂H ∂λ ∂H ∂z ∂H ∂xt ∂H ∂pt         +         1 0 0 0 0 0 0 1           u = u ext mg = F ext   (4.43)
with output

y =   1 0 0 0 0 0 0 1           ∂H ∂λ ∂H ∂z ∂H ∂xt ∂H ∂pt         =   i ẋt   (4.44)
where g(.) represents hysteresis. We now proceed to understand and detail the hysteresis part and propose a way to include it in a port-Hamiltonian framework.

Hysteresis in MSMA

Hysteretic behaviour is very problematic from a control point of view. Usually hysteresis is modelled as an input/output map. This view is not consistent with energy formulation as discussed in Goldfarb and Celanovic [START_REF] Goldfarb | Modeling piezoelectric stack actuators for control of micromanipulation[END_REF] and Karnopp [START_REF] Karnopp | Computer models of hysteresis in mechanical and magnetic components[END_REF]. In this section, an energy consistent formulation is made which can then be incorporated in the port-Hamiltonian framework.

Q hyst = f dz (4.45)
Therefore in the process of hysteresis, a part of energy is dissipated and a part of energy is conserved. The dissipative part is modelled using an R-element whereas the conservative part is modelled using a C-element.

The values of f + cr and f - cr shown in gure 4.21, usually called critical values, for the Magnetic Shape Memory alloy are those values below which determine whether reorientation can take place. These values depend on the current, i, and the load (stress) applied to the material. Once f + cr is exceeded while the material is taking the ascending path, reorientation starts to take place and elongation occurs. The reverse occurs when the material is taking the descending path. Once the value of the thermodynamic force becomes lower than f - cr , the material starts to shorten.

From these considerations, the R-element (damper) should be non-linear with a dead zone between f + cr and f - cr . The constitutive equation for the C- element need not necessarily be non-linear, it can be linear. The particular choice depends on the complexity required [START_REF] Karnopp | Computer models of hysteresis in mechanical and magnetic components[END_REF]. For our purposes, we choose a simple linear law. These two elements are connected in parallel to make one hysteron-a basic unit of hysteresis-because they experience the same force. 1 From the bond graph, looking at the causality strokes, we nd that the eort, f tot is the input to the system whereas ż1 is the output. On the other hand, the C-element, takes as input ż1 and gives the eort, f int whereas the R-element takes in an eort, f dis and gives back ż1 . The R-element therefore sets the ż1 of the element. The continuity equation gives

C 1 f int 1 ż1 R 1 f dis 1 ż1 f tot ż1 (b) Bond Graph of basic hysteretic R-C element.
f tot = f int 1 + f dis (4.46)
whereas all the element share the same ż.

Taking the capacitive element as linear with a stiness coecient of k h1

we have the following constitutive equations

f int 1 = k h1 z 1 , z 1 is the input (4.47)
and for the R-element, we have

ż1 = g 1 (f dis 1 ) (4.48)
where g 1 (.) is the relationship between ż and f dis similar to an electrical resistance where v = R q for the linear case or v = f ( q) for the non-linear values are reached. Also, according to the second law of thermodynamics, Qhyst ≥ 0 which forbids the constitutive equation for the R-element to be in the 2 nd and 4 th quadrant. The losses according to gure 4.21 can be more explicitly written as

Q hyst = f tot dz = f int 1 dz =0 (conservative) + f dis 1 dz =0 (dissipative) (4.49)
Also, the slope of the line should be adjusted according to experimental data. Being a constitutive relationship it is therefore rate-independent. Such a formulation of hysteresis allows us to include it into the port-Hamiltonian formulation. To calculate, ż1 , we make use of the bond graph to obtain Using these relationship, a very basic simulation was performed where a sinusoidal input was applied to one hysteron (f tot is the sine wave as it is the input to a hysteron). Figure 4.24 shows a comparison between the shape of experimental value (gure 4.24a) obtained with our the experimental setup and one the simulation (gure 4.24b).

ż1 = g 1 (f dis ) = g 1 (f tot -f int (z)) = g 1 (f tot -k h1 z 1 )
Though very crude, this gure 4.24 gives us some insight into the workings of the actuator. It tells us that the values f + cr and f + cr changes with applied load. Also, as seen with one hysteretic element the simulation result are not very smooth. To palliate this problem, just like in the Preisach case, more than one of basic hysterons units should be used depending on the accuracy needed. This is done by taking a number of hysterons and joining them in series as in Figure 4.25a. Each hysteron should be subjected to the same force hence the series connection.

Depending on this force, they will all switch according to their constitutive equations. All those hysterons (characterised by dierent critical values (f + cr and f - cr ) and dierent spring stiness (k hn )) depending on their state will contribute to a fraction of z. The bond graph in gure 4.25b also has the advantage that any number of hysterons can be added and the bond graph will still be causal. And nally, the dynamic equation for each hysteron is

1 0 1 C 1 f int 1 ż1 R 1 f dis 1 ż1 f tot ż1 1 C 2 f int 2 ż2 R 2 f dis 2 ż2 f tot
ż1 = g 1 (f dis 1 ) = g 1 (f total -f int 1 (z 1 )) ż2 = g 2 (f dis 2 ) = g 2 (f total -f int 2 (z 2 )) . . . żn = g n (f dis n ) = g n (f total -f int n (z n ))
As each hysteron contribute to the nal value of z as follows

z = z 1 + z 2 + • • • + z n (4.50)
The Hamiltonian of the whole system becomes

H(λ, x t , p t , z 1 , z 2 , • • • , z n ) =W mag (λ, z 1 , z 2 , • • • , z n ) + W k (p t ) + W p (x t , z 1 , z 2 , • • • , z n ) + W h1 (z 1 ) + W h2 (z 2 ) + • • • + W hn (z n ) (4.51)
where W hn = 1 2 k hn z 2 is similar to the energy stored in a linear spring. The port-Hamiltonian model can then be written as:

                  λ ż1 ż2 . . . żn ẋt ṗt                   =                   -r 0 0 0 0 0 0 0 g 1 (.) 0 0 0 0 0 0 0 g 2 (.) 0 0 0 0 0 0 0 . . . 0 0 0 0 0 0 0 g n (.) 0 0 0 0 0 0 0 0 1 0 0 0 0 0 -1 -f                                     ∂H ∂λ ∂H ∂z 1 ∂H ∂z 2 . . . ∂H ∂zn ∂H ∂xt ∂H ∂pt                   +                   1 0 0 0 0 0 . . . . . . 0 0 0 0 0 1                     u mg   (4.52)
with output

y =   1 0 0 • • • 0 0 0 0 0 0 • • • 0 0 1                     ∂H ∂λ ∂H ∂z 1 ∂H ∂z 2 . . . ∂H ∂zn ∂H ∂xt ∂H ∂pt                   (4.53)

Discussion

In this chapter, using energy methods we have obtained a coherent port Hamiltonian model of our system. Bond graph methodology was presented and used to model the system. The dynamics on the ż variable which was missing from [START_REF] Gauthier | Modeling rearrangement process of martensite platelets in a magnetic shape memory alloy ni2mnga single crystal under magnetic eld and (or) stress action[END_REF] and [START_REF] Calchand | From canonical hamiltonian to port-hamiltonian modeling: Application to magnetic shape memory alloys actuators[END_REF] is seen to come from the dissipative nature of hysteresis.

This model also has all its causality respected, therefore use of Lagrange multipliers or dierential causality has not been necessary. It has also allowed us to view the energy ow throughout the MSMA actuator.

Though this bond graph has been done for an actuator, it can be readily extended to a sensor just by reversing the direction of power of a few arrows.

The push-pull actuator can also be represented by using this bond graph and its mirror image and connecting them together through the external mechanical port. Causality should be reassigned while doing so. Furthermore, this actuator is actually voltage controlled. It would be interesting to replace the voltage input with a current input in the actuator's bond graph and see the dierences and diculties that arise.

It has also been shown in this chapter that hysteresis can be included into the port Hamiltonian framework in an energetically coherent manner.

This has many advantages as regards to the understanding and control of the material. Also, many possibilities open up such as how much energy can be recuperated in one hysteresis loop as well as how much is dissipated. This quantication can be really important in applications like energy harvesting.

On a nal note, the interaction energy K 12 z(1z) present in Chapter 3 can now be explained. This term was added to account for the hysteresis of the material. As seen in this chapter, hysteresis stores energy in a C-element.

Hence there exists a constitutive relationship between f and z of the type f = kz where f is an eort and z is an integrated ow.

Having our model, we now turn to some basic experimental results we performed on a test bed and the subsequent control of the actuator.

Chapter 5

Basic Experimental Validation and Control Perspectives

Introduction

This chapter is divided into 2 parts. In the rst part, we detail the experimental setup to see the general behaviour of the material and the associated problems which might arise. In the second part, we show the rst steps in designing a port Hamiltonian control law for the material. Both parts represent the rst steps towards implementation of a working control law in a real time testbed.

Experimental Setup

An experimental testbed has been designed and built to investigate the behavior of the material, the MSMA actuator, to validate proposed model, to identify model parameters and nally to test possible control laws. The experimental setup consists of two main parts; an electrical part and a mechanical part. The electrical part is used to generate the high magnetic elds needed whereas the mechanical part is used to apply stress to the material as well to measure the deformation of the material. tween 0-10V 1 is sent from the controller to the power amplier. This signal is amplied so as to provide a magnetic eld which varies between 0 and a maximum value which causes the magnetization of the MSMA to saturate.

This forms the electrical part of the experimental setup. On application of the magnetic eld, the deformation, which depends on the stress applied to the material, is measured using a laser sensor. To measure the position and to apply a stress, a movable mechanical structure has been designed.

The main purpose of the electrical part is to be able to generate a variable magnetic eld. The maximum value of the magnetic eld should be enough so as to saturate the MSMA. This value is around 0.65T . An electromagnet is therefore required to generate such a high magnetic eld. The electromagnet consists of a ferromagnetic core with an air gap where the MSMA is inserted.

The constraints that should be taken into consideration are the size of the MSMA which is 3mm × 5mm × 20mm. The built electromagnet, has a value of l n = 350mm and l e = 5mm. Its cross-sectional area is 30mm × 47mm. as well as the built electromagnet. Furthermore, the electromagnet requires a very high power supply as the coil shown in the gure has a resistance of around 8Ω, and a current of around 8A is required to saturate the material.

As for the mechanical part, its main purpose is to apply a stress as well as to help measure the position. To achieve such a purpose, a structure as shown in Figure 5.3 is constructed.

It consists of an MSMA holder and a movable platform. The holder xes the MSMA in an upright position. The movable platform xed on rollers then applies a stress on the material by means of dead weights placed on top of it. In the presence of a magnetic eld, the MSMA deforms which in turns moves the platform. A laser displacement sensor then measures the displacement of the platform from which the deformation of the MSMA is deduced. 1 We have only used the positive values 0-10V but the device can be used in the -10 to +10V range As seen in gure 5.5b, for a value of 0.54 MPa the actuator does not return back to any position even when the magnetic eld is zero. This is typical of a dissipative material. Also for a few other values of stress, the material starts from a zero deformation goes to a certain maximum deformation but does not return back to the zero value. It oscillates about some other position.

As expected from the theory, the weight (load) applied to the MSMA greatly inuences its response.

Furthermore, the magnetic eld produced in the air gap (where the material is located) is dependent on the current not the voltage (a certain dynamics exists between the voltage and the current since in addition to resistance of the coil, inductance of the electromagnet core also inuences it.). The relationship between current and position was therefore measured and gure 5.6 shows the hysteresis of the material only. An important information which can be inferred from the gure is that there is a certain critical value which must be reached before any positive or negative deformation takes place in addition to dierent paths taken while ascending and descending.

A rst model of hysteresis using preisach was formulated and the algorithm implemented as discussed in [START_REF] Tan | Modeling and control of hysteresis[END_REF]. It is seen that the preisach model can model hysteresis very precisely but unfortunately it is usually an inputoutput model. Without some kind of modications, it cannot be used in our energetic framework. But on the other hand, it gives us some ideas about how to proceed with our hysteretic model.

The preisach plane Tan and Iyer [START_REF] Tan | Modeling and control of hysteresis[END_REF], Iyer and Tan [START_REF] Ram | Control of hysteretic systems through inverse compensation[END_REF] which is a description of all possible hysterons in a plane also has some nice properties.

Control Perspectives

In an engineering context, to control means to make a system behave in a desired manner. In a more precise engineering denition it may be dened "to stabilise a system in a desired equilibrium point or trajectory". For linear systems, many techniques are available. They are described in [START_REF] John C Doyle | Feedback control theory[END_REF][START_REF] Charles | Feedback systems: input-output properties[END_REF][START_REF] Kwakernaak | Linear optimal control systems[END_REF] whereas the control of non-linear systems [START_REF] Vidyasagar | Nonlinear systems analysis[END_REF] revolves around Lyapunov's methods [START_REF] Hassan | Nonlinear systems[END_REF] Lyapunov-based control is a quite dicult task which involves the construction of a suitable Lyapunov function. The philosophy behind nding such a function derives from a physical observation: if the total energy of a mechanical (or electrical) system is continuously dissipated, then the system, whether linear or nonlinear, must eventually settle down to an equilibrium position [START_REF] Slotine | Applied nonlinear control[END_REF]. Hence, stability may be concluded by examining the variation of a single scalar like function. This function is alike to the energy (or storage [START_REF] Willems | Dissipative dynamical systems part i: General theory[END_REF]) function. The main dierence between many nonlinear control techniques is the way in which the Lyapunov method is constructed. This has given rise to many dierent nonlinear control schemes such as backstepping, adaptive [START_REF] Slotine | Applied nonlinear control[END_REF] or Sliding Mode Control [START_REF] Hassan | Nonlinear systems[END_REF].

Passivity-based Control [START_REF] Ortega | Passivity-based control of Euler-Lagrange systems: mechanical, electrical and electromechanical applications[END_REF] is based on the fact that nonlinear systems systems, [START_REF] Ortega | Passivity-based control of Euler-Lagrange systems: mechanical, electrical and electromechanical applications[END_REF][START_REF] Stramigioli | Modeling and Control of Complex Physical Systems: The Port-Hamiltonian Approach/Vincent Duindam[END_REF] to modify the energy function such that it has a minimum at the desired equilibrium position.

Passivity Based Control

In the linear domain, most control problems have been solved using a signal processing point of view as for linear time-invariant systems, signals can be discriminated via ltering. The frequency domain can thus be used to design control laws as exemplied by the robust control framework [START_REF] Skogestad | Multivariable feedback control: analysis and design[END_REF][START_REF] John C Doyle | Feedback control theory[END_REF]. However for nonlinear systems, frequency mixing makes this approach impossible as computations are far from obvious and very complex controls using very high gains are needed to minimise a large number of undesirable signals.

Most of the problem lies in the fact that no information about the structure is used. A shift in control paradigm is needed and this can be summarised in the catch phrase "control as energy exchanging entities". A detailed presentation of this energy-based approach is given in [START_REF] Ortega | Putting energy back in control[END_REF], [START_REF] Ortega | Interconnection and damping assignment passivity-based control of port-controlled hamiltonian systems[END_REF] and [START_REF] Stramigioli | Modeling and Control of Complex Physical Systems: The Port-Hamiltonian Approach/Vincent Duindam[END_REF].

Passivity can be dened as follows:

Denition 5. If the velocity is taken as v = ẋ, we have

t 0 F (s)v(s)ds = t 0 (m v + kx(s) + bv(s))v(s)ds = 1 2 mv 2 (s) + 1 2 kx 2 (s) t 0 + b t 0 v 2 (s)ds =H(x(t)) -H(x(0)) + b t 0 v 2 (s)ds
Since d(t) > 0 and there exists a function H(x), the system is passive. Then if x * is a global minimum of H(x)), with no input u = F , the system will reach x * asymptotically. This rate can be increased by setting the input u

to u = -K di y (5.2) with K T di = K di > 0.
This is the key idea behind passivity based control: use feedback.

u(t) = β(x(t))

(5.3)

where β(x) is a function of the states, so that the closed loop system is again a passive system with respect to the map β → y . The closed loop energy H(d), is then a global minimum at the desired point. With (5.3), H a the energy supplied to the system (minus) is

H a = - t 0 β T (x(s))y(s) (5.4)
then the closed loop energy is given by

H d (x(t)) = H(x(t)) - t 0 β T (x(s))y(s) = H(x(t)) + H a (x(t)) (5.5)
Most control strategies in the port Hamiltonian framework tries to change the original energy function H to a desired one H d that has a minimum at the desired equilibrium. These techniques have been called IDA-PBC.

IDA-PBC Technique

The main idea behind the IDA-PBC technique [START_REF] Ortega | Putting energy back in control[END_REF] is to change the matrices Assume there are matrices

J d = -J T d , R d = R T d > 0
and a smooth function H d that verify the so-called matching equation

f (x) + g(x)u = (J d (x) -R d (x)) ∂H d ∂x (5.8)
Then the closed-loop with control u = β(x),

β(x) = (g T (x)g(x)) -1 g T (x)((J d (x) -R d (x)) ∂H d ∂x -f (x)) (5.9)
is asymtotically stable.

Most of IDA-PBC relies on solving the matching equation (5.9) in one form or the other. The freedom in choosing J d ,R d and H d has given rise to many variations of IDA-PBC (see [START_REF] Ortega | Interconnection and damping assignment passivity-based control: A survey[END_REF][START_REF] Ortega | Putting energy back in control[END_REF][START_REF] Stramigioli | Modeling and Control of Complex Physical Systems: The Port-Hamiltonian Approach/Vincent Duindam[END_REF]) for more details). Some are given below.

• In Non-Parametrized IDA, the structure and damping matrices are xed, the matching equation is pre-multiplied by a left annihilator of g(x) and the resulting PDE in H d is solved.

• In Algebraic IDA, the desired Hamiltonian function H d is rst selected and then the resulting algebraic equations are solved for J d and R d .

• In Parametrized IDA, applicable mainly to underactuated mechanical systems, the knowledge of a priori structure of the desired Hamiltonian is used to obtain a more easy to solve PDE.

• In Interlaced Algebraic-Parametrized IDA, the PDE is evaluated in some subspace (where solution can be easily computed) and then matrices J d , R d are found to ensure valid solution of the matching equation.

One of the way to solve the matching equation which belong to the class of non-parametrized IDA is to introduce new matrices J a , R a and an energy function H a . Then the matching equation to solve is:

[J(x) + J a (x) -R(x) -R a (x)] ∂H a ∂x = -[J a -R a ] ∂H ∂x + g(x)β(x) (5.10)
where

J a (x) = J d (x) -J(x) R a = R d (x) -R(x) (5.11)
and

H a (x) = H d (x) -H(x)
(5.12)

The closed loop representation of the port-Hamiltonian is then given by: We will apply this technique to both a magnetic levitation system and the MSMA actuator. Also, for the MSMA we will try an algebraic IDA. [START_REF] Ortega | Putting energy back in control[END_REF][START_REF] Stramigioli | Modeling and Control of Complex Physical Systems: The Port-Hamiltonian Approach/Vincent Duindam[END_REF][START_REF] Ortega | Putting energy back in control[END_REF]]. We take this example here due to the similarity between the model and our MSMA actuator as seen from their bond graphs. They both contain magnetic circuit, a variable inductance and an energy eld with 2 constitutive equations. We rst work out the control law for this system using IDA-PBC techniques to get the basics right. This allows us to draw some parallel between the 2 systems. q is measured position from a datum line and λ is the ux linkage. The latter changes when q changes-λ = L(q)i. Usually for such systems, the inductance, L, varies with distance q. When q = 0 corresponds to the postion where the ball is fully in contact with the magnetic core. Then the inductance constitutive law can be taken as follows:

ẋ = [J d -R d ] ∂H d ∂x
L = k a + q (5.14)
The identied values are given in table 5.1: And hence, the constitutive law relating i and λ is: λ = L(q)i (5.15)

For simulation purposes , we use the following values: the resistance of the coil is taken to be R = 5Ω, the number of turns N = 40, gravitational acceleration is taken as g = 9.81ms -2 , the mass of the ball is m = 0.05kg, constants k = 0.7107Hm and nally a = 0.5m.

Port Hamiltonian Model.

Using the model derived earlier, the equations of motion for the system are:

λ = -Ri + u q = v m v = F + mg
Taking x 1 = λ, x 2 = q and x 3 = mv = p, the Port Hamiltonian model can be written as:

ẋ =       0 0 0 0 0 1 0 -1 0   J -   R 0 0 0 0 0 0 0 0   R     ∂H ∂x +   1 0 0   u y = 1 0 0 ∂H ∂x (5.16)
with H being the Hamiltonian of the system.

H(λ, q, p) =

x 2 1 .(a + x 2 ) 2k -mgx 2 + x 2 3 2m
(5.17)

As a rst design, we take J a = 0 and R a = 0, we see that equation (5.10) reduces to

[J -R]K(x) = Gβ(x)      -RK 1 (x) = β(x) K 2 (x) = 0 K 3 (x) = 0 (5.18)
and, consequently, H a depends only on x 1 with resulting energy function

H d = x 2 1 .(a + x 2 ) 2k -mgx 2 + x 2 3 2m + H a (x 1 ) (5.19)
and Hessian

    a+x2 k + d 2 dx1 2 Ha (x1 ) x1 k 0 x1 k 0 0 0 0 1 m    
(5.20)

Using software like M aple c , it can be shown that the hessian has at least one negative eigenvalue (not positive denite) for whatever value of H a . Hence though an equilibrium point x * 2 can be assigned, its asymptotic stability cannot be guaranteed.

The problem lies in the lack of coupling between mechanical and electrical domain. Therefore, we choose a J a such that

J a =   0 0 -α 0 0 0 α 0 0   (5.21)
which adds the required coupling and R a = 0 . Eq (5.10) then reduces to

-RK 1 -αK 3 = αx 3 m + β(x)
(5.22)

K 3 = 0 (5.23) αK 1 -K 2 = - αx 1 (a + x 2 ) k (5.24)
which after solving (5.24) gives the required H a

H a = - x 3 1 6kα - x 2 1 (a + x 2 ) 2k + Φ( x1 α + x 2 ) (5.25)
where Φ is an arbitrary function which can be used for equilibrium assignment and to assure stability of the closed loop Hamiltonian.

If x = xx * , α and b > 0 then a possible choice for Φ is:

Φ( x1 α + x 2 ) = mg x2 + x1 α + b 2 x2 + x1 α 2 (5.26)
where b is used to control the rate of convergence.

Then using (5.22), the control law is given by

β(x) = -R ∂H a ∂x 1 - αx 3 m (5.27) = R α x 2 1 2k -mg + Rx 1 (a + x 2 ) k - Rmgb α x2 + x1 α - αx 3 m (5.28) = R α x 2 1 2k -mg + Rx 1 (a + x 2 ) k -K p x2 + x1 α - αx 3 m (5.29)
The new energy function H d then becomes b was taken as 1. Hence asymtotic stability can be assured for x 1 < 0. Since x * 1 = √ 2kmg, we take the negative value of it.

H d = - x 3 1 6kα -mgx 2 + p 2 2m + mg x2 + x1 α + b 2 x2 + x1 α 2 (5.
     1 m 1 2 2 mgk-x1 + √ 4 m 2 g 2 k 2 +x1 2 k -1 2 -2 mgk+x1 + √ 4 m 2 g 2 k 2 +x1 2 k      (5.
Taking a look at the open loop energy and the closed loop energy in gure 5.12, we see clearly that the shape of the hamiltonian has changed to have a minimum at the desired position.

Figure 5.13 show the result obtained when applying the control law above.

It can be seen that the response is very oscillatory in nature.

Damping

Although our system is stable and we do reach the equilibrium point, the oscillatory response is very unsatisfactory. In practice, such large overshoots will make the ball either stick to the electromagnet or fall.

To remedy this situation, damping should be added. This is done by changing the structure of matrix R a which was previously taken to be 0.

The J a matrix remains the same. We remove the damping from the electrical part (x 1 ) and adds it to the position (x 2 ) Our new J a -R a matrix therefore becomes:

J a -R a =   R 0 -α 0 -R α 0 α 0 0   (5.35)
and

J d -R d =   0 0 -α 0 -R α 1 α -1 0   (5.36)
Using (5.10), the new set of PDEs to solve then are:

(a) 3D plot of Open loop energy function.

(b) 3D plot of Closedloop energy function.

Open Loop Energy Function -αK

3 = -Rx 1 (a + x 2 ) k + αx 3 m + β(x) (5.37) -R α K 2 + K 3 = R α ( λ 2 2k -mg) (5.38) αK 1 -K 2 = - αx 1 (a + x 2 ) k (5.39)
Resolving 5.39, we get the following control law:

β(x) = Rx 1 (a + x 2 ) k i -Kp x1 α + x2 - αx 3 m -( α m + KpR α )x 3 (5.40)
which we apply to our simulation. This controller has the added advantage that instead of measuring the ux, we can use the current, i, directly.

Discussion

The control law seem to be working correctly in simulation. It should be noted that with an increase in value of K p , we have smaller overshoot but unfortunately oscillation increases. Also, our open loop dynamics is given by λ

= -Rλ(a + q) k q = p m ṗ = mg - λ 2 2k
The equilibrim points ( ẋ = 0) for λ d = x * 1 = √ 2mgk whatever the value of desired position q d = x * 2 . In our simulation if we take a positive value for λ d , we do obtain a stable system but then x 2 is not equal to x 2 * . Only with a negative value of λ d do we obtain the required result. This point should be further investigated. Having most of the basics we can now embark on the design of a control law for the MSMA actuator.

Control of MSMA Actuator

In this section, we detail a control strategy for the MSMA actuator using the previous concepts. It is assumed that all the parameters are known precisely. We will use the non-parametrized IDA-PBC technique and the algebraic IDA-PBC to give some possible ways of designing the control law of the MSMA Actuator. For simplicity, we will use a model consisting of one hysteron only therefore z = z 1 . We will use a slightly dierent model as we will lump the force due to gravity mg with the potential energy of the material such that our matrix u depends only on the input voltage.

W p (x t , z) = 1 2 k(x t -γzl) 2 + mgx t (5.41) Starting from the Hamiltonian H(λ, x t , p t , z) = H e (λ, z) + H m (xt, p t , z) = W mag (λ, z) + W k (p t ) + W p (x t , z) + W h (z) (5.42)
where

• W mag is the magnetic energy stored in the actuator.

• W k is the kinetic energy of the mass.

• W p is the potential energy of the mass.

• W h is the energy stored in the equivalent capacitor of the hysteron.

The port Hamiltonian model with state variables x = λ z x t p t is then given by

        λ ż ẋt ṗt         =         -r 0 0 0 0 g(.) 0 0 0 0 0 1 0 0 -1 -b                 ∂H ∂λ ∂H ∂z ∂H ∂xt ∂H ∂pt         +         1 0 0 0         u y = 1 0 0 0         ∂H ∂λ ∂H ∂z ∂H ∂xt ∂H ∂pt         = i (
f - cr ≤ - 1 2 λ 2 K 1 (χ a -χ t ) (K 0 + K 1 (χ a z * + χ t (1 -z * ))) 2 + k(x * t -γz * l) + mg -k h z * ≤ f + cr (5.48) which in terms of current i = ∂H ∂λ is equivalent to -f - cr ≤ - 1 2 K 1 i 2 (χ a -χ t ) + k(x * t -γz * l) + mg -k h z * ≤ f + cr (5.49)
From (5.49), we see that we have some liberty in choosing i * or λ * . We can set it to '0' (we know the range must necessarily include zero as the critical values lies only in the rst and third quadrant) to make calculations easier or choose it such that i is minimum and hence the power delivered to the actuator is minimised.

Using IDA-PBC technique as above we will try a simple feedback of the type u = β(x) and we set J a = 0 and R a = 0. Applying equation 5.10, we have

        -r 0 0 0 0 g(.) 0 0 0 0 0 1 0 0 -1 -b                 K 1 K 2 K 3 K 4         =         1 0 0 0         β(x) (5.50)
which gives -rK 1 (x) =β(x)

(5.51) g(.) =0;

(5.52)

K 3 (x) =0
(5.53)

-K 3 (x) -bK 4 (x) =0

(5.54)

The system of equation above, wont yield a proper control as it depends only

on λ K 1 (x) = ∂H a ∂λ (5.55)
To remedy this problem we choose

J a =         0 α 0 0 -α 0 0 β 0 0 0 0 0 -β 0 0         R a =         0 0 0 0 0 R z -g(.) 0 0 0 0 0 0 0 0 0 0         (5.56)
We thus add a coupling between z and λ as well as between z and p t . To remove hysteresis and add a viscous damping to z, we add the term R zg(.)

to the dissipation matrix. The equation to resolve then become

        -r α 0 0 -α -R z 0 β 0 0 0 1 0 -β -1 -b                 ∂Ha ∂λ = K 1 ∂Ha ∂z = K 2 ∂Ha ∂xt = K 3 ∂Ha ∂pt = K 4         =         0 α 0 0 -α -R z + g(.) 0 β 0 0 0 0 0 -β 0 0                 ∂H ∂λ ∂H ∂z ∂H ∂xt ∂H ∂pt         +         1 0 0 0         u(x) (5.57) -rK 1 + αK 2 =α ∂H ∂z + u(x) (5.58) -αK 1 -R z K 2 + βK 4 = -α ∂H ∂λ -R z ∂H ∂z + g(.) + β p t m (5.59)
-βK 1 -K 3 =βk(x tγzl)

(5.60)

The above set of PDEs should be resolved to get H a and then calculate the resulting H d = H + H a . It will be one of the future works in this thesis. We now use an easier method, the algebraic IDA to nd a control law.

Algebraic IDA

To apply the algebraic IDA-PBC technique, we x a desired Hamitonian, H d as follows

H d = 1 2C 1 (λ -λ * ) 2 + 1 2 C 2 (z -z * ) 2 + 1 2 C 3 (x t -x * t ) 2 + p 2 t 2m (5.61)
This function being quadratic in the terms will have a minimum at the equilibrium values. The C n s' determine the rate of convergence towards the minimum of the desired function. The desired interconnection matrix J d couples z and p t as well as λ and z. We also wish to remove hysteresis and replace it with a dissipation of viscous type which is done by changing the R d matrix. The matching equation then becomes taking into account that

∂H d ∂λ = i -i * (5.62) we have         -r α 0 0 -α -R z 0 β 0 0 0 1 0 -β -1 -b                 (i -i * ) C 2 (z -z * ) C 3 (x t -x * t ) p t m         =         -r 0 0 0 0 g(.) 0 0 0 0 0 1 0 0 -1 -b                 ∂H ∂λ ∂H ∂z ∂H ∂xt ∂H ∂pt         +         1 0 0 0         u(x) (5.63) -r(i -i * ) + αC 2 (z -z * ) = -ri + u(x) (5.64) -αC 1 (i -i * ) -R z C 2 (z -z * ) + β p t m =g ∂W mag ∂z + ∂W p ∂z - ∂W h ∂z (5.65) -βC 2 (z -z * ) -C 3 (x t -x * t ) -b p t m = -k(x t -γzl) -b p t m ( 5
α = - 1 (i -i * ) g(.) + R z k(z -z * ) + γl C 2 p t m (5.67)
And nally substituting for α in (5.64) we get for the control voltage u(x):

u(x) = ri * - k(z -z * ) (i -i * ) g(.) + R z k(z -z * ) + γl C 2 p t m (5.68)
Eq (5.68) is the control action which modies our enegy function such that it is as desired. The parameter R z is the amount of damping or dissipation on z we can remove it all together which will result in a pure conversion of energy between the electrical part and the mechanical part just by setting R z = 0.

Discussion

In this chapter, we detailed our experimental setup and gave some basic experimental results. This setup was used to test the behaviour of the material.

During our experiment, we discovered that we could not nd any dierence in the value of magnetic eld whether the material is present or no. This is unusual as the material modies the reluctance of the circuit. The problem lies in the fact that we built an air gap with an area which is approximately 5 times more than the area of the MSMA. As the permeability of the MSMA is between 2 and 65, the changes it caused to the magnetic eld in the air were not discernible. This parameter is essential for the identication of λ and therefore we could not measure the inductance of the MSMA when its length changes. One possible solution would be to follow the model and built a setup which has an air gap just 2 -3% bigger than the area of the MSMA.

In the control section, we saw that the port-Hamiltonian framework provides a way to incorporate knowledge and structure into the design of the controller. Depending on how we want our system to behave we can modify the interconnection matrix and the dissipation matrix. The resulting control laws are very tedious to calculate but the magnetic levitation has shown that the performances are very good. So if proper design of the control law is done for the MSMA, we can expect similar results. Furthermore, we have seen a way to exploit hysteresis in our controller, it has a degree of freedom in the dead zone, where a range of values exist for which the dynamics on z is 0.

This can be exploited to either use a control input which minimises energy or make calculations easier. Another interesting feature which appeared in our control is that it seems we need not invert hysteresis. This needs more investigation. And nally this rst control law need to be implemented to validate its value.

Chapter 6

Conclusion

General Conclusions

Magnetic Shape Memory Alloys (MSMA) promises to enhance and add to the dierent types of smart materials already available. In doing so, it can only further increase the number of applications of the smart material family. MSMA present some advantages that can be exploited in new areas, including actuation, energy harvesting or sensor applications. For example and contrary to other smart materials, which needs an energy source to bias them, MSMA only require a pair of magnets (magnetic eld-'free of cost') and some wires to make a coil around it. Then by Faraday's law, every time the material is compressed or extended by an external mechanical force, a voltage is induced in the coil which can be recuperated.

The characteristics and properties of MSMA are nevertheless unusual and only a good understanding of their physics seems adequate to use them smartly. From our point of view, simple control laws and linear models miss out completely on their main possibilities and potential applications.

The objective of this thesis was to confront the true characteristics of Magnetic Shape Memory Alloys without skipping its non-linear and hysteretic behaviour. As this thesis has shown a deep understanding of its physics is needed for both its modelling and control. Understanding the material is not only needed to design the actuator but also to design control laws which can work in an optimum fashion. Moreover, such control laws must be compatible with the thermodynamics of irreversible processes to take advantages of non-linearity and hysteresis phenomena.

Several goals were targeted during in this thesis. The rst one was to continue the work of previous thesis conducted at the FEMTO-ST Institute by J. Y. Gauthier. The perspectives outlined in his thesis were investigated in Chapter 2. Simulation problems encountered in his thesis were pinned down to the non-minimal dynamical systems, causality problems and kinematics constraints which gave rise to DAE (Dierential-Algebro equations) which resulted in algebraic loops. We proposed a reduction method to obtain a minimal dynamical system and to remove the constraints from the state variables. The promising work of Gauthier on "canonical" Hamiltonian modelling was also cast into the "true" port-Hamiltonian framework, that allows an easy interconnection between subsystems. Chapter 2 also revealed some inconsistencies in the way the hysteresis phenomena and dissipation in the materials were taken into account.

Chapter 3 was devoted to the in depth understanding of the MSMA using thermodynamics. From a distributed parameters system the modelling of the actuator was transformed into a lumped parameter system. Energetic consideration were studied and "piece wise" non-linear constitutive behaviour laws were proposed. The construction of the lumped parameter model was motivated by its subsequent use for control. The use of thermodynamic internal variables, such as z proposed by Gauthier, were used all around the chapter. Two important things to retain from this chapter are the derivation of the thermodynamics driving force f for lumped parameter and π for distributed parameter as well as the derivation of the total strain. Also, the total magnetic energy and mechanical energy taking into account saturation and non-linearities of the material were derived. This paved the way for a more consistent energetic representation than was available until now.

From previous chapters, it was seen that thermodynamics was not sucient to derive the dynamics of the systems. Notably that thermodynamics is a static theory. So Chapter 4 was then devoted to derive the dynamics.

As a system always consists of 2 parts, the structure which is how its elements are connected and the physics (constitutive relation), a bond graph approach was adopted which combines both in one theory. It has provided great insight into how and where each element go and how they must be related to each other. In addition to providing a better understanding of the material and the actuator, it has been a great help in understanding where hysteresis goes and how to approach it from an energetic point of view. As we were already using an internal variable z which has a power conjugated eort variable, it was only natural that the hysteresis resides in what we call the 'MSMA' domain. And it has come to light that the dynamics on the z variable is greatly governed by the hysteresis. We then formulated it as having both a conservative and a dissipative part modelled with simple elements-a generalised capacitor and a non linear generalised resistor. We thus were able to formulate it energetically. From there on, it was simple to put it into the port-Hamiltonian framework as both bond graphs and port Hamiltonian employ the energy/co-energy variables. The corresponding results are of great interest to the port-Hamiltonian community as it is a theory proposed mainly for conservative systems. Very few works in this community has been done regarding complex type dissipation. Most of time simple dissipative phenomena were treated like viscous quadratic dissipative potential. Furthermore, the bond graph representation is not limited to the actuator. With some modications it can be used for sensor applications, for the push-pull actuator as well as for energy harvesters.

The goal of Chapter 5 was to set the basics for control and experimental validation. We showed some experimental results and have discussed some limitations of the setup. Furthermore some preliminary work on the preisach operator was done. As the preisach has been studied extensively, we intended to learn from it so as to propose our own hysteresis model. Our model of hysteresis is seen to have the same form as the hysteresis present in the material. Unlike the preisach which with one hysteron can model only 2 values, our model with one hysteron is continuous. But to approximate the real hysteresis, we also need a number of hysterons but we believe it will be lower than for a preisach model. For control purposes, we studied a magnetic levitation actuator which is very common in port Hamiltonian literature. Its structure and dynamics is similar to our MSMA actuator and thus we derived some important understandting to design our control law.

An algebraic IDA method has yielded a rst controller which needs to be tested. One interesting feature has appeared while designing the controller.

Hysteresis can be positively used as it provides a dead zone where we have a choice of values for our control input.

Perspectives and Future Works

The main perspective of this work should be in rening the model to take into account the temperature. Hysteresis dissipates heat and from the experimental data we see that we have a hysteresis curve with a large width.

This implies that much heat is produced. Its eects should be taken into account through thermodynamics.

Secondly, more detailed investigation both qualitative and quantitative of the hysteresis is needed. One direction could be the identication of the critical values of our hysterons and their spring constants. In classic hysteresis, it is a static curve that is identied or tted. In our case, the identifcation need to be perfomed on a dynamic curve. A preisach-like plane and boundary should be developed to characterise a distribution of hysterons.

Thirdly, the port Hamiltonian seems to be the appropriate framework to deal with hysteresis. Since hysteresis involve the creation of entropy, a perspective would be to reformulate it into the irreversible port-Hamiltonian framework [START_REF] Ramirez | Irreversible port-hamiltonian systems: A general formulation of irreversible processes with application to the cstr[END_REF] and use thermodynamic availability as a Lyapunov function.

Also, a better experimental testbed should be used and nowadays better MSMA material are on the market. The one we used in our experiments required a very high magnetic eld of around 0.65 T which is not trivial

0 u(t) 1 R I 2 L C (

A.2 Trees and links

To derive the topology, we introduce the concept of trees and links. A tree is dened as the path through all nodes without making a loop and the links are the remaining branches. Consider the graph in A.3, it has n t = 3 nodes and b = 4 branches. Then the tree consists of n = n t -1 = 2 branches known as tree branches and l = bn t = 2 links. In [START_REF] Ea Guillemin | Introduction to Circuit Theory[END_REF],

it is shown that the link currents x all the current values in the circuit whereas the tree voltages x all the voltages in the circuit. Hence by either tree voltages or branch currents can be used to completely characterize the network behaviour. Loop-sets and cut-sets are the tools for doing so.

A.3 Loop Set and Cut Set

A loop set is the set of loops obtained by adding one link at a time to a tree.

These loops are called fundamental loops. They are the minimum number of loops required to express the dependent voltages (link voltages) in terms of independent voltages (tree branch voltage). To each fundamental loop, KVL is applied to obtain the necessary relationships. While traversing the loop, the direction of the link voltage is taken as positive. A closer look at the loop-set of gure A.4 also reveals that the branch currents can be expressed as the link currents.

The loop sets then give the following equations if taking the only link current of a loop as the positive direction.

u v C v R v L A 1 A 2 A 3 A 4 L 1 -1 1 1 0 L 2 0 -1 0 1 which reduced to   -1 1 1 0 0 -1 0 1   B         u v C v R v L         =         0 0 0 0         (A.1)
For the tree branch current, it is clearly seen that

i C = i R -i L i u = -i R
which can be written as

        i u i C i R i L         j =         -1 0 1 -1 1 0 0 1         B T   i R i L   i (A.2)
Hence in a loop set, we have Bv = 0 and j = B T i where j is the currents in the circuit and i are the loop currents (same as link currents).

A cut set is a set obtained by splitting a graph into 2 separate graphs by removing one of the tree branches. These cut sets are called fundamental cut set. They are the minimum amount of cut set needed to express the dependent current (tree branch) currents in terms of the independent currents (link currents). To each cutset, KCL is then applied to obtain:

i u i C i R i L A 1 A 2 A 3 A 4 C 1 1 0 1 0 C 2 0 1 -1 1   1 0 1 0 0 1 -1 1   Q         i u i C i R i L         = 0 (A.3)
Looking now at each cut-set, we notice that each voltage can be express as a linear combination of tree-branch voltages.

        u v C v R v L         v =         1 0 0 1 1 -1 0 1         Q T   u v C   e (A.4)
Loop sets and cut sets can be used alone to establish circuit topology. To give the topology in terms of currents, loop set is used whereas cut sets are used to give the topology in terms of voltages.

As long as there is an algebraic relationship between the branch voltage and the branch current, any one of them is suitable. But for networks, containing inductors or capacitors where this relationship is a dierential equation usually of type

v L = L di L dt (A.5) i C = C dv C dt (A.6)
using loop set alone or cut set alone is not sucient. This is due to the causality of these elements which will be discussed shortly. Hence a mixture of cut set and loop set should be used to model the circuit.

4. Write a fundamental cut set equation for each capacitor and a fundamental loop equation for each inductor and express everything in terms of the state variables and inputs.

The choice of state variables is not xed to inductor currents and capacitor voltages. Inductor uxes and capacitor charges are also an appropriate choice for state variables. In fact, from an energetic point of view, these variables are much more signicant. Using φ(t) = Li(t) and q(t) = Cv(t) for uxes and charges respectively, the cut-set equation becomes

q = - φ L + u R - q CR (A.13)
and the loop-set equation becomes φ = q C

(A. [START_REF] Charles | Feedback systems: input-output properties[END_REF] then the state space representation is given as:

   q φ   =    -1 CR -1 L 1 C 0       q φ    +    1 R 0    u (A.15)
which, if we choose q C and φ L as state variables, can be rewritten as

   q φ   =    -1 R -1 1 0       q C = v C φ L = i L    +    1 R 0    u (A.16)
which is in fact the port-Hamiltonian [START_REF] Ortega | Putting energy back in control[END_REF] representation of the system if we take the output to be the dual of the input 1 R • u = I(t), that is to say if we take the output as y(t) = u(t).

In brief we see that any network consisting of b branches has 2b unknowns of which b are branch currents (through variable) and b branch voltages (across variables). If s branches are active sources, we are left with 2bs unknowns. b equations are given by either cut set or loop set and the remaining bs equations can be obtained by the elemental constitutive equations relating the across variable to the through variable.

Appendix B Magnetism theory in Brief

This section establishes the basics we will need to model complicated magnetic systems. Starting from Maxwell equations ("eld equations"), we de- We use a quasistatic version of these laws, i.e we neglect the coupling terms between electric and magnetic eld ( ∂D ∂t ≈ 0). Such an assumption allows us to determine electric and magnetic characteristics independently.

B.1 Magnetic Work

To study the magnetic properties of matter one requires the expression for the work done in magnetizing a material. We should exert some care in dening precisely the system under consideration since one can easily obtain dierent expressions for work. We will consider a process in which an initially unmagnetized sample of a material is magnetized. Such a change can be brought about by application of a magnetic eld. The magnetic eld can come from various sources such as solenoids, permanent magnets or electromagnets. In all such cases, the sample is situated in an externally applied eld. where V = Al is the volume of the solenoid. 1 The hypothesis of innite length is done here just to simplify the computation of the forth Maxwell equation (B.4) but it does not restrict the main ideas of this section.

B.1.1 Magnetics in vacuum

B.1.2 Magnetization in matter

Now we consider the case where the material is inside the solenoid. Without the material the magnetic induction is B = µ 0 H 0 , whereas with the material, it becomes B = µ 0 µ r H 0 which in terms of magnetization can be written as B = µ 0 (M + H 0 ) where M is the magnetic moment per unit volume of the matter or more simply the magnetization of the matter.

B.2 Magnetic Circuits

Another very useful way by which magnetic quantities may be quantied is by postulating the existence of magnetic monopoles. Though ctitious and hypothetical in nature, they are very useful and gives access to all the machinery of electric elds. Although not physical, calculation considering a pair of magnetic monopoles producing the same eect as a magnetic dipole, and then gives similar results. Hence just as in electrostatics, we will assume that the force derives from a scalar potential.

B.2.1 MMF, reluctance and scalar magnetic potential

When a current ows in the coil, a magnetic ux is produced around the circuit. In order to carry a unit magnetic pole around the circuit against the magnetic eld, a certain amount of work is required. Analogue to electromotive force in electrostatics, this quantity is called the magnetomotive force (mmf ).

B.2.2 Application to a simple magnetic circuit

Consider the simple magnetic circuit of the gure B.2: a coil supplied by a cuurent i is wounded around a core made of magnetic material. The current generates magnetic eld lines perpendicular to the core's cross-sectional area.

These lines close on themselves as shown in gure B.2. The ux linkage, λ, and the current, i, form an external port which usually provides good results for simple cases (to design transducers or motors, a more detailed representation using magnetic circuits is nevertheless needed). The physical eects inside the core are completely ignored when everything is related to the electrical side, i.e to λ and i. Through measurement, the function relating λ to i can be retrieved and used. On the other hand, to get insight into the physics of magnetic circuit and the related energy issues, the concept of magnetic circuit, magnetomotive force (mmf ) and reluctance should be used.

When a current ows into the circuit, magnetic ux is induced in the coil. This magnetic ux, φ, measured in Webers, is equivalent to volt-second.

This magnetic eld (the gray lines in Figure B.2a) can be described by the magnetic ux vector density B with units of teslas. It represents the amount of ux (number of lines) crossing a unit area perpendicular to the lines. As seen before, the magnetic ux linkage , λ, is related to the magnetic ux, φ, by the following equation

λ = N φ (B. 19
)
where N is the number of turns of the solenoid. Usually, as seen in gure B.2a, not all eld lines pass through the core, there are some ux which leaks out of the coil.

The "driving force" which sets up φ in the core was dened as the magnetomotive force mmf = N i and the reluctance of the magnetic circuit was dened as R = l µ 0 µrA where l is the mean magnetic path, A is the crosssectional area of the core, µ 0 is the permeability of air and µ r the relative The total energy of a system can be considered to be the sum of kinetic energy, potential energy (due to gravitational eld) and internal energy.

Whereas internal energy of a system concerns itself with what is happening inside the system, kinetic energy and potential energy on the hand considers the system as a bulk and its motion. Thus, magnetic energy, electrical energy, heat energy etc. are considered part of internal energy while the position and motion of the system as a bulk dictates its potential and kinetic energy respectively. Hence using E T for total energy and E K , E P and U for kinetic, potential and internal energy respectively we have

E T = E K + E P + U (C.7)
Energy in whatever form can be thought of as the sum of innitesimal work. The common terminology used for work are generalized forces and generalized displacements. The latter are the extensive variable whereas the former are intensive variables. In an elastic system, work can be dened as

W = q 2 q 1 f dq (C.8)
where f is the applied force and dq is the displacement. In electric system, it takes the form of dW = vdq whereas in magnetic systems it is dW = idλ. This equation shows that the maximum work is only obtained in a reversible process otherwise it is not. If a system is described by (generalized) coordinates q r and if the (generalized) force of external origin that tend to increase q r is P r , the rate of work done of these forces is P r qr . The work by them in a small displacement dq r is P r dq r .

U is the internal energy. The second law states that there is another function S, the entropy, such that, in any change, by suitable denition of the temperature (Kelvin) T , dQ ≤ T dS (C.12) the equality holds in the ideal limiting case of reversible process; the inequality holds in all other cases. On eliminating dQ, we get dU ≤ P r dq r + T dS

(C.13)
Note how the inexact dierential have been converted to state function. A state function is one whose values do not depend on path. We can never say that a body contains a quantity of heat or a quantity of work as they are interchangeable but we can always say the amount of internal energy (to a constant) or the amount of entropy.

C.5 Equilibrium and Stability

In an equilibrium reversible process, at each stage we have dU = P r dq r + T dS

(C.14)
U therefore is not a function of q r alone, as in mechanics, but of S also and perhaps of other parameters which remain constant during the changes being considered. Knowing U as a function of q r and S we can nd the generalised forces P r and the temperature by using the following relations F is usually called the Helmholtz free energy. Then if we know F as a function of q r and T , we can nd P r and S by using the following

P r = ∂F ∂q r , S = - ∂F ∂T (C.18)
Often also, we wish to use the P r rather than the q r as independent variables.

For this case we let G = F -P r q r (C. [START_REF] Gauthier | Nonlinear hamiltonian modelling of magnetic shape memory alloy based actuators[END_REF] then in any reversible change we have dG = dF -P r dq rq r dP r = -q r dP r -SdT (C.20)

and then again knowing G, the Gibbs free energy, as a function of P r and T , we can nd q r and S as above.

Sometimes we also wish to use a combination of P r and q r as independent variables, we extend the sum only over those r's for which the independent variable is P r ; thus for independent variables T , q 1 and P 2 the appropriate function is F -P 2 q 2 , and its dierential is P 1 dq 1q 2 dP 2 + T dS. Similarly, if the independent variables are S, q 1 and P 2 , we use the function U -P 2 q 2 . By such Legendre transformation, we can get the proper thermodynamic potential for any choice of independent variables; all the dependent variables can be found by dierentiation of this one function.

Equa tion (C.1) helps us to derive relations between independent and dependent variables for a system in equilibrium but it does not say anything about stability of the equilibrium. To derive conditions for stability, we return to equation (C.13) which holds for most system i.e irreversible system dU < P r dq r + T dS

(C.21)
Les mat ériaux actifs sont des mat ériaux qui r éagissent quand on leur applique un champ ext érieur comme la temp érature, la lumi ère, un champ magn étique ou un champ électrique. Ces champs changent les propri ét és du mat ériau comme la longueur, la susceptibilit é magn étique ou la permittivit é électrique. Ces changements peuvent être utilis é pour faire du travail. Quelques exemples sont les mat ériaux pi ézo électriques, qui changent de longueur quand on applique un champ électrique, les alliages à m émoire de forme qui changent leur longueur sous l'action de la temp érature. Un mat ériau plus recent qu'on appelle les alliages à m émoire de forme magn étique se deforme sous l'action d'un champ magn étique. Dans cette th èse, on utilise ce mat ériau pour confectionner un actionneur. Pour ce faire, on utilise la thermodynamique des proc éd és irr éversibles pour mod éliser le mat ériau. La thermodynamique s'av ère tr ès versatile pour ce type de materiau car il permet de quantifier l' échange et la transformation d' énergie dans le mat ériau. Aussi, étant donn é que le materiau se comporte d'une fac ¸on non-lin éaire et hysteretique, le cadre énergetique nous permets justement de prendre en compte ces non-linearit és. Cette th èse utilise l'approche énerg étique notamment les Hamiltonien à ports pour mod éliser un actionneur à base d'alliage à memoire de forme. Cette m éthode nous permets aussi de concevoir des lois de commande pour contr ôler le mat ériau.

Mots-cl és : Mod élisation, Hamitonien à ports, Thermodynamique, mat ériau actif

Abstract:

Active materials are a class of material which react to an external stimulus such as temperature, photons, magnetic field or electric field. These stimuli cause some properties of the material to change usually their length. Some examples are piezoelectric material which change their length under the action of an electric field, Shape Memory alloys which alter their shape on application of heat, and more recently Magnetic Shape Memory Alloys (MSMA) which undergo a deformation on application of a magnetic field. Harnessing this property of MSMAs, we hereby present an actuator using this novel material. We extensively make use of an energy framework, namely the thermodynamics of irreversible processes to model the material. This framework has been proven to be very versatile in modelling energy exchange and transformation as it occurs in the material and also to incorporate hysteresis which arises naturally in such materials. Another advantage of this method is its ability to give us constitutive laws based on simple assumptions. Furthermore, using an energy framework allows us to apply some energy based control. Port Hamiltonian Control is one such method and it is not limited only to linear models. This latter characteristic has proven very useful since MSMAs are very non-linear in nature.

3 . 9 . 2 0

 392 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.10 Magnetic Circuit with 2 dierent magnetic materials embedded in the core. The cross-sectional length is D. . . . . . . . . 3.11 Reluctance model of the MSMA Actuator . . . . . . . . . . . 3.12 MSMA in Air Gap . . . . . . . . . . . . . . . . . . . . . . . . 3.13 Constitutive Equations between total magnetic ux λ and i for the actuator. The curves are shown for the dierent values of z. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.14 Comparaison of constitutive equations taking into account change in length of air-gap, w, as well as change in length of MSMA, l. Dashed lines show the constitutive equations when the changes in length are taken into consideration while Solid lines show the equations when the changes are assumed negligible. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.15 Variable Space. . . . . . . . . . . . . . . . . . . . . . . . . . . 3.16 Driving force f mag derived from co-energy, W * mag . . . . . . . .3.17 Driving force f mag derived from energy, W mag . . . . . . . . . 4.1 The four-element quadrangle . . . . . . . . . . . . . . . . . . 4.-junction and 1-junction. In both cases, . . . . . . . . . . . . . . . . . . . . . 1 1.2 Overview of Magnetic Shape Memory Alloys . . 4 1.3 Unied Energy Modelling . . . . . . . . . . . . . 7 1.4 Hysteresis . . . . . . . . . . . . . . . . . . . . . . . 13 1.5 Objective of thesis and Outline of Manuscript . 15 1.1 Introduction Advances in technology has reached such a level that previously unimaginable tasks are becoming possible. Manipulation of DNA, manufacturing of 3-D transistors, targeted delivered of drugs to infected cells and monitoring of health with lab-on-chip technology among others are fast becoming standards largely due to miniaturisation. Miniaturisation has played a considerable role in improving technology and almost everyday new products are introduced in the market. From medicine to household equipments and cosmetics, there is some measure of micro-and nanotechnology in our everyday life. As these sizes are very unintuitive, Figure 1.1 helps to show how the micro world and the nano world scale in relation to things that we perceive. At the nanoscale, nanotechnology is helping to considerably improve many technology and industry sectors such as information technology, energy, environmental science, medicine, food safety and transportation among others. It has been developing at an astounding pace since the last 20 years.

1

  Red

Figure 1 . 1 :

 11 Figure 1.1: The Scale of Things (Image: US Department of Energy).

Figure 1 . 2 :Figure 1 . 3 :

 1213 Figure 1.2: Energy Density of MSMA compared to other active materials

  Two MSMA elements working in tandem to create a push-pull actuator (2.) Application of a magnetic eld deforms the MSMA and the positioning stage moves.(3.) Removing the magnetic eld, the positioning stage stays in its current position.

Figure 1 . 4 :

 14 Figure 1.4: Push-Pull Actuator built in 2008 based on paper by Gauthier et al. [17].

Figure 1 . 5 :

 15 Figure 1.5: Phase and Variant Transformation

Figure 1 . 6 :

 16 Figure 1.6: Mass-Spring and its network structure.

Figure 1 . 7 :

 17 Figure 1.7: Mass Spring Damper System.

F

  Linear Graph of Mass-Spring Damper. The top node indicates equal velocities.

Figure 1 . 8 :

 18 Figure 1.8: Bond Graph and Linear Graph of spring damper system.

Figure 1 . 9 :

 19 Figure 1.9: Typical hyster B-H curve which occurs in ferromagnetic materials.

Figure 1 .

 1 [START_REF] Chaillet | Microrobotics for micromanipulation[END_REF] shows the elementary Preisach hysteron (gure 1.10a) and a summation of these hysterics make up the hysteresis operators. Elementary Unit, a hysteron. α and β are the thresholds for switching.

  b) A collection of hysterons whose outputs are summed to create the hysteresis operator. Each hysteron is multiplied by a weight µ. R αβ are the dierent relays (hysterons) who switches at dierent values of α and β.

Figure 1 . 10 :

 110 Figure 1.10: Elementary hysteron and the hysteresis operator.

contained 13 state equations and 3

 3 Figure 2.1: MSMA Actuator .

  MSMA in magnetic eld and under stress.

Figure 2 . 2 :

 22 Figure 2.2: Actuation Mechanism.

Figure 2 . 4 :

 24 Figure 2.4: MSMA electrical subsystem

Figure 2 . 5 :

 25 Figure 2.5: Expression for hysteresis. π z is same as π f

Figure 2 .uFigure 2 . 6 :

 226 Figure 2.6 depicts the electrical subsystem of the actuator. It is made up of a network of inductances, the power supply and a resistor. The inductances considered are the leakage ux, L L2 , the inductance of the ferromagnetic core, L F E , the fringe eect, L L , and the inductance of the air gap, L a-g . To

Figure 2 . 7 :

 27 Figure 2.7: Linear graph of MSMA actuator .

Figure 2 . 8 :

 28 Figure 2.8: Tree and Co-Tree of Actuator. u L F Eis the dependent inductor as it is part of the tree.

Figure 2 . 9 :

 29 Figure 2.9: Addition of Lagrange Multiplier. Loop sets should contain only one link (dashed) and cut sets should have only one tree branch.

Figure 2 .

 2 Figure2.9 shows that the addition of the lagrange multiplier now makes the tree consistent. It also illustrates one loop set and one cut set. Following the discussion above, we pick our state variables to be the uxes φ L2 , φ L F e , φ L L , φ L a-g . We need the 4 loop set equations as they give the link voltages (state variable for inductor) and one cut set equation to express the resistor current in terms of a state variable.

1 37 3. 3 39 3. 3 . 1 41 3. 4 51 3. 5 52 3. 5 . 1

 137339314145155251 Introduction . . . . . . . . . . . . . . . . . . . . . 36 3.2 Magnetism . . . . . . . . . . . . . . . . . . . . . . 36 3.2.1 Magnetization . . . . . . . . . . . . . . . . . . . . Physics of the MSMA . . . . . . . . . . . . . . . . Motion of Magnetic Wall . . . . . . . . . . . . . . 40 3.3.2 Rotation of Magnetization vector . . . . . . . . . . 41 3.3.3 Strain Mechanism . . . . . . . . . . . . . . . . . . Distributed Parameter Modelling of MSMA . . 42 3.4.1 Representative Volume . . . . . . . . . . . . . . . . 43 3.4.2 Thermodynamics of MSMA . . . . . . . . . . . . . 44 3.4.3 Magnetization of MSMA . . . . . . . . . . . . . . . 46 3.4.4 Magnetic Energy . . . . . . . . . . . . . . . . . . . 47 3.4.5 Mechanical Energy . . . . . . . . . . . . . . . . . . 50 3.4.6 Gibbs Free Energy . . . . . . . . . . . . . . . . . . Lumped Parameters Modelling of MSMA . . . Terminal Variables . . . . . . . . . . . . . . . . . . 52 3.5.2 Reluctances . . . . . . . . . . . . . . . . . . . . . . 55 3.5.3 MSMA Actuator lumped Parameters . . . . . . . . 56 3.5.4 Energy Considerations . . . . . . . . . . . . . . . . 59 3.6 Discussion . . . . . . . . . . . . . . . . . . . . . . . 66 35

Figure 3 . 2 :

 32 Figure 3.2: Crystallographic Change

Figure 3 . 3 :

 33 Figure 3.3: Relative Magnetization Response as reported by Heczko et al. [27].

Figure 3 .

 3 Figure 3.5 shows the evolution of other wall domain and the magnetization vector under dierent loading conditions. Domain wall motion represented by α saturates at quite low applied eld value. If then, the external magnetic eld is increased, two situations may occur. If no stress is applied, the eld preferred variant grows at the expense of the stress preferred variant until there is only 1 variant in the sample. If

Figure 3 . 4 :

 34 Figure 3.4: Representative volume. The direction of the magnetization vector in α is in the same direction as H 0 .

α

  (c) After critical value of magnetic eld has reached. Twinning start M1 grows at expense of M2. Domain walls 1 -α have disappeared. θ (1 -z) If specimen is blocked, no twinning motion occurs. θ rotates on increasing magnetic eld. If speciment not blocked, M2 dissappears. M1 (z) α (f) At saturation, if not blocked, only one variant exist-M1-the eld preferred variant.

Figure 3 . 5 :

 35 Figure 3.5: Twinning mechanism. Formation of domain walls and rotation of magnetization vector.

Figure 3 . 6 :

 36 Figure 3.6: Variation of α, θ with applied H 0

Figure 3 . 7 :

 37 Figure 3.7: Magnetization for dierent values of z. Dotted line shows a possible magnetization curve of the material as z changes. Solid lines show magnetization at constant z.

2 Figure 3 . 8 :

 238 Figure 3.8: Energy and Co-energy for Magnetic part of MSMA.

(3. 30 )

 30 If the constitutive equation between stress and elastic strain is linear i.e σ = Eε e , we have as the mechanical energy density W mech (ε e , z) = -

37 )DFigure 3 . 9 where

 3739 Figure 3.9

Figure 3 . 10 :

 310 Figure 3.10: Magnetic Circuit with 2 dierent magnetic materials embedded in the core. The cross-sectional length is D.

Figure 3 . 11 :

 311 Figure 3.11: Reluctance model of the MSMA Actuator

Figure 3 .

 3 Figure 3.11 shows the reluctance circuit of the MSMA. The electric circuit consist of the battery and the resistance of the coil, then between the electric circuit and the magnetic circuit there is a gyrator which transforms the current into an equivalent magnetomotive force and the voltage into an equivalent ux φ.The reluctance of the air-gap, R f er , R gap , R msma can be calculated knowing their geometries whereas R leak should be measured.

Figure 3 . 12 :

 312 Figure 3.12: MSMA in Air Gap

(3. 60 )

 60 Therefore our 3 piecewise continous equations (3.61) becomes:

Figure 3 . 13 :

 313 Figure 3.13: Constitutive Equations between total magnetic ux λ and i for the actuator. The curves are shown for the dierent values of z.

Figure 3 . 14 :

 314 Figure 3.14: Comparaison of constitutive equations taking into account change in length of air-gap, w, as well as change in length of MSMA, l. Dashed lines show the constitutive equations when the changes in length are taken into consideration while Solid lines show the equations when the changes are assumed negligible.

Figure 3 . 15 :

 315 Figure 3.15: Variable Space.

Figure 3 . 16 :

 316 Figure 3.16: Driving force f mag derived from co-energy, W * mag .

0 F ext dx e + z 0 F

 00 The innitesimal lumped parameter mechanical work consists of the work done by the twinning displacement γzl and the elastic displacement x e = ε e l. If the force acting on the material is F ext (in the case of our actuator its mg) and the material spring constant (lumped Young modulus) is k, then the innitesimal work is dW mec = xe

( 3 .Figure 3 . 17 :

 3317 Figure 3.17: Driving force f mag derived from energy, W mag .

  are called the energy variables. The relationship between the energy variables and their power counterpart (e, f ) is what gives and dictates the dynamics of any system. Also, the change in internal energy of a system in a time, dt can be written as ∆U = e(f dt) = edq ∆(Potential or Electrical Energy) = ∆W ∆U = f (edt) = f dp ∆(Kinetic or Magnetic Energy) = ∆W ∆U = (ef )dt = (f e)dt (Dissipation) = ∆Q

Figure 4 .Figure 4 . 1 :

 441 Figure 4.1 gives the relationship between the four types of variables. The diagonal gives the relationship between the eort or ow variable and the generalized displacement or generalized momentum variable. The edges gives the relationship between the dierent elements.

Figure 4 .

 4 2 shows the 2 junctions and how they are constructed.Each junction contains a KVL(continuity), KCL(conservation) and conservation of energy statement, any two implying the third. A 0-junction is eectively a point where ows are distributed where a 1-junction is where f1 = f2 = .. = fn.

Figure 4 . 2 : 1 e 2 f 2 e 3 f 3 e 4 f 4 e 5 f 5 (

 4213355 Figure 4.2: 0-junction and 1-junction. In both cases,

Figure 4 . 3 :

 43 Figure 4.3: Bond Graph of RLC circuit.

Figure 4 . 1 e 2 = e 1 n f 2 = n f 1 ( 1 e 2 = r f 1 f 2

 4121211212 Figure 4.4 shows the graphical representation of a transformer and a gyrator. The governing equations for these two-ports elements are, for a transformer,

Figure 4 . 4 :

 44 Figure 4.4: Two-port devices.

6 .

 6 Storage elements i.e "I" and "C" elements are assigned their preferred causality which is the integral causality as shown in gure 4.7. If on propa-A sets f and B sets e.

Figure 4 . 5 :

 45 Figure 4.5: Causal Stroke.

Figure 4 . 6 :

 46 Figure 4.6: Eort and ow Sources.

Figure 4 . 7 :

 47 Figure 4.7: Integral (top) and Derivative Causality of "I" and "C" elements.

Figure 4 . 8 :Figure 4 . 9 : 1 e 2 f 2 e 3 f 3 e 4 f 4 e 5 f 5 (

 484913355 Figure 4.8: Both can only take one of these allowed causalities.

Figure 4 . 10 :

 410 Figure 4.10: Causality assignment for voltage input and current input.

Figure 4 .

 4 Figure 4.10 shows the causality assignment for our RLC circuit example.

1 S

 1 f : ω (b) Causal Bond Graph.

Figure 4 . 11 :

 411 Figure 4.11: Mechanical System Bond Graph.

e 3 f 3 e 4 f 4 e 5 f 5 e 6 f 6 e 7 f 7 Figure 4 . 12 :

 445577412 Figure 4.12: DC Motor and its Bond Graph.

Figure 4 . 13 :

 413 Figure 4.13: Non-Linear Example.

Figure 4 . 14 :

 414 Figure 4.14: Schematic diagram showing the subsystems of the actuator with the arrows showing the power exchanging ports.

Figure 4 . 15 :

 415 Figure 4.15: Electric susbsystem Bond Graph.

10 Figure 4 . 16 :

 10416 Figure 4.16: Bond graph model of reluctance circuit

Figure 4 .

 4 17a. The MSMA has a Young's modulus E, a cross-sectional area, A and its longitudinal length is l. The elastic part of the MSMA is modelled by a spring of stiness, k = AE l . The damper models the dissipation due to viscous friction experienced by the load. The coecient of damping is taken to be b. And nally when the MSMA converts electrical energy to mechanical energy, it acts as a ow source by means of the variable z. The gure also shows the forces acting l xe f8 = ẋe e10 = ṗt f10 = pt m e9 = e7 = e8 f9 = ẋt e12 = mg f12 = ẋt e11 = b ẋt f11 = ẋt e6 = f mech f6 = ż (b) Bond Graph of Mechanical Subsystem.

Figure 4 . 17 :

 417 Figure 4.17: Mechanical subsystem and its Bond Graph.

Figure 4 . 18 :

 418 Figure 4.18: The Bond Graph of the MSMA. The "IC" eld and the transformer "TF" act as energy converting ports.

Figure 4 . 19 :

 419 Figure 4.19: Energy is stored in the MSMA by the rotation of magnetisation vector θ and the change in size of α.

Figure 4 . 20 :

 420 Figure 4.20: Complete Bond Graph without hysteresis details.

Figure 4 .

 4 Figure 4.21 shows a typical hysteretic curve of the MSMA. For increasing values of f and decreasing values of f , the path taken by the system is not the same. Hence it is a multi-valued function and the actual value of the output depends on the whole history of the material. Also the energy loss of the system in 1 cycle is given by

Figure 4 .cr

 4 Figure 4.21: A typical hysteresis curve for MSMA.

1

 1

Figure 4 . 22 :

 422 Figure 4.22: Basic Hysteretic elements.

  case. A very simple constitutive equation for the damper is given in gure 4.23. It shows that ż does not start to change until the threshold critical 2 nd law of thermodynamics Not allowed by 2 nd law of thermodynamics

Figure 4 . 23 :

 423 Figure 4.23: Constitutive Equation for Damper (R-element).

  Rough Simulation of one hysteretic Element. These curves were obtained by just varying the critical values.

Figure 4 . 24 :

 424 Figure 4.24: Simulation of one hysteron to show it has the same shape (approximate) as experimental curves.

  Mechanical analogy of n-hysterons to model hysteresis more precisely.

  Associated Bond Graph. The dierent zn values sum at the '0' junction to give the nal z.

Figure 4 . 25 :

 425 Figure 4.25: Bond Graph for multiple hysterons.

Figure 5 .Figure 5 . 1 :

 551 Figure 5.1 shows a block diagram representing schematically the dierent parts of the data acquisition procedure. A PC connected to a dSPACE 1104 R&D Controller board which contains the necessary ADC and DAC channels is used for signal acquisition and processing. It has a real time interface which can easily be connected to Simulink. Programs/block diagrams madein Simulink can then be downloaded to the dSPACE processor using the provided dSPACE software. The lowest sample time which can be achieved with this processor is around 0.05 ms. As shown in Figure5.1, a signal be-

Figure 5 .

 5 Figure 5.2 shows a schematic of the electromagnet with related dimensions

Figure 5 . 2 :

 52 Figure 5.2: Electromagnet used to generate magnetic eld.

Figure 5 . 3 :

 53 Figure 5.3: Mechanical structure.

Figure 5 .

 5 Figure 5.4 shows the assembled setup to make a very basic actuator.Various tests have been performed using this setup. To investigate the hysteretic nature of the material, a sinusoidal input has been applied to the electromagnet and the position was recorded. This was done for dierent values of stress and the results are shown in gure 5.5.

Figure 5 . 4 :

 54 Figure 5.4: Assembled electric circuit and mechanical structure to make a crude actuator.

Figure 5 .

 5 Figure 5.9 shows the preisach plane and how it moves. All the hysterons used to model a system makes up the preisach plane. They are characterised by their switching values r and s. The preisach boundary which is the line seperating hysterons which are on and those which are o. This boundary has been shown to be passive in Gorbet et al.[START_REF] Robert B Gorbet | Passivitybased stability and control of hysteresis in smart actuators[END_REF]. Passivity is very important for the control of port Hamiltonian systems as will be seen later. This area should be further investigated.

  σ = 0.83 MPa σ = 1.00 MPa σ = 1.22 MPa σ = 1.56 MPa σ = 1.58 MPa σ = 1.84 MPa σ = 2.12 MPa (b) Position for dierent applied stresses.

Figure 5 . 5 :

 55 Figure 5.5: Response of actuator to dierent stresses with an applied sinusoidal input.

Figure 5 . 6 :

 56 Figure 5.6: Hysteresis of actuator between current and position.

Figure 5 . 7 :Figure 5 . 8 :

 5758 Figure 5.7: Preisach Model with dierent number of hysterons to model experimental curve. N is the number of hysterons.

Figure 5 . 9 :

 59 Figure 5.9: Movement of Preisach plane

  are described by a storage function (which is a proper Lyapunov function). The goal then is to reshape the original energy function by means of a controller to achieve the control requirements (stability and/or tracking). The IDA-PBC (Interconnection and Damping Assignment-Passivitybased Control technique), uses the passivity properties of port Hamitonian

(5. 1 )Figure 5 . 10 :

 1510 Figure 5.10: Example of a mechanical passive system.

J

  and R as well as the energy function H to achieve control objectives. Usually given a port Hamiltonian system, one aims at a closed loop Hamiltonian system such as ẋ = (J d (x) -R d (x)) ∂H d ∂x (5.6) where J d = -J T d is the desired structure matrix, R d = R T d is the desired dissipation matrix and H d is the desired Hamiltonian. Propositioin 5.3.1. Consider the system ẋ = f (x) + g(x)u (5.7)

(5. 13 )

 13 where J d = -J T d and R d = R T d ≥ 0 are the new interconnection and damping matrices. H d is the new energy function.

Figure 5 . 11 :Figure 5 .

 5115 Figure 5.11: Magnetic Levitation System

  [START_REF] Dc | Theory of ferromagnetic hysteresis[END_REF] which are all positive for x 1 < 0 and α = 1. In fact for positive value of x 1 *

  Contour plot Closed loop Energy Function

Figure 5 . 12 :

 512 Figure 5.12: Open Loop and Closed loop of H d .Desired Position=0.05

Figure 5 . 13 :

 513 Figure 5.13: Postion Control and Control voltage when the designed control law is applied.

  Control Voltage u with damping.

Figure 5 . 14 :

 514 Figure 5.14: Postion Control and Control voltage when damping is added to the sytem.

Figures 5 .

 5 Figures 5.14 and shows we have drastically reduced the oscillations for gain values above 3. The control voltage maximum also is comparable to the our previous results. Also, disturbance rejection is also much improved.

2 Figure A. 3 :

 23 Figure A.2: Linear graph example.

Figure A. 4 :

 4 Figure A.4: A loop set(left) contains only 1 link whereas a cut set(right) cuts only 1 tree branch.

  rive the necessary equations needed to model lumped parameter systems.

Figure B. 1 :(B. 5 )

 15 Figure B.1: Solenoid with and without material

= d 1 2 µ 0 H 2 0

 2 Replacing the latter relation in (B.10) we getdW b =V H 0 µ 0 dH 0 + V H 0 µ 0 dM dW b =d(V 1 2 µ 0 H 2 0 ) + V µ 0 H 0 dM dW b =d 1 2 µ 0 H 2 0 dV + (µ 0 H 0 dM )dVNow the total magnetic moment is m = M dV and hence the above equation becomesdW b dV + µ 0 H 0 dm (B.11)The rst term on the right hand side of (B.11) is the magnetic energy stored in the empty solenoid and the second term is the work done on the matter specimen in changing its magnetization. W b is therefore the sum of work done to create the magnetic eld and to magnetize the material. Total work done to magnetize the material only, W m can be written as dW m = µ 0 H 0 dm (B.12)

Figure B. 2 :

 2 Figure B.2: Magnetic Circuit.

Figure C. 1 :

 1 Figure C.1: Laws of Thermodynamics

dS i > 0 (C. 6 )C. 3

 063 Energy and Work.

Figure C. 1

 1 Figure C.1 shows how the internal energy of system changes. Q e is the heat added from outside. f ext is the generalized external force. It is not necessarily equal to f int except in equilibrium. Also as shown in the gure, dU , is an exact total dierential.

15 )

 15 In particular, we seldom have such knowledge, we are most likely to know the temperature rather than the entropy. Then we make use of the Legendre transform, and writeF = U -T S (C.[START_REF] Gauthier | Modélisation des Alliages e Memoire de Forme Magnetiques pour la conversion d'energie dans les actionneurs et leur commande[END_REF] then in any reversible change we have dF = dU -T dS -SdT = P r dq r -SdT (C.17)

  is in the same direction as H 0 . . . . . . . . . . . .

	3.3	Relative Magnetization Response as reported by Heczko et al.
		[27]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
	3.4	Representative volume. The direction of the magnetization
	vector in α 3.5 Twinning mechanism. Formation of domain walls and rotation

1 Introduction 1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Overview of Magnetic Shape Memory Alloys . . . . . . . . . . 1.3 Unied Energy Modelling . . . . . . . . . . . . . . . . . . . . 1.4 only one link (dashed) and cut sets should have only one tree branch. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1 Deformation with dierent applies stress [38]. . . . . . . . . . 3.2 Crystallographic Change . . . . . . . . . . . . . . . . . . . . . of magnetization vector. . . . . . . . . . . . . . . . . . . . . . ix 3.6

Table 2 .

 2 1: Generalized Coordinates and Momentum for electrical part

Table 2

 2

	.2: Generalized Coordinates and Momentum for MSMA
		i	q i	qi	p i
	MSMA	5	eld, D	H.l B.S
	MSMA	6	Fraction, z	ż	p z
	MSMA	7

Table 2 .

 2

	3: Generalized Coordinates and Momentum for Load
		i	q i	qi p i
	Load	8	displacement, x ẋ p x
	2.3.3 The mechanical subsystem
	The mechanical subsystem consists of the load, m, being moved by the
	MSMA. Table 2.3 shows the generalised coordinate and momentum asso-
	ciated with the load. The mechanical subsystem consists of the kinetic and
	potential energy.

Table 3 .

 3 .[START_REF] Nandkumar | Characterization and Modeling of the Ferromagnetic Shape Memory Alloy Ni-Mn-Ga for Sensing and Actuation[END_REF]) being invertible, we can now write the current, i, in terms of the λ. This will prove useful in writing the energy equation.

			1: Values used for simulation
	N	w	l	a	d	χ a	χ t
	1200	25 mm	20mm	3mm	5mm	4	0.82
	Equation (3

Table 3 .

 3

	Co-Energy
	2: Energy Relation
	Energy
	Conservation of Energy

  In the mechanical part, the state variables are x t and p t . The state variable z is in the MSMA part. The port Hamiltonian representation for the mechanical subsystem, taking the Hamiltonian H m as

	and for p t
	e 10 = ṗt
	e 10 = e 8 -e 11 + e 12 ṗt = -AE l = -∂W p ∂x t -b ∂p t ∂W k x e -b ẋt + mg + mg	(4.36)
				2	(4.34)
	Using (4.33) and (4.34) and the bond graph in Figure 4.17b and choosing
	state variables as x t , p t , and z the following equation can be written
	ẋt =	p t m	=	∂W k ∂p t	(4.35)

  and its variants. Lyapunov technique was originally used as

	an analysis tool but over time became useful technique for feedback control
	design.
	Stability in the sense of Lyapunov is concerned with trajectories of a
	system when the initial state is near an equilibrium point. Roughly speak-
	ing, there are 3 types basic concepts: local stability, asymptotic stability
	and global stability. Local stability corresponds to the system trajectories
	staying continuously near the initial state. Asymptotic stability corresponds
	to trajectories starting suciently close to an equilibrium point actually
	converging to an equilibrium state as t → ∞. Global asymptotic stability corresponds to every trajectory approaching a unique equilibrium point as
	t → ∞.

  3.1. The map u → y is passive if there exists a state functon H(x), bounded from below, and a nonnegative function d(t) > 0 such that

	t energy supplied to system u T (s)y(s)ds 0	= H(x(t)) -H(x(0)) energy stored	+	d(t) dissipated energy

Table 5 .

 5

		1: Identied Values
	k 0.7107 Hm
	a	0.5	m
	5.3.3 Magnetic Levitation Example
	Magnetic levitation presents a very interesting problem from the Port-Hamiltonian
	control point of view as the constitutive laws are not linear and there is an
	electro-mechanical coupling which should be taken into consideration while
	designing the control law. This model has been extensively studied and the
	results are published in

  .[START_REF] Shearer | Introduction to system dynamics. Addison-Wesley series in systems and controls[END_REF] In(5.66), if we set C 3 = k, we have β = -γl

	C 2	. Substituting for β in
	(5.65) we have,

Acknowledgements

for the electronics involved. The material on the market now have a saturation value of 0.3 T which greatly reduces the complexity and cost of the electronics.

Finally for the control part, various forms of IDA-PBC should be tried with dierent energy function to yield the best results. One thing to consider is the path dependence. In hysteretic material, many paths exists to reach the same point. One control strategy could be to take the path which require minimum energy or which maximises output.

Appendix A Linear Graph Theory in Brief

A.1 Linear Graphs To characterize any system, the topology as well as the constitutive equations are required. In this section we present the graph theory approach and we show how the topology of the circuit can be derived. We will adopt an electrical terminology such as branch current and branch voltage and later we will generalise to other domains. Figure A.1 shows a two terminal lumped element and its associated linear graph. Usually, we associate a reference direction for the branch voltage and the branch current. We usually take a current as positive when it enters a branch through the positive terminal and leaves the branch through the negative. A state space formulation requires that the model be in the form

Hence for capacitors, the state variable would be v c and for inductors it would be i L . To evaluate C dv C dt , we will need the state variables and possibly the inputs. Therefore, a cut-set equation will give the necessary equation.

Similarly, to nd L di L dt , a loop equation is needed.

Referring to gure A.2, the cut-set equation is:

And the state space equation is obtained as:

In [START_REF] Es Kuh | Basic circuit theory[END_REF], a systematic procedure is given to nd the state space equations which is as follows:

1. Find a tree with all voltage sources and capacitors and possibly resistors.

2. Put all inductances in the links or co-tree and remaining resistors.

3. Use tree branch capacitor voltages and link inductor currents as state variables.

If l is the mean path of the magnetic circuit and a current i ows into the circuit then the force acting inside the winding is the magnetic eld

The mmf is therefore the work done, such that

Making use of the forth Maxwell equation (B.4) in integral form, it corresponds to:

An equivalent to resistance called reluctance,R, can also be dened.

The total magnetic ux, φ, is given by

µA the reluctance of the magnetic circuit. As compared to elec- tric circuits, we can say that φ is equivalent to current and reluctance is equivalent to resistance while emf and mmf are analogous. These concepts are very useful to design circuits in the static case.

From (B. [START_REF] Gauthier | Modélisation des Alliages e Memoire de Forme Magnetiques pour la conversion d'energie dans les actionneurs et leur commande[END_REF]), we see that the integration of H around a closed contour is equal to the net current crossing the surface enclosed by the contour. From this denition, we can dene a scalar magnetic potential just as we dene a scalar electric potential. permeability of the core. Then the magnetic ux, φ, is given by

For the magnetic circuit with leakage given in gure B.2b, the total reluctance, R t , is given by

where R l is the reluctance of the leakage ux and R c is the reluctance of the core. Therefore the magnetic ux in the circuit is given by φ = N i

Rt and

In this regard, magnetic circuits can be considered to be analogous to electric circuit and reluctance is similar to electrical resistance. Unfortunately this analogy works well only in the static case (magnetostatics). A major dierence is that a magnetic eld stores energy whereas an electrical resistance dissipates energy. In this regard, reluctance is more like a non-linear capacitor which stores energy.

A more correct representation used in the Bond Graph analogy is to treat the magnetomotive force as an eort variable and instead of the magnetic ux, φ, it is φ which becomes the ow variable. As there is a relationship between the integrated ow(φ) and the eort (mmf ), magnetic circuit can be represented as a bond graph "C" element, i.e a generalized capacitance.

Moreover, it should be noted that two main kind of losses occur in the core. Firstly there are eddy current losses which are current induced in the core. Being conducting, these current experiences a resistance and hence heat dissipation occurs. Secondly the eects of hysteresis invariably leads to a loss in energy.

Appendix C Thermodynamic theory in brief

Thermodynamics can be described as the science, more importantly, as an engineering tool used to describe processes that involve changes in temperature, transformation of energy, and the relationships between heat and work [START_REF] Herbert B Callen | THERMODYNAMICS & AN INTRO[END_REF][START_REF] Hartley | Thermodynamics: An Introductory Treatise Dealing Mainley with First Principles and Their Direct Applications[END_REF][START_REF] Reiss | Methods of thermodynamics[END_REF]. It is a phenomenological theory based on two laws usually called the The First Law of Thermodynamics and The Second Law of Thermodynamics. Whereas the former is a statement of the conservation of energy, the latter gives the direction of a process. In this sense, it is more an evolution law. This will be made clear in the following sections.

C.1 The First law of Thermodynamics

The rst law of thermodynamics states that there is a state function which is extensive and conservative called internal energy and usually denoted by U which can only be changed by work or heat. Mathematically it is written as:

where dW is the amount of work done by or on the system and dQ is the amount of heat added or removed from the system.

To understand (C.1), three quantities need to be explained: namely extensive (intensive), conservative and state function.

In thermodynamics, we deal with two main types of variables intensive and extensive. Intensive variables are those variables which do not depend on size such as temperature and pressure. On the other hand, variables which depend on size such as mass and volume are called extensive quantities.

We will exclusively talk of intensive and extensive quantities as duals in an energy formulation. That is in an elastic deformation, the force f , is the intensive quantity whereas the displacement l is extensive and their product f dl is the innitesimal amount of work done. Similarly the work done by a battery is vdq, the intensive variable being the voltage v and the extensive being the charge q.

135 Conservative systems are those systems whose energy stays constant over time when left by themselves. A pendulum oscillating without damping will continue to do so indenitely unless acted upon by an external force.

And nally, a state function is a function whose values depend only on the end-points, i.e initial and nal values but not on the path taken. Suppose we have the internal energy of system which is a function of entropy, S, and generalized displacements, q, terms to be dened later. The internal energy can then be completely dened knowing the entropy and the generalized coordinates. If then the internal energy is changed by adding some heat and performing some work on the system, the new internal energy is only characterized by the values of entropy and generalized coordinates at the new point. It does not matter how much heat or how much work has been done provided their sum is the same. Hence this is called a state function and its value depend only on end points. Hence, in equation (C.1) dU is a state function whereas dW and dQ are not. Their value depend on the path taken. In mathematics, dU is called an exact dierential whereas the other dW and dQ are called inexact dierentials.

Most of the diculty in thermodynamics lies in making the inexact differentials exact.

C.2 The Second law of Thermodynamics

The second law of thermodynamics stipulates that there exists a state function, S, which is extensive and non-conservative called entropy such that, in any reversible change,

By reversible, we mean that the process after undergoing a change, is able to return back to its original conguration after the external agent causing the change is removed. An example would be the elastic deformation of a spring. A spring can be extended by application of a force and on removing the force, the spring returns to its original position. Conversely, in an irreversible process, after removal of the external agent, the process does not return to its original conguration. A compensating agent, which is reverse of the original force should be used to return it to its original position [START_REF] Hartley | Thermodynamics: An Introductory Treatise Dealing Mainley with First Principles and Their Direct Applications[END_REF].

Furthermore, entropy can be broken down into two parts which are S e and S i . We will call S e , exchange entropy and S i , irreversible entropy created inside the system under consideration.

dS = dS e + dS i (C.4)

This equations tells us that if we hold the coordinates and the entropy constant (dq r = 0 and dS = 0), the internal energy U can only decrease and if we hold the energy and coordinates constant, the entropy can only increase.

The condition for stable equilibrium therefore is that the energy be as small as possible the given coordinate and entropy, or that the entropy be already as large as possible for the given coordinate and energy. It should be noted in that in experiments only the second condition is possible by preventing heat ow and keeping the coordinates constant).

If instead we hold the coordinates constant as well as the temperature, the conditions for equilibrium becomes d(U -T S) < 0 dF < 0 Hence we see that F should be a minimum for stable equilibrium at given coordinates and temperature. A similar reasoning for G also leads to a minimum dG < 0 for stable equilibrium.

C.6 Irreversible thermodynamics

From the rst law of thermodynamics, we see that work done and heat both hold equal value in changing the internal energy. Hence mechanical energy can be converted to heat energy and heat energy can be converted to mechanical energy. But in practice one transformation is more feasible than the other and this direction is given by the second law.

The subject of irreversible thermodynamics deals mainly with the rate of production of entropy. And from such consideration, there is an inequality called Clausius-Duhem inequality.