Running the BPSK Template

A few windows should appear on your screen after Ptolemy is started, including the one below. This window contains the Ptolemy facet init.pal for this design. This facet will automatically appear whenever Ptolemy is started in this directory.

init.pal facet

To close a window type ctrl-D with the pointer over it. To examine the BPSK template simulation place the pointer over the far left icon in this window and type "i" for look-inside. The window below should then appear. It contains the complete simulation block diagram. In Ptolemy, a complete application like this BPSK simulation is called an universe.

bpsk universe window

The BPSK universe contains four galaxies including the BPSK transmitter galaxy named BPSKxmit. Again, place the pointer over a galaxy and press "i" to view its contents. Opening the BPSKxmit galaxy should reveal the window below.

bpsk transmitter galaxy

The transmitter galaxy contains two Ptolemy stars named Table and Repeat. The first is a simple lookup table that converts the binary values at its input into antipodal signals of unit amplitude. The source code for this star can be examined by typing "i" with the pointer over its icon. However, this can sometimes result in information overload. Pressing the comma (",") key will instead reveal the function of a particular star. Likewise, pressing "e" for edit-params will reveal the parameters used by this star. For instance, the parameters for the Table star indicate that the bit values 0 and 1 are mapped to +1 and -1 respectively. The Repeat star repeats each input (single value or block of values) for the number of times specified in its parameters, basically performing a sampling rate conversion.

Press "R" for run-universe with the pointer over the BPSK universe. This will present a dialog box like the one below.

bpsk universe run window

The box "When to stop" specifies the how many iterations the simulation will run. Clicking the Go button or pressing return will run the simulation. The cumulative BER is displayed on the control panel as the simulation runs. After all iterations are complete, the XMgraph star will plot the transmitted signal and the received signal for the simulation.

The value of Eb_N0_dB and the sampling rate can be changed by edit-params while the pointer is over the universe (see below). Notice that the values of these parameters are passed to the galaxies in the universe. In fact, the noise variance in the AWGNCh galaxy is a function of both of them. Examine the effect of the noise variance on the received signal by running the simulation several times with a different Eb_N0_dB value and leaving the resulting plot open for comparison.


John C. Sperandio <sperandi@eng.usf.edu >
Last modified: Thu Oct 9 17:40:20 EDT 1997