mcb.updateInverterParameters
Update inverter parameters for selected hardware and motor
Description
updates inverter parameters inverter = mcb.updateInverterParameters(motor,inverter,target)inverter for the specified inverter, motor,
and target processor.
The function updates the following fields of the inverter structure:
ADCGain— ADC gain factor scaled by SPIISenseVoltPerAmp— Current sensor voltage output per ampere of current (in V/A)ISenseMax— Maximum peak-neutral current that can be measured by current sensor (in amperes)SPI_Gain_Setting— SPI hex value encoding op-amp gain
Examples
Get parameters for your motor and inverter. This example uses a BLY171D PMSM and BoostXL-DRV8305 inverter.
pmsm = mcb.getPMSMParameters("BLY171D"); inverter = mcb.getInverterParameters("BoostXL-DRV8305")
inverter =
struct with fields:
model: 'BoostXL-DRV8305'
sn: 'INV_XXXX'
V_dc: 24
I_trip: 10
Rds_on: 0.0020
Rshunt: 0.0070
CtSensAOffset: 2295
CtSensBOffset: 2286
CtSensCOffset: 2295
ADCGain: 1
EnableLogic: 1
invertingAmp: 1
ISenseVref: 3.3000
ISenseVoltPerAmp: 0.0700
ISenseMax: 23.5714
R_board: 0.0043
CtSensOffsetMax: 2500
CtSensOffsetMin: 1500Populate a target processor structure with an ADC reference voltage.
target.ADC_Vref = 3.3000;
Update inverter parameters.
mcb.updateInverterParameters(pmsm,inverter,target)
ans =
struct with fields:
model: 'BoostXL-DRV8305'
sn: 'INV_XXXX'
V_dc: 24
I_trip: 10
Rds_on: 0.0020
Rshunt: 0.0070
CtSensAOffset: 2295
CtSensBOffset: 2286
CtSensCOffset: 2295
ADCGain: 4
EnableLogic: 1
invertingAmp: 1
ISenseVref: 3.3000
ISenseVoltPerAmp: 0.2800
ISenseMax: 5.8929
R_board: 0.0043
CtSensOffsetMax: 2500
CtSensOffsetMin: 1500
SPI_Gain_Setting: 20522The ADCGain, ISenseVoltPerAmp,
ISenseMax, and SPI_Gain_Setting fields have been
updated to reflect the target hardware and motor.
Input Arguments
Motor 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 doubleLq— q-axis stator winding inductance (in henries), specified as a doubleFluxPM— Permanent magnet flux (in webers), specified as a doublep— Number of pole pairs, specified as an integerRs— Stator resistance (in ohms), specified as a double
You can create a structure with lumped linear parameters using mcb.getPMSMParameters or mcb.getACIMParameters.
Alternatively, for PMSM topologies, specify non-linear 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 webers) 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
The structure can also contain the following optional field:
motorType— Type of motor, specified as one of the following:'ipmsm'— Interior PMSM'spmsm'— Surface PMSM'synrm'— SynRM'pmasynrm'— PMa-SynRM'acim'— ACIM
If you do not specify the motorType field, the function assumes an
interior PMSM.
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
Target processor parameters, specified as a struct. Specify the
structure with the following required field:
ADC_Vref— ADC reference voltage (in volts)
Other fields of this structure are not used by
mcb.updateInverterParameters.
Data Types: struct
Output Arguments
Inverter parameters, returned as a struct with the same fields as the input argument
inverter, with the following fields updated to reflect the target
hardware and motor:
ADCGain— ADC gain factor scaled by SPI, returned as a scalarISenseVoltPerAmp— Current sensor voltage output per ampere of current (in V/A), returned as a scalarISenseMax— Maximum peak-neutral current that can be measured by current sensor (in amperes), returned as a scalarSPI_Gain_Setting— SPI hex value encoding op-amp gain, returned as a scalar
Version History
Introduced in R2020aThe function mcb_updateInverterParameters is now named
mcb.updateInverterParameters.
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.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- 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)