“Empty sym” when solving a system of linear equations with different conditions
I have a system of linear equations with several conditions describing a kinematic analysis of an automatic gearbox. The system is the following:
where all values are positive.
Then the following conditions are applied
These conditions are permanently valid. Thereafter other conditions are going to be applied according to the engaged gear. For example in fifth gear, the further conditions are:
The aim is to obtain a symblic equation expression consisting of parameters , which defines the gear ratio between the output and input. The gear ratio in 5th gear is for instance
Mathematically the system has 12 unknonws and 11 equations, so it gives exactly the expression for the ratio between the output and input as a function of parameters .
The transmission has a total of 10 gears, so it would be pretty difficult to make all manually.
My idea was creating a code as follows:
syms Z1A Z2A Z3A Z4A Z1B Z2B Z3B Z4B positive
syms w1A w2A w3A w4A …
w1B w2B w3B w4B …
w1C w2C w3C w4C i
% System of equations
eqn1 = w1A*Z1A + w1B*Z1B == w1C*(Z1A+Z1B);
eqn2 = w2A*Z2A + w2B*Z2B == w2C*(Z2A+Z2B);
eqn3 = w3A*Z3A + w3B*Z3B == w3C*(Z3A+Z3B);
eqn4 = w4A*Z4A + w4B*Z4B == w4C*(Z4A+Z4B);
% Permanently valid conditions
cond1 = w2A == w1A;
cond2 = w2B == w3A;
cond3 = w1C == w4B;
cond4 = w3B == w4A;
% Fifth gear analysis example
w1B = 0;
cond_gear5_1 = w4C == w3C;
cond_gear5_2 = w2B == w4A;
ratio = i == w4C/w4A;
Sol = solve([eqn1 eqn2 eqn3 eqn4 …
cond1 cond2 cond3 cond4 …
cond_gear5_1 cond_gear5_2 ratio], i)
I was probably too optimistic about getting the desired expression from Matlab. The problem is that I don’t know how to make it work.
Each advice is appreciated.I have a system of linear equations with several conditions describing a kinematic analysis of an automatic gearbox. The system is the following:
where all values are positive.
Then the following conditions are applied
These conditions are permanently valid. Thereafter other conditions are going to be applied according to the engaged gear. For example in fifth gear, the further conditions are:
The aim is to obtain a symblic equation expression consisting of parameters , which defines the gear ratio between the output and input. The gear ratio in 5th gear is for instance
Mathematically the system has 12 unknonws and 11 equations, so it gives exactly the expression for the ratio between the output and input as a function of parameters .
The transmission has a total of 10 gears, so it would be pretty difficult to make all manually.
My idea was creating a code as follows:
syms Z1A Z2A Z3A Z4A Z1B Z2B Z3B Z4B positive
syms w1A w2A w3A w4A …
w1B w2B w3B w4B …
w1C w2C w3C w4C i
% System of equations
eqn1 = w1A*Z1A + w1B*Z1B == w1C*(Z1A+Z1B);
eqn2 = w2A*Z2A + w2B*Z2B == w2C*(Z2A+Z2B);
eqn3 = w3A*Z3A + w3B*Z3B == w3C*(Z3A+Z3B);
eqn4 = w4A*Z4A + w4B*Z4B == w4C*(Z4A+Z4B);
% Permanently valid conditions
cond1 = w2A == w1A;
cond2 = w2B == w3A;
cond3 = w1C == w4B;
cond4 = w3B == w4A;
% Fifth gear analysis example
w1B = 0;
cond_gear5_1 = w4C == w3C;
cond_gear5_2 = w2B == w4A;
ratio = i == w4C/w4A;
Sol = solve([eqn1 eqn2 eqn3 eqn4 …
cond1 cond2 cond3 cond4 …
cond_gear5_1 cond_gear5_2 ratio], i)
I was probably too optimistic about getting the desired expression from Matlab. The problem is that I don’t know how to make it work.
Each advice is appreciated. I have a system of linear equations with several conditions describing a kinematic analysis of an automatic gearbox. The system is the following:
where all values are positive.
Then the following conditions are applied
These conditions are permanently valid. Thereafter other conditions are going to be applied according to the engaged gear. For example in fifth gear, the further conditions are:
The aim is to obtain a symblic equation expression consisting of parameters , which defines the gear ratio between the output and input. The gear ratio in 5th gear is for instance
Mathematically the system has 12 unknonws and 11 equations, so it gives exactly the expression for the ratio between the output and input as a function of parameters .
The transmission has a total of 10 gears, so it would be pretty difficult to make all manually.
My idea was creating a code as follows:
syms Z1A Z2A Z3A Z4A Z1B Z2B Z3B Z4B positive
syms w1A w2A w3A w4A …
w1B w2B w3B w4B …
w1C w2C w3C w4C i
% System of equations
eqn1 = w1A*Z1A + w1B*Z1B == w1C*(Z1A+Z1B);
eqn2 = w2A*Z2A + w2B*Z2B == w2C*(Z2A+Z2B);
eqn3 = w3A*Z3A + w3B*Z3B == w3C*(Z3A+Z3B);
eqn4 = w4A*Z4A + w4B*Z4B == w4C*(Z4A+Z4B);
% Permanently valid conditions
cond1 = w2A == w1A;
cond2 = w2B == w3A;
cond3 = w1C == w4B;
cond4 = w3B == w4A;
% Fifth gear analysis example
w1B = 0;
cond_gear5_1 = w4C == w3C;
cond_gear5_2 = w2B == w4A;
ratio = i == w4C/w4A;
Sol = solve([eqn1 eqn2 eqn3 eqn4 …
cond1 cond2 cond3 cond4 …
cond_gear5_1 cond_gear5_2 ratio], i)
I was probably too optimistic about getting the desired expression from Matlab. The problem is that I don’t know how to make it work.
Each advice is appreciated. symbolic, solve, system of equations MATLAB Answers — New Questions