A Device model for xMR Sensors based on the StonerWohlfarth model
Abstract
The StonerWohlfarth model provides an efficient analytical model to describe the behavior of magnetic layers within xMR sensors. Combined with a proper description of magnetoresistivity an efficient device model can be derived, which is necessary for an optimal electric circuit design. Parameters of the model are determined by global optimization of an application specific cost function which contains measured resistances for different applied fields. Several application cases are examined and used for validation of the device model. Furthermore the applicability of the SW model is verified by comparison with micromagnetic energy minimization results.
keywords:
Device model, xMR sensors, StonerWohlfarth model, Micromagnetism, Hysteresis, Parameter Optimization[cor1]Corresponding author
1 Introduction
Magnetic sensors offer the possibility of contactless sensing and are used in a wide field of applications (1). Readhead sensors for magnetic storage devices, magnetic biosensors and position, speed and binarystate sensors used in automotive and industrialapplications are only a few examples. Compared with the well established hall sensors xMR sensors offer higher sensitivity and thus allow a more flexible use of the sensors. Furthermore it is possible to combine the sensing element and signal conditioning electronics into one robust, monolithic design (2); (3).
For an optimal design of the signal condition circuit a detailed description of the sensing element is of utmost importance. While micromagnetic simulations with wellestablished tools (4) provide an accurate description of the magnetic state, those simulations are very timeconsuming and it is difficult to directly interface them with electric circuit simulations. Device models based on electrical equivalent circuits (5); (6) are well suited for integration in various hardware simulation environments like SPICE, VHDLAMS or VERILOGA. However using a modeling approach based on simplified physical assumptions is advantageous because it provides insight into the underlying physics and thus leads to more extensible models. In Ref. (7) a device model for a magnetictunneljunction(MTJ) has been presented, which iteratively solves a StonerWohlfarth model for a quasistatic description of the magnetic layers. Using the LandauLifshitzGilbert equation extends the model to dynamic magnetization processes (8); (9).
Within this work an analytical solution of the StonerWohlfarth model is used which provides an efficient and accurate description of the magnetic properties of the xMR sensor. In practice the subjective selection of optimal parameters for different models complicates the validation of model features. A generic and flexible method, based on the global optimization of an application specific cost function, is proposed to automatically determine reproducible optimal parameters for the model. Furthermore the model is applied to different test cases and compared with measurement results. Additionally micromagnetic simulations can be used for validation of the device model without the need for timeconsuming measurements.
The structure of the paper is as follows. Section 2 summarizes electric and magnetic properties of xMR sensors which will be described by the device model and explains in detail how the underlying StonerWohlfarth model can be solved analytically. The solution of the global optimization problem introduced in Sec. 3 determines the optimal device parameters for a certain application case. Finally in Sec. 4 the device model is validated by comparison with measurements for several test cases.
2 Device model
xMR sensors consist of several thin magnetic layers which change their magnetization depending on the applied field, which in turn influences the resistance of the sensor. Although it is possible to directly measure the magnetic state of a magnetic layer (e.g. using the magnetooptic Kerr effect), it is more convenient to simply measure the total resistance of the device. Therefore it is necessary to model both the magnetic and the electric properties of the device.
2.1 Electric Properties
Within this work the following types of magnetoresistance have been taken into account:

Anisotropic magnetoresistance (AMR): AMR sensors only consist of a single magnetic layer which changes its resistance according to the angle between its magnetization and the applied electrical current. The AMR effect is a uniaxial effect, which can be described by the following relation (10)
(1) 
Giant magnetoresistance (GMR), Tunnel magnetoresistance (TMR): Both GMR (11) and TMR (12) sensors contain at least two magnetic layers. Within this work we are focusing on so called spinvalve sensors (13) which consist of a softmagnetic freelayer and at least one pinnedlayer. The magnetization of the freelayer is strongly influenced by the external field, whereas the pinnedlayer determines a reference direction independent of the external field. The magnetization of the pinnedlayer is fixed via exchangecoupling with an antiferromagnetic layer, which reduces the effective saturation magnetization and thus increases the magnetic anisotropy field . Pinning strength can be further improved by using two antiferromagnetically coupled pinnedlayers. The GMR as well as the TMR effect show unidirectional behavior
(2) , where and is the relative angle between the magnetizations within free and pinnedlayer. Despite the more complex structure of these sensors they a preferred for applications, because the provide larger sensitivities (1).
2.2 Magnetic Properties
The lateral dimensions of the xMR sensors under consideration vary from to . The StonerWohlfarth(SW) model provides an analytical model to describe the magnetic layers as long as they behave like singledomain particles. This is the case especially for small sensors, but even for larger ones the SW model gives good approximations in many application cases.
The SW model assumes a singledomain inside of a layer which allows to describe the magnetization state as a single unit magnetization vector . Only an external field and (uniaxial) anisotropy are considered. Due to the symmetry of the problem the magnetization lies within the plane spanned by the external field and the anisotropy axis, which reduces the problem to a 2D problem. The reduced total energy density reads as
(3) 
, with , and . is the volume of the layer, the uniaxial anisotropy constant, the permeability of the free space, and is the angle between anisotropy easyaxis which is assumed along the axis (see Fig. 1). The stable magnetization states for an applied field can be calculated analytically, by a transformation to Cartesian coordinates as proposed in Ref. (14). The stability conditions requires that the first derivative of the total energy vanishes.
(4) 
Considering that since is the reduced magnetization allows to eliminate either or and leads to one of the following 4th order equations:
(5a)  
(5b) 
In general a 4th order equation always has 4 solutions, however not all of them need to be real. Considering allows to define a critical curve which separates the inner region where all four solutions are real from outer region where only 2 real solutions exist. This critical curve is also called StonerWohlfarth asteroid (see Fig. 2) and written in Cartesian coordinates it looks like
(6) 
Solving equation (5) is usually done by reducing the quartic to a subsidiary cubic equation. A real root of the cubic equation is then used to factorize the quartic to quadratic equations which can easily be solved. Different approaches to reduce the quartic equations lead to numerical instabilities for different input coefficients. Combination of Ferrari’s, Descartes’, Neumark’s, or Yacoub & Fraidenraich’s algorithms depending on the actual coefficients (15) produces stable results for arbitrary applied fields.
3 Parameter Optimizations
Identifying all parameters of a device model can be a complicated task since only limited measurement capabilities are available. Additionally for a real sensor the assumptions of the idealized model may be violated to a certain extent. An alternative and very comfortable way of selecting the necessary parameters is by determining a costfunction and solving an optimization problem. Independent of the type and extent of the measurement data this method provides an optimal device model. The choice of the cost function furthermore allows to focus the optimization on certain features which are most important for the current application.
Finding the optimal device model is a multidimensional global optimization problem (GLP). In contrast to local optimization problems most deterministic algorithms for global optimization scale very badly. Different heuristic methods have been proposed to overcome the performance problem. Within this work different GLP algorithms from the OpenOpt (16) suite have been applied to the parameter optimization problem and their performance and accuracy have been compared. Due to the unified interface of OpenOpt switching between the provided optimization methods proves to be simple.
The objective function is defined as
(7) 
, where is the number of measurements, is the weight of the th measurement, is the simulated result and is the measured result. Within this work only equally weighted measurements were used. The resistance of the xMR element was measured as a function of the applied field strength for various field angles as described in Sec. 4. A comparison of different GLP methods can be found in Fig. 3 as well as in Tbl. 1. The DE algorithm proved most efficient and reliable and will be used for all optimizations done in the following sections.
Method  Objective function  freelayer  pinnedlayer  transferfunction  

de  0.372  10.00  90.0  2.00  1.19  405.81  1.61  18.758  897.91 
isres  0.372  10.00  90.0  1.99  1.18  405.57  1.60  18.758  897.81 
pswarm  0.393  10.54  90.0  0.15  1.70  561.82  1.56  18.756  898.11 
mlsl  0.745  8.85  90.0  2.00  1.55  323.17  1.53  18.792  892.44 
heeds  0.911  10.12  88.2  1.88  1.24  555.00  1.80  18.800  900.82 
galileo  0.987  7.55  86.9  1.60  1.82  377.94  3.41  18.749  900.89 
stogo  1.191  17.02  46.4  1.43  0.42  639.18  12.08  18.794  1009.75 
4 Measurements
4.1 Hysteresis measurements
One key feature of the SW model is the representation of a hysteresis. For the characterization of an xMR sensor hysteresis curves were measured along certain directions. Depending on the field angle the behavior of the sensor changes dramatically. For applied fields orthogonal to the easyaxis the magnetization of a SW particle shows linear behavior, whereas for fields along the easyaxis it shows abrupt switching from one state into the other.
In order to characterize the direction dependent hysteresis behavior of the sensor a homogeneous field created by a Helmholtz coil setup is applied. After the sensor is saturated applying a field of , field amplitude is decreased down to and again increased up to using steps. Field angles are adjusted in steps by rotating the whole sensor against the stationary Helmholtz coil. The measured sensorresistance is used to find the optimal parameters of a certain device models, by minimizing the squared difference of measured and simulated resistance.
The following list summarizes the progress of the device model and describe which features of the measurement data can be reproduced by the different stages. Measured and simulated hysteresis curves are visualized in Fig. 8 and the optimal parameters can be found in Tbl. 2.

Stage I: (see Fig. 8) The simplest model of a xMR sensor only considers its magnetic freelayer. The anisotropy field as well as the easyaxis angle are used as design parameters. The pinnedlayer is replaced with a fixed reference direction which is necessary to calculate the resistance change according to Eqn. (2), with .
Although this model is very simple the qualitative behavior of the hysteresis for different angles can already be reproduced (e.g. the small hysteresis of the curve results from a tilting of the freelayer easyaxis). Nevertheless there are still large deviations from the measurement. Especially at large field amplitudes the simulated resistance saturates, whereas the measured data show a nonzero slope.

Stage II: (see Fig. 8) The magnetic properties of the pinned layer (, ) are added to the model.
Compared with the magnetic freelayer the pinned layer has a much larger anisotropy field, due to the small effective of the synthetic antiferromagnet. Therefore it is less resistive on the external field. Thus the sensor output is only slightly modified for small field amplitudes. For large fields however the pinned layer is significantly deflected which explains the nonzero slope of the measured resistance.

Stage III: (see Fig. 8) The simulated resistance at large field amplitudes still shows an angle dependent offset. An AMR effect within the freelayer is assumed () which allows to compensate this offset.

Stage IV: (see Fig. 8) Finally a stationary bias field can be added which allows to describe an interaction from the pinned layer onto the freelayer. Usually the strayfield interaction between the two layers can be compensated by means of a tunable RKKY interaction. Variation of the thickness of the thickness of the conducting layer (GMR) or the tunnel barrier (TMR) allows to control the RKKY interaction strength. Unfortunately the compensation only works in average and it even may be incomplete due to a nonoptimal production process.
A remaining interaction can explain a broken symmetry in the sensor output as it can be observed in the measurement data of the hysteresis. Two jumps from lower resistance to higher resistance occur, whereas an unbiased SW model predicts a symmetric response. Adding an uncompensated biasfield to the SW model allows to reproduce this effect.
Model description  Objective  freelayer  pinnedlayer  transferfunction  

function  
only freelayer  3.013  5.64  88.0          18.781  867.37   
with pinned layer  2.640  5.65  88.3      338.78  0.00  18.822  865.83   
with AMR effect  2.306  5.65  88.3      238.36  0.00  18.866  865.15  85.57 
with bias field  0.537  4.51  84.1  0.48  1.73  231.78  2.66  18.818  890.57  127.17 
4.2 Asteroid measurement
Another interesting property of xMR sensors is the switching between the different magnetic states of the freelayer, as described by the SW model. Especially the critical fields at which the switching occurs may be of interest for different applications. Measurements of the critical field along multiple directions show that in contrast to the SW model the critical field along the hard and easyaxis differ (see Fig. 9). This effect can simply be incorporated into the standard SW model by applying a scaled field to a standard SW model, where only the component is reduced.
(8) 
A more sophisticated approach directly allows to define a modified critical curve and derive the corresponding energy density for the definition of a generalized SWmodel (17). Using this approach allows refined modifications of the angular dependence of the switching field. The drawback of the method is that it no longer provides an analytical solution for the stable magnetizations.
4.3 Non StonerWohlfarth behavior
During the development of the device model some cases could be observed where the sensor output significantly deviates from a simple SW behavior. As a simple testcase a periodic field along the axis combined with a offset field is applied
(9) 
A fixed amplitude of the periodic signal is assumed, whereas the amplitude of the offset field is varied. For small offset amplitudes the applied field lies completely inside of the StonerWohlfarth asteroid. Thus according to the SW model the resulting output should depend on the actual state of the sensor. Initializing the sensor with a large field in either (UP) or (DOWN) direction and comparing the resulting amplitudes of the sensor resistance for different offsets thus allows validation of the SW model.
Measurement results presented in Fig. 10 show SW behavior for small offset fields. When the offset field is large enough switching occurs, but in contrast to the SW model the sensor state does not completely switch into the opposite state. For even higher offset fields the sensor finally switches completely and again shows SW behavior where both branches coincide.
The partly switching process can be explained by micromagnetic simulations which allow to gain an insight into the detailed magnetization states that occur within the magnetic layers. Using an efficient energy minimization method (18) to determine stationary magnetic states provides a large performance benefit compared with time integration methods. The magnetization of the magnetic freelayer is simulated for different dimensions and material properties listed in Tbl. 3. Simulation results using the original sensor dimensions (Sensor A) show good qualitative agreement with the measurement data (see Fig. 11). Additionally it can be shown that reducing the sensor dimension (Sensor B) suppresses the formation of the boundary domains. Thus partly switching can be avoided and pure SW behavior is observed (see Fig. 12). The magnetization state for various offset fields for both simulations is visualized in Fig. 13.
Dimension  Saturation  Exchange  
Polarization  Constant  
[]  [T]  [J/m]  
Simulation Sensor A  1.93  1.53e11  
Simulation Sensor B  0.80  2.00e11 
5 Conclusion
An efficient device model consisting of multiple SW particles was presented and applied to different application cases. Different measurements have been used for validation of the model and the missing model parameters are determined by solving a global optimization problem. Hysteresis as well as switching behavior of different sensors have been compared and could be reproduced well. Detailed micromagnetic simulations provide an explanation for deviations from SW behavior in large sensor structures. Depending on size and geometry of the magnetic layer multidomain states may occur, which violate a basic assumption of the SW model.
Acknowledgment
The authors would like to thank the Austrian Federal Ministry of Economy, Family and Youth and the National Foundation for Research, Technology and Development for the financial support.
Footnotes
 journal: Magnetism and Magnetic Materials
References
 J. M. Daughton, GMR applications, Journal of Magnetism and Magnetic Materials 192 (1999) 334–342.
 K. Kapser, J. Sterling, Integrated GMR based wheel speed sensor for automotive applications, in: Proceedings of IEEE Sensors, 2007, pp. 848–851.
 E. Oslon, R. Lorenz, Integrated current sensing for power electronic modules using GMR field detectors, in: 2005 European Conference on Power Electronics and Applications, 2005.
 J. Fidler, T. Schrefl, Micromagnetic modelling  the current state of the art, J. Phys. D: Appl. Phys. 33 (2000) R135.
 B. Das, J. Black, W.C., A generalized HSPICE macromodel for pinned spindependenttunneling devices, IEEE Trans. Magn. 35 (1999) 2889–2891.
 S. Lee, S. Lee, H. Shin, D. Kim, Advanced HSPICE macromodel for magnetic tunnel junction, Jpn. J. Appl. Phys. 44 (2005) 2696–2700.
 J. B. Kammerer, L. Hebrard, M. Hehn, F. Braun, P. Alnot, A. Schuhl, Compact modeling of a magnetic tunnel junction using VHDLAMS: computer aided design of a twoaxis magnetometer, in: Proceedings of IEEE Sensors, 2004, pp. 1558–1561.
 J. Kammerer, M. Madec, L. Hebrard, Compact modeling of a magnetic tunnel junction  part i: Dynamic magnetization model, IEEE Trans. Electron Dev. 57 (2010) 1408–1415.
 A. Jander, L. Engelbrecht, P. Dhagat, Dynamic veriloga model of a magnetoresistive spin valve, in: Behavioral Modeling and Simulation Workshop, 2008. BMAS 2008. IEEE International, 2008, pp. 50–54.
 I. A. Campbell, A. Fert, O. Jaoul, The spontaneous resistivity anisotropy in nibased alloys, J. Phys. C: Solid State Phys. 3 (1970) 95–101.
 M. N. Baibich, J. M. Broto, A. Fert, F. N. Van Dau, F. Petroff, P. Etienne, G. Creuzet, A. Friederich, J. Chazelas, Giant magnetoresistance of (001)fe/(001)cr magnetic superlattices, Phys. Rev. Lett. 61 (1988) 2472–2475.
 M. Julliere, Tunneling between ferromagnetic films, Physics Letters A 54 (1975) 225–226.
 P. P. Freitas, R. Ferreira, S. Cardoso, F. Cardoso, Magnetoresistive sensors, J. Phys.: Condens. Matter 19 (2007) 165221.
 R. Wood, Exact solution for a stonerwohlfarth particle in an applied field and a new approximation for the energy barrier, IEEE Trans. Magn. 45 (2009) 100–103.
 A. W. Paeth, Graphics Gems V, 1st Edition, Morgan Kaufmann, Boston, 1995.

Kroshko, Dmitrey, {OpenOpt}: Free
scientificengineering software for mathematical modeling and optimization
(2007).
URL http://www.openopt.org/  D. Cimpoesu, L. Stoleriu, A. Stancu, Generalized stonerwohlfarth model accurately describing the switching processes in pseudosingle ferromagnetic particles, J. Appl. Phys. 114 (2013) 223901.
 C. Abert, G. Wautischer, F. Bruckner, A. Satz, D. Suess, Efficient energyminimization in finitedifference micromagnetics: Speeding up hysteresis computations, arXiv:1405.2728 [physics].