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



paper extract



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










share|improve this question




























    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



    paper extract



    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










    share|improve this question


























      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



      paper extract



      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










      share|improve this question















      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



      paper extract



      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 19 at 20:09

























      asked Nov 19 at 17:21









      Kieran J

      134




      134
























          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 of eqn but in your case phi 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





          share|improve this answer





















          • 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











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          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

























          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 of eqn but in your case phi 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





          share|improve this answer





















          • 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















          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 of eqn but in your case phi 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





          share|improve this answer





















          • 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













          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 of eqn but in your case phi 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





          share|improve this answer












          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 of eqn but in your case phi 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






          share|improve this answer












          share|improve this answer



          share|improve this answer










          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


















          • 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


















          draft saved

          draft discarded




















































          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.




          draft saved


          draft discarded














          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





















































          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







          Popular posts from this blog

          Costa Masnaga

          Fotorealismo

          Sidney Franklin