How to correct “Error in default port dimensions function of S-function 'X'.function doesnt fully set the...





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I'm a master's student and i'm studying electrical engineering - control systems.
I've been assigned (by my Supervisor professor) to simulate a feedback linearization control method so I chose a paper (attached below) and I made a simulink model for it. The problem is when I try to run the simulation, it gives the error:
Error in default port dimensions function of S-function 'FeedbackLinearization/Controller'. This function does not fully set the dimensions of output port 2
So i turned on the signal dimensions display to check for signal dimensions and check whether i've made an error or not. I see a problem for the 'e' signal. It should be a 3*1 vector that indicates error for tracking x-y-z. As you can see, output of the mux the dimension is 3 so everything is ok. the problem is when the signal reaches a block (MATLAB function or derivative) its dimension reduces down to one. I have attached my slx model so you please be kind and take a look.
I've checked both Controller Matlab func and Plant Matlab func and they are working fine.
Please help me. This is so vital for me! Thank you for your time, and consideration!



the paper:
http://uupload.ir/view/z9mg_aminfl.pdf/



the potential problem occurs here:
http://uupload.ir/files/jc3k_capture.jpg










share|improve this question































    0















    I'm a master's student and i'm studying electrical engineering - control systems.
    I've been assigned (by my Supervisor professor) to simulate a feedback linearization control method so I chose a paper (attached below) and I made a simulink model for it. The problem is when I try to run the simulation, it gives the error:
    Error in default port dimensions function of S-function 'FeedbackLinearization/Controller'. This function does not fully set the dimensions of output port 2
    So i turned on the signal dimensions display to check for signal dimensions and check whether i've made an error or not. I see a problem for the 'e' signal. It should be a 3*1 vector that indicates error for tracking x-y-z. As you can see, output of the mux the dimension is 3 so everything is ok. the problem is when the signal reaches a block (MATLAB function or derivative) its dimension reduces down to one. I have attached my slx model so you please be kind and take a look.
    I've checked both Controller Matlab func and Plant Matlab func and they are working fine.
    Please help me. This is so vital for me! Thank you for your time, and consideration!



    the paper:
    http://uupload.ir/view/z9mg_aminfl.pdf/



    the potential problem occurs here:
    http://uupload.ir/files/jc3k_capture.jpg










    share|improve this question



























      0












      0








      0








      I'm a master's student and i'm studying electrical engineering - control systems.
      I've been assigned (by my Supervisor professor) to simulate a feedback linearization control method so I chose a paper (attached below) and I made a simulink model for it. The problem is when I try to run the simulation, it gives the error:
      Error in default port dimensions function of S-function 'FeedbackLinearization/Controller'. This function does not fully set the dimensions of output port 2
      So i turned on the signal dimensions display to check for signal dimensions and check whether i've made an error or not. I see a problem for the 'e' signal. It should be a 3*1 vector that indicates error for tracking x-y-z. As you can see, output of the mux the dimension is 3 so everything is ok. the problem is when the signal reaches a block (MATLAB function or derivative) its dimension reduces down to one. I have attached my slx model so you please be kind and take a look.
      I've checked both Controller Matlab func and Plant Matlab func and they are working fine.
      Please help me. This is so vital for me! Thank you for your time, and consideration!



      the paper:
      http://uupload.ir/view/z9mg_aminfl.pdf/



      the potential problem occurs here:
      http://uupload.ir/files/jc3k_capture.jpg










      share|improve this question
















      I'm a master's student and i'm studying electrical engineering - control systems.
      I've been assigned (by my Supervisor professor) to simulate a feedback linearization control method so I chose a paper (attached below) and I made a simulink model for it. The problem is when I try to run the simulation, it gives the error:
      Error in default port dimensions function of S-function 'FeedbackLinearization/Controller'. This function does not fully set the dimensions of output port 2
      So i turned on the signal dimensions display to check for signal dimensions and check whether i've made an error or not. I see a problem for the 'e' signal. It should be a 3*1 vector that indicates error for tracking x-y-z. As you can see, output of the mux the dimension is 3 so everything is ok. the problem is when the signal reaches a block (MATLAB function or derivative) its dimension reduces down to one. I have attached my slx model so you please be kind and take a look.
      I've checked both Controller Matlab func and Plant Matlab func and they are working fine.
      Please help me. This is so vital for me! Thank you for your time, and consideration!



      the paper:
      http://uupload.ir/view/z9mg_aminfl.pdf/



      the potential problem occurs here:
      http://uupload.ir/files/jc3k_capture.jpg







      matlab controls simulink






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 3 at 14:24







      Amin Plays Games

















      asked Jan 3 at 13:21









      Amin Plays GamesAmin Plays Games

      32




      32
























          1 Answer
          1






          active

          oldest

          votes


















          0














          In models, when there are feedback loops, sometimes dimensions cannot be propagated successfully if the input sizes depend on the output sizes. This model may be in that category. For solving this case, you should insert a "Signal Specification" block at a location where you know the sizes. For example, at the output of mux.



          https://www.mathworks.com/help/simulink/slref/signalspecification.html?s_tid=doc_ta



          If you insert this block at the output of the Mux where you have circled, you can set the dimension parameter to 3 and all others as default.






          share|improve this answer
























          • Darm! it worked! how should i have known?

            – Amin Plays Games
            Jan 3 at 14:42












          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',
          autoActivateHeartbeat: false,
          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%2f54023144%2fhow-to-correct-error-in-default-port-dimensions-function-of-s-function-x-func%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









          0














          In models, when there are feedback loops, sometimes dimensions cannot be propagated successfully if the input sizes depend on the output sizes. This model may be in that category. For solving this case, you should insert a "Signal Specification" block at a location where you know the sizes. For example, at the output of mux.



          https://www.mathworks.com/help/simulink/slref/signalspecification.html?s_tid=doc_ta



          If you insert this block at the output of the Mux where you have circled, you can set the dimension parameter to 3 and all others as default.






          share|improve this answer
























          • Darm! it worked! how should i have known?

            – Amin Plays Games
            Jan 3 at 14:42
















          0














          In models, when there are feedback loops, sometimes dimensions cannot be propagated successfully if the input sizes depend on the output sizes. This model may be in that category. For solving this case, you should insert a "Signal Specification" block at a location where you know the sizes. For example, at the output of mux.



          https://www.mathworks.com/help/simulink/slref/signalspecification.html?s_tid=doc_ta



          If you insert this block at the output of the Mux where you have circled, you can set the dimension parameter to 3 and all others as default.






          share|improve this answer
























          • Darm! it worked! how should i have known?

            – Amin Plays Games
            Jan 3 at 14:42














          0












          0








          0







          In models, when there are feedback loops, sometimes dimensions cannot be propagated successfully if the input sizes depend on the output sizes. This model may be in that category. For solving this case, you should insert a "Signal Specification" block at a location where you know the sizes. For example, at the output of mux.



          https://www.mathworks.com/help/simulink/slref/signalspecification.html?s_tid=doc_ta



          If you insert this block at the output of the Mux where you have circled, you can set the dimension parameter to 3 and all others as default.






          share|improve this answer













          In models, when there are feedback loops, sometimes dimensions cannot be propagated successfully if the input sizes depend on the output sizes. This model may be in that category. For solving this case, you should insert a "Signal Specification" block at a location where you know the sizes. For example, at the output of mux.



          https://www.mathworks.com/help/simulink/slref/signalspecification.html?s_tid=doc_ta



          If you insert this block at the output of the Mux where you have circled, you can set the dimension parameter to 3 and all others as default.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 3 at 13:44









          NavanNavan

          4,20111821




          4,20111821













          • Darm! it worked! how should i have known?

            – Amin Plays Games
            Jan 3 at 14:42



















          • Darm! it worked! how should i have known?

            – Amin Plays Games
            Jan 3 at 14:42

















          Darm! it worked! how should i have known?

          – Amin Plays Games
          Jan 3 at 14:42





          Darm! it worked! how should i have known?

          – Amin Plays Games
          Jan 3 at 14:42




















          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.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54023144%2fhow-to-correct-error-in-default-port-dimensions-function-of-s-function-x-func%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

          MongoDB - Not Authorized To Execute Command

          How to fix TextFormField cause rebuild widget in Flutter

          Npm cannot find a required file even through it is in the searched directory