First, thanks Mike Engelhardt with the team and also to Qorvo for this incredible simulator.
I have been making a simulation for a totem pole PFC with digital control.
I used a C-block to simulate the discrete controller as well as the detail PWM timing that mimic the TI-C2000 pwm block behavior (its not as simple as duty>carrier) including the deadtime and some additional gating logic that I will implement on the real circuit.
Additionally, C-block is used to carefully calculate the next timestep by making a simple timestep estimation algorithm and also modifying the Trunc() block.
The result is, 2 sec simulation time that is completed in 27sec for a switching PFC with Fsw = 65kHz. Which I think is very impressive as it is comparable (if not faster) than PSIM/PLECs…
*unfortunately I cant confirm the speed in those simulator as I dont have license for them.
*sorry, I cant upload the whole simulation file as it is related to my work in my company…
Full simulation waveform
Deadtime effect at current zero crossing