Started implementation of pwmcontroller