(Writeup coming later)
Implemented from This is application note from Greenarrays.