public class BandlimitedNoise extends Gaussian
S(f) = T s^2 sinc^4(pi f T)where f is frequency, s is the standard deviation, and the sinc function is given by
sinc(a) = sin(a)/aHere, T = 1/b, where b is the value of the bandwidth parameter. Notice that the power declines as the fourth power of one over the frequency. The bandwidth parameter specifies the frequency (in Hertz) at which the first zero occurs, or, equivalently, roughly the width of the main lobe.
This actor may affect the step size taken by the solver. Specifically, it ensures that the solver provides executions at least as frequently as twice the specified bandwidth. This is nominally the Nyquist frequency of an ideally bandlimited noise frequency, but since this noise process is not ideally bandlimited, the solver samples will typically have aliasing distortion. If you need to control that aliasing distortion, then you can set the maxStepSize parameter to something smaller than 1/2b, where b is the bandwidth.
For some uses, the effect that this actor has on the step size may
be undesirable because it increases the cost of simulation.
If a less rigorous form of noise is desired (for rough models or
simple demonstrations), you can use the Noise actor.
| Red (eal) |
| Yellow (eal) |
Entity.ContainedObjectsIterator| Modifier and Type | Field and Description |
|---|---|
Parameter |
bandwidth
The bandwidth of the noise random process in Hertz.
|
_current, mean, standardDeviation_generatorSeed, _needNew, _needNewGenerator, _random, privateSeed, resetOnEachRun, seed_triggered, output, trigger_typesValid_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKSCOMPLETED, NOT_READY, STOP_ITERATING| Constructor and Description |
|---|
BandlimitedNoise(CompositeEntity container,
java.lang.String name)
Construct an actor with the given container and name.
|
| Modifier and Type | Method and Description |
|---|---|
protected double |
_generateGaussian()
Generate a new random number.
|
protected void |
_generateRandomNumber()
Generate a new random number.
|
void |
fire()
Produce a number that is linearly interpolated within the
current integration step, if linearlyInterpolate is true, or
the random number for the beginning of the integration
step otherwise.
|
void |
initialize()
Initialize the random number generator with the seed, if it
has been given.
|
boolean |
postfire()
If we are at the end of the current interval, then generate
a new random number for the new interval, and request a
refiring at the end of that interval.
|
_createGenerator, attributeChanged, clone_customTypeConstraints, prefire_containedTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, preinitialize, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, setContainer, stop, stopFire, terminate, wrapup_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName_addPort, _description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, 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, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspaceequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortListisFireFunctional, isStrict, iterate, stop, stopFire, terminateaddInitializable, preinitialize, removeInitializable, wrapupdescription, getContainer, getDisplayName, getFullName, getName, getName, setNamegetDerivedLevel, getDerivedList, propagateValuepublic Parameter bandwidth
public BandlimitedNoise(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.public void fire()
throws IllegalActionException
fire in interface Executablefire in class GaussianIllegalActionException - If the superclass throws it.public void initialize()
throws IllegalActionException
initialize in interface Initializableinitialize in class RandomSourceIllegalActionException - If the parent class throws it.public boolean postfire()
throws IllegalActionException
postfire in interface Executablepostfire in class RandomSourceIllegalActionException - If the base class throws it.protected double _generateGaussian()
throws IllegalActionException
IllegalActionException - If parameter values are incorrect.protected void _generateRandomNumber()
throws IllegalActionException
_generateRandomNumber in class GaussianIllegalActionException - If parameter values are incorrect.