mcb.generateMotorLUT
Description
returns lookup tables (LUTs) of parameters for a motor with parameters
outSt = mcb.generateMotorLUT(motor,inverter,purpose)motor.
Use the purpose argument to specify the type of lookup table.
"Star2Star"or"Star2Delta"— Generate lookup tables that you can use for FEM parameterized plant models for a permanent magnet synchronous motor (PMSM)."idiqLUTs"or related options — Generate 2D reference current lookup tables i(T,w) or i(w,T) as a function of torque T and motor speed w."idiq3dLUTs"or related options — Generate 3D reference current lookup tables i(w,T,v) or i(T,w,v) as a function of torque T, motor speed w, and DC voltage v.
For reference current lookup tables, input nonlinear lookup table parameters using the
optional PMSMLUT field of the motor argument.
Specify the lookup table generation method using the PMSMLUT.method field:
"lumped"— Use linear model with lumped parameters for Ld, Lq, andFluxPM."Ldq"— Use nonlinear model with Ld, Lq, andFluxPMLUTs."FluxDQ"— Use nonlinear model with d-axis and q-axis flux linkage LUTs.
If you do not specify the PMSMLUT or
PMSMLUT.method field, the function assumes linear lumped
parameters.
Use the generated lookup tables to characterize the linear or non-linear behavior of your motor. For instance, use reference current lookup tables as inputs to an LUT based PMSM Control Reference, LUT based ACIM Control Reference, or LUT based SynRM Control Reference block. For an example involving a PMSM, see Determine Nonlinear Behavior of PMSM Using Characterization Test Data.
Examples
Get parameters for your motor and inverter. This example uses a BLY171D PMSM and DRV8312-C2-KIT inverter.
pmsm = mcb.getPMSMParameters("BLY171D"); inverter = mcb.getInverterParameters("DRV8312-C2-KIT");
Generate lookup tables for a star-to-delta FEM PMSM plant model.
mcb.generateMotorLUT(pmsm,inverter,"Star2Delta")ans =
struct with fields:
idVec: [-1.8000 -0.9000 0 0.9000 1.8000]
iqVec: [-1.8000 -0.9000 0 0.9000 1.8000]
degVec: [0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30]
windingType: 'star'
fluxD: [5×5×16 double]
fluxQ: [5×5×16 double]
Torq: [5×5×16 double]
Rs: 0.7500Get lumped parameters for your motor and inverter. This example uses a BLY171D PMSM and DRV8312-C2-KIT inverter.
pmsm = mcb.getPMSMParameters("BLY171D"); inverter = mcb.getInverterParameters("DRV8312-C2-KIT");
Generate 2D reference current lookup tables, and draw their values in current space.
mcb.generateMotorLUT(pmsm,inverter,"idiqLUTs",drawLUT=1)ans =
struct with fields:
drawLUTonConstraintCurves: 0
FWCMethod: 'vclmt'
motorType: 'spmsm'
wrpmVec: [1 150 299 447 596 745 894 1042 1191 1340 1489 1637 1786 1935 2084 2232 2381 2530 2679 2827 2976 3125 3274 3423 3571 … ] (1×64 double)
trefVec: [-0.0566 -0.0509 -0.0453 -0.0396 -0.0339 -0.0283 -0.0226 -0.0170 -0.0113 -0.0057 0 0.0057 0.0113 0.0170 0.0226 … ] (1×21 double)
idTable: [21×64 double]
iqTable: [21×64 double]
idqformat: 'Tw'
Get lumped parameters for your motor and inverter. This example uses a Teknic2310P PMSM and BoostXL-DRV8305 inverter.
pmsm = mcb.getPMSMParameters("Teknic2310P"); inverter = mcb.getInverterParameters("BoostXL-DRV8305");
Populate the pmsm.PMSMLUT structure with inductance flux data
from a nonlinear model.
pmsm.PMSMLUT.method = "Ldq";
pmsm.PMSMLUT.idVec = [-4,-2,0,2] * pmsm.I_rated;
pmsm.PMSMLUT.iqVec = [-4,-2,0,2,4] * pmsm.I_rated;
pmsm.PMSMLUT.LdTable = pmsm.Ld * ones(4,5);
pmsm.PMSMLUT.LqTable = pmsm.Lq * ones(4,5);
pmsm.PMSMLUT.FluxPMTable = pmsm.FluxPM * ones(4,5);Generate 2D reference current lookup tables, then draw their values in current space.
mcb.generateMotorLUT(pmsm,inverter,"idiqLUTs",drawLUT=1)ans =
struct with fields:
method: 'Ldq'
idVec: [-28.4000 -14.2000 0 14.2000]
iqVec: [-28.4000 -14.2000 0 14.2000 28.4000]
LdTable: [4×5 double]
LqTable: [4×5 double]
FluxPMTable: [4×5 double]
FWCMethod: 'vclmt'
motorType: 'spmsm'
wrpmVec: [1 105 208 312 415 519 622 726 829 933 1036 1140 1243 1347 1450 1554 1657 1761 1865 1968 2072 2175 2279 2382 2486 2589 2693 2796 2900 … ] (1×64 double)
trefVec: [-0.2724 -0.2452 -0.2180 -0.1907 -0.1635 -0.1362 -0.1090 -0.0817 -0.0545 -0.0272 0 0.0272 0.0545 0.0817 0.1090 0.1362 0.1635 0.1907 … ] (1×21 double)
idTable: [21×64 double]
iqTable: [21×64 double]
idqformat: 'Tw'
Input Arguments
Motor parameters, specified as a struct.
To specify lumped linear parameters, set the PMSMLUT.method field
to lumped or leave PMSMLUT.method unset. Specify
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
To specify Ld,
Lq, and FluxPM lookup
tables from a nonlinear model, set PMSMLUT.method to
Ldq. Specify 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
To specify d-axis and q-axis flux linkage
lookup tables from a nonlinear model, set PMSMLUT.method to
FluxDQ. Specify 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
Additionally, PMSMLUT can contain the following optional fields:
PMSMLUT.FWCMethod— Field-weakening control method, specified as a character vector. If you do not specify this field, the function assumes'vclmt'.PMSMLUT.trefVec— Reference torque values (in newton-meters), specified as a vectorPMSMLUT.trefPctVec— Reference torque values (as percentage of rated torque), specified as a vectorPMSMLUT.Tenvelope— Envelope of torque-speed characteristics, specified as a vectorPMSMLUT.TenvelopeNeg— Envelope of negative torque-speed characteristics, specified as a vectorPMSMLUT.vdcVec— DC voltage values (in volts) for variable voltage system, specified as a vectorPMSMLUT.wrpmVec— Speed values (in rpm) of lookup table, specified as a vector
Data Types: struct
Inverter parameters, specified as a struct. You can create this
structure using mcb.getInverterParameters. Specify the structure with the following
required field:
V_dc— DC voltage
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 vectorI_trip— Maximum permissible inverter current (in amperes), specified as a scalarRds_on— On-state resistance of MOSFETs (in ohms), specified as a scalarRshunt— Shunt resistance for current sensing (in ohms), specified as a scalarR_board— Per-phase board resistance seen by motor (in ohms), specified as a scalarCtSensAOffset— ADC offset for phase A, specified as a scalarCtSensBOffset— ADC offset for phase B, specified as a scalarCtSensCOffset— ADC offset for phase C, specified as a scalarCtSensOffsetMax— Maximum limit of automatically calibrated ADC offsets for current sensor, specified as a scalarCtSensOffsetMin— Minimum limit of automatically calibrated ADC offsets for current sensor, specified as a scalarADCGain— ADC gain factor scaled by SPI, specified as a scalarEnableLogic— Type of inverter, specified as one of the following:1 — Active-high enabled inverter
0 — Active-low enabled inverter
invertingAmp— Convention for current entering motor, specified as one of the following:1 — Current entering motor sensed as positive by current sense amplifier
–1 — Current entering motor sensed as negative by current sense amplifier
ISenseVref— Reference voltage of current sensor circuit (in volts), specified as a scalarISenseVoltPerAmp— Current sensor voltage output per ampere of current (in V/A), specified as a scalarISenseMax— Maximum peak-neutral current that can be measured by current sensor (in amperes), specified as a scalar
The following optional fields are not in the structure you create with
mcb.getInverterParameters:
ADCOffsetCalibEnable— Auto-calibration setting for current sense ADCs, specified as one of the following:1 — Enable auto-calibration
0 — Disable auto-calibration
SPI_Gain_Setting— SPI hex value encoding op-amp gain, specified as a scalar
Data Types: struct
Type of lookup tables to generate, specified as a character vector or string.
Use this argument to specify whether to generate lookup tables for FEM plant models or for reference currents. For reference currents, this argument also determines whether to generate 2D lookup tables as a function of torque T and motor speed w, or 3D lookup tables as a function of T, w, and DC voltage v. Specify one of the following:
"Star2Star"— Generate lookup tables for use in star-to-star FEM parameterized PMSM plant models. The generated lookup tables contain the star-equivalent of motor parametersfluxD,fluxQ,Torq, andRs."Star2Delta"— Generate lookup tables for use in star-to-delta FEM PMSM plant models. The generated lookup tables contain the delta-equivalent of motor parametersfluxD,fluxQ,Torq, andRs."idiqLUTsinit"— Generate default d-axis and q-axis current lookup tables i(T,w) based on PMSM and inverter parameters."idiqLUTs"— Generate d-axis and q-axis current lookup tables i(T,w) based on PMSM and inverter parameters."idiqLUTsTw"— Same as"idiqLUTs"."idiqLUTswT"— Generate d-axis and q-axis current lookup tables i(w,T) based on PMSM and inverter parameters."idiq3dLUTsinit"— Generate default d-axis and q-axis current lookup tables i(T,w,v) based on PMSM and inverter parameters."idiq3dLUTs"— Generate d-axis and q-axis current lookup tables i(T,w,v) based on PMSM and inverter parameters."idiq3dLUTsTwv"— Same as"idiq3dLUTs"."idiq3dLUTswTv"— Generate d-axis and q-axis current lookup tables i(w,T,v) based on PMSM and inverter parameters.
Data Types: char | string
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN, where Name is
the argument name and Value is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Example: mcb.generateMotorLUT(pmsm,inverter,"idiqLUTs",useTorquePercent=1)
Option to compute d-axis and q-axis lookup
tables using the torque percentage grid, as defined in the optional field
pmsm.PMSMLUT.trefPctVec.
When you enable this option, you must provide the envelope of torque-speed
characteristics using the field pmsm.PMSMLUT.Tenvelope, and the
corresponding speed values in the field
pmsm.PMSMLUT.wrpmVec.
Example: mcb.generateMotorLUT(pmsm,inverter,'idiqLUTs',useTorquePercent=1)
computes d-axis and q-axis current LUTs using
the torque percentage grid.
Option to plot the lookup table data. Specify one of the following:
0— Do not plot lookup table1— Plot lookup table2— Plot lookup table and torque and voltage limit contours6— Plot lookup table and torque and voltage limit contours with rotated d-q axis reference current frame for synchronous reluctance motors or inductance motors.
Example: mcb.generateMotorLUT(pmsm,inverter,'idiqLUTs',drawLUT=1)
draws the values of the d- and q-axis current
lookup tables.
Option to show verbose output when generating the lookup tables, specified as a
numeric or logical 1 (true) or
0 (false).
Example: mcb.generateMotorLUT(pmsm,inverter,'idiqLUTs',verbose=1)
enables verbose output.
Option to show a progress bar when generating the lookup tables, specified as a
numeric or logical 1 (true) or
0 (false).
Example: mcb.generateMotorLUT(pmsm,inverter,'idiqLUTs',showProgress=0)
disables the progress bar.
Output Arguments
Lookup table data, returned as a struct.
If purpose is "Star2Star" or
"Star2Delta", the structure contains the following fields:
idVec— d-axis current breakpoints (in amperes) of lookup tables, returned as a vectoriqVec— q-axis current breakpoints (in amperes) of lookup tables, returned as a vectordegVec— Position breakpoints (in degrees) of lookup tables, returned as a vectorwindingType— Type of motor winding, returned as one of the following:'star'— Star winding'delta'— Delta winding
fluxD— d-axis flux (in webers) lookup table, returned as a matrixfluxQ— q-axis flux (in webers) lookup table, returned as a matrixTorq— Torque (in newton-meters) lookup table, returned as a matrixRs— Stator resistance (in ohms), returned as a scalar
If purpose is "idiqLUTs",
"idiq3dLUTs", or related options, the structure contains the
following possible fields:
method— Lookup table generation methodidVec— d-axis current breakpoints (in amperes) of input lookup tables, returned as a vectoriqVec— q-axis current breakpoints (in amperes) of input lookup tables, returned as a vectorLdTable— d-axis inductance (in henries) input lookup tables, returned as a matrixLqTable— q-axis inductance (in henries) input lookup tables, returned as a matrixFluxPMTable— Permanent magnet flux linkage (in webers) input lookup tables, returned as a matrixFluxDTable— d-axis flux (in webers) input lookup tables, returned as a matrixFluxQTable— q-axis flux (in webers) input lookup tables, returned as a matrixvdcVec— DC voltage breakpoints (in volts) of output lookup tables, returned as a vectorFWCMethod— Field-weakening method, returned as a character vectormotorType— Type of motor, returned as a character vectorwrpmVec— Motor speed breakpoints (in rpm) of output lookup tables, returned as a vectortrefVec— Reference torque breakpoints (in newton-meters) of output lookup tables, returned as a vectoridTable— d-axis current (in amperes) lookup table, returned as a matrixiqTable— q-axis current (in amperes) lookup table, returned as a matrixidqformat— Format of reference current lookup table, returned as one of the following, where T, w, and v are torque, motor speed, and DC voltage respectively:'Tw'— Lookup tables returned as i(T,w)'wT'— Lookup tables returned as i(w,T)'wTv'— Lookup tables returned as i(w,T,v)'Twv'— Lookup tables returned as i(T,w,v)
If purpose is "idiqLUTsinit" or
"idiq3dLUTsinit", the structure contains the following fields:
trefVec— Reference torques (in Nm), returned as a vectortrefPctVec— Reference torques (as percentage of rated torque), returned as a vectorTenvelope— Envelope of torque-speed characteristics, returned as a vectorTenvelopeNeg— Envelope of negative torque-speed characteristics, returned as a vectorwrpmVec— Motor speed breakpoints (in rpm) of lookup tables, returned as a vectoridTable— d-axis current (in amperes) lookup table, returned as a matrixiqTable— q-axis current (in amperes) lookup table, returned as a matrix
Version History
Introduced in R2022bThe function mcbGenerateTables is now named
mcb.generateMotorLUT.
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.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- 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)