Lookup table with compensation as function of reference and feedback value