#include <itpp/comm/pulse_shape.h>
Inheritance diagram for itpp::Root_Raised_Cosine< T1 >:
Public Member Functions | |
Root_Raised_Cosine () | |
Constructor. | |
Root_Raised_Cosine (double roll_off_factor, int filter_length=6, int upsampling_factor=8) | |
Constructor. | |
virtual | ~Root_Raised_Cosine () |
Destructor. | |
void | set_pulse_shape (double roll_off_factor, int filter_length=6, int upsampling_factor=8) |
Set pulse_shape, roll_off_factor between 0 and 1, filter_length even. | |
double | get_roll_off (void) const |
Get the Roll-off factor. | |
void | set_pulse_shape (const Vec< double > &impulse_response, int upsampling_factor) |
Set the general impulse response of the FIR filter. | |
Vec< double > | get_pulse_shape (void) const |
Get the pulse shape. | |
int | get_upsampling_factor () const |
Get the over sampling factor. | |
int | get_pulse_length () const |
Get the length of the pulse in number of symbols. | |
int | get_filter_length () const |
Get the length of the internal FIR filter. | |
void | shape_symbols (const Vec< T1 > &input, Vec< T1 > &output) |
Shape the input symbols performing upsampling. | |
Vec< T1 > | shape_symbols (const Vec< T1 > &input) |
Shape the input symbols performing upsampling. | |
void | shape_samples (const Vec< T1 > &input, Vec< T1 > &output) |
Shape the input samples already upsampled. | |
Vec< T1 > | shape_samples (const Vec< T1 > &input) |
Shape the input symbols already upsampled. | |
void | clear (void) |
Clear internal states. | |
Protected Attributes | |
double | roll_off_factor |
The roll off factor (i.e. alpha). | |
Vec< double > | impulse_response |
The impulse resounse of the pulse shaping filter. | |
MA_Filter< T1, double, T1 > | shaping_filter |
The pulse shaping filter. | |
int | pulse_length |
Length in symbols. | |
int | upsampling_factor |
Samples per input symbol. | |
bool | setup_done |
Ensures that setup is called before any other member function. |
Upsamples and shapes symbols as square root raised cosine pulses with a given roll-off factor (zero is not allowed
It is called square root raised cosine since it is defined as the square root of the raised cosine pulse in the frequency domain. Thus with a transmitter pulse shape of root raised cosine and a receiver filter that is root raised cosine, the overall response will be a raised cosine.
For more details see e.g. Lee & Messerschmitt, p. 228. Observe that the shaping is done with a FIR filter where the size is given by filter_length * over_sample_factor + 1. The first samples in the output will therefore be zero or small before the memory of the filter is filled.
What is important, when using RRC shaping in a transmission system with the AWGN channel, the mean power of the output samples is not normalised, so the channel noise variance (or shaped signal) should be scaled appropriately.
The class is templated as follows: T1
is the type of the input and the output samples. An example of usage is:
#include "itpp/itcomm.h" Root_Raised_Cosine<double> rrc(0.5,6,8); BPSK bpsk; vec symbols, samples; symbols = bpsk.modulate_bits(randb(20)); samples = rrc.shape_symbols(symbols);
Definition at line 225 of file pulse_shape.h.
|
Constructor.
Definition at line 228 of file pulse_shape.h. |
|
Constructor.
Definition at line 400 of file pulse_shape.h. References itpp::Root_Raised_Cosine< T1 >::set_pulse_shape(). |
|
Destructor.
Definition at line 232 of file pulse_shape.h. |
|
Set pulse_shape, roll_off_factor between 0 and 1, filter_length even.
Definition at line 405 of file pulse_shape.h. References itpp::cos(), itpp::Pulse_Shape< T1, double, T1 >::impulse_response, itpp::is_even(), it_assert, it_error_if, itpp::pi, itpp::Pulse_Shape< T1, double, T1 >::pulse_length, itpp::Root_Raised_Cosine< T1 >::roll_off_factor, itpp::Vec< Num_T >::set_size(), itpp::sin(), itpp::Vec< Num_T >::size(), itpp::sqr(), itpp::sqrt(), and itpp::Pulse_Shape< T1, double, T1 >::upsampling_factor. Referenced by itpp::Root_Raised_Cosine< T1 >::Root_Raised_Cosine(). |
|
Get the Roll-off factor.
Definition at line 448 of file pulse_shape.h. References it_assert, and itpp::Root_Raised_Cosine< T1 >::roll_off_factor. |
|
Set the general impulse response of the FIR filter. Observe that the pulse shape must have a duration of an integer number of symbols. Thus the length of the impulse response-1 modulo over sampling is an integer. |
|
Get the pulse shape.
|
|
Get the over sampling factor.
|
|
Get the length of the pulse in number of symbols.
|
|
Get the length of the internal FIR filter.
|
|
Shape the input symbols performing upsampling.
|
|
Shape the input symbols performing upsampling.
|
|
Shape the input samples already upsampled.
|
|
Shape the input symbols already upsampled.
|
|
Clear internal states.
|
|
The roll off factor (i.e. alpha).
Definition at line 240 of file pulse_shape.h. Referenced by itpp::Root_Raised_Cosine< T1 >::get_roll_off(), and itpp::Root_Raised_Cosine< T1 >::set_pulse_shape(). |
|
The impulse resounse of the pulse shaping filter.
Definition at line 114 of file pulse_shape.h. Referenced by itpp::Root_Raised_Cosine< T1 >::set_pulse_shape(), and itpp::Raised_Cosine< T1 >::set_pulse_shape(). |
|
The pulse shaping filter.
Definition at line 116 of file pulse_shape.h. |
|
Length in symbols.
Definition at line 118 of file pulse_shape.h. Referenced by itpp::Root_Raised_Cosine< T1 >::set_pulse_shape(), and itpp::Raised_Cosine< T1 >::set_pulse_shape(). |
|
Samples per input symbol.
Definition at line 120 of file pulse_shape.h. Referenced by itpp::Root_Raised_Cosine< T1 >::set_pulse_shape(), and itpp::Raised_Cosine< T1 >::set_pulse_shape(). |
|
Ensures that setup is called before any other member function.
Definition at line 122 of file pulse_shape.h. |
Generated on Thu Apr 19 14:20:03 2007 for IT++ by Doxygen 1.4.6