Effacer les filtres
Effacer les filtres

How the rate transition block decides on data transfer?

2 vues (au cours des 30 derniers jours)
Murwan Bashir
Murwan Bashir le 1 Mar 2018
Hi , I am using rate transition block to integrate two blocks with each other. The first block generates data and the second block takes the data frames and perform iterative processing, hence the second block should run with the data available from the first block. This setting works fine (the data available to the second block after the rate transition to do iterations on it) until the algorithm on the second block is updated with computationally intensive, and the rate transition now is providing the data from the first block only at the last iteration, that is , the rate transition is doing something to data integrity and i can't pin point that. How i can insure that the data from the first block available all the time to second block?

Réponses (1)

vijaya lakshmi
vijaya lakshmi le 22 Mar 2018
Hi Murwan,
I think the rate transition block might be introducing a unit delay during data transfer.
To achieve data tarnsfer without unit delay,
  1. Please open the “Rate Transition” block parameter dialog box. The data transfer mechanism is controlled by “Ensure data integrity during data transfer” option. Please uncheck this option, click on “Apply” and then “OK”.
  2. Please check the solver options you are using, you can check this by looking into the “Model Configuration Parameters” dialog box. To open it you can use “Ctrl+E” as a keyboard shortcut or select Simulation > Model Configuration Parameters from the top pane of the Simulink Editor window.
a. When you are using a “Fixed-step” solver type, please make sure to select “SingleTasking” option under “Tasking mode for periodic sample times”. Please click “Apply” and the “Ok” to save the configuration settings. By default “Auto” mode is selected, which signifies “MultiTasking” mode if the model has multiple sampling rates. Selecting “SingleTasking” mode will ensure that all blocks are processed through each stage of simulation together.
b. You may ignore the settings described in 2.a if you are using “Variable-step” solver. Also please note that, when “Ensure data integrity during data transfer” option is off (step 1), the data transferred between rates might not maintain its integrity and is unprotected. In unprotected mode, the “Rate Transition” block does nothing other than allow the rate transition to exist in the model. It is for simulation purposes and is not recommended for purposes like code generation.
Hope this information helps you!

Community Treasure Hunt

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

Start Hunting!

Translated by