Main Content

generateDCDCConverterROM

Generate reduced-order model of DC-DC power converter system

Since R2025a

Description

The generateDCDCConverterROM function takes a DC-DC power converter subsystem and creates a reduced-order model (ROM) in the form of a DC-DC Converter block and parameterizes it based on the voltage and current measurements in the original model.

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. The ROM comprises first-order dynamics, linear voltage droop, tabulated efficiency, and required minimum supply voltage.

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

generateDCDCConverterROM(sys) generates an equivalent energy-based model from the DC-DC power converter sys.

generateDCDCConverterROM(sys,Name=Value) specifies options using one or more name-value arguments in addition to the input argument in the previous syntax. For example, to specify the reference output voltage as 80 V, set ReferenceOutputVoltage to 80.

example

ROMParameters = generateDCDCConverterROM(sys,Name=Value) returns a structure that contains the generated ROM data, including the first-order voltage regulation time constant, efficiency lookup tables, voltage droop, and the minimum required supply voltage.

Examples

collapse all

This example shows how to generate the reduced order model (ROM) of a buck converter subsystem.

Open Model

Open the HighFidelityBuckConverter model.

open_system("HighFidelityBuckConverter")

The BuckConverter subsystem models a buck converter by using two high-fidelity N-Channel MOSFET blocks. The subsystem also comprises a continuous PI controller and a driver. 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 DC-DC Converter block: In+, In-, Out+, Out-, and a Simulink input port for the output reference voltage.

  • The subsystem must be able to operate at nominal output conditions for rated power and output voltage and at the input voltage that you specify.

  • The subsystem must not include a DC voltage source on the input side.

  • The subsystem must include a capacitor on the output side.

  • The subsystem must not include a load on the output side.

Generate ROM

Run the generateDCDCConverterROM function to generate the ROM of the BuckConverter subsystem and set these options:

  • Specify the lookup table breakpoints for the input voltage and the output power.

  • Based on the model, the reference output voltage is 15 V.

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

  • Set the minimum simulation time of the generated test harness model to 0.003 seconds.

generateDCDCConverterROM("HighFidelityBuckConverter/BuckConverter", ...
    InputVoltageBreakpoints=[27,30], ...
    ReferenceOutputVoltage=15, ...
    OutputPowerBreakpoints=[20:10:100], ...
    UseParallel=true, ...
    MinimumSimulationTime=0.003);
Using:
Reference voltage = 15 V
Input voltage breakpoints = [27;30] V
Output power breakpoints = [20;30;40;50;60;70;80;90;100] W
Maximum output power = 100 W
Auto-selected nominal operating conditions:
Using:
Input voltage = 27 V
Reference voltage = 15 V
Power flows in Forward direction.
Load resistance values used = 11.25 Ohm
Validating harness initialization at nominal operating conditions ...
	Running iteration #1 : StopTime = 0.003
Auto-selected nominal operating conditions:
Using:
Input voltage = 30 V
Reference voltage = 15 V
Power flows in Forward direction.
Load resistance values used = 11.25 Ohm
Validating harness initialization at nominal operating conditions ...
	Running iteration #1 : StopTime = 0.003
Auto-selected nominal operating conditions:
Using:
Input voltage = 27 V
Reference voltage = 15 V
Power flows in Forward direction.
Load resistance values used = 2.25 Ohm
Validating harness initialization at nominal operating conditions ...
	Running iteration #1 : StopTime = 0.003
Auto-selected nominal operating conditions:
Using:
Input voltage = 30 V
Reference voltage = 15 V
Power flows in Forward direction.
Load resistance values used = 2.25 Ohm
Validating harness initialization at nominal operating conditions ...
	Running iteration #1 : StopTime = 0.003
Computing voltage regulation time constant ...
	Running iteration #1 : StopTime = 0.006

Figure contains an axes object. The axes object with title Simulation Results for Voltage Regulation Time Constant Calculation Input DC Voltage = 30V Output Power = 100W, xlabel Time [s], ylabel Voltage [V] contains 3 objects of type line. These objects represent Voltage reference, Response, Fitted response (First order).

Computing voltage droop ...
Using:
Reference voltage = 15 V
Input voltage breakpoints = 30 V
Load resistance values used = [2.8125 2.5 2.25] Ohm
Power flows in Forward direction.
	Running iteration #1 : Stop times = [0.009 0.009 0.009]sec
[09-Jan-2025 16:54:34] Checking for availability of parallel pool...
Starting parallel pool (parpool) using the 'Processes' profile ...
09-Jan-2025 16:55:51: Job Queued. Waiting for parallel pool job with ID 2 to start ...
Connected to parallel pool with 4 workers.
[09-Jan-2025 16:56:20] Starting Simulink on parallel workers...
[09-Jan-2025 16:57:04] Configuring simulation cache folder on parallel workers...
[09-Jan-2025 16:57:08] Loading model on parallel workers...
[09-Jan-2025 16:57:33] Running simulations...
[09-Jan-2025 16:59:35] Cleaning up parallel workers...
	Running iteration #2 : Stop times = [0.0135 0.0135 0.0135]sec
[09-Jan-2025 16:59:50] Checking for availability of parallel pool...
[09-Jan-2025 16:59:50] Starting Simulink on parallel workers...
[09-Jan-2025 16:59:52] Configuring simulation cache folder on parallel workers...
[09-Jan-2025 16:59:52] Loading model on parallel workers...
[09-Jan-2025 16:59:59] Running simulations...
[09-Jan-2025 17:01:52] Cleaning up parallel workers...
	Running iteration #3 : Stop times = [0.018 0.018 0.018]sec
[09-Jan-2025 17:02:01] Checking for availability of parallel pool...
[09-Jan-2025 17:02:01] Starting Simulink on parallel workers...
[09-Jan-2025 17:02:03] Configuring simulation cache folder on parallel workers...
[09-Jan-2025 17:02:03] Loading model on parallel workers...
[09-Jan-2025 17:02:07] Running simulations...
[09-Jan-2025 17:04:32] Cleaning up parallel workers...
	Running iteration #4 : Stop times = [0.0225 0.0225 0.0225]sec
[09-Jan-2025 17:04:39] Checking for availability of parallel pool...
[09-Jan-2025 17:04:39] Starting Simulink on parallel workers...
[09-Jan-2025 17:04:41] Configuring simulation cache folder on parallel workers...
[09-Jan-2025 17:04:41] Loading model on parallel workers...
[09-Jan-2025 17:04:45] Running simulations...
[09-Jan-2025 17:06:56] Cleaning up parallel workers...
	Running iteration #5 : Stop times = [0.027 0.027 0.027]sec
[09-Jan-2025 17:07:05] Checking for availability of parallel pool...
[09-Jan-2025 17:07:05] Starting Simulink on parallel workers...
[09-Jan-2025 17:07:06] Configuring simulation cache folder on parallel workers...
[09-Jan-2025 17:07:06] Loading model on parallel workers...
[09-Jan-2025 17:07:12] Running simulations...
[09-Jan-2025 17:10:04] Cleaning up parallel workers...
	Running iteration #6 : Stop times = [0.0315 0.0315 0.0315]sec
[09-Jan-2025 17:10:11] Checking for availability of parallel pool...
[09-Jan-2025 17:10:11] Starting Simulink on parallel workers...
[09-Jan-2025 17:10:13] Configuring simulation cache folder on parallel workers...
[09-Jan-2025 17:10:13] Loading model on parallel workers...
[09-Jan-2025 17:10:17] Running simulations...
[09-Jan-2025 17:13:45] Cleaning up parallel workers...
Calculated droop is smaller than the specified threshold of 1e-6 * Minimum load resistance used. Assuming zero voltage droop.

Figure contains an axes object. The axes object with title Simulation Results for Voltage Droop Calculation, xlabel Output Current (A), ylabel Voltage Droop (V) contains 2 objects of type line. One or more of the lines displays its values using only markers These objects represent Results, Fitted.

Computing efficiency lookup table in Forward operating mode ...
Using:
Reference voltage = 15 V
Input voltage breakpoints = [27;30] V
Output power breakpoints = [20;30;40;50;60;70;80;90;100] W
[09-Jan-2025 17:14:01] Checking for availability of parallel pool...
[09-Jan-2025 17:14:01] Starting Simulink on parallel workers...
[09-Jan-2025 17:14:04] Configuring simulation cache folder on parallel workers...
[09-Jan-2025 17:14:04] Loading model on parallel workers...
[09-Jan-2025 17:14:09] Running simulations...
[09-Jan-2025 17:31:06] Cleaning up parallel workers...

Figure contains an axes object. The axes object with title Simulation Results for Power Conversion Efficiency Calculation Output Voltage Reference = 15V, xlabel Output Current [A], ylabel Efficiency [%] contains 2 objects of type line. These objects represent Input Vdc = 27V, Input Vdc = 30V.

Computing minimum input voltage required ...
Using:
Reference voltage = 15 V
Input voltage = 27 V
Output power breakpoints = 100 W

Figure contains an axes object. The axes object with xlabel Time [sec], ylabel Voltage [V] contains 3 objects of type line. These objects represent Output voltage, Input voltage.

Running ROM harness model ...
Using:
Reference voltage = 15 V
Input voltage breakpoints = [27;30] V
Output power breakpoints = [20;30;40;50;60;70;80;90;100] W
[09-Jan-2025 17:40:46] Checking for availability of parallel pool...
[09-Jan-2025 17:40:46] Starting Simulink on parallel workers...
[09-Jan-2025 17:40:49] Configuring simulation cache folder on parallel workers...
[09-Jan-2025 17:40:49] Loading model on parallel workers...
[09-Jan-2025 17:40:57] Running simulations...
[09-Jan-2025 17:41:17] Cleaning up parallel workers...

Figure contains an axes object. The axes object with xlabel Load current [A], ylabel Voltage droop [V] contains 2 objects of type line. One or more of the lines displays its values using only markers These objects represent ROM, Original.

Figure contains an axes object. The axes object with title Output Voltage Waveforms Input Voltage = 30V Output Power = 100W Original model vs. ROM, xlabel Time [sec], ylabel Output Voltage [V] contains 2 objects of type line. These objects represent ROM, Original.

Figure contains 2 axes objects. Axes object 1 with title Input Current Waveforms Input Voltage = 27V Output Power = 20W Original model vs. ROM, xlabel Time [sec], ylabel Input Current [A] contains 2 objects of type line. These objects represent ROM, Original. Axes object 2 with title Input Current Waveforms Input Voltage = 30V Output Power = 20W Original model vs. ROM, xlabel Time [sec], ylabel Input Current [A] contains 2 objects of type line. These objects represent ROM, Original.

Figure contains 2 axes objects. Axes object 1 with title Input Current Waveforms Input Voltage = 27V Output Power = 30W Original model vs. ROM, xlabel Time [sec], ylabel Input Current [A] contains 2 objects of type line. These objects represent ROM, Original. Axes object 2 with title Input Current Waveforms Input Voltage = 30V Output Power = 30W Original model vs. ROM, xlabel Time [sec], ylabel Input Current [A] contains 2 objects of type line. These objects represent ROM, Original.

Figure contains 2 axes objects. Axes object 1 with title Input Current Waveforms Input Voltage = 27V Output Power = 40W Original model vs. ROM, xlabel Time [sec], ylabel Input Current [A] contains 2 objects of type line. These objects represent ROM, Original. Axes object 2 with title Input Current Waveforms Input Voltage = 30V Output Power = 40W Original model vs. ROM, xlabel Time [sec], ylabel Input Current [A] contains 2 objects of type line. These objects represent ROM, Original.

Figure contains 2 axes objects. Axes object 1 with title Input Current Waveforms Input Voltage = 27V Output Power = 50W Original model vs. ROM, xlabel Time [sec], ylabel Input Current [A] contains 2 objects of type line. These objects represent ROM, Original. Axes object 2 with title Input Current Waveforms Input Voltage = 30V Output Power = 50W Original model vs. ROM, xlabel Time [sec], ylabel Input Current [A] contains 2 objects of type line. These objects represent ROM, Original.

Figure contains 2 axes objects. Axes object 1 with title Input Current Waveforms Input Voltage = 27V Output Power = 60W Original model vs. ROM, xlabel Time [sec], ylabel Input Current [A] contains 2 objects of type line. These objects represent ROM, Original. Axes object 2 with title Input Current Waveforms Input Voltage = 30V Output Power = 60W Original model vs. ROM, xlabel Time [sec], ylabel Input Current [A] contains 2 objects of type line. These objects represent ROM, Original.

Figure contains 2 axes objects. Axes object 1 with title Input Current Waveforms Input Voltage = 27V Output Power = 70W Original model vs. ROM, xlabel Time [sec], ylabel Input Current [A] contains 2 objects of type line. These objects represent ROM, Original. Axes object 2 with title Input Current Waveforms Input Voltage = 30V Output Power = 70W Original model vs. ROM, xlabel Time [sec], ylabel Input Current [A] contains 2 objects of type line. These objects represent ROM, Original.

Figure contains 2 axes objects. Axes object 1 with title Input Current Waveforms Input Voltage = 27V Output Power = 80W Original model vs. ROM, xlabel Time [sec], ylabel Input Current [A] contains 2 objects of type line. These objects represent ROM, Original. Axes object 2 with title Input Current Waveforms Input Voltage = 30V Output Power = 80W Original model vs. ROM, xlabel Time [sec], ylabel Input Current [A] contains 2 objects of type line. These objects represent ROM, Original.

Figure contains 2 axes objects. Axes object 1 with title Input Current Waveforms Input Voltage = 27V Output Power = 90W Original model vs. ROM, xlabel Time [sec], ylabel Input Current [A] contains 2 objects of type line. These objects represent ROM, Original. Axes object 2 with title Input Current Waveforms Input Voltage = 30V Output Power = 90W Original model vs. ROM, xlabel Time [sec], ylabel Input Current [A] contains 2 objects of type line. These objects represent ROM, Original.

Figure contains 2 axes objects. Axes object 1 with title Input Current Waveforms Input Voltage = 27V Output Power = 100W Original model vs. ROM, xlabel Time [sec], ylabel Input Current [A] contains 2 objects of type line. These objects represent ROM, Original. Axes object 2 with title Input Current Waveforms Input Voltage = 30V Output Power = 100W Original model vs. ROM, xlabel Time [sec], ylabel Input Current [A] contains 2 objects of type line. These objects represent ROM, Original.

Figure contains an axes object. The axes object with title Simulation Results for Power Conversion Efficiency Calculation Original model vs. ROM, xlabel Output Current [A], ylabel Efficiency [%] contains 4 objects of type line. One or more of the lines displays its values using only markers These objects represent Input Vdc = 27V - Original, Input Vdc = 30V - Original, Input Vdc = 27V - ROM, Input Vdc = 30V - ROM.

ROM generation complete.

Input Arguments

collapse all

Block path to the DC-DC power converter subsystem from which the function generates the ROM, specified as a character vector or a string.

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 DC-DC Converter block: In+, In-, Out+, Out-, and a Simulink input port for the output voltage reference.

  • The subsystem must be able to operate at nominal output conditions for rated power and output voltage and at the input voltage that you specify.

  • The subsystem must not include a load on the output side. For forward-operating mode, the function automatically creates a harness model with a load resistor connected to the output side. For reverse-operating mode, the function automatically creates a harness model with a constant current source connected to the output side.

  • The subsystem must not include a DC voltage source on the input side. The function automatically creates harness models with a DC voltage source connected to the input side.

  • The subsystem must include a capacitor on the output side. If you set the PowerFlowDirection argument to "Bidirectional", the function creates a test harness model for the reverse power flow with a constant current source that connects to the output side. By connecting a capacitor to the output side in the subsystem, you create a path for the current to flow at the initial stage.

Name-Value Arguments

collapse all

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: generateDCDCConverterROM("model",InputVoltageBreakpoints=25,OutputPowerBreakpoints=[100,200,300]);

Input DC voltage breakpoints, in volts, for the efficiency lookup table, specified as a positive scalar or a vector of positive elements. If you specify a positive scalar value for this argument, the power conversion efficiency of the generated ROM is independent of the input voltage.

Reference output voltage, in volts, specified as a positive scalar.

Output power breakpoints, in watts, for the efficiency lookup table, specified as a vector of at least three different elements.

If you specify more than three values, the function only takes the last three positive values to compute the voltage droop.

Direction of the power flow of the target subsystem, specified as one of these options:

  • "Unidirectional" — Specify only positive values for the OutputPowerBreakpoints argument.

  • "Bidirectional" — Specify both negative and positive values for the OutputPowerBreakpoints argument. If you set this argument to "Bidirectional" and you specify only positive values for the OutputPowerBreakpoints argument, then this function flips the polarity of the positive values to set the negative breakpoints.

Option to display the simulation progress of the function and results, specified as either true or false.

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™.

Minimum simulation time, in seconds, that this function uses for validating the generated test harness model during the first stage, specified as a positive scalar. For later stages such as when computing the droop or the efficiency, this function scales up the simulation time using a scaling factor. The scaling factor depends on the dynamic response of the subsystem under a step change in voltage reference, as the converter requires additional time to reach its new steady state operating point after the step is applied.

Output Arguments

collapse all

ROM parameters generated from the DC-DC power converter system, returned as a structure with these fields:

Voltage regulation time constant, in seconds, returned as a nonnegative scalar.

Measured output voltage droop, in volts, for the corresponding mean output current values, returned as a vector.

Measured mean output currents for droop measurement, in amps, returned as a nonnegative vector.

2-D lookup table of power conversion efficiency in terms of output current and input voltage, in percentage, returned as a nonnegative matrix.

Measured mean output currents, in amps, for the tabulation of the efficiency lookup table, returned as a vector.

Measured input voltage values, in volts, for the tabulation of the efficiency lookup table, returned as a nonnegative vector or scalar.

Minimum input supply voltage, in volts, required for the subsystem to function, returned as a nonnegative scalar.

Operating mode of the subsystem, returned as "Unidirectional" or "Bidirectional".

If you set the PowerFlowDirection argument to "Bidirectional", the software validates the harness model at both forward operating mode, where power flows from the input side to the output side, and reverse operating mode, where power flows from the output to input side. If this validation succeeds at forward operating mode but fails at reverse operating mode, then the function considers the subsystem capable of unidirectional operation only. In this case, the value of this argument is "Unidirectional". Otherwise, the value of this argument matches the value you specify for the PowerFlowDirection argument.

Limitations

  • The generated ROM does not include high-order dynamics. If your model must represent high-order dynamic behaviors, do not replace the original system.

  • The generateDCDCConverterROM function only loads these variables into the harness model workspace:

    • Variables that you specify inside the PreLoadFcn and PostLoadFcn model callbacks of your original model

    • Variables inside the model workspace of your original model

    If the blocks of your model uses variables in the InitFcn model callback, this function returns an invalid parameter name error when simulating the harness model. For more information about model callbacks, see Model Callbacks.

Version History

Introduced in R2025a