[sci.electronics] Least Squares Problem

nick@paladin.Owego.NY.US (Carmine Nicoletta) (12/09/90)

I am trying to optimize the response of three band pass filters to some
known response E(s).  These BPF are separated in frequency by an arbitrary      amount.  Also, the filters are in parallel.  The deviation squared that I
want to minimize is =  d**2=[E(s)-(A1G1(s)+A2G2(s)+A3G3(s)]**2.  Basically,
the G's are given, and I need to find the A's so that I get the LS fit to
E(s).  One thing to be careful is that the G's are complex (magnitude and
phase), which means that we can't just square the above equation.  I have
to take the conjugate ( xx* ).  After working out the partial derivatives I
get the following matrix.
     
         | |G1|**2    Re(G1G2)    Re(G1G3) | | A1 |   |  Re(EG1) |
         | Re(G1G2)   |G2|**2     Re(G2G3) | | A2 | = |  Re(EG2) |
         | Re(G1G3)   Re(G2G3)    |G3|**2  | | A3 |   |  Re(EG3) |  

After numerically experimenting with this matrix, I have doubts that the
results are correct.  Am I doing anything wrong??  Also, say I want to
optimize to E=(0.707,0.707) magnitude=1 and phase of 45 degrees, my results
are totally off.  

Any help on this would be appreciated.  Please E-mail.

Carmine.