MUSTIG library

 DIGITAL CommunicationS 

 

Version 1.0

 

 

.

 


 

1  Introduction                                  5

1.1          Generalities                                                                                                                                                                  5

1.2          Environment                                                                                                                                                            5

1.3          Content of the delivery                                                                                                                                             5

2  General structure                   5

2.1          Binary signal                                                                                                                                                            5

2.2          Formation of the symbols                                                                                                                                            5

2.3          Modulation                                                                                                                                                                   5

2.4          Channel of transmission                                                                                                                                              6

2.5          Demodulation                                                                                                                                                              6

2.6          Equalization                                                                                                                                                                   6

2.7          Decision on the symbols                                                                                                                                        6

2.8          Generators of frequencies                                                                                                                                        6

2.9          Visualization and measure                                                                                                                                            6

2.10             Remarks                                                                                                                                                             6

3  Examples of implementation       6

3.1          Coding                                                                                                                                                                          6

3.2          Main methods of modulation (amplitude, phase)                                                                                    8

3.2.1             Formatting by rectangular impulses                                                                                              8

3.2.2             Formatting by impulses " root of Nyquist"                                                                                    9

3.2.3             Modulation - Demodulation non coherent                                                                                                 10

3.2.4             Modulation - Demodulation coherent                                                                                                         10

3.3          From the PSK modulation to the modulation GMSK                                                                                                   11

3.3.1             Modulation QPSK4                                                                                                                                        11

3.3.2             Modulation GMSK                                                                                                                                         13

3.4          Equalizors of lines of transmission                                                                                                                    14

3.4.1             Transversal equalizor                                                                                                                                       14

3.4.2             Viterbi equalizor                                                                                                                                        15

3.5          Multifrequency modulation (DMT or OFDM)                                                                                                    16

3.5.1             Widening of spectrum (CDMA)                                                                                                                     16

3.5.2             Multifrequency modulation                                                                                                                          17

3.6          Synchronization                                                                                                                                                       19

4  Detailed descriptions          20

4.1          Binary signal                                                                                                                                                          20

4.2          Formation of the symbols                                                                                                                                         20

4.3          Modulation                                                                                                                                                                21

4.4          Channel of transmission                                                                                                                                            22

4.5          Demodulation                                                                                                                                                            23

4.6          Equalization                                                                                                                                                                23

4.7          Decision on the symbols                                                                                                                                     24

4.8          Frequency generators                                                                                                                                      24

4.9          Visualization and measure                                                                                                                                         24

5  Annex : Internal description of Viterbi macro.                                25

5.1          The module Viterbi                                                                                                                                                    25

5.2          The generators of metrics                                                                                                                              27

5.2.1             The euclidian metrics                                                                                                                           27

5.2.2             The metrics of Hamming                                                                                                                           28

 


 

1         Introduction

1.1        Generalities

This library is destined to facilitate the simulation with MUSTIG of a numeric transmission chain of data. This in an educational goal or survey of new structure. All functions of this library are macro written in MUSTIG, therefore open and modifiable. The very modular structure of the whole facilitates the creation of variants of the macro provided. 

Most macros provided have been conceived solely for the simulation. They require the setting in memory of the complete signal. They are not adapted therefore to the very long signal simulation and nor to a real time use. 

1.2        Environment 

Some functions of this library require the version  4.5 of MUSTIG or higher 

The bib_com.MTG file contains the actual library. It contains all basic macros.

Apart from this library, several files present examples of simulation, of didactic character. They are commented in this document in 3.0

2         General structure

 

The library is divided in chapters. Each among them corresponds to a stage of the transmission chain of information. 

2.1        Signal binaire

Contains binary signal generators. A binary signal is a signal whose samples can only take the valeurs "1 " or " 0 ". In other words, it is a set of bits. 

Although only one bit can be sufficient to represent these values, a binary signal is of interger " type ". 

2.2        Formation of symbols

These macro transform the binary signal in a set of symbols. A symbol is a value associated to a set of N bits. 

It is thus still a discrete signal. To preserve a constant information flow all along the chain, the frequency of sampling of the signal composed of the symbols is N times weaker than the one of the binary signal. 

These macros are all decomposed in two parts: a first that associates N bits to form a number named " numeric " symbol. A second that provides a value corresponding to this number for the chosen coding. This value, that represents an electric tension for example, is represented by a floating, real or complex number.

2.3        Modulation

These macros transform the set of symbols in a continuous signal. In fact, the simulation is made entirely in discrete time: the continuous is simulated by an increase important of the rate of samples. To every symbol corresponds normally a continuous signal of T length. It will in fact correspond to it a discrete signal of M points, that is sampled it of this continuous signal.

The continuous " signal " possesses a frequency of sampling M therefore bigger time than the signal composed of the symbols. 

To get a precise simulation, one will wish to use a big value of this over-sampling factor. But it will be to the detriment of the simulation speed. To be able to modify this value without adding systématiquement  an entry to each of the macro, all these macro use a jump module. It is therefore indispensable to define the value of the jump module  in all files that call on these macro. 

It is important to note that in the facilities of telecommunication, the part of the numeric (and therefore of the discrete) is more and more big. The technique of simulation used here will correspond therefore often to what is really made. It won't miss whereas the last analogical filtering. 

One will find in this chapter of the generators of impulse, the filters, and the combined operations (filters multicadences) faster. They permit to do a modulation in a group of basis (around the frequency " 0 "). One will find of more than the operators to do a transposition of frequency. 

2.4        Transmission channel

One will find here the simulation of the transformations done on the signal by the transmission channel. 

These transformations consist in filterings, of the delays and the addition of noises. 

2.5        Demodulation

These macros transform the continuous signal in time in a signal discrete sampled to the rhythm symbol. 

They consist in operations of change of frequency, filtering and sampling. The operations of filtering and sampling can be combined for a better efficiency.

One will find here the inverse functions of the those of the chapter " modulation ". 

2.6        Egalisation

These macros are destined to compensate the distortions (that often cause the inter - symbol interference) of the signal created by the filtering of the channel. 

2.7        Decision on symbols

In output of the demodulation macro, the signal is in time discrete, but Its values are continuous (while making abstraction of the quantification of the numeric representation) since blemished of noise. 

These macro transform the continuous values in symbols, by an operation of thresholding or quantification. 

2.8        Frequency generators

One finds the tools here to simulate the locking of the sampling frequency (VCO) 

One finds functions of special visualization   here: eye diagram, drawing of constellation. A spectrum analyzor adapted to the needs. Macros of numbering of the transmission errors.

2.10    Remarks

3         Examples of implementation

3.1        Coding

SYMBOLES.MTG file

Principle of the transmission numérique : 

coding in amplitude, in quadrature, in phase or any 

visualization of the constellations 

addition of noise: transmission error numbering

 

 

The Macro “BitsAléatoires” generates a set of interger values of values 0 or 1. The Macro “Shape symbols” associates these bits two by two and transforms them in values that can be equal to –0.75, -0.25, 0.25 or 0.75. “Visu/t” permits to observe the formed discrete signal: 

The macro “Noise additif2” adds 20 realization of noise (real) to this signal. The signal is then a function of two variables, the time “t” and the indication of the realizations  “e.” Its visualization by “Visu/t”, only planned for a signal function of “t”,  gives a superposition of the different realizations of noisy signal. Every point of the signal is replaced by a stain: 

If the amplitude of the noise is inférieure  to the half of the gap between the levels of the symbols (here 0.25), it is possible to reconstitute the initial symbols and the bits by thresholding. It is achieved by the macro “Decodes Symbols.” One verifies with the help of the macro “ERREUR2 (%) " that it is made without error. One will be able to observe that it is not anymore the case if one increases the power of noise or if one tightens the levels while increasing the number of bits by symbols. 

If one chooses for the macro “Shape symbols” a complex " type " coding, one gets a coding in complex amplitude (QAM : quadrature amplitude modulation). Rather than to visualize the temporal signal, one uses the visualization of the " constellation " then often. If one chooses 4 bits by symbol and while adding a complex noise, one gets the face suivante : 

To do some codings with constellations of shape different of those authorized by “Shape symbols”, it is necessary to use “Shape symbols qque”: 

The list of the values possible of the symbols is given under shape of a function of the variable “sb.” 

The used above list gives the constellation below: 

3.2        Main methods of modulation (amplitude, phase)

File MUSTIG MODULAT.MTG

Formatting by impulses oblong or by impulses of Nyquist. 

Coherent demodulation or no.

Eye diagram.

3.2.1       Formatting by rectangular impulses

The macro " Blocker " associates an oblong impulse to every symbole ; the amplitude of the impulse is the same that the one of the symbol. SIt simulates the function achieved by the traditional analogical numeric converters. 

<

As It is explained to the paragraphe  2.3, the formed signal should be a signal continu : it is simulated by a signal suréchantilloné. The number of samples by impulse is fixed here to 16 by the Fact_surech " jump module ". One shows that, to the receipt, it is necessary to do a filtering adapted to the impulse given out before sampling. Here, this filter is a slippery intégrateur on the length of a symbol. To appreciate the quality of the received signal, one often observes the " diagram of the œil ". It is about the temporal shape of the signal, folded by slices of two lengths symbol. It permits to judge the good position of sampling instant (marked par l ‘abscisse " 0 "), and of the good separation of the symbols at this instant. 

Let's note that the slippery, causal filter, drag a delay of a symbol. It is necessary to compensate it before comparing the signal received to the one given out therefore: in the macro “error (%)”, one fixes the delay to the number of bits by symbol. 

For reasons of efficiency of calculation, one has interest to replace the filter, the slippery intégrateur, and the échantillonneur by a combined function, the Echantillonneur-moyenneur" qui macro " doesn't calculate the average that at the instant of sampling. 

One can observe the spectrum of the signal : one notes the lobes important of this modulation type. 

 

3.2.2       Formatting by impulsions "root of Nyquist"

To decrease the spectral clutter, one uses a formatting by impulses whose spectral extent is weaker. The length of these impulses is then necessarily superior to the one of a symbol and they are going to ride. Of the particular shapes, as the impulse " root of Nyquist ", avoid nevertheless the inter - symbols interference at the instants of sampling. 

The formatting of the signal can make itself in a theoretical " way " while replacing the blocker by a generator of impulses of Dirac followed by a continuous filter whose impulse response is the shape of impulse wished. 

The Nyquist12 " macro " calculates the coefficients of the filter " root of Nyquist ". For reasons of efficiency, it is preferable to replace this structure by a filter multicadence that saves the numerous calculations on the null values introduced between the impulses of Dirac. The macro " Forms impulse " is based on this principle. 

To the receipt, the adapted filtering can be achieved by a RIF filter of answer impulse root of Nyquist. It simulates an analogical realization of this filter and permits to observe the digramme of the œil. 

One will be able to insert a delay of a fraction of time symbol in the journey of the continuous " signal ". One simulates a error of synchronization thus. 

For reasons of efficiency of calculation, one will have interest to use the Filtre_échantillonneur " macro " that only calculates the points took in account by the sampling. It corresponds to a numeric realization of filtering. It is not then more possible to visualize the eye diagram. 

One can verify that the spectral extent of the signal is a lot weaker than with the impulses rectangulaires : 

 

3.2.3       Modulation-Demodulation non coherent

The signals created by the setting in previous shapes were in " strip of base" : their spectrum was centered around zero. For translater their spectrum around a higher frequency, to multiply them by a sinusoïde to this frequency is sufficient, that one calls " frequency bearer ". It is this operation that is often called " modulation ". SIt is achieved by the macro " Modulation Sinus ". One can verify it while observing the spectrum résultant :

It agrees here of to be careful to have a sufficient over-sampling factor, at the risk of creating the repliement of spectrum. 

To put back the signal in a group of basis to the receipt, it is necessary to multiply it all over again by an equal frequency sinusoïde to the central frequency, then to filter it low pass to eliminate the high frequencies. In fact, to be insensible to the phase, one multiplies by an exponential complex (what comes back to multiply separately by a sinusoïde and by a cosinusoïde), and one takes the module in output. The function of pass - bottom filtrage  is achieved by filtering in root of Nyquist   The callousness to the phase procures a weak sensitivity even to the errors of fréquence : the frequency of demodulation can be different from the modulation frequency. Let's note that the use of the module of the signal doesn't permit to transmit a sign, the coding of the symbols is of positive " type ". 

3.2.4       Modulation-Demodulation coherent

If one can know in receipt the frequency and the phase of the broadcast bearer, it is possible to use a coding in symbols in amplitude and phase. One will be able to use marks them of Complex " coding " or " Phase " of the macro " Form symbols ". 

The symbols being complex, the modulation is made by the macro " complex " Modulation. The resulting signal is always real. The demodulation is made again by " Modulation expi ", but without calculation of the module. Let's note the presence of the operator " conjug ", that can replace itself by a sign less before the frequency of demodulation. 

One can verify that a very weak error of frequency (150.01 instead of 150) scrambles the constellation completely: 

And that a error of phase makes it turn:

Let's note that to visualize these constellations, one suppressed the first points that are distorted by the transient of the filters. 

These filters introduce a delay that is compensated at the time of the comparison in the macro " error (%). 

3.3        From PSK modulation to GMSK modulation

File MUSTIG GMSK.MTG

QPSK modulation to 4 states. 

OQPSK modulation.

MSK modulation seen like variant of OQPSK. 

MSK modulation seen like particular case of frequency modulation. 

GMSK modulation (used by the GSM). 

3.3.1       Modulation QPSK4

The modulation of phase in quadrature to four states (Quadrature Phase Shift Keying 4) is a particular case of that that has been seen in 3.2.0 One uses the macro " Forms symbols cplx ", simpler than Shape symbol ", and a formatting by an oblong impulse. 

The demodulation makes itself by:

This signal presents the inconvenience to present brutal transitions of phase of –PI to +PI. It is put in evidence by the tracing of the path of the signal in the complex plan, made by the Transition/t " macro ". 

One solution to attenuate it is to delay the transitions of the part imaginary of a half time symbol. One gets the OQPSK4(Offset modulation then Quadrature Phase Shift Keying 4) 

To compensate this delay to the receipt is sufficient; (A supplementary delay has been added so that the global delay is of a complete symbol). 

 

The diagram of transition shows that the discontinuities of phase are weaker: 

The spectral occupation of this signal remains again very big because of the discontinuities of phase. To decrease it, one can ease these transitions. One can get the MSK modulation (Minimum Shift Keying) while replacing in the OQPSK modulation the oblong impulse formed by the blocker in an ark of sinusoïde. 

The signal moves then in the complex plan on a circle. 

Filtering adapted in receipt comes back to a scalar product: 

Let's observe the temporal signal (real part superimposed to the complex signal): 

One sees that the signal doesn't present any discontinuities. It possesses points of rebroussement nevertheless: Its spectrum will present some lobes less decisions that the OQPSK, but even important. One can reduce them by the GMSK modulation. 

3.3.2       Modulation GMSK

To introduce the GMSK modulation, it is necessary to come back to the MSK modulation, and to consider it like a modulation of frequency in continuous phase or CPFSK(Continuous Phase Frequency Keying). 

 

One takes the bits one by one to order the frequency by the macro " Modulation of frequency " so that two successive bits correspond to the same number of samples after suréchantillonage by the blocker, the factor of suréchantillonnage is divided by two. 

So that this modulation of frequency gives the same result that the modulation of phase of the previous paragraph, it is necessary to drift the binary train. It is made by the macro " logical " derivative. To become liberated from the initial state, one compares the derivatives of the signals received and gave out. 

(In practice, one will use differential codes.)

 

The GMSK modulation gets itself then while smoothing the changes of frequency by a filter of answer Gaussienne impulsionelle. It is achieved by the GMSK0 macro of the example:

Let's note the replacement of the Forme_symboles " macro " by a simpler shape. 

In fact, one can replace the juxtaposition " Blocker " and " FiltreGauss " by the juxtaposition " Impulse " and " FiltreGauss ". (In the general case, the filter would be different, it is identical in the case of the answer filter impulsionelle gaussienne.) It is made in " GMSK1 ". It is then possible to use the faster structure of the macro " Forms impulse ", in the macro " Impulse of Gauss ". It is made in " GMSK ": 

One can see that the spectrum of this signal is improven appreciably. But the temporal shape is very near:

The rebroussements has only been rounded. It is therefore possible, for the demodulation, to assimilate the GMSK modulation to a OQPSK modulation. 

3.4        Equalizor of transmission lines

3.4.1       Equalizor transversal

Files MUSTIG  EGALIS.MTG,  

Egaliseur by adaptive filter (LMS), blind or with sequence of training. 

Egaliseur of Viterbi.

Let's interest ourselves to a transmission in QAM coding:

The macro " Channel " consists of a filter and an addition of noise. This simulation doesn't make to the actual modulation process, with the transmission of a continuous signal, appear. SIt is entirely discrete. It is necessary to consider that the macro " Channel " represents the whole channel, including the modulators and démodulateurs. 

If one observes the constellation in output of the channel, one sees the extended stains that partially regain themselves: it provokes errors of transmissions. 

To improve the transmission quality, one adds an equalizor. 

One of the structures the more used consist in a filter placed on the path of the data, as Its setting in cascade with the filter of the channel is equivalent to a filter unit (TO a delay near to respect causality). It is necessary to achieve the inverse filter of filter of the channel therefore. In the general case, this filter is not known and can evolve even during the time. One uses a filter then adaptive auto.

The LMS " macro " achieves an adaptive filter while putting in œuvre the algorithme  of the pressure gradient:

SIt understands a filter to impulse response finished of " N " coefficients between E1 and S. The algorithm of the pressure gradient makes converge the coefficients of this filter in order to minimize the difference between S and E2. 

If one applies the signal received in E1 and the signal given out in E2, the filter converges toward the inverse filter of the filter of the channel. 

One doesn't normally have the signal given out in receipt, since it is precisely for what one looks. A solution is to use the signal reconstituted in output of the decision making organ. 

The macro " Decodes symbols " provides on Its lower boundary-mark the reconstituted symbols that reboucler is sufficient on the E2 boundary-mark of the LMS " macro ". It is preferable to initialize the filter like an unit filter (of which the answer of the filter is a " dirac "). The LMS macro permits to choose the delay of this initial filter. 

This technique, named blind equating, only functions if the channel is not too unsettled and that the error rate is weak without equalizor. Otherwise, it is necessary to make precede the useful signal by a signal known to the receipt: a sequence of training. The convergence is then possible, since the reference is exact. Then, one can commute in blind fashion to be able to follow non stationnarités of the channel. 

One uses in the example a pseudo - uncertain binary sequence as sequence of training, that is inserted by the Concaténer " macro ". An identical signal is reproduced in receipt. The macro " Commutes " applies this signal first of all to the entry references the LMS macro, then the output of the symbols reconstituted. 

 

3.4.2       Equalizor of Viterbi

The graph below shows a case of the simplest implementation of the "Egalis.Viterbi " macro. 

The train of bits is transformed in symbols by the macro " Forms Symbol qque ", that would permit a coding with any alphabet. In fact the coding is merely here QPSK in 4 states. The macro channel includes an additive noise and a filter to impulse answer finished of coefficients 0.9, 0.3, 0.1. The Viterbi macro provides in output the reconstituted symbols. They are transformed in bits by " Decodes symbols qque ". One supposes to know here the filter of the channel: Its impulse answer is communicated in the Viterbi macro. The visualization " Visu Lattice " permits to observe the working of the algorithm of Viterbi. One sees the convergence toward an unique path.

If one doesn't know the impulse answer of the channel, it is necessary to identify it, while making precede the signal  by a sequence of training. 

Identification can make itself by the LMS " macro " as below. 

The Bits+app " macro " generates the binary signal preceded of the training sequence. The macro " app " generates a copy of this sequence. Let's note that the branching of the LMS " macro " is different from its branching in the equalizor. In the case of the equalizor, one tries to identify an inverse filter, whereas here, one tries to identify the filter himself. The macro " Adjusts var " prolongs this sequence to the length of the signal. The macro " Memo " memorizes the answer identified by the LMS at the end of the sequence of training. 

3.5        Multifrequency modulation (DMT or OFDM)

Example MUSTIG OFDM.MTG

Display of spectrum by coding (CDMA) 

Multifrequency modulation 

Particular case multifrequency (calculated by DFT) 

Real DMT

Complex DMT

Note: Considering the numerous possible variants, there is not a macro completes in the library concerning these modulations, but only of the very elementary macro. It will be necessary to leave below from the examples to construct the chain of treatment wanted. 

3.5.1       Spectrum widening (CDMA)

The C_ETAL " macro " looks like the macro " Forms Symbol qque ". SIt also starts with associating several successive bits to form a number (numeric " " symbol), but then, instead of choosing a value in an alphabet, sIt chooses a signal composed of several successive values: 

 

The alphabet and then a list of signals. SIt is provided by the Codes/t/nc " macro ". It is therefore a whole of signal function of the variable  ' you and indicé by the variable ' nc'. Here, we chose of the codes binary pseudo orthogonaux. We get grants a coding of CDMA " type ". We could put a whole of sinusoïdes. We would get a simple modulation of frequency then (to discontinuous phase). 

To make the decoding, one could construct the whole of the filters adapted to each of the signals of the alphabet, to sample their output at the end of a symbol, and to choose the strongest output. It is what is made in the macro " Decodes C_ETAL(principe) " of the example. The macro " Decodes C_ETAL " uses a simple scalar, faster product. 

3.5.2       Multifrequency modulation

In the example above one transmits one or the other of the signals of the alphabet. One can transmit a linear combination of these.   

The C_PROJ " macro " of the example achieves it:

.  

The macro " Forms symbols " generates a scalar symbol set. These symbols are grouped then in packets by " Cuts ". The size of these packets is equal to the number of signals of the alphabet. One ponders each of the signals of the alphabet by the scalar correspondent. It comes back to achieve a projection on a basis, that could take offense by a product of matrix. It is made by la  macro " Projects " that associates to every packet a new packet of equal size to the size of the signals of the alphabet. One will call these packets of the " plots ". " Merge " forms a signal in raboutant these plots.

The macro Decodes C_PROJ does the decoding.

" Cut " reforms the packets of equal size to the size of the signals of the alphabet. The macro  " Produces scalar " does the inverse operation of the projection, while supposing the signals of the alphabet orthogonal between themselves. 

The "MCODE(projection example ) "   runs with a binary code alphabet. In the "DMTS " examples , one uses the same macro, with a basis of signals sinusoïdaux. One can show that if one respects a particular condition of spacing of the frequencies of the alphabet of signals (that is precisely the condition of orthogonalité), the projection sur  bases it is equivalent to a transformed of discrete Fourier (DFT). As using transformed it of fast Fourier  (that is put in œuvre in the TF " module " of MUSTIG), one increases the speed of simulation considerably. It is achieved in the OFDMcplx " macro ":

One replaced the macro " Projects " by the macro " Puts in frequency " and " DFTI ". 

 "Met in frequency " consists mainly of a variable change: the packets formed by " Cuts " are considered then like values in frequency. These values are completed to the size of the TFD by null values. This size, that we will call raw plot size, is programmed on the front of " Puts in frequency ".   The DFTI " macro  " achieves the DTF with the help of the module elementary " TFI ", completed by a normalization. One macro " Prefixs… has been added to do various manipulations on the plots. One can prolong celle - ci  by null values (interval on duty). One can add a cyclic prefix, and one can do a level-headedness. The number of samples added by these operations is counted and is displayed. It should be identical to the one given to the macro " Puts in frequency ". (This one uses this parameter for affecter  the step of the variable frequency, what permits to visualize the signal fréquentiel with correct scales.) One displays the resulting plot size. This value should be reported in the macro of decoding to cut the signal all over again in the same way in plots lengths. 

The decoding is done by the macro " Decodes OFDMcplx " with the inverse operations: 

The size of the carving in plot must be provided in parameter. One will use the value returned by the OFDMcplx " macro ". In the macro " puts back in time ", one displays the number of useful symbols in output of DTF. It is the size of the carving to the entry of OFDMcplx " 

The setting in simplest œuvre of this macro is the following: 

If the number of frequencies used (that is to say the size of the TFD) is not too big, one can observe the constellations of all frequencies simultaneously. One arranges for it of the macro " DMT " constellations. 

 

If one makes pass the signal in a channel that modifies the amplitude et  the phase of the signal, one can observe the modifications: 

 

To decode such a signal correctly, it is necessary to do an equating. This one can take place advantageously in the domain of the frequencies. SIt consists then in applying a complex gain on every component. 

In the " macro " OFDMcplx+egal " Decodes has been added such a equalizor: 

The macro " Commutes " applies the sequence of training first of all as signal of reference of the " LMS ". Then, these are the symbols valued par  " Decodes symbol " that holds place of it (working in " blind "). Let's note that the macro " Decodes symbol " has been displaced before the macro  " puts back in time ". It requires to display in parameter of this one the numbers useful symbols in frequency multiplied by the number of bits by symbols. 

This equating is put in œuvre of the following way:

One uses like sequence of training the beginning of the signal. This signal, in the domain of the frequencies, is taken on a boundary-mark of the OFDM macro. To make the simulation more realistic, It would agree to duplicate this coding of quoted it of the receipt. To visualize the constellations, one suppresses the first plots that correspond to the phase of training. 

The macro previous " OFDMcplxes " and " DécodeOFDcplxes " simulate the transmission of a complex type signal, constituted of two components, that will serve in practice to modulate a bearer. 

The OFDMreels " macro " and " DécodeOFDMréels " of the under DMT(OFDM example) real simulate the transmission of a real signal. The symbols fréquentiels is considered like a function of a type " variable half ", of which transformed it inverse Fourier is a real signal. 

3.6        Synchronization

The functions of recuperation of bearer and synchronization symbols are not integrated to the version 1 of this library. One will only find some examples not commented.


 

4         Detailed descriptions

One will find in this chapter the descriptions of the macro of the library. These descriptions are available under MUSTIG by the order " Read the information " (Ctrl H) 

4.1        Binary signal


 

Generator of binary sequence of maximal length. The length is given in power of 2. The exact length is displayed.

Generator of an uncertain binary signal.

The output is formed of ' 0 ' and of ' 1 ' equiprobables.

The gotten sequence is modified after every reinitialization of the macro. 

 

Generator of a pseudo - uncertain binary signal.

The output is formed of ' 0 ' and of ' 1 ' équiprobables.

The gotten sequence depends on the number interger " Ini " 

 

 

4.2        Formation of symbols

Entrée : binary signal (composed of 0 or 1)

Left: values formed by coding of " successive Nbitses " of the entry. 

The values can be of one of the following types

             Positifs: included between 0 and +1

             Signs: included between -1 and +1

             Complexe: of module &lt1

             Phase: complex number of module = 1

 

 

Entrée : binary signal (composed of 0 or 1) 

Left: values formed by coding of " successive Nbitses " of the entry. 

The values can be of one of the following types:

             Positifs: included between 0 and +1

             Signs: included between -1 and +1

             Complexe: of module &lt1

             Phase: complex number of module = 1

 

Bits : binary signal (composed of interger of valeur  0 or 1) 

Symbols: set values formed by coding of " successive Nbitses " of the entry. 

 

V: values used for the coding, function of the variable ' sb' 

 

 

The signal of entry must be of interger type.

The signal of output is one " or exclusive " (XOR) between the signal of entry and the signal of entry delayed of a sample. 

 

4.3        Modulation

 

Calculate the impulse answer of a filter " root of Nyquist ". 

 

Replace every sample of the entry signal by N identical samples. 

Simulate the blocker of an analogical numeric converter. 

The value of N is determined by the jump module:

 

Simulate a converter theoretical Analogical Numeric without blocker: 

Every sample of the entry signal is followed from N-1 null values 

The value of N is given by a jump module:

 

Function equivalent to:

but using a structure of multi - cadence filter, therefore faster. 

 

Multiply the signal by a sinusoïde.

Modulate the complex signal by a sinusoïde.

The signal of output is real.

 

Create a signal sinusoïdal whose frequency is a linear function of the value of the entry signal. 

- The signal can be sinusoïdal (real)

             or exponential complex. 

- One can adjust

             the central frequency ' fo' 

             the deviation ' of 

 Pour a value ' e' of the entry signal, the frequency is then: 

             fo (1+d.e) in relative " fashion " 

             d.e in absolute " fashion "                    

             fs.d.e  in fashion " relatif/symboles " (fs = frequency of the symbols, use the Fact_surech " jump module " then)    

            

 

Delay the signal of the length of a symbol.

The number of samples of the period symbol is given by the jump module:

 

Delay the signal of la  half of the length of a symbol. 

 

Makes precede the signal of Its NS last points.

The signal of output possesses N therefore dawned the signal of entry more than. 

N must be lower to the length of the entry signal.

 

Prolong the signal with Its NS first points.

The signal of output possesses N therefore dawned the signal of entry more than. N must be lower to the length of the entry signal

 

 

Multiply the signal by a function of level-headedness of shape " stilted " cosine: 

Multiply the NS first points by a function that passes progressively from 0 to 1. 

Multiply the NS last points by a function that passes 1à 0 progressively. 

 

Associate an impulse gaussienne to every symbol.

Filter to finished impulse response whose answer is of shape gaussienne. 

 

Generate an equal period sinusoïde at two periods symbol. 

 

So N&gt0;

             Ajoute N null values at the end of the signal. 

so N &lt0

             Supprime the NS last values. 

 

 

 

4.4        Transmission channel

 

Add to the signal of entry a noise real or complex gaussien, of gap marks adjustable. 

Also permits to measure the report signal to noise resulting. 

 

 

Add to the signal of entry a whole of realizations of a noise real or complex gaussien, of gap marks adjustable. 

Also permits to measure the report signal to noise resulting. 

The signal of output is a signal  to two measurements: 

             ' you the support of the entry signal 

             ' e' the indication of the realizations 

 

 

 

Delay the signal of entry.

The G " range " of the delay is fixed on the face before. It can be expressed:

            - in samples of the entry signal                   

- in " Symbols ". The number of samples by symbol is determined by the jump module

             - in time (uses the step of sampling of the entry signal) 

The delay is RxG.

The R entry can vary during the length of the signal.

 

One can choose to use an interpolation to get non multiple values of delay of the period of sampling. This interpolation is done by polyphase filtering. One can choose then:

             - the number of elementary filters 

             - the number of coefficients by filters.

 

 

 

 

4.5        Demodulation

Multiply the signal by an exponential complex.

The signal of output is therefore complex!

 

Filter intégrateur to length finished N.

The value of N is given by a jump module:

 

 

Simulate the working of a part of un  converter Numeric Analogical.

Achieve one under - sampling of the signal of entry of a factor determined by the jump module:

 

Equivalent to:

but faster.

 

 

Equivalent to:

but while using a multi - cadence filter, therefore faster. 

 

Jump the NS first points of the entry signal.

Suppress the NS last points of the entry signal.

 

Jump the NS first points of the entry signal, and adds them in the NS last points. 

If the entry is the output of the set of the 2 macro: " prefix cyclique/t " and " Xcos surélevé/t ", one recovers the initial signal. 

 

 

 

4.6        Equalization

Adaptive filter using the algorithm of the pressure gradient (L.M.S) 

 

It identifies a transverse filter of N coefficients. ' Sortie' is filtered it of ' Entrée1 ' by this filter. It tries to minimize the quadratic error between " Entrée2 " and " output ". 

 

Not:     value of the adaptation step 

N:         numbers coefficients of the filter 

P INI:  Indication of the equal coefficient to ' 1 ' to the initialization, all others being null. (to put -1 to get all null coefficients)

 

 

Coefficient adaptive auto using the algorithm of the pressure gradient. 

(Same function that " LMS ", but with only one coefficient.) 

Algorithm of VITERBI

Left entry: information coming from the metrics calculation (Metric of Euclide or Metric of Hamming) 

Superior entry: of the maximum value of the delay of the evaluation (depth ") 

Right output: valued symbols.

Lower output: for visualization of the state of the lattice (to see macro " Visu Lattice ") 

 

 

Calculation of the metrics of Euclide to achieve a equalizor of Viterbi with the Viterbi " macro " 

 

Left entry: signal (function of ' you)

Superior entry: values possible of the symbols (alphabet) (function of ' sb') 

Lower entry: impulse answer of the channel. (function of ' r') 

Right output: Information for the Viterbi " macro " 

Egaliseur of Viterbi. Formed of the two previous macro. The depth of Viterbi is adjustable.

 

 

4.7        Decision on symbols

Calculate the symbol the more close to the value of entry, and form the corresponding bit set 

(identical coding to the one of " Shape symbol ").

Calculate the symbol the more close to the value of entry, and form the corresponding bit set 

(complex coding).

 

Calculate the symbol the more close to the value of entry, and form the corresponding bit set 

(identical coding to the one of " Shape symbol qque "). 

 

4.8        Frequency generators

4.9        Visualization and measure

 

Draw the distribution of the power of the signal according to the frequency. 

 

 

Draw the distribution of the power of the signal according to the frequency. 

The signal must be function of the variable ' e', indication of the realizations of noise. 

(to see macro " Murmurs additif2 ").

A moyennage is done according to this variable.

Draw the signal while superimposing blocks of equal length to the length of two successive symbols 

Draw in the complex plan the journey between the successive symbols. 

 

 

Compare two signals and display the number of different values and the error rate. 

If the signals are of unequal lengths, the comparison is made on the common part. 

If the signal of the lower boundary-mark is late in relation to the signal of the superior boundary-mark, one can compensate this delay. 

One can ignore for the comparison the first points of the signals. 

Compare two signals and display the number of different values and the error rate. One of the signals must be function of the variable ' e', indication of the realizations of noise, 

(to see macro " Murmurs additif2 ")

If the signals are of unequal lengths, the comparison is made on the common part. 

 

If the signal of the lower boundary-mark is late in relation to the signal of the superior boundary-mark, one can compensate this delay. 

One can ignore for the comparison the first points of the signals. 

Suppress the NS first points of the signal. Useful to conceal the transient of the filters. 

Special visualization for Viterbi.

Connect to the lower boundary-mark of the Viterbi " macro " 

 

1         Internal description of Viterbi macro.

5.1         The Viterbi module

 

 

 

In top happens to a scalar giving the ‘' depth of the Viterbi, even named ‘length of ' decision. Happen to a retiring bundle of a box ‘Métrique'  on the left: the boundary-mark of the top of this faisceau  gives the alphabet, neat according to the variable 4 on the facade of the macro (here, the variable /sb), the boundary-mark of the middle gives the length of the channel less one, and the boundary-mark of the bottom gives the vectors of metrics (neat according to the variable 2 on the facade of the macro (here, the variable /i)), for every element of the vector ordered according to the variable 1 on the facade of the macro (here, the variable /t), that means every iteration of the process. 

Takes the valued symbol vector on the right, neat according to the variable 1 on the facade of the macro (here, the variable /t). Takes a bundle destined to the special macro of visualisation  of the lattice below (stationary or animate), of which composing them sont : N carves it of the alphabet, L the length max of the channel less one, the lattice ordered according to /i and /co, and the vector of the best state of every iteration (this last vector serves to draw the surviving path above the other). 

Two information must be actualized to every iteration of the processus : the vector Min. of the metrics accumulated, and the Cn lattice, that, for every possible state, contains the best state antecedent, and this on an equal length to V time - symbol, V being the delay to the evaluation (the ‘' depth of the Viterbi). The states are stocked under shape of indications (to see the construction of the metrics). 

Either N carves it of the alphabet, L the length of the channel less one. One has N^(L+1) possible states, corresponding in the N^(L+1S) sequences capable to be given out. However, every state can be gotten from N states of the stage précédente : indeed, from the NS states of the previous stage that different that by the oldest symbol, one can arrive to the state to which one is interested while adding to the NS previous states the same symbol. 

Therefore, one has need rightly to stock the paths leading to the N^LS better states to every iteration, what explains the size of Cn ,: V columns, N^L lines. For the same reason, the vector of the metrics accumulated only includes N^L lines. 

To every iteration, one receives a vector of N^(L+1) metric. One suréchantillonne Min. of a mailman N, because the NS first metrics correspond all to the first state of Min. (these NS states are deducted of the same better previous state). One adds the metrics received at Min.. Intervenes then the ‘macro Path Min ': 

Path Min /z/i

 

Of these N^(L+1S) states, one is going to keep the best N^LS only. The NS sequences that lead to the same state have the following indications :

             0, N^L, 2(N^L), 3(N^L),..., (N-1)*(N^L) 

             1, N^L+1, 2(N^L)+1, 3(N^L)+1,..., (N-1)*(N^L)+1 

            ...............

             N^L-1, N^L+N^L-1, 2(N^L)+N^L-1,..., (N-1)*(N^L)+N^L-1 = N^(L+1)-1 

 

One constructs the matrice  therefore above with the two macro ‘Indications /i 'S and ‘/q 'S, and one replaces the indications by the metrics correspondents (macro ‘Coupe /z '). The macro ‘Po global min /q ' gives us on Its boundary-mark of the top the values of the metrics minimum for every new state, and on Its boundary-mark in top on the right the indications of this metrics minimum. One ‘Coupe ' stamps it gotten according to the variable /q to have, for every state, the best of Its N antecedents. 

 

Therefore, on the right in top of the macro ‘Path min /z/i ' leaves, to every iteration of the process, the metrics (according to /i) of the best antecedents of every state and on the right below, the corresponding states, according to /i also. 

The vector of the metrics accumulated Min. is put up to date with the metrics minimum, for the next iteration. The lattice is also he put to jour : one baffles it while injecting for the last iteration the best antecedents of the N^LS better states. 

It is then time to look for the minimum metrics state (among the N^LS better states) and to carry up the lattice to get Its V-ème antecedent, that will be the symbol having the strongest probability of have been given out has V time - symbol, according to the algorithm of Viterbi. 

It is the role of the macro ‘Remonte back up Path /i/co' :

 

Carry up Path /i/co

 

In top the indication of the minimum metrics arrives, on the left the lattice according to the variable /is and /cos. The principle is the suivant :

One looks at the lattice to the first column and to the line corresponding to the minimum metrics. One gets the indication of the best previous state the current state. 

One looks then at the lattice to the second column and to the line corresponding to the indication gotten to the previous iteration, and one carries up the whole lattice thus. 

 

For that to make, one constructs a vector of indications of 0 in V-1, to cut the matrix in the increasing column sense (of the most recent states to the oldest), and to every cut of line, one cuts the corresponding column with the indication of the best state of the previous column (for the initialization of the process, one takes like indication of cut the indication of the minimum metrics (boundary-mark of the top)). 

 

Leaves the likeliest path on the right therefore having been followed to arrive to the state whose indication is communicated on the boundary-mark of the top, neat according to the variable /z, and below fate the last state of this state set. To get the valued symbol, one extracts of the state indication the last indication of symbol, that one converts in symbol with the macro ‘Coupe /sb '. 

 

5.2        The generators of metrics

5.2.1       The euclidian metrics

They are calculated by the macro " Metrics Euclide ": 

In top the alphabet  arrives: the list of the symbols capable to be given out (and decoded therefore), a vector according to the first variable on the facade of the macro (here, the variable /sb). 

Happen to the symbols on the left to which one is going to compare the theoretical output of the channel for all sequences capable to be given out. 

Happen to the impulse answer of the channel of which one wants to calculate the theoretical output below, a vector according to the second variable on the facade of the macro (here, the variable /r) . 

Takes a bundle on the right of which the two first boundary-marks don't pose a particular problem. The boundary-mark of the low of the bundle receives a vector according to the third variable on the facade of the macro (here, the variable /i) . The elements of this vector are the searched metrics.

Either N carves it of the alphabet (the number of different symbols), and L the length of the channel less 1. It is necessary to calculate the output of the channel therefore for the N^(L+1S) different sequences. 

For that to make, one constructs a vector with the indications of 0 in N^(L+1)-1, vector that one decomposes in N basis on L+1 numbers, with the ‘' bit of strong weight on the right. Then, one ‘Coupe ' the alphabet with the vector of the indications decomposed. One has a vector representative then all sequences capable to be given out by the channel specified in the boundary-mark of the low. One ‘Découpe ' this vector in sequences of L+1 length, one does the scalar product of these sequences by the impulse answer of the channel, and one gets our N^(L+1S) theoretical outputs. 

To calculate the actual metrics of branch, one calculates the module squared of the difference enters the output of the channel (boundary-mark of left) and each of the theoretical outputs. 

            

Sn /sb/r/i

Example :

N = 2, L = 2 (8 possible sequences) 

One constructs the vector 0, 1, 2, 3, 4, 5, 6, 7, that one decomposes some 

0, 0, 0,   1, 0, 0,   0, 1, 0,   1, 1, 0,   0, 0, 1,   1, 0, 1,   0, 1, 1,   1, 1, 1,,,. 

Let's take for example (0.9, 0,3, 0.1) as impulse answer and (-1, 1) as alphabet. 

Our vector, once transformed in set of symbols, becomes

-1, -1, -1,   1, -1, -1,   -1, 1, -1,  ... ,   -1, 1, 1,   1, 1, 1,.

One does the scalar product of every sequence of 3 symbols by the impulse answer and one gets the theoretical outputs

-1.3, 0.5, -0.7, 1.1, -1.1, 0.7, -0.5, 1.3,. 

 

To every element arriving on the boundary-mark of left is going to correspond a vector of metrics (according to the variable 3), that will be composed of the module squared of the difference between the element in question and each of the theoretical outputs. 

 

5.2.2       The Hamming metrics

 

They are calculated by the macro " Metrics Hamming /t/co/li/i/sb ": 

 

In top the bundle arrives descended of " Code /co/li ", the macro defining the code convolutif. The boundary-mark of the top of the bundle gives the size of the symbols in entry of the codeur, the boundary-mark of the low the matrix serving to the actual coding, ordered according to the variables 2 and 3 (ici , the variable /cos and /lis). 

Happen to the train of bits that one wants to compare to the output of the codeur for all sequences capable to be given out on the left. This vector is ordered according to the variable 1 (here, the variable /t). 

On the right fate the same bundle that for the ‘macro Metric Euclide 'S. 

The first boundary-mark of the output faisceau  gives the alphabet, that means the active indications of 0 to 2^(le numerator of the rendement)-1. The alphabet is ordered according to the variable 5 on the facade of the macro (here, the variable /sb). 

The boundary-mark of the low of the output bundle gives the metrics of Hamming, that means the number of bits that differs between the last received sequence on the boundary-mark of left and each of the theoretical outputs of the codeur. This vector is oriented on the variable 4 on the facade of the macro (here, the variable /i). 

            

Let's take the example of the code convolutif suivant : 

                         Output½. 

One replaces every bit by two bits, the first being the sum modulo 2 of the last bit (the replaced bit) and of the before next-to-last bit, the second being the sum modulo 2 of the last bit, the next to last bit, and the before next-to-last bit. 

This code is represented like suit dans the Code/co/li " macro ": 

 

 

The macro ‘Codeur ' proceeds like suit : to every slot of the matrix defining the code, one makes correspond a copy of the entry signal, identical for the first column, retarded of a sample for the second column, and so forth. Of each of these copies (that means for every slot of the matrix), one extracts the bit indicated in the matrix of departure (0 = one doesn't take a bit counts some, 1 = one takes the weak weight bit counts some,...). Then, one makes the sum modulo 2 (or exclusive, ‘XOR ') of the columns between them. Then, one has as many signals as of bits in the symbol in output of the codeur. To gather these copies is sufficient while taking the bits by turns in each of them, and one gets our coded signal. 

 

Generate Sequence /i/r/co

 

The ‘macro Metric Hamming 'S, all as the ‘macro Metric Euclide 'S, must test all possible sequences. In the same way, one constructs a vector of indications, that one decomposes in ‘basis numbers it of ' symbols (that means 2^(le numerator of the output)) on a number of numbers equal to the length of constraint of the code. One passes these sequences in the codeur, one takes the set of bits corresponding to the last symbol of output, and this for all calculated sequences. One has then all left possible of the codeur.

One cuts the train of bits received in sequences of equal length to the denominator of the output (the size of a symbol in output of the codeur), and one counts the number of difference bits in relation to each of the outputs calculées : the metrics of branch are equal to this number of bits.