Back

Integrating Custom Behavior Models in STK

More and more often I’m being asked, “How do I apply a custom behavior model to an STK object?”  The answer I typically have to come back with is “It depends. What are you trying to do with it?”  The truth is the techniques for integrating custom models with STK will vary quite a bit depending on a few things such as:

  • The inputs the model needs
    • Is it time dependent?
    • Do you need information from other objects in STK?
    • Is there a feedback loop (i.e. does the behavior mode change based on parameters of other objects)?
  • The intended use of the model in STK
    • Are you just trying to visualize something/make a movie?
    • Do you need to compute access?

If you’re thinking about integrating a custom model, try to answer the above questions.  You should then be able to put your model into one of the 4 categories shown in the below flowchart, and that will put you on the right track to start using your model in STK.

Category 1:

Static models

  • Description
    • Does not vary over time
    • Not dependent on anything else in the scenario
  • Examples
  • Things to consider with this type
    • This is the simplest type of external model and STK will be able to use this with its full suite of capabilities.
  • Method of use
    • A static file.  Documentation for the formats of these files can be found in the STK help.  Follow the links in the examples above to see some examples of this documentation.  To bring these files into STK is as simple as changing the properties of the object from being defined by one of the built-in analytical types to the using the object’s External type and browsing to the desired file.

Category 2:

Formulaic/Deterministic models

  • Description
    • A simple function of time. 
    • You can give it a specific time, and it will return the same value consistently regardless of the time of the previous call to the model. 
    • It is not dependent on anything else in the scenario.
  • Examples  
    • A vehicle that follows a known, pre-determined path
    • A sensor that scans in a predetermined circular pattern about some central point
  • Things to consider with this type
    • The time dependent files are as simple as the static files in Category 1. 
    • The list of items that can take a script plugin as an input can be found here.
    • Regardless of the method, STK will be able to use this with its full suite of capabilities with this category of models.
  • Method of Use
    • Most of these types of models can be put into STK through a time dependent file.  Ephemeris (.e) and Attitude (.a) files would use this method where you simply put time ordered values and STK reads them and automatically interpolates between the specified time values. 
    • For some objects, you can also use a script plugin that takes time as an input from STK and outputs a value based on a lookup table inside your script or using some formula to calculate the value as a function of time. 

Category 3:

Logical/Integration models

  • Description
    • Depends on time and/or other objects in the scenario
    • Follows a single control law (no feedback loop)
    • Numerically integrates over time from a known starting point to the time of interest to determine the output value.
  • Examples
    • A sensor that tracks another object in the scenario but has limited slew rates. 
  • Things to consider with this type
    • Works well with forward animation and reporting values over a time interval
    • Animating backward in time or calculating access intervals may cause unexpected results. 
  • Method of Use
    • Use a script plugin as in Category 2, but include any necessary information from other objects in the scenario as inputs to the script.  For example, the current position of the object the sensor is trying to track. 
    • The script will have to use global variables to remember the time of the previous call and calculate change in time between script calls to do numeric integration over time.
    • If you wish to do analysis with this model, after implementing the script, you’ll use STK as a forward time simulator to report the values of the model over time.  You can write this data to a time dependent file which reduces it to a Category 2 (Formulaic/Deterministic) model that can be used in place of the Integration model.  This will open up the full suite of analysis in STK.
    • An example scenario that shows this type of model can be found here.  You will need to have the Matlab Connectors installed for this scenario to work.

Category 4:

Feedback models

  • Description
    • Meets the description of categories 2 or 3 except the formulaic or control law behavior changes based on feedback in the model
  • Example
    • A radar performs a raster scan until the probability of detection to a target is greater than a threshold, at which point it changes its mode to track that target.
  • Things to consider with this type
    • This will likely introduce circular dependencies.  In the above example, the probability of detection calculation is dependent on the current orientation of the radar antenna as determined by the scripted behavior; however, the orientation of the antenna depends on the mode of the radar which in turn is a function of the probability of detection. 
  • Method of Use
    • First break the circular dependencies by having the dependent input values lag by a single time step.  In the case of the above example, the radar would point itself based on its raster scan logic, then it would evaluate the probability of detection (pDet) given that orientation.  In the next time step, the pointing on the radar would be dependent on the pDet from the previous time step. 
    • After breaking this circular dependency, it would still be necessary to reduce this to a Category 2 model using the method described for the Category 3 model in order to have STK’s full suite of analysis capabilities available in your scenario.
Author

Systems Tool Kit (STK)

Modeling and simulation software for digital mission engineering and systems analysis.