Mapped Motor

Mapped motor and drive electronics operating in torque-control mode

  • Library:
  • Powertrain Blockset / Propulsion / Electric Motors

    Vehicle Dynamics Blockset / Powertrain / Propulsion

Description

The Mapped Motor block 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 the Electrical Torque tab, for Parametrized by, select one of these options.

SettingBlock 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.

Electrical Losses

To specify the electrical losses, on the Electrical Losses tab, for Parameterize losses by, select one of these options.

SettingBlock Implementation
Single efficiency measurement

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

  • Fixed losses independent of torque and speed, P0. Use P0 to account for fixed converter losses.

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

  • A speed-dependent electrical loss kwω2, where kw is 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, click Calibrate Maps to 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, click Calibrate Maps to 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.

  • Ignores efficiency values you provide for zero speed 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.

  • Ignores efficiency values you provide for zero speed 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, use Tabulated loss data instead of Tabulated 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 the Electrical Losses tab, set Parameterize losses by to either:

    • Tabulated loss data

    • Tabulated loss data with temperature

  2. Click Calibrate Maps.

The dialog box steps through these tasks.

Task

Description

Import Loss Data

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

For more information, see Using 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, select Edit 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, select Edit in Application. The Model-Based Calibration Toolbox Model Browser opens. For more information, see Model 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, select Edit in Application. The Model-Based Calibration Toolbox CAGE Browser opens. For more information, see Calibration 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

The block calculates the battery current using the mechanical power, power loss, and battery voltage. Positive current indicates battery discharge. Negative current indicates battery charge.

BattAmp=MechPwr+PwrLossBattVolt

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 DescriptionVariableEquations

PwrInfo

PwrTrnsfrd

  • Positive signals indicate power flow into the block.

  • Negative signals indicate power flow out of the block.

PwrMtr

Mechanical power

Pmot

Pmot= ωmTe

PwrBus

Electrical power

Pbus

Pbus= Pmot+Ploss

PwrNotTrnsfrd

  • Negative signals indicate power loss.

PwrLoss

Motor power loss

Ploss

Pstored= ωmω˙mJ

PwrStored

  • Positive signals indicate power gain.

PwrStoredShft

Motor power stored

Pstr

Ploss= (Pmot+Ploss Pstored)

The equations use these variables.

TeMotor 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 the Port configuration, select Torque.

Motor shaft speed, Mtrspd, in rad/s.

Dependencies

To create this input port, for the Port configuration, select Speed.

Output

expand all

The bus signal contains these block calculations.

Signal DescriptionUnits

MechPwr

Mechanical power

rad

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
PwrStoredPwrStoredShft

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 the Port configuration, select Torque.

Parameters

expand all

Block Options

This table summarizes the port configurations.

Port ConfigurationCreates Ports

Torque

Outpost MtrSpd

Speed

Input MtrSpd

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

  1. On the Electrical Losses tab, set Parameterize losses by to either:

    • Tabulated loss data

    • Tabulated loss data with temperature

  2. Click Calibrate Maps.

The dialog box steps through these tasks.

Task

Description

Import Loss Data

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

For more information, see Using 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, select Edit 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, select Edit in Application. The Model-Based Calibration Toolbox Model Browser opens. For more information, see Model 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, select Edit in Application. The Model-Based Calibration Toolbox CAGE Browser opens. For more information, see Calibration 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

SettingBlock 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.

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 the Parameterized by parameter, select Tabulated torque-speed envelope.

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

Dependencies

To create this parameter, for the Parameterized by parameter, select Tabulated torque-speed envelope.

The maximum permissible motor torque, in N·m.

Dependencies

To create this parameter, for the Parameterized by parameter, select Maximum torque and power.

The maximum permissible motor power, in W.

Dependencies

To create this parameter, for the Parameterized by parameter, select Maximum torque and power.

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

Electrical Losses

SettingBlock Implementation
Single efficiency measurement

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

  • Fixed losses independent of torque and speed, P0. Use P0 to account for fixed converter losses.

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

  • A speed-dependent electrical loss kwω2, where kw is 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, click Calibrate Maps to 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, click Calibrate Maps to 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.

  • Ignores efficiency values you provide for zero speed 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.

  • Ignores efficiency values you provide for zero speed 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, use Tabulated loss data instead of Tabulated 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+P0+kτ02+kwω02

The equation uses these variables.

τ0

Torque at which efficiency is measured

ω0

Speed at which efficiency is measured

P0

Fixed losses independent of torque or speed

kτ02

Torque-dependent electrical losses

kwω2

Speed-dependent iron losses

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

Dependencies

To create this parameter, for the Parameterize losses by parameter, select Single efficiency measurement.

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

Dependencies

To create this parameter, for the Parameterize losses by parameter, select Single efficiency measurement.

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

Dependencies

To create this parameter, for the Parameterize losses by parameter, select Single efficiency measurement.

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

Dependencies

To create this parameter, for the Parameterize losses by parameter, select Single 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 the Parameterize losses by parameter, select Single efficiency measurement.

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

Dependencies

To create this parameter, for the Parameterize losses by parameter, 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 are 1 by the number of torque breakpoints, N.

Dependencies

To create this parameter, for the Parameterize losses by parameter, 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 are 1 by the number of temperature breakpoints, L.

Dependencies

To create this parameter, for the Parameterize losses by parameter, 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 the Parameterize losses by parameter, select Tabulated 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 the Parameterize losses by parameter, select Tabulated 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 the Parameterize losses by parameter, select Tabulated 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 the Parameterize losses by parameter, select Tabulated efficiency data.

Mechanical

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

Dependencies

To create this parameter, for the Port configuration parameter, select Torque.

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

Dependencies

To create this parameter, for the Port configuration parameter, select Torque.

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

Dependencies

To create this parameter, for the Port configuration parameter, select Torque.

Extended Capabilities

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

Introduced in R2017a