MATLAB Answers

Simulink solver small time delta sampling

1 ビュー (過去 30 日間)
Claudio Rey
Claudio Rey 2020 年 8 月 31 日
コメント済み: Claudio Rey 2020 年 9 月 3 日
There are problems that require adding a sample location that is very close to the current sample. Such problems involve Boolean signals in mixed signal domains such as PLLs where a very small latency e.g., a femtosecond is required. Clearly you do not want to run the simulator at 10^12 Hz or anywhere close to that. In my opinion there has to be an event driven approach where a sample is added as needed. The usual approach to cross from the signal domain to an event domain requires detecting signals crossing thresholds. One kludge is for the Boolean edge to start a timer and look for a crossing one femtosecond later. This is wasteful.

  3 件のコメント

Peter O
Peter O 2020 年 9 月 1 日
Simulink does zero crossing detection for signals: Are you suspecting that it is missing an edge event in your model? Are you running a fixed timestep solver?
Claudio Rey
Claudio Rey 2020 年 9 月 1 日
The fixed step solver does not make sense in this application.
Yes I mentioned the workaround is to use zero crossing detection and that is what I have done in the past. What we need instead is to be able to create extra tiny time steps after an event. The variable pulse delay block seems to address this but it is restricted to the mixed signal blockset however it is poorly documented. E.g., the variable pulse delay has a buffer size but it is not clear what to enter there. Even using a buffer size of 1 appears to work.
Claudio Rey
Claudio Rey 2020 年 9 月 2 日
I have investigated the variable pulse delay block and the problem is that it cannot be used in accelerator mode. It forces you into using normal mode for the simulator. This completely negates its usefulness. So we are back to square one.


回答 (1 件)

Nikhil Sonavane
Nikhil Sonavane 2020 年 9 月 3 日
You may consider using stiff solvers for your case. Here's a link to stiff solvers-

  1 件のコメント

Claudio Rey
Claudio Rey 2020 年 9 月 3 日
Thanks Nikhil, what we need is a block like the variable pulse delay (mixed signal blockset) that works with the accelerator. Changing the solver does not appear to me to be relevant, am I missing something?


Community Treasure Hunt

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

Start Hunting!

Translated by