**4. Discussion**

Interacting concurrent activities can produce behaviour that is difficult to anticipate. The combinatorial capacities of just the ordering of parallel thread execution will exhaust any brute force attempt at testing the possible permutations. Moreover, the possibilities of rare anomalies attributed to corner cases of executions may take non-determinant times to reveal, or worse, are not easily repeatable. The sporadic defect that occurs rarely in the lab usually has a real origin and should never be ignored **(Kuhn, et al, 2004).** 

The figure below shows a representative timeline trace of the interacting subsystems on a typical automated ground vehicle. The task interactions are interleaved and pipelined.

360 Applications of Digital Signal Processing

The same inputs as that for the Context-Switching Metric described earlier result in the following *Figure 6*. Note that in this case as well, the sample entropy is always higher for the disordered signal than for the ordered signal. The reference *1/f* noise level is shown on the

**Multiscale Entropy**

disordered ordered

Fig. 6. For the same pair of inputs we used on the context-switching metric, the multiscale entropy appears as the following graph. It shows greater variety than the context-switching metric over the time scales because the metric compares at different levels of resolution.

0 5 10 15 20 **Scale Factor**

In practice, the multi-scale algorithm requires only a basic periodogram method invoked over different time scales. The output is one value per temporal scale factor so the results are best displayed as a graph, via a spreadsheet or bar-charting software for example. The calculation is somewhat more brute force compared to the FFT, with complexity *o(n2)* versus *o(n\*ln(n)).* The context-switching metric operates over a narrower time scale so gets rolled

Interacting concurrent activities can produce behaviour that is difficult to anticipate. The combinatorial capacities of just the ordering of parallel thread execution will exhaust any brute force attempt at testing the possible permutations. Moreover, the possibilities of rare anomalies attributed to corner cases of executions may take non-determinant times to reveal, or worse, are not easily repeatable. The sporadic defect that occurs rarely in the lab

The figure below shows a representative timeline trace of the interacting subsystems on a typical automated ground vehicle. The task interactions are interleaved and pipelined.

into a single value, simplifying the presentation into a classical scalar metric.

usually has a real origin and should never be ignored **(Kuhn, et al, 2004).** 

**4. Discussion** 

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2

**Sample Entropy**

plot to indicate the asymptotic maximum entropy level achievable.

1/f noise level

**3.2 Comparison to single-scale metric** 

Fig. 7. GANTT chart of a typical vehicle system execution trace showing interacting threads. Time proceeds left to right, and one thread exists per horizontal entry. The lines indicate thread synchronization points. This diagram is only meant to give a notional idea of complexity, and the text description along the left edge is irrelevant to the discussion.

Entropic Complexity Measured in Context Switching 363

switching metric can be used as selection criteria to minimize inherent algorithmic complexity. It is comparable or equivalent to the Shannon information metric, which

As an alternative approach we compared this against a multi-scale entropy measure. Although more involved in construction, the multi-scale entropy can be used as an orthogonal metric, perhaps more useful for measuring temporal behaviours of a wide dynamic range or as a more detailed diagnostic tool. This will reveal finer structures in

We wish to thank the DARPA META program for providing encouragement to develop

Bao, L. Intille, S. S., (2004). Activity Recognition from User-Annotated Acceleration Data,

Benedetto, D. Caglioti, E. Loreto, V., (2002). Language Trees and Zipping, *Physical Review* 

Brigham, E. O. and Morrow, R. E., (1967). The Fast Fourier Transform, IEEE Spectrum, Vol.4,

Costa, M., Goldberger, A.L., and Peng, C.-K. (2005). Multiscale entropy analysis of biological

Feller, W., (1957). *An Introduction to Probability Theory and Its Applications,* Volume I and II,

Gell-Mann, M., (1994). *The Quark and the Jaguar: Adventures in the Simple and the Complex*,

Jaynes, E. T., (2003). *Probability Theory: The Logic of Science*, Cambridge University Press,

Klein, M., (1993). *A Practitioner's handbook for real-time analysis: Guide to rate monotonic analysis for real-time systems,* Kluwer Academic Publishers, ISBN 0792393619 . Kuhn, D.R., Wallace, D.R., Gallo, A.M., Jr., (2004). Software fault interactions and

Leon-Garcia, A., (2008). *Probability and Random Processes for Electrical Engineering*, Prentice-

Ludwig, L. and Pukite, P., (2006). DEGAS: discrete event Gnu advanced scheduler,

Milotti, E., (2002). 1/f Noise: A Pedagogical Review, invited talk to E-GLEA-2, Buenos Aires,

Montroll, E.W. and M.F. Shlesinger, (1982) .On 1/f noise and other distributions with long tails, Proceedings of the National Academy of Sciences, 79/10, 1982. Peterson, J. L., (1981). Petri Net Theory and the Modeling of Systems, Prentice-Hall,

implications for software testing, *IEEE Transactions on Software Engineering*, Vol.30

*Proceedings of the 2006 annual ACM international conference on SIGAda*, ACM SIGAda

Pervasive Computing, Lecture Notes in Computer Science, Vol.3001, pages 1-17,

essentially measures entropy of a system.

complexity than the single-scale metric can.

complexity metrics for cyber-physical system development.

Springer-Verlag, ISSN 0302-9743

No.12, p.63-70, ISSN: 0018-9235 .

No.6, p.418-421, ISSN: 0098-5589

John Wiley, 1957

ISBN 052159271.

Hall, p.273, (2008).

arXiv:physics/0204033v1

Englewood Cliffs, NJ.

*Letters*, Vol.88, No.4, ISSN 0031-9007.

signals, *Physical Review E,* Vol.71, No.2.

W.H. Freeman and Co, ISBN0-7167-2725-0.

Ada Letters, Vol XXVI Issue 3 , ISBN 1-59593-563-0.

**6. Acknowledgment** 

**7. References** 
