Motor & Drive (System Level)
Generic motor and drive with closed-loop torque control
Description
The Motor & Drive (System Level) block represents a
generic motor and drive with closed-loop torque control. Use this block to model a
brushless motor (such as a PMSM) and drive, or, more generally, traction and actuation
systems implemented using a wide range of motor types.
To enable fast simulation at a system level, this block abstracts the motor, drive
electronics, and control.
The block permits only the range of torques and speeds that the torque-speed envelope
defines. In the default block configuration, you specify this data in the block dialog
box as a set of speed data points and corresponding maximum torque values. The following
figure shows a typical torque-speed envelope for a torque-controlled motor and drive.
Specify the torque-speed envelope for the positive torque region only, that is,
quadrants 1 and 4. If you specify only for positive speeds (quadrant 1 or, equivalently,
the motoring region), then the quadrant 4 torque envelope is defined by the block as the
mirror image of quadrant 1. The motor torque-speed envelope has the same profile when
the motor is operating in a reverse direction (quadrants 2 and 3).
Instead of providing tabulated torque-speed data, you can specify a maximum torque and
a maximum power. This results in the torque-speed envelope profile shown below. The
other three operating quadrants are constrained by this same profile.
The block produces a positive torque acting from the mechanical C to R ports.
Intermittent Over-Torque Operation
To over-torque the motor for short periods of time, set the Allow
intermittent over-torque parameter to Yes
.
In this case, you must specify the values for both the Continuous
operation maximum torque envelope and the Intermittent
operation maximum torque envelope parameters. Internally the block
determines which torque envelope to apply based on the torque demand history. You
can over-torque the motor drive if the torque demand has been less than the
continuous operation torque envelope for more than the value specified in the
Recovery time parameter. Over-torquing is disabled if
over-torquing has been applied for longer than the value specified in the
Over-torque time limit parameter.
For more application specific management of over-torquing, disable the
over-torquing in the Motor & Drive block and
externally implement the torque limiting in Simulink™ between the torque demand and the torque reference input
port, Tr, of the Motor &
Drive block.
Modeling Electrical Losses
The block allows both simplified and tabulated definition of electrical losses.
The default, simplified, behavior is to model the losses as the sum of the following
four terms:
A series resistance between the DC power supply and the motor
drive.
Fixed losses independent of torque and speed,
P0. Use this to
account for fixed converter losses.
A torque-dependent electrical loss kτ2, where τ is the torque and
k is a constant. This represents ohmic losses in
the copper windings.
A speed-dependent electrical loss kwω2, where ω is the speed and
kw is a constant. This
represents iron losses due to eddy currents.
This simplification of loss dependency on torque and speed might be sufficient for
early design work, regardless of the underlying motor type and drive
topology.
If you require more accuracy, or later in the design process, you can provide
tabulated loss values as a function of motor speed and load torque. When using this
option, provide data for all of the operating quadrants that your simulation will
run in. If you provide partial data (for example, just for the quadrant 1 forward
motoring region), then the other quadrants are assumed to repeat the same pattern of
losses. This will normally be correct for the reverse motoring region, but may be an
approximation for the braking/generating quadrants. The block does no extrapolation
of loss values for speed and torque magnitudes that exceed the range of the
table.
Finally, you can specify electrical losses by using tabulated efficiency data,
instead of a single efficiency measurement or tabulated loss data. When using this
option, also provide data for all of the operating quadrants that your simulation
will run in. If you provide partial data (for example, just for the quadrant 1
forward motoring region), then the other quadrants are assumed to repeat the same
pattern of losses.
The best practice is to provide tabulated loss data as a function of speed and
torque, rather than tabulated efficiency data, because:
Efficiency becomes ill-defined for zero speed or zero torque.
Using losses, you can also account for fixed losses that are still present
for zero speed or torque.
If you use the tabulated efficiencies option:
The block converts the efficiency values you provide into losses and uses
the tabulated losses for simulation.
Efficiency values you provide for zero speed or zero torque are ignored,
and losses are assumed zero when either torque or speed is zero.
The block 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.
The block does no extrapolation of loss values for speed and torque
magnitudes that exceed the range of the table.
When you provide tabulated loss or efficiency data, you can also specify it as a
function of speed, load torque, and DC supply voltage. This option is useful when
the supply voltage is not regulated and can vary during the simulation. One example
is an electric vehicle drivetrain that does not have a DC-DC regulator upstream of
the motor drive. Use the Simplified PMSM Drive block
to model the motor drive and provide tabulated loss or efficiency values as a
function of motor speed, load torque, and DC supply voltage.
Block Variants
The block provides four modeling variants, accessible by right-clicking the block
in your block diagram and then selecting the appropriate option from the context
menu, under > :
— Basic model that does
not simulate faults or thermal effects. This is the default.
— Model with exposed
thermal port. This model does not simulate faults.
— Model with
exposed fault control port. This model does not simulate thermal
effects.
— Model
that lets you simulate both faults and thermal effects. Both the thermal
port and the fault input port are exposed.
Thermal Ports
The block has an optional thermal port, hidden by default. To expose the thermal port, select
one of the block variants that model thermal effects, as described in Block Variants. This action displays the thermal port H on the block icon, and
exposes the Temperature Dependence and Thermal
Port parameters . These parameters are described further on this reference
page.
Use the thermal port to simulate the effects of copper resistance
losses that convert electrical power to heat. For more information
on using thermal ports in actuator blocks, see Simulating Thermal Effects in Rotational and Translational Actuators.
Simulating Faults
You can use the physical signal input port F to simulate
servomotor failure, as well as connecting and disconnecting the DC supply. You
cannot simulate disconnecting the DC supply by simply opening a switch, because
there must be a finite voltage on the servomotor terminals, producing the current
that balances the electrical and mechanical power.
To expose the fault control port, select one of the faultable block variants, as
described in Block Variants. This action displays the
physical signal input port F on the block icon, and adds the
Faults tab to the block dialog box. This tabs are is
described further on this reference page.
If a signal is connected to port F, then the block operates
according to the parameter settings on the Faults tab. For
example, if Fault condition is Faulted if F >=
Fault threshold
, then when the signal at port
F rises above the Fault threshold
value, the servomotor stops operating, zero current is taken from the supply side,
and zero current is supplied to the load side.
Assumptions and Limitations
Ports
Input
expand all
Tr
— Reference torque demand
physical
Physical input port associated with the reference torque
demand.
F
— Servomotor failure port
physical
Physical input port associated with the servomotor failure
simulation.
Dependencies
This port is visible only when you choose the faultable block
variant, as described in Block Variants..
Output
expand all
W
— Mechanical speed output
physical
Physical output port associated with the mechanical speed.
Conserving
expand all
+
— Positive electrical DC supply
electrical
Electrical conserving port associated with the positive electrical DC
supply.
-
— Negative electrical DC supply
electrical
Electrical conserving port associated with the negative electrical DC
supply.
C
— Motor case
mechanical
Mechanical rotational conserving port associated with the motor
case.
R
— Motor rotor
mechanical
Mechanical rotational conserving port associated with the motor
rotor.
Parameters
expand all
Electrical Torque
Parameterize by
— Parameterize by
Tabulated torque-speed
envelope
(default) | Maximum torque and power
Select one of the following methods for block parameterization:
Tabulated torque-speed envelope
— Provide the vectors of rotational speeds and
corresponding maximum torque values. This is the default
option.
Maximum torque and power
— Define the torque-speed envelope by providing
values for maximum permissible torque and motor
power.
Allow intermittent over-torque
— Intermittent over-torque option
No
(default) | Yes
Whether to allow intermittent over-torque. For more information on
over-torquing, see Intermittent Over-Torque Operation.
Continuous operation maximum torque envelope
— Vector of maximum torque values for continuous operation
[.09, .08, .07, 0]
N*m
(default)
Maximum torque values for permissible steady-state operation. These
values correspond to the speeds in the Corresponding
rotational speeds parameter and define the torque-speed
envelope for the motor.
Dependencies
To enable this parameter, set Parameterize by
to Tabulated torque-speed
envelope
.
Intermittent operation maximum torque envelope
— Vector of maximum torque values for intermittent operation
[.36, .32, .28, 0]
N*m
(default)
Maximum torque values during intermittent over-torquing
operation.
Dependencies
To enable this parameter, set Parameterize by
to Tabulated torque-speed envelope
and
Allow intermittent over-torque to
Yes
.
Corresponding rotational speeds
— Vector of rotational speeds
[0, 3750, 7500, 8000]
rpm
(default)
Rotational speeds for permissible steady-state operation. 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 enable this parameter, set Parameterize by
to Tabulated torque-speed
envelope
.
Continuous operation maximum torque
— Maximum torque for continuous operation
0.1
N*m
(default)
Maximum permissible motor torque during continuous operation.
Dependencies
To enable this parameter, set Parameterize by
to Maximum torque and power
.
Continuous operation maximum power
— Maximum power for continuous operation
30
W
(default)
Maximum permissible motor power during continuous operation.
Dependencies
To enable this parameter, set Parameterize by
to Maximum torque and power
.
Intermittent operation maximum torque
— Maximum torque for intermittent operation
0.4
N*m
(default)
Maximum permissible motor torque during intermittent over-torquing
operation.
Dependencies
To enable this parameter, set Parameterize by
to Maximum torque and power
and
Allow intermittent over-torque to
Yes
.
Intermittent operation maximum power
— Maximum power for intermittent operation
120
W
(default)
Maximum permissible motor power during intermittent over-torquing
operation.
Dependencies
To enable this parameter, set Parameterize by
to Maximum torque and power
and
Allow intermittent over-torque to
Yes
.
Over-torque time limit
— Over-torque time limit
30
s
(default)
Maximum amount of time for which you can continuously apply
over-torquing.
Dependencies
To enable this parameter, set Allow intermittent
over-torque to Yes
.
Recovery time
— Recovery time
60
s
(default)
Amount of time for which the torque demand has to be less than the
continuous operation torque envelope to be able to apply over-torquing
again.
Dependencies
To enable this parameter, set Allow intermittent
over-torque to Yes
.
Torque control time constant, Tc
— Torque control time constant
0.02
s
(default)
Time constant with which the motor driver tracks a torque
demand.
Electrical Losses
Parameterize losses by
— Electrical loss parameterization
Single efficiency
measurement
(default) | Tabulated loss data as a function of speed and
torque
| Tabulated efficiency data as a function of speed and
torque
| Tabulated loss data as a function of speed, torque, and
DC supply voltage
| Tabulated efficiency data as a function of speed,
torque, and DC supply voltage
Select one of the following methods for electrical loss
parameterization:
Single efficiency measurement
— Model the losses as the sum of the four terms, listed
in the block description, at a single measurement point.
Tabulated loss data as a function of speed and
torque
— Determine the losses by
two-dimensional table lookup based on the provided tabulated
data for motor speeds, load torques, and corresponding
losses.
Tabulated efficiency data as a function of speed
and torque
— Determine the losses by
two-dimensional table lookup based on the provided tabulated
data for motor speeds, load torques, and corresponding
efficiencies.
Tabulated loss data as a function of speed,
torque, and DC supply voltage
—
Determine the losses by three-dimensional table lookup based on
the provided tabulated data for motor speeds, load torques, DC
supply voltages, and corresponding losses.
Tabulated efficiency data as a function of speed,
torque, and DC supply voltage
—
Determine the losses by three-dimensional table lookup based on
the provided tabulated data for motor speeds, load torques, DC
supply voltages, and corresponding efficiencies.
See Modeling Electrical Losses for
details.
Motor and driver overall efficiency (percent)
— Motor and driver overall efficiency
100
(default)
The block defines overall efficiency as
where:
τ0 represents
the Torque at which efficiency is
measured.
ω0 represents
the Speed at which efficiency is
measured.
P0 represents
the Fixed losses independent of torque or
speed.
represents the torque-dependent electrical
losses.
kwω2
represents the speed-dependent iron losses.
At initialization, the block solves the efficiency
equation for k. The block neglects losses associated
with the rotor damping.
Dependencies
This parameter is visible only when you set the
Parameterize losses by parameter to
Single efficiency measurement
.
Speed at which efficiency is measured
— Speed at which efficiency is measured
3750
rpm
(default)
Speed that the block uses to calculate torque-dependent electrical
losses.
Dependencies
This parameter is visible only when you set the
Parameterize losses by parameter to
Single efficiency measurement
.
Torque at which efficiency is measured
— Torque at which efficiency is measured
0.08
Nm
(default)
Torque that the block uses to calculate torque-dependent electrical
losses.
Dependencies
This parameter is visible only when you set the
Parameterize losses by parameter to
Single efficiency measurement
.
Iron losses
— Iron losses
0
W
(default)
Iron losses at the speed and torque at which efficiency is
defined.
Dependencies
This parameter is visible only when you set the
Parameterize losses by parameter to
Single efficiency measurement
.
Fixed losses independent of torque and speed
— Fixed losses independent of torque and speed
0
W
(default)
Fixed electrical loss associated with the driver when the motor
current and torque are zero.
Dependencies
This parameter is visible only when you set the
Parameterize losses by parameter to
Single efficiency measurement
.
Vector of speeds (w) for tabulated losses
— Vector of speeds (w) for tabulated losses
[-8000, -4000, 0, 4000, 8000]
rpm
(default)
The vector of speed values, to be used for table lookup when
calculating losses.
Dependencies
This parameter is visible only when you set the
Parameterize losses by parameter to
Tabulated loss data as a function of speed and
torque
, Tabulated loss data as a
function of speed, torque, and DC supply voltage
,
Tabulated efficiency data as a function of speed
and torque
, or Tabulated efficiency
data as a function of speed, torque, and DC supply
voltage
.
Vector of torques (T) for tabulated losses
— Vector of torques (T) for tabulated losses
[0, .03, .06, .09]
Nm
(default)
The vector of speed values, to be used for table lookup when
calculating losses.
Dependencies
This parameter is visible only when you set the
Parameterize losses by parameter to
Tabulated loss data as a function of speed and
torque
, Tabulated loss data as a
function of speed, torque, and DC supply voltage
,
Tabulated efficiency data as a function of speed
and torque
, or Tabulated efficiency
data as a function of speed, torque, and DC supply
voltage
.
Vector of DC supply voltages (v) for tabulated losses
— Vector of DC supply voltages (v) for tabulated losses
[100, 250, 400]
V
(default)
The vector of DC supply voltages, to be used for table lookup when
calculating losses.
Dependencies
This parameter is visible only when you set the
Parameterize losses by parameter to
Tabulated loss data as a function of speed, torque,
and DC supply voltage
or Tabulated
efficiency data as a function of speed, torque, and DC supply
voltage
.
Corresponding losses, P(w,T)
— Corresponding losses
[1.49, 1.67, 2.21, 3.1; .42, .69, 1.14, 2.03;
.06, .24, .78, 1.68; .42, .69, 1.14, 2.03; 1.49, 1.67, 2.21,
3.1]
W
(default)
Tabulated values for electrical losses as a function of speed and
torque, to be used for 2D table lookup. Each value in the matrix
specifies the losses for a specific combination of speed and torque. The
matrix size must match the dimensions defined by the speed and torque
vectors.
Dependencies
This parameter is visible only when you set the
Parameterize losses by parameter to
Tabulated loss data as a function of speed and
torque
.
Corresponding efficiency (percent), E(w,T)
— Corresponding efficiency (percent), E(w,T)
[95, 95, 95, 95; 95, 95, 95, 95; 95, 95, 95,
95; 95, 95, 95, 95; 95, 95, 95, 95]
(default)
Tabulated efficiency values, in percent, as a function of speed and
torque, to be used for 2D table lookup. Each value in the matrix
specifies the efficiency for a specific combination of speed and torque.
The matrix size must match the dimensions defined by the speed and
torque vectors. Efficiency values you provide for zero speed or zero
torque are ignored, and losses are assumed zero when either torque or
speed is zero. The block 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.
Dependencies
This parameter is visible only when you set the
Parameterize losses by parameter to
Tabulated efficiency data as a function of speed
and torque
.
Corresponding losses, P(w,T,v)
— Corresponding losses, P(w,T,v)
ones(5, 4, 3)
W
(default)
Tabulated values for electrical losses as a function of speed, torque,
and DC supply voltage, to be used for 3D table lookup. Each value in the
matrix specifies the losses for a specific combination of speed, torque,
and DC supply voltage. The matrix size must match the dimensions defined
by the three vectors.
Dependencies
This parameter is visible only when you set the
Parameterize losses by parameter to
Tabulated loss data as a function of speed, torque,
and DC supply voltage
.
Corresponding efficiency (percent), E(w,T,v)
— Corresponding efficiency (percent), E(w,T,v)
95 * ones(5, 4, 3)
(default)
Tabulated efficiency values, in percent, as a function of speed,
torque, and DC supply voltage, to be used for 3D table lookup. Each
value in the matrix specifies the efficiency for a specific combination
of speed, torque, and DC supply voltage. The matrix size must match the
dimensions defined by the three vectors. Efficiency values you provide
for zero speed or zero torque are ignored, and losses are assumed zero
when either torque or speed is zero. The block 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.
Dependencies
This parameter is visible only when you set the
Parameterize losses by parameter to
Tabulated efficiency data as a function of speed,
torque, and DC supply voltage
.
Supply series resistance
— Supply series resistance
0
Ohm
(default)
The equivalent resistance used in series with the DC supply to model
electrical losses that are proportional to the driver supply current.
The block assumes that the DC supply current is approximately constant
under constant load conditions.
Faults
Fault condition
— Fault condition
Faulted if F >= Fault
threshold
(default) | Faulted if F <= Fault threshold
Selects whether the fault is triggered by a signal that is high or
low:
Faulted if F >= Fault threshold
— Simplified PMSM Drive
block is disabled if the signal at port F
rises above the threshold value.
Faulted if F <= Fault threshold
— Simplified PMSM Drive
block is disabled if the signal at port F
falls below the threshold value.
Fault threshold
— Fault threshold
0.5
(default)
The threshold value used to detect a fault.
Mechanical
Rotor inertia
— Rotor inertia
5e-6
kg*m2
(default)
Rotor resistance to change in motor motion. The value can be
zero.
Rotor damping
— Rotor damping
1e-5
N*m/(rad/s)
(default)
Rotor damping. The value can be zero.
Initial rotor speed
— Initial rotor speed
0
rpm
(default)
Rotor speed at the start of the simulation.
Temperature Dependence
Resistance temperature coefficient
— Resistance temperature coefficient
3.93e-3
1/K
(default)
Parameter α in the equation defining resistance as a function of
temperature, as described in Thermal Model for Actuator Blocks. This parameter is
visible only if the Parameterize losses by
parameter on the Electrical Losses tab is set to
Single efficiency measurement
. The
default value is for copper.
Dependencies
This parameter is visible only when you set the
Parameterize losses by parameter on the
Electrical Losses setting to
Single efficiency measurement
.
Measurement temperature
— Measurement temperature
25
degC
(default)
The temperature for which motor parameters are defined. If you
parameterize electrical losses by tabulated loss data, then this is the
temperature for which the Corresponding losses,
P(w,T) are given on the Electrical
Losses tab.
Second measurement temperature
— Second measurement temperature
125
degC
(default)
The temperature for which the Corresponding losses, P(w,T),
at second measurement temperature are given.
Dependencies
This parameter is visible only when you set the
Parameterize losses by parameter on the
Electrical Losses setting to
Tabulated loss data
.
Corresponding losses, P(w,T), at second measurement temperature
— Corresponding losses, P(w,T), at second measurement temperature
[1.49, 1.74, 2.49, 3.74; .42, .67, 1.42,
2.67; .06, .31, 1.06, 2.31; .42, .67, 1.42, 2.67; 1.49, 1.74, 2.49,
3.74]
W
(default)
Iron losses at the second measurement temperature, corresponding to
the speed and torque tabulated values on the Electrical
Losses tab.
Dependencies
This parameter is visible only when you set the
Parameterize losses by parameter on the
Electrical Losses setting to
Tabulated loss data
.
Corresponding efficiency (percent), E(w,T), at second measurement temperature
— Corresponding efficiency (percent), E(w,T), at second measurement
temperature
[95, 95, 95, 95; 95, 95, 95, 95; 95, 95, 95,
95; 95, 95, 95, 95; 95, 95, 95, 95]
(default)
Tabulated efficiency values, in percent, at the second measurement
temperature, corresponding to the speed and torque tabulated values on
the Electrical Losses tab.
Dependencies
This parameter is visible only when you set the
Parameterize losses by parameter on the
Electrical Losses setting to
Tabulated efficiency data as a function of speed
and torque
.
Corresponding losses, P(w,T,v), at second measurement temperature
— Corresponding losses, P(w,T,v), at second measurement temperature
ones(5, 4, 3)
W
(default)
Iron losses at the second measurement temperature, corresponding to
the speed, torque, and DC supply voltage tabulated values on the
Electrical Losses tab.
Dependencies
This parameter is visible only when you set the
Parameterize losses by parameter on the
Electrical Losses setting to
Tabulated loss data as a function of speed, torque,
and DC supply voltage
.
Corresponding efficiency (percent), E(w,T,v), at second measurement temperature
— Corresponding efficiency (percent), E(w,T,v), at second measurement
temperature
95 * ones(5, 4, 3)
(default)
Tabulated efficiency values, in percent, at the second measurement
temperature, corresponding to the speed, torque, and DC supply voltage
tabulated values on the Electrical Losses
tab.
Dependencies
This parameter is visible only when you set the
Parameterize losses by parameter on the
Electrical Losses setting to
Tabulated efficiency data as a function of speed,
torque, and DC supply voltage
.
Thermal Port
Thermal mass
— Thermal mass
100
J/K
(default)
Thermal mass of the electrical winding, defined as the energy required
to raise the temperature by one degree.
initial_temperature
— Initial temperature
25
(default)
The temperature of the thermal port at the start of simulation. The
default value is
25
°C
.
Compatibility Considerations
expand all
Library Path and Name Change
Behavior changed in R2020b
The Simplified PMSM Drive block has been renamed
the Motor & Drive (System Level)
block and moved from the > > > library to the > > > library.
If you have a script that depends on the library path or the Simscape component
path of this block, you need to update it to reflect these changes.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Introduced in R2008a