Find best II order fitting polynomial from frequency response Yv over the frequency range kv for both continuous (ds=None) and discrete (ds>0) LTI systems.

Input: - kv: frequency points - Yv: frequency response - dyv,ddyv: frequency responses of I and II order derivatives - method=’leastsq’,’dev’: algorithm for minimisation - Bup (only ‘dev’ method): bounds for bv coefficients as per scipy.optimize.differential_evolution. This is a length 3 array.

Important: - this function attributes equal weight to each data-point!