LINEAR OPTIMIZATION OF PARAMETERS IN DYNAMIC THRESHOLD GENERATORS