mcb.PMSMCharacteristics
Syntax
Description
computes and plots drive characteristics and constraint curves for a permanent magnet
synchronous motor (PMSM) with parameters characteristics = mcb.PMSMCharacteristics(pmsm,inverter)pmsm and inverter with
parameters inverter.
specifies options using one or more name-value arguments. For example, to plot drive
characteristics in addition to constraint curves, set
characteristics = mcb.PMSMCharacteristics(pmsm,inverter,Name=Value)driveCharacteristics to 1.
The function plots the current limit curve, constant torque curve, MTPA curve, voltage limit curve, and MTPV curve in current and voltage space. When enabled, the function also plots torque-speed, power-speed, current-speed, and peak current-speed drive characteristics. For details, see PMSM Constraint Curves and Their Application and PMSM Drive Characteristics and Constraint Curves.
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");
Plot constraint curves and characteristic curves and assign the data to a variable.
characteristics = mcb.PMSMCharacteristics(pmsm,inverter,driveCharacteristics=1)
characteristics =
struct with fields:
current: [1×1 struct]
torque: [1×1 struct]
mtpa: [1×1 struct]
voltage: [1×1 struct]
mtpv: [1×1 struct]
idArray: [0 0 0 0 -0.0739 -0.1455 -0.2126 -0.2767 -0.3388 -0.3974 -0.4534 -0.5079 -0.5594 -0.6089 -0.6571 -0.7028 -0.7467 -0.7896 … ] (1×64 double)
iqArray: [1.8000 1.8000 1.8000 1.8000 1.7985 1.7941 1.7874 1.7786 1.7678 1.7556 1.7420 1.7268 1.7109 1.6939 1.6758 1.6571 1.6378 1.6176 … ] (1×64 double)
vdArray: [-7.9168e-04 -1.4234 -2.8469 -4.2695 -4.3736 -4.4696 -4.5555 -4.6336 -4.7055 -4.7695 -4.8274 -4.8803 -4.9269 -4.9684 -5.0057 … ] (1×64 double)
vqArray: [1.3522 5.2947 9.2394 13.1819 13.1481 13.1157 13.0861 13.0587 13.0330 13.0097 12.9883 12.9685 12.9509 12.9350 12.9206 12.9081 … ] (1×64 double)
wArray: [1 1798 3596 5393 5459 5526 5592 5658 5725 5791 5857 5924 5990 6056 6123 6189 6255 6322 6388 6454 6521 6587 6653 6720 6786 … ] (1×64 double)
TArray: [0.0566 0.0566 0.0566 0.0566 0.0565 0.0564 0.0562 0.0559 0.0556 0.0552 0.0547 0.0543 0.0538 0.0532 0.0527 0.0521 0.0515 0.0508 … ] (1×64 double)
PArray: [0.0059 10.6507 21.3013 31.9460 32.3097 32.6268 32.8930 33.1175 33.3065 33.4574 33.5758 33.6653 33.7251 33.7585 33.7670 … ] (1×64 double)
pmsm: [1×1 struct]
inverter: [1×1 struct]
FWCMethod: 'vclmt'
voltageEquation: 'actual'
speed_milestone: [2×1 double]
id_milestone: [0 -1.7631]
iq_milestone: [1.8000 0.3624]


Input 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
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
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.PMSMCharacteristics(pmsm,inverter,driveCharacteristics=1)
Voltage equations for calculating base speed, specified as a character vector or string. Specify one of the following:
"actual"— Use actual voltage equations."approximate"— Use approximate voltage equations.
Example: mcb.PMSMCharacteristics(pmsm,inverter,voltageEquation="approximate")
uses approximate voltage equations.
Data Types: char | string
Motor speed (in rpm), specified as a scalar. If you do not specify a motor speed, the function uses the maximum motor speed.
Example: mcb.PMSMCharacteristics(pmsm,inverter,speed=5298) uses
a motor speed of 5298 rpm.
Data Types: double
Load torque (in Nm), specified as a scalar. If you do not specify a load torque, the function uses zero torque.
Example: mcb.PMSMCharacteristics(pmsm,inverter,torque=10) uses a
load torque of 10 Nm.
Data Types: double
Option for plotting drive characteristics and constraint curves, specified as one of:
0— Do not plot drive characteristics. Plot constraint curves in current space.1— Plot drive characteristics. Plot constraint curves in current space.2— Plot drive characteristics. Plot constraint curves in current space and trajectory of operating points in voltage space.
Example: mcb.PMSMCharacteristics(pmsm,inverter,driveCharacteristics=1)
plots drive characteristics and plots constraint curves in current
space.
Option to plot constraint curves after computing characteristics, specified as a
numeric or logical 1 (true) or
0 (false).
Example: mcb.PMSMCharacteristics(pmsm,inverter,constraintCurves=0)
disables plotting constraint curves.
Field-weakening control method, specified as a character vector or string. Specify one of the following:
"vclmt"— Use voltage and current limited maximum torque (VCLMT) method."none"— Do not use field-weakening control."cvcp"— Use constant voltage constant power (CVCP) method."cccp"— Use constant current constant power (CCCP) method.
Example: mcb.PMSMCharacteristics(pmsm,inverter,FWCMethod="cvcp")
uses CVCP field-weakening method to compute characteristics.
Data Types: char | string
Opacity of the plotted curves. Specify a value greater than 0
and less than or equal to 1.
Example: mcb.PMSMCharacteristics(pmsm,inverter,opacity=0.5)
plots half-opaque curves.
Data Types: double
Maximum motor current (in amperes), specified as a scalar. If the specified value is greater than the rated current, the function also plots the torque-speed characteristics using the maximum current.
Example: mcb.PMSMCharacteristics(pmsm,inverter,imax=10)
specifies a maximum current of 10 amperes.
Data Types: double
External d- and q-axis currents (in amperes), specified as a matrix of dimensions N-by-2, where N is the number of current samples. The function plots the specified currents on top of the constraint curves in current space.
Example: mcb.PMSMCharacteristics(pmsm,inverter,idqExternal=idqMat)
plots external currents from the matrix idqMat.
Data Types: double
Output Arguments
Raw data for PMSM characteristic curves, returned as a struct
with the following fields:
current— d- and q-axis current coordinates (in amperes) of current limit curve, returned as astructtorque— d- and q-axis current coordinates (in amperes) of constant torque curve, returned as astructmtpa— d- and q-axis current coordinates (in amperes) of MTPA curve, returned as astructvoltage— d- and q-axis current coordinates (in amperes) of voltage limit curve, returned as astructmtpv— d- and q-axis current coordinates (in amperes) of MTPV curve, returned as astructidArray— d-axis current values (in amperes) at which to compute constraint curves, returned as a vectoriqArray— q-axis current values (in amperes) at which to compute constraint curves, returned as a vectorvdArray— d-axis voltage values (in volts) at which to compute constraint curves, returned as a vectorvqArray— q-axis voltage values (in volts) at which to compute constraint curves, returned as a vectorwArray— Speed values (in rpm) at which to compute drive characteristics, returned as a vectorTArray— Torque values (in newton-meters) of drive characteristics, returned as a vectorPArray— Power values (in watts) of drive characteristics, returned as a vectorpmsm— PMSM parameters, returned as astructinverter— Inverter parameters, returned as astructFWCMethod— Field-weakening control method, returned as a character vectorvoltageEquation— Voltage equation for calculating speed, returned as a character vectorspeed_milestone— Milestone motor speed (in rpm), returned as a vectorid_milestone— Milestone d-axis current (in amperes), returned as a vectoriq_milestone— Milestone q-axis current (in amperes), returned as a vector
Version History
Introduced in R2022bThe function mcb_getCharacteristics is now named
mcb.PMSMCharacteristics.
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)