Download presentation

Presentation is loading. Please wait.

Published byDarin Plunkett Modified over 2 years ago

1
Thomas Eriksson September 2004 Department of Signal and Systems IT++ A software package for NEWCOM

2
Thomas Eriksson September 2004 Department of Signal and Systems What is IT++? IT++ is a C++ library of mathematical, signal processing, speech processing, and communications classes and functions. It has been developed by researchers in these areas. The kernel of the package are templated vector and matrix classes and lots of functions for vectors and matrices. As such the kernel is similar to the Matlab functions. IT++ is based on LAPACK and CBLAS. The IT++ library originates from the former department of Information Theory at Chalmers University of Technology, Gothenburg, Sweden. Since the library is coded in C++ the name of the library seemed like a good idea at the time. While departments come and go, IT++ have developed a life of its' own and is now released under the GNU GPL license for you to enjoy. IT++ works on GNU/Linux, Sun Solaris, Cygwin, Windows 2000/NT/XP (with Microsoft Visual C++, and Mac OS X.

3
Thomas Eriksson September 2004 Department of Signal and Systems What is IT++ not? IT++ does not contain full programs or simulators, but it does contain the building blocks for most applications.

4
Thomas Eriksson September 2004 Department of Signal and Systems The parts of IT++ itbase contains the basic stuff of it++, including vector and matrix manipulation, mathematical functions and signal processing functions. We have random number generation, FFT and other transforms, filtering, matrix algebra, a command-line parser, equation solving and much more. itcomm contains communication-related functions and classes. It is more spezialized than itbase, containing building blocks for communication systems. For example, it contain modulators and demodulators, channel encoders and decoders, spreading and de-spreading functions, channel classes, interleavers, e.t.c. itsrccode is the source coding part of it++, specialized on data compression and speech signal processing. We have vector quantization, linear prediction, Gaussian mixture modelling, etc.

5
Thomas Eriksson September 2004 Department of Signal and Systems Modules of IT++ Here is a list of IT++ modules: Writing Matlab Mex-files using IT++ Bessel Functions Matrix Decompositions Conversion Functions Determinant Logarithmic and Exponential Functions Error Functions Trigonometric Functions Hyperbolic Functions Miscellaneous Functions Filter Classes and Functions Inverse Matrix Error handling functions IT++ File Format Solving Linear Equation Systems Random Number Generation Signal Processing Functions Deterministic Sources Special Matricies Windows Timers Forward Error Correcting Codes Communication Channels Interleavers Digital Modulation Audio LPC-related Functions

6
Thomas Eriksson September 2004 Department of Signal and Systems The basic types Scalar types: complex real and imag part of type double binUsed for binary (0,1) data Vector types: Vec The templated vector class vecA vector of double cvecA vector of complex ivecAn integer vector (int) bvecA binary vector svecAn integer vector (short) Matrix types: Mat The templated vector class matA matrix of double cmat A matrix of complex imat An integer matrix (int) bmat A binary matrix (bin) smat An integer matrix (short)

7
Thomas Eriksson September 2004 Department of Signal and Systems Vector manipulation vec myvector; // defines an empty vector vec myvector(10); // A vector of length 10 myvector.set_length(15); // the vector gets length 15 vec a = "0 0.7 5 9.3"; // a = [0 0.7 5 9.3] ivec b = "0:5"; // b = [0 1 2 3 4 5] vec c = "3:2.5:13"; // c = [3 5.5 8 10.5 13] a(3)=3.14;// Assignment to vector elements (MATLAB style) a[0]=1.2;// c-style assignment works also. First element has index 0. a=c.left(2);// a=c.right(2);// a=c.mid(2,2);// From index 2 of c, to index 4. a=c(2,4);// Same as above c=concat(a,myvector);// Concatenation of two vectors c=to_vec(b);// Converts the integer vector to a Vec

8
Thomas Eriksson September 2004 Department of Signal and Systems Mathematics vec a,b; a=randn(54);// Gaussian random numbers b=round(a);// mat m=”1 2 3; 4 5 6; 7 8 9”; m=inv(m);// the inverse cout << a << b << m << endl ; a=eig(m);// eigenvalue decomposition double d; d=erf(0.2);// the error function a=3*a+sin(b);// arithmetics and functions a=elem_mult(a,b);// elementwise multiplication Bessel Functions Matrix Decompositions Conversion Functions Determinant Logarithmic and Exponential Functions Error Functions Trigonometric Functions Hyperbolic Functions Miscellaneous Functions Inverse Matrix Solving Linear Equation Systems Random Number Generation Special Matricies

9
Thomas Eriksson September 2004 Department of Signal and Systems Random numbers Discrete-valued random number generators Bernoulli_RNG I_Uniform_RNG Continuous-valued random number generators Uniform_RNG Exponential_RNG Normal_RNG Complex_Normal_RNG AR1_Normal_RNG Weibull_RNG Rayleigh_RNG Rice_RNG Random vectors and matrices are easily obtained by using these predefined functions: randb: random bit vector or matrix. randu: random uniform vector or matrix. randi: random index vector or matrix. randray: random Rayleigh vector or matrix. randrice: random Rice vector or matrix. randexp: random Exponential vector or matrix. randn: random Gaussian vector or matrix. randn_c: random complex Gaussian vector or matrix.

10
Thomas Eriksson September 2004 Department of Signal and Systems Filtering Filtering classes AR_Filter autoregressive filter class MA_Filter moving average filter class ARMA_Filter Filter functions filter filtering function (AR, MA, ARMA) Filter design fir1FIR filter design using the window method.

11
Thomas Eriksson September 2004 Department of Signal and Systems Signal processing a2k, k2a, a2lar, k2lar, lpc, levinsson, lerouxguegen fft, ifft spectrum cov, xcorr chirp dht, dht2, dwht, dhwt2, self_dht, self_dwht filter_spectrum filter_whiteness Signal sources Sine_Source Square_Source Triangle_Source Sawtooth_Source Impulse_Source Pattern_Source

12
Thomas Eriksson September 2004 Department of Signal and Systems Communication The itcomm Library The itcomm library contains many different communication functions such as modulators and demodulators, channel encoders and decoders, spreading and de- spreading functions, channel classes, interleavers, e.t.c. Modulator Classes There is a base modulator class called Modulator and two derived classes Modulator_1d and Modulator_2d. You can use Modulator_1d to define you own 1- dimensional signal constellations (e.g. BPSK and PAM) and Modulator_2d to define you own 2-dimensional signal constellations (e.g. QPSK, QAM e.t.c) The predefined classes are BPSK, PAM, PSK, QAM, QPSK, and OFDM. Channel Classes The following channel classes are available in itcomm: AWGN_Channel, Multipath_Rayleigh_Channel, Rayleigh_Channel, BSC, and Rice_Channel.

13
Thomas Eriksson September 2004 Department of Signal and Systems Communication Error Control Classes The following error control classes are available in itcomm: Turbo_Codec, BCH, Reed_Solomon, Convolutional_Code, Punctured_Convolutional_Code, Hamming_Code, Rec_Syst_Conv_Code. Spreading Classes The following spreading classes are available in itcomm: Spread_1d, Spread_2d, Multicode_Spread_1d, Multicode_Spread_2d. Also, the class Gold can be used to generate Gold spreading sequences. Interleaver Classes The following interleaver classes are available in itcomm: Block_Interleaver, Cross_Interleaver, and Sequence_Interleaver.

14
Thomas Eriksson September 2004 Department of Signal and Systems MATLAB interface IT++ support several ways to communicate with MATLAB. MATLAB engine. With MATLAB engine, a matlab process can be started from inside the C++ program. This is useful for plotting, or to use functionality of MATLAB not yet implemented in IT++. By itfile. IT++ defines a file format that is understood both by IT++ and MATLAB. This is useful to save data from a program for later analysis in MATLAB, or if MATLAB provides som data that can be used by the IT++ program. Interface functions and classes: By MEX files. IT++ provides some interface routines for mex file writing, to convert between matlab and it++ vectors and matrices. vec v("1 2 3"); it_file f("file.it"); f << Name("v") << v; Matlab_Engine M; vec v; M.put(v,”v”); M.command(”plot(v)”);

15
Thomas Eriksson September 2004 Department of Signal and Systems #include "itcomm.h"itcomm.h int main() { inti, Number_of_bits; double Ec, Eb; vec EbN0dB, EbN0, N0, noise_variance, bit_error_rate; bvec transmitted_bits, received_bits; cvec transmitted_symbols, received_symbols; QPSK qpsk; //The QPSK modulator class AWGN_Channel awgn_channel; //The AWGN channel class it_file ff; //For saving the results to file BERC berc; //Used to count the bit errors tic(); // start a timer Ec = 1.0; //The transmitted energy per QPSK symbol is 1. Eb = Ec / 2.0; //The transmitted energy per bit is 0.5.

16
Thomas Eriksson September 2004 Department of Signal and Systems EbN0dB = linspace(0.0,9.0,10); //Simulate for 10 Eb/N0 values from 0 to 9 dB.linspace EbN0 = inv_dB(EbN0dB); //Calculate Eb/N0 in a linear scale instead of dB.inv_dB N0 = Eb * pow(EbN0,-1.0); //N0 is the variance of the (complex valued) noise.pow Number_of_bits = 100000; //100000 bits are transmitted for each Eb/N0 value bit_error_rate.set_length(EbN0dB.length()); RNG_randomizeRNG_randomize(); for (i=0; i

17
Thomas Eriksson September 2004 Department of Signal and Systems transmitted_symbols = qpsk.modulate_bits(transmitted_bits); awgn_channel.set_noise(N0(i)); received_symbols = awgn_channel(transmitted_symbols); received_bits = qpsk.demodulate_bits(received_symbols); berc.clear(); berc.count(transmitted_bits,received_bits); bit_error_rate(i) = berc.get_errorrate(); } toc(); cout << "EbN0dB = " << EbN0dB << " [dB]" << endl; cout << "BER = " << bit_error_rate << endl; cout << "Saving results to./qpsk_result_file.it" << endl << endl; ff.open("qpsk_result_file.it"); ff << Name("EbN0dB") << EbN0dB; ff << Name("ber") << bit_error_rate; ff.close(); return 0; }

18
Thomas Eriksson September 2004 Department of Signal and Systems Possible extension New functionality provided by NEWCOM partners ???

Similar presentations

OK

EE682L: Lectures 2 and 3 1 Digital Communications Source Encoder Channel Encoder Digital Modulator Channel Digital Demodulator Channel Decoder Source Decoder.

EE682L: Lectures 2 and 3 1 Digital Communications Source Encoder Channel Encoder Digital Modulator Channel Digital Demodulator Channel Decoder Source Decoder.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on taj hotel mumbai Ppt on revolt of 1857 images Ppt on ufo and aliens on the moon Ppt on power grid failure in india 2012 Ppt on dining etiquette Ppt on international business management Ppt on online shopping site project Ppt on low level language vs high level Ppt on industrial all risk policy Ppt on principles of object-oriented programming tutorial