Mapped Motor
Mapped motor and drive electronics operating in torquecontrol mode
 Library:
Powertrain Blockset / Propulsion / Electric Motors and Inverters
Vehicle Dynamics Blockset / Powertrain / Propulsion
Description
The Mapped Motor block implements a mapped motor and drive electronics operating in torquecontrol mode. The output torque tracks the torque reference demand and includes a motorresponse and driveresponse time constant. Use the block for fast systemlevel 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 ModelBased 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.
Setting  Block Implementation 

Tabulated torquespeed 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.
Setting  Block Implementation 

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

Tabulated loss data  Loss lookup table that is a function of motor speeds and load torques. If you have ModelBased 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 ModelBased 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:

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

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 ModelBased Calibration Toolbox, you can virtually calibrate the measured loss lookup tables.
On the Electrical Losses tab, set Parameterize losses by to either:
Tabulated loss data
Tabulated loss data with temperature
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
For more information, see Using Data (ModelBased Calibration Toolbox).
Collect motor data at steadystate operating conditions. Data should cover the motor speed, torque, and temperature operating range. To filter or edit the data, select Edit in Application. The ModelBased Calibration Toolbox Data Editor opens.  
Generate Response Models  ModelBased 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 ModelBased Calibration Toolbox Model Browser opens. For more information, see Model Assessment (ModelBased Calibration Toolbox).  
Generate Calibration  ModelBased Calibration Toolbox calibrates the response models and generates calibrated tables. To assess or adjust the calibration, select Edit in Application. The ModelBased Calibration Toolbox CAGE Browser opens. For more information, see Calibration Lookup Tables (ModelBased Calibration Toolbox).  
Update block parameters  Update these parameters with the calibration.

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=\frac{MechPwr+PwrLoss}{BattVolt}$$
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  



 Mechanical power  P_{mot}  ${P}_{mot}={\omega}_{m}{T}_{e}$ 
PwrBus  Electrical power  P_{bus}  ${P}_{bus}={P}_{mot}+{P}_{loss}$  
 PwrLoss  Motor power loss  P_{loss}  $${P}_{stored}={\omega}_{m}{\dot{\omega}}_{m}J$$  
 PwrStoredShft  Motor power stored  P_{str}  ${P}_{loss}=({P}_{mot}+{P}_{loss}{P}_{stored})$ 
The equations use these variables.
T_{e}  Motor output shaft torque 
ω  Motor shaft speed 
J  Motor inertia 