Find Periodic Operating Point for Buck Converter with Thermal Components
This example shows how to find a periodic steady-state operating point for a power electronics circuit modeled using Simscape™ and Simscape Electrical™ components. More specifically, this example finds a periodic operating point for a realistic buck converter with thermal components.
To find a steady-state operating point:
Select a periodic signal in the model to monitor.
Specify the known period of the signal.
Specify a convergence tolerance for the periodic signal values.
Calculate the operating point using these specifications.
You can then use the operating point for additional analysis, such as simulation and frequency response estimation.
When you use this approach for finding a periodic operating point, you cannot specify additional trimming specifications, such as known state, input, and output values for any signals in the model.
Buck Converter Model
The plant model is adapted from a buck converter with thermal dynamics. The switching power supply converts a 30V DC supply into a regulated 15V DC supply. Modeling the switching devices as MOSFETs rather than ideal switches ensures that device on-resistances are correctly represented. The model also captures the switch-on/switch-off timing of the devices, which depends primarily on the gate capacitance values and the PWM driver output resistance. In addition, thermal ports are enabled in the MOSFET blocks, which are connected to heat sinks with heat flow measurements.
mdl = "scdBuckThermalDynamicsPOP";
open_system(mdl)
Due to the small switching steps and slow time constant of the thermal dynamics, it takes several minutes to simulate over the initial transients.
tic
sim(mdl,StopTime="0.1");
tocElapsed time is 199.696079 seconds.
After the initial transient, the model converges to a periodic steady state. View the initial transients in the output voltage, control signal, and supply current.
open_system(mdl + "/Scope")
While you can use such a simulation to find a steady-state operating point, the simulation takes a long time and you must manually confirm that the system is actually in a periodic steady-state condition.
Close the scope.
close_system(mdl + "/Scope")Define Periodic Operating Point Specification
Create an operating point specification for the model using the operspec function.
opspec = operspec(mdl);
When finding a periodic operating point, you can monitor one signal to determine when the model converges to a periodic steady state. Since this model has no root-level output ports to monitor, you must add an output specification for the periodic signal. For this example, add an output specification to the output of the Voltage Sensor block.
opspec = addoutputspec(opspec,mdl + "/Voltage sensor",1);Specify the known period for the output signal. For this example, use a period of 2e-5 sec, which is the period of the PWM generator.
opspec.Outputs.Period = 2e-5;
Specify a tolerance for the periodic signal convergence. This value is the tolerance for determining whether two points in the signal, separated by one period, are equal.
opspec.Outputs.PeriodicTolerance = 5e-5;
View the final output specification for the periodic signal.
opspec.Outputs
ans =
y Known Min Max Period PeriodicTolerance
_________________ _________________ _________________ _________________ _________________ _________________
(1.) scdBuckThermalDynamicsPOP/Voltage sensor
0 false -Inf Inf 2e-05 5e-05
When you monitor the periodic signal, the software ignores the Known, Min, and Max specifications for the signal.
Find Operating Point
To find an operating point that meets these specifications, use the findop function. The software simulates the model from its initial condition and determines when the monitored signal is in a periodic steady state within the specified tolerance. This method finds the steady-state operating point in seconds, as opposed to minutes for a regular simulation.
tic [op,opreport] = findop(mdl,opspec);
Operating point search report: ---------------------------------
opreport =
Operating point search report for the Model scdBuckThermalDynamicsPOP.
(Time-Varying Components Evaluated at time t=0.00132078)
Periodic steady-state specification includes a nonzero, finite period. Steady-state signal converged at time 0.0013208 seconds.
States:
----------
Min x Max dxMin dx dxMax
___________ ___________ ___________ ___________ ___________ ___________
(1.) scdBuckThermalDynamicsPOP.C.vc
-Inf 14.9629 Inf 0 0 0
(2.) scdBuckThermalDynamicsPOP/Controller/Discrete time PI/Computational delay
-Inf 0.50631 Inf 0 0 0
(3.) scdBuckThermalDynamicsPOP/Controller/Discrete time PI/Delay
-Inf 489.1825 Inf 0 0 0
(4.) scdBuckThermalDynamicsPOP.Diode_1.Cjunction.vc
-Inf -0.98816 Inf 0 0 0
(5.) scdBuckThermalDynamicsPOP.Diode_1.Cjunction.i
-Inf -2.964e-05 Inf 0 0 0
(6.) scdBuckThermalDynamicsPOP.Diode_2.Cjunction.vc
-Inf -29.0118 Inf 0 0 0
(7.) scdBuckThermalDynamicsPOP.Diode_2.Cjunction.i
-Inf 2.964e-05 Inf 0 0 0
(8.) scdBuckThermalDynamicsPOP.Diode_2.Diode.i_diode
-Inf -1.2967e-18 Inf 0 0 0
(9.) scdBuckThermalDynamicsPOP.Driver.Controlled_PWM_Voltage.pwm.v2
-Inf 5 Inf 0 0 0
(10.) scdBuckThermalDynamicsPOP.Driver.Controlled_PWM_Voltage.pwm.duty_cycle
-Inf 0.50119 Inf 0 0 0
(11.) scdBuckThermalDynamicsPOP.Driver.Controlled_PWM_Voltage.pwm.pulse_width
-Inf 1.0024e-05 Inf 0 0 0
(12.) scdBuckThermalDynamicsPOP/Driver/Controlled PWM Voltage
-Inf 0.00132 Inf 0 0 0
(13.) scdBuckThermalDynamicsPOP/Driver/Controlled PWM Voltage
-Inf 3 Inf 0 0 0
(14.) scdBuckThermalDynamicsPOP.Driver.Half_Bridge_Driver.power_dissipated_high_side
-Inf -6.8041e-08 Inf 0 0 0
(15.) scdBuckThermalDynamicsPOP.Driver.Half_Bridge_Driver.power_dissipated_low_side
-Inf -3.5655e-10 Inf 0 0 0
(16.) scdBuckThermalDynamicsPOP/Driver/Half-Bridge Driver
-Inf 0.0013102 Inf 0 0 0
(17.) scdBuckThermalDynamicsPOP/Driver/Half-Bridge Driver
-Inf 0.00132 Inf 0 0 0
(18.) scdBuckThermalDynamicsPOP/Driver/Half-Bridge Driver
-Inf 5 Inf 0 0 0
(19.) scdBuckThermalDynamicsPOP/Driver/Half-Bridge Driver
-Inf 2 Inf 0 0 0
(20.) scdBuckThermalDynamicsPOP/Driver/Simulink-PS Converter
-Inf 0 Inf 0 0 0
-Inf 0.50119 Inf 0 0 0
(21.) scdBuckThermalDynamicsPOP.L.i_L
-Inf -3.9181 Inf 0 0 0
(22.) scdBuckThermalDynamicsPOP.N_Channel_MOSFET_1.capacitor_GD.vc
-Inf 14.0511 Inf 0 0 0
(23.) scdBuckThermalDynamicsPOP.N_Channel_MOSFET_1.capacitor_GS.vc
-Inf 14.9608 Inf 0 0 0
(24.) scdBuckThermalDynamicsPOP.N_Channel_MOSFET_1.thermal_port.Tc
-Inf 373.0005 Inf 0 0 0
(25.) scdBuckThermalDynamicsPOP.N_Channel_MOSFET_1.thermal_port.Tj
-Inf 430.9468 Inf 0 0 0
(26.) scdBuckThermalDynamicsPOP.N_Channel_MOSFET_1.drainLeadRL.i
-Inf 3.9195 Inf 0 0 0
(27.) scdBuckThermalDynamicsPOP.N_Channel_MOSFET_1.sourceLeadRL.i
-Inf -3.9195 Inf 0 0 0
(28.) scdBuckThermalDynamicsPOP.N_Channel_MOSFET_1.mos.ids
-Inf 3.9194 Inf 0 0 0
(29.) scdBuckThermalDynamicsPOP.N_Channel_MOSFET_1.mos.Q
-Inf -0.0035658 Inf 0 0 0
(30.) scdBuckThermalDynamicsPOP.N_Channel_MOSFET_1.source_resistor.Q
-Inf -0.00015362 Inf 0 0 0
(31.) scdBuckThermalDynamicsPOP.N_Channel_MOSFET_1.thermal_port.Qj
-Inf 0.003873 Inf 0 0 0
(32.) scdBuckThermalDynamicsPOP.N_Channel_MOSFET_2.capacitor_GD.vc
-Inf -29.0118 Inf 0 0 0
(33.) scdBuckThermalDynamicsPOP.N_Channel_MOSFET_2.capacitor_GS.vc
-Inf 2.8908e-06 Inf 0 0 0
(34.) scdBuckThermalDynamicsPOP.N_Channel_MOSFET_2.thermal_port.Tc
-Inf 332.0002 Inf 0 0 0
(35.) scdBuckThermalDynamicsPOP.N_Channel_MOSFET_2.thermal_port.Tj
-Inf 357.9761 Inf 0 0 0
(36.) scdBuckThermalDynamicsPOP.N_Channel_MOSFET_2.drainLeadRL.i
-Inf -1.8174e-05 Inf 0 0 0
(37.) scdBuckThermalDynamicsPOP.N_Channel_MOSFET_2.capacitor_GS.i
-Inf -1.8444e-05 Inf 0 0 0
(38.) scdBuckThermalDynamicsPOP.N_Channel_MOSFET_2.mos.ids
-Inf 2.9012e-11 Inf 0 0 0
(39.) scdBuckThermalDynamicsPOP.N_Channel_MOSFET_2.mos.Q
-Inf -8.4169e-13 Inf 0 0 0
(40.) scdBuckThermalDynamicsPOP.N_Channel_MOSFET_2.source_resistor.Q
-Inf -3.4031e-15 Inf 0 0 0
(41.) scdBuckThermalDynamicsPOP.N_Channel_MOSFET_2.thermal_port.Qj
-Inf 8.4805e-13 Inf 0 0 0
(42.) scdBuckThermalDynamicsPOP/Solver Configuration
-Inf 0 Inf 0 0 0
(43.) scdBuckThermalDynamicsPOP/Solver Configuration
-In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
-Inf 329.9997 Inf 0 0 0
Inputs: None
----------
Outputs:
----------
Min y Max
____ ____ ____
(1.) scdBuckThermalDynamicsPOP/Voltage sensor
-Inf 15 Inf
toc
Elapsed time is 8.638465 seconds.
By default, findop displays an operating point search report in the command window. This report is also available in the opreport output argument.
The report shows that the model converges to a steady-state condition in about 0.00132 seconds.
The operating point search report contains the value of the output signal at this convergence time.
opreport.Outputs.y
ans = 15
To confirm that the output signal is periodic at this time, you can zoom in on the original simulation output signal. At the computed convergence time, the monitored signal, along with other periodic signals in the model, is in a periodic steady state.
