Elements of the input after a sum block

10 vues (au cours des 30 derniers jours)
Maria
Maria le 4 Déc 2017
Commenté : Birdman le 5 Déc 2017
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 commentaires
Birdman
Birdman le 4 Déc 2017
Share your model(export to r2017a)
Maria
Maria le 4 Déc 2017

Connectez-vous pour commenter.

Réponse acceptée

Birdman
Birdman le 5 Déc 2017
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 commentaires
Maria
Maria le 5 Déc 2017
It is working! No errors anymore for the dimensions! So the only problem was that I was giving the inputs at root level inport....?!? Thank you so much!!!! I guess that to know this kind of tricks you really need a lot of experience, no matter how much you read the Matlab help....
Birdman
Birdman le 5 Déc 2017
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!

Connectez-vous pour commenter.

Plus de réponses (0)

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by