MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Podręcznik Użytkownika Strona 216

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 386
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 215
7 Models with Multiple Sample Rates
7-16
This timing diagram illustrates two problems:
1 Execution of the slower block is split over more than one faster block
interval. In this case the faster task executes a second time before the slower
task has completed execution. This means the inputs to the slower task can
change, causing unpredictable results.
2 The faster block executes before the slower block (which is backwards from
the way Simulink operates). In this case, the 1 sec block executes first; but
the inputs to the faster task have not been computed. This can cause
unpredictable results.
To eliminate these problems, you must insert a Unit Delay block between the
slower and faster blocks. The sample rate for a Unit Delay block must be set to
that of the block that is driving it (i.e., the slower block):
This pictures shows the timing sequence that results with the added Unit
Delay block:
Slower
Faster
Block
T=2sec
T=1sec
Unit Delay
Block
T=2sec
Przeglądanie stron 215
1 2 ... 211 212 213 214 215 216 217 218 219 220 221 ... 385 386

Komentarze do niniejszej Instrukcji

Brak uwag