概述
Examine the model
The Bernoulli Binary Generator block is configured to output one sample per second. The output branches to an upper and lower path. The upper path provides a reference signal to the Find Delay block. The lower path provides a delay path to the Find Delay block. A Delay(Simulink) block configured to process sample based inputs and to delay the signal by 10 samples is in the lower path. The Find Delay block compares the two input signals and outputs the calculated delay and the delay change flag. A time scope displays the delay and the chg outputs of the Find Delay block.
model = 'cm_find_delay_mdl';
open_system(model);
Run the model
Run the model with the Correlation window length parameter of the Find Delay block set to 15 samples.
The chg port outputs 0 when the value of the computed delay stays constant for longer than the Correlation window length. Ignore the Find Delay block outputs for the first correlation window period because there is no prior correlation period data for comparison. After the first correlation window period the calculated delay output shows delay variation over time and the chg port outputs 1, indicating a delay change in the previous correlation window, for all but one of the correlation windows. This result indicates that the Correlation window length is too short for the Find Delay block to accurately compute the delay between the two signals.
set_param([model,'/Find Delay'],'corrLength','15')
sim(model)
Run the model with the Correlation window length parameter of the Find Delay block set to 40 samples.
For this run, the output calculated delay settles at 10 samples at the 50 second mark, and the chg port toggles to 1 for just one of the Correlation window length periods. After the second correlation window period (at the 100 second mark), the computed delay output is stabilized and the chg output toggles to 0 for the remainder of the run.
set_param([model,'/Find Delay'],'corrLength','40')
sim(model)
close_system(model,0);
最后
以上就是欢喜小松鼠为你收集整理的matlab signal delay,Find Signal Delay的全部内容,希望文章能够帮你解决matlab signal delay,Find Signal Delay所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复