Main Content

generateMotorDriveROM

Generate reduced-order model of motor drive system

Since R2024a

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(sys) generates an equivalent energy-based model from the electric motor drive subsystem sys.

example

generateMotorDriveROM(sys,Name=Value) 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 NominalDCVoltage to 500.

ROMParameters = generateMotorDriveROM(sys,Name=Value) returns a structure that contains the torque time constant and the lookup tables for the torque envelop and loss maps.

Examples

collapse all

This example shows how to generate the reduced order model (ROM) of a PMSM motor drive subsystem.

Open Model

Open the PMSMMotorDrive.slx model.

open_system("PMSMMotorDrive")

The PMSMDrive subsystem comprises a detailed motor drive model with a converter, a motor, sensors, and a torque control loop. This motor drive has a nominal DC voltage of 486 V, a maximum shaft speed of 4000 RPM, and a rated torque of 90 Nm.

Ensure that the subsystem has the correct port names and port types. The subsystem must follow these rules:

  • The ports of the subsystem must match the ports of the Motor & Drive (System Level) block: +, -, R, C, and a Simulink input port for the torque reference, in Nm.

  • The subsystem must be able to follow the torque reference dynamically for all torque values below the maximum torque you designed the drive for.

  • The initial state must be such that the torque is zero.

Generate ROM

Run the generateMotorDriveROM function to generate the ROM of the PMSMDrive subsystem and set these options:

  • The drive operates as a motor (positive speed, positive torque).

  • Based on the motor drive specifications, the nominal DC voltage is 486 V, the maximum speed is 4000 rpm, and the nominal torque is 90 Nm.

  • For a good balance between ROM accuracy and computational cost to generate the ROM, choose a grid of 12 speed breakpoints, 40 torque breakpoints, and three DC voltage breakpoints. Set the DC voltage breakpoints to 80%, 90%, and 100% of the nominal voltage. If you require more accuracy, reduce the ROM interpolation error by increasing the number of breakpoints to specify a grid with higher resolution. However, a higher number of breakpoints increases the computational cost to generate the ROM.

  • To run simulations in parallel, set UseParallel to true.

generateMotorDriveROM("PMSMMotorDrive/PMSMDrive", ...
    OperatingMode="motor", ...
    NominalDCVoltage=486, ...
    MaxRotorRPM=4000, ...
    NominalTorque=90, ...
    NumRPMBreakpoints=12, ...
    NumTorqueBreakpoints=40, ...
    PerUnitDCVoltageBreakpoints=[0.8, 0.9, 1.0], ...
    UseParallel=true);

Input Arguments

collapse all

Block path to the motor drive subsystem from which the function generates the ROM, specified as a character vector or a string.

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: generateMotorDriveROM("model",NominalDCVoltage=48,NominalTorque=5,MaxRotorRPM=4500);

Option to specify the quadrants to explore in the torque-speed region, specified as:

  • "motor" — The function explores the first quadrant only where both the revolution per minute and the torque are greater than 0.

  • "generator" — The function explores the fourth quadrant only, where the revolution per minute is lower than zero and the torque is greater than zero.

  • "motor-generator" — The function explores the first and fourth quadrants, where the torque is greater than 0.

The function computes the missing quadrants by symmetry with the other quadrants. The third quadrant is symmetric with the first quadrant and the second quadrant is symmetric with the fourth quadrant.

Nominal DC supply voltage, in volts, specified as a nonnegative scalar. The values of the NominalDcVoltage and PerUnitDCVoltageBreakpoints arguments determine the voltage breakpoints, as defined by this equation:

DCVoltageBreakpoints = NominalDCVoltage*PerUnitDCVoltageBreakpoints

Maximum rotor speed to explore, in revolutions per minute (RPM), specified as a nonnegative scalar. The value of this argument determines the speed breakpoints.

Nominal torque reference, in Nm, specified as a nonnegative scalar. The function uses the value of this parameter to compute the torque time constant at 10% of the maximum speed.

Number of speed breakpoints for the lookup tables, specified as a positive scalar.

Number of torque breakpoints for the lookup tables, specified as a positive scalar.

DC supply voltage breakpoints, specified as a vector of positive per-unit values with respect to the NominalDCVoltage argument. The values of the NominalDcVoltage and PerUnitDCVoltageBreakpoints arguments determine the voltage breakpoints, as defined by this equation:

DCVoltageBreakpoints = NominalDCVoltage*PerUnitDCVoltageBreakpoints

Option to display the progress of the function and results, specified as either true or false. To display the results, you must set CreateModel to true.

Option to create a Simulink model that contains the ROM, specified as either true or false.

Option to use parallel simulations, specified as either true or false. This option requires the Parallel Computing Toolbox™.

Output Arguments

collapse all

ROM parameters generated from the motor drive system, returned as a structure with these fields:

Torque time constant, in seconds, returned as a nonnegative scalar.

Lookup table for the torque envelop, returned as a structure.

Lookup table for the loss maps, returned as a structure.

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