%% Calculate Maximum Voltage Derivatives for a Specific Time Period


% Copyright 2018 The MathWorks, Inc.

%%
% Open the Class E DC-DC Converter example model.
open_system('ee_converter_dcdc_class_e')
%%
% This example model has data logging enabled. Run the simulation to create
% the simulation log variable |simlog_ee_converter_dcdc_class_e| in your 
% current workspace.
sim('ee_converter_dcdc_class_e');
%% 
% The model simulation time is 1.25e-4 seconds. Calculate and display the 
% maximum absolute values of rates-of-change of voltage variables for the 
% LDMOS block during the second half of the simulation. Use a time step 
% of 1e-9 seconds.
mosfetTable1 = ee_getNodeDvDtSummary(simlog_ee_converter_dcdc_class_e.LDMOS,1e-9,0.5*1.25e-4)
%%
% The table shows the maximum absolute values of voltage rates-of-change 
% for the LDMOS block during the second half of the simulation. The table 
% does not list the S terminal because it is held fixed to the ground. 
% The magnitude of the D terminal is lower than the magnitude for the whole 
% simulation time because the initial high-magnitude spikes of the stress 
% voltage are disregarded.
% 
% To see the voltage time derivative for the D terminal of the 
% LDMOS block over the whole simulation time, use the
% |ee_getNodeDvDtTimeSeries| function.