# Model a Motor Drive with Multiple Intermittent Torque Limits

Since R2024a

This example shows how to model a motor drive with multiple intermittent over-torque limits by using Simscape™ Electrical™.

Motor drives operate at a range of torques and speeds. For a given speed, there is a maximum continuous operating torque. Exceeding the maximum continuous torque can overheat the motor and produce irreversible failures and safety hazards. However, in some cases you may want to exceed this limit for brief periods of time.

You can use the Motor & Drive (System Level) to intermittently exceed the torque limit. The block includes an option for one intermittent over-torque limit. In this example, you learn how to implement more than one intermittent over-torque limit with Simulink® blocks.

### Model Overview

The model combines the Motor & Drive (System Level) block with mechanical sensors that measure torque and speed, and the `Torque Limit Logic` subsystem.

### Torque Limit Logic Subsystem

The `Torque Limit Logic` subsystem uses four 1-D Lookup Table blocks to define the four torque envelopes as percent over-torque values with respect to the continuous operation maximum torque.

The `Envelope Request` MATLAB Function block selects the most conservative envelope that achieves the requested torque. If no envelope reaches the requested torque, it selects the most ambitious envelope.

The `Envelope Request Executive` MATLAB Function block then receives this request and chooses the permitted envelope based on the exceedance time since the beginning of the over-torque event.

The `Envelope Request Executive` block also integrates exceedance and recovery time, and resets both when necessary. To avoid algebraic loops, the block uses the state port of the Integrator block instead of the output port.

### Validate Model

Simulate the model to verify that the `Torque Limit Logic` subsystem correctly implements the intermittent torque limits.

The model limits the torque according to the over-torque percent values and respects the specified duration of each limit and the recovery time.