Main Content

Mapped Motor

Mapped motor and drive electronics operating in torque-control mode

  • Mapped Motor block

Libraries:
Powertrain Blockset / Propulsion / Electric Motors and Inverters
Vehicle Dynamics Blockset / Powertrain / Propulsion

Description

TheMapped Motorblock implements a mapped motor and drive electronics operating in torque-control mode. The output torque tracks the torque reference demand and includes a motor-response and drive-response time constant. Use the block for fast system-level simulations when you do not know detailed motor parameters, for example, for motor power and torque tradeoff studies. The block assumes that the speed fluctuations due to mechanical load do not affect the motor torque tracking.

You can specify:

  • Port configuration — Input torque or speed.

  • Electrical torque range — Torque speed envelope or maximum motor power and torque.

  • Electrical loss — Single operating point, measured efficiency, or measured loss. If you have Model-Based Calibration Toolbox™, you can virtually calibrate the measured loss tables.

Electrical Torque

To specify the range of torque and speed that the block allows, on theElectrical Torquetab, forParametrized by, select one of these options.

Setting Block Implementation
Tabulated torque-speed envelope

Range specified as a set of speed data points and corresponding maximum torque values.

Maximum torque and power

Range specified with maximum torque and maximum power.

For either method, the block implements an envelope similar to this.

Plot of torque versus speed indicating permissible steady-state operation

Electrical Losses

To specify the electrical losses, on theElectrical Lossestab, forParameterize losses by, select one of these options.

Setting Block Implementation
Single efficiency measurement

Sum of these terms, measured at a single measurement point:

  • 固定的损失dependent of torque and speed,P0. UseP0to account for fixed converter losses.

  • A torque-dependent electrical losskτ2, wherekis a constant andτis the torque. Represents ohmic losses in the copper windings.

  • A speed-dependent electrical losskwω2, wherekwis a constant andωis the speed. Represents iron losses due to eddy currents.

Tabulated loss data

Loss lookup table that is a function of motor speeds and load torques.

If you have Model-Based Calibration Toolbox, clickCalibrate Mapsto virtually calibrate the 2D lookup tables using measured data.

Tabulated loss data with temperature

Loss lookup table that is a function of motor speeds, load torques, and operating temperature.

If you have Model-Based Calibration Toolbox, clickCalibrate Mapsto virtually calibrate the 3D lookup tables using measured data.

Tabulated efficiency data

2D efficiency lookup table that is a function of motor speeds and load torques:

  • Converts the efficiency values you provide into losses and uses the tabulated losses for simulation.

  • 忽略了spe效率值为零ed or zero torque. Losses are assumed zero when either torque or speed is zero.

  • Uses linear interpolation to determine losses. Provide tabulated data for low speeds and low torques, as required, to get the desired level of accuracy for lower power conditions.

  • Does not extrapolate loss values for speed and torque magnitudes that exceed the range of the table.

Tabulated efficiency data with temperature

3D efficiency lookup table that is a function of motor speeds, load torques, and operating temperature:

  • Converts the efficiency values you provide into losses and uses the tabulated losses for simulation.

  • 忽略了spe效率值为零ed or zero torque. Losses are assumed zero when either torque or speed is zero.

  • Uses linear interpolation to determine losses. Provide tabulated data for low speeds and low torques, as required, to get the desired level of accuracy for lower power conditions.

  • Does not extrapolate loss values for speed, torque, or temperature magnitudes that exceed the range of the table.

For best practice, useTabulated loss datainstead ofTabulated efficiency data:

  • Efficiency becomes ill defined for zero speed or zero torque.

  • You can account for fixed losses that are still present for zero speed or torque.

Note

Due to system losses, the motor can draw a current when the motor torque is zero.

Virtual Calibration

If you have Model-Based Calibration Toolbox, you can virtually calibrate the measured loss lookup tables.

  1. On theElectrical Lossestab, setParameterize losses byto either:

    • Tabulated loss data

    • Tabulated loss data with temperature

  2. ClickCalibrate Maps.

The dialog box steps through these tasks.

Task

Description

Import Loss Data

Import this loss data from a file. For example, open/toolbox/autoblks/autoblksshared/mbctemplates/MappedMotorDataset.xlsx.

For more information, seeUsing Data(Model-Based Calibration Toolbox).

Parameterize losses by

Required Data

Tabulated loss data
  • Motor speed, rad/s

  • Motor torque, N·m

  • Power loss, W

Tabulated loss data with temperature
  • Motor speed, rad/s

  • Motor torque, N·m

  • Motor temperature, K

  • Power loss, W

Collect motor data at steady-state operating conditions. Data should cover the motor speed, torque, and temperature operating range.

To filter or edit the data, selectEdit in Application. The Model-Based Calibration Toolbox Data Editor opens.

Generate Response Models

Model-Based Calibration Toolbox uses test plans to fit data to Gaussian process models (GPMs).

To assess or adjust the response model fit, selectEdit in Application. The Model-Based Calibration Toolbox Model Browser opens. For more information, seeModel Assessment(Model-Based Calibration Toolbox).

Generate Calibration

Model-Based Calibration Toolbox calibrates the response models and generates calibrated tables.

To assess or adjust the calibration, selectEdit in Application. The Model-Based Calibration Toolbox CAGE Browser opens. For more information, seeCalibration Lookup Tables(Model-Based Calibration Toolbox).

Update block parameters

Update these parameters with the calibration.

Parameterize losses by

Parameters

Tabulated loss data
  • Vector of speeds(w) for tabulated losses, w_eff_bp

  • Vector of torques (T) for tabulated losses, T_eff_bp

  • Corresponding losses, losses_table

Tabulated loss data with temperature
  • Vector of speeds(w) for tabulated losses, w_eff_bp

  • Vector of torques (T) for tabulated losses, T_eff_bp

  • Vector of temperatures for tabulated losses, Temp_eff_bp

  • Corresponding losses, losses_table_3d

Battery Current

块计算电池电流使用mechanical power, power loss, and battery voltage. Positive current indicates battery discharge. Negative current indicates battery charge.

B a t t A m p = M e c h P w r + P w r L o s s B a t t V o l t

The equation uses these variables.

BattVolt

Battery voltage

MechPwr

Mechanical power

PwrLoss

Power loss

BattCurr

Battery current

Power Accounting

For the power accounting, the block implements these equations.

Bus Signal Description Variable Equations

PwrInfo

PwrTrnsfrd

  • Positive signals indicate power flow into the block.

  • Negative signals indicate power flow out of the block.

PwrMtr

Mechanical power

Pmot

P m o t = ω m T e

PwrBus

Electrical power

Pbus

P b u s = P m o t + P l o s s

PwrNotTrnsfrd

  • Negative signals indicate power loss.

PwrLoss

Motor power loss

Ploss

P s t o r e d = ω m ω ˙ m J

PwrStored

  • Positive signals indicate power gain.

PwrStoredShft

Motor power stored

Pstr

P l o s s = ( P m o t + P l o s s P s t o r e d )

The equations use these variables.

Te Motor output shaft torque
ω Motor shaft speed

J

Motor inertia

Ports

Input

expand all

Battery voltage,BattVolt, in V.

Commanded motor torque,Trqcmd, in N·m.

Dependencies

To create this input port, for thePort configuration, selectTorque.

Motor shaft speed,Mtrspd, in rad/s.

Dependencies

To create this input port, for thePort configuration, selectSpeed.

Output

expand all

The bus signal contains these block calculations.

Signal Description Units

MechPwr

Mechanical power

W

PwrLoss

Internal inverter and motor power loss

N·m

PwrInfo

PwrTrnsfrd

PwrMtr

Mechanical power

W
PwrBus

Electrical power

W

PwrNotTrnsfrd

PwrLoss

Motor power loss

W
PwrStored PwrStoredShft

Motor power stored

W

Battery current draw or demand,Ibatt, in A.

Motor output shaft torque,Mtrtrq, in N·m.

Motor shaft speed,Mtrspd, in rad/s.

Dependencies

To create this output port, for thePort configuration, selectTorque.

Parameters

expand all

块的选择

This table summarizes the port configurations.

Port Configuration Creates Ports

Torque

OutpostMtrSpd

Speed

InputMtrSpd

If you have Model-Based Calibration Toolbox, you can virtually calibrate the measured loss lookup tables.

  1. On theElectrical Lossestab, setParameterize losses byto either:

    • Tabulated loss data

    • Tabulated loss data with temperature

  2. ClickCalibrate Maps.

The dialog box steps through these tasks.

Task

Description

Import Loss Data

Import this loss data from a file. For example, open/toolbox/autoblks/autoblksshared/mbctemplates/MappedMotorDataset.xlsx.

For more information, seeUsing Data(Model-Based Calibration Toolbox).

Parameterize losses by

Required Data

Tabulated loss data
  • Motor speed, rad/s

  • Motor torque, N·m

  • Power loss, W

Tabulated loss data with temperature
  • Motor speed, rad/s

  • Motor torque, N·m

  • Motor temperature, K

  • Power loss, W

Collect motor data at steady-state operating conditions. Data should cover the motor speed, torque, and temperature operating range.

To filter or edit the data, selectEdit in Application. The Model-Based Calibration Toolbox Data Editor opens.

Generate Response Models

Model-Based Calibration Toolbox uses test plans to fit data to Gaussian process models (GPMs).

To assess or adjust the response model fit, selectEdit in Application. The Model-Based Calibration Toolbox Model Browser opens. For more information, seeModel Assessment(Model-Based Calibration Toolbox).

Generate Calibration

Model-Based Calibration Toolbox calibrates the response models and generates calibrated tables.

To assess or adjust the calibration, selectEdit in Application. The Model-Based Calibration Toolbox CAGE Browser opens. For more information, seeCalibration Lookup Tables(Model-Based Calibration Toolbox).

Update block parameters

Update these parameters with the calibration.

Parameterize losses by

Parameters

Tabulated loss data
  • Vector of speeds(w) for tabulated losses, w_eff_bp

  • Vector of torques (T) for tabulated losses, T_eff_bp

  • Corresponding losses, losses_table

Tabulated loss data with temperature
  • Vector of speeds(w) for tabulated losses, w_eff_bp

  • Vector of torques (T) for tabulated losses, T_eff_bp

  • Vector of temperatures for tabulated losses, Temp_eff_bp

  • Corresponding losses, losses_table_3d

Electrical Torque

Setting Block Implementation
Tabulated torque-speed envelope

Range specified as a set of speed data points and corresponding maximum torque values.

Maximum torque and power

Range specified with maximum torque and maximum power.

For either method, the block implements an envelope similar to this.

Plot of torque versus speed indicating permissible steady-state operation

Rotational speeds for permissible steady-state operation, in rad/s. To avoid poor performance due to an infinite slope in the torque-speed curve, specify a vector of rotational speeds that does not contain duplicate consecutive values.

Dependencies

To create this parameter, for theParameterized byparameter, selectTabulated torque-speed envelope.

Maximum torque values for permissible steady state, in N·m.

Dependencies

To create this parameter, for theParameterized byparameter, selectTabulated torque-speed envelope.

The maximum permissible motor torque, in N·m.

Dependencies

To create this parameter, for theParameterized byparameter, selectMaximum torque and power.

The maximum permissible motor power, in W.

Dependencies

To create this parameter, for theParameterized byparameter, selectMaximum torque and power.

Time constant with which the motor driver tracks a torque demand, in s.

Electrical Losses

Setting Block Implementation
Single efficiency measurement

Sum of these terms, measured at a single measurement point:

  • 固定的损失dependent of torque and speed,P0. UseP0to account for fixed converter losses.

  • A torque-dependent electrical losskτ2, wherekis a constant andτis the torque. Represents ohmic losses in the copper windings.

  • A speed-dependent electrical losskwω2, wherekwis a constant andωis the speed. Represents iron losses due to eddy currents.

Tabulated loss data

Loss lookup table that is a function of motor speeds and load torques.

If you have Model-Based Calibration Toolbox, clickCalibrate Mapsto virtually calibrate the 2D lookup tables using measured data.

Tabulated loss data with temperature

Loss lookup table that is a function of motor speeds, load torques, and operating temperature.

If you have Model-Based Calibration Toolbox, clickCalibrate Mapsto virtually calibrate the 3D lookup tables using measured data.

Tabulated efficiency data

2D efficiency lookup table that is a function of motor speeds and load torques:

  • Converts the efficiency values you provide into losses and uses the tabulated losses for simulation.

  • 忽略了spe效率值为零ed or zero torque. Losses are assumed zero when either torque or speed is zero.

  • Uses linear interpolation to determine losses. Provide tabulated data for low speeds and low torques, as required, to get the desired level of accuracy for lower power conditions.

  • Does not extrapolate loss values for speed and torque magnitudes that exceed the range of the table.

Tabulated efficiency data with temperature

3D efficiency lookup table that is a function of motor speeds, load torques, and operating temperature:

  • Converts the efficiency values you provide into losses and uses the tabulated losses for simulation.

  • 忽略了spe效率值为零ed or zero torque. Losses are assumed zero when either torque or speed is zero.

  • Uses linear interpolation to determine losses. Provide tabulated data for low speeds and low torques, as required, to get the desired level of accuracy for lower power conditions.

  • Does not extrapolate loss values for speed, torque, or temperature magnitudes that exceed the range of the table.

For best practice, useTabulated loss datainstead ofTabulated efficiency data:

  • Efficiency becomes ill defined for zero speed or zero torque.

  • You can account for fixed losses that are still present for zero speed or torque.

Note

Due to system losses, the motor can draw a current when the motor torque is zero.

The block defines overall efficiency as:

η = 100 τ 0 ω 0 τ 0 ω 0 + P 0 + k τ 0 2 + k w ω 0 2

The equation uses these variables.

τ0

Torque at which efficiency is measured

ω0

Speed at which efficiency is measured

P0

固定的损失dependent of torque or speed

k τ 0 2

Torque-dependent electrical losses

kwω2

Speed-dependent iron losses

At initialization, the block solves the efficiency equation fork. The block neglects losses associated with the rotor damping.

Dependencies

To create this parameter, for theParameterize losses byparameter, selectSingle efficiency measurement.

Speed at which efficiency is measured, in rad/s.

Dependencies

To create this parameter, for theParameterize losses byparameter, selectSingle efficiency measurement.

Torque at which efficiency is measured, in N·m.

Dependencies

To create this parameter, for theParameterize losses byparameter, selectSingle efficiency measurement.

Iron losses at the speed and torque at which efficiency is defined, in W.

Dependencies

To create this parameter, for theParameterize losses byparameter, selectSingle efficiency measurement.

Fixed electrical loss associated with the driver when the motor current and torque are zero, in W.

Dependencies

To create this parameter, for theParameterize losses byparameter, selectSingle efficiency measurement.

Speed breakpoints for lookup table when calculating losses, in rad/s. Array dimensions are1by the number of speed breakpoints,M.

Dependencies

To create this parameter, for theParameterize losses byparameter, select one of these:

  • Tabulated loss data

  • Tabulated loss data with temperature

  • Tabulated efficiency data

  • Tabulated efficiency data with temperature

Torque breakpoints for lookup table when calculating losses, in N·m. Array dimensions are1by the number of torque breakpoints,N.

Dependencies

To create this parameter, for theParameterize losses byparameter, select one of these:

  • Tabulated loss data

  • Tabulated loss data with temperature

  • Tabulated efficiency data

  • Tabulated efficiency data with temperature

Temperature breakpoints for lookup table when calculating losses, in K. Array dimensions are1by the number of temperature breakpoints,L.

Dependencies

To create this parameter, for theParameterize losses byparameter, select one of these:

  • Tabulated loss data with temperature

  • Tabulated efficiency data with temperature

Array of values for electrical losses as a function of speed and torque, in W. Each value specifies the losses for a specific combination of speed and torque. The array dimensions must match the speed,M, and torque,N, breakpoint vector dimensions.

Dependencies

To create this parameter, for theParameterize losses byparameter, selectTabulated loss data.

Array of values for electrical losses as a function of speed, torque, and temperature, in W. Each value specifies the losses for a specific combination of speed, torque, and temperature. The array dimensions must match the speed,M, torque,N, and temperature,L, breakpoint vector dimensions.

Dependencies

To create this parameter, for theParameterize losses byparameter, selectTabulated loss data with temperature.

Array of efficiency as a function of speed and torque, in %. Each value specifies the losses for a specific combination of speed and torque. The array dimensions must match the speed,M, and torque,N, breakpoint vector dimensions.

The block ignores efficiency values for zero speed or zero torque. Losses are zero when either torque or speed is zero. The block uses linear interpolation.

To get the desired level of accuracy for lower power conditions, you can provide tabulated data for low speeds and low torques.

Dependencies

To create this parameter, for theParameterize losses byparameter, selectTabulated efficiency data.

Array of efficiency as a function of speed and torque, in %. Each value specifies the losses for a specific combination of speed and torque. The array dimensions must match the speed,M, torque,N, and temperature,L, breakpoint vector dimensions.

The block ignores efficiency values for zero speed or zero torque. Losses are zero when either torque or speed is zero. The block uses linear interpolation.

To get the desired level of accuracy for lower power conditions, you can provide tabulated data for low speeds and low torques.

Dependencies

To create this parameter, for theParameterize losses byparameter, selectTabulated efficiency data.

Mechanical

Rotor resistance to change in motor motion, in kg*m2. The value can be zero.

Dependencies

To create this parameter, for thePort configurationparameter, selectTorque.

Rotor damping, in N·m/(rad/s). The value can be zero.

Dependencies

To create this parameter, for thePort configurationparameter, selectTorque.

Rotor speed at the start of the simulation, in rad/s.

Dependencies

To create this parameter, for thePort configurationparameter, selectTorque.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2017a