A rather large number of SDF demonstrations have been developed. These can serve as valuable illustrations of the possibilities. Almost every star is illustrated in the demos. Because of the large number, the demos are organized into a set of palettes. Certain demos may appear in more than one palette. A top-level palette, shown in figure
3-19, contains an icon for each demo palette. Notice that the demo palettes collect the hierarchy in a single column, whereas the star palettes collect the hierarchy in two columns.
These demos illustrate the use of certain stars without necessarily performing functions that are sophisticated. The palette is shown in figure
3-20. The demos are described below from left to right, top to bottom.
illustrate synchronous dataflow principles as applied to multirate signal processing problems. These are arranged roughly in order of sophistication.
Use sines and cosines to compute a curve known as the butterfly curve, invented by T. Fay. The curve is plotted in polar form.
Chaotic Markov map example with a nonlinear feedback loop.
Compare two sinusoidal signals using the
Illustrates the use of initializable delays.
Illustrate the use of the LMS algorithm to estimate the dominant sinusoidal frequency in the input signal.
Impose frequency jitter and phase offset on a sinusoid using the
freqPhase SDF block.
Generate a Gaussian white noise signal, and plot its histogram and estimated autocorrelation.
Demonstrate the features of the integrator star, such as limiting, leakage, and resetting.
Demonstrate modulus computation for float and integer data types.
DeMux stars, which perform multiplexing and demultiplexing. Contrast with the
scramble demo below.
Demonstrate the use of the
This system rearranges the order of samples of signal using the
Distributor stars. Note that because these are multirate stars, one iteration involves more than one sample. Contrast with the
muxDeMux demo above.
Modulate a sinusoid by multiplying by another sinusoid.
Illustrate the bus facility in Ptolemy, in which multiple signals are combined onto a single graphical connection.
The demos with icons shown in figure
Give an example of an inconsistent SDF system. It fails to run, generating an error message instead.
Use an FIR filter to upsample by a factor of 8 and linearly interpolate between samples.
Upsample a sinusoidal signal by a ratio of 5/2 using a polyphase lowpass interpolating FIR filter.
FIRCx star filter to reduce the sample rate of a sinusoid by a factor of 8/5, and at the same time produce a complex approximately analytic signal (one that has no negative frequency components).
Implement an eight-level perfect reconstruction one-dimensional filter bank based on the biorthogonal wavelet decomposition.
Convert from the digital audio tape sampling rate (48 kHz) to the compact disc sampling rate (44.1 kHz). The conversion is performed in multiple stages for better performance.
Convert from the compact disc sampling rate (44.1 kHz) to the digital audio tape sampling rate (48 kHz). The conversion is performed in multiple stages for better performance.
The palette shown in figure
3-22 points to some examples of digital communication systems and channel simulators. This palette has been steadily growing.
A 16-QAM signal is sent through a baseband equivalent channel that simulates the following impairments: frequency offset, phase jitter and white Gaussian noise.
Dual-Tone Modulated Frequency Demo. Generate touch tones and decode the based on the Goertzel Algorithm.
Plot an eye diagram for a binary anitpodal signal with a raised-cosine pulse shape and user controlled noise.
Dual-Tone Modulated Frequency Demo. Generate touch tones
and decode the based on the LMS Algorithm.
Illustrate the effect on speech of a zero-substitution policy in a network (such as ATM) with 48 byte packets and a variable loss probability. Note that this demo requires audio capability and will probably only work on Sun workstations.
Illustrate the effect on speech of a previous cell substitution policy in a network (such as ATM) with 48 byte packets and a variable loss probability. Note that this demo requires audio capability and will probably only work on Sun workstations.
Baseband model of a 16-QAM modem.
Generate a pseudo-random sequence of zeros and ones using a maximal-length shift register and test its randomness by estimating it autocorrelation.
Generate raised cosine and square-root raised cosine pulses and demonstrate matched filtering with the square-root raised cosine pulse.
Bit Error determination through simulation at various noise levels.
Simple 2-level PAM communication system (matched filtering at the receiver).
Simple 4-level PAM communication system (no filtering at the receiver).
Produce a 16-point quadrature amplitude modulated (QAM) signal and displays the eye diagram for the in-phase part, the constellation, and the modulated transmit signal.
This is a model of a digital communication system that uses quadrature amplitude modulation (QAM) and a fractionally spaced decision feedback equalizer.
Encode and decode a 16-QAM signal using differential encoding for the quadrant and Gray coding for the point within the quadrant.
Simulate a fourth-power optical phase-locked loop with laser phase noise and additive Gaussian white noise operating on a complex baseband envelope model of the signal.
A fairly large number of signal processing applications are represented in the palette shown in figure
3-23. Several of these serve as good examples to help in solving the exercises included at the end of the chapter.
assume that a program called
An LMS adaptive filter converges so that its transfer function matches that of a fixed FIR filter.
Two realizations of an all-pole filter are shown to be equivalent. One uses an FIR filter in a feedback path, the other uses the
An LMS adaptive filter is configured as in the
adaptFilter demo, but this time the filter taps are displayed as they adapt.
A complex LMS adaptive filter is configured as in the
adaptFilter demo, but in addition, user-controlled noise is added to the feedback loop using an on-screen slider to control the amount of noise. The filter taps are displayed as they adapt.
Given the coefficients of any polynomial, this demo uses the cepstrum to find a minimum-phase polynomial. Thus, given the coefficients of the denominator polynomial of an unstable filter, this demo will compute the coefficients of a stable denominator polynomial that has the same magnitude frequency response.
This is a simple demonstration of chaos, in which the phase-space plot of the famous Henon map is given.
Convolve two rectangular pulses in order to demonstrate the
Compute a discrete Fourier transform of a finite signal using the
FFT star. The magnitude and phase (unwrapped) are plotted.
A sine wave is subjected to four successive amounts of doppler shift. The doppler shift is accomplished by the
phaseShift galaxy, which forms an analytic signal (using a Hilbert transform) that modulates a complex exponential.
DTFT star, showing how it is different from the
FFTCx star. Specifically, the range, number, and spacing of frequency samples is arbitrary.
This system designs FIR filters using the frequency sampling method. Samples of the frequency response are converted into FIR filter coefficients.
Two equivalent impementations of IIR filtering. This demo is not present in Ptolemy0.6.
Demonstrate the use of lattice filters to synthesize an auto-regressive (AR) random process.
Use of Levinson-Durbin algorithm to design a lattice filter with a specified transfer function.
Use the Levinson-Durbin algorithm to estimate the parameters of an AR process.
Perform linear prediction on a test signal consisting of three sinusoids in colored, Gaussian noise. Two mechanisms (Burg's algorithm and an LMS adaptive filter) for linear prediction are compared.
Convolution is implemented in the frequency domain using overlap and add.
Simulate a plane wave approaching a phased array with four sensors. The plane wave approaches from angles starting from head on and slowly rotating 360 degrees. The response of the antenna is plotted as a function of direction of arrival in polar form.
Compare three methods for estimating a power spectrum of a signal with three sinusoids plus colored noise. The three methods are the periodogram method, the autocorrelation method, and Burg's method.
A time-varying spectrum is computed using the autocorrelation method and displayed using a waterfall plot.
Generate and display four window functions and the magnitude of their Fourier transforms. The windows displayed are the Hanning, Hamming, Blackman, and steep Blackman.
The demos in the palette in figure
ptplay is in your path, and that it accepts data of an appropriate format and will play it over a workstation speaker at an 8 kHz sample rate. If you are using a Sun SPARCStation, these conditions will most likely be satisfied, if your path is correct. The
ptplay program has also been used on SGI Indigos and HP 700s and 800s. If you are on an HP, you may need other publicly available software.The samples are written into a file before they are played. Since a large number of samples must be generated, these demos can take some time to run. By contrast, the CGC domain has some audio demos that generate sounds in real time at 8 kHz, assuming a reasonably fast workstation.
Chirp generator that plays on the workstation speaker.
Sound generator using FM modulation that plays on the workstation speaker.
Read a speech signal from a file, and encode it at two bits per sample using adaptive differential pulse code modulation with a feedback-around-quantizer structure. The signal is then reconstructed from the quantized data. The original and reconstructed speech are played over the workstation speaker.
Simulation of plucked string sounds using the Karplus-Strong algorithm.
Coarticulation with an Adaptive Vocoder. The resulting FM synthesized sound is played over the workstation speaker.
A block processed version of the vox demo.
Illustrate the effect on speech of a zero-substitution policy in a network (such as ATM) with 48 byte packets and a variable loss probability. This demo also appears in the basic demos palette
Illustrate the effect on speech of a previous cell substitution policy in a network (such as ATM) with 48 byte packets and a variable loss probability. This demo also appears in the basic demos palette.
Eight-channel perfect reconstruction one-dimensional analysis/synthesis filterbank. The incoming speech signal is split into eight adjacent frequency bins and then reconstructed. The original and reconstructed speech are played over the workstation speaker.
The demos in figure
3-25 all read images from files on the workstation disk, process them, and then display them. Some of the demos process short sequences of images, thus illustrating video processing in Ptolemy. They all use the image classes described in
"Image processing stars" on page 3-105. The set of demos in this palette does not reflect the richness of possibilities. See the DE domain for more image and video signal processing applications in the context of packet-switched network simulations. The video display requires that the Utah Raster Toolkit be installed and available in the user's path.
Combine two images and display the result.
Demonstrate four different forms of black and white dithering: error diffusion, clustered dither, dispersed dither, and use custom mask.
Contrast enhancement by histogram modification.
Convert an RGB (red-green-blue) format color image to YUV (luminance-hue-saturation) format and back, and then display it on the workstation screen.
Median filter an image to reduce artifacts due to interleaved scanning in video sequences.
Perform discrete cosine transform (DCT) coding of an image sequence.
Perform differential pulse code modulation (DPCM) on an image sequence.
Demonstrate four different forms of edge detection: Sobel, Roberts, Prewitt, and Frei-Chen.
Perform motion compensation and DCT encoding of video.
Perform motion compensation video coding.
The demos shown in figure
3-27 illustrate the use of fixed-point stars in the SDF domain. These stars are used to model hardware implementations with finite precision.
- The Vec_Quan icon in the image processing palette brings up a sub-palette that has several vector quantization demonstrations in figure
- Generate a codebook for full search vector quantization.
- Full search vector quantization using codebook generated by
- Generate codebooks for shape-gain vector quantization.
- Shape-gain vector quantization using codebook from
- Generate codebooks for mean-removed vector quantization using independent quantizer structure.
- Generate codebook for mean-removed vector quantization.
- Generate the shape codebook for mean-removed quantization using alternate structure. This universe uses the codebook generated by
- Mean-removed vector quantization.
Illustration of the different masking options available.
Effect of filter tap precision on the frequency response.
Comparison of a fourth-order direct-form IIR filter implemented with floating-point arithmetic and a similar filter implemented with fixed-point arithmetic.
Testing of fixed-point multiplication over a range of numbers by comparison against floating-point multiplication. The results should be the same.
These demos shown in figure allow the user to interact with the simulation. The interactivity is provided by the Tcl scripting language controlling the Tk graphics toolkit. Tcl is integrated throughout Ptolemy. Tk has been integrated into the graphical user interfaces for Ptolemy, but not in the ptcl textual interpreter. Therefore, these stars do not work in ptcl.
TkSlider by creating a vertical array of radar sensors that can be move in the horizontal plane. Note that small movements of the sensors radically change the polar gain plot. This simulation demonstrates the importance of sensor calibration to performance of the sensor array.
TkBarGraph by generating and displaying a complex exponential.
TclScript by generating two interactive X window follies that consist of circles that move in the same playing field.
TkMeter by creating three bar meters. The first oscillates sinusoidally. The second displays a random number between zero and one. The third displays a random walk.
TkText by displaying the ASCII form of two ramp sequences.
Demonstrate the dynamic plotting capabilities of the
The systems in figure
3-29 demonstrate the use of matrix particles in Ptolemy. Matrices are also used in the SDF domain to represent images.
See "Image and video processing demos" on page 3-120. The demonstrations below are primarily to test matrix operations.
Demonstrate the use of the Matrix stars that have one input. These include the operations inverse, transpose, and multiply by a scalar gain for all matrix types. Also conjugate and Hermitian transpose are available for the complex matrix type.
Demonstrate the use of some simple Matrix stars with two inputs. These include multiply, add, and subtract.
Demonstrate the use of the Matrix conversion stars. These convert between the scalar particles and the matrix particles as well as between the various matrix types.
Illustrate the use of initializable delays with the
Compare the convergence properties of a Kalman filter to those of an LMS filter when addressing the problem of adaptive equalization of a process in noise.
Show the use of singular-value decomposition (SVD) and the Multiple-Signal Characterization (MUSIC) algorithm to identify the frequency of a single sinusoid in a signal that has two different signal to noise ratios.
Demonstrate the use of the Multiple-Signal Characterization (MUSIC) algorithm to identify three sinusoids in noise that have frequencies very close to each other.
The demos pictured in figure
3-30 illustrate the use of the MATLAB stars. The MATLAB stars convert input values into MATLAB matrices, apply a sequence of MATLAB commands to the matrices, and output the result as Ptolemy matrices. The filterPrototype demonstration shows how to use MATLAB to compute parameters of stars.
This demo uses MATLAB as a signal source to produce a Hilbert matrix. The Hilbert matrix is an ill-conditioned matrix used to test the robustness of numerical linear algebra routines. The matrix element (i,j) has the value of 1 / (i + j - 1). The matrix values appear similar to the coefficients of a discrete Hilbert transformer.
This demo shows the use of MATLAB to perform eigendecomposition of a 2 x 2 Hermitian symmetrix complex matrix. A matrix of eigenvectors and a matrix of eigenvalues are produced. The eigenvalues are real because the input matrix is Hermitian symmetric
This demo is an entire universe composed of a cascade of four MATLAB stars. The MATLAB stars are used a signal source and a signal sink. The overall system generates and plots a mathematical model of a two-dimensional sinc function that resembles a sombrero.
This system uses a halfband lowpass filter prototype for the lowpass and highpass filters. All parameters are computed using MATLAB.
The Higher Order Function demos are described in the HOF domain chapter.
See "An overview of HOF demos" on page 4-164.
A scripted run executes the tcl code in the run control panel tcl script window. Scripted runs can be used to set up interactive tutorials.The demos shown in figure
3-31 illustrate the use of scripted runs.
An interactive tutorial that leads a user through a session that runs a simple universe.
This demo runs the same sine wave modulation universe three times, each time with a different frequency.
This demo runs a bit error determination universe at various noise levels and then plots the output.
Copyright © 1990-1997, University of California. All rights