Iteratively solving a non-linear equation
up vote
0
down vote
favorite
I'm trying to iteratively solve the following non-linear equation, as shown in the below extract from "Propeller Slipstream Model for Small Unmanned Aerial Vehicles" W. Khan, M. Nahon, R. Caverly pp3
So far I have the following code which I hope is relatively self-explanatory, although I have a feeling I am using the wrong method by trying to use the solve function:
% III A Induced Velocity at Propeller Plane
%Data from Table I
Sno = [1,2,3,4,5,6,7]
radialLoc = [5,20,40,60,80,100,127] % r
chord = [12.374,16.230,22.850,28.215,28.902,26.310,13.066] % c
chordlinePitchAngle = [25,26.5,21.89,14.39,9.80,4.75,6.59] % theta
zeroLiftAngleOfAttack = [0,0,-9.66,-8.70,-7.40,-10.70,-8.40] % a0
liftCurveSlope = 6.28 % Cla
dragCoefficient = 0.02 % Cd
%Other data
angularVel = 1710 % Omega (1710RPM /6710RPM)
numBlades = 2 % N
forwardVel = 0 % Vx
%data to be determined
phi = 0
eqn = angularVel*numBlades*chord(1)*(liftCurveSlope*(chordlinePitchAngle(1)-zeroLiftAngleOfAttack(1)-phi)-dragCoefficient*tan(phi))-8*pi*sin(phi)*(angularVel*radialLoc(1)*tan(phi)-forwardVel)
a = solve(eqn,phi)
any help with solving the equation will be appreciated.
note I realise I will end up with 7 phi values, currently I am just trying to find the first one and will go from there.
Full paper can be accessed at https://www.researchgate.net/profile/Waqas_Khan15/publication/264773240_Propeller_Slipstream_Model_for_Small_Unmanned_Aerial_Vehicles/links/54c289670cf2911c7a4922cd/Propeller-Slipstream-Model-for-Small-Unmanned-Aerial-Vehicles.pdf
Companion paper (reference 21) can be accessed at the following link: (although I have read the relevant sections and it does not appear to have any additional relevant information) https://ieeexplore.ieee.org/document/6523983
matlab
add a comment |
up vote
0
down vote
favorite
I'm trying to iteratively solve the following non-linear equation, as shown in the below extract from "Propeller Slipstream Model for Small Unmanned Aerial Vehicles" W. Khan, M. Nahon, R. Caverly pp3
So far I have the following code which I hope is relatively self-explanatory, although I have a feeling I am using the wrong method by trying to use the solve function:
% III A Induced Velocity at Propeller Plane
%Data from Table I
Sno = [1,2,3,4,5,6,7]
radialLoc = [5,20,40,60,80,100,127] % r
chord = [12.374,16.230,22.850,28.215,28.902,26.310,13.066] % c
chordlinePitchAngle = [25,26.5,21.89,14.39,9.80,4.75,6.59] % theta
zeroLiftAngleOfAttack = [0,0,-9.66,-8.70,-7.40,-10.70,-8.40] % a0
liftCurveSlope = 6.28 % Cla
dragCoefficient = 0.02 % Cd
%Other data
angularVel = 1710 % Omega (1710RPM /6710RPM)
numBlades = 2 % N
forwardVel = 0 % Vx
%data to be determined
phi = 0
eqn = angularVel*numBlades*chord(1)*(liftCurveSlope*(chordlinePitchAngle(1)-zeroLiftAngleOfAttack(1)-phi)-dragCoefficient*tan(phi))-8*pi*sin(phi)*(angularVel*radialLoc(1)*tan(phi)-forwardVel)
a = solve(eqn,phi)
any help with solving the equation will be appreciated.
note I realise I will end up with 7 phi values, currently I am just trying to find the first one and will go from there.
Full paper can be accessed at https://www.researchgate.net/profile/Waqas_Khan15/publication/264773240_Propeller_Slipstream_Model_for_Small_Unmanned_Aerial_Vehicles/links/54c289670cf2911c7a4922cd/Propeller-Slipstream-Model-for-Small-Unmanned-Aerial-Vehicles.pdf
Companion paper (reference 21) can be accessed at the following link: (although I have read the relevant sections and it does not appear to have any additional relevant information) https://ieeexplore.ieee.org/document/6523983
matlab
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm trying to iteratively solve the following non-linear equation, as shown in the below extract from "Propeller Slipstream Model for Small Unmanned Aerial Vehicles" W. Khan, M. Nahon, R. Caverly pp3
So far I have the following code which I hope is relatively self-explanatory, although I have a feeling I am using the wrong method by trying to use the solve function:
% III A Induced Velocity at Propeller Plane
%Data from Table I
Sno = [1,2,3,4,5,6,7]
radialLoc = [5,20,40,60,80,100,127] % r
chord = [12.374,16.230,22.850,28.215,28.902,26.310,13.066] % c
chordlinePitchAngle = [25,26.5,21.89,14.39,9.80,4.75,6.59] % theta
zeroLiftAngleOfAttack = [0,0,-9.66,-8.70,-7.40,-10.70,-8.40] % a0
liftCurveSlope = 6.28 % Cla
dragCoefficient = 0.02 % Cd
%Other data
angularVel = 1710 % Omega (1710RPM /6710RPM)
numBlades = 2 % N
forwardVel = 0 % Vx
%data to be determined
phi = 0
eqn = angularVel*numBlades*chord(1)*(liftCurveSlope*(chordlinePitchAngle(1)-zeroLiftAngleOfAttack(1)-phi)-dragCoefficient*tan(phi))-8*pi*sin(phi)*(angularVel*radialLoc(1)*tan(phi)-forwardVel)
a = solve(eqn,phi)
any help with solving the equation will be appreciated.
note I realise I will end up with 7 phi values, currently I am just trying to find the first one and will go from there.
Full paper can be accessed at https://www.researchgate.net/profile/Waqas_Khan15/publication/264773240_Propeller_Slipstream_Model_for_Small_Unmanned_Aerial_Vehicles/links/54c289670cf2911c7a4922cd/Propeller-Slipstream-Model-for-Small-Unmanned-Aerial-Vehicles.pdf
Companion paper (reference 21) can be accessed at the following link: (although I have read the relevant sections and it does not appear to have any additional relevant information) https://ieeexplore.ieee.org/document/6523983
matlab
I'm trying to iteratively solve the following non-linear equation, as shown in the below extract from "Propeller Slipstream Model for Small Unmanned Aerial Vehicles" W. Khan, M. Nahon, R. Caverly pp3
So far I have the following code which I hope is relatively self-explanatory, although I have a feeling I am using the wrong method by trying to use the solve function:
% III A Induced Velocity at Propeller Plane
%Data from Table I
Sno = [1,2,3,4,5,6,7]
radialLoc = [5,20,40,60,80,100,127] % r
chord = [12.374,16.230,22.850,28.215,28.902,26.310,13.066] % c
chordlinePitchAngle = [25,26.5,21.89,14.39,9.80,4.75,6.59] % theta
zeroLiftAngleOfAttack = [0,0,-9.66,-8.70,-7.40,-10.70,-8.40] % a0
liftCurveSlope = 6.28 % Cla
dragCoefficient = 0.02 % Cd
%Other data
angularVel = 1710 % Omega (1710RPM /6710RPM)
numBlades = 2 % N
forwardVel = 0 % Vx
%data to be determined
phi = 0
eqn = angularVel*numBlades*chord(1)*(liftCurveSlope*(chordlinePitchAngle(1)-zeroLiftAngleOfAttack(1)-phi)-dragCoefficient*tan(phi))-8*pi*sin(phi)*(angularVel*radialLoc(1)*tan(phi)-forwardVel)
a = solve(eqn,phi)
any help with solving the equation will be appreciated.
note I realise I will end up with 7 phi values, currently I am just trying to find the first one and will go from there.
Full paper can be accessed at https://www.researchgate.net/profile/Waqas_Khan15/publication/264773240_Propeller_Slipstream_Model_for_Small_Unmanned_Aerial_Vehicles/links/54c289670cf2911c7a4922cd/Propeller-Slipstream-Model-for-Small-Unmanned-Aerial-Vehicles.pdf
Companion paper (reference 21) can be accessed at the following link: (although I have read the relevant sections and it does not appear to have any additional relevant information) https://ieeexplore.ieee.org/document/6523983
matlab
matlab
edited Nov 19 at 20:09
asked Nov 19 at 17:21
Kieran J
134
134
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
The solve method is for solving an equation symbolically. If you want to solve it numerically, you have to use fzero instead.
By the way, there are a few inconsistencies (assuming I understood your problem correctly)
With
angularVel=0
your equation would become 0=0.There's
phi(1)
in your definiton ofeqn
but in your casephi
is just a variable, not an array.Why are there just 6 values for radialLoc? I guess one is missing.
Anyway, here's a way to do it with fzero:
%Other data
angularVel = 1710/6710; % Just a guess % Omega (1710RPM /6710RPM)
numBlades = 2; % N
forwardVel = 0; % Vx
%data to be determined
phi_sol = zeros(7,1);
for i=1:6
% Define the function handle
eqn = @(phi) angularVel*numBlades*chord(i)*(liftCurveSlope * ...
(chordlinePitchAngle(i)-zeroLiftAngleOfAttack(i)-phi) - dragCoefficient ...
* tan(phi))-8*pi*sin(phi)*(angularVel*radialLoc(i)*tan(phi)-forwardVel);
% Find phi such that eqn(phi) = 0 (uses phi=0 as initial guess for fzero)
phi_sol(i) = fzero(eqn, 0);
end
Thanks for the help! You're correct about all 3 inconsistencies, they're due to poor checking on my part, I've edited my original post to fix them.
– Kieran J
Nov 19 at 20:09
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
The solve method is for solving an equation symbolically. If you want to solve it numerically, you have to use fzero instead.
By the way, there are a few inconsistencies (assuming I understood your problem correctly)
With
angularVel=0
your equation would become 0=0.There's
phi(1)
in your definiton ofeqn
but in your casephi
is just a variable, not an array.Why are there just 6 values for radialLoc? I guess one is missing.
Anyway, here's a way to do it with fzero:
%Other data
angularVel = 1710/6710; % Just a guess % Omega (1710RPM /6710RPM)
numBlades = 2; % N
forwardVel = 0; % Vx
%data to be determined
phi_sol = zeros(7,1);
for i=1:6
% Define the function handle
eqn = @(phi) angularVel*numBlades*chord(i)*(liftCurveSlope * ...
(chordlinePitchAngle(i)-zeroLiftAngleOfAttack(i)-phi) - dragCoefficient ...
* tan(phi))-8*pi*sin(phi)*(angularVel*radialLoc(i)*tan(phi)-forwardVel);
% Find phi such that eqn(phi) = 0 (uses phi=0 as initial guess for fzero)
phi_sol(i) = fzero(eqn, 0);
end
Thanks for the help! You're correct about all 3 inconsistencies, they're due to poor checking on my part, I've edited my original post to fix them.
– Kieran J
Nov 19 at 20:09
add a comment |
up vote
0
down vote
accepted
The solve method is for solving an equation symbolically. If you want to solve it numerically, you have to use fzero instead.
By the way, there are a few inconsistencies (assuming I understood your problem correctly)
With
angularVel=0
your equation would become 0=0.There's
phi(1)
in your definiton ofeqn
but in your casephi
is just a variable, not an array.Why are there just 6 values for radialLoc? I guess one is missing.
Anyway, here's a way to do it with fzero:
%Other data
angularVel = 1710/6710; % Just a guess % Omega (1710RPM /6710RPM)
numBlades = 2; % N
forwardVel = 0; % Vx
%data to be determined
phi_sol = zeros(7,1);
for i=1:6
% Define the function handle
eqn = @(phi) angularVel*numBlades*chord(i)*(liftCurveSlope * ...
(chordlinePitchAngle(i)-zeroLiftAngleOfAttack(i)-phi) - dragCoefficient ...
* tan(phi))-8*pi*sin(phi)*(angularVel*radialLoc(i)*tan(phi)-forwardVel);
% Find phi such that eqn(phi) = 0 (uses phi=0 as initial guess for fzero)
phi_sol(i) = fzero(eqn, 0);
end
Thanks for the help! You're correct about all 3 inconsistencies, they're due to poor checking on my part, I've edited my original post to fix them.
– Kieran J
Nov 19 at 20:09
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
The solve method is for solving an equation symbolically. If you want to solve it numerically, you have to use fzero instead.
By the way, there are a few inconsistencies (assuming I understood your problem correctly)
With
angularVel=0
your equation would become 0=0.There's
phi(1)
in your definiton ofeqn
but in your casephi
is just a variable, not an array.Why are there just 6 values for radialLoc? I guess one is missing.
Anyway, here's a way to do it with fzero:
%Other data
angularVel = 1710/6710; % Just a guess % Omega (1710RPM /6710RPM)
numBlades = 2; % N
forwardVel = 0; % Vx
%data to be determined
phi_sol = zeros(7,1);
for i=1:6
% Define the function handle
eqn = @(phi) angularVel*numBlades*chord(i)*(liftCurveSlope * ...
(chordlinePitchAngle(i)-zeroLiftAngleOfAttack(i)-phi) - dragCoefficient ...
* tan(phi))-8*pi*sin(phi)*(angularVel*radialLoc(i)*tan(phi)-forwardVel);
% Find phi such that eqn(phi) = 0 (uses phi=0 as initial guess for fzero)
phi_sol(i) = fzero(eqn, 0);
end
The solve method is for solving an equation symbolically. If you want to solve it numerically, you have to use fzero instead.
By the way, there are a few inconsistencies (assuming I understood your problem correctly)
With
angularVel=0
your equation would become 0=0.There's
phi(1)
in your definiton ofeqn
but in your casephi
is just a variable, not an array.Why are there just 6 values for radialLoc? I guess one is missing.
Anyway, here's a way to do it with fzero:
%Other data
angularVel = 1710/6710; % Just a guess % Omega (1710RPM /6710RPM)
numBlades = 2; % N
forwardVel = 0; % Vx
%data to be determined
phi_sol = zeros(7,1);
for i=1:6
% Define the function handle
eqn = @(phi) angularVel*numBlades*chord(i)*(liftCurveSlope * ...
(chordlinePitchAngle(i)-zeroLiftAngleOfAttack(i)-phi) - dragCoefficient ...
* tan(phi))-8*pi*sin(phi)*(angularVel*radialLoc(i)*tan(phi)-forwardVel);
% Find phi such that eqn(phi) = 0 (uses phi=0 as initial guess for fzero)
phi_sol(i) = fzero(eqn, 0);
end
answered Nov 19 at 18:45
joni
693157
693157
Thanks for the help! You're correct about all 3 inconsistencies, they're due to poor checking on my part, I've edited my original post to fix them.
– Kieran J
Nov 19 at 20:09
add a comment |
Thanks for the help! You're correct about all 3 inconsistencies, they're due to poor checking on my part, I've edited my original post to fix them.
– Kieran J
Nov 19 at 20:09
Thanks for the help! You're correct about all 3 inconsistencies, they're due to poor checking on my part, I've edited my original post to fix them.
– Kieran J
Nov 19 at 20:09
Thanks for the help! You're correct about all 3 inconsistencies, they're due to poor checking on my part, I've edited my original post to fix them.
– Kieran J
Nov 19 at 20:09
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53379729%2fiteratively-solving-a-non-linear-equation%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown