Delta-rational chord: Difference between revisions

Inthar (talk | contribs)
Inthar (talk | contribs)
Line 56: Line 56:
Say we want the error of a chord 1:''r''<sub>1</sub>:''r''<sub>2</sub>:...:''r''<sub>''n''</sub> (in increasing order) in the linear domain as an approximation to a fully delta-rational chord with signature +δ<sub>1</sub> +δ<sub>2</sub> ... +δ<sub>''n''</sub>, i.e. a chord
Say we want the error of a chord 1:''r''<sub>1</sub>:''r''<sub>2</sub>:...:''r''<sub>''n''</sub> (in increasing order) in the linear domain as an approximation to a fully delta-rational chord with signature +δ<sub>1</sub> +δ<sub>2</sub> ... +δ<sub>''n''</sub>, i.e. a chord


<math> \alpha : \alpha + \delta_1 : \cdots : \alpha + \sum_{l=1}^n \delta_l </math>
<math> x : x + \delta_1 : \cdots : x + \sum_{l=1}^n \delta_l </math>


where we vary α and ask, "By at least how much do the deltas have to be off for any α?"
where we vary x and ask, "By at least how much do the deltas have to be off for any x?"


Solving the linear least-squares optimization problem
Rewriting a bit, if 1:''r''<sub>1</sub>:''r''<sub>2</sub>:...:''r''<sub>''n''</sub> has delta signature +ε<sub>1</sub> +ε<sub>2</sub> ... +ε<sub>''n''</sub> (where the chord is 1:1+ε<sub>1</sub>:...), let <math>D_i = \sum_{k=1}^i \delta_i</math> and <math>E_i = \sum_{k=1}^i \epsilon_i.</math> Then the resulting linear least-squares optimization problem is


<math> \displaystyle{ \min_\alpha \sqrt{\sum_{i=1}^n \Bigg( \alpha r_i - \alpha - \sum_{l=1}^i \delta_l \Bigg)^2 } }</math>
<math>
\displaystyle{ \min_x \sqrt{\sum_{i=1}^n \Bigg( E_ix - D_i \Bigg)^2 } }
</math>


yields
with solution


<math>
<math>
\alpha = \displaystyle{\frac{\sum_{i=1}^n \delta_i (r_i - 1)}{\sum_{i=1}^n (r_i - 1)^2},}
x = \displaystyle{\frac{\sum_{i=1}^n D_i E_i}{\sum_{i=1}^n E_i^2},}
</math>
</math>


which can be plugged back into the error formula to obtain the error. (We multiply the 1:''r''<sub>1</sub>:''r''<sub>2</sub>:...:''r''<sub>''n''</sub> chord by α in order to compare it to the target DR chord on the same isodifferential series.)
which can be plugged back into the error formula to obtain the error. (We multiply the 1:''r''<sub>1</sub>:''r''<sub>2</sub>:...:''r''<sub>''n''</sub> chord by x in order to compare it to the target DR chord on the same isodifferential series.)


This error measure is called '''least-squares delta error'''. Least-squares delta error does not depend on whether the chord whose error is being measured is 1:''r''<sub>1</sub>:''r''<sub>2</sub>:...:''r''<sub>''n''</sub> or the same chord linearly shifted to have root α. Unfortunately, this error measure does not form a metric on the set of delta signatures with a fixed number of terms.
This error measure is called '''least-squares delta error'''. Least-squares delta error does not depend on whether the chord whose error is being measured is 1:''r''<sub>1</sub>:''r''<sub>2</sub>:...:''r''<sub>''n''</sub> or the same chord linearly shifted to have root x. Unfortunately, this error measure does not form a metric on the set of delta signatures with a fixed number of terms.


This error measure was found by Inthar and groundfault.
This error measure was found by Inthar and groundfault.
<!--
=== Partially DR ===
When the DR signature has one or more free ("+?") terms, the optimization problem becomes a multivariate one: we have one variable <math>\alpha_i, i \ge 2</math> for each free term, as well as the variable <math>\alpha_1</math> for the root. However, solving it is not much more difficult than the univariate case.
Suppose that the target delta signature is
<math>+\! \delta_{1,1} +\! \delta_{1,2} +\! \cdots +\! \delta_{1,n_1} +\!? +\! \delta_{2,1} +\! \delta_{2,2} +\! \cdots +\! \delta_{2,n_2} +\!? \ \cdots +\!? +\!\delta_{m,1} +\! \delta_{m,2} +\! \cdots +\! \delta_{m,n_m}.</math>
Writing ''a:b:c:...'' as [''a'', ''b'', ''c'', ...] for readability, the chord to be approximated is
<math>
[\alpha_1, \alpha_1 + \delta_{1,1}, \alpha_1 + \delta_{1,2}, ..., \alpha_1 + \sum_{l=1}^{n_1} \delta_{1,l}, \\
\alpha_1 + \alpha_2 + \sum_{l=1}^{n_i} \delta_{1,l}, \alpha_1 + \alpha_2 + \sum_{l=1}^{n_1} \delta_{1,l} + \delta_{2,1}, ..., \alpha_1 + \alpha_2 + \sum_{l=1}^{n_1} \delta_{1,l} + \sum_{l=1}^{n_2} \delta_{2,l}, \\
..., \\
\alpha_1 + \cdots + \alpha_m +  \sum_{i=1}^{m-1} \sum_{l_i=1}^{n_i} \delta_{i,l_i} + \delta_{m,1}, ..., \alpha_1 + \cdots + \alpha_m + \sum_{i=1}^m \sum_{l_i=1}^{n_i} \delta_{i,l_i}].
</math>
-->


== DR and RTT ==
== DR and RTT ==