|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ptolemy.kernel.util.NamedObj ptolemy.kernel.InstantiableNamedObj ptolemy.kernel.Entity ptolemy.kernel.ComponentEntity ptolemy.actor.AtomicActor ptolemy.actor.TypedAtomicActor ptolemy.actor.lib.Transformer ptolemy.backtrack.automatic.ptolemy.actor.lib.RecursiveLattice
public class RecursiveLattice
A recursive (all-pole) filter with a lattice structure. The coefficients of such a filter are called "reflection coefficients." Recursive lattice filters are typically used as synthesis filters for random processes because it is easy to ensure that they are stable. A recursive lattice filter is stable if its reflection coefficients are all less than unity in magnitude. To get the reflection coefficients for a linear predictor for a particular random process, you can use the LevinsonDurbin actor. The inputs and outputs are of type double.
The default reflection coefficients correspond to the following transfer function:
1 H(z) = -------------------------------------- 1 - 2z-1 + 1.91z-2 - 0.91z-3 + 0.205z-4
The structure of the filter is as follows:
y[0] y[1] y[n-1] y[n] X(n) ---(+)->--o-->----(+)->--o--->-- ... ->--(+)->--o--->---o---> Y(n) \ / \ / \ / | +Kn / +Kn-1 / +K1 / | X X X | -Kn \ -Kn-1 \ -K1 \ V / \ / \ / \ | (+)-<--o--[z]--(+)-<--o--[z]- ... -<--(+)-<--o--[z]--/ w[1] w[2] w[n]where the [z] are unit delays and the (+) are adders and "y" and "w" are variables representing the state of the filter.
The reflection (or partial-correlation (PARCOR)) coefficients should be specified right to left, K1 to Kn as above. Using exactly the same coefficients in the Lattice actor will result in precisely the inverse transfer function.
Note that the definition of reflection coefficients is not quite universal in the literature. The reflection coefficients in reference [2] are the negative of the ones used by this actor, which correspond to the definition in most other texts, and to the definition of partial-correlation (PARCOR) coefficients in the statistics literature. The signs of the coefficients used in this actor are appropriate for values given by the LevinsonDurbin actor.
References
[1] J. Makhoul, "Linear Prediction: A Tutorial Review", Proc. IEEE, Vol. 63, pp. 561-580, Apr. 1975.
[2] S. M. Kay, Modern Spectral Estimation: Theory & Application, Prentice-Hall, Englewood Cliffs, NJ, 1988.
IIR
,
LevinsonDurbin
,
Lattice
,
VariableRecursiveLattice
,
Serialized Form
Yellow (cxh) |
Yellow (cxh) |
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ptolemy.kernel.Entity |
---|
Entity.ContainedObjectsIterator |
Field Summary | |
---|---|
private double[] |
_backward
|
private double[] |
_backwardCache
|
private double[] |
_forward
|
private double[] |
_forwardCache
|
private double[] |
_reflectionCoefficients
|
protected Checkpoint |
$CHECKPOINT
|
private FieldRecord |
$RECORD$_backward
|
private FieldRecord |
$RECORD$_backwardCache
|
private FieldRecord |
$RECORD$_forward
|
private FieldRecord |
$RECORD$_forwardCache
|
private FieldRecord |
$RECORD$_reflectionCoefficients
|
protected CheckpointRecord |
$RECORD$$CHECKPOINT
|
private FieldRecord[] |
$RECORDS
|
Parameter |
reflectionCoefficients
The reflection coefficients. |
Fields inherited from class ptolemy.actor.lib.Transformer |
---|
input, output |
Fields inherited from class ptolemy.actor.AtomicActor |
---|
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested |
Fields inherited from class ptolemy.kernel.util.NamedObj |
---|
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
Fields inherited from interface ptolemy.actor.Executable |
---|
COMPLETED, NOT_READY, STOP_ITERATING |
Constructor Summary | |
---|---|
RecursiveLattice(CompositeEntity container,
java.lang.String name)
Construct an actor with the given container and name. |
Method Summary | |
---|---|
private double[] |
$ASSIGN$_backward(double[] newValue)
|
private double |
$ASSIGN$_backward(int index0,
double newValue)
|
private double[] |
$ASSIGN$_backwardCache(double[] newValue)
|
private double |
$ASSIGN$_backwardCache(int index0,
double newValue)
|
private double[] |
$ASSIGN$_forward(double[] newValue)
|
private double |
$ASSIGN$_forward(int index0,
double newValue)
|
private double[] |
$ASSIGN$_forwardCache(double[] newValue)
|
private double |
$ASSIGN$_forwardCache(int index0,
double newValue)
|
private double[] |
$ASSIGN$_reflectionCoefficients(double[] newValue)
|
private double |
$ASSIGN$_reflectionCoefficients(int index0,
double newValue)
|
private double[] |
$BACKUP$_backward()
|
private double[] |
$BACKUP$_backwardCache()
|
private double[] |
$BACKUP$_forward()
|
private double[] |
$BACKUP$_forwardCache()
|
private double[] |
$BACKUP$_reflectionCoefficients()
|
void |
$COMMIT(long timestamp)
Commit changes up to the given timestamp, but not including changes made at timestamp and afterward. |
Checkpoint |
$GET$CHECKPOINT()
Get the checkpoint object that monitors this rollbackable object. |
void |
$RESTORE(long timestamp,
boolean trim)
Restore a previous state to all the private fields of this rollbackable object. |
java.lang.Object |
$SET$CHECKPOINT(Checkpoint checkpoint)
Set the checkpoint object of this rollbackable object. |
void |
attributeChanged(Attribute attribute)
If the argument is the reflectionCoefficients parameter, then reallocate the arrays to use. |
java.lang.Object |
clone(Workspace workspace)
Clone the actor into the specified workspace. |
void |
fire()
Consume one input token, if there is one, and produce one output token. |
void |
initialize()
Initialize the state of the filter. |
boolean |
postfire()
Update the backward and forward prediction errors that were generated in fire() method. |
boolean |
prefire()
Check to see if this actor is ready to fire. |
Methods inherited from class ptolemy.actor.TypedAtomicActor |
---|
_addPort, _fireAt, _fireAt, attributeTypeChanged, clone, newPort, typeConstraintList, typeConstraints |
Methods inherited from class ptolemy.kernel.ComponentEntity |
---|
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName |
Methods inherited from class ptolemy.kernel.Entity |
---|
_description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName |
Methods inherited from class ptolemy.kernel.InstantiableNamedObj |
---|
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ptolemy.actor.Actor |
---|
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList |
Methods inherited from interface ptolemy.actor.Executable |
---|
isFireFunctional, isStrict, iterate, stop, stopFire, terminate |
Methods inherited from interface ptolemy.actor.Initializable |
---|
addInitializable, preinitialize, removeInitializable, wrapup |
Methods inherited from interface ptolemy.kernel.util.Nameable |
---|
description, getContainer, getDisplayName, getFullName, getName, getName, setName |
Methods inherited from interface ptolemy.kernel.util.Derivable |
---|
getDerivedLevel, getDerivedList, propagateValue |
Field Detail |
---|
protected transient Checkpoint $CHECKPOINT
public Parameter reflectionCoefficients
private double[] _backward
private double[] _backwardCache
private double[] _forward
private double[] _forwardCache
private double[] _reflectionCoefficients
protected transient CheckpointRecord $RECORD$$CHECKPOINT
private transient FieldRecord $RECORD$_backward
private transient FieldRecord $RECORD$_backwardCache
private transient FieldRecord $RECORD$_forward
private transient FieldRecord $RECORD$_forwardCache
private transient FieldRecord $RECORD$_reflectionCoefficients
private transient FieldRecord[] $RECORDS
Constructor Detail |
---|
public RecursiveLattice(CompositeEntity container, java.lang.String name) throws NameDuplicationException, IllegalActionException
container
- The container.name
- The name of this actor.
IllegalActionException
- If the actor cannot be contained
by the proposed container.
NameDuplicationException
- If the container already has an
actor with this name.Method Detail |
---|
public void attributeChanged(Attribute attribute) throws IllegalActionException
attributeChanged
in class NamedObj
attribute
- The attribute that changed.
IllegalActionException
- If the base class throws it.public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
clone
in class AtomicActor
workspace
- The workspace for the new object.
java.lang.CloneNotSupportedException
- If a derived class contains
an attribute that cannot be cloned.NamedObj.exportMoML(Writer, int, String)
,
NamedObj.setDeferringChangeRequests(boolean)
public void fire() throws IllegalActionException
fire
in interface Executable
fire
in class AtomicActor
IllegalActionException
- If there is no director.public void initialize() throws IllegalActionException
initialize
in interface Initializable
initialize
in class AtomicActor
IllegalActionException
- If a derived class throws it.public boolean postfire() throws IllegalActionException
postfire
in interface Executable
postfire
in class AtomicActor
IllegalActionException
- If there is no director.public boolean prefire() throws IllegalActionException
prefire
in interface Executable
prefire
in class AtomicActor
IllegalActionException
- If there is no director.private final double[] $ASSIGN$_backward(double[] newValue)
private final double $ASSIGN$_backward(int index0, double newValue)
private final double[] $BACKUP$_backward()
private final double[] $ASSIGN$_backwardCache(double[] newValue)
private final double $ASSIGN$_backwardCache(int index0, double newValue)
private final double[] $BACKUP$_backwardCache()
private final double[] $ASSIGN$_forward(double[] newValue)
private final double $ASSIGN$_forward(int index0, double newValue)
private final double[] $BACKUP$_forward()
private final double[] $ASSIGN$_forwardCache(double[] newValue)
private final double $ASSIGN$_forwardCache(int index0, double newValue)
private final double[] $BACKUP$_forwardCache()
private final double[] $ASSIGN$_reflectionCoefficients(double[] newValue)
private final double $ASSIGN$_reflectionCoefficients(int index0, double newValue)
private final double[] $BACKUP$_reflectionCoefficients()
public void $COMMIT(long timestamp)
Rollbackable
$COMMIT
in interface Rollbackable
timestamp
- The timestamp.public void $RESTORE(long timestamp, boolean trim)
Rollbackable
$RESTORE
in interface Rollbackable
timestamp
- The timestamp taken at the time when the previous
state was recorded.trim
- Whether to delete the records used for the rollback.Checkpoint.rollback(long, boolean)
public final Checkpoint $GET$CHECKPOINT()
Rollbackable
$GET$CHECKPOINT
in interface Rollbackable
public final java.lang.Object $SET$CHECKPOINT(Checkpoint checkpoint)
Rollbackable
$SET$CHECKPOINT
in interface Rollbackable
checkpoint
- The new checkpoint object.
Checkpoint.setCheckpoint(Checkpoint)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |