Imposing constraint on gradient coefficients in NonLinear optimization

1 Ansicht (letzte 30 Tage)
Jonathan
Jonathan am 17 Apr. 2014
Kommentiert: Sean de Wolski am 18 Apr. 2014
I'm trying to solve a non linear 6 dimensional optimization problem, using a gradient which I calculate (6 dimensional).
I would like to influence the gradient coefficients in such a way that Coeff(1) == Coeff(2) == Coeff(3) and Coeff(4)==Coeff(5)==Coeff(6)
Is this possible?
Thanks! Jonathan

Antworten (1)

Alan Weiss
Alan Weiss am 18 Apr. 2014
I suppose that you could try to minimize the sum of the squares of the differences between various coefficients:
(Coeff(1) - Coeff(2))^2 + (Coeff(1) - Coeff(3))^2 + (Coeff(4) - Coeff(5))^2 + (Coeff(4) - Coeff(6))^2
You might want to use lsqnonlin and have your vector be (coeff(1) - coeff(2), coeff(1) - coeff(3), ...)
Alan Weiss
MATLAB mathematical toolbox documentation
  2 Kommentare
Jonathan
Jonathan am 18 Apr. 2014
Thanks for the answer, but that wasn't quite what I was asking. I will try rephrasing.
I am trying to solve an optimization problem, minimizing a scalar energy functional, which is a function of 6 parameters - 3 translation parameters and 3 rotation parameters.
I'm trying to feed the 6 dimensional calculated gradient into a gradient based optimization algorithm.
The constrain I want to impose is that in each iteration, all translation gradients have the same step size, and all rotation gradients have a second step size.
If t is the translation vector, r the rotation vector, at iteration i the propagation will be:
[t(1, i), t(2, i), t(3, i), r(1, i), r(2, i), r(3, i)] = [t(1, i-1), t(2, i-1), t(3, i-1), r(1, i-1), r(2, i-1), r(3, i-1)] - [a, a, a, b, b, b].*[grad(1), grad(2), grad(3), grad(4), grad(5), grad(6)]
Is this possible? Thanks Jonathan
Sean de Wolski
Sean de Wolski am 18 Apr. 2014
Why do you want that additional constraint? You might be able to get it by bounding with DiffMinChange and DiffMaxChange in the options:

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Systems of Nonlinear Equations finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by