# generateMotorDriveROM

## Syntax

## Description

The `generateMotorDriveROM`

function takes a motor drive
subsystem and creates a reduced-order model (ROM) in the form of a Motor &
Drive (System Level) block and parameterizes it with tabulated maximum
torque in function of rotor speed and DC voltage, and tabulated power dissipated in function
of rotor speed, shaft torque, and DC voltage.

The model-order reduction transforms a high-fidelity, computationally expensive model into an equivalent model that is easier to interpret and runs faster. This model is called a reduced-order model. A ROM captures the steady-state behavior of a motor drive in terms of energy balance and maximum torque capability. A ROM can also accurately capture the first-order response to changes in torque demand.

You can use the ROM to run faster simulations, by replacing the original motor drive subsystem with the generated ROM subsystem. ROMs enable you to quickly test and analyze system-level scenarios where the motor drive interacts with other systems.

`generateMotorDriveROM(`

generates an
equivalent energy-based model from the electric motor drive subsystem
`sys`

)`sys`

.

`generateMotorDriveROM(`

specifies options using one or more name-value arguments in addition to the input argument
in previous syntaxes. For example, for a nominal DC supply voltage equal to 500 V, set
`sys`

,`Name=Value`

)`NominalDCVoltage`

to `500`

.

returns a structure that contains the torque time constant and the lookup tables for the
torque envelop and loss maps.`ROMParameters`

= generateMotorDriveROM(`sys`

,`Name=Value`

)

## Examples

## Input Arguments

## Output Arguments

## Limitations

The generated ROM does not include high-order dynamics, including torque ripple and vibrations, or power switching dynamics. If your model must represent these high-order dynamic behaviors, do not replace the original system.

## Algorithms

The `generateMotorDriveROM`

function runs simulations to calculate the
parameters that define the motor drive system ROM. The function follows these steps:

Compute the torque-tracking time constant — The function simulates a step response from 0 Nm to the nominal torque value specified by the

`NominalTorque`

argument and at the nominal DC supply voltage, specified in the`NominalDCVoltage`

while keeping the rotor speed constant at 10% of the maximum speed. The function fits the response to a first-order response to compute the torque-tracking time constant.Find the maximum torque at zero speed — The function simulates a ramp reference torque response with increasingly higher slopes until the motor drive is unable to keep up with the demand and detaches from the reference. The function uses the value of the

`NominalTorque`

argument as a first guess for this iterative search algorithm. This maximum torque value determines the torque breakpoints for the power losses lookup table.Compute maximum torque-speed envelopes and power losses at the table lookup breakpoints — The function runs a simulation for each speed and voltage breakpoint. The simulation consists of a ramp reference torque response with a slowly increasing torque reference from 0 Nm to the maximum torque value.

## Version History

**Introduced in R2024a**