メインコンテンツ

mcb.calcPMSMVdVq

Calculate d and q axis voltages from PMSM parameters, operating currents, and electric speed

Since R2022b

    Description

    [vd,vq,vs] = mcb.calcPMSMVdVq(pmsm,ParamTableData,id,iq,goLUT,we) computes d-axis, q-axis, and source voltages for a permanent magnet synchronous motor (PMSM) with parameters pmsm, operating currents id and iq, and electric speed we.

    example

    Examples

    collapse all

    Get parameters for your motor. This example uses a BLY171D PMSM.

    pmsm = mcb.getPMSMParameters("BLY171D");

    Populate the ParamTableData structure with inductance and flux data from a non-linear model.

    ParamTableData.method = 'Ldq';
    ParamTableData.idVec = [-4,-2,0,2] * pmsm.I_rated;
    ParamTableData.iqVec = [-4,-2,0,2,4] * pmsm.I_rated;
    ParamTableData.LdTable = pmsm.Ld * ones(4,5);
    ParamTableData.LqTable = pmsm.Lq * ones(4,5);
    ParamTableData.FluxPMTable = pmsm.FluxPM * ones(4,5);

    Specify additional parameters.

    goLUT = 1;
    we = 200;
    id = 0;
    iq = 0;

    Get voltage data for the PMSM.

    [vd,vq,vs] = mcb.calcPMSMVdVq(pmsm,ParamTableData,id,iq,goLUT,we)
    vd =
    
         0
    
    
    vq =
    
        1.2791
    
    
    vs =
    
        1.2791

    Input Arguments

    collapse all

    PMSM parameters, specified as a struct.

    Specify lumped linear parameters with the following required fields:

    • Ldd-axis stator winding inductance (in henries), specified as a scalar

    • Lqq-axis stator winding inductance (in henries), specified as a scalar

    • FluxPM — Permanent magnet flux linkage (in webers), specified as a scalar

    • p — Number of pole pairs, specified as a scalar

    • Rs — Stator resistance (in ohms), specified as a scalar

    • B — Viscous damping coefficient (in kg-m2/ sec), specified as a scalar

    • I_rated — Rated current (in amperes), specified as a scalar

    You can create a structure with lumped linear parameters using mcb.getPMSMParameters.

    Alternatively, specify nonlinear lookup table data with the following required fields:

    • PMSMLUT.idvecd-axis current breakpoints (in amperes) of lookup tables, specified as a vector

    • PMSMLUT.iqvecq-axis current breakpoints (in amperes) of lookup tables, specified as a vector

    • PMSMLUT.LdTabled-axis inductance (in henries) lookup table, specified as matrix

    • PMSMLUT.LqTableq-axis inductance (in henries) lookup table, specified as a matrix

    • PMSMLUT.FluxPMTable — Permanent magnet flux linkage (in weber) lookup table, specified as a matrix

    or the following required fields:

    • PMSMLUT.idvecd-axis current breakpoints (in amperes) of lookup tables, specified as a vector

    • PMSMLUT.iqvecq-axis current breakpoints (in amperes) of lookup tables, specified as a vector

    • PMSMLUT.FluxDTabled-axis flux linkage lookup table, specified as a matrix

    • PMSMLUT.FluxQTableq-axis flux linkage lookup table, specified as a matrix

    Whether you specify lumped parameters or lookup tables, the structure can also contain the following optional fields:

    • model — Manufacturer's model number, specified as a character vector

    • sn — Manufacturer's serial number, specified as a character vector

    • J — Motor inertia coefficient (in kg-m2), specified as a scalar

    • Ke — Back EMF constant (in volts/krpm), specified as a scalar

    • Kt — Torque constant (in Nm/amperes), specified as a scalar

    • N_max — Maximum rotor speed (in rpm), specified as a scalar

    • PositionOffset — Rotor position offset (in PU), specified as a scalar

    • QEPSlits — Number of quadrature encoder pulse (QEP) slits, specified as a scalar

    • T_rated — Rated torque (in Nm), specified as a scalar

    Data Types: struct

    Data for parameter lookup tables, specified as a struct with the following fields:

    • idVecd-axis current (in amperes) values

    • iqVecq-axis current (in amperes) values

    • LdTabled-axis inductance (in henries) lookup table

    • LqTableq-axis inductance (in henries) lookup table

    • FluxPMTable — Permanent magnet flux linkage (in weber) lookup table

    • FluxDTabled-axis flux linkage (in webers) lookup table

    • FluxQTableq-axis flux linkage (in webers) lookup table

    Use the goLUT argument to specify the type of lookup table that the function uses for calculations.

    Data Types: double

    d-axis current (in amperes) at which to calculate voltages, specified as a scalar.

    Data Types: double

    q-axis current (in amperes) at which to calculate voltages, specified as a scalar.

    Data Types: double

    Option to use nonlinear lookup table parameters for calculations. Specify one of the following:

    • 0 — Use linear model with lumped parameters.

    • 1 — Use non-linear model with LdTable, LqTable, and FluxPMTable lookup table parameters.

    • 2 — Use non-linear model with FluxDTable and FluxQTable lookup table parameters.

    Data Types: int

    Motor electrical speed (in rad/s), specified as a scalar.

    Data Types: double

    Output Arguments

    collapse all

    d-axis voltage (in volts), returned as a scalar.

    q-axis voltage (in volts), returned as a scalar.

    Source voltage (in volts), returned as a scalar.

    Version History

    Introduced in R2022b

    expand all