Why do I receive division by zero errors when passing in transfer functions with leading zeros for denominator in model reference arguments?

2 views (last 30 days)
When I specify the denominator of a transfer function block located inside a model reference block (whose simulation mode is set to "Accelerator") with a leading zero, I receive a singularity error:
Derivative input 1 of 'outside/Model' at time 0 is Inf or NaN. Stopping simulation. There may be a singularity in the solution. If not, try reducing the step size (either by reducing the fixed step size or by tightening the error tolerances).

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 15 Jan 2013
This change has been incorporated into the documentation in Release 2011a (R2011a). For previous releases, read below for any additional information:
This is an issue when using the model reference block in accelerator mode. When you make the simulation mode for the referenced model to be "Accelerator", you are making the parameters, numerator and denominator tunable. The model reference code generated for this model has instances where we divide by the first element of the denominator array. Once you make a parameter tunable in code generation, we don't run any of the checks to make sure valid values are entered. Please refer to the the article Limitations on Accelerator Mode Referenced Models-> Run time checks
from the following link-
<http://www.mathworks.com/help/releases/R2011a/toolbox/simulink/ug/bqonbts-1.html#brazo0s-1_1>
To workaround this issue atleast one of the below options needs to be exercised:
1. Normal simulation mode for the referenced model
2. Avoid specifying a leading zero for the denominator matrix as it is redundant to have them.

More Answers (0)

Categories

Find more on Model References in Help Center and File Exchange

Products


Release

R2007b

Community Treasure Hunt

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

Start Hunting!