The project *tuto_SPMSM_03* can be copied / pasted and renamed as *tuto_SPMSM_06_test* to define a sensitivity study on stator skew at partial load with imposed sinusoidal current.

The multi-slice skew modeling is activated with 5 slices with:

`Input.Simu.type_skew = 1;`

Input.Simu.Nskew_slices = 5;

The sensitivity analysis is activated:

`Input.Simu.type_sensitivity = 1;`

The design variable skew_rates (stator skew rate in stator slot pitch) is selected

`Input.Simu.names_var={'skew_rates';};`

As we want a continuous variable evenly taken in an interval as an input, one puts

`Input.Simu.types_var=[0]; % Continuous values`

Input.Simu.types_val=[0]; % Value in an interval

To make the skew rate in stator slot pitch vary between 0 and 2, the boundaries are defined as :

`Input.Simu.bds_contvar={[0 2]};`

To generate 20 different skew rate one defines

`Input.Simu.Nval_contvar=[20];`

The 20 values will be defined as a linespace of this interval:

`Input.Simu.type_sampling = 0;`

To look at the cogging torque, torque ripple and the maximum sound power level at variable speed (synthesized sonogram) one should specify

`Input.Simu.names_resp={'TemM_rip';'Tcog_rip';'LwrA_max'};`

With the GUI, all these parameters are set in Workflow Sensitivity/Optimization.

Once the calculation is finished, once can look at the results using plot_MS_all_resp_var.

As we have defined 3 response variables we can also visualize the cloud of points in 3D using plot_MS_resp3D.

One can see in particular that acoustic noise globally increase with torque ripple, but this is because the acoustic noise is dominated by the breathing mode of the machine (excitation wavenumber r=0), this is not true in general.

In this particular case a stator slot pitch skew reduces significantly the noise but it is not the optimal angle for torque ripple reduction.