Added function to calculate compensation (with accelerators)