MATLAB: What makes the discharging energy of the capacitor is higher than that already has been charged

capacitorMATLAB and Simulink Student SuiteSimscapeSimscape ElectricalSimscape Electronicssimulink

these curves illustrates the capacitor charging and discharging periods its charging until time 0.037, after that the discharging period will began, as its clear the discharging has more power than charging

Best Answer

its clear the discharging has more power than charging
There is no physical problem with the discharging power being greater than the charging power for a short amount of time. What matters is the total charge being discharged. From your screenshot, it seems that the integral of Pc from 0 to 0.1 is close to 0. So the total charge discharged from 0.037 is equal to the total charge accumulated before 0.037.