Rate Transition Block (SIMULINK)

4 views (last 30 days)
Brandon
Brandon on 3 Jul 2013
I am running into an error while using the Rate Transition Block in SIMULINK. I have one subsystem which requires enormous amounts of calculations but doesn't change quickly, so I would like to run that at 1 second intervals and downsample it to 0.1 seconds, which the rest of the simulation must operate at.
The "orbital clock block" on the far right is set to a sample time of 1 and the output blocks (1) and (2) are set to sample time of 0.1. I cannot find a way to change the sample time of the "ECEF Position to LLA", "WMM" and "Directional Cosine Matrix ..." blocks, so I am assuming they are by default set to inherit. All other block have a sample time of -1. The simulation configuration is set to "Fixed Step Discrete" with a time step of "auto."
I did a time analysis on the block diagram and uploaded it here: https://docs.google.com/file/d/0By6D4hazb498UlB0YzlJQlhvNFE/edit?usp=sharing
Thanks in advance for any help.

Answers (1)

Brandon
Brandon on 3 Jul 2013
Edited: Brandon on 3 Jul 2013
The problem I was having is not associated with the rate transition block, but rather the World Magnetic Model block. There is a memory block embedded in several of the subsystems within the block. They include:
  • Has Time Changed
  • Has longitude changed
  • Has altitude or latitude changed
The "Inherit sample time" check box is disabled by default. I believe this results in the simulation clock time being used, rather than the inputted signals sample time. Unmasking the system and checking the box solves this problem. I do not notice any change in the performance of the block after this change.
MATLAB 2011a was used.
Would any of the Mathworks staff know why the world magnetic model block behaves this way.
  1 Comment
Guy Rouleau
Guy Rouleau on 3 Jul 2013
Very good job at investigating this. Your explanation and workaround are appropriate.
I do not have an explanation about why the Inherit sample time box is disabled. At first look, I think it should be checked.
Please submit a request to technical support and we will investigate to see if the current setting is there for a good reason.

Sign in to comment.

Categories

Find more on Simulink in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!