Quick Tour
The following links open models that highlight the
key features of Ptolemy II. To run the models,
follow the link, then select "Run Window" from the "View" menu. The
diagrams are fully editable, so feel free to explore. The top-level
parameters are the model are shown in the run window. Edit these to
explore the models. They can be edited while the models are running.
You can also access the complete
list of demos
.
-
Simple Signal Processing (See also
Maximum Entropy Spectrum,
Fourier Series, and
Sound Spectrum)
This example shows simple spectral estimation of the product
of two sinusoids in noise. It illustrates models for signal
processing, hierarchical models,
the Expression actor, and the FFT actor.
This model is build using the synchronous dataflow (SDF) domain,
which statically schedules the firing of the actors.
-
Continuous-Time Modeling (see also
Square Wave Response)
This example shows a continuous-time
nonlinear feedback system that exhibits
chaotic behavior (this system is called a Lorenz attractor).
It illustrates the continuous-time (CT) domain,
which uses an underlying solver for ordinary differential equations.
-
Discrete-Event Modeling (see also
Router
and
Timing Paradox).
This example shows
a famous paradox in probability called the inspection paradox.
It illustrates use of the discrete-event (DE) domain, where
events occur on a time line and are processed chronologically.
In this example, random
data stimulates a model and statistics are collected and reported
in various ways.
-
Mixed-Signal Modeling (see also
Switching Continuous)
This example shows how to combine continuous-time modeling
with discrete-event modeling to get mixed-signal modeling.
The example models a MEMS accelerometer where a digital circuit
implements feedback control and A/D conversion (a design due to
Mark Lemkin).
-
Modal Models
A modal model is one whose behavior depends on its "mode"
of operation. A modal model in Ptolemy II uses the
finite state machine (FSM) domain
combined hierarchically with other models. A state in the FSM represents
a mode of operation, and can have a refinement that gives the behavior
in that mode.
The refinement can be another FSM or some other model using some other
Ptolemy domain. This example combines DE, FSM, and SDF to model a
system where regularly sampled signals are perturbed by irregular
events in time.
-
Hybrid Systems
(see also
Transmission,
and
Car Tracking).
Hybrid systems are a special case of modal models
where the FSM domain is combined with the CT domain
to get mixed continuous-time and discrete-event models.
This example models a physical system consisting of two point masses
on springs that stick together when they collide.
-
Classes, subclasses, and inner classes (see also
Noisy sinewaves and
Rijndael Encryption).
Version 4.0 introduces actor-oriented classes, subclasses, and
inner classes with inheritance. This is a major improvement in
the modularity mechanisms available in actor-oriented design.
-
Process Networks (see also
QR).
This example illustrates the process networks (PN) domain,
where each actor executes in a separate Ptolemy II thread.
The example calculates numbers whose prime
factors are 2, 3, and 5, only, and produces
them in an ordered sequence.
-
The Type System.
This model illustrates the very sophisticated type system
of Ptolemy II, where type constraints propagate transparently,
actors are polymorphic, and composite types such as records and
arrays are supported.
This example illustrates composite types, where records are
constructed out of tokens with various types. Here, a record
models a packet in a packet-switched network, where variable
delays may result in out-of-order arrival of packets.
-
Higher-order expressions.
To simplify creating new components, Ptolemy II contains a functional
expression language. The expression language is integrated with the
type system, allowing static type checking of polymorphic expressions
with few type annotations. The expression language also allows new,
encapsulated functions, called function closures, to be defined and
passed as data. This model illustrates how function closures can be
used to make model much more compact.
- Sketched Signal
(see also Fourier Series).
This model illustrates the use of plotter to provide input
as well as rendering output from a model. Right click and drag
on the plot to trace out a new signal. The model runs each time you
do this.
-
Matlab Integration (see also
Matlab in CT).
This example uses the Matlab interface created by
Zoltan Kemenczy and Sean Simmons, of Research in Motion Ltd.,
to plot a 3-D surface. This works only if Matlab is installed locally.
- Interactive
User Interface (see also
Bouncer).
This model illustrates features of the user interface that
make it easier to create models that execute with rich interaction
with the user. In this example, sliders in the run control parameter
control the values of "port parameters," which in turn control the
execution of a model.
-
Statically Checked Units System (see also
Dynamically Checked Units System).
This model illustrates the use of the statically
checked units system. A unit system
defines a set of interrelated dimensions and measures. For example, in
the time dimension, we might have seconds, minutes, hours, days, weeks,
and fortnights. Ptolemy II includes two experimental units systems,
one that is statically checked and one that is dynamically checked.
-
Network Integration.
This example illustrates that models may be defined in a networked,
distributed fashion.
This model contains a component that is defined on the Ptolemy project
website. When you open the model, you will be alerted to the fact
that it requires loading a model definition from a remote source.
If you agree to proceed, then you will have a model with a remotely
defined component. The component itself is at
http://ptolemy.eecs.berkeley.edu/xml/models/Waveform.xml.
You can open that definition by clicking on the hyperlink, or by
using the "Open URL" command in the File menu.
-
Audio (see also SoundSpectrum).
This example shows the Karplus-Strong algorithm, which synthesizes
a musical sound that closely resembles a plucked string instrument.
It illustrates the audio capabilities of Ptolemy II.
Experimental Facilities
Ptolemy II has a number of less well-developed experimental
capabilities that may continue to evolve over time.
These are illustrated in the following examples.
- Higher-Order Components.
Higher-order components are components that operate on components.
This example contains a component that is a composite actor that
replicates itself some specified number of times to operate on
multiple channels of input. This capability was created by
Zoltan Kemenczy and Sean Simmons, Research In Motion, Ltd.