Solving a matrix with multiple unknowns

조회 수: 12 (최근 30일)
user3490
user3490 2020년 1월 24일
댓글: Walter Roberson 2020년 1월 25일
I am trying to solve this set of equations knowning a solution must exist for such set. However, Matlab does not give the needed solution and results in an empty sym variable.
syms Vpri Vpc Vsec Vsc I6 I7 I8 I9
I_op = [100 100 100 100 -100 I6 I7 I8 I9 (I6+I7+I8+I9)/4];
V_op = [Vpri Vpri Vpri Vpri Vpc Vsec Vsec Vsec Vsec Vsc]
eq = LL_mat * I_op' - V_op' == 0;
MYMY = (solve(eq))
The solution is empty for all symbolic variables
>> MYMY.I6
ans =
Empty sym: 0-by-1
>> MYMY
MYMY =
struct with fields:
I6: [0×1 sym]
I7: [0×1 sym]
I8: [0×1 sym]
I9: [0×1 sym]
Vpc: [0×1 sym]
Vpri: [0×1 sym]
Vsc: [0×1 sym]
Vsec: [0×1 sym]
Is there a way to solve this system in matlab?
  댓글 수: 2
Walter Roberson
Walter Roberson 2020년 1월 24일
What is LL_mat?
user3490
user3490 2020년 1월 24일
LL_mat is a symetric non zero 10*10 matrix

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2020년 1월 25일
LL_mat is a symetric non zero 10*10 matrix
You have 10 equations in 8 variables. There will seldom be a solution.
  댓글 수: 1
Walter Roberson
Walter Roberson 2020년 1월 25일
You can solve equations 1 to 7 and 10 for variables in the order I6, I7, I8, I9, Vpc, Vpri, Vsec, Vsc . However, after you have solved equations 1 to 7 for I6, I7, I8, I9, Vpc, Vpri, Vsec and substituted that in, before you have solved for Vsc, then equations 8 and 9 are independent of Vsc -- so equations 8 and 9 are not full rank.
The solutions are generally of the form
(very long expression in elements of LL_mat) / (long expression in elements of LL_mat)
For example Vsc has a numerator that is the sum of 18696 combinations of products of 5 variables at a time from LL_mat, and a denominator that is the sum of 936 combinations of products of 4 variables at a time from LL_mat . For example, terms in the numerator include
-100*L1_10*L2_6*L4_10*L4_7*L6_8 + 100*L1_10*L2_6*L4_10*L4_7*L7_8 + 100*L1_7*L2_10*L4_10*L4_8*L6_6 - 100*L2_10*L2_8*L3_10*L4_6*L6_9 + 100*L2_10*L2_8*L3_10*L4_6*L7_9
and terms in the denominator include
L1_10*L2_6*L3_7*L6_8 - L1_10*L2_6*L3_7*L6_9 - L1_10*L2_6*L3_7*L7_8 + L1_10*L2_6*L3_7*L7_9 - L1_10*L2_6*L3_8*L6_7 + L1_10*L2_6*L3_8*L6_9 + L1_10*L2_6*L3_8*L7_7 - L1_10*L2_6*L3_8*L7_9

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Conversion Between Symbolic and Numeric에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by