How can control the phase delay of the signal generated by "Pulse Generator" block externally?
조회 수: 7 (최근 30일)
이전 댓글 표시
Hi friends,
I want to generate a square wave by using pulse generator block in simulink where phase delay is coming from an external source. As you know the phase delay of the output signal of this block can be set internally. Is it possible to control the phase delay of this block by a external signal?
Regards Foad
댓글 수: 0
채택된 답변
Niklas Nylén
2014년 2월 7일
편집: Niklas Nylén
2014년 2월 7일
If you have a limited range of number of samples that your signal should be delayed you could build a block for variable delay using a number of unit delays and a multiport switch. I have attached a model which could handle between 0 and 10 samples of delay (although I have not verified it more than that it is simulatable).
댓글 수: 2
추가 답변 (2개)
ES
2014년 2월 7일
When the external signal comes, do a
set_param(BlockName,'PhaseDelay',PhaseDelayValue);
Niklas Nylén
2014년 2월 7일
If I understand your question correctly it could probably be solved by placing a "Variable time delay" block after the pulse generator block and connect the external source to that block.
참고 항목
카테고리
Help Center 및 File Exchange에서 Sources에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!