mcb.PMSMSpeeds
Syntax
Description
returns milestone speeds for a permanent magnet synchronous motor (PMSM) with parameters
milestone_speeds = mcb.PMSMSpeeds(pmsm,inverter)pmsm and inverter with parameters inverter.
specifies options using one or more name-value arguments.milestone_speeds = mcb.PMSMSpeeds(pmsm,inverter,Name=Value)
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");
Get milestone speeds for the PMSM using the CVCP field-weakening control method.
milestone_speeds = mcb.PMSMSpeeds(pmsm,inverter,FWCMethod="cvcp")milestone_speeds =
5393
7008
8361Get 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");
Get d-axis and q-axis currents and electrical
speeds for the PMSM using the CVCP field-weakening control method by enabling
outputAll.
output = mcb.PMSMSpeeds(pmsm,inverter,FWCMethod="cvcp",outputAll=1)output =
1.0e+03 *
0 -0.0011 -0.0018
0.0018 0.0014 0.0003
2.2591 2.9355 3.5023Input 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.PMSMSpeeds(pmsm,inverter,FWCMethod="cvcp")
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.PMSMSpeeds(pmsm,inverter,FWCMethod="cvcp") uses
CVCP field-weakening method to compute the milestone speeds.
Data Types: char | string
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.PMSMSpeeds(pmsm,inverter,voltageEquation="approximate")
uses approximate voltage equations.
Data Types: char | string
Options to show verbose output when calculating the milestone speeds. Specify one of the following:
0— Do not show verbose output1— Show information about computed milestone speeds.2— Show information about computed milestone speeds and additional information about convergence of the Newton-Raphson solver.
Example: mcb.PMSMSpeeds(pmsm,inverter,verbose=1) shows
information about computed milestone speeds.
Data Types: int
Option to plot constraint curves in current space.
Example: mcb.PMSMSpeeds(pmsm,inverter,constraintCurves=0)
disables plotting constraint curves.
Data Types: logical
Option to output all current and speed values as a matrix of values in the format
[id; iq; we] where id and
iq are vectors of d-axis and
q-axis currents (in amperes), respectively, and
we is a vector of electrical speeds (in rpm).
Example: mcb.PMSMSpeeds(pmsm,inverter,outputAll=1) outputs
current and speed values as a matrix.
Data Types: logical
Output Arguments
If you disable outputAll:
Milestone speeds of PMSM (in rpm), returned as a vector.
If you enable outputAll:
d-axis and q-axis currents (in amperes) and electrical speeds (in rpm), returned as a matrix.
Version History
Introduced in R2022bThe function mcbPMSMSpeeds is now named
mcb.PMSMSpeeds.
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)