1. A method, comprising: measuring errors between an actual output and a desired output within a device; generating an error function based on said measured errors; and compensating for non-linearities within said device using said error function.