Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Calculate rates-of-change of voltage variables

`seriesTable = elec_getNodeDvDtTimeSeries(node,tau)`

calculates rates-of-change of voltage variables for nodes that are based on the
`seriesTable`

= elec_getNodeDvDtTimeSeries(`node`

,`tau`

)`foundation.electrical.electrical`

domain, based on logged simulation
data. The function returns the data for each terminal in a table. The data in the table
appears in descending order according to the maximum absolute value of the rate-of-change of
voltage variables with respect to the ground, over the whole simulation time. The table does
not contain data for terminals that are held fixed.

Before you call this function, you must have the simulation log variable in your current
workspace. Create the simulation log variable by simulating the model with data logging
turned on, or load a previously saved variable from a file. If `node`

is
the name of the simulation log variable, then the table contains the data for all the blocks
in the model that have nodes based on the
`foundation.electrical.electrical`

domain. If `node`

is the name of a node in the simulation data tree, then the table contains the data only for
the children of that node.

Examining rates-of-change of voltage variables in power electronics circuits is useful
for determining the potential for unwanted conducted or radiated emissions. The
rate-of-change data also helps you to identify unwanted turn-on of switching devices. All
nodes that are based on the `foundation.electrical.electrical`

domain store
the potential with respect to electrical ground as the variable `v`

. When
you log simulation data, the time-value series for this variable represents the trend of the
potential over time. You can view and plot this data using the Simscape™ Results Explorer.

To evaluate the rates-of-change of voltage variables, the
`elec_getNodeDvDtTimeSeries`

function employs finite difference
approximation of the first derivative with respect to time. It performs 1-D data linear
interpolation of voltage variables using a uniform grid with the time step,
`tau`

. The function then applies the central differencing scheme to the
interpolated data.

For small time steps, finite differencing may lead to inaccurate results. The time
step `tau`

should be small enough to capture waveforms, but not so
small that the finite differencing error becomes large. For example, for power
transistors with an expected limit of 50 V/ns for their voltage rate-of-change, a
reasonable guess for `tau`

is 1e-9 s.

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');
```

Calculate rates-of-change of voltage variables for the whole model with a time step of 1e-9 seconds, and return the time series data in a table.

seriesTable = elec_getNodeDvDtTimeSeries(simlog_ee_converter_dcdc_class_e,1e-9)

seriesTable = 19x4 table LoggingNode Terminal Voltage dvdt ____________________________________________________________________________ ________ _________________ _________________ "ee_converter_dcdc_class_e.R_Trans" "n" [1x125001 double] [1x125001 double] "ee_converter_dcdc_class_e.Transformer" "p1" [1x125001 double] [1x125001 double] "ee_converter_dcdc_class_e.Cs" "n" [1x125001 double] [1x125001 double] "ee_converter_dcdc_class_e.R_Trans" "p" [1x125001 double] [1x125001 double] "ee_converter_dcdc_class_e.Cs" "p" [1x125001 double] [1x125001 double] "ee_converter_dcdc_class_e.LDMOS" "D" [1x125001 double] [1x125001 double] "ee_converter_dcdc_class_e.Ls" "n" [1x125001 double] [1x125001 double] "ee_converter_dcdc_class_e.Sense_Vds.Voltage_Stress_Sensor" "p" [1x125001 double] [1x125001 double] "ee_converter_dcdc_class_e.D2" "p" [1x125001 double] [1x125001 double] "ee_converter_dcdc_class_e.Transformer" "n3" [1x125001 double] [1x125001 double] "ee_converter_dcdc_class_e.D1" "p" [1x125001 double] [1x125001 double] "ee_converter_dcdc_class_e.Transformer" "p2" [1x125001 double] [1x125001 double] "ee_converter_dcdc_class_e.Behavioral_Gate_Driver.Controlled_Voltage_Source" "p" [1x125001 double] [1x125001 double] "ee_converter_dcdc_class_e.LDMOS" "G" [1x125001 double] [1x125001 double] "ee_converter_dcdc_class_e.Cout" "p" [1x125001 double] [1x125001 double] "ee_converter_dcdc_class_e.D1" "n" [1x125001 double] [1x125001 double] "ee_converter_dcdc_class_e.D2" "n" [1x125001 double] [1x125001 double] "ee_converter_dcdc_class_e.R_Load" "p" [1x125001 double] [1x125001 double] "ee_converter_dcdc_class_e.Sense_Vout.Voltage_Sensor" "p" [1x125001 double] [1x125001 double]

The table contains time series data of voltage variables and their first derivatives
over the whole simulation time for all the blocks in the model that have nodes based on the
`foundation.electrical.electrical`

domain.

View the time series data. From the workspace, open the `seriesTable`

table, then open the two `1x125001 double`

numeric arrays for the
`ee_converter_dcdc_class_e.LDMOS.D`

.

The first array contains the voltage data. The second array contains the voltage derivative data.

Plot the data.

time = 0:1e-9:1.25e-4; vOut = seriesTable.Voltage{6}; dvdtOut = seriesTable.dvdt{6}; ax1 = subplot(2,1,1); plot(time,vOut),grid; ylabel('Voltage (V)'); axis([0 1.25e-4 0 1000]); ax1.XTickLabel = {}; ax1.Title.String = 'LDMOS Stress Voltage'; ax2 = subplot(2,1,2); plot(time,dvdtOut),grid; ylabel('Voltage Derivative (V/s)'); xlabel('Time (s)'); axis([0 1.25e-4 0 4e10]); ax2.Title.String = 'LDMOS Stress Voltage Derivative';

`ee_getNodeDvDtSummary`

| `ee_getNodeDvDtTimeSeries`

| `sscexplore`

- About Simulation Data Logging (Simscape)
- About the Simscape Results Explorer (Simscape)