added dirty pid output averaging