Main Content

Generate Feed-Forward Flux Parameters

Using MathWorks tools, you can create lookup tables for an interior permanent magnet synchronous motor (PMSM) controller that characterizes the d-axis and q-axis flux as a function of d-axis and q-axis currents.

To generate the flux parameters for the Flux-Based PM Controller block, follow these workflow steps. The steps use example script VisualizeFluxSurface.m.

WorkflowDescription

Step 1: Load and Preprocess Data

Load and preprocess this nonlinear motor flux data from dynamometer testing or finite element analysis (FEA):

  • d- and q- axis current

  • d- and q- axis flux

  • Electromagnetic motor torque

Step 2: Generate Evenly Spaced Data

Use spline interpolation to generate evenly spaced data. Visualize the flux surface plots.

Step 3: Set Block Parameters

Set workspace variables that you can use for the Flux-Based PM Controller block parameters.

Step 1: Load and Preprocess Data

Load and preprocess this nonlinear motor flux data from dynamometer testing or finite element analysis (FEA):

  • d- and q- axis current

  • d- and q- axis flux

  • Electromagnetic motor torque

  1. Open the example script VisualizeFluxSurface.m.

  2. Load and preprocess the data.

    %
    % Load the data from a |mat| file captured from a dynamometer or 
    % another CAE tool.
    load FEAdata.mat;
    
    % Load the data matrix.
    lambda_d = FEAdata.flux.d;
    lambda_q = FEAdata.flux.q;
    id = FEAdata.current.d;
    iq = FEAdata.current.q;

Step 2: Generate Evenly Spaced Data

The flux tables and can have different step sizes for the currents. Evenly spacing the rows and columns helps improve interpolation accuracy. This script uses spline interpolation.

  1. Set the spacing for the table rows and columns.

    % Set the spacing for the table rows and columns 
    flux_d_size = 50;
    flux_q_size = 50;
    

  2. Use spline interpolation to get higher resolution.

    % Use spline interpolation to get higher resolution
    id_new = linspace(min(id),max(id),flux_d_size);
    iq_new = linspace(min(iq),max(iq),flux_q_size);
    lambda_d_new = interp2(id',iq,lambda_d,id_new',iq_new,'spline');
    lambda_q_new = interp2(id',iq,lambda_q,id_new',iq_new,'spline');
    

  3. Visualize the flux surfaces.

    % Visualize the flux surface
    figure;
    mesh(id_new,iq_new,lambda_d_new);
    xlabel('I_d [A]')
    ylabel('I_q [A]')
    title('\lambda_d'); grid on;
    
    figure;
    mesh(id_new,iq_new,lambda_q_new);
    xlabel('I_d [A]')
    ylabel('I_q [A]')
    title('\lambda_q'); grid on;

    • d-axis flux, λd, as a function of d-axis current, Id, and q-axis current, Iq.

    • q-axis flux, λq, as a function of d-axis current, Id, and q-axis current, Iq.

Step 3: Set Block Parameters

Set the block parameters to these values assigned in the example script.

ParameterMATLAB® Commands

Vector of d-axis current breakpoints, id_index

id_index=id_new;

Vector of q-axis current breakpoints, iq_index

iq_index=iq_new;
Corresponding d-axis flux, lambda_d
lambda_d=lambda_d_new;

Corresponding q-axis flux, lambda_q

lambda_q=lambda_q_new;

References

[1] Hu, Dakai, Yazan Alsmadi, and Longya Xu. “High fidelity nonlinear IPM modeling based on measured stator winding flux linkage.” IEEE® Transactions on Industry Applications, Vol. 51, No. 4, July/August 2015.

[2] Chen, Xiao, Jiabin Wang, Bhaskar Sen, Panagiotis Lasari, Tianfu Sun. “A High-Fidelity and Computationally Efficient Model for Interior Permanent-Magnet Machines Considering the Magnetic Saturation, Spatial Harmonics, and Iron Loss Effect.” IEEE Transactions on Industrial Electronics, Vol. 62, No. 7, July 2015.

[3] Ottosson, J., M. Alakula. “A compact field weakening controller implementation.” International Symposium on Power Electronics, Electrical Drives, Automation and Motion, July, 2006.

See Also

|