Override Unit Delay block outptut
古いコメントを表示
Product: Simulink Problem Statement: Complex feedback loops implying usage of Unit Delay Block. At certain simulation frame calculation of required values for test generation is becoming complex. Is there a way to override the Unit Delay block output without changing the model (as I am not allowed to do so) rather by using set_param. I am using cvdata/sim/cvhtml combination for my simulation. I tried extracting all the assocaited aparameter sfor Unit Delay using
get_param(gcb,'ObjectParameters');
but was not able to find a suitable parameter to use owing to lack of help information on each parameters.
Kindly help me out if this approach is possible.
4 件のコメント
Fangjun Jiang
2011 年 12 月 11 日
I don't understand your question.
Shouvik Das
2011 年 12 月 12 日
Walter Roberson
2011 年 12 月 12 日
Some people would define using set_param as "changing the model". Whether you change the model by set_param or by clicking on the block and changing its parameters, the model is still changed.
Shouvik Das
2011 年 12 月 12 日
採用された回答
その他の回答 (1 件)
Walter Roberson
2011 年 12 月 12 日
0 投票
http://www.mathworks.com/help/toolbox/simulink/slref/f23-20073.html#discrete_lib_blkparams and scroll to the very near the end of that subsection (it is a big subsection) to find a description of all of the parameters for the Unit Delay block. In particular the Initial Conditions (hold period) of the block is controlled by the X0 parameter.
However, it is not clear that you want to change the delay. You speak of changing the output, so it sounds like at the particular point you want to substitute new outputs for the current outputs, and you want to do it at the particular point so that you get the right timing attached to the values. If this is what you want to do, then there is no way to do that by using set_param on the Unit Delay block. Instead, between the Unit Delay block and the block(s) that use the output, you should interpose a MATLAB Function block that examined the input and timestep and determined the appropriate output. If the output of the Unit Delay block is going to multiple other blocks, then Yes, you would end up having to change the attachment points for multiple blocks.
カテゴリ
ヘルプ センター および File Exchange で Programmatic Model Editing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!