IT++ Logo Newcom Logo

itpp::Pulse_Shape< T1, T2, T3 > Class Template Reference

General FIR Pulse Shape. More...

#include <itpp/comm/pulse_shape.h>

List of all members.

Public Member Functions

 Pulse_Shape ()
 Constructor.
 Pulse_Shape (const Vec< T2 > &impulse_response, int upsampling_factor)
 Constructor.
virtual ~Pulse_Shape ()
 Destructor.
void set_pulse_shape (const Vec< T2 > &impulse_response, int upsampling_factor)
 Set the general impulse response of the FIR filter.
Vec< T2 > 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< T3 > &output)
 Shape the input symbols performing upsampling.
Vec< T3 > shape_symbols (const Vec< T1 > &input)
 Shape the input symbols performing upsampling.
void shape_samples (const Vec< T1 > &input, Vec< T3 > &output)
 Shape the input samples already upsampled.
Vec< T3 > shape_samples (const Vec< T1 > &input)
 Shape the input symbols already upsampled.
void clear (void)
 Clear internal states.

Protected Attributes

Vec< T2 > impulse_response
 The impulse resounse of the pulse shaping filter.
MA_Filter< T1, T2, T3 > 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.


Detailed Description

template<class T1, class T2, class T3>
class itpp::Pulse_Shape< T1, T2, T3 >

General FIR Pulse Shape.

Upsamples and shapes symbols according to a given FIR filter. Observe that since the shaping is done with a FIR filter, the first samples in the output are zero or small before the memory of the filter is filled.

The class is templated as follows:

An example of usage is:

    #include "itpp/itcomm.h"

    vec filter_response;
    filter_response ="0.7 0.3 0.6";
    Pulse_Shape<double,double,double> shaper(filter_response, 4);
    BPSK bpsk;
    vec symbols, samples;
    
    symbols = bpsk.modulate_bits(randb(20));
    samples = shaper.shape_symbols(symbols);

Definition at line 74 of file pulse_shape.h.


Constructor & Destructor Documentation

template<class T1, class T2, class T3>
itpp::Pulse_Shape< T1, T2, T3 >::Pulse_Shape (  )  [inline]

Constructor.

Definition at line 250 of file pulse_shape.h.

References itpp::Pulse_Shape< T1, T2, T3 >::pulse_length, itpp::Pulse_Shape< T1, T2, T3 >::setup_done, and itpp::Pulse_Shape< T1, T2, T3 >::upsampling_factor.

template<class T1, class T2, class T3>
itpp::Pulse_Shape< T1, T2, T3 >::Pulse_Shape ( const Vec< T2 > &  impulse_response,
int  upsampling_factor 
) [inline]

Constructor.

Definition at line 258 of file pulse_shape.h.

References itpp::Pulse_Shape< T1, T2, T3 >::impulse_response, and itpp::Pulse_Shape< T1, T2, T3 >::set_pulse_shape().

template<class T1, class T2, class T3>
virtual itpp::Pulse_Shape< T1, T2, T3 >::~Pulse_Shape (  )  [inline, virtual]

Destructor.

Definition at line 81 of file pulse_shape.h.


Member Function Documentation

template<class T1, class T2, class T3>
void itpp::Pulse_Shape< T1, T2, T3 >::set_pulse_shape ( const Vec< T2 > &  impulse_response,
int  upsampling_factor 
) [inline]

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.

Definition at line 263 of file pulse_shape.h.

References itpp::Pulse_Shape< T1, T2, T3 >::impulse_response, it_error_if, itpp::Pulse_Shape< T1, T2, T3 >::pulse_length, itpp::Pulse_Shape< T1, T2, T3 >::setup_done, itpp::Pulse_Shape< T1, T2, T3 >::shaping_filter, itpp::Vec< Num_T >::size(), and itpp::Pulse_Shape< T1, T2, T3 >::upsampling_factor.

Referenced by itpp::Pulse_Shape< T1, T2, T3 >::Pulse_Shape().

template<class T1, class T2, class T3>
Vec< T2 > itpp::Pulse_Shape< T1, T2, T3 >::get_pulse_shape ( void   )  const [inline]

Get the pulse shape.

Definition at line 277 of file pulse_shape.h.

References itpp::Pulse_Shape< T1, T2, T3 >::impulse_response.

template<class T1, class T2, class T3>
int itpp::Pulse_Shape< T1, T2, T3 >::get_upsampling_factor (  )  const [inline]

Get the over sampling factor.

Definition at line 282 of file pulse_shape.h.

References itpp::Pulse_Shape< T1, T2, T3 >::upsampling_factor.

template<class T1, class T2, class T3>
int itpp::Pulse_Shape< T1, T2, T3 >::get_pulse_length (  )  const [inline]

Get the length of the pulse in number of symbols.

Definition at line 287 of file pulse_shape.h.

References itpp::Pulse_Shape< T1, T2, T3 >::pulse_length.

template<class T1, class T2, class T3>
int itpp::Pulse_Shape< T1, T2, T3 >::get_filter_length (  )  const [inline]

Get the length of the internal FIR filter.

Definition at line 292 of file pulse_shape.h.

References itpp::Pulse_Shape< T1, T2, T3 >::impulse_response, and itpp::Vec< Num_T >::size().

template<class T1, class T2, class T3>
void itpp::Pulse_Shape< T1, T2, T3 >::shape_symbols ( const Vec< T1 > &  input,
Vec< T3 > &  output 
) [inline]

Shape the input symbols performing upsampling.

Definition at line 297 of file pulse_shape.h.

References it_assert, it_error_if, itpp::Pulse_Shape< T1, T2, T3 >::pulse_length, itpp::Pulse_Shape< T1, T2, T3 >::setup_done, itpp::Pulse_Shape< T1, T2, T3 >::shaping_filter, itpp::Vec< Num_T >::size(), itpp::upsample(), and itpp::Pulse_Shape< T1, T2, T3 >::upsampling_factor.

Referenced by itpp::Pulse_Shape< T1, T2, T3 >::shape_symbols().

template<class T1, class T2, class T3>
Vec< T3 > itpp::Pulse_Shape< T1, T2, T3 >::shape_symbols ( const Vec< T1 > &  input  )  [inline]

Shape the input symbols performing upsampling.

Definition at line 309 of file pulse_shape.h.

References it_assert, itpp::Pulse_Shape< T1, T2, T3 >::setup_done, and itpp::Pulse_Shape< T1, T2, T3 >::shape_symbols().

template<class T1, class T2, class T3>
void itpp::Pulse_Shape< T1, T2, T3 >::shape_samples ( const Vec< T1 > &  input,
Vec< T3 > &  output 
) [inline]

Shape the input samples already upsampled.

Definition at line 317 of file pulse_shape.h.

References it_assert, it_error_if, itpp::Pulse_Shape< T1, T2, T3 >::pulse_length, itpp::Pulse_Shape< T1, T2, T3 >::setup_done, itpp::Pulse_Shape< T1, T2, T3 >::shaping_filter, itpp::Vec< Num_T >::size(), and itpp::Pulse_Shape< T1, T2, T3 >::upsampling_factor.

Referenced by itpp::Pulse_Shape< T1, T2, T3 >::shape_samples().

template<class T1, class T2, class T3>
Vec< T3 > itpp::Pulse_Shape< T1, T2, T3 >::shape_samples ( const Vec< T1 > &  input  )  [inline]

Shape the input symbols already upsampled.

Definition at line 329 of file pulse_shape.h.

References it_assert, itpp::Pulse_Shape< T1, T2, T3 >::setup_done, and itpp::Pulse_Shape< T1, T2, T3 >::shape_samples().

template<class T1, class T2, class T3>
void itpp::Pulse_Shape< T1, T2, T3 >::clear ( void   )  [inline]

Clear internal states.

Definition at line 337 of file pulse_shape.h.

References it_assert, itpp::Pulse_Shape< T1, T2, T3 >::setup_done, and itpp::Pulse_Shape< T1, T2, T3 >::shaping_filter.


Member Data Documentation

template<class T1, class T2, class T3>
Vec<T2> itpp::Pulse_Shape< T1, T2, T3 >::impulse_response [protected]

The impulse resounse of the pulse shaping filter.

Definition at line 114 of file pulse_shape.h.

Referenced by itpp::Pulse_Shape< T1, T2, T3 >::get_filter_length(), itpp::Pulse_Shape< T1, T2, T3 >::get_pulse_shape(), itpp::Pulse_Shape< T1, T2, T3 >::Pulse_Shape(), and itpp::Pulse_Shape< T1, T2, T3 >::set_pulse_shape().

template<class T1, class T2, class T3>
MA_Filter<T1,T2,T3> itpp::Pulse_Shape< T1, T2, T3 >::shaping_filter [protected]

The pulse shaping filter.

Definition at line 116 of file pulse_shape.h.

Referenced by itpp::Pulse_Shape< T1, T2, T3 >::clear(), itpp::Pulse_Shape< T1, T2, T3 >::set_pulse_shape(), itpp::Pulse_Shape< T1, T2, T3 >::shape_samples(), and itpp::Pulse_Shape< T1, T2, T3 >::shape_symbols().

template<class T1, class T2, class T3>
int itpp::Pulse_Shape< T1, T2, T3 >::pulse_length [protected]

Length in symbols.

Definition at line 118 of file pulse_shape.h.

Referenced by itpp::Pulse_Shape< T1, T2, T3 >::get_pulse_length(), itpp::Pulse_Shape< T1, T2, T3 >::Pulse_Shape(), itpp::Pulse_Shape< T1, T2, T3 >::set_pulse_shape(), itpp::Pulse_Shape< T1, T2, T3 >::shape_samples(), and itpp::Pulse_Shape< T1, T2, T3 >::shape_symbols().

template<class T1, class T2, class T3>
int itpp::Pulse_Shape< T1, T2, T3 >::upsampling_factor [protected]

Samples per input symbol.

Definition at line 120 of file pulse_shape.h.

Referenced by itpp::Pulse_Shape< T1, T2, T3 >::get_upsampling_factor(), itpp::Pulse_Shape< T1, T2, T3 >::Pulse_Shape(), itpp::Pulse_Shape< T1, T2, T3 >::set_pulse_shape(), itpp::Pulse_Shape< T1, T2, T3 >::shape_samples(), and itpp::Pulse_Shape< T1, T2, T3 >::shape_symbols().

template<class T1, class T2, class T3>
bool itpp::Pulse_Shape< T1, T2, T3 >::setup_done [protected]

Ensures that setup is called before any other member function.

Definition at line 122 of file pulse_shape.h.

Referenced by itpp::Pulse_Shape< T1, T2, T3 >::clear(), itpp::Pulse_Shape< T1, T2, T3 >::Pulse_Shape(), itpp::Pulse_Shape< T1, T2, T3 >::set_pulse_shape(), itpp::Pulse_Shape< T1, T2, T3 >::shape_samples(), and itpp::Pulse_Shape< T1, T2, T3 >::shape_symbols().


The documentation for this class was generated from the following file:
SourceForge Logo

Generated on Fri Jun 8 00:27:27 2007 for IT++ by Doxygen 1.5.2