Added functions to compute pin power error and kinf error