ptolemy.math
Class SignalProcessing.RaisedCosineSampleGenerator

java.lang.Object
  extended by 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.


Field Summary
private  double _excess
           
private  double _oneOverFZC
           
 
Constructor Summary
SignalProcessing.RaisedCosineSampleGenerator(double firstZeroCrossing, double excess)
          Construct a RaisedCosineSampleGenerator.
 
Method Summary
 double operate(double time)
          Return a sample of the raised cosine pulse, sampled at the specified time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_oneOverFZC

private final double _oneOverFZC

_excess

private final double _excess
Constructor Detail

SignalProcessing.RaisedCosineSampleGenerator

public SignalProcessing.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 interface DoubleUnaryOperation
Parameters:
time - The operand.
Returns:
The results of the operation.