Optimization of the weighted average sum of matrix norms in the workspace using the Optimization Tool

3 次查看(过去 30 天)
There are workspace from three 3x3 matrices with random elements:
A=rand(3,3);
B=rand(3,3);
C=rand(3,3);
There are 9 vectors of the following form:
u1=[cos(a);sin(a);1-cos(0)]
u2=[cos(a);sin(a);1-cos(2*pi/3)]
u3=[cos(a);sin(a);1-cos(-2*pi/3)]
v1=[sin(b)*cos(C);sin(a);-cos(0)-1]
v2=[sin(b)*cos(C);sin(a);-cos(2*pi/3)-1]
v3=[sin(b)*cos(C);sin(a);-cos(-2*pi/3)-1]
w1=[cos(A);sin(B);-sin(0)]
w2=[cos(A);sin(B);-sin(2*pi/3)]
w3=[cos(A);sin(B);-sin(-2*pi/3)]
here - variables;
The matrix of the following form is formed from the vectors:
J=[cross(v1,w1)/dot(cross(u1,v1),w1) cross(v2,w2)/dot(cross(u2,v2),w2) cross(v3,w3)/dot(cross(u3,v3),w3)];
Problem: We need to find parameters that minimize the weighted average sum of matrix J norms at each of the workspace points, i.e.:
How to solve this problem using Optimization Tool ?
  2 个评论
Matt J
Matt J 2022-7-26
编辑:Matt J 2022-7-26
There are 9 vectors of the following form:
If A,B,C are 3x3 matrices and a,b are scalars, then v and w cannot be vectors. Nor can you run the code you've posted without concatenation error messages.
A=rand(3,3);
B=rand(3,3);
C=rand(3,3);
a=pi; b=pi;
u1=[cos(a);sin(a);1-cos(0)]
u1 = 3×1
-1.0000 0.0000 0
u2=[cos(a);sin(a);1-cos(2*pi/3)]
u2 = 3×1
-1.0000 0.0000 1.5000
u3=[cos(a);sin(a);1-cos(-2*pi/3)]
u3 = 3×1
-1.0000 0.0000 1.5000
v1=[sin(b)*cos(C);sin(a);-cos(0)-1]
Error using vertcat
Dimensions of arrays being concatenated are not consistent.
v2=[sin(b)*cos(C);sin(a);-cos(2*pi/3)-1]
v3=[sin(b)*cos(C);sin(a);-cos(-2*pi/3)-1]
w1=[cos(A);sin(B);-sin(0)]
w2=[cos(A);sin(B);-sin(2*pi/3)]
w3=[cos(A);sin(B);-sin(-2*pi/3)]
Andrew Sol
Andrew Sol 2022-7-26
No. Please listen carefully. I will explain. Matrices A, B, C - the same dimension 3x3. That is, the workspace is divided into 9 points.
1. We take from each matrix one parameter at each point of the workspace and substitute it into the vectors.
2. It is necessary to determine the norm of the matrix J at each of the 9 points.
3. Sum up all 9 norms of J.
4. Divide by the number of points in the workspace, i.e. calculate the average sum of norms.
5. It is necessary to choose the optimal values of the parameters that minimize the average sum of norms.
I do not know how to properly formalize this task, so the incorrect notation caused a misunderstanding.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with Optimization Toolbox 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by