How to solve this error?
Show older comments
Error in port widths or dimensions. Output port 1 of 'Mainone/Decoupling/In2' is a one dimensional vector with 3 elements.
Error in port widths or dimensions. Invalid dimension has been specified for input port 1 of 'Mainone/Decoupling/Transfer Fcn1'.
5 Comments
Renato SL
on 6 Aug 2019
This is due to the fact that the outputs of blocks Ki, Kp, and Kd inside Subsystem 1 is multiplexed, thus creating the one dimensional vector with 3 elements while Transfer Fcn1 expects 1 dimensional vector with only 1 element.
I don't know what you are doing with these functions, so it's hard to give recommendations.
Nagarjuna Arjun
on 6 Aug 2019
Renato SL
on 6 Aug 2019
Can you please specify the purpose of the functions in question?
Also, can you explain the purpose of the blocks that are related to the error & the expected input/output?
Nagarjuna Arjun
on 6 Aug 2019
Renato SL
on 6 Aug 2019
I have never dealt with Fuzzy Logic Controllers so I don't understand how it works as a whole, but at the part in question, you have these 3 blocks to find the values of the gains but inside you have the same blocks and functions. I don't know if that's the case, but it doesn't seem to be the right functions to me.
And after that, you have the values of the gains but you feed the value to a mux, then to a transfer function. This is also strange to me.
Anyway, perhaps you should check out Andrey Kiselnikov's answer if the concern is only on how to shape the vector to the appropriate form.
Answers (1)
Andrey Kiselnikov
on 6 Aug 2019
0 votes
You provided a very bad description of your problem, but I assume that the transpose of the input vector can help you.
p.s. If it will not helps provide more propper description, please.
Categories
Find more on Fuzzy Logic in Simulink in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!