Frame-Based Signals

Frame-Based Single Channel Signals

Signals can be sample-based or frame-based, single channel or multichannel. The following figure shows a discrete-time signal. If this signal is propagated through a model in batches of samples, it is called a frame-based signal. It is also single-channel signal, because there is only one independent sequence of numbers.

Frame-based single channel signals are represented as vectors. An M-by-1 frame-based vector represents M consecutive samples from a single channel. In other words, each matrix row represents one sample, or time slice, from one distinct channel.

Frame-Based Multichannel Signals

Frame-based multichannel signals are represented as matrices. An M-by-N frame-based matrix represents M consecutive samples from each of N independent channels. In other words, each matrix row represents one sample, or time slice, from N distinct signal channels, and each matrix column represents M consecutive samples from a single channel.

For example, this 6-by-4 matrix represents a four-channel frame-based signal with six samples per frame.

Consider a sequence of frame matrices, where ut=0 is the first matrix in a series, ut=1 is the second, ut=2 is the third, and so on.

The signal in channel 1 is the following sequence:

Similarly, the signal in channel 3 is the following sequence:

Benefits of Frame-Based Processing

Frame-based processing is an established method of accelerating both real-time systems and simulations.

Accelerating Real-Time Systems

Frame-based data is a common format in real-time systems. Data acquisition hardware often operates by accumulating a large number of signal samples at a high rate, and propagating these samples to the real-time system as a block of data. This maximizes the efficiency of the system by distributing the fixed process overhead across many samples; the "fast" data acquisition is suspended by "slow" interrupt processes after each frame is acquired, rather than after each individual sample.

The figure below illustrates how throughput is increased by frame-based data acquisition. The thin blocks each represent the time elapsed during acquisition of a sample. The thicker blocks each represent the time elapsed during the interrupt service routine (ISR) that reads the data from the hardware.

In this example, the frame-based operation acquires a frame of 16 samples between each ISR. The frame-based throughput rate is therefore many times higher than the sample-based alternative.

It's important to note that frame-based processing introduces a certain amount of latency into a process due to the inherent lag in buffering the initial frame. In many instances, however, it is possible to select frame sizes that improve throughput without creating unacceptable latencies. For more information, see Delay and Latency.

Accelerating Simulations

The simulation of your model also benefits from frame-based processing. In this case, it is the overhead of block-to-block communications that is reduced by propagating frames rather than individual samples.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS