mcb.calcPMSMVdVq
Calculate d and q axis voltages from PMSM parameters, operating currents, and electric speed
Since R2022b
Description
Examples
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.2791Input Arguments
PMSM parameters, specified as a struct.
Specify lumped linear parameters with the following required fields:
Ld— d-axis stator winding inductance (in henries), specified as a scalarLq— q-axis stator winding inductance (in henries), specified as a scalarFluxPM— Permanent magnet flux linkage (in webers), specified as a scalarp— Number of pole pairs, specified as a scalarRs— Stator resistance (in ohms), specified as a scalarB— Viscous damping coefficient (in kg-m2/ sec), specified as a scalarI_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.idvec— d-axis current breakpoints (in amperes) of lookup tables, specified as a vectorPMSMLUT.iqvec— q-axis current breakpoints (in amperes) of lookup tables, specified as a vectorPMSMLUT.LdTable— d-axis inductance (in henries) lookup table, specified as matrixPMSMLUT.LqTable— q-axis inductance (in henries) lookup table, specified as a matrixPMSMLUT.FluxPMTable— Permanent magnet flux linkage (in weber) lookup table, specified as a matrix
or the following required fields:
PMSMLUT.idvec— d-axis current breakpoints (in amperes) of lookup tables, specified as a vectorPMSMLUT.iqvec— q-axis current breakpoints (in amperes) of lookup tables, specified as a vectorPMSMLUT.FluxDTable— d-axis flux linkage lookup table, specified as a matrixPMSMLUT.FluxQTable— q-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 vectorsn— Manufacturer's serial number, specified as a character vectorJ— Motor inertia coefficient (in kg-m2), specified as a scalarKe— Back EMF constant (in volts/krpm), specified as a scalarKt— Torque constant (in Nm/amperes), specified as a scalarN_max— Maximum rotor speed (in rpm), specified as a scalarPositionOffset— Rotor position offset (in PU), specified as a scalarQEPSlits— Number of quadrature encoder pulse (QEP) slits, specified as a scalarT_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:
idVec— d-axis current (in amperes) valuesiqVec— q-axis current (in amperes) valuesLdTable— d-axis inductance (in henries) lookup tableLqTable— q-axis inductance (in henries) lookup tableFluxPMTable— Permanent magnet flux linkage (in weber) lookup tableFluxDTable— d-axis flux linkage (in webers) lookup tableFluxQTable— q-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 withLdTable,LqTable, andFluxPMTablelookup table parameters.2— Use non-linear model withFluxDTableandFluxQTablelookup table parameters.
Data Types: int
Motor electrical speed (in rad/s), specified as a scalar.
Data Types: double
Output Arguments
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 R2022bThe function mcbPMSMCalcVdVq is now named
mcb.calcPMSMVdVq.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)