Delta-rational chord: Difference between revisions

Inthar (talk | contribs)
Inthar (talk | contribs)
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:(1 + E_1):(1 + E_2):(1 + E_3)</math> (where the +? is free to vary). By a derivation similar to the above, the least-squares problem is
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} - E_1 \bigg)^2 + \bigg(\frac{x+\delta_1 + y}{x} - E_2 \bigg)^2 + \bigg(\frac{x+\delta_1 + y + \delta_3}{x} - E_3 \bigg)^2 }}.
\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)
E1 = sympy.Symbol("E_1", real=True)
f1 = sympy.Symbol("f_1", real=True)
E2 = sympy.Symbol("E_2", real=True)
f2 = sympy.Symbol("f_2", real=True)
E3 = sympy.Symbol("E_3", real=True)
f3 = sympy.Symbol("f_3", real=True)
err_squared = (d1 - E1*x) ** 2 + ((d1 + y) - E2*x) ** 2 + ((d1 + y + d3) - E3*x) ** 2
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)