MATLAB Answers

The model has changed between the time when two instances of this model were compiled. This is not allowed for models referenced in Normal Mode.

14 views (last 30 days)
Xu Yuan
Xu Yuan on 9 Oct 2020
Commented: Xu Yuan on 21 Oct 2020
Hi Guys, I got a problem, I follow the instruction of Dr. Graham Dudgeon to do the large scale modelling, I am trying to do it in Matlab 2020a, it includes Model reference by using Simscape Power System (ST). When I run the model, it shows error 'The model has changed between the time when two instances of this model were compiled. This is not allowed for models referenced in Normal Mode.' It was strange because I did not use any random parameters int the reference model. Then I gradually delate element for testing in the reference model, and I found the issue was from the signal conversion block (because the model reference cannot take the physical signal as an input, so I have to convert the signal type). By delating the conversion block, the error disappear (the signal conversion block was copied from the Sample model made by Dr Graham). There is no random elements in the signal conversion block as well, why this error reports to that one?
The following picture is the diagram of conversion block.

  0 Comments

Sign in to comment.

Accepted Answer

Joel Van Sickel
Joel Van Sickel on 15 Oct 2020
Hello Xu,
since the model was copied and that is cauisng the problem, I would try to build the model conversion block by hand. It's possible that in copying it, something went wrong,especially if it was from an older version. If that doesn't work, can you share the model?
Regards,
Joel

  3 Comments

Xu Yuan
Xu Yuan on 16 Oct 2020
Hi Joel,
Thank you for your reply. I am really appreciate it.
I also tried to build the conversion block by hand, and I found the issue was on the 'controlled voltage source' and 'controlled current source' blocks. The model will report the error if I put the 'controlled voltage source' in the Model Reference block.
I would like to put a model in the attachement, I made it by following the instruction of Dr. Graham Dudgeon's webniar. 'Father' file contains 4 systems which have same structure. 'Son' file is the Model reference for 'Father'. The third and fourth system in 'Father' are same, but the system reports the error 'The model 'Son' has changed between the time when two instances of this model were compiled. This is not allowed for models referenced in Normal Mode.'
I also tried to build a conversion block by using Norton's theorem, which uses 'controlled current source' block to achieve same function, it still reports same error.
If you find the solution for it, please let me know. I am appreciate it.
Best regards,
Xu
Joel Van Sickel
Joel Van Sickel on 20 Oct 2020
Hello Xu,
it looks like you can't use multiple instances of the same model reference with specialized power systems included. (at least with what I've tried so far) You can create multiple copies of the same model reference and it should work. I realize this is not ideal, but it will get you moving forward again. This means you would need a son1.slx and a son2.slx and have a seperate model reference for each of them.
Regards,
Joel
Xu Yuan
Xu Yuan on 21 Oct 2020
Hi Joel,
Thank you very much, I believe I should consider that option, or move to Simscape Electrical to do the modelling.
Appreciate your work, thank you.
Best regards,
Xu

Sign in to comment.

More Answers (0)

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by