Method for detecting demagnetization of a plurality of permanent magnets equipping a rotor of an electrical machine

By employing Kalman filters for magnetic and thermal modeling, the method addresses the need for robust and cost-effective demagnetization detection in electrical machines, ensuring stable performance.

FR3155596B1Active Publication Date: 2025-10-24IFP ENERGIES NOUVELLES
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
FR2023012565
Authority / Receiving Office
FR · FR
Patent Type
Patents
Current Assignee / Owner
Filing Date
2023-11-16
Publication Date
2025-10-24
Estimated Expiration
2043-11-16

AI Technical Summary

Technical Problem

Existing methods for detecting demagnetization of permanent magnets in electrical machines require dedicated instrumentation, leading to additional costs and are not robust due to the use of single estimation sources or high-frequency signal injection, which can cause further issues.

Method used

A method utilizing two estimation sources, namely magnetic flux and temperature estimation, is implemented using Kalman filters applied to magnetic and thermal models, allowing for real-time detection of demagnetization without additional instrumentation.

Benefits of technology

This approach provides robust, cost-effective, and real-time demagnetization detection, maintaining torque production and reducing copper losses, heat, and torque ripples in electrical machines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000028_0000
    Figure 00000028_0000
  • Figure 00000028_0001
    Figure 00000028_0001
  • Figure 00000028_0002
    Figure 00000028_0002
Patent Text Reader

Abstract

The present invention relates to a method for detecting a demagnetization of at least one permanent magnet of a rotor of an electrical machine, for which the voltages, currents and position and / or speed of the rotor are acquired (ACQ), as well as at least one temperature (for example that of the winding or that of the stator or the rotor), and in which two different estimations of the magnetic flux of the permanent magnets as well as the temperature of the permanent magnets and their standard deviation are implemented, in order to detect, by comparison (COMP) a demagnetization of the permanent magnets (Dem). Figure 1 to be published
Need to check novelty before this filing date? Find Prior Art

Description

Title of the invention: Method for detecting demagnetization of a plurality of permanent magnets equipping a rotor of an electrical machine Technical field

[0001] The present invention relates to the field of monitoring and controlling electrical machines, in particular for synchronous electrical machines with smooth / salient poles and synchronous-reluctant machines. These electrical machines find application in particular in the field of motor vehicles.

[0002] Conventionally, an electrical machine comprises a rotor (moving part) and a stator (fixed part). The rotor is usually housed inside the stator. Generally, the stator is annular in shape and is housed inside a tubular support to be fixed there.

[0003] The stator comprises magnetic flux generators, generally electrical windings. These windings are powered by a plurality (conventionally three) of electrical phases, in order to generate a rotating magnetic field. In addition, depending on the type of electrical machine, in particular for synchronous electrical machines with salient poles and synchronous-reluctant machines, the rotor may comprise permanent magnets.

[0004] During the operation of such an electrical machine, the stator windings are traversed by an electric current to generate the magnetic field necessary for driving the rotor in rotation.

[0005] In the field of electrical machines, the permanent magnet-assisted synchro-reluctant machine is today increasingly developed in many industrial applications due to its power factor, efficiency, compactness and ability to operate at high speed. Thanks to the permanent magnet in the rotor construction, the power factor is improved and stator losses are considerably reduced compared to synchro-reluctant machines. In addition, the reluctance torque created in such a machine limits the need for permanent magnet, which still remains expensive, and therefore makes this type of machine less expensive to produce.

[0006] However, the performance of such electrical machines can be degraded by demagnetization of the permanent magnets, which is often caused by high temperature during operation of the electrical machine or by the coupling of electrical and thermal stresses. Demagnetization of permanent magnets can lead to reduced torque output, ripples and vi- torque losses, copper losses (Joule losses) and excessive heat. In extreme cases, unmonitored demagnetization can cause complete damage to the electrical machine; this can lead to major risks, especially during operation. Therefore, the topic of real-time demagnetization detection is becoming increasingly important. Prior art

[0007] For this problem, many methods for analyzing the demagnetization of permanent magnets have been developed, and have focused on local demagnetization and also on the global demagnetization of permanent magnets. These methods can be divided into two main groups: direct methods via measurement, or indirect methods via estimation techniques.

[0008] Direct methods via measurement detect the demagnetization state by direct measurement with Gaussmeters or Hall effect sensors. The following documents illustrate direct methods:

[0009] J. Hong, D. Hyun, and SB Lee, “Automated monitoring of magnet synchronous motors at standstill,” IEEE Trans. Ind. Appl., 46 (4): 1397 - 1405, 2010.

[0010] IEC 62. 2-2004. “IEEE guide for diagnostic field testing of electric power apparatus-electrical machinery,” 2004.

[0011] D. Reigosa, D. Fernandez, Y. Park, AB Diez, SB Lee and F. Briz, “Detection of Demagnetization in Permanent Magnet Synchronous Machines Using Hall-Effect Sensors”, IEEE Transactions on Industry Applications, vol. 54, Issue 4, pp: 3338 -3349, 2018.

[0012] However, these methods require dedicated instrumentation, therefore the dismantling of the electrical machine or specific manufacturing for the installation of the instrumentation. In addition, these methods generate additional costs related to the devices and the installation.

[0013] The second group of methods analyzes demagnetization using back-electromotive force, or by high-frequency signal injection, or by flux observers at the stator. The following documents illustrate indirect methods by estimation techniques:

[0014] Y. Gritli, C. Rossi, D. Casadei, L. Zarri, F. Filippetti, “Demagnetization diagnosis for permanent magnet synchronous motors based on advanced wavelet analysis”, Pro-ceedings of the 2012 International Conférence on Electrical Machines, Marseille, France, pp. 2397-2403, 2012.

[0015] J. Hong, “Détection and classification of rotor demagnetization and eccentricity faults for PM synchronous motors”. IEEE Trans. Ind. Appl. 48, pp. 923-932, 2012.

[0016] X. Xiao, C. Chen, M. Zhang, “Magnet demagnetization observation or permanent magnet synchronous motor”, Proceedings of the International Conférence on Electrical Machines and Systems, pp. 3216-3219, 2008.

[0017] Y. Min, W. Huang, J. Yang, Y. Zhao, “On-line estimation of permanent-magnet flux and température rise in stator winding for PMSM”, Proceedings of the 22nd International Conférence on Electrical Machines and Systems (ICEMS), 2019.

[0018] However, these approaches suffer from the consequences of injecting high-frequency signals, or lack robustness due to the use of a single estimation source. Summary of the invention

[0019] The present invention aims to detect in real time a demagnetization of the permanent magnets of an electrical machine, in a robust, simple and inexpensive manner, thus ensuring good performance of the electrical machine (without reduction of torque production, with limited ripples and vibrations of the torque, with limited losses of copper and limited heat induced by the demagnetization of the permanent magnets).For this purpose, the invention relates to a method for detecting a demagnetization of at least one permanent magnet of a rotor of an electrical machine, for which the voltages, the currents and the position and / or the speed of the rotor are acquired, as well as at least one temperature (for example that of the winding or that of the stator or the rotor), and in which two different estimations of the magnetic flux of the permanent magnets as well as the temperature of the permanent magnets and their standard deviation are implemented, to detect a demagnetization of the permanent magnets. Thus, the method implements two estimations of the magnetic flux of the permanent magnets as well as the temperature of the permanent magnets, therefore the method uses two estimation sources, which makes the demagnetization detection robust.Furthermore, such a method uses only conventionally measured parameters of the electrical machine, so the invention does not require any specific instrumentation, which makes the invention simple and inexpensive.

[0020] The invention further relates to a method and a system for controlling and / or monitoring the demagnetization of the magnets of an electrical machine.

[0021] The invention relates to a method for detecting demagnetization of a plurality of permanent magnets equipping a rotor of an electrical machine, said electrical machine comprising a stator provided with a winding and said rotor provided with said plurality of permanent magnets. For this method, the following steps are implemented: a. Currents and voltages are acquired in phases of said winding of said stator, as well as the position and / or rotational speed of said rotor; b. A temperature of said winding and / or a temperature of said stator ; c. A first magnetic flux of said permanent magnets and a first standard deviation of said first magnetic flux are determined by applying at least one Kalman filter to a magnetic flux model of said electrical machine, said magnetic flux model being applied to the acquired currents and voltages and to the acquired position or rotational speed of the rotor; d. A temperature of said permanent magnets and a standard deviation of said temperature of said permanent magnets are determined by applying a Kalman filter to a thermal model of said electrical machine, said thermal model of said electrical machine being applied to the acquired currents, to the acquired rotor position or speed and to the acquired temperature of said acquired winding or of said stator; e. A second magnetic flux of said permanent magnets and a second standard deviation of said second magnetic flux of said permanent magnets are determined by a magnetothermal model of said permanent magnets from said determined temperature of said permanent magnets; and f. Said first magnetic flux is compared with said second magnetic flux, and a demagnetization of said permanent magnets is detected if the absolute value of said comparison is greater than a threshold dependent on said first and second standard deviations of magnetic flux of said permanent magnets.

[0022] According to one embodiment, said magnetic flux model of said electrical machine is composed of a stator magnetic flux model and a magnetic flux model of said permanent magnets.

[0023] Advantageously, said first magnetic flux of said permanent magnets, and said first standard deviation of the magnetic flux of said permanent magnets are determined by applying a linear Kalman filter to said magnetic flux model of said permanent magnets, said magnetic flux model of said permanent magnets being applied to the acquired currents and voltages and to the acquired position or rotational speed of the rotor, as well as to the magnetic flux of said stator determined by a scentless Kalman filter applied to said stator magnetic flux model.

[0024] Advantageously, said magnetic flux model of the stator is defined by a state model with a state equation of the form: X = A( w ) X + u with / A\, / Va-RId \,A / \ / 0 te \ and a measurement equation of y II ,, _ । AI| Cl) I — | ) k' o / the form: x, — a \ with / L\ and ZtW. d). being the flux ma stator magnetics in the Park frame, Vd, Vqthe voltages in the stator phases in the Park frame, respectively the forward voltage and the quadrature voltage, Id, Iqthe currents in the stator phases in the Park frame, respectively the forward current and the quadrature current, co the rotor rotation speed, (|)pM the first magnetic flux of the permanent magnets, R the stator resistance, fd, fqthe nonlinear functions linking the stator current components to the magnetic flux components in the Park frame.

[0025] According to one aspect of the invention, said magnetic flux model of the permanent magnets is defined by a state model with a state equation of the form: - 0 and a measurement equation _ œ(|)pM+ (ox|> +RIq ) with >2= W $d being the direct stator magnetic flux in the Park frame, Vq the quadrature voltages in the stator phases in the Park frame, Iq the quadrature currents in the stator phases in the Park frame, co the rotor rotation speed, the magnetic flux of the permanent magnets, R the stator resistance.

[0026] According to one implementation, said thermal model is defined by a state model with an equation of the form: X = A(w)X + Bu(t) and y = CX with X a vector of the temperatures of the different components of the electric machine, u a vector of the Joule losses of the different components of the electric machine and the temperatures of the cooling components of the electric machine, and V = Tec said acquired temperature, A / \_i 0 the matrix B is VJ 0 / function of the current of the phases of the electric machine and the rotation speed of the rotor, and C the output matrix.

[0027] According to one embodiment option, said magnetothermal model is written: ^) the second stream ma- magnetic flux of permanent magnets, y the determined temperature of said permanent magnets, p a thermal coefficient of said permanent magnets, To an ambient temperature, (])Q the magnetic flux of said permanent magnets at ambient temperature To.

[0028] According to one embodiment, said threshold S is written S — AT. O- , WWW' with Ki a positive coefficient, preferably between 2 and 5 and preferably worth 3, a representing the standard deviation, 1 the first magnetic flux of the magnets 'PM permanent, $ pj the second magnetic flux of permanent magnets.

[0029] Furthermore, the invention relates to a method for controlling and / or monitoring a electric machine, said electric machine comprising a stator provided with a winding and a rotor provided with a plurality of permanent magnets. For this method, the following steps are implemented: a. Demagnetization of permanent magnets is detected by means of the method for detecting demagnetization of permanent magnets according to one of the preceding characteristics; and b. The said electrical machine is controlled and / or monitored based on the detection of demagnetization of the permanent magnets.

[0030] Furthermore, the invention relates to a system for controlling and / or monitoring an electrical machine comprising an electrical machine and a controller for implementing the control and / or monitoring method according to one of the preceding characteristics.

[0031] Other characteristics and advantages of the method and system according to the invention will appear on reading the following description of non-limiting examples of embodiments, with reference to the figures appended and described below. List of figures

[0032] [Fig.l]

[0033] [Fig.l] illustrates the steps of the method according to a first embodiment of the invention.

[0034] [Fig.2]

[0035] [Fig.2] illustrates the steps of the method according to a second embodiment of the invention.

[0036] [Fig.3]

[0037] [Fig. 3] illustrates the steps of the method according to a third embodiment of the invention.

[0038] [Fig.4]

[0039] [Fig.4] illustrates, for an example, a curve of torque as a function of time.

[0040] [Fig.5]

[0041] [Fig.5] illustrates, for the example of [Fig.4], the rotation speed of the rotor as a function of time.

[0042] [Fig.6]

[0043] [Fig.6] illustrates, for the example of figures 4 and 5, the first estimation of the magnetic flux of the permanent magnets as a function of time.

[0044] [Fig.7]

[0045] [Fig.7] illustrates, for the example of figures 4 to 6, the estimation of the temperature of the permanent magnets as a function of time.

[0046] [Fig. 8]

[0047] [Fig.8] illustrates, for the example of figures 4 to 7, the comparison of the estimates of magnetic flux of permanent magnets to detect demagnetization of permanent magnets. Description of the embodiments

[0048] The present invention relates to a method for detecting, in real time, a demagnetization of the permanent magnets of a rotor of an electrical machine. The electrical machine comprises a rotor and a stator, the latter being equipped with windings connected to several electrical phases, for example to three electrical phases (or four, five, six, nine or twelve, etc. phases) to generate a magnetic field allowing the rotation of the rotor. The rotor comprises at least two permanent magnets for generating a magnetic field.

[0049] According to one aspect of the invention, the electrical machine may be a synchronous electrical machine with smooth / salient poles or a synchro-reluctant machine. Indeed, the method is particularly suitable for these types of electrical machine, on the one hand, because the models implemented are well representative of these types of electrical machine, and because the detection of a demagnetization of the permanent magnets allows the control and / or monitoring of such an electrical machine. Preferably, the electrical machine may be a synchro-reluctant machine assisted by permanent magnets. Indeed, this type of electrical machine requires precise detection of the demagnetization of the permanent magnets, in particular for their control, for their diagnosis, and for their monitoring.

[0050] The method for real-time detection of demagnetization of permanent magnets comprises the following steps:

[0051] 1) Acquisition of currents, voltages, position and / or rotation speed

[0052] 2) Acquisition of a temperature of the winding or the stator

[0053] 3) Determination of a first magnetic flux of the permanent magnets

[0054] 4) Determination of a temperature of the permanent magnets

[0055] 5) Determination of a second magnetic flux of the permanent magnets

[0056] 6) Detection of demagnetization

[0057] Steps 1 and 2 are independent, and can be carried out in this order, in reverse order or simultaneously. In addition, step 3 can be carried out before, simultaneously or after steps 4 and 5. The steps of the method can be implemented by computer means, in particular by means of a controller / estimator of the electrical machine. These steps will be detailed in the remainder of the description.

[0058] [Fig.l] describes, schematically and in a non-limiting manner, the steps of the method according to one embodiment of the invention. In a first step, ACQ is acquired of the currents, voltages in the phases of the stator, and the position and / or the rotation speed of the rotor, as well as a temperature of the electric machine. Then, in parallel, a first magnetic flux is determined using a magnetic flux model MFM of the permanent magnets, and a second magnetic flux is determined using a thermal model MTH of the electric machine and a magnetothermal model MMT of the permanent magnets. The two estimates of the magnetic flux of the permanent magnets are compared COMP to deduce a demagnetization (or an absence of demagnetization) of the permanent magnets Dem.

[0059] In the remainder of the description, the derivatives with respect to time are indicated by a point. The notations indexed by the mention ~d (direct) or ~q (quadrature) mean that the quantities are expressed in the Park frame (rotating frame linked to the rotor) via in particular the acquisition of the position of the rotor. In addition, the notations indicated with a circumflex accent designate a value estimated by a Kalman filter. Furthermore, the values ​​in the initial state are indicated with a 0 (t or k = 0, t being continuous time and k discrete time).

[0060] 1) Acquisition of currents, voltages and position and / or speed of rotation

[0061] During this step, we continuously acquire in real time: - Currents in the stator phases of the electric machine, - The voltages at the terminals of the phases of the stator of the electric machine, and - The position and / or the electrical speed of rotation of the rotor of the electric machine (we recall that the electrical speed of rotation can be deduced from the position of the rotor of the electric machine, in particular by the derivative with respect to time).

[0062] According to one embodiment of the invention, the currents, and / or the voltages and / or the position and / or the rotation speed can be acquired from measurements. In other words, this step can comprise the measurement of at least one of the acquired signals. The measurement makes it possible to improve the accuracy of the signals (currents, voltages, position and / or rotation speed), in fact, they then correspond to those actually present within the electrical machine.

[0063] These measurements can be carried out by voltage and current sensors instrumenting the electrical machine, so as to measure the currents and voltages in the phases of the electrical machine, and / or by an angular position or angular speed sensor of the rotor, so as to measure the rotational speed of the rotor. For example, for the position or angular speed, sinusoidal signals generated by a position sensor can be acquired, and the angular position and rotational speed of the rotor can be deduced therefrom.

[0064] Alternatively, the currents, and / or voltages and / or rotational speed may be acquired from a controller / estimator of the electrical machine. This confi- guration allows to limit the instrumentation of the electrical machine.

[0065] Advantageously, the voltage and current signals acquired in the phases can be transformed into voltages and currents in the Park reference frame (rotating reference frame linked to the rotor), so as to determine the direct current, the quadrature current, the direct voltage, and the quadrature voltage.

[0066] According to one embodiment of the invention, the electrical rotation speed coe of the rotor can be determined from the mechanical rotation speed of the rotor, by means of the formula: we = Nœ, with N the number of pairs of poles of the electrical machine and co the mechanical rotation speed of said rotor.

[0067] According to an implementation of this embodiment, the rotational speed and / or the mechanical position of the rotor can be estimated, by any method known to those skilled in the art. For example, the rotational speed and / or the mechanical position can be estimated from a phase-locked loop (PLL) type method. Alternatively, the method for estimating the rotational speed and / or the mechanical position can be in accordance with those described in patent application FR 2 984 637.

[0068] Alternatively, the rotational speed and / or mechanical position of the rotor may be measured by means of a position / angular speed sensor placed on the electrical machine.

[0069] Alternatively, the electrical rotational speed can be determined directly. 2) Acquisition of a temperature

[0070] During this step, a temperature of the stator winding and / or a temperature of the stator is acquired. This acquired temperature allows the application of the thermal model to determine the temperature of the permanent magnets.

[0071] According to one embodiment of the invention, the temperature of the winding and / or a temperature of the stator can be acquired by means of a temperature sensor, arranged in the winding or on the rotor. Such measurements are inexpensive and conventional for electrical machines.

[0072] Alternatively, the temperature of the winding and / or a temperature of the stator can be estimated, by any method known to those skilled in the art. 3) Determination of a first magnetic flux

[0073] During this step, a first magnetic flux of the permanent magnets and a first standard deviation of the first magnetic flux are determined (estimated), by applying at least one Kalman filter to a magnetic flux model of the permanent magnets. The magnetic flux model is applied to the currents, voltages, and rotor speed acquired during step 1. The first magnetic flux of the permanent magnets is called the magnetic flux estimated by the at least one Kalman filter applied to the magnetic flux model. magnetic flux of permanent magnets. In other words, it is a first estimate of the magnetic flux of permanent magnets. The standard deviation is an estimate of the probability dispersion of the magnetic flux. The standard deviation can be defined as the square root of the variance of the magnetic flux. The magnetic flux model of permanent magnets is a dynamic model that relates currents, voltages, speed to the magnetic flux of permanent magnets. The model is called dynamic because it is a function of the rotational speed of the rotor and it includes the transients of its variables.

[0074] According to one embodiment of the invention, the magnetic flux model may be composed of a stator magnetic flux model (also called a dynamic model of the stator magnetic flux) and a permanent magnet magnetic flux model. Preferably, these models are interconnected for a robust and accurate determination of the first magnetic flux of the permanent magnets.

[0075] [Fig. 2] illustrates, schematically and in a non-limiting manner, the steps of the method according to this embodiment. The steps identical to the embodiment of [Fig. 1] are not detailed again. For this embodiment, the magnetic flux model MFM comprises a stator magnetic flux model MFS and a permanent magnet magnetic flux model MFA, the stator magnetic flux model MFS having as input the output of the permanent magnet magnetic flux model MFA and vice versa. Thus, the stator magnetic flux models MFS and the permanent magnet magnetic flux model MFA are interconnected.

[0076] The dynamic model of the stator magnetic flux is a state representation of the electrical machine. It is recalled that in systems theory (and in automation), a state representation makes it possible to model a dynamic system in a matrix form, using state variables. This representation can be linear or not, continuous or discrete. The representation makes it possible to determine the internal state and the outputs of the system at any future instant if the state at the initial instant and the behavior of the input variables that influence the system are known.

[0077] The dynamics of the permanent magnet magnetic flux (|)pM is slow and can be neglected compared to those of the stator magnetic flux components 4>d and <])q. This is the reason why the estimation can be separated into two separate models: one for the two stator magnetic flux components 4>d, having fast dynamics, and another for the permanent magnet magnetic flux (|)pM having slow dynamics.

[0078] The dynamics of the stator magnetic flux can be expressed by the following differential equation:

[0079] (|>d = Vd-RIli + l4q

[0080] ^Vq-RIq-W^+^J

[0081] With R the resistance of the stator of the electric machine, co the electric rotation speed, the direct magnetic flux, the magnetic flux in quadrature, the derivative with respect to time of the direct magnetic flux, the derivative with respect to time of the magnetic flux in quadrature, <|)pM the magnetic flux of the permanent magnets, Id the direct current, Iq the current in quadrature, Vd the direct voltage, Vq the voltage in quadrature.

[0082] Furthermore, the system of equations of the set of measurements can be described by: [00831 [00841 19 = ^ M

[0085] Vq= üx|>pM+ (I4t| + R1I)VR= R^I^ + I?)

[0086] With fd and fq non-linear functions for the states 4>d, 4>q and (|>pM (the non-linear functions are known from tables or maps of the electric machine in particular for synchro-reluctant machines), VR the stator resistance voltage which can be given by C 3 ~ , 2 V R = ^(v j+l ^ q ) +(v q - <q4> d +<^ .

[0087] Thus, in accordance with an implementation of the invention, the flow model ma The stator's genetics can be defined by a state model with an equation of state of the form:X= A(œ)X + uwith / 0A, / X= W "AVq-RIq-U^ / $ œ j and a measurement equation of the form: y _ {]> with \-w 0 / 1 i and rd \ • I t= f lq / \ I q /

[0088] For a synchronous-reluctant machine, the inductances in the d (direct) and q (quadrature) axes are also functions of the current components. The previous system is therefore linear for the state and non-linear for the measurement.

[0089] The dynamic model of the magnetic flux of permanent magnets is a state representation of the electric machine. It is recalled that in systems theory (and in automatic control), a state representation makes it possible to model a dynamic system in a matrix form, using state variables. This representation can be linear or not, continuous or discrete. The representation makes it possible to determine the internal state and the outputs of the system at any future instant if we know the state at the initial instant and the behavior of the input variables that influence the system.

[0090] The dynamics of the flux of permanent magnets can be expressed by an equation having extremely slow dynamics:

[0091] (j)pM^0

[0092] Thus, in accordance with an implementation of the invention, the magnetic flux model of the permanent magnets can be defined by a state model with a state equation of the form: (|) = 0 and a measurement equation y2 = «l> PM + (w<|> d +Riq) avecy 2 =

[0093] For this implementation of the invention, the first magnetic flux of the permanent magnets and the first standard deviation of the first magnetic flux of the permanent magnets can be determined by applying a linear Kalman filter to the magnetic flux model of the permanent magnets, the magnetic flux model of the permanent magnets being applied to the currents, voltages acquired from the phases of the electric machine, and to the acquired rotor rotation speed, as well as to the magnetic flux of the stator determined by an unscented Kalman filter applied to the stator magnetic flux model.

[0094] In other words, the magnetic flux of the permanent magnets can be determined by applying a linear Kalman filter to the magnetic flux model of the permanent magnets, the magnetic flux model of the permanent magnets being applied: - To the currents in the phases of the acquired stator, - To the voltages in the acquired stator phases, - At the acquired rotor rotation speed, and - To the stator magnetic flux determined by an unscented Kalman filter applied to the stator magnetic flux model (an unscented Kalman filter is applied because the stator magnetic flux model is non-linear) and to the acquired signals.

[0095] Applying the Kalman filter provides a state observer. In the discrete context, it is a recursive estimator: to estimate the current state, only the estimate of the previous state and the current measurements are needed. The linear Kalman filter consists of two phases: a prediction and an update (to correct the predicted state in order to obtain a more accurate estimate). The unscented Kalman filter (UKF) is a filtering algorithm that uses a system model to estimate the current hidden state of a system, and then corrects the estimate using available sensor measurements. The unscented Kalman filter can be applied to a nonlinear system.The UKF philosophy differs from the extended Kalman filter (another type of Kalman filter that can be applied to a nonlinear system) in that it uses the scentless transform to directly approximate the mean and covariance of the . target distribution. The unscented Kalman filter can include the steps of state prediction and measurement correction, both of which are preceded by a preliminary step for calculating "sigma points." Sigma points are a set of samples calculated in such a way that they can accurately propagate the mean and covariance information in the space of a nonlinear function.

[0096] Such determination of the magnetic flux of permanent magnets by means of Kalman models and filters is a stochastic method, which is stable in a noisy or discontinuous environment.

[0097] According to one embodiment of the invention, the stator magnetic flux model (in its discrete version) may depend on the magnetic flux of the permanent magnets determined at the previous time step. Since the dynamics of the stator magnetic flux are faster than the dynamics of the magnetic flux of the permanent magnets and the dynamics of the stator resistance, this embodiment allows the robustness and accuracy of the determination to be maintained. This embodiment allows the two interconnected models to be applied, for real-time determination of the magnetic flux of the permanent magnets. Furthermore, according to one embodiment option of the invention, the stator magnetic flux estimator may be executed first. Thus, the permanent magnet magnetic flux estimator may be implemented with the stator magnetic flux determined at the current time step.

[0098] According to an implementation of the invention, the magnetic flux of the stator can be determined at a frequency higher than the frequency of determination of the magnetic flux of the permanent magnets. Since the dynamics of the magnetic flux of the stator are faster than the dynamics of the magnetic flux of the permanent magnets and the dynamics of the stator resistance, this embodiment makes it possible to maintain the robustness and accuracy of the determination. This implementation makes it possible to apply the two interconnected models, for real-time determination of the magnetic flux of the permanent magnets.

[0099] The stator magnetic flux observer is based on the discrete model of the stator magnetic flux and which can be defined as follows:

[0100] X(k) = A d (kl)X(kl)+B d (kl)u(kl)+e(kl)

[0101] y i{ k)=f(x k , $ PM (k))+n(k)

[0102] whereA(= eTsAet^ fTs . / x , with A the transition matrix of the equation a Bd = Jo eA(T)w state of the stator magnetic flux model, Ts the discretization step of the model, c(k) and q(k) are zero-mean white noises with covariance matrices Qx and Rx, respectively.

[0103]

[0104] The u(k) command can be described by: uk - v d (k)-ê(k)i d (k) V q (k)-Ê(k)I q (k)- w (k)$Jk),

[0105]

[0106] For the rest, we use the following notations: * X(k|k- 1) is the estimate of X at time 1^ knowing its value at time tk_{. * X(kjk) is the estimate of X at time 1^ from the measurements at time tj.. • P( kjk- 1) is the covariance matrix of the error of the estimate at time tk knowing its value at time tu. • P(k(k) is the covariance matrix of the error of the estimate at time tk from the measurements at time tk. The unscented Kalman filter (UKF) technique is applied with two steps, after an initialization step at k=0, of the state vector and the state covariance matrix. - First step: Prediction of the state at time k [° 107 ] X(k|kl)=A d (k)X(kl|kl)+B d (k)u(k)

[0108] P(kjk- 1) = Ad(k)P(k- Ijk- l)Aj(k) + Bd(k)QxBj(k) - Second step: Correction of the state with the measurement at time k: K(k) = PxyPyyX(kjk) =X(k}k- l)+K(k)(y1(k) -m y ) [OK)9] p(k|k) =p(kjk-l)-K(k)PyvK(k)T

[0110] After the prediction step, the distribution of k) is given by a distribution Gaussian N ( P%) with m_ X(kjk-1 ) cl Px ~ P(k|k-1 ).The sigma points associated with the mean mx and the matrix Px can, for example, be calculated as follows: [YES] Ç0 = mx

[0112] - mx + ^n + X Sj, i = L n

[0113] £ = mx - Jn + XS, i = L n -i+n A V 1 '

[0114] With À- ^2(n + K) -n

[0115] With q a scalar parameter determining the dispersion of the sigma points, and k a secondary resizing parameter, and n=2, and Si is a square root of Px of the Gaussian distribution Px)- The sigma points propagate in the measurement model in the following form, for all i between 0 and 2n: 101161 y u ( k ) =f(4 k M (k))

[0117] The next step may be to calculate the predicted mean my, the covariance predicted from the measurement Pyy and the cross-covariance of the measurement state Pxy as follows: 101181 nv^w-'y.fk) 101191 = R x Pxy=£^W?«.-m x ) (y-my) 7

[0120] with W™ and the weights of the predicted mean and predicted covariance, and Rx the measurement noise covariance matrix.

[0121] Where K(k) is the correction gain at time k, my the average of measurements calculated via the sigma points, Pyy the measurement covariance and Pxy the cross covariance between the state and the measurement. The calculation procedure for these terms is detailed in patent application WO2022 / 228923 using a specific “scentless transformation” technique.

[0122] Note that the term $ is a parameter estimated by the observer of the magnet flux presented subsequently.

[0123] For the model of the magnetic flux of permanent magnets, we can consider the discretized form of the model:

[0124] %(k)=* pM (kl)+ ^(k) 101251 y2(k) [œ(k)$ d (k)+â(k)qk))+^

[0126] where k) and are zero-mean white noises with covariance matrices and R^, respectively. For this model, the linear Kalman filter (KF) is used with two steps to be performed: - First step: Prediction at time k 101271 $ pM (k|kl)= $ pM (kl|kl)P (k|k-l) = P (kl|kl)+Q 1|i - Second step: Update with the measurement at time k: K4,(k)=p4J(k|ki)qk)s4,(k)'' 101281 $ pM (k|k)= $ pM (k|kl)+K4,(k)(y 2m (k)-z4,(k)) 101291 P*(k|k) =P$(k|kl)-K*(k)S <1 )k^

[0130] With 101311 yU k )= v d k ) [01321 S ¢ (k) + R, h 101331 z$(k) = œ(k)$ pM (k|k- 1) + (w(k)$ d (k) +6]k]l q (k]]

[0134] We can notice that a (jA is a term coming from the flux observer ma- stator genetics.

[0135] Therefore, based on this estimation model, one can estimate in addition to the first magnetic flux of the permanent magnets  , the first standard deviation of the error ^PM of his estimate

[0136] 4) Determination of the temperature of permanent magnets

[0137] In this step, a temperature of the permanent magnets and a standard deviation of the temperature of the permanent magnets are determined by applying a Kalman filter to a thermal model of the electric machine. The thermal model of the electric machine is applied to the currents acquired in step 1, to the rotor speed acquired in step 1 and to the winding temperature or the stator temperature acquired in step 2. The thermal model of the electric machine relates the currents, the rotor speed, the winding temperature or the stator temperature to the temperature of the permanent magnets. The standard deviation is an estimate of the probability dispersion of the temperature of the permanent magnets. The standard deviation can be defined as the square root of the variance of the temperature of the permanent magnets.

[0138] According to one embodiment, the electrical machine can be decomposed by several nodes. In this case, the thermal model of the machine can be written from a plurality of thermal equations, each thermal equation translating the thermal exchanges between several components of the electrical machine. For example, the components can be the cooling circuit, the winding, the stator yoke, the permanent magnets, the rotor, the rotor yoke, the inner ring ("inner ring electrical machines" generally refer to electrical machines where the rotor winding is located inside the stator winding, these motors are also called wound rotor motors), the rotor axis.

[0139] In a non-limiting manner, the thermal model can be written:

[0140] mCp wj T WJ = Q cœi2w) - Q wj2sy

[0141] mCp sy T sy = Q wj2sy + Ps y - Q sy2cc - Q sy2st [0U2] mCp œ T œ = Q œ2cc - Q sy2cc + P œ - Q œ2st

[0143] mCp sf T st = Q sy2s£ + P st + - Q st2r

[0144] m Cp ma T pm = P PM - Q pM2r

[0145] mC Pi .T r = P r + Q pM2i . + Q st2r -Q r2i7

[0146] mC Piy T f> = Q r2ry - Q ry2ir

[0147] mCp. T - Q 9 - Q. 9

[0148] mCp T rs = Q. 9 - Q 9 frs 1 b ^u'2rs ^rs2oü

[0149] mCp Tec - Pec - Q .

[0150] Where mCp., Pj, Tj are, respectively, heating capacity, Joule loss and temperature of ith element, with i in {wj sy, CC, si, PM, r, ry, ir, rs, ec} representing, respectively, water jet (water cooling circuit), stator yoke, copper coil, stator teeth, permanent magnet, rotor, rotor yoke, inner ring, rotor axis, coil head. Note that the Joule losses Pi are a function of current and speed, i.e. Pj = fj (Id, Iq, m) and are predetermined by 3D maps.

[0151] Alternatively, the thermal model can be more or less detailed (taking into account additional equations for other components of the electrical machine). The example illustrated in this example allows a good compromise precision for real-time determination.

[0152] In addition, Qjj is the heat exchange between two elements [i, j}, which belong to {cool, wj, sy, CC, St, PM, r, ry, ir, rs, ec, oil} • We can consider two new “cool” and “oil” components representing cooling (refrigeration water) respectively stator cooling) and oil (rotor cooling).

[0153] The heat exchange can be calculated as follows:

[0154] ( \ , Qij= G MTrTj) IA /

[0155] Where Gjj is the heat transfer coefficient between components i and j, which depends on the motor speed œ. It is remarkable that the only temperature measured is that of the winding Tec (alternatively the temperature of the stator body). In addition, The model has two controllable temperatures which are the cooling water temperatures Tc for the stator and the oil temperatures ToiJ for the rotor.

[0156] We can write, in the form of an equation of state, the thermal model:

[0157] XA(œ, Id, / jX + Bu(t)

[0158] y = CX T

[0160] n [tpppp PPT l^otv —T are, respec-u—[F^i, rSy, rcc, rPM, rec, ioi) j and y— rec T ? 'l't r 1A r '17 r 1 r | 7 ca 1 sb PM- Lr» Jry, Jjp 1rs» 1 sy, tively, the states, inputs and measurements of the thermal model. The state matrices are, directly, obtained by rewriting the thermal model in the form of a state representation. We note that the matrix A depends on the electrical rotation speed of the electric machine and its currents and has a size of 10x10 for the considered example of the thermal model (the size can be adjusted according to the decomposition of the thermal model), while the matrix B has a size of 10x8 for the considered example of the thermal model (the size can be adjusted according to the decomposition

[0164] Where x is the estimate of the thermal state X, p position of the thermal model). The output matrix can be written in this case C = [0 00000000 1], since the temperature of the stator coil head Tec is the only measurement available in the state vector X.

[0161] For this embodiment, a Kalman filter can be implemented as a temperature observer, which is based on the thermal model, and which is defined as follows:

[0162] x = AX + Bu + K(y-Cx)

[0163] p = AP + PA t + Q t - PC^CP = E variance of the estimation error, QT and Rj are respectively the covariance matrices of the state and measurement noises and K is the observer correction matrix. This gain is calculated as follows:

[0165] K = PCtRt

[0166] The initial values ​​of the observer are as follows:

[0167] X(0)=E(X(0)) & P(0)=E((x(0)-X(0))(x(0)-X(0)) T I

[0168] It should be noted that the dynamics of the thermal model is very slow; which implies a fairly slow convergence for the covariance matrix P and the correction gain K of the Kalman filter. For this reason, we can introduce and use a steady-state Kalman form, during which the covariance matrix P has a very slow dynamics (P = 0) calculated in steady-state by the following Riccati equation:

[0169] AP + PA t + Q t - PC T R^CP = 0

[0170] It can be noted that the solution of the error covariance matrix P is a function of the transition matrix A, the measurement matrix C, the covariance matrices of the noises on the state and on the measurement (QT and Ry respectively) of the global system. Since the matrix A depends on the speed, the solution of the matrix P therefore depends on the speed as well. In practice, the covariance matrix P can be calculated offline, and it can be mapped as a function of the regime of the electric machine, and then the correction gain can be calculated by the formula K = PCTRy to realize the observer.

[0171] Finally, one can estimate the temperature -p and the standard deviation of the error of the estimation aT™ of the temperature of the rotor permanent magnets from the estimated state x. 5) Determination of the second magnetic flux

[0172]

[0173]

[0174]

[0175]

[0176] In this step, a second magnetic flux of the permanent magnets and a standard deviation of the second magnetic flux are determined (estimated) by a magneto-thermal model of the permanent magnets from the temperature of the permanent magnets determined in step 4. A second magnetic flux is called a second estimate of the magnetic flux of the permanent magnets, this second estimate of the magnetic flux of the permanent magnets being obtained from the temperature of the permanent magnets determined in step 4. Thus, the method determines the magnetic flux in two different ways, which allows robust detection of the demagnetization of the permanent magnets. According to an implementation of the invention, the magnetothermal model is written: *PM(tPM, B( l-5(Lm-To) ) magnetic flux of the permanent magnets, the determined temperature of said permanent magnets, p a thermal coefficient of said permanent magnets, To an ambient temperature, 4^ the magnetic flux of said permanent magnets at the ambient temperature To. Preferably, the thermal coefficient p of the permanent magnets can be estimated, as well as the standard deviation of the thermal coefficient ap. Advantageously, the thermal coefficient p can be estimated from the magnetic characteristics of the permanent magnets used within the rotor of the electric machine. 6) Demagnetization detection In this step, the first magnetic flux of the permanent magnets determined in step 3 is compared to the second magnetic flux of the permanent magnets determined in step 5. Then, a demagnetization of the permanent magnets is detected if the absolute value of the comparison (in other words the absolute value of the difference) is greater than a threshold depending in particular on the first standard deviation of the magnetic flux, and on the standard deviation of the temperature of the permanent magnets. In other words, a demagnetization of the permanent magnets is detected if | TPM P ) | >5' with the first magnetic flux of the permanent magnets, $ ^Tpm pj the second ma magnetics of permanent magnets, and S the threshold. Indeed, if the difference is greater than the threshold, then the difference is not in the confidence interval, which implies the demagnetization of the permanent magnets. In one aspect, the threshold S can be written S — K iG, . / 4 with Ki a co- positive efficient, preferably between 2 and 5 and preferably worth 3, a representing the standard deviation, Â the first magnetic flux of the permanent magnets, 41 ( TPM P ) 'C ^cux'^mc magnetic flux of permanent magnets.

[0177]

[0178]

[0179]

[0180]

[0181]

[0182]

[0183]

[0184]

[0185]

[0186] For example, the uncertainty margin can be calculated via the standard deviation of the estimated flux difference between a and a [ tr], i.e. a at (t « there starting from the magnetothermal model, and from the knowledge of ¢, TpM p. Cj ' °Tpm, and °[> obtained during steps 3 to 5. By applying the propagation uncertainty approach, we can obtain: With g defined by Then, based on the calculated standard deviation, we can analyze the inconsistency between the two estimated information $ and The main idea is to use the "three sigma rule": determine whether the estimated flux difference between  and a / tr ë % 'M1™' P is in the confidence interval (here defined with a positive coefficient 3) / Itta ,* a\ o,™ a 1, that is to say: 1 ~ 4PM(tpM, 4 4pm(-ÏW p) ; " ^pm$PM P)- The invention also relates to a method for controlling and / or monitoring an electrical machine. The method for controlling and / or monitoring implements the method for detecting demagnetization of permanent magnets according to the invention and an additional step of controlling and / or monitoring the electrical machine as a function of the detected demagnetization. Thus, for this method of controlling and / or monitoring an electrical machine, the following steps can be implemented: a. Demagnetization of the permanent magnets is detected by means of the method of determining the stator temperature according to any of the variants or combinations of variants described above; and b. The electrical machine is controlled and / or monitored based on the detection of demagnetization of the permanent magnets. In other words, the control process of the electric machine includes the following steps: 1. Acquisition of currents, voltages and position and / or rotation speed 2. Acquisition of the temperature of the winding or stator 3. Determination of the first magnetic flux 4. Determination of the temperature of permanent magnets 5. Determination of the second magnetic flux 6. Detection of demagnetization 7. Control and / or monitoring of the electrical machine

[0187] [Fig. 3] describes, schematically and in a non-limiting manner, the steps of the method according to a third embodiment of the invention. The steps previously described for [Fig. 2] are not detailed again. This embodiment further comprises an additional step of controlling CON and / or monitoring the electrical machine as a function of the detection of demagnetization Dem.

[0188] For example, the control of the electrical machine may be based on a high-performance direct torque control method, particularly suitable for synchronous electrical machines with salient poles. This may, for example, be a control strategy of the MTPA or MTPV type (respectively from the English "Maximum Torque per Ampere" which can be translated as maximum torque per ampere, and "Maximum Torque per Voltage" which can be translated as maximum torque per volt). Monitoring the demagnetization of the permanent magnets may consist of an alert (indicator light for example), an increase in the cooling of the rotor (for example by means of circulation of a fluid), or a reduction in the performance of the electrical machine (reduction of the speed and / or the torque) so as to reduce the temperature of the rotor.

[0189] Furthermore, the invention relates to a system for controlling and / or monitoring an electrical machine, in particular a synchronous electrical machine, adapted to apply the method as described above. Such an electrical machine control system may comprise means for controlling the electrical machine comprising means for detecting the demagnetization of the permanent magnets and means for controlling or monitoring the electrical machine. The means for detecting the demagnetization of the permanent magnets detect the demagnetization of the permanent magnets from the current and voltage signals and the rotational speed of the rotor, as well as the stator temperature and / or the winding temperature. These are the currents and voltages of each of the three phases of the electrical machine.The control or monitoring means apply voltages to the terminals of the electrical machine as a function of the torque in order to ensure a torque setpoint for the electrical machine. Advantageously, the control and / or monitoring system may be a controller comprising computer means.

[0190] This method and this control and / or monitoring system can be used for an electrical machine on board a vehicle, in particular on board an electric or hybrid motor vehicle. However, the control system described is not limited to this application and is suitable for all electrical machine applications, including stationary applications.

[0191] It goes without saying that the invention is not limited to the embodiments of the methods and system described above as examples; on the contrary, it encompasses all variant embodiments. Application examples

[0192] The characteristics and advantages of the method according to the invention will appear more clearly on reading the application examples below.

[0193] For this application example, the operation of an electrical machine is simulated. The simulation is carried out for a 10 kW synchronous-reluctant machine with four pairs of poles and powered by 350 V DC. The machine operates with a torque of 150 Nm and a speed that varies from 500 to 14000 rpm to cover all operating zones: MTPA (maximum torque per ampere) zone from t= 0 s to t= 30 s and from t = 70 s to t=80 s, and MTPV (maximum torque per volt) zone from t= 30 s to t= 70 s by imposing the maximum torque that can be obtained for the available effective voltage. [Fig.4] illustrates for this example the curve of the torque Te in Nm as a function of time T in s, and [Fig.5] illustrates for this example the curve of the rotation speed co in rpm as a function of time T in s. These two figures thus show the different operating ranges of the electric machine.

[0194] The first magnetic flux of the permanent magnets is then determined, as well as the first standard deviation of the first magnetic flux, in accordance with an embodiment of step 3 of the method according to the invention. [Fig.6] illustrates the first magnetic flux of the permanent magnets <e>PM in Wb as a function of time T in s. This figure plots the reference curve obtained by the simulation as well as the first estimated magnetic flux <e>is and the confidence interval defined by 3o (3 times the standard deviation - three sigma rule). Note that the reference and estimated curves are superimposed. Therefore, this step allows an accurate estimation of the magnetic flux of permanent magnets.

[0195] The temperature of the permanent magnets is also determined, as well as the standard deviation of the temperature of the permanent magnets, in accordance with an embodiment of step 4 of the method according to the invention. [Fig.7] illustrates the temperature of the permanent magnets TPM in °C as a function of time T in s. This figure plots the reference curve obtained by the simulation TR|H as well as the first estimated magnetic flux Test and the confidence interval defined by 3o (3 times the standard deviation - three sigma rule). It is noted that the reference and estimated curves are superimposed. Consequently, this step allows an accurate estimation of the temperature of the permanent magnets. In addition, a faster increase in the temperature of the magnets is observed when the motor speed increases. On the other hand, the standard deviation the error of the magnet flux estimation decreases as the speed increases.

[0196] Then, from this temperature estimate, a second magnetic flux of the permanent magnets is determined according to an embodiment of step 5. Then, the difference is made between the first and second magnetic fluxes of the permanent magnets. A threshold S is further determined as a function of the standard deviations in accordance with an embodiment of step 6. [Fig.8] illustrates the difference between the two magnetic flux estimates AO in % as a function of time T in s, as well as the threshold S. AO must be between -S and +S. When AO leaves this envelope, demagnetization is observed. It is noted that from 42s, the comparison AO becomes greater than the threshold S, and at this instant a demagnetization of the permanent magnets is detected.< / e> < / e>

Claims

Claims

1. Method for detecting demagnetization of a plurality of permanent magnets equipping a rotor of an electrical machine, said electrical machine comprising a stator provided with a winding and said rotor provided with said plurality of permanent magnets, characterized in that the following steps are implemented: a. Currents and voltages in phases of said winding of said stator are acquired (ACQ), as well as the position and / or rotational speed of said rotor; b. A temperature of said winding and / or a temperature of said stator is acquired (ACQ); c. A first magnetic flux of said permanent magnets and a first standard deviation of said first magnetic flux are determined by applying at least one Kalman filter to a magnetic flux model (MFM) of said electrical machine, said magnetic flux model being applied to the acquired currents and voltages and to the acquired position or rotational speed of the rotor; d. A temperature of said permanent magnets and a standard deviation of said temperature of said permanent magnets are determined by applying a Kalman filter to a thermal model (MTH) of said electrical machine, said thermal model of said electrical machine being applied to the acquired currents, to the acquired position or speed of the rotor and to the acquired temperature of said acquired winding or of said stator; e. A second magnetic flux of said permanent magnets and a second standard deviation of said second magnetic flux of said permanent magnets are determined by a magnetothermal model (MTM) of said permanent magnets from said determined temperature of said permanent magnets; and f. Said first magnetic flux is compared (COMP) with said second magnetic flux, and a demagnetization (Dem) of said permanent magnets is detected if the absolute value of said comparison is greater than a threshold dependent on said first and second standard deviations of magnetic flux of said permanent magnets.

2. A method of detecting demagnetization according to claim 1, wherein said magnetic flux model of said electrical machine is composed of a stator magnetic flux model (MFS) and a magnetic flux model of said permanent magnets (MFA).

3. A method for detecting demagnetization according to claim 2, wherein said first magnetic flux of said permanent magnets, and said first standard deviation of the magnetic flux of said permanent magnets are determined by applying a linear Kalman filter to said magnetic flux model of said permanent magnets, said magnetic flux model of said permanent magnets (MFA) being applied to the acquired currents and voltages and to the acquired rotor position or rotational speed, as well as to the magnetic flux of said stator determined by an unscented Kalman filter applied to said stator magnetic flux model (MFS).

4. A method for detecting demagnetization according to one of claims 2 or 3, wherein said stator magnetic flux model (MFS) is defined by a state model with a state equation of the form:X = A(w)X + uwith / ^d'^d V x= W \ _ ( 0 co \ and a measurement equation of the form: \ 0 / v _ f / va washed / L1 and / fd\, ¢,- 4(, being the stator magnetic flux in the Park frame, Vd, Vqthe voltages in the stator phases in the Park frame, respectively the forward voltage and the quadrature voltage, Id, Iqthe currents in the stator phases in the Park frame, respectively the forward current and the quadrature current, co the rotor rotation speed, 4>PM the first magnetic flux of the permanent magnets, R the resistance of the stator, fd, fqnonlinear functions linking the stator current components to the magnetic flux components in the Park frame.

5. A method for detecting demagnetization according to one of claims 2 to 4, wherein said permanent magnet magnetic flux model (MFA) is defined by a state model with a state equation of the form: (|) — () and a measurement equation y2 - w(j)pM + ( + RIq ) with V2 = Vq, (|>d being the magnetic flux of the direct stator in the Park frame, Vq the quadrature voltages in the phases of the stator in the Park frame, Iq the quadrature currents in the phases of the stator in the Park frame, co the rotation speed of the rotor, (j)pM the magnetic flux of the permanent magnets, R the resistance of the stator.

6. Method for detecting demagnetization according to one of the preceding claims, wherein said thermal model (MTH) is defined by a state model with an equation of the form: X = A(œ)X + Bu(t) and y = CX with X a vector of the temperatures of the different components of the electrical machine, u a vector of the Joule losses of the different components of the electrical machine and of the temperatures of the cooling components of the electrical machine, and y = Tec said acquired temperature, \ _ / 0 œ \, the matrix B is a function \ / \-œ 0 / of the phase current of the electrical machine and of the rotation speed of the rotor, and C the output matrix.

7. A method for detecting demagnetization according to one of the preceding claims, wherein said magnetothermal model (MMD is B) = (l -P(tPM-T0) ) ¢) ^TPM P j 'c second magnetic flux of the permanent magnets, the determined temperature of said permanent magnets, p a thermal coefficient of said permanent magnets, To an ambient temperature, (|>0 the magnetic flux of said permanent magnets at the ambient temperature To.

8. Method for detecting demagnetization according to one of the preceding claims, in which said threshold S is written S = K, a ax with K, a positive coefficient, preferably between 2 and 5 and preferably equal to 3, 0 representing the standard deviation, a the first magnetic flux of the permanent magnets, ^PM 0 ^TpM p ) 'C second magnetic flux of the permanent magnets.

9. Method for controlling and / or monitoring an electrical machine, said electrical machine comprising a stator provided with a winding and a rotor provided with a plurality of permanent magnets, characterized in that the following steps are implemented: a. Demagnetization of the permanent magnets is detected by means of the method for detecting demagnetization of the permanent magnets according to one of the preceding claims; and b. Said electrical machine is controlled and / or monitored (CON) based on the detection of demagnetization of the permanent magnets.

10. System for controlling and / or monitoring an electrical machine comprising an electrical machine and a controller for implementing the control and / or monitoring method according to claim 9.