Error in port widths or dimensions. Invalid dimension has been specified for 'Input Port 1'
69 次查看(过去 30 天)
显示 更早的评论
Hi,
When clicking on Run button I always get this error. For some reason a text "24{24}" appears close to the BusBar, and I get the following error:
Error in port widths or dimensions. 'Output Port 1' of 'MicrogridActivePowerControl/powergui/EquivalentModel1/Gates/From1' has 3 elements. This port does not accept the dimensions (or orientation) specified by the output signal.
Component:Simulink | Category:Model error
Error in port widths or dimensions. Invalid dimension has been specified for 'Input Port 1' of 'MicrogridActivePowerControl/powergui/EquivalentModel1/Gates/Mux'.
Can anyone tell me, how to find the issue rellated and fix it?
0 个评论
采纳的回答
Nathan Hardenberg
2023-8-22
The error seems to be noticed in 'MicrogridActivePowerControl/powergui/EquivalentModel1/Gates/From1'. I'm guessing this is the "PWM"-From-Block to the right. A few steps beforehand you have a "PID(s)"-Block that seems to have an issue.
Note that the numbers on the arrows show the dimensions of the signal. Everyehere where there is a "?(dimension)", the compiler does not know the size of the signal. Since before the PID-controller the size is known and afterwards it isn't, the problem is most likely there. Maybe replace the block with a default PID and check if it works. Then change the block settings one at a time and check when it breaks. This assumes you changed anything in the PID-controller.
Second option: When looking at you diagram it seems that PWM should be of size [1x1] (the same as 1) since you only conntrol one gate. Note that your "RMS Measurement" outputs a vector of size [3x1] already. Maybe this is something you don't actually want. If you only want one of the three signals, use a selector block after the "RMS Measurement"
To the Mux Block error I can not say anything, since I do not know where the "-T-" comes from. It most likely assumes a 5-vector output which is can not do if the first input is of dimension 3 already. But maybe this fixes if you fix the other problem.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sources 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!