**8. Conclusion**

86 MATLAB – A Fundamental Tool for Scientific Computing and Engineering Applications – Volume 1

it in the chosen solver to calculate numerically the equations governing the WRIM.

**Figure 18.** Use of ode45 solver to solve the differential equations system of the WRIM

precise operations such as the descendant sorting with "*descend*" function.

curves of the same variables for the different considered defaults.

resolution of de differential equations system governing the WRIM,

The differential equations system is established in the "*Diff\_Equa\_WRIM*" function.

One of the major strengths of Matlab is the matrix manipulation. With the amount of data in matrix form that we consider in this paper, this feature of the software allows us to treat easily and without complexity these data. Thus, for the ACP method, matrix manipulations are done by simple operations because all variables in Matlab are intrinsically represented by matrix forms. In addition, pre-programmed functions are available to perform some

And finally, Matlab offers a multitude of possibilities for graphic representations. At the end of the PCA process, the original data and those from the treatment are represented graphically. This allowed more comparative studies as well as quantitative and qualitative analysis of the entire device. A function was reserved to the automatic superposition of

To summarize, three major functions have been developed to carry out the approach:

"*ode45*" (Figure 18):

Pre-programmed solvers are available in the Matlab software to solve easily this type of equation. These pre-programmed functions (ode45, ode113 …) proposed by the software helped to solve correctly with scalable computation time by the number of data to be processed. We adopted "*ode45*", solver based on the Runge-Kutta 4, 5 numerical resolution method. After creating a function detailing the differential equation system, we have to use

The following extract lines of code illustrate the use of the pre-programmed function

PCA method based on residues analysis has been established and applied on WRIM diagnosis.

An accurate analytical model of the machine has been proposed and simulated to perform the healthy and faulted data for PCA approach need.

Several representations of nine state variables of the machine have been analyzed. For the temporal variation without PCA, the rotor current and the shaft rotational speed are the more affected by the considered fault type. The representations of the electromagnetic torque versus the shaft rotational speed in both with and without PCA approach show clearly the presence of defaults. Indeed, PCA method is interesting for all types of representation compared to some other signal processing types.

Simulation results show the efficiency of the detection but require a good choice of the number of principal components.
