MATLAB Answers

Elements of the input after a sum block

16 ビュー (過去 30 日間)
Maria
Maria 2017 年 12 月 4 日
コメント済み: Birdman 2017 年 12 月 5 日
Hi, I have a Simulink model that contains a feedback. After the feedback, I should do some discrete convolution on the input. The problem is the following. My input is given by my time vector, and two columns that are my two input currents. The system (should) looks like this
But, I get the error "Invalid external input specified. The specified input has 2 element(s) for each sample while the sum of the port widths of all root level input port blocks in the model is 1". Even though I checked and after the sum block I have a signal that has the same dimension of the input (so, time and two colums for the currents). Also, above the arrow, there is a "2", so I see that also after the sum block I have 2 elements. Instead, if I do this
I do not get any errors. But this is not what I should do... I think that has something to do with the feedback and the very first sample time. But I am not sure how to solve this issue. If this is the issue. Any suggestion is appreciated. Best Maria
  2 件のコメント
Maria
Maria 2017 年 12 月 4 日

サインインしてコメントする。

採用された回答

Birdman
Birdman 2017 年 12 月 5 日
Do not supply workspace variables into a Simulink model by root level inport. Instead, usage of From Workspace blocks are more efficient and easier. I made some changes to your model where you had problems with dimension. The mat file variables are automatically loaded when you open the model. Now, rearrange the model if you need to and the simulation should run without any error. Let me know the results.
  2 件のコメント
Birdman
Birdman 2017 年 12 月 5 日
The problem was that you did not know what to do with dimension while using root level inport. But now it is solved.
My pleasure!

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by