# [music-dsp] linear phase squared to minimum phase

inicoderocker at cox.net inicoderocker at cox.net
Thu Jun 30 02:23:54 EDT 2005

```On Tue, 28 Jun 2005, Joshua Scholar wrote:
>
> I tried plugging some examples in to various symbolic math programs but all
> of them overload after just a few terms.
...
> For instance if I want to solve for the filter [a,b,c] that convolved
> against itself backwards gives (A,B,C,B,C) mupad spits out:
...
> Posed as "solve({A=a*c, B=a*b+b*c,C=a^2+b^2+c^2},{a,b,c});"
...
> solve({A=a*d, B=a*c+c*d,C=a*b+b*c+c*d,D=a^2+b^2+c^2+d^2},{a,b,c,d});
> causes a stack overflow.

Try just solving for one variable in one equation (A=a*d -> d=A/a [a<>0,
but a=0 => A=0 is this a possible situation?]).
Replace that variable in the other equations (just set d to A/a).
See if mupad can solve it now --This has eliminated at least one
constraint that mupad pushes on to the stack (possible several). Symbolics
can be stupid about redundant constraints (the price for not missing any I
guess).

The D equation is some kind of normalization, set a_new = a_old / sqrt(D),
b_new = b_old / sqrt(D) etc so a^2+b^2+c^2+d^2=1 and mupad won't have to
carry the D around & you can just multiply a,b,c & d by sqrt(D) at the end
(If D=0 -> a=b=c=d=0. This is probably not very dangerous for trying to
understand, but should be checked in code.)

Each constraint you eliminate may eliminate a branching structure of cases
--Some programs can be told "A is positive, B <> 0" (DERIVE can anyway...)
so it won't worry about some cases.

Looking for a general solution
In the 3 equation case
A+B+C = ac + ab + bc + a^2 + b^2 + c^2
all possible 2nd order terms.

In the 4 equation case
A+B+C = ab + ac + ad + bc + 2cd + a^2 + b^2 + c^2 + d^2
bd is missing and there are two cd's is it possible an equation is wrong?

In the 4 equation case the fact that A+C = (a+c)(b+d) is also suggestive

```