MATRIXx

cancel
Showing results for 
Search instead for 
Did you mean: 

Subsystem preempted in Systembuild

Hi!

We have a continuous model of a jet engine which we have made discrete. We have removed algebraic loops but when we simulate the model, the following information is given (when simmessage=1) :

-------
Analyze complete for SuperBlock ENGINE.

Discrete outputs are updated explicitly.
Discrete states are updated explicitly.

Warning: Subsystem 1 preempted, reads signals from an uninitialized subsystem.
Warning: Subsystem 2 preempted, reads signals from an uninitialized subsystem.
Warning: Subsystem 3 preempted, reads signals from an uninitialized subsystem.
Warning: Subsystem 1 will be executed, before input signals are initialized.
Warning: Subsystem 2 will be executed, before input signals are initialized.
Initializa
tion Complete.
-------

How can these warnings be analyzed deeper in order to see how they can be removed? The model is quite complex so it would be nice if MATRIXx supported this (if not now, it could be a feature for the future).

Thanks in advance!

/Torbjörn
0 Kudos
Message 1 of 5
(7,826 Views)
This warning happens when you have a discrete system in a discrete system (w/ different rates) with feedback.

Refer to Section 11.2 of the SystemBuild Users Guide for more information on how discrete systems and subsystems are initialized.

http://www.ni.com/pdf/manuals/370761a.pdf

Use the initmode keyword to change the method of initialization. You may consider using initmode=0.

Joseph D.
National Instruments
Message 2 of 5
(7,825 Views)
What Version of Mx are you using? How many subsystems do you have have only three? What are the rates of those subsystems? When you review the catalog are there now only discrete subsystems? Can you send me the model to take a look at? garrett.thurston@comcast.net
Garrett Thurston
gthurston@foliage.com
Phone: 781.993.5540
0 Kudos
Message 3 of 5
(7,825 Views)
Hi Garrett,

I'm using version 6.3 of MATRIXx and unfortunatly I can not send you the model. However I can describe my problem in further detail.
The original model which we use for simulation in Systembuild is continuous. We also have a hardware-in-the-loop simulation equipment where we aslo use this model. So before we use autocode (for generation code to download to the HWIL equpment) we make the model discrete in order to analyze the model further before running the HWIL-simulation. Unfortunately our hardware have to poor performance so we need to reduce sampling frequency. But we can not reduce all parts as some parts of the model need high sampling frequency. The discrete model works OK in Systembuild when we have the same sampling frequency for the complete model. But when we reduce sampling frequency for some parts we change the internal schedular that systembuild (creates and) uses. So it is here the problem arises. I have three different sampling periods (0.001 sec, 0.005 sec and 0.1 sec) which corresponds to the three subsystems that I mentioned in my first question. I must also mention that we have some usercode-block with fortran code containing square root functions. So what happens is that the input to some of these usercode blocks are -epsilon (not initialized) when the simulation is initialized. Resulting in a simulation error saying :
"Square root of negative number."
"Stop condition occurred in block 'WDUCT', ID = 8,"

So I would like to see this sequencer in order to understand what I must do to remove these warnings I get. But the problem is that I can't do this (as I understand). Or at least I would like some information from systembuild that could assist me in some way. The best thing would be to let the user set priority or something else to control the sequencer. But this might be in future versions (or what do you say at NI?).

I have started to try to solve the problem using datastore blocks (variable block is another option) but again it would have been nice to get information from systembuild where to put them in order to remove the warnings.

/Torbj�
0 Kudos
Message 4 of 5
(7,825 Views)
Joseph,

yes I have read the section where it sais :

"The initialization procedure may fail in the event that a high priority subsystem is
dependent on the output of a low priority subsystem. In some cases, the problem
can be avoided by setting initmode = 0, which may result in a different initial subsystem
execution order, because the simulation scheduler considers other attributes
that affect timing (initial time skew), which the initialization procedure does
not. In extreme situations, you may need to modify or redesign your model to be insensitive
to the bounds of values communicated between subsystems."

I have tried to set initmode=0, I have also tried actiming=1, but without any good result. So it seems as this is an extreme situation. But
what I could need then, is some information on how the schedular looks like for a certain configuration of the model. So I will try to find out some intelligent way of remaking the model, hopefully without doing to much work.

I only wish that you could try to find a nice feature for future versions where systembuild could assist in these situations or/and where the user could control the sequencer by setting priorities or something for blocks in the model.

Regards,

Torbjörn
0 Kudos
Message 5 of 5
(7,826 Views)