Delta-rational chord: Difference between revisions
| Line 79: | Line 79: | ||
=== Partially DR === | === Partially DR === | ||
Suppose we wish to approximate a target delta signature of the form <math>+\delta_1 +? +\delta_3</math> with the chord <math>1: | Suppose we wish to approximate a target delta signature of the form <math>+\delta_1 +? +\delta_3</math> with the chord <math>1:f_1:f_2:f_3</math> (where the +? is free to vary). By a derivation similar to the above, the least-squares problem is | ||
<math> | <math> | ||
\displaystyle {\underset{x,y}{\text{minimize}} \sqrt{\bigg(\frac{x + \delta_1}{x} - | \displaystyle {\underset{x,y}{\text{minimize}} \sqrt{\bigg(\frac{x + \delta_1}{x} - f_1 \bigg)^2 + \bigg(\frac{x+\delta_1 + y}{x} - f_2 \bigg)^2 + \bigg(\frac{x+\delta_1 + y + \delta_3}{x} - f_3 \bigg)^2 }}. | ||
</math> | </math> | ||
<!-- | <!-- | ||
| Line 94: | Line 94: | ||
d2 = sympy.Symbol("\\delta_{2}", real=True) | d2 = sympy.Symbol("\\delta_{2}", real=True) | ||
d3 = sympy.Symbol("\\delta_{3}", real=True) | d3 = sympy.Symbol("\\delta_{3}", real=True) | ||
f1 = sympy.Symbol("f_1", real=True) | |||
f2 = sympy.Symbol("f_2", real=True) | |||
f3 = sympy.Symbol("f_3", real=True) | |||
err_squared = (d1 - | err_squared = ((x + d1 ) / x - f1) ** 2 + ((x + d1 + y) / x - f2) ** 2 + ((x + d1 + y + d3) / x - f3) ** 2 | ||
err_squared.expand() | err_squared.expand() | ||
err_squared_x = sympy.diff(err_squared, x) | err_squared_x = sympy.diff(err_squared, x) | ||