2
votes

I have a Simulink model with a Model block I am using to avoid duplication of some functionality.

When I try and run the parent model, I get the following errors:

  • Cannot change the dimensions of run-time parameter 'Gain' in 'TranslationChannel/First-Order Filter1/Model/Continuous/A' from [1x1] to [0x0] while model is executing
  • Invalid setting in 'TranslationChannel/Second-Order Filter/Model/Continuous/A*x/A11' for parameter 'Gain'
    • Error evaluating parameter 'Gain' in 'TranslationChannel/Second-Order Filter/Model/Continuous/A*x/A11'
      • Reference to non-existent field 'A11'.
  • Invalid setting in 'TranslationChannel/Tilt/Model/Continuous/A*x/A11' for parameter 'Gain'
    • Error evaluating parameter 'Gain' in 'TranslationChannel/Tilt/Model/Continuous/A*x/A11'
      • Reference to non-existent field 'A11'.

The sub-model is below: enter image description here

The block the error refers to is First Order Fliter 1, the parameters are which are: enter image description here

How do I resolve this error, or, is there a better way of calling the same series of blocks multiple times in a model?

The parent model is below: enter image description here

EDIT: After my discussion with Ander, I tried connecting a step source directly to the model block to eliminated any possibility of a null signal and got the same error, suggesting the problem is due to calling the second model. If anyone can assist further, that would be great.

EDIT 2: I have confirmed that data is being passed into the model. Removing the filters from the sub-model makes it work fine. The error occurs in the masked portion of the filters.

1
Well you have errors in 3 blocks it seems. My guess: error1: does the signal cease to exist in any moment? does the input become Non-existemt? it looks that your signal goes from a scalar [1x1] to just not a signal [0x0] at some point. Error2: open "Second order filter" adn check that parameter A11, that its undefinded. Why do you have an undefined parameter? Same in error 3. What is A11 and why is undefinded?Ander Biguri
It's difficult to answer this question, because we don't know what is causing the error. The real question is what's causing the parameter to change size from 1x1 to 0x0 at runtime? What does the input to the block look like? If you can isolate the block causing the issue and the input signal to it to reproduce the problem, then you stand in a much better position to figure out a solution.am304
@AnderBiguri These parameters are masked parameters that the user does not have direct access to (the first-order filter is a masked subsystem). Actually, Steve, you could look under the mask of the First-Order Filter block to figure out what is going wrong. The other errors in the other blocks are a consequence of the first error I think.am304
Are you sure Matlab gives you a simulink block with undefined parameters? I dont think so...Ander Biguri
The error occurs on a Gain block inside the First Order Filter, which, as @am304 says, is masked and generated for me. If I put the filter sub-system in the main model in place of the Model block, it all works fine. The input should just be a double.Steve

1 Answers

0
votes

I have resolved this my using a library instead of a model, and putting the filter blocks into a subsystem inside the library that I then drag to my main model.

This allows me to tune the parameters once and have it change all the blocks at once.