How to find the integral of switching losses from the output waveform from the probe in 3phase VSI ?

I have an electric drive model consisting of a simple DC link, 3 phase VSI integrated with SiC MOSFETS imported from wolf speed,a look up table based PMSM and a controller for the inverter. Now, I want to investigate the influence of DC link voltage on the switching losses . I have a probe giving out a switching loss waveform with instantaneous values. How do I obtain the integral of these values to ?

You can use the “Switch Loss Calculator” block to average the switching and conduction losses over a period. To add switch components to the list of components, select them in the schematic editor and drag them onto the list or the Switch Loss Calculator block. Refer to the “Buck Converter with Thermal Model” demo for an example of how to use this block.