Package org.ptolemy.ssm
Class UnscentedKalmanFilterSSM
- java.lang.Object
-
- All Implemented Interfaces:
java.lang.Cloneable
,InferenceActor
,StateSpaceActor
,Actor
,Executable
,FiringsRecordable
,Initializable
,TypedActor
,Changeable
,Debuggable
,DebugListener
,Derivable
,Instantiable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
public class UnscentedKalmanFilterSSM extends AbstractUnscentedKalmanFilter implements InferenceActor
An Unscented Kalman filter implementation that expects a state-space model and several measurements to be tied with itself via decorators.- Since:
- Ptolemy II 11.0
- Version:
- $Id$
- Author:
- Shuhei Emoto
- Pt.AcceptedRating:
- Pt.ProposedRating:
- Red (shuhei)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.ptolemy.machineLearning.particleFilter.AbstractUnscentedKalmanFilter
AbstractUnscentedKalmanFilter.InputType
-
Nested classes/interfaces inherited from class ptolemy.kernel.CompositeEntity
CompositeEntity.ContainedObjectsIterator
-
-
Field Summary
-
Fields inherited from class org.ptolemy.machineLearning.particleFilter.AbstractUnscentedKalmanFilter
_inputRelations, _Sigma, _sigmaPointLabels, _sigmaPointTypes, _stateLabels, _stateNames, _stateTypes, _upToDate, MEASUREMENT_NOISE, MEASUREMENT_POSTFIX, priorCovariance, priorMeanState, processNoiseCovariance, sigmaPointOutput, STATE_VARIABLE_NAMES, stateEstimate, t, UPDATE_POSTFIX
-
Fields inherited from class ptolemy.actor.CompositeActor
_actorFiringListeners, _causalityInterface, _derivedPiggybacks, _initializables, _notifyingActorFiring, _piggybacks, _publishedPorts, _publisherRelations, _stopRequested, _subscribedPorts
-
Fields inherited from class ptolemy.kernel.CompositeEntity
_levelCrossingLinks
-
Fields inherited from class ptolemy.kernel.util.NamedObj
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _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
Constructors Constructor Description UnscentedKalmanFilterSSM(CompositeEntity container, java.lang.String name)
Instantiate an unscented Kalman filter.UnscentedKalmanFilterSSM(Workspace workspace)
Instantiate an unscented Kalman filter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_checkParameters()
Check the dimensions of all parameters and ports.protected AbstractUnscentedKalmanFilter.InputType
getInputType(java.lang.String inputName)
protected Parameter
getMeasurementParameter(java.lang.String fullName)
Return the first encountered value for now.protected Parameter
getNoiseParameter(java.lang.String fullName)
protected Parameter
getUserDefinedParameter(java.lang.String eqnName)
Return the Parameter that is part of a state space model.boolean
validDecoratorAssociationExists()
Check if the Actor is associated with a unique enabled StateSpaceModel.-
Methods inherited from class org.ptolemy.machineLearning.particleFilter.AbstractUnscentedKalmanFilter
attributeChanged, fire, getMeasurementParameterExpression, getUserDefinedParameterExpression, preinitialize, wrapup
-
Methods inherited from class ptolemy.actor.TypedCompositeActor
_addEntity, _addPort, _addRelation, _checkTypesFromTo, _destinationTypeConstraints, attributeTypeChanged, isBackwardTypeInferenceEnabled, newPort, newRelation, resolveTypes, typeConstraintList, typeConstraints
-
Methods inherited from class ptolemy.actor.CompositeActor
_actorFiring, _actorFiring, _finishedAddEntity, _setDirector, _transferPortParameterInputs, addActorFiringListener, addInitializable, addPiggyback, clone, connectionsChanged, createReceivers, createSchedule, getCausalityInterface, getDirector, getExecutiveDirector, getManager, getPublishedPort, getPublishedPortChannel, getPublishedPorts, getSubscribedPortChannel, inferringWidths, inferWidths, initialize, inputPortList, isFireFunctional, isOpaque, isPublishedPort, isStrict, iterate, linkToPublishedPort, linkToPublishedPort, linkToPublishedPort, linkToPublishedPort, needsWidthInference, newInsideReceiver, newReceiver, notifyConnectivityChange, outputPortList, postfire, prefire, recordFiring, registerPublisherPort, registerPublisherPort, removeActorFiringListener, removeInitializable, removePiggyback, requestChange, setContainer, setDirector, setManager, stop, stopFire, terminate, unlinkToPublishedPort, unlinkToPublishedPort, unlinkToPublishedPort, unlinkToPublishedPort, unregisterPublisherPort, unregisterPublisherPort
-
Methods inherited from class ptolemy.kernel.CompositeEntity
_adjustDeferrals, _containedDecorators, _deepOpaqueEntityList, _description, _exportMoMLContents, _removeEntity, _removeRelation, _validateSettables, allAtomicEntityList, allowLevelCrossingConnect, classDefinitionList, connect, connect, containedObjectsIterator, deepCompositeEntityList, deepEntityList, deepGetEntities, deepNamedObjList, deepOpaqueEntityList, deepRelationSet, entityList, entityList, exportLinks, exportMoML, getAttribute, getEntities, getEntity, getPort, getRelation, getRelations, isAtomic, lazyAllAtomicEntityList, lazyAllCompositeEntityList, lazyAllCompositeTransparentAndOpaqueEntityList, lazyClassDefinitionList, lazyDeepEntityList, lazyEntityList, lazyRelationList, numberOfEntities, numberOfRelations, numEntities, numRelations, relationList, removeAllEntities, removeAllRelations, setClassDefinition, statistics, uniqueName
-
Methods inherited from class ptolemy.kernel.ComponentEntity
_checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName
-
Methods inherited from class ptolemy.kernel.Entity
_removePort, connectedPortList, connectedPorts, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts
-
Methods inherited from class ptolemy.kernel.InstantiableNamedObj
_setParent, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, clone, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace
-
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.kernel.util.Derivable
getDerivedLevel, getDerivedList, propagateValue
-
Methods inherited from interface ptolemy.actor.Executable
fire, isFireFunctional, isStrict, iterate, postfire, prefire, stop, stopFire, terminate
-
Methods inherited from interface ptolemy.actor.Initializable
addInitializable, initialize, preinitialize, removeInitializable, wrapup
-
Methods inherited from interface ptolemy.kernel.util.Nameable
description, getContainer, getDisplayName, getFullName, getName, getName, setName
-
-
-
-
Constructor Detail
-
UnscentedKalmanFilterSSM
public UnscentedKalmanFilterSSM(CompositeEntity container, java.lang.String name) throws NameDuplicationException, IllegalActionException
Instantiate an unscented Kalman filter.- Parameters:
container
- The containername
- The name- Throws:
IllegalActionException
- If the actor cannot be contained by the proposed container.NameDuplicationException
- If the container already has an actor with this name.
-
UnscentedKalmanFilterSSM
public UnscentedKalmanFilterSSM(Workspace workspace) throws NameDuplicationException, IllegalActionException
Instantiate an unscented Kalman filter.- Parameters:
workspace
- The workspace in which to instantiate actor.- Throws:
IllegalActionException
- If the actor cannot be contained by the proposed container.NameDuplicationException
- If the container already has an actor with this name.
-
-
Method Detail
-
_checkParameters
protected void _checkParameters() throws IllegalActionException
Check the dimensions of all parameters and ports.- Specified by:
_checkParameters
in classAbstractUnscentedKalmanFilter
- Throws:
IllegalActionException
- If the dimensions are illegal.
-
validDecoratorAssociationExists
public boolean validDecoratorAssociationExists() throws IllegalActionException
Check if the Actor is associated with a unique enabled StateSpaceModel. Ideally, here, we would also be checking whether the enabled decorator provides the parameters expected by the actor.- Specified by:
validDecoratorAssociationExists
in interfaceStateSpaceActor
- Returns:
- true if a valid decorator association exists.
- Throws:
IllegalActionException
-
getUserDefinedParameter
protected Parameter getUserDefinedParameter(java.lang.String eqnName) throws IllegalActionException
Description copied from class:AbstractUnscentedKalmanFilter
Return the Parameter that is part of a state space model.- Specified by:
getUserDefinedParameter
in classAbstractUnscentedKalmanFilter
- Parameters:
eqnName
- Name of parameter- Returns:
- Parameter object
- Throws:
IllegalActionException
-
getMeasurementParameter
protected Parameter getMeasurementParameter(java.lang.String fullName) throws IllegalActionException
Return the first encountered value for now.- Specified by:
getMeasurementParameter
in classAbstractUnscentedKalmanFilter
- Parameters:
fullName
- The name of the measurement parameter.- Returns:
- The parameter
- Throws:
IllegalActionException
- If the attribute cannot be found.
-
getInputType
protected AbstractUnscentedKalmanFilter.InputType getInputType(java.lang.String inputName)
- Specified by:
getInputType
in classAbstractUnscentedKalmanFilter
-
getNoiseParameter
protected Parameter getNoiseParameter(java.lang.String fullName) throws IllegalActionException
- Specified by:
getNoiseParameter
in classAbstractUnscentedKalmanFilter
- Throws:
IllegalActionException
-
-