**Matlab-Simulink Coupling to Finite Element Software for Design and Analysis of Electrical Machines**

Gaizka Almandoz, Gaizka Ugalde, Javier Poza and Ana Julia Escalada

Additional information is available at the end of the chapter

http://dx.doi.org/10.5772/46476

## **1. Introduction**

160 MATLAB – A Fundamental Tool for Scientific Computing and Engineering Applications – Volume 2

Yang, J., Ryan, M. & Power, J. (1994). Using Fuzzy Logic," Prentice Hall, 1994.

4827-4830, 28 December.2009.

*Trans, on Power Electronics*, Vol.17 N°2, March 2002.

*Symposium*, Vol.2, pp 625-630, Jul.1997.

*Analysis*, Vol.2, N°3, pp 159-165, 2008.

*Electron*. 47 N° 4, pp 863-870, Aug 2000.

September 30-October 4, 2001.

2002.

2006.

*technology, Temper University of technology*, Finland, 2000.

Vol.3, N°3, pp 35-44, 2007.

Guohan Lin & Zhiwei Xu (2009). Direct Torque Control of an Induction Motor using Neural Network. *1st International Conference on, Information Science and Engineering* (ICISE), pp

Martins, A.C., Roboam, X., Meynard, T.A. & Carvaiho, A.C. (2002). Switching Frequency Imposition and Ripple Reduction in DTC Drives by using Multilevel Converter. IEEE

Yang Xia & Oghanna, W. (1997). Study on Fuzzy control of induction machine with direct torque control approach. Industrial Electronics. ISIE 97, *Proceeding of the International* 

Kumar, R., Gupta, R.A., Bhangale, S.V. & Gothwal, H. (2008). Artificial Neural Network based Direct Torque Control of Induction Motor Drives. IETECH *Journal of Electrical* 

Toufouti, R., Mezian, S. & Benalla, H. (2007). Direct Torque Control for Induction Motor using Intelligent Technique. *Journal of Theoretical and Applied Information Technology*,

Dreyfus, G., Martinez, J., Samuelides, M., Gordon, M.B., Badran, F., Thiria, S. & Hérault, L. (2002). Réseaux de neurons : Méthodologie et applications. Editions Eyrolles, 2002. Grabowski, P.Z., Kazmierkowski, M.P., Bose, B.K. & Blaabjerg, F. (2000). A simple Direct torque Neuro Fuzzy control of PWM Inverter fed Induction motor drive. IEEE *Trans.* 

Viljamaa, P. (2000). Fuzzy gain scheduling and tuning of multivariable fuzzy control methods of fuzzy computing in control systems. *Thesis for the degree of doctor of* 

Barbara H. K. (2001). Stator and Rotor Flux Based Deadbeat Direct Torque Control of Induction Machines. IEEE *Industry Applications Society, Annual Meeting*, Chicago,

Casadei, D., Profumo, Serra, G. & Tani, A. (2002). FOC And DTC:Tox Viable Schemes For Induction Motors Torque Control. IEEE *trans.Power Electronics*. *On PE*, Vol.17, N°.5, Sept

Schibili, N., Nguyen, T. & Rufer, A. (1998). Three-Phase Multilevel Converter for High-

Roboan, X. (1991). Variateur de vitesse pour machine asynchrone, Contrôle de la vitesse sans

Ould Abdeslam, D., Wira, P., Mercklé, J., Chapuis, Y.A. & Flieller, D. (2006). Stratégie neuromimétique d'identification et de commande d'un filtre actif parallèle. *Revue des Systèmes, Série Revue Internationale de Génie Electrique* (RS-RIGE), vol. 9, no. 1, pp 35-64,

Ould abdeslam, D. (2005). Techniques neuromimétiques pour la commande dans les systèmes électriques: application au filtrage actif parallèle. *Thèse de doctorat d'état en* 

Power Induction Motors. IEEE *trans. On Power Elect*. Vol. 13 N°.5, 1998.

*Electronique, Electrotechnique et Automatique*, Université de Batna, 2005.

capteur mécanique. Thèse Doctorat de L'INPT, Toulouse, 1991.

Classical electric machine design processes normally do not take into account some specific aspects (PWM voltage supply, mechanical resonances, etc) of the application where the motor is integrated. Actually the electromagnetic properties of the machine can influence the overall performances of the system, or the performances of the motor can get worse due to the influence of other components that are connected to the motor. For example, at low speeds, the torque ripple produced by the machine could cause undesirable speed pulsations and inaccuracies in motion control. At the same time, machine performance could be negatively affected by the Power Converter. For instance, the large amount of harmonic components contained in a PWM wave can increase the iron losses. Furthermore, when long connection cables are used between motor and power converter, high dv/dt voltages, which are characteristic in PWM signals, might cause over voltages at motor terminals which could damage seriously the winding insulation.

A possible solution to identify these problems is to add a new step into the design process previously to the prototyping stage, where the behavior of the machine into the final application is analyzed, evaluating the interaction between different elements of the system.

In order to achieve this purpose, this chapter deals with the integration of the numerical magnetic field computation software FLUX and the system simulator MATLAB-SIMULINK into only one simulation tool. The electric machine is modeled with FLUX software, whereas the control, the electric components and the mechanical systems are implemented in MATLAB-SIMULINK. In addition, the Finite Element Method (FEM) for electrical motor design and analysis is described. On the other hand, MATLAB-SIMULINK coupling to FEM software is explained and some clues related to this issue are given. And

© 2012 Almandoz et al., licensee InTech. This is an open access chapter distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. © 2012 Almandoz et al., licensee InTech. This is a paper distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

finally two case studies are presented in order to illustrate the benefits of this multi-domain simulation method. In both cases a surface mounted permanent magnet synchronous motor is analyzed.

Matlab-Simulink Coupling to Finite Element Software for Design and Analysis of Electrical Machines 163

B) Electromagnetic-Thermal Coupling

sinusoidal spatial distribution of flux density in the air-gap, and due to the effect of slots

Regarding to the mechanical system, many times it may present resonances which can be excited by the drive. In that case important level of vibrations and noise can be produced.

Carrying out co-simulations concerning the control unit, the electric motor FEM model and the mechanical system model it is possible to evaluate the effect of torque ripple over the mechanical system (see Fig 2-A). Furthermore, this multi-domain simulation makes possible a pre-evaluation of control algorithms, analyzing the influence of different control strategies

as well as the influence of regulator parameters upon system performances.

**Figure 2.** Examples of different multi-domain simulations

A) Control-Electromagnetic-Mechanical System

Coupling

**2.2. Coupling between power electronics converter – Electric machine** 

which generates a well known Pulse Width Modulated (PWM) voltage.

Few decades ago, technological advances in power converters made possible the development of new variable speed drives, leading to important performance improvements in many applications. In this kind of drives, the speed of the motor is controlled varying the frequency of the supply voltage by means of an power converter,

C) Power Electronics Converter–Electric Machine Coupling

The high harmonics content of this non-sinusoidal supplying voltage causes significant increase in electromagnetic losses, leading to a less efficient motor. These losses could be

known as cogging torque.

## **2. Co-simulation tools for electrical machine design**

Typically conventional electric machine design process is divided into two stages: an initial analytic design is complemented by a more accurate analysis based on FEM Software. A disadvantage of this methodology is that some specific aspects of the application for which the machine is designed are not entirely taken into account during the design process. Consequently, after integrating the machine into the final application, some performance problems may appear due to the interaction between the motor and different elements of the system. A new design step where these phenomena are identified by multi-domain analysis may help in the task of achieving an optimal design.

An electric drive is a non-linear multi-domain system which involves electric, electromagnetic, thermal and mechanical domains. The analysis of the whole system requires a specific simulation tool for each domain. But this way it is not possible to evaluate the interaction between different subsystems. A possible solution could be a simulation tool capable to integrate all domains. However, it is well known that the more are the domains of the simulation tool, the less is the accuracy. Therefore, a solution may be the integration of different simulation tools in a multi-domain analysis. Few years ago, that solution was impossible due to limitations in computation capacity of the computers and incompatibilities between different simulation software. Nevertheless, nowadays the development of new powerful work stations and updated simulation tools oriented to co-simulations make possible to analyze relatively complex multi-domain systems by means of co-simulations.

**Figure 1.** Proposed Electric Machine Design Methodology

In this section some useful co-simulation examples for electric machine design will be presented.

## **2.1. Coupling between control unit – Electric machine – Mechanical system**

Normally the electromagnetic torque produced by an electric machine is not entirely smooth but it presents a certain ripple component. This oscillatory component is due to a nonsinusoidal spatial distribution of flux density in the air-gap, and due to the effect of slots known as cogging torque.

Regarding to the mechanical system, many times it may present resonances which can be excited by the drive. In that case important level of vibrations and noise can be produced.

Carrying out co-simulations concerning the control unit, the electric motor FEM model and the mechanical system model it is possible to evaluate the effect of torque ripple over the mechanical system (see Fig 2-A). Furthermore, this multi-domain simulation makes possible a pre-evaluation of control algorithms, analyzing the influence of different control strategies as well as the influence of regulator parameters upon system performances.

A) Control-Electromagnetic-Mechanical System Coupling

162 MATLAB – A Fundamental Tool for Scientific Computing and Engineering Applications – Volume 2

**2. Co-simulation tools for electrical machine design** 

may help in the task of achieving an optimal design.

**Figure 1.** Proposed Electric Machine Design Methodology

presented.

is analyzed.

finally two case studies are presented in order to illustrate the benefits of this multi-domain simulation method. In both cases a surface mounted permanent magnet synchronous motor

Typically conventional electric machine design process is divided into two stages: an initial analytic design is complemented by a more accurate analysis based on FEM Software. A disadvantage of this methodology is that some specific aspects of the application for which the machine is designed are not entirely taken into account during the design process. Consequently, after integrating the machine into the final application, some performance problems may appear due to the interaction between the motor and different elements of the system. A new design step where these phenomena are identified by multi-domain analysis

An electric drive is a non-linear multi-domain system which involves electric, electromagnetic, thermal and mechanical domains. The analysis of the whole system requires a specific simulation tool for each domain. But this way it is not possible to evaluate the interaction between different subsystems. A possible solution could be a simulation tool capable to integrate all domains. However, it is well known that the more are the domains of the simulation tool, the less is the accuracy. Therefore, a solution may be the integration of different simulation tools in a multi-domain analysis. Few years ago, that solution was impossible due to limitations in computation capacity of the computers and incompatibilities between different simulation software. Nevertheless, nowadays the development of new powerful work stations and updated simulation tools oriented to co-simulations make possible

In this section some useful co-simulation examples for electric machine design will be

Normally the electromagnetic torque produced by an electric machine is not entirely smooth but it presents a certain ripple component. This oscillatory component is due to a non-

**2.1. Coupling between control unit – Electric machine – Mechanical system** 

to analyze relatively complex multi-domain systems by means of co-simulations.

B) Electromagnetic-Thermal Coupling

C) Power Electronics Converter–Electric Machine Coupling

**Figure 2.** Examples of different multi-domain simulations

## **2.2. Coupling between power electronics converter – Electric machine**

Few decades ago, technological advances in power converters made possible the development of new variable speed drives, leading to important performance improvements in many applications. In this kind of drives, the speed of the motor is controlled varying the frequency of the supply voltage by means of an power converter, which generates a well known Pulse Width Modulated (PWM) voltage.

The high harmonics content of this non-sinusoidal supplying voltage causes significant increase in electromagnetic losses, leading to a less efficient motor. These losses could be

taken into account in the electromagnetic – thermal coupling in order to compute the overall heating of the machine.

Matlab-Simulink Coupling to Finite Element Software for Design and Analysis of Electrical Machines 165

electromotive force, and it is also very useful for the computation of the lumped parameters of the equivalent electric circuit, i.e. inductances and iron losses resistance. In this section the basis of this numerical method are explained and some important details related to the FEM

Simulations based on the FEM can be divided in three stages: Definition of the problem, resolution of the problem and results analysis. Next, these three stages are described briefly.

The definition of the problem is faced in three steps. First the geometry must be defined. After that the mesh may be created. And finally physical properties have to be defined. Undoubtedly meshing the problem is the most critical issue in the definition stage. It is widely known that the results accuracy depends strongly on the quality of the mesh. Therefore, normally the higher the amount of nodes is the more accurate the results are. On the other hand, the computational load also depends on the amount of nodes, so that the bigger the amount of nodes is the longer the required simulation time is. Thus, the meshing

Electric machines are non-linear problems so that they must be solved applying numerical iterative methods. In case of FLUX electromagnetic non-linear problems are solved by the Newton-Raphson method. Regarding to the equations, in the solving process of

�� ����� = 0 ����� = ��+ �����

� is the electric field, � is the magnetic flux density, � is the magnetic field, � is the current density, �� is the volume charge density and � is the electric flux density. It is important to notice that in electromagnetic problems the fourth Maxwell's law, that concerning to the electrostatic Gauss's law, is not considered. In addition to the considered three Maxwell's

� is the permeability of the medium, and � is the conductivity of the medium. To solve these equations a vector model is used, in which the magnetic vector potential �� is considered as state variable. Applying this vector model the objective function (4) is solved at each node of

The relationship between magnetic flux density and magnetic vector potential can be

�� ������ = �� (1)

� = ���� ������ (2)

��� =���� ��� (3)

analysis of electrical machines are pointed out.

**3.1. Definition of the electromagnetic problem** 

process is a trade of between accuracy and computational time.

electromagnetic problems the Maxwell's equations are considered.

laws, the following constitutive laws are taken into account as well.

��� = ���� ��� �

the mesh, and the value of this state variable is obtained as result at each node.

**3.2. Resolution of electromagnetic problems** 

����� = − ����

described as,

Another phenomenon caused by the mutual influence between the power converter and the machine is the overvoltage at machine terminals. This overvoltage is caused by the characteristic high dv/dt of PWM waveforms and it may appear when connection wires between power converter and machine are too long. In the worst case, this effect could irreversibly destroy the insulation of stator winding or even could damage some semiconductor of the converter.

Besides these two phenomena, a pulse width modulated voltage has another effect on machine performance. That kind of supplying voltage causes a non-sinusoidal current, which contributes to increase the ripple of the torque.

All these phenomena could be analyzed by multi-domain simulations concerning the electric and electromagnetic domains (see Fig 2-C). After identifying all these problems, several design modifications can be made in order to improve the performance of the electric drive.

## **2.3. Coupling between electromagnetic and thermal domains**

It is widely known that the temperature is very critical parameter in the performance of electric machines. The overheating of the machine depends on various factors such as core losses, current amplitude and working cycles. Typically conservative thermal designs are applied which may lead to bigger and more expensive machines. In order to get more compact motors, it is necessary to optimize the thermal design according to the requirements of the application.

This electromagnetic-thermal coupling simulation (see Fig 2-B) permits the evaluation of the overheating of the machine depending on the working cycles of the application. Thus, the design can be adjusted to the application performance achieving a thermally optimized machine.

As a particular case, machines excited by means of Neodymium permanent magnets are very sensitive to the temperature. The main drawback of this kind of rare earth magnets is the low Curie temperature, about 300ºC, and the high temperature sensitivity. If the operation point of the magnet remains above the typical knee in its characteristic curve, the change due to temperature is fully reversible. However, if temperature causes a change in the operation point below the knee, the magnet gets partially de-magnetized. So, it is very important to evaluate the rotor temperature in order to prevent any problem related to partial de-magnetization of magnets.

## **3. FEM analysis of electrical machines**

Software based on the Finite Element Method is known as very powerful tool for the design and analysis of electrical motors. FEM analysis makes possible an accurate evaluation of electromagnetic characteristics such as magnetic saturation level, torque or induced electromotive force, and it is also very useful for the computation of the lumped parameters of the equivalent electric circuit, i.e. inductances and iron losses resistance. In this section the basis of this numerical method are explained and some important details related to the FEM analysis of electrical machines are pointed out.

Simulations based on the FEM can be divided in three stages: Definition of the problem, resolution of the problem and results analysis. Next, these three stages are described briefly.

## **3.1. Definition of the electromagnetic problem**

164 MATLAB – A Fundamental Tool for Scientific Computing and Engineering Applications – Volume 2

heating of the machine.

semiconductor of the converter.

requirements of the application.

partial de-magnetization of magnets.

**3. FEM analysis of electrical machines** 

machine.

which contributes to increase the ripple of the torque.

taken into account in the electromagnetic – thermal coupling in order to compute the overall

Another phenomenon caused by the mutual influence between the power converter and the machine is the overvoltage at machine terminals. This overvoltage is caused by the characteristic high dv/dt of PWM waveforms and it may appear when connection wires between power converter and machine are too long. In the worst case, this effect could irreversibly destroy the insulation of stator winding or even could damage some

Besides these two phenomena, a pulse width modulated voltage has another effect on machine performance. That kind of supplying voltage causes a non-sinusoidal current,

All these phenomena could be analyzed by multi-domain simulations concerning the electric and electromagnetic domains (see Fig 2-C). After identifying all these problems, several design

It is widely known that the temperature is very critical parameter in the performance of electric machines. The overheating of the machine depends on various factors such as core losses, current amplitude and working cycles. Typically conservative thermal designs are applied which may lead to bigger and more expensive machines. In order to get more compact motors, it is necessary to optimize the thermal design according to the

This electromagnetic-thermal coupling simulation (see Fig 2-B) permits the evaluation of the overheating of the machine depending on the working cycles of the application. Thus, the design can be adjusted to the application performance achieving a thermally optimized

As a particular case, machines excited by means of Neodymium permanent magnets are very sensitive to the temperature. The main drawback of this kind of rare earth magnets is the low Curie temperature, about 300ºC, and the high temperature sensitivity. If the operation point of the magnet remains above the typical knee in its characteristic curve, the change due to temperature is fully reversible. However, if temperature causes a change in the operation point below the knee, the magnet gets partially de-magnetized. So, it is very important to evaluate the rotor temperature in order to prevent any problem related to

Software based on the Finite Element Method is known as very powerful tool for the design and analysis of electrical motors. FEM analysis makes possible an accurate evaluation of electromagnetic characteristics such as magnetic saturation level, torque or induced

modifications can be made in order to improve the performance of the electric drive.

**2.3. Coupling between electromagnetic and thermal domains** 

The definition of the problem is faced in three steps. First the geometry must be defined. After that the mesh may be created. And finally physical properties have to be defined. Undoubtedly meshing the problem is the most critical issue in the definition stage. It is widely known that the results accuracy depends strongly on the quality of the mesh. Therefore, normally the higher the amount of nodes is the more accurate the results are. On the other hand, the computational load also depends on the amount of nodes, so that the bigger the amount of nodes is the longer the required simulation time is. Thus, the meshing process is a trade of between accuracy and computational time.

#### **3.2. Resolution of electromagnetic problems**

Electric machines are non-linear problems so that they must be solved applying numerical iterative methods. In case of FLUX electromagnetic non-linear problems are solved by the Newton-Raphson method. Regarding to the equations, in the solving process of electromagnetic problems the Maxwell's equations are considered.

$$
\forall X \vec{E} = -\frac{d\vec{B}}{dt} \qquad \forall \cdot \vec{B} = 0 \qquad \forall X \vec{H} = \vec{f} + \frac{d\vec{B}}{dt} \qquad \forall \cdot \vec{D} = \rho\_v \tag{1}
$$

� is the electric field, � is the magnetic flux density, � is the magnetic field, � is the current density, �� is the volume charge density and � is the electric flux density. It is important to notice that in electromagnetic problems the fourth Maxwell's law, that concerning to the electrostatic Gauss's law, is not considered. In addition to the considered three Maxwell's laws, the following constitutive laws are taken into account as well.

$$
\vec{B} = \mu \vec{H} \quad \text{[ $T$ ]} \qquad \vec{J} = \sigma \vec{E} \quad \text{[ $A/m^2$ ]} \tag{2}
$$

� is the permeability of the medium, and � is the conductivity of the medium. To solve these equations a vector model is used, in which the magnetic vector potential �� is considered as state variable. Applying this vector model the objective function (4) is solved at each node of the mesh, and the value of this state variable is obtained as result at each node.

The relationship between magnetic flux density and magnetic vector potential can be described as,

$$
\vec{B} = \forall \times \vec{A} \quad \text{[ $T$ ]}\tag{3}
$$

$$\forall \mathbf{v} \times \left( v\_o [v\_r] \{ \forall \times \vec{A} \} - \vec{H}\_c \right) + [\sigma] \left( \frac{\partial \vec{A}}{\partial t} + \overrightarrow{grad} \, V \right) = 0 \tag{4}$$

$$\boldsymbol{\phi} = \int\_{\mathcal{S}} \vec{B} \cdot d\vec{s} = \int\_{\mathcal{S}} (\forall \times \vec{A}) \cdot d\vec{s} = \int\_{l} \vec{A} \cdot d\vec{l} \quad \text{[Webber]} \tag{5}$$

$$T = \frac{\partial W^{\prime (\text{l}, \theta)} \vert\_{\text{l} = \text{cte}}}{\partial \theta} = \frac{1}{2} \frac{\partial L}{\partial \theta} \dot{l}^2 + \frac{1}{2} \frac{\partial \aleph\_g}{\partial \theta} \phi\_{pm} + N \frac{\partial \phi\_{pm}}{\partial \theta} \dot{l} \quad \text{[Nm]} \tag{6}$$

Matlab-Simulink Coupling to Finite Element Software for Design and Analysis of Electrical Machines 169

ܪሺܤǡ ݀ܤȀ݀ݐሻ ൌ ܪ௦௧௧ሺܤሻ ܪௗ௬ሺܤǡ ݀ܤȀ݀ݐሻ (7)

B) Block Diagram of the loss calculation by the FEM and the

LSM

of the magnetic field strength are reconstructed from the induction waveforms obtaining in this way local hysteresis loops. This reconstruction of the magnetic field strength is performed using a model based on one ܪሺܤǡ ݀ܤȀ݀ݐሻ surface curve which is characteristic to each material. This curve must be obtained by experimental characterization of the material. In Fig 7-A the surface curve of a given material is shown. The model that reconstructs the

In Fig 8 two different hysteresis loops reconstructed by the LSM tool at the same local point are shown. Resulting hysteresis loops with sinusoidal and PWM voltages are plotted. In this

magnetic field strength can be described by the following expression.

way the minor loops caused by the PWM voltages can be appreciated.

**Figure 7.** Electric sheet losses computation methodology based on the LSM tool

A) One of the characteristic surface H(B,dB/dt) curves saved in the data base of the Loss Surface Model

voltages

**Figure 8.** Local hysteresis loops reconstructed by the Loss Surface Model with sinusoidal and PWM

A) Sinusoidal voltages B) PWM voltages with switching frequency of fs=4KHz

**Figure 6.** Different torque components in permanent magnet motors

electrical sheets. Hence, the computation of these losses components in FEM is carried out in two different ways. The Eddy current losses in permanent magnets are calculated as the active power dissipated in these regions considering the magnets as solid conductors. Meanwhile the losses in electrical sheets are computed by the tool so called Loss Surface Model (LSM) which is integrated in the FEM software FLUX for that purpose.

### **Loss Surface Model (LSM) for Iron Losses Computation in Electrical Sheets**

Normally FEM software do not consider the magnetic hysteresis cycle of electrical sheets in the solving process, but an approximated so called normal magnetization curve is taken into account. As the iron losses depend on the area enclosed by the hysteresis loop, these losses are not computed in the solving process and their calculation is addressed typically as a post processing task.

One calculation option consists in the local computation of the iron losses using the loss separation method and considering local induction waveforms calculated in the solving process. As main disadvantages, the accuracy of this computation method depends on some coefficients, and additional phenomenon as skin effect and minor loops are not normally considered.

FLUXpresents an alternative tool so called Loss Surface Model for iron losses computation. This tool is supposed to be more accurate than the method based on the losses separation theory, because it does not depend on empirical coefficients and it considers additional phenomena such as the skin effect or the minor loops [3]. Due to this fact, in this case the LSM has been used as post processing tool for the calculation of the losses in electrical sheets.

In Fig 7-B the iron losses computation process using the LSM is explained. First of all the electromagnetic problem is solved in the FEM calculating the temporal waveform of induction at each node of the mesh. In the post processing analysis the temporal waveforms of the magnetic field strength are reconstructed from the induction waveforms obtaining in this way local hysteresis loops. This reconstruction of the magnetic field strength is performed using a model based on one ܪሺܤǡ ݀ܤȀ݀ݐሻ surface curve which is characteristic to each material. This curve must be obtained by experimental characterization of the material. In Fig 7-A the surface curve of a given material is shown. The model that reconstructs the magnetic field strength can be described by the following expression.

$$H(B, \text{dB/dt}) = H\_{\text{static}}(B) + H\_{\text{dynamic}}(B, \text{dB/dt}) \tag{7}$$

In Fig 8 two different hysteresis loops reconstructed by the LSM tool at the same local point are shown. Resulting hysteresis loops with sinusoidal and PWM voltages are plotted. In this way the minor loops caused by the PWM voltages can be appreciated.

A) One of the characteristic surface H(B,dB/dt) curves saved in the data base of the Loss Surface Model

168 MATLAB – A Fundamental Tool for Scientific Computing and Engineering Applications – Volume 2

**Figure 6.** Different torque components in permanent magnet motors

<sup>0</sup> <sup>2</sup> <sup>4</sup> <sup>6</sup> <sup>8</sup> <sup>10</sup> <sup>12</sup> <sup>14</sup> -0.4

Time [msec]

processing task.


Cogging Torque [Nm]

considered.

sheets.

electrical sheets. Hence, the computation of these losses components in FEM is carried out in two different ways. The Eddy current losses in permanent magnets are calculated as the active power dissipated in these regions considering the magnets as solid conductors. Meanwhile the losses in electrical sheets are computed by the tool so called Loss Surface

A) Cogging Torque B) Total Torque

Electromagnetic Torque [Nm]

<sup>0</sup> <sup>10</sup> <sup>20</sup> <sup>30</sup> <sup>40</sup> <sup>50</sup> <sup>60</sup> <sup>175</sup>

Time [msec]

Normally FEM software do not consider the magnetic hysteresis cycle of electrical sheets in the solving process, but an approximated so called normal magnetization curve is taken into account. As the iron losses depend on the area enclosed by the hysteresis loop, these losses are not computed in the solving process and their calculation is addressed typically as a post

One calculation option consists in the local computation of the iron losses using the loss separation method and considering local induction waveforms calculated in the solving process. As main disadvantages, the accuracy of this computation method depends on some coefficients, and additional phenomenon as skin effect and minor loops are not normally

FLUXpresents an alternative tool so called Loss Surface Model for iron losses computation. This tool is supposed to be more accurate than the method based on the losses separation theory, because it does not depend on empirical coefficients and it considers additional phenomena such as the skin effect or the minor loops [3]. Due to this fact, in this case the LSM has been used as post processing tool for the calculation of the losses in electrical

In Fig 7-B the iron losses computation process using the LSM is explained. First of all the electromagnetic problem is solved in the FEM calculating the temporal waveform of induction at each node of the mesh. In the post processing analysis the temporal waveforms

Model (LSM) which is integrated in the FEM software FLUX for that purpose.

**Loss Surface Model (LSM) for Iron Losses Computation in Electrical Sheets** 

B) Block Diagram of the loss calculation by the FEM and the LSM

**Figure 7.** Electric sheet losses computation methodology based on the LSM tool

**Figure 8.** Local hysteresis loops reconstructed by the Loss Surface Model with sinusoidal and PWM voltages

Once the local hysteresis loops are obtained, the specific iron losses are computed integrating the area enclosed by each hysteresis loop.

$$P = \frac{1}{T} \int\_{T} \int\_{B} H \cdot dB \quad \left[ W/m^3 \right] \tag{8}$$

Matlab-Simulink Coupling to Finite Element Software for Design and Analysis of Electrical Machines 171

Being MATLAB numerical calculus software, FEM calculus can be carried out in MATLAB without any external software. However the tendency is to use specialized FEM software for each physical domain like Electromagnetic, Fluid dynamics and so on. For example Cedrat's FLUX software is well known electromagnetic FEM analysis software. Using FLUX enables to design and study a wide range of electromagnetic devices such as

However this software is usually generalist respect to the domain and an application approach of the software is usually desired for a more friendly use of the software by beginner users. That's why companies like Cedrat are providing programmatic tools for

Using some libraries, user can pilot a FLUX file that has been prepared previously from MATLAB for instance. Although several parameters are required to prepare the flux file, using external piloting, it is possible to limit the parametric study to a short number of parameters that are required to be visible by application user. The use of FLUX calculus Kernel is now more application oriented and any user without FEM knowledge can use the

Another MATLAB FEM collaboration example is the co-simulation. Usually the electromagnetic device that is being designed is connected to other external devices. Complex mechanical models, electrical circuits or hydraulic systems are some examples of models that can be easily modeled by MATLAB-SIMULINK but cannot be included in the

The simplest approximation to solve this multi-domain problem is the simplification of the electromagnetic device to an equivalent electric circuit based on lumped parameters such as resistance and inductances. This can be done with different levels of accuracy. For example, the inductance of a machine can be considered constant respect to the current of the machine. In a more precise approximation the saturation effect can be considered introducing a Look-up table to take into account the change of the inductance respect to the magnetic flux of the machine. In both cases, first FEM simulations are carried out and the values for the inductance

**Figure 9.** Associated electrical circuit to the permanent magnets

**4. Matlab-simulink coupling to FEM software** 

different electrical machines, actuators or sensors.

external piloting of their calculus Kernel.

calculus Kernel.

FEM software.

#### **Eddy Current Losses in Permanent Magnets**

In case of non-fractional machines normally the Eddy current losses in permanent magnets can be neglected. While in fractional machines these losses are more significant due to the high harmonic content of the armature field, so they cannot be neglected [4]. In order to make the proposed method usable to both non-fractional and fractional machines, the calculation of the permanent magnet losses is also addressed. Eddy current losses are due to the asynchronous harmonics of the magnetic field induced by the armature winding in the air-gap. The induced Eddy current density in the magnets can be expressed as in the following equation.

$$J\_{eddy} = -\frac{1}{\rho} \int \frac{\partial B}{\partial t} \cdot r \cdot dt + \mathcal{C} \quad \text{[} A/m^2\text{]}\tag{9}$$

Where ����� is the induced Eddy current density in the magnets, � is the electrical resistivity of the magnets, � is the armature magnetic field and � is the radius of the point in which the current density is represented. The Eddy current losses are computed using the following formula.

$$P\_{eddy} = \frac{2p}{T} \int\_0^{\pi} \int\_{-\frac{a}{2}}^{\frac{a}{2}} \int\_{R\_1}^{R\_2} J\_{eddy} \cdot \rho \cdot r \cdot dr \cdot d\theta \cdot dt \quad [\![W]\!] \tag{10}$$

Where �� and ��are the inner and the outer radius of the magnets respectively, � is the period of the fundamental component of the armature field and � is the magnets span in mechanical degrees [5]. It is necessary to consider in the formula the constant *C* in order to assure that the induced Eddy currents are limited to one pole piece. That means that the different magnet poles are supposed to be electrically isolated.

Regarding to the computation of the magnetic field induced by the armature winding in the air-gap, there are two options for that purpose depending on if the Eddy current reaction field is neglected or not. In case this reaction field is neglected, the Eddy currents are considered resistance limited and this way they can be calculated performing magneto static simulations. However, in case the Eddy current reaction field has to be considered, it is necessary to perform time step simulations. In the proposed method, as the machine is cosimulated with MATLAB-SIMULINK, the simulations are time stepped so the Eddy current reaction field is taken into account.

As far as the FEM simulation is concerned, magnets have to be defined as solid conductors. As the permanent magnets are electrically isolated, each one has to be associated to one solid conductor. In Fig 9 the electrical circuit associated to the permanent magnets is represented. It can be seen how each solid conductor has connected in parallel one resistor. It is because in the FEM software all the electrical components have to be connected in close circuit. These parallel resistances are set to very high values in order not to have influence on the losses computation.

� = �

����� = − �

����� <sup>=</sup> ��

current reaction field is taken into account.

on the losses computation.

� � ��

� �� � �����

� � �� �

�

different magnet poles are supposed to be electrically isolated.

�� � ��

integrating the area enclosed by each hysteresis loop.

**Eddy Current Losses in Permanent Magnets** 

following equation.

formula.

Once the local hysteresis loops are obtained, the specific iron losses are computed

In case of non-fractional machines normally the Eddy current losses in permanent magnets can be neglected. While in fractional machines these losses are more significant due to the high harmonic content of the armature field, so they cannot be neglected [4]. In order to make the proposed method usable to both non-fractional and fractional machines, the calculation of the permanent magnet losses is also addressed. Eddy current losses are due to the asynchronous harmonics of the magnetic field induced by the armature winding in the air-gap. The induced Eddy current density in the magnets can be expressed as in the

Where ����� is the induced Eddy current density in the magnets, � is the electrical resistivity of the magnets, � is the armature magnetic field and � is the radius of the point in which the current density is represented. The Eddy current losses are computed using the following

Where �� and ��are the inner and the outer radius of the magnets respectively, � is the period of the fundamental component of the armature field and � is the magnets span in mechanical degrees [5]. It is necessary to consider in the formula the constant *C* in order to assure that the induced Eddy currents are limited to one pole piece. That means that the

Regarding to the computation of the magnetic field induced by the armature winding in the air-gap, there are two options for that purpose depending on if the Eddy current reaction field is neglected or not. In case this reaction field is neglected, the Eddy currents are considered resistance limited and this way they can be calculated performing magneto static simulations. However, in case the Eddy current reaction field has to be considered, it is necessary to perform time step simulations. In the proposed method, as the machine is cosimulated with MATLAB-SIMULINK, the simulations are time stepped so the Eddy

As far as the FEM simulation is concerned, magnets have to be defined as solid conductors. As the permanent magnets are electrically isolated, each one has to be associated to one solid conductor. In Fig 9 the electrical circuit associated to the permanent magnets is represented. It can be seen how each solid conductor has connected in parallel one resistor. It is because in the FEM software all the electrical components have to be connected in close circuit. These parallel resistances are set to very high values in order not to have influence

� � � � � �� ������ � � (8)

�� � � � �� � � ������ (9)

� � � � � � �� � �� � �� ��� (10)

## **4. Matlab-simulink coupling to FEM software**

Being MATLAB numerical calculus software, FEM calculus can be carried out in MATLAB without any external software. However the tendency is to use specialized FEM software for each physical domain like Electromagnetic, Fluid dynamics and so on. For example Cedrat's FLUX software is well known electromagnetic FEM analysis software. Using FLUX enables to design and study a wide range of electromagnetic devices such as different electrical machines, actuators or sensors.

However this software is usually generalist respect to the domain and an application approach of the software is usually desired for a more friendly use of the software by beginner users. That's why companies like Cedrat are providing programmatic tools for external piloting of their calculus Kernel.

Using some libraries, user can pilot a FLUX file that has been prepared previously from MATLAB for instance. Although several parameters are required to prepare the flux file, using external piloting, it is possible to limit the parametric study to a short number of parameters that are required to be visible by application user. The use of FLUX calculus Kernel is now more application oriented and any user without FEM knowledge can use the calculus Kernel.

Another MATLAB FEM collaboration example is the co-simulation. Usually the electromagnetic device that is being designed is connected to other external devices. Complex mechanical models, electrical circuits or hydraulic systems are some examples of models that can be easily modeled by MATLAB-SIMULINK but cannot be included in the FEM software.

The simplest approximation to solve this multi-domain problem is the simplification of the electromagnetic device to an equivalent electric circuit based on lumped parameters such as resistance and inductances. This can be done with different levels of accuracy. For example, the inductance of a machine can be considered constant respect to the current of the machine. In a more precise approximation the saturation effect can be considered introducing a Look-up table to take into account the change of the inductance respect to the magnetic flux of the machine. In both cases, first FEM simulations are carried out and the values for the inductance

are post processed to include them later in the MATLAB-SIMULINK simulation. However this approximation cannot take into account torque ripples, instantaneous saturations and so on. If more accuracy is required, it is possible to couple the FEM problem to the MATLAB-SIMULINK simulations. Cedrat provides a block to use in MATLAB-SIMULINK. In this interface block inputs and outputs should be defined". Then, the FEM problem is solved at each time step of MATLAB-SIMULINK simulation. The convergence of this type of simulations is difficult but the accuracy is rather high.

Matlab-Simulink Coupling to Finite Element Software for Design and Analysis of Electrical Machines 173

In the proposed methodology the steady state iron losses are computed by a co-simulation between the FEM software and the system simulator software. The power system comprising a two-level converter is simulated in MATLAB-SIMULINK, whereas the electrical machine is modeled in the FEM software. This way it is possible to evaluate the performance of the electrical machine under the functioning conditions imposed by the

The FEM software permits the coupling of electric circuits for transient analysis. Generally these circuits comprise passive elements such as resistances and inductances along with sinusoidal voltage and current sources. Nevertheless, if more sophisticated circuits are required to consider, for example a power converter, it is necessary to couple the FEM

When the machine is supplied by a converter, it is driven by voltage. In these cases there is an inevitable transient period which takes several electrical cycles before the motor reaches the steady state. It is considered that at least a resolution of 10 samples per switching period is necessary to achieve accurate results. The simulation of several electric periods with so small step size would lead to such an amount of samples and such long time consumption that current driven simulations are chosen instead of voltage driven simulations. In current driven simulations it is enough considering only one electric period to compute the iron losses, which enables to decrease significantly the time consumption of the simulation. For example, taking 10 samples per switching period, one co-simulation characterized by a switching frequency of *fs=4KHz* and a period of *T=25.82 sec,* is carried out with a time step of

The proposed method for iron losses computation is structured in three stages as it is shown in Fig 10. First of all the lumped parameters of the equivalent electrical circuit of the machine are calculated by the FEM. From this previous simulation the machine can be modeled with lumped parameters such as d-q axis inductances *Ld* and *Lq*, and the

axes is implemented in MATLAB-SIMULINK using the lumped parameters previously estimated and a two level inverter is implemented as power supply. In this simulation the current waveforms in steady state are obtained for PWM voltages. Finally the co-simulation between the FEM software and MATLAB-SIMULINK is carried out driving the FEM model of the electrical machine by current waveforms obtained in the previous stage. In this third stage the total iron losses are computed as the sum of the Eddy current losses in

In Fig 11 the total iron losses estimated by co-simulations for sinusoidal and PWM voltages are compared. It can be observed that the iron losses with PWM voltages are higher. Meanwhile in Fig 12 the resulting currents and electromagnetic torque are plotted for sinusoidal and PWM voltages. It can be noticed a significant difference in the ripples

*pm*. In the second stage the transient model of the machine in d-q

**5.1. Iron losses computation by co-simulations** 

converter, in a relatively short and rather accurate way.

*sec* and it takes approximately 30 minutes.

permanent magnets and the iron losses in electrical sheets.

software with the circuit simulator software.

*T=25*

permanent magnet flux

because of the PWM voltages.

## **5. Case study 1: Iron losses computation in electrical machines**

It is widely known that the performances of electric machines depend strongly on the losses. The efficiency, the thermal behavior or the compactness are some of the design constrains which are strongly influenced by the losses. So it is very important to predict these losses accurately if an optimum design of the electric machine is required. The losses in electric machines can be divided in three main components: Joule losses, iron losses and additional or stray losses (mechanical losses, induced Eddy current losses in frames, etc). The Joule losses are relatively easy to compute from the armature resistance and current values. However, the other two components are rather more complicated to estimate. This work is focused on the calculation of iron losses which can be relevant in some cases depending on the machine topology, speed, saturation levels, etc.

Nowadays the majority of the electric machines are integrated in variable speed drives. That means that the motors are supplied by modulated voltages such as Pulse Width Modulated (PWM) voltages. It is well known that the additional current harmonics introduced by PWM voltages increase the iron losses. So it is necessary to consider the voltage characteristic in the computation process in order to achieve accurate results in loss computation.

The most extended way to define the iron losses is by the widely known loss separation method in which they are divided in three main components: hysteresis losses, classical Eddy losses and excess losses [6,7]. In case of non sinusoidal voltages, the high order harmonics of currents can accentuate the presence of some phenomena such as the skin effect or the minor loops which are not directly taken into account by theses classical methods. Many efforts have been dedicated to the adaptation of the initial definition of the iron losses given by *Bertotti* in [6] to consider all these phenomena. For instance, in [8] *Boglietti et al.* completes the expression of the classical Eddy losses component with the aim of taking into account also the skin effect. In [9] *Toda et al.* proposes a modification of the hysteresis losses formula in order to consider the minor loops. It is also possible to find in the literature some papers that deals with the iron losses computation under arbitrary supply voltages, mainly focused on pulse width modulated (PWM) voltages [8,10,11].

In this section a novel method for iron losses computation under non-sinusoidal supply voltages is proposed. The method consists in coupling the FEM software FLUX from CEDRAT Company with the system simulator software MATLAB-SIMULINK. The iron losses are computed by a post-processing analysis separating the computation of the Eddy current losses in the permanent magnets (PM) and the iron losses in electrical sheets. The simulation results have been compared with experimental results in order to validate the proposed method.

## **5.1. Iron losses computation by co-simulations**

172 MATLAB – A Fundamental Tool for Scientific Computing and Engineering Applications – Volume 2

**5. Case study 1: Iron losses computation in electrical machines** 

simulations is difficult but the accuracy is rather high.

the machine topology, speed, saturation levels, etc.

are post processed to include them later in the MATLAB-SIMULINK simulation. However this approximation cannot take into account torque ripples, instantaneous saturations and so on. If more accuracy is required, it is possible to couple the FEM problem to the MATLAB-SIMULINK simulations. Cedrat provides a block to use in MATLAB-SIMULINK. In this interface block inputs and outputs should be defined". Then, the FEM problem is solved at each time step of MATLAB-SIMULINK simulation. The convergence of this type of

It is widely known that the performances of electric machines depend strongly on the losses. The efficiency, the thermal behavior or the compactness are some of the design constrains which are strongly influenced by the losses. So it is very important to predict these losses accurately if an optimum design of the electric machine is required. The losses in electric machines can be divided in three main components: Joule losses, iron losses and additional or stray losses (mechanical losses, induced Eddy current losses in frames, etc). The Joule losses are relatively easy to compute from the armature resistance and current values. However, the other two components are rather more complicated to estimate. This work is focused on the calculation of iron losses which can be relevant in some cases depending on

Nowadays the majority of the electric machines are integrated in variable speed drives. That means that the motors are supplied by modulated voltages such as Pulse Width Modulated (PWM) voltages. It is well known that the additional current harmonics introduced by PWM voltages increase the iron losses. So it is necessary to consider the voltage characteristic in

The most extended way to define the iron losses is by the widely known loss separation method in which they are divided in three main components: hysteresis losses, classical Eddy losses and excess losses [6,7]. In case of non sinusoidal voltages, the high order harmonics of currents can accentuate the presence of some phenomena such as the skin effect or the minor loops which are not directly taken into account by theses classical methods. Many efforts have been dedicated to the adaptation of the initial definition of the iron losses given by *Bertotti* in [6] to consider all these phenomena. For instance, in [8] *Boglietti et al.* completes the expression of the classical Eddy losses component with the aim of taking into account also the skin effect. In [9] *Toda et al.* proposes a modification of the hysteresis losses formula in order to consider the minor loops. It is also possible to find in the literature some papers that deals with the iron losses computation under arbitrary supply voltages, mainly focused on pulse width modulated (PWM) voltages [8,10,11].

In this section a novel method for iron losses computation under non-sinusoidal supply voltages is proposed. The method consists in coupling the FEM software FLUX from CEDRAT Company with the system simulator software MATLAB-SIMULINK. The iron losses are computed by a post-processing analysis separating the computation of the Eddy current losses in the permanent magnets (PM) and the iron losses in electrical sheets. The simulation results have been compared with experimental results in order to validate the proposed method.

the computation process in order to achieve accurate results in loss computation.

In the proposed methodology the steady state iron losses are computed by a co-simulation between the FEM software and the system simulator software. The power system comprising a two-level converter is simulated in MATLAB-SIMULINK, whereas the electrical machine is modeled in the FEM software. This way it is possible to evaluate the performance of the electrical machine under the functioning conditions imposed by the converter, in a relatively short and rather accurate way.

The FEM software permits the coupling of electric circuits for transient analysis. Generally these circuits comprise passive elements such as resistances and inductances along with sinusoidal voltage and current sources. Nevertheless, if more sophisticated circuits are required to consider, for example a power converter, it is necessary to couple the FEM software with the circuit simulator software.

When the machine is supplied by a converter, it is driven by voltage. In these cases there is an inevitable transient period which takes several electrical cycles before the motor reaches the steady state. It is considered that at least a resolution of 10 samples per switching period is necessary to achieve accurate results. The simulation of several electric periods with so small step size would lead to such an amount of samples and such long time consumption that current driven simulations are chosen instead of voltage driven simulations. In current driven simulations it is enough considering only one electric period to compute the iron losses, which enables to decrease significantly the time consumption of the simulation. For example, taking 10 samples per switching period, one co-simulation characterized by a switching frequency of *fs=4KHz* and a period of *T=25.82 sec,* is carried out with a time step of *T=25sec* and it takes approximately 30 minutes.

The proposed method for iron losses computation is structured in three stages as it is shown in Fig 10. First of all the lumped parameters of the equivalent electrical circuit of the machine are calculated by the FEM. From this previous simulation the machine can be modeled with lumped parameters such as d-q axis inductances *Ld* and *Lq*, and the permanent magnet flux *pm*. In the second stage the transient model of the machine in d-q axes is implemented in MATLAB-SIMULINK using the lumped parameters previously estimated and a two level inverter is implemented as power supply. In this simulation the current waveforms in steady state are obtained for PWM voltages. Finally the co-simulation between the FEM software and MATLAB-SIMULINK is carried out driving the FEM model of the electrical machine by current waveforms obtained in the previous stage. In this third stage the total iron losses are computed as the sum of the Eddy current losses in permanent magnets and the iron losses in electrical sheets.

In Fig 11 the total iron losses estimated by co-simulations for sinusoidal and PWM voltages are compared. It can be observed that the iron losses with PWM voltages are higher. Meanwhile in Fig 12 the resulting currents and electromagnetic torque are plotted for sinusoidal and PWM voltages. It can be noticed a significant difference in the ripples because of the PWM voltages.

Matlab-Simulink Coupling to Finite Element Software for Design and Analysis of Electrical Machines 175

��� � ��� � ����� � ���� = 0 (11)

In this section some experimental results are shown in order to prove the accuracy of the proposed method. For that purpose 7.4KW brushless motor has been analyzed in a test

In Fig 14 the test bench layout is shown. It consists of two machines, the one under test and the load motor, one torque sensor, one commercial controller for each machine and one power analyzer. During the test the controlled variables are the speed in case of the load machine and the torque in case of the machine under test. The test has been carried out controlling the d-axis current to zero avoiding in this way the functioning of the machine in the flux weakening operation mode. To calculate the losses, the loss segregation method has

**Figure 13.** Description of the performed tests in order to validate the sinusoidal losses computation

A) Generator test with a resistive load B) Motor test with an inverter

**5.2. Experimental results** 

been implemented.

method

**Figure 14.** Test bench configuration

bench and the iron losses have been measured.

**Description of the experimental test** 

**Figure 10.** Proposed methodology for iron losses computation under non-sinusoidal voltages

**Figure 11.** Iron losses computed with sinusoidal and PWM voltages with ݂௦ ൌ Ͷݖܪܭ

**Figure 12.** Co-simulation results obtained under sinusoidal and PWM voltages with ݂௦ ൌ Ͷݖܪܭ

## **5.2. Experimental results**

174 MATLAB – A Fundamental Tool for Scientific Computing and Engineering Applications – Volume 2

**Figure 10.** Proposed methodology for iron losses computation under non-sinusoidal voltages

Sinusoidal PWM

**Figure 11.** Iron losses computed with sinusoidal and PWM voltages with ݂௦ ൌ Ͷݖܪܭ

0.05

0.1

Magnitude [A]

0.15

0.2

Currents [A]

50

100

Iron Losses [W]

A) Current and Torque under

<sup>0</sup> <sup>5</sup> <sup>10</sup> <sup>15</sup> <sup>20</sup> -142

time [msec]

<sup>0</sup> <sup>5</sup> <sup>10</sup> <sup>15</sup> <sup>20</sup> -15

time [msec]

Phase A Phase B Phase C


Torque [Nm]

Currents [A]

sinusoidal voltages

150

<sup>5</sup> <sup>10</sup> <sup>15</sup> <sup>0</sup>

Current [A]

<sup>0</sup> <sup>5</sup> <sup>10</sup> <sup>15</sup> <sup>20</sup> -15

time [msec]

<sup>0</sup> <sup>2</sup> <sup>4</sup> <sup>6</sup> <sup>8</sup> <sup>10</sup> <sup>0</sup>

Frequency [KHz]

Phase A Phase B Phase C

**Figure 12.** Co-simulation results obtained under sinusoidal and PWM voltages with ݂௦ ൌ Ͷݖܪܭ

B) Current under PWM Voltages C) Torque under PWM

Voltages


0.5 1 1.5 2 2.5

Magnitude [Nm]


Torque [Nm]



<sup>0</sup> <sup>5</sup> <sup>10</sup> <sup>15</sup> <sup>20</sup> -140

time [msec]

<sup>0</sup> <sup>2</sup> <sup>4</sup> <sup>6</sup> <sup>8</sup> <sup>10</sup> <sup>0</sup>

Frequency [KHz]

In this section some experimental results are shown in order to prove the accuracy of the proposed method. For that purpose 7.4KW brushless motor has been analyzed in a test bench and the iron losses have been measured.

#### **Description of the experimental test**

In Fig 14 the test bench layout is shown. It consists of two machines, the one under test and the load motor, one torque sensor, one commercial controller for each machine and one power analyzer. During the test the controlled variables are the speed in case of the load machine and the torque in case of the machine under test. The test has been carried out controlling the d-axis current to zero avoiding in this way the functioning of the machine in the flux weakening operation mode. To calculate the losses, the loss segregation method has been implemented.

$$P\_{ln} - P\_{cu} - P\_{loss} - P\_{mec} = 0\tag{11}$$

A) Generator test with a resistive load B) Motor test with an inverter

**Figure 13.** Description of the performed tests in order to validate the sinusoidal losses computation method

**Figure 14.** Test bench configuration

Where ��� is the active power consumed by the machine, ��� are the Joule losses, ���� is the mechanic power in the motor axis and ����� is the sum of the iron losses and the mechanical losses. The value of ��� is calculated by the power analyzer which is connected to the input of the machine. To calculate the Joule losses, a high accuracy ohmmeter has been used due to the fact that the power balance is very sensitive to the errors in the resistance measurement. The mechanical power is calculated from the torque and speed measurements. As the test is carried out at constant speed, the mechanical power can be calculated as the following.

$$P\_{mec} = T \cdot \Omega\_m \quad \text{[W]} \tag{12}$$

Matlab-Simulink Coupling to Finite Element Software for Design and Analysis of Electrical Machines 177

In Fig 15 the simulated torque and the experimental torque at different current values are shown for both cases, sinusoidal and PWM voltages. It can be noticed how the simulated

In Fig 16 the computed iron losses with sinusoidal and PWM voltages are shown. It is remarkable that certain differences arises between the co-simulation and the experimental results either with sinusoidal or PWM voltages. These differences are considered to be because of the mechanical losses which are not taken into account by the co-simulations. This difference is rather constant respect to the current and very similar in both cases with sinusoidal and PWM voltages. This behavior of the difference between simulations and test

A) Sinusoidal Voltages B) PWM Voltages (fs=4KHz)

50

100

Torque [Nm]

150

Experimental FEM

200

Although there is a slight error in the prediction of the iron losses, an important point of this work is that the proposed methodology enables to calculate rather accurately the increase of the iron losses due to PWM voltages. In Fig 17-A the comparison between sinusoidal and PWM iron losses is shown. A coefficient can be defined to represent the increase of the losses due to the PWM modulation. This coefficient is defined as PWM losses factor ����

> ���� <sup>=</sup> ���� ����

���� are iron losses with sinusoidal voltages and ���� are iron losses under PWM voltages. As it is shown in Fig 17-B the PWM loss factor is approximately constant for every load conditions. So it can be concluded that the losses increase due to PWM voltages hardly depends on the current value. In the procedure presented in this work, the loss terms which are not taken into account are independent from the modulation which enables us to calculate very accurately the loss increase in spite of making a slight error in the loss

 (13)

<sup>5</sup> <sup>10</sup> <sup>15</sup> <sup>0</sup>

Current [A]

fits perfectly with the supposition that the difference is due to the mechanical losses.

and the experimentally measured torques are very similar.

**Figure 15.** Torque with Sinusoidal and PWM voltages

<sup>5</sup> <sup>10</sup> <sup>15</sup> <sup>0</sup>

Experimental FEM

Current [A]

and it is calculated as following.

estimation.

50

100

Torque [Nm]

150

200

Where � is measurement provided by the torque sensor and � is the mechanical speed measured by the encoder. In the power balance the only unknown variable is ����� which involves two loss components, the iron losses and the mechanical losses. As the tests are performed at relatively low speeds (290 rpm) and the machine has been heated previously, the mechanical losses can be considered negligible in comparison with the iron losses. In addition all the tests have been carried out at constant speed in order to maintain the mechanical losses constant.

The configuration of the test bench does not allow supplying the machine with sinusoidal voltages. The possible solution would be to add RLC filters between the inverter and the machine or to use sinusoidal voltage supplies instead of the inverters. However in this case it has not been possible to implement neither of these solutions so finally it has been necessary to implement an alternative solution. The power analyzer comprises low pass band filters for the measured currents and voltage, which has been set to 500Hz. This way only the fundamental components of voltages and currents are considered for the computation of the power. The calculated power in this way is considered to be the power for sinusoidal voltages. However, before implementing this method, it has been validated performing two different tests which are described in Fig 13.

First of all the so called generator test is carried out. In this test a resistive load is connected to the terminals of the machine under test, which operates as a generator, and it is driven by the load motor at constant speed. This way the currents are sinusoidal and so the computed iron losses correspond to the sinusoidal voltages. After that the second test is performed using the inverter and with the machine working exactly at the same operation conditions that in the previous test. In this case the input filters of the power analyzer are configured to 500Hz. In both cases the resulting *Ploss* are very similar, with a difference less than 5%. Hence it is considered that the losses calculated with the filter are equivalent to the sinusoidal losses.

#### **Validation of the simulation results**

The proposed method to calculate the iron losses has been validated with experimental results. As the machine iron losses are closely related to the stator current density, the simulations and the tests have been done at same phase current magnitude. The switching frequency of the PWM voltage is fixed to �� � ���� during all the tests.

In Fig 15 the simulated torque and the experimental torque at different current values are shown for both cases, sinusoidal and PWM voltages. It can be noticed how the simulated and the experimentally measured torques are very similar.

**Figure 15.** Torque with Sinusoidal and PWM voltages

176 MATLAB – A Fundamental Tool for Scientific Computing and Engineering Applications – Volume 2

Where � is measurement provided by the torque sensor and

performing two different tests which are described in Fig 13.

calculated as the following.

mechanical losses constant.

**Validation of the simulation results** 

Where ��� is the active power consumed by the machine, ��� are the Joule losses, ���� is the mechanic power in the motor axis and ����� is the sum of the iron losses and the mechanical losses. The value of ��� is calculated by the power analyzer which is connected to the input of the machine. To calculate the Joule losses, a high accuracy ohmmeter has been used due to the fact that the power balance is very sensitive to the errors in the resistance measurement. The mechanical power is calculated from the torque and speed measurements. As the test is carried out at constant speed, the mechanical power can be

measured by the encoder. In the power balance the only unknown variable is ����� which involves two loss components, the iron losses and the mechanical losses. As the tests are performed at relatively low speeds (290 rpm) and the machine has been heated previously, the mechanical losses can be considered negligible in comparison with the iron losses. In addition all the tests have been carried out at constant speed in order to maintain the

The configuration of the test bench does not allow supplying the machine with sinusoidal voltages. The possible solution would be to add RLC filters between the inverter and the machine or to use sinusoidal voltage supplies instead of the inverters. However in this case it has not been possible to implement neither of these solutions so finally it has been necessary to implement an alternative solution. The power analyzer comprises low pass band filters for the measured currents and voltage, which has been set to 500Hz. This way only the fundamental components of voltages and currents are considered for the computation of the power. The calculated power in this way is considered to be the power for sinusoidal voltages. However, before implementing this method, it has been validated

First of all the so called generator test is carried out. In this test a resistive load is connected to the terminals of the machine under test, which operates as a generator, and it is driven by the load motor at constant speed. This way the currents are sinusoidal and so the computed iron losses correspond to the sinusoidal voltages. After that the second test is performed using the inverter and with the machine working exactly at the same operation conditions that in the previous test. In this case the input filters of the power analyzer are configured to 500Hz. In both cases the resulting *Ploss* are very similar, with a difference less than 5%. Hence it is considered that the losses calculated with the filter are equivalent to the sinusoidal losses.

The proposed method to calculate the iron losses has been validated with experimental results. As the machine iron losses are closely related to the stator current density, the simulations and the tests have been done at same phase current magnitude. The switching

frequency of the PWM voltage is fixed to �� � ���� during all the tests.

���� ����� ��� (12)

� is the mechanical speed

In Fig 16 the computed iron losses with sinusoidal and PWM voltages are shown. It is remarkable that certain differences arises between the co-simulation and the experimental results either with sinusoidal or PWM voltages. These differences are considered to be because of the mechanical losses which are not taken into account by the co-simulations. This difference is rather constant respect to the current and very similar in both cases with sinusoidal and PWM voltages. This behavior of the difference between simulations and test fits perfectly with the supposition that the difference is due to the mechanical losses.

Although there is a slight error in the prediction of the iron losses, an important point of this work is that the proposed methodology enables to calculate rather accurately the increase of the iron losses due to PWM voltages. In Fig 17-A the comparison between sinusoidal and PWM iron losses is shown. A coefficient can be defined to represent the increase of the losses due to the PWM modulation. This coefficient is defined as PWM losses factor ���� and it is calculated as following.

$$K\_{p\text{wym}} = \frac{p\_{PWM}}{p\_{sln}}\tag{13}$$

���� are iron losses with sinusoidal voltages and ���� are iron losses under PWM voltages. As it is shown in Fig 17-B the PWM loss factor is approximately constant for every load conditions. So it can be concluded that the losses increase due to PWM voltages hardly depends on the current value. In the procedure presented in this work, the loss terms which are not taken into account are independent from the modulation which enables us to calculate very accurately the loss increase in spite of making a slight error in the loss estimation.

Matlab-Simulink Coupling to Finite Element Software for Design and Analysis of Electrical Machines 179

the lift [12]. Moreover, the resonant frequency of the system is variable, and depends upon

The elevator taken into analysis is a so-called 1:1 roping configuration which is shown in Fig 18-A. As main feature, it has a maximum speed of 1 m/s and a maximum acceleration of 0.5 m/s2, with a capacity of 6 passengers. Considering a pulley diameter of 50 mm, rated value

In Fig 18-B the frequency response of the acceleration of the cage to pulley torque variations

In Fig 19 the co-simulation block diagram is shown. The control strategy, the speed reference generator and the elevator model are implemented in MATLAB-SIMULINK,

A) Analyzed elevator configuration B) Bode diagram of the elevator system at


Magnitude (dB)

different load conditions

<sup>102</sup> -100

Frequency (rad/sec)

100% LOAD 50% LOAD 0% LOAD

"*Coupling with flux2d"* function of MATLAB-SIMULINK library allows data transfer between both simulation tools. In this function the following parameters have to be specified: the name of the FLUX file, the input and output parameters, the sample time and the memory size to allocate. The inputs are the currents of phase A and B, and the mechanical speed. With these inputs, FLUX model returns as outputs the electromagnetic torque and the position of the rotor. The torque is the input for the elevator model which computes the linear acceleration of the cage and the angular speed of the pulley. The speed is fed back along with the position which is aligned with the flux

the passenger load.

of 20 rad/sec and 200 Nm are required for the drive.

**Figure 18.** Description of the analyzed elevator system

while a precise machine model is simulated in FLUX.

**6.2. Co-simulation scheme** 

vector.

for different load states is shown.

**Figure 16.** Iron Losses with Sinusoidal and PWM voltages

**Figure 17.** Iron Losses and PWM losses factor ܭ௪

## **6. Case study 2: Comfort analysis in elevators**

The performance of the electric motor in an elevator is going to be studied by co-simulation. As the elevator is a very sensitive direct drive application, it is very important the smoothness of the torque. So in this case the influence of the torque ripple on the elevator performance is going to be evaluated.

In this study the overall elevator system is considered taken into account the control unit, the traction motor and the mechanical system. Thus, the control unit and the mechanical system are simulated in MATLAB-SIMULINK, while the electric motor is simulated in the FEM software FLUX.

#### **6.1. Application description**

An elevator is a complex system in sense that it may present resonances due to the elastic properties of ropes and the elasticity and damping effect between the frame and the cage of the lift [12]. Moreover, the resonant frequency of the system is variable, and depends upon the passenger load.

The elevator taken into analysis is a so-called 1:1 roping configuration which is shown in Fig 18-A. As main feature, it has a maximum speed of 1 m/s and a maximum acceleration of 0.5 m/s2, with a capacity of 6 passengers. Considering a pulley diameter of 50 mm, rated value of 20 rad/sec and 200 Nm are required for the drive.

In Fig 18-B the frequency response of the acceleration of the cage to pulley torque variations for different load states is shown.

A) Analyzed elevator configuration B) Bode diagram of the elevator system at different load conditions

**Figure 18.** Description of the analyzed elevator system

## **6.2. Co-simulation scheme**

178 MATLAB – A Fundamental Tool for Scientific Computing and Engineering Applications – Volume 2

Experimental FEM

**Figure 16.** Iron Losses with Sinusoidal and PWM voltages

<sup>5</sup> <sup>10</sup> <sup>15</sup> <sup>0</sup>

Experimental FEM

Current [A]

50

50

100

Iron Losses [W]

150

100

Iron Losses [W]

150

**Figure 17.** Iron Losses and PWM losses factor ܭ௪

<sup>5</sup> <sup>10</sup> <sup>15</sup> <sup>0</sup>

PWM Experimental PWM FEM

Sinusoidal Experimental Sinusoidal FEM

Current [A]

performance is going to be evaluated.

FEM software FLUX.

**6.1. Application description** 

**6. Case study 2: Comfort analysis in elevators** 

The performance of the electric motor in an elevator is going to be studied by co-simulation. As the elevator is a very sensitive direct drive application, it is very important the smoothness of the torque. So in this case the influence of the torque ripple on the elevator

A) Iron Losses B) PWM Losses Factor

1.1

1.2

1.3

Kpwm [W]

1.4

1.5

A) Sinusoidal Voltages B) PWM Voltages (fs=4KHz)

50

100

Iron Losses [W]

150

<sup>5</sup> <sup>10</sup> <sup>15</sup> <sup>0</sup>

Experimental FEM

> Experimental FEM

Current [A]

<sup>5</sup> <sup>10</sup> <sup>15</sup> <sup>1</sup>

Current [A]

In this study the overall elevator system is considered taken into account the control unit, the traction motor and the mechanical system. Thus, the control unit and the mechanical system are simulated in MATLAB-SIMULINK, while the electric motor is simulated in the

An elevator is a complex system in sense that it may present resonances due to the elastic properties of ropes and the elasticity and damping effect between the frame and the cage of In Fig 19 the co-simulation block diagram is shown. The control strategy, the speed reference generator and the elevator model are implemented in MATLAB-SIMULINK, while a precise machine model is simulated in FLUX.

"*Coupling with flux2d"* function of MATLAB-SIMULINK library allows data transfer between both simulation tools. In this function the following parameters have to be specified: the name of the FLUX file, the input and output parameters, the sample time and the memory size to allocate. The inputs are the currents of phase A and B, and the mechanical speed. With these inputs, FLUX model returns as outputs the electromagnetic torque and the position of the rotor. The torque is the input for the elevator model which computes the linear acceleration of the cage and the angular speed of the pulley. The speed is fed back along with the position which is aligned with the flux vector.

Matlab-Simulink Coupling to Finite Element Software for Design and Analysis of Electrical Machines 181

has to be small enough to get a proper resolution of that ripple. As it has been already explained, the frequency of the main torque ripple component is six times the fundamental frequency which is equal to 19 Hertz. So the torque ripple has a period of 8.77ms. Thus, a sample time of 500s is chosen so as to use 17 samples for the definition of

Another critical aspect that affects final results is the mesh resolution of the machine model in FLUX. A too accurate resolution may slow down the simulation. As the sample time, the mesh resolution has to be carefully set in order to get enough accuracy in the results in a

In this subsection the co-simulation results are presented. The simulation has been carried out under 50% of rated conditions, with a load of 3 passengers. Two machine models have been taken into account: an ideal one which consist in a constant gain equal to the torque constant ܭ், and the FEM model (see Fig 19). In Fig 21-A it could be seen the track of the lift speed in which a little overshoot can be noticed. That is because the dynamic of the regulator has been limited in order to avoid the excitation of the system resonance by the

In Fig 22 the resultant lift accelerations for an ideal machine model and for the FEM machine model are shown. Unlikely to the ideal case, the torque of the FLUX model is not as smooth as application requires. Consequently, that torque ripple excites the mechanical resonances of the system, causing vibrations in the vertical acceleration. This phenomena lead to a

A) Track of the linear speed of the lift B) Torque produced by the FEM

Mechanical Torque [Nm]

model of the machine

<sup>0</sup> <sup>5</sup> <sup>10</sup> <sup>15</sup> <sup>20</sup> -80

Time [sec]

control. In Fig 21-B the torque produced by the FLUX model is presented.

**Figure 21.** Torque and speed obtained by co-simulation

<sup>0</sup> <sup>5</sup> <sup>10</sup> <sup>15</sup> <sup>20</sup> -0.2

Time [sec]

notary worsening in the ride quality of the elevator.

a period of the torque ripple.

reasonable simulation time.

**6.3. Results** 

0 0.2 0.4 0.6 0.8 1 1.2

Linear Speed [m/s]

**Figure 19.** Co-simulation block diagram

Regarding to the speed of the elevator, it has to follow a specific track in order to get a good ride quality. In this case, this track is obtained by means of a speed track generator. The speed control is a vector control implemented in a d-q frame oriented to the magnet flux vector. The block diagram of that control is shown in Fig 20.

As it is shown in Fig 20, the electromagnetic torque is controlled acting upon Iq component. In this application flux weakening is not necessary, so Id component is null. Notice that current control is not implemented. The dynamic of current loops is so quick in comparison with the dynamic of the mechanical system that they can be omitted. So, control consists in a PI for speed regulation, a frame transformation from d-q to - and an inverse CLARKE transformation from - to abc.

**Figure 20.** Speed Control Diagram

On the other hand, a proper choice of sample time is very important. It must not be too small in order to avoid too long simulation times. Otherwise, it has to have enough precision if accurate results are wanted. In this case, the aim of co-simulation is to evaluate the effect of torque ripple on vertical acceleration of the lift, so the sample time has to be small enough to get a proper resolution of that ripple. As it has been already explained, the frequency of the main torque ripple component is six times the fundamental frequency which is equal to 19 Hertz. So the torque ripple has a period of 8.77ms. Thus, a sample time of 500s is chosen so as to use 17 samples for the definition of a period of the torque ripple.

Another critical aspect that affects final results is the mesh resolution of the machine model in FLUX. A too accurate resolution may slow down the simulation. As the sample time, the mesh resolution has to be carefully set in order to get enough accuracy in the results in a reasonable simulation time.

#### **6.3. Results**

180 MATLAB – A Fundamental Tool for Scientific Computing and Engineering Applications – Volume 2

Regarding to the speed of the elevator, it has to follow a specific track in order to get a good ride quality. In this case, this track is obtained by means of a speed track generator. The speed control is a vector control implemented in a d-q frame oriented to the magnet flux

As it is shown in Fig 20, the electromagnetic torque is controlled acting upon Iq component. In this application flux weakening is not necessary, so Id component is null. Notice that current control is not implemented. The dynamic of current loops is so quick in comparison with the dynamic of the mechanical system that they can be omitted. So, control consists in a PI for speed regulation, a frame transformation from d-q to - and an inverse CLARKE

On the other hand, a proper choice of sample time is very important. It must not be too small in order to avoid too long simulation times. Otherwise, it has to have enough precision if accurate results are wanted. In this case, the aim of co-simulation is to evaluate the effect of torque ripple on vertical acceleration of the lift, so the sample time

**Figure 19.** Co-simulation block diagram

transformation from - to abc.

**Figure 20.** Speed Control Diagram

vector. The block diagram of that control is shown in Fig 20.

In this subsection the co-simulation results are presented. The simulation has been carried out under 50% of rated conditions, with a load of 3 passengers. Two machine models have been taken into account: an ideal one which consist in a constant gain equal to the torque constant ܭ், and the FEM model (see Fig 19). In Fig 21-A it could be seen the track of the lift speed in which a little overshoot can be noticed. That is because the dynamic of the regulator has been limited in order to avoid the excitation of the system resonance by the control. In Fig 21-B the torque produced by the FLUX model is presented.

**Figure 21.** Torque and speed obtained by co-simulation

In Fig 22 the resultant lift accelerations for an ideal machine model and for the FEM machine model are shown. Unlikely to the ideal case, the torque of the FLUX model is not as smooth as application requires. Consequently, that torque ripple excites the mechanical resonances of the system, causing vibrations in the vertical acceleration. This phenomena lead to a notary worsening in the ride quality of the elevator.

Matlab-Simulink Coupling to Finite Element Software for Design and Analysis of Electrical Machines 183

[1] CEDRAT. (2010). Flux 10 User Guide – Volume 3 – Physical Applications: Magnetic,

[2] Gieras, J.F. (2002) Permanent Magnet Motor Technology. Design and Applications.

[4] Zhu, Z.Q., Ng, K., Schofield, N., Howe, D. (2004). Improved analytical modelling of rotor eddy current loss in brushless machines equipped with surface-mounted permanent magnets. *Electric Power Applications, IEE Proceedings*, vol. 151, no. 6, pp.

[5] Zhu, Z.Q., Ng, K., Schofield, N., Howe, D. (2001). Analytical prediction of rotor eddy current loss in brushless machines equipped with surface-mounted permanent magnets. I. Magnetostatic field model. *Electrical Machines and Systems, 2001.ICEMS 2001*.Proceedings of the Fifth International Conference on 2 ed Beijing, China: Int. Acad.

[6] Bertotti, G. (1998). General properties of power losses in soft ferromagnetic materials.

[7] Fiorillo, F., Novikov,A. (1990). An improved approach to power losses in magnetic laminations under non-sinusoidal induction waveform. *Magnetics, IEEE Transactions on*,

[8] Boglietti, A., Cavagnino, A., Lazzari, M., Pastorelli,M. (2003) Predicting iron losses in soft magnetic materials with arbitrary voltage supply: an engineering approach. *Magnetics,* 

[9] Toda, H., Senda, K., Ishida, M. (2005). Effect of material properties on motor iron loss in PM brushless DC motor. *Magnetics, IEEE Transactions on*, vol. 41, no. 10, pp. 3937-

[10] Amar, M., Kaczmarek, R. (1995). A general formula for prediction of iron losses under nonsinusoidal voltage waveform. *Magnetics, IEEE Transactions on*, vol. 31, no. 5, pp.

[11] Boglietti, A., Lazzari, M., Pastorelli, M. (1997). Iron losses prediction with PWM inverter supply using steel producer data sheets. *Industry Applications Conference. Thirty-Second* 

[3] CEDRAT. (2005). Flux 9.1 User Guide - 2D and 3D Applications - New Features.

**Author details** 

*Faculty of Engineering,* 

Ana Julia Escalada

**8. References** 

641-650,

3939

2504-2509

Electric, Thermal,...

Marcel Dekker, Inc. 105p

Publishers, pp. 806-809

vol. 26, no. 5, pp. 2904-2910

*IAS Annual Meeting* vol 1, pp. 83-88

Gaizka Almandoz, Gaizka Ugalde, Javier Poza

*ORONA EIC. ELEVATOR INNOVATION CENTRE, Hernani, Spain* 

*Magnetics, IEEE Transaction on*, vol. 24, no. 1, pp. 621-630

*IEEE Transactions on*, vol. 39, no. 2, pp. 981-989,

*University of Mondragon, Mondragon, Spain* 

**Figure 22.** Vertical acceleration of the cage obtained by simulation

## **7. Conclusions**

In this chapter a co-simulation tool for analysis and design of electrical machines is proposed.

Two different case studies have been reported. In the first one co-simulation between the system simulator software and the FEM software are presented for the iron losses calculation under arbitrary voltages. A particular procedure is described to carry out current driven co-simulations in order to reduce as much as possible the computation load and the time consumption of the calculus.

The proposed method is validated by experimental tests. The estimated iron losses under sinusoidal and PWM voltages have a good agreement with the iron losses measured experimentally. So it can be stated that using this method it is possible to estimate the iron losses under arbitrary voltages without the need of prototyping, which could lead to less expensive and more flexible design processes.

In the second case study the performance of the electric machine in an elevator is evaluated. Thus, the vibrations caused by the motor in the elevator cage are studied applying the proposed co-simulation. It has been demonstrated that the torque ripple of the motor can affect negatively on the elevator comfort.

Probably the main drawback of these co-simulations is the required computation time. They ought to be carefully configured, on one hand to avoid too large computation times, and on the other hand to achieve an adequate accuracy.

As main conclusion it could be remarked that these co-simulations are very helpful tools which may allow accurate and relatively easy analysis of multi-domain systems in a relatively short development time.

## **Author details**

182 MATLAB – A Fundamental Tool for Scientific Computing and Engineering Applications – Volume 2

**Figure 22.** Vertical acceleration of the cage obtained by simulation

<sup>0</sup> <sup>5</sup> <sup>10</sup> <sup>15</sup> <sup>20</sup> -1.5

A) Considering the ideal machine

(without co-simulation)

Time [sec]

In this chapter a co-simulation tool for analysis and design of electrical machines is


Acceleration [m/s2]

B) Considering the FEM model of the machine (with co-simulation)

<sup>0</sup> <sup>5</sup> <sup>10</sup> <sup>15</sup> <sup>20</sup> -2

Time [sec]

Two different case studies have been reported. In the first one co-simulation between the system simulator software and the FEM software are presented for the iron losses calculation under arbitrary voltages. A particular procedure is described to carry out current driven co-simulations in order to reduce as much as possible the computation load and the

The proposed method is validated by experimental tests. The estimated iron losses under sinusoidal and PWM voltages have a good agreement with the iron losses measured experimentally. So it can be stated that using this method it is possible to estimate the iron losses under arbitrary voltages without the need of prototyping, which could lead to less

In the second case study the performance of the electric machine in an elevator is evaluated. Thus, the vibrations caused by the motor in the elevator cage are studied applying the proposed co-simulation. It has been demonstrated that the torque ripple of the motor can

Probably the main drawback of these co-simulations is the required computation time. They ought to be carefully configured, on one hand to avoid too large computation times, and on

As main conclusion it could be remarked that these co-simulations are very helpful tools which may allow accurate and relatively easy analysis of multi-domain systems in a

**7. Conclusions** 


Acceleration [m/s2]

time consumption of the calculus.

expensive and more flexible design processes.

affect negatively on the elevator comfort.

relatively short development time.

the other hand to achieve an adequate accuracy.

proposed.

Gaizka Almandoz, Gaizka Ugalde, Javier Poza *Faculty of Engineering, University of Mondragon, Mondragon, Spain* 

Ana Julia Escalada *ORONA EIC. ELEVATOR INNOVATION CENTRE, Hernani, Spain* 

#### **8. References**

	- [12] Arakawa, A. and Miyata, K. (2002). A variable-structure control method for the suppression of elevator-cage vibration. *IECON 02, 28th annual Conference of the IEEE Industrial Electronics Society*, pp. 1830-1835.

**Section 3** 

**Telecommunication-Communication Systems** 

**Telecommunication-Communication Systems** 

184 MATLAB – A Fundamental Tool for Scientific Computing and Engineering Applications – Volume 2

*Industrial Electronics Society*, pp. 1830-1835.

[12] Arakawa, A. and Miyata, K. (2002). A variable-structure control method for the suppression of elevator-cage vibration. *IECON 02, 28th annual Conference of the IEEE* 

**Chapter 0**

**Chapter 9**

**MATLAB as a Design and Verification Tool**

**for the Hardware Prototyping of Wireless**

The ability to verify the capacity gains of novel signal processing techniques or the performance of new communication standards is one of the main research and development drivers of both academic and industrial entities. In this context, the signal processing community has adopted MATLAB as a flexible modelling, simulating and testing software development environment. MATLAB includes numerous toolboxes, open-source code and pre-compiled libraries, which facilitate the design of complex systems using high-level models and provides the means for rapid verification of signal processing algorithms and systems in a user-controlled environment. The growing number of its add-on features allows MATLAB to fill the gap between these high-level models and the physical implementation of systems; e.g., a real-time Field Programmable Array (FPGA)-based prototype. Moreover, the functionality of MATLAB is significantly extended with the use of Simulink [1], which serves as a schematic-entry design and programming environment. The integration of the System Generator blockset of Xilinx [2] to Simulink and the direct linking of the latter with the Xilinx FPGA-design toolchain enriches the target use-cases of the software. This approach allows the creation of FPGA binary executables from high-level models. MATLAB is also one of the most popular software-modelling environments, whose functionality is commonly interfaced nowadays with instruments to provide connectivity, control and programming solutions for rapid prototyping and testing. In fact, MATLAB scripts are increasingly used to program a wide variety of testing, signal generation and signal analysis hardware instruments. Thus, the programming versatility of MATLAB allows it to be used as a key software component in complex testbeds, which comprise a multitude of software programming interfaces and heterogeneous hardware instruments. The role of such testbeds is crucial because they enable the prototyping and validation of advanced research concepts under realistic conditions,

> ©2012 Bartzoudis et al., licensee InTech. This is an open access chapter distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0),which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly

©2012 Bartzoudis et al., licensee InTech. This is a paper distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Oriol Font-Bach, Antonio Pascual-Iserte, Nikolaos Bartzoudis

Additional information is available at the end of the chapter

cited.

**Communication Systems**

and David López Bueno

http://dx.doi.org/10.5772/48706

**1. Introduction**

**Chapter 0 Chapter 9**
