# Motor & Drive

Generic motor and drive with closed-loop torque control

**Library:**Simscape / Driveline / Engines & Motors

## Description

The Motor & Drive block represents a generic brushless motor and drive with closed-loop torque control. It is a simplified version of the Motor & Drive (System Level) (Simscape Electrical) block. The Motor & Drive block is useful if you need a generic or low-fidelity motor implementation in your system. It is also suited for cases when you do not know all of your motor specifications or you want to use the block to find an appropriate motor for your system.

To enable faster simulation, the block abstracts the motor, drive electronics, and control. The block generates a torque-speed envelope that saturates the input torque, and it permits only the range of torques and speeds that the envelope defines.

### Modeling Electrical Losses

The Motor & Drive block models first-order losses based
on the overall efficiency for a given speed and torque, which you specify as
**Motor and driver overall efficiency (percent)**,
**Speed at which efficiency is measured**, and **Torque
at which efficiency is measured**, respectively. The block uses the
speed and torque to generate a torque-speed envelope. The envelope saturates the
input torque, which yields the torque that the motor responds to,
*τ _{elec}*. This is also the torque
that the block uses to compute the electrical losses.

The block only considers torque-dependent resistive losses such that

$${P}_{losses}=k{\tau}_{elec}^{2},$$

where

$$k=\frac{{\omega}_{\eta}\left(1-\eta /100\right)}{{\tau}_{\eta}\cdot \eta /100}.$$

Resistive losses are also known as Ohmic losses and occur due to the tendency of the armature windings to resist the flow of electrons. The electrical power includes these losses such that

$${P}_{elec}={P}_{losses}+\omega {\tau}_{elec}.$$

The rate of conversion from electrical energy to heat energy is defined by Joule's law:

$$I=\frac{{P}_{elec}}{V},$$

where:

*P*is the electrical power that the block calculates and uses in the governing equation._{elec}*P*is the electrical power lost during operation. When you model the effects of heat flow and temperature change, this value represents the rate of heat flow that gets distributed into the thermal mass or out port_{losses}**H**.*ω*is the angular velocity of the rotor. This is equivalent to the**W**output port value.*τ*is the saturated torque demand._{elec}*k*is the proportionality constant for resistance losses, which has the units*(energy*time)*.^{-1}*η*is the efficiency of the motor and driver for a given speed and torque. This value is equivalent to the**Motor and driver overall efficiency (percent)**parameter.*ω*is the angular velocity that corresponds to the overall efficiency. This value is equivalent to the_{η}**Speed at which efficiency is measured**parameter.*τ*is the torque that corresponds to the overall efficiency. This value is equivalent to the_{η}**Torque at which efficiency is measured**parameter.*V*is the voltage across the terminals.*I*is the current through the terminals.

When you enable thermal modeling,
*P _{losses}* represents the
contribution from the block to the heat flow.

To include series resistance, fixed losses, and iron losses, you can add blocks to your model or use the Motor & Drive (System Level) (Simscape Electrical) block.

**Tip**

You can add damping and inertia with the Rotational Damper block and Inertia block, respectively.

### Thermal Modeling

You can model the effects of heat flow and temperature change by enabling the optional
thermal port. To enable the port, set **Thermal port** to
`Model`

.

When you model the effects of heat flow and temperature change, the electrical losses from the motor contribute to these effects.

### Variables

Use the **Variables** tab to set the priority and initial
target values for the block variables before simulating. For more information,
see Set Priority and Initial Target for Block Variables.

**Dependencies**

To enable this setting, set **Thermal port** to
`Model`

.

### Assumptions and Limitations

The motor driver tracks a torque demand with the time constant

*T*._{c}Motor speed fluctuations due to mechanical load do not affect the motor torque tracking.

## Ports

### Input

### Output

### Conserving

## Parameters

## Model Examples

## Version History

**Introduced in R2021a**

## See Also

Motor & Drive (System Level) (Simscape Electrical)