MATLAB/Simulink error

6 views (last 30 days)
aeropista
aeropista on 27 Jan 2022
Edited: aeropista on 28 Jan 2022
Hello,
I am trying to run this model, where the gains and transport delay are constants.
However, I get the following error and I am not sure why:
Error due to multiple causes.
Caused by:
Error in port widths or dimensions. 'Output Port 1' of '.../Transport Delay' has 2 elements. This port does not accept the dimensions (or orientation) specified by the output signal.
Error in port widths or dimensions. Invalid dimension has been specified for 'Input Port 1' of '.../Gnm'.
Thank you very much for your help!
  4 Comments
aeropista
aeropista on 27 Jan 2022
and the plant code

Sign in to comment.

Accepted Answer

Jon
Jon on 27 Jan 2022
Edited: Jon on 27 Jan 2022
It looks like your problem may be that you have a SISO (single input single output) transfer function block (Gnm) but the input to it comes from a two dimensional signal and the SISO block doesn't know what to do with the second input signal. The fact that there are two signals seems to trace back to some of the other blocks such as the MATLAB function block within the Plant subsystem whose output signal has dimension of two, and also the integrator block inside that subsystem that has two initial conditions (implying it also provides a two dimensional output.
So either you didn't intend for those blocks to be two dimensional and you will need to correct that, or you need to replace the SISO transfer function block with a MIMO, or at least MISO one.
Finally, your from workspace block ref_signal is only one dimensional, so do you really just want to add that one signal to both of the plant outputs, or again did you intend the output of your plant to be one dimensional.
By the way even with your attached model and the workspace.mat there were some additional errors that needed fixing. Kp and Kr should just be constants, not from workspace blocks unless they are time varying. You also didn't assign a value for the delay parameter of the delay block.
Hope this helps
  3 Comments
aeropista
aeropista on 28 Jan 2022
Indeed, models is a folder in my workspace.

Sign in to comment.

More Answers (0)

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!