Can Arduino output 20kHz PWM with varying duty cycle?

If you need to have a 3-phases or 3 full H-bridge with 6 igbt's at such speed (20 KHz) along with digital PLL (Phase Locked Loop), I think not possible even with arduino mega.

I've been using mega to generate isolated TTL signals controlling full H-bridge, loose coupled flyback ringing at peaks of 800V and 10A at 20 KHz and more thanks to the 16-bit timers but it only works on 2 phases or 2 legs full H-bridge (4 igbt's), requires as suggested by dancombine to directly program the timer registers otherwise forget it.

Even if you forget about the control loop, PLL, it seems the arduino mega timer are not meant to generate 3 phases full H-bridge, maybe arduino due could do it !