Hi Ben,
In Volume 3 of the Ptolemy design doc, 
Chapter 2, "CT domain", 
section 2.6, "Interacting with Other Domains" says:

--start--
The CT domain can interact with other domains in Ptolemy II. In
particular, we consider interaction among the CT domain, the discrete
event (DE) domain and the finite state machine (FSM) domain. Following
circuit design communities, we call a composition of CT and DE a
mixed-signal model; following control and computation communities, we
call a composition of CT and FSM a hybrid system model.  There are two
ways to put CT and DE models together, depending on the containment
relation. In either case, event generators and waveform generators are
used to convert the two types of signals.  Figure 2.5 shows a DE
component wrapped by an event generator and a waveform generator. From
the input/output point of view, it is a continuous time
component. Figure 2.6 shows a CT subsystem wrapped by a waveform
generator and an event generator. From the input/output point of view,
it is a discrete event component. Notice that event generators and
waveform generators always stay in the CT domain.  A hierarchical
composition of FSM and CT is shown in figure 2.7. A CT component, by
adopting the event generation technique, can have both continuous and
discrete signals as its output. The FSM can use predicates on these
signals, as well as its own input signals, to build trigger
conditions. The actions associated with transitions are usually
setting parameters in the destination state, including the initial
conditions of integrators.
--end--


$PTII/doc/domainCompatibility.htm, is a draft of what domains
work when embedded in what domains.  When I filled out the chart,
I did not find an example of SDF on the outside and CT on the 
inside.

On April 19, 2005 in comp.soft-sys.ptolemy, Haiyang Zheng discusses
using SDF inside CT and suggests placing DE between the two.  To see
the thread, try searching google groups for "ptolemy sdf ct".


> What you found is not a bug. In fact, it shows the concept of strict
> type systems in Ptolemy II.
> 
> The real problem is that the input port of the SDF composite actor has
> a receiver of type CTReceiver. The CTReceiver has only one capacity
> and can not produce more than one token at each firing. (This makes
> sense for continuous-time signals. But it is arguable whether this is
> the right choice for discrete-event signals.) Therefore, when you
> configure the "arrayLength" to a value bigger than 1, the SDFDirector
> will always return false from its prefire() method because there is
> not enough token contained inside the CTReceiver.
> 
> A work around is to insert a DE layer between the CT and SDF
> models. The DEReceiver is a FIFO queue. It accumulates tokens till
> they are consumed.
> 
> Another issue of using SDF models inside a CT model is that the CT
> model may need multiple firings with different step sizes to resolve
> the values of signals in one iteration. Multiple firings for a SDF
> model usually cause its states to change multiple times. This violates
> the semantics of CT model where firings must not change state. One
> solution is to always insert a DE layer between the CT and SDF
> models. Using a PeriodicSampler like in your model is the simplest way
> to add such a DE layer. But its limitation is that there is at most
> one token available for each firing of the SDF model.


Anyone have any suggestions?

_Christopher



--------

    
    In looking at the "SigmaDelta" demo, I was a bit surprised to see the top
    level director as DE not SDF.  So, I attempted to convert the model to use
    SDF at the top, and this appears to be non-trivial.  Is this possible, or
    should CT always be embedded in discrete time by representing discrete time
    in the DE domain?  (Or possibly the DT domain?)
    
--------

----------------------------------------------------------------------------
Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]

Reply via email to