public class RaisedCosine extends FIR
For the ordinary raised cosine response, the impulse response of the filter would ideally be
sin(pi n/T) cos(alpha pi n/T) h(n) = ----------- * ----------------- pi n/T 1-(2 alpha n/T)2where alpha is excessBW and T is the interpolation factor. However, this pulse is centered at zero, and we can only implement causal filters in the SDF domain in Ptolemy. Hence, the impulse response is actually
g(n) = h(n - M)where M = length/2 if length is even, and M = (length+1)/2 if length is odd. The impulse response is simply truncated outside this range, so the impulse response will generally not be symmetric if length is even because it will have one more sample to the left than to the right of center. Unless this extra sample is zero, the filter will not have linear phase if length is even.
For the ordinary raised cosine response, the distance (in number of samples) from the center to the first zero crossing is given by symbolInterval. For the square-root raised cosine response, a cascade of two identical square-root raised cosine filters would be equivalent to a single ordinary raised cosine filter.
The impulse response of the square-root raised cosine pulse is given by
4 alpha(cos((1+alpha)pi n/T)+Tsin((1-alpha)pi n/T)/(4n alpha/T)) h(n) = ----------------------------------------------------------------- pi sqrt(T)(1-(4 alpha n/T)2)This impulse response convolved with itself will, in principle, be equal to a raised cosine pulse. However, because of the abrupt rectangular windowing of the pulse, with low excess bandwidth, this ideal is not closely approximated except for very long filters.
The output sample rate is interpolation times the input. This is set by default to 16 because in digital communication systems this pulse is used for the line coding of symbols, and upsampling is necessary. Typically, the value of interpolation is the same as that of symbolInterval, at least when the filter is being used as a transmit pulse shaper.
[1] E. A. Lee and D. G. Messerschmitt, Digital Communication, Kluwer Academic Publishers, Boston, 1988.
[2] I. Korn, Digital Communications, Van Nostrand Reinhold, New York, 1985.
Entity.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
Parameter |
excessBW
The excess bandwidth.
|
Parameter |
length
The length of the pulse.
|
Parameter |
root
If true, use the square root of the raised cosine instead of the
raised cosine.
|
Parameter |
symbolInterval
The symbol interval, which is the number of samples to the first
zero crossing on each side of the main lobe.
|
_data, _decimationPhaseValue, _decimationValue, _interpolationValue, _mostRecent, _phaseLength, _reinitializeNeeded, _taps, _zero, decimation, decimationPhase, interpolation, taps
input, input_tokenConsumptionRate, output, output_tokenInitProduction, output_tokenProductionRate
_typesValid
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
COMPLETED, NOT_READY, STOP_ITERATING
Constructor and Description |
---|
RaisedCosine(CompositeEntity container,
java.lang.String name)
Construct an actor with the given container and name.
|
Modifier and Type | Method and Description |
---|---|
void |
attributeChanged(Attribute attribute)
Reevaluate the filter taps if the attribute is any of the ones
defined locally, and otherwise call the superclass.
|
_customTypeConstraints, _initializeTaps, _reinitialize, clone, fire, initialize, 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, postfire, 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, workspace
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
isFireFunctional, isStrict, iterate, postfire, stop, stopFire, terminate
addInitializable, preinitialize, removeInitializable, wrapup
description, getContainer, getDisplayName, getFullName, getName, getName, setName
getDerivedLevel, getDerivedList, propagateValue
public Parameter excessBW
public Parameter length
public Parameter root
public Parameter symbolInterval
public RaisedCosine(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 attributeChanged(Attribute attribute) throws IllegalActionException
attributeChanged
in class FIR
attribute
- The attribute that changed.IllegalActionException
- If the parameters are out of range.