I want to integrate the inductor current for a converter over a switching cycle Ts and not the simulation clock time. How can I do that?
E.g Simulation running time = 0.1s, switching frequency = 15kHz, switching cycle Ts = 66.66e-6s, inductor current IL = 150 A. I want to integrate IL from 0 to Ts and compare the resultant value after each step to a reference charge value.
When I use the integrator block, it integrates IL from 0 to 0.1 giving the final result to be 15. But what I want is to repeatedly integrate from 0 to Ts.