Package ptolemy.math
Class SignalProcessing.RaisedCosineSampleGenerator
- java.lang.Object
-
- ptolemy.math.SignalProcessing.RaisedCosineSampleGenerator
-
- All Implemented Interfaces:
DoubleUnaryOperation
- Enclosing class:
- SignalProcessing
public static class SignalProcessing.RaisedCosineSampleGenerator extends java.lang.Object implements DoubleUnaryOperation
This class generates samples of a raised cosine pulse, or if the excess is zero, a modified sinc function.The function that is computed is:
sin(PI t/T) cos(excess PI t/T) h(t) = ----------- * ----------------- PI t/T 1-(2 excess t/T)2
This is called a "raised cosine pulse" because in the frequency domain its shape is that of a raised cosine.
For some applications, you may wish to apply a window function to this impulse response, since it is rather abruptly terminated at the two \ ends.
This implementation is ported from the Ptolemy 0.x implementation by Joe Buck, Brian Evans, and Edward A. Lee. Reference: E. A. Lee and D. G. Messerschmitt, Digital Communication, Second Edition, Kluwer Academic Publishers, Boston, 1994.
-
-
Constructor Summary
Constructors Constructor Description RaisedCosineSampleGenerator(double firstZeroCrossing, double excess)
Construct a RaisedCosineSampleGenerator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
operate(double time)
Return a sample of the raised cosine pulse, sampled at the specified time.
-
-
-
Constructor Detail
-
RaisedCosineSampleGenerator
public RaisedCosineSampleGenerator(double firstZeroCrossing, double excess)
Construct a RaisedCosineSampleGenerator.- Parameters:
firstZeroCrossing
- The time of the first zero crossing, after time zero. This would be the symbol interval in a communications application of this pulse.excess
- The excess bandwidth (in the range 0.0 to 1.0), also called the rolloff factor.
-
-
Method Detail
-
operate
public final double operate(double time)
Return a sample of the raised cosine pulse, sampled at the specified time.- Specified by:
operate
in interfaceDoubleUnaryOperation
- Parameters:
time
- The operand.- Returns:
- The results of the operation.
-
-