Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
How can i figure this 'nonlinear least square problem'?

Subject: How can i figure this 'nonlinear least square problem'?

From: flying

Date: 15 Jun, 2012 02:54:07

Message: 1 of 7

Hi all!
    Now i have this formula:
          min sum(|A*M1(n)*exp(j*theta*n)-M2(n)|^2) ,n =0,...,N-1;
Unknown parameters
A: complex value
theta:real value

Known data:
M1(n):samples
M2(n):samples

I want to make that formula minimum,how can i do?I only know that it's a nonlinear least squares problem.please help me,thank you!

Subject: How can i figure this 'nonlinear least square problem'?

From: Torsten

Date: 15 Jun, 2012 07:07:33

Message: 2 of 7

On 15 Jun., 04:54, "flying " <flyingh...@163.com> wrote:
> Hi all!
>

Subject: How can i figure this 'nonlinear least square problem'?

From: Bruno Luong

Date: 15 Jun, 2012 07:13:06

Message: 3 of 7

"flying" wrote in message <jre84f$opf$1@newscl01ah.mathworks.com>...
> Hi all!
> Now i have this formula:
> min sum(|A*M1(n)*exp(j*theta*n)-M2(n)|^2) ,n =0,...,N-1;
> Unknown parameters
> A: complex value
> theta:real value
>
> Known data:
> M1(n):samples
> M2(n):samples
>
> I want to make that formula minimum,how can i do?I only know that it's a nonlinear least squares problem.please help me,thank you!

The problem is actually linear with respect to A, and can be solved by linear algebra once theta is fixed. It's only non-linear to theta. So something like 1D minimization such as fminbnd() should be enough for your purpose.

Bruno

Subject: How can i figure this 'nonlinear least square problem'?

From: Torsten

Date: 15 Jun, 2012 10:03:41

Message: 4 of 7

Use lsqnonlin and define the functions f_k as
f_k = Sqrt((A1^2+A2^2)*M1(k)*conj(M1(k)) - 2*real(M2(k)*(A1-
i*A2)*conj(M1(k))*exp(-j*theta*n))+M2(k)*conj(M2(k)))
where A=A1+i*A2.

Thus there are three parameters (A1,A2 and theta) to be fitted.

Best wishes
Torsten.

Subject: How can i figure this 'nonlinear least square problem'?

From: Torsten

Date: 15 Jun, 2012 10:03:14

Message: 5 of 7

I think because A is complex, A = A1 + i*A2, the problem will not be
linear in A.
Note that multiplying out
(A*M1*exp(j*theta*n)-M2)*conj( A*M1*exp(j*theta*n)-M2)
and differentiating the term A*M1*conj(A*M1) with respect to A1, e.g.,
gives (2*A1+A2^2)*M1*conj(M1),
which is linear in A1, but not in A2 (reversed if you differentiate
with respect to A2).

Best wishes
Torsten.

Subject: How can i figure this 'nonlinear least square problem'?

From: Torsten

Date: 15 Jun, 2012 10:07:33

Message: 6 of 7

Sorry, wrong of course since
d/dA1(A2^2*M1*conj(M1)) = 0 and d/dA2(A1^2*M1*conj(M1) = 0.

Best wishes
Torsten,

Subject: How can i figure this 'nonlinear least square problem'?

From: flying

Date: 20 Jun, 2012 12:04:08

Message: 7 of 7

Torsten <Torsten.Hennig@umsicht.fraunhofer.de> wrote in message <e17f4874-5e02-4456-9154-ed7db21536b1@v9g2000yqm.googlegroups.com>...
> I think because A is complex, A = A1 + i*A2, the problem will not be
> linear in A.
> Note that multiplying out
> (A*M1*exp(j*theta*n)-M2)*conj( A*M1*exp(j*theta*n)-M2)
> and differentiating the term A*M1*conj(A*M1) with respect to A1, e.g.,
> gives (2*A1+A2^2)*M1*conj(M1),
> which is linear in A1, but not in A2 (reversed if you differentiate
> with respect to A2).
>
> Best wishes
> Torsten.

Thanks.

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us