                                    Scope

The RADIOSIM software can be used by engineers specialists in:

    - radio links,
    - satellite telecommunication,
    - broadcasting,
    - mobile telecommunication,
    - etc...

It computes the performances of any transmission chain, digital or analog,
by simulating every component of the block-diagram (for instance modulator,
filter, delay line, non-linear amplifier, etc.) by a preprogrammed "module".

The user can put modules in series or in parallel (by means of files
memorising the signal), and modify module parameters according to his
application.



                         Calculation principle, FFT

The signal is held by two arrays, of N samples each, A() for the
real part and B() for the imaginary part.
The signal is represented in time domain or in frequency domain according to
the current module characteristics:

   - Filter                     : Frequency
   - Non-linear amplifier       : Time
   - Delay line                 : Frequency (the reason will be seen later)
   - etc.
Passage from one representation to the other is done by a FFT (Fast Fourier
Transform), by means of a peculiar module to which the user do not have a
direct access: Each module, according to its needs, controls this transform,
signalled at the up-right part of the screen by indication F-T or T-F.

The same couple of arrays A() and B() contains, in turn, both
representations.
The advantage of the FFT algorithm, versus a classical Fourier transform, is
computation speed.
The computing time varies as N Log2(N), N being the number of samples while,
in case of a Fourier transform of a periodic but unsampled temporal signal
(non-periodic frequency representation), the computing time varies as N^2.

On the other hand, an drawback of the FFT algorithm is that both signal
representations must be sampled, and then both are periodic.

In spite of the symmetry of time and frequency properties of the mathematical
model, the above drawback has not the same importance in practical
applications. As a matter of fact, the different telecommunication services
(Broadcast, fixed service, mobile service, etc.), and their different
channels are shared in frequency domain, not in time domain.
Therefore, a given application is always band-limited. Even if, at some point
of the transmitting chain, a transversal filter is used, comprising delay
lines, so:
  - with a Finite Impulse Response (FIR),
  - with a periodic, and therefore un-limited frequency characteristic,
the chain comprises certainly an other filter, bandwidth limited, to avoid
interference to and from adjacent channels: the last filter will lengthen
the impulse response considerably.


For the user, the periodic structure of the temporal signal is seldom
constraining. Most of test signals (pseudo-random sequences in digital
transmission, TV test signals in analog transmission) are naturally
periodic.

The constraint is more strong in frequency domain:
The user must be sure (the "Graphics" module is useful for this purpose)
that the SIGNAL SPECTRAL DENSITY IS SUFFICIENTLY ATTENUATED at frame edges
in order that the results obtained in the studied bandwidth are not impaired
by a folding spectrum effect.

See Users'guide chapter 8 for more comments and details about the software
principle.





                               Notations



Ut       time unit,      for instance 1D-09 for 1 ns
Uf       frequency unit, for instance 1D+06 for 1 MHz
N        number of signal samples (size of arrays A() and B() )
dT       time difference      between two following samples
dF       frequency difference between two following samples
Ns       number of symbols in temporal frame
         = number of samples in Nyquist (RF) bandwidth
NechSymb number of samples in a temporal symbol = N / Ns
T        symbol length = NechSymb * dT
NNiv     number of modulation levels (2^k), on one carrier axis
NbitAxe  number of bits per carrier axis = Log2(NNiv)

         It is desirable to learn by heart these ten notations.
         They are employed in the software's dialogue zones.


                          FFT properties and use

N * dT * dF = 1 because, the temporal signal being periodic with N * dT
period, its spectrum contains rays separated by dF = 1 / (N * dT).

The FFT algorithm used is so that the integral of the square of the signal
module is the same in both domains:

                (A(i)^2+B(i)^2) * dT =  (A(i)^2+B(i)^2) * dF
                  time domain              frequency domain

In this software, the ZERO dB REFERENCE LEVEL is defined as the level of a
temporal signal for which A(i)^2+B(i)^2 = 1 (see chapters TWT, Digital
modulator and Bit Error Rate of this notice).

If the level of an unmodulated signal is 0 dB, the modules of the N samples
in time domain equal one, and its spectrum reduces to a unique sample, the
square of module of which is N * dT / dF = 1 / dF^2.


The user chooses first the number of samples N.

When increasing N,

   - arrays need more RAM memory,
   - the computing time increases, almost proportionately,
   - the accuracy of results improves, if one increases both:
      - Ns, number of samples in a given bandwidth,
      - NechSymb, number of samples in a given time interval.
        (see Notations, above in this notice).

Only Ns is set by the user, in the first module of the canal, generally a
digital modulator. The software computes NechSymb by dividing N by Ns.

See the two chapters of this Notice : "Choice of N and of the program" and
"Choice of Ns".




                      Choice of N and of the program

N must be a power of two, 2^K, K being an integer.
Two different FFT algorithms are used, according as K is even or odd, in
a way transparent to the user.

The even K algorithm is faster, so that a calculation with 4096 samples
(K = 12) is not much longer than with 2048 samples (K = 11).
Two executable programs are available:

   - RS.EXE, most usually used. Values of N from 32 to 8192 are allowed in
     screen #1.
     At the beginning of a session, it is better to choose a small N and to
     make a few fast passages, progressively improving the structure of the
     canal, and parameter values.
     More often, a small value such as N = 1024 gives a sufficient accuracy
     to do so.
     Moreover, experience shows that one has a trend to fill too quickly
     the entry fields: a small computing time allows to correct errors
     quickly.


     A high value of N such as 4096 must be used only at the end of a session
     to finalize and save the final results.

     At screen #1 is also proposed the "Arrays/Files" choice.

     With the "Files" option, in order to save RAM memory, some arrays are
     not dimensioned, and the corresponding calculation is performed, more
     slowly, using saving techniques on a real or virtual disk.
     For example, only arrays A() and B() remain dimensioned to N instead
     of four with the "Arrays" option: A() et B() plus Pre() and Pim(),
     holding the real and imaginary parts of the transfer function of filters.

     For RS.EXE, it is better to take the "Arrays" option which allows to
     use all the software features, in peculiar, visualisation of the transfer
     function of filters.



   - RS16K.EXE
     This program allows FFT with 16384 points, with the same accuracy that
     RS.EXE (8 bytes double precision floating point variables), but
     "Arrays" option is mandatory if N = 16384.

     Memory occupation is maximum, as for RS.EXE and N = 8192, because
     in both cases the size of arrays is 256 Ko:
     - 4 x  8192 x 8 for    RS.EXE
     - 2 x 16384 x 8 for RS16K.EXE
                    #                     memory size, in bytes

     - two or four arrays                         262144
     - variables and auxiliary arrays          #   20000
     - RS.EXE or RS16K.EXE program             #  300000
     - resident program for screen copy        #   30000
     - DOS (except version 5)                  #   60000
                                               --------
     - Total (approximate)                     #  672144
Total is near the maximal addressing capacity of DOS: 5  2^17 = 655.360 bytes.


In order to fully use the maximum capacity of RADIOSIM (RS.EXE N = 8192,
option "Arrays", and RS16.EXE, option "Files"), the available memory
displayed on screen #0 must be near 300,000 bytes. Except if the memory size
of your computer is much smaller than 640 Ko, or if TSR resident programs
are too numerous, it is likely that displayed available memory will be
larger than 300,000 bytes.

Moreover, RS16K.EXE is compiled using overlays, this means that only parts of
the file are loaded in memory, in turn, leading to a small increase of
calculation time, but negligible in case of a hard disk, and an increase of
available memory of about 50 Ko.

In any case, the program calculates the available memory at the moment N is
entered at the keyboard, and displays an error message if the given value is
too large.











On computers fitted with extended or expanded memory, PC AT 386 or 486
(or on PC AT 286 and PC XT 8086/8088 equipped with an add-on memory
card), the utility program RSXM.EXE allows to use a larger number of samples,
only limited by the memory size.
See more details in User's guide.








                                Choice of Ns

The choice of Ns comes after the choice of N. As N, Ns must be a power of two
Ns = 2^K, K being an integer.
Recall:
   - Smaller is Ns, better the temporal signal is represented,
   - Higher  is Ns, better the signal spectrum is represented.
Without any other indication, set a value near N/8.

The choice of Ns must take into account the two following constraints:

   - The transfer function of filters must be represented by samples
     sufficiently near in frequency. Graphics are drawn by linking samples
     by straight lines: their appearance must not be too angular.
     So much the edges of a filter are sharp, so high must be the number of
     samples in the bandwidth.
     If necessary, a line of the "Graphics" menu allows to visualize samples
     by vertical lines.
   - Ns must be sufficiently small in order that the signal spectrum
     vanishes at the frequency frame edges.
     In digital modulation, and if the canal is linear, as transfer function
     of filters is generally null beyond 1/T from central frequency, Ns may
     reach N/2 (two samples per symbol, c.f. first Nyquist criterion).
     The temporal signal seems angular, samples are spaced, but their values
     are exact. If necessary, intermediate samples can be obtained by a temporal
     shift (module "Shift").

     If the canal is non-linear, the spectrum widens and Ns must be reduced.
     As a practical rule, the number of samples per symbol N/Ns can be set
     at four or eight.

     Ns must also be reduced if interfering channels are simulated, at
     frequencies shifted from the canal frequency.
     As a practical rule, the spectral density must decrease by about 10 dB
     at frame edges. More precisely, it is possible to estimate the
     erroneous interference due to spectrum folding by extending the spectral
     density curve until the signal bandwidth (see figure in User's guide
     section 4.2). In digital modulation, this interference must be as small
     as the number of modulation states is high.

                                   Files

RADIOSIM employs the following types of files:

 - Binary files:
     - Files with a .SIG extension save the signal samples in arrays A() and
       B(), as explained in description of module "Stock",
     - the NBW file is used for calculating the equivalent noise bandwidth of
       the receiver (c.f. module "Computed filter").
   Their size is proportional to N, and is generally high. They are written
   and read during the computation process.
 - ASCII files, that can be edited (write, read or modify) with a word
   processor or, preferably, with the ad hoc "FIL_TWT.EXE" utility program.
   They are differentiated by their extension:
     - Extension .CAN : List of modules of a given canal used in a given
       session, and values of their parameters. At the next session, reading
       the file avoids to type again all entries, that would be tedious and
       cause of errors.
     - Extension .TWT : Non-linear characteristic of an amplifier or any
       other quadripole.
     - Extension .GAB : Template of filtering function, spectral density.
       rise-time, etc. These files are called by the "Graphics" module, and
       allow to superimpose a template to a displayed curve.
     - Extension .FIL : Filters entered point by point (frequency by
       frequency), in amplitude and phase.
     - Extension .PER : Interference by adjacent channels.
     - Extension .TF  : Characteristics of a transversal filter.
     - Extension .VAL : This extension is reserved to the unique file RS.VAL
       written and read by RS.EXE without direct intervention of the user.
       This file memorises the last parameters of a given session written in
       screen #1 (number of samples of FFT, units, etc.), and propose them as
       default at the next session.
     - Extension .TXT and .HLP : Notice and Help pages.

RADIOSIM make use of two repertories:
 - repertory of files to be kept, named STOCK, which is a sub-repertory
   of the repertory from which RS.EXE is called.
 - repertory of temporary files. If "extended" or "expanded" memory is
   available, it is a good idea to place this repertory on a virtual disk.

The user must enter the name of the last repertory at screen #1.
If the user do not enter any name, the repertory of temporary files is the
repertory from which RS.EXE is called.

The NBW file and .SIG files are placed in the repertory of temporary files.

The .VAL, .TXT and .HLP files are placed in the repertory from which RS.EXE
is called.

The other ASCII files are placed in the repertory of files to be kept. At
least one file of each extension must be present in this directory.



















                               Utility modules









                                    Stock

This module controls the writing and reading process on binary files used to
save the signal represented by arrays A() and B().

The calculation being done in double precision, a numeric value is
represented by 8 bytes; therefore, the file size is  2 * N * 8 bytes plus
an overhead comprising:
  - a comment ...................................  bytes n   1-256
  - the signal domain, time(T) or frequency (F)..           257
  - parameter  N ................................           258-259
  - parameters Ut ...............................           260-267
  -            Uf ...............................           268-275
  -            dT ...............................           276-283
  -            dF ...............................           284-291
If those five last parameters are not the same, in the file and in the current
session, a warning error message is displayed.

Then, arrays A() and B() fill the file as follows:

  - A(0) ........................................  bytes n 300-307
  - B(0) ........................................           308-315
  - etc.

Eight operations can be done:
  - READ  simple reading, the former arrays being erased,
  - READ+ addition of file and arrays samples, and saving the result in
    the arrays,
  - READ* multiplication of file records by array elements, and writing the
    result in arrays,
  - READ/ as READ*, but the complex number corresponding to file records
    being replaced by its complex conjugate.
  - and the four symmetrical operations, from arrays to file.
If the signal domains are not the same in the file and in the arrays, a FFT
is executed before READ+ and WRITEx operations (x= + * or /).

Warning: the multiplication not being a linear operation, it is not equivalent
to perform it in time domain (f.i. simulation of a mixer) or in frequency
domain: so, fix the domain manually, f.i. by means of a "Edition of arrays"
module inserted in front of the first "WRITE" Stock module.

For the four operations, the input samples can be attenuated and/or rotated
before treatment (this feature is used, for instance, in the calculation of
a Butler matrix).
















                                   Shift

This module shifts the signal A()+jB(), in time or in frequency.

For a frequency shift, the entered shift is rounded to an integer number of
frequency samples, the signal is put in frequency domain (a FFT is executed
automatically, if needed) and a signal shift is done by modulo N permutation
of arrays A() and B().

A signal multiplication by EXP(2TdF) in the time domain would allow any
shift dF, but the periodic and unlimited nature of the temporal signal would
give rise to a signal discontinuity, source of error.

It is not the case for a temporal shift, because the signal band-limiting
(see "Principle of calculation, FFT transform"). The shift is executed in
frequency domain, multiplying the signal by EXP(-2FdT), without any
rounding.



                          Modif. frame/modulation

This module modifies the signal, in time domain.
First, each signal component real A() and/or imaginary B() is added a
specified constant value.
Example of application: transformation of a -1 +1 sequence into a 0 +1
sequence (simulation of a FSK or AM modulation with envelope detection)"

Then, letting:
   Ra and Rb be the multiplicative factors specified for A() and B(),
   Phia and Phib be the rotations          specified for A() and B(),
A(i) and B(i) become respectively:
   A(i) Ra cos Phia - B(i) Rb sin Phib
   B(i) Rb cos Phib + A(i) Ra sin Phia
Example of application: simulation of quadrature defectiveness in a modem.

Note: If Ra=Rb=1 and Phia=Phib, the whole signal is rotated, not leading to
      any loss of quality in digital modulation.


                             Edition of arrays

This module displays on screen the element values of arrays A() and B()
representing the signal, or Pre() and Pim() representing the filter(s).
It is also possible to modify the element values, but interpretation of the
results becomes hazardous!

If the signal is to be displayed in frequency domain, all samples are first
multiplied by dF to get an order of magnitude near one (see section "FFT
properties and use" in this notice.

The display can be made, normally, in rectangular co-ordinates, or in polar
co-ordinates, the module being given either in linear or logarithmic units.

Apart editing modifications and change of signal domain, both arrays are
restored in their initial state at the module output.

Either the transfer function or the impulse response of filters can be edited.
At module output, the transfer function is always restored in arrays.

This module allows to fix manually the signal domain, if needed (f.i.
some processes of stocking on file).





Role of keys:

- RIGHT and LEFT         edition of first or second array,
- HIGH, PGUP, LOW PGDN   motion versus beginning or end of arrays,
- SPACE                  edition of an entry field,
- figure between 2 and 9 modification of display accuracy
- ENTER                  end






                                  Graphics

This large module displays on the screen the curves representing the signal
or, if "Files" option has been chosen at screen #1, the transfer function or
impulse response of upstream filter(s).
It may be inserted several times in the canal, with different parameters,
but may not be the first module.

The screen comprises:
- a central window containing both graphics and alphanumeric characters,
- an external frame containing only alphanumeric characters.

An "edition" mode allows to modify by hand all but graphics, to improve
aesthetic and to add comments.

The module parameters can be tuned during program execution, hitting keys:

 - M as "Modifications" changes essential graphic parameters as mode
   ("signal" or "filter"), co-ordinate type, signal domain, etc.

   In "signal" mode, and only for "time" domain, two other options are
   offered, considered as co-ordinates:
     - constellation of signal samples # 0 + k NechSymb in the Fresnel plan,
     - signal path in the Fresnel plan, for all temporal samples.
   Sample on the middle of screen is #N/2 when abscissas represent time,
   and #0 when abscissas represent frequency.

   The user can choose rectangular co-ordinates, or polar co-ordinates with
   module represented either in linear units or in logarithmic units.

 - P as "Presentation" modifies secondary parameters as the central window
   dimensions, position and quotes of graduations (default graduations are
   drawn automatically at the beginning, as a function of co-ordinate type),
   template display, smoothing bandwidth, etc.

   Smoothing bandwidth
   -------------------
   For "signal" mode, "frequency" domain and polar co-ordinates (display of
   power spectral density), the user can specify a smoothing bandwidth
   containing an odd number of samples, to smooth the curve.
   Moreover, in case of logarithmic units, if asked, graduations give
   directly the difference between power in the smoothing bandwidth and 0 dB
   reference power (monocarrier saturation power of a TWT, nominal output
   power of a digital modulator, nominal input power of a coherent
   demodulator).

Watch the Help page of 'Graphics' module, which gives more details on the
action of keyboard keys.












                              Spectral density

This module computes the spectral power density at a given point of the
canal. Powers of signal samples A(i)^2+B(i)^2 are summed, in frequency
domain, in a specified bandwidth.

Sixteen frequencies can be specified, defined by their distance from the
central frequency.

These distances, as well as the measurement bandwidth, are rounded to an
integer number of samples, the user being prompted by a message on the
screen. Correction of spectral density due to rounding the measurement
bandwidth is done automatically.

The measurement bandwidth can be specified in a unit different from the
current unit, in order to comply with the common practice (in satellite
transmission for instance, it is usual to quote the spectral densities in
dBW/4kHz).
As for "Graphics" module, parameters can be modified during computation
(hit 'm' on the menu).
                                    Loop

This module must always be placed at the canal end.

Several passages in the canal are executed,

   - one parameter of one module is incremented. The parameter is identified
     by the module number in the canal (indicated at screen #3) and the
     parameter number (from 1 to 10 max., from top to bottom of screen),
   - the corresponding variations are displayed for one, two or three
     "results" obtained in modules downstream the variable parameter module,
     specified in the same way.

During parameters entries, be cautious to the separating comma.

Modules giving a result are signalled by a "*" leading character on screen #3
(hit "R" to identify the results).

Not all modules give a result.

A pause can be asked, with a specified duration, to watch intermediate
results.

The "LOOP" module uses a file named "LOOP", in the repertory of temporary
files, to save the intermediate results. This file can help to recover
computed data, f.i. in case of faulty operation.

Several computations can also be performed without changing any parameter.
At computation end, the arithmetic mean of results is displayed (case of
a canal using a gaussian noise, a random sequence, etc.).

Computation time can be long: Caution: if a "LOOP" module is used, stopping
the program by Ctrl c always return to DOS.







                                   Memory



The "Memory" module displays the remaining free memory in DGROUP (see BASIC
manual) and for dynamic arrays (far heap).

Note: All RADIOSIM arrays are dynamic, except variable length strings arrays.












                             Filter initiation

This module is useful only if the "TOTAL" option has been chosen in screen
#1.

This option decides, when displaying filter transfer function or impulse
response by the "Graphics" module,

- to display the set of filters located upstream, until the beginning of the
  canal, or until an "Filter initiation" module,
- and not (option "LAST") the last upstream filter.

This module sets all the elements of array Pre() to 1, and sets the elements
of array Pim() to 0.






                               Practical hints





This chapter deals with the following items (PGDN key)

      Entry screens
      Name of keyboard keys
      The four screens 0, 1, 2 and 3
      Prompt on the up-right part of the screen
      NUM LOCK key
      Keyboard repetition feature
      Screen copies





Entry screens
-------------
Some principles common to all RADIOSIM entry screens, including one
or several entry fields, are given here-under:

Have a good look to the last screen line: it gives indications that will
help you to answer.
If this line displays "Help", hitting "h" or "H" will bring additional
indications to be displayed. After reading them, entry screen will recover
as it was previously.
For some screens, Help is got by hitting function key F1.

An entry line is validated by hitting either ENTER or DOWN. Doing so, the
cursor goes to the next line.

At the last line of the entry screen,
- DOWN returns to the first line,
- the 25th line says how to validate the whole screen.

It is not possible to go back to the previous line by hitting the UP key,
you must go across the bottom line by using DOWN key. As against this
constraint, it is more easy to program entry interdictions depending upon
previous parameters.

Follow a table giving the name used in RADIOSIM to designate the keyboard keys.















Name of keyboard keys
---------------------
RADIOSIM name    Key description
-------------    ---------------
  DOWN             Down arrow
  UP               Up arrow
  PGUP             PGUP
  PGDN             PGDN
  LEFT             Left arrow
  RIGHT            Right arrow
  INS              INS key
  DEL              DEL key
  END              END key
  ENTER            ENTER or RETURN
  ESC              Escape key
  TAB              tabulation key
  HOME             HOME key
  PRT SCRN         PRT SCRN
  NUM LOCK         NUM LOCK
  F1 F2 F3 F4      Function keys
The four screens
----------------






        A RADIOSIM session always begins by four screens:

        Screen #0 appears only at the beginning of a session.

        Screens #1, #2 and #3 are of hierarchical nature, with decreasing
        hierarchy. The user goes from one of these screens to the other by
        means of keys PGDN and PGUP.





Screen #0
---------


Screen #0 gives some warnings of general kind.

On the left-up side, appears the memory available before dimensioning the
main arrays A(), B(), Pre() and Pim(). It must be of the order of 300000
bytes. If less, let us verify that the RAM base memory size of your computer
is 640 K, that resident programs are not too much, etc.

A Help page tells how to modify the used colours, for colour or monochrome
monitors.

During a same session, it is usual to do several "passages" across the canal
(several computations) with parameters values somewhat different:
Screen #0 appears only at the first passage.



Screen #1
---------
Screen #1 allows to set nine parameters:

1) Pause between modules: If you are a beginner in RADIOSIM, it is better to
   stop the calculation after every module, to read displayed indications.
   During calculation, you can activate or de-activate this pause hitting
   Ctrl s (hit key "Ctrl" then, without releasing this first key, hit
   key "s".

2) The Arrays/Files option is described in section  "Choice of N and of the
   program". Choose "T" preferably, to be able to visualize the filter
   characteristics.

3) According to the choice "last"/"total" (and if the above option is "A"),
   the transfer function or impulse response displayed by a "Graphics" module
   will be relative to:
   - "last" the last upstream filter,
   - "total" the cascade of all upstream filters, until canal beginning or
     a "Filter initiation" module.

4) Unit of time for keyboard entries and screen displays.

5) Unit of frequency for keyboard entries and screen displays.

6) DOS path of temporary files repertory.

   RADIOSIM creates some files specific of a session, that you must erase
   periodically in order to avoid an excessive crowding of disk or diskettes.
   These files can be placed in any repertory but, if "Extended" or "Expanded"
   memory is available, it is better to create a virtual disk holding this
   repertory. Calculation will be speeded, and erasing will be automatic each
   time the computer is switched off.
   If you indicate nothing, these files will be placed in the repertory
   from which RS.EXE has been invoked.
   If this repertory is a sub-repertory of the repertory from which RS.EXE
   has been invoked (recommended procedure), the name of the former may be
   omitted.
   Always end by "\".
   Example : Name of launching repertory      C:\RADIOSIM
   Name of repertory of temporary files       C:\RADIOSIM\PROV
   Indication to be entered                   C:\RADIOSIM\PROV\ or PROV\

7) Number of samples : 32 64 128 256 512 1024 2048 4096 or 8192.

8) You will notice soon that it is very useful, to resolve a new problem,
   to start from an analogous one, saved in a previous "canal".
   About 27 typical canals (.CAN extension files) are available in the
   original STOCK repertory.
   You can:
   - get the number and the title of these canals by entering  "999",
   - read a detailed comment ("V" followed by the number),
   - erase some canals ("K" followed by the number).
   - load a canal ("L" followed by the number).
   You can also enter nothing, and build your canal from zero in following
   screen (screen #2).
   RADIOSIM loads a new .CAN file only if a new non-void name has been
   entered.




9) Normally, a RADIOSIM session is quitted only at this line, hitting "q" or
   "Q" (quit). It is better to proceed so, because screen #1 parameters
   are saved in the RS.VAL file, in the repertory from which RADIOSIM has
   been invoked. These parameters will be automatically loaded at the next
   session.
   You can also quit the program at any time by hitting Ctrl c.
   This procedure is helpful if a too long calculation has been initiated
   by mistake (too high value of N, absence of arithmetic co-processor, etc.)
   and avoids to reinitiate the system by a Alt Ctrl Del sequence.

   After hitting Ctrl c, two options are offered:
   - immediate return to DOS, RS.VAL file and .CAN file being neither
     modified nor saved,
   - calculation continued until the end of the current module, then return to
     screen #1, allowing to pursue the session.



Screen #2
---------
Screen #2 is specific of the canal yet loaded or being built:

Are displayed,
- in the left part of the screen, the list of modules of the current canal,
- in the right part, the list of library modules (modules delivered
  with RADIOSIM or written by the user).
Screen #2 allows to build or modify a canal (see the corresponding Help
screen page).

Particularly, the canal can be saved at this screen ("s" key), writing a title
of one line, and a comment of 24 lines. In order to edit this comment,
RADIOSIM involves a simplified word processor, the rules of which are also
described in a Help screen page.

Hitting "s" allows also to edit the comment, without saving, because
saving process can be halted at the end of the comment edition.


Screen #3
---------
Screen #3 (one screen #3 per canal module) allows to edit the module
parameters of the canal under study. The modules are switched by means of
LEFT and RIGHT arrows.
















Prompt on the up-right part of the screen
-----------------------------------------
During computation, the signal domain, frequency or time, is displayed.
During a change of domain by a FFT, the indication F-T or T-F appears

NUM LOCK and CAPS LOCK keys
---------------------------
It is better to activate NUM LOCK . Entering numeric figures is easier.

Keyboard repetition feature
---------------------------
The keyboard repetition has been deleted in some cases, because a too long
action on a key giving one or several repetitions could, for instance,
bring the result displayed by the last module to be lost.

As a counterpart, you must wait the display of some messages, for instance
"Hit any key" before using the keyboard.



Screen copies
-------------
When you are asked to hit a key, after a computation phase, you can transfer
the screen contents to a printer hitting the PRT SCRN key.

If the screen contents is only text (table of letters and figures), no
previous action is needed.

If the screen contain graphics, an ad hoc resident program must be loaded
before RADIOSIM (before hitting RS + ENTER):
-  for instance GRAPHICS.COM from DOS (specify the type of printer, see
   DOS manual),
-  or a specialized software, for instance PIZZAZ,
-  preferably, the utility file of your favourite word processor (GRAB.COM
   for WORDPERFECT, SCR.EXE for MANUSCRIPT, CAPTURE.COM for WORD, etc.) which
   creates a file holding the screen copy, that you will use later to insert
   a figure in your reports.













                              Electrical modules








                           Digital modulator

Two families of modulation are dealt with in this module:

   - Phase modulations (PM) with k phases (k = 2, 4, 8, 16 etc.),
   - Amplitude modulations (AM and QAM) with NNiv (2, 4, 6, 8, 12...)
     symmetrical levels, on one carrier or two quadrature carriers.

2PSK and 4PSK modulations belong to both families

Two kinds of phase modulations are treated by RADIOSIM:

   - the classical phase-shift keying modulation (kPSK), and its variant
     k_2kPSK obtained by a /k signal rotation at every even symbol.
     In this last case, there is always a phase variation between a symbol
     and the next one, and this variation never equals .
   - a type of constant envelope modulation, only phase being changed
     between two successive symbols, with a linear or sinusoidal time
     variation. For such a modulation, the phase variation between the
     characteristic instants of two symbols is n/k, n being odd and varying
     from 1 to k-1. There is always a phase variation from a symbol to the
     next one. For a linear variation and k=2, Minimum Phase Modulation (MSK)
     is obtained.

   For k_2kPSK and above constant envelope modulations, the number of points
   of the constellation is 2k instead of k.

For QAM modulations, it is possible to shift symbol sequences A() and B() by
half a symbol. For NNiv = 2, Offset Quadrature Phase-shift Keying (OQPSK) is
obtained.
The case of 32QAM, 128 QAM, etc. is also dealt with (number of levels per
modulation axis multiple of three). Constellation corners are truncated.

1) AM, QAM kPSK and k_2kPSK modulations
   ------------------------------------
The module generates a sequence of Ns binary signals 1, pseudo-random or
random. To build a signal with k levels or phases, the module performs a
weighted addition of sequences produced by Ns/2/NbitAxe shifts of the initial
sequence.

Dirac pulses are put in the middle of symbols, with areas given by the
above sequence, every NechSymb samples of array A().

In case of two quadrature carriers modulation, the same signal shifted by
N/2 is put in array B().

In case of PSK modulations, symbols A()+jB() are on a circle, with k phases
distant from 2/k.

One normalize to:

   NechSymb the maximal level, in case of single carrier modulation,
   NechSymb/2 the maximal level, in case of two quadrature carriers
   modulation,
   NechSymb the envelope level in case of kPSK or k_2kPSK modulations.

As a consequence, after band-limiting the signal in a RF bandwidth less than
2/T, the envelope SQR [A(i)^2 + B(i)^2] equals 1 (say one Volt) without
modulation and, if filtering is intersymbol free, at the optimum sampling
instants.

The user must control the level along the transmitting chain, peculiarly
for a correct behaviour of the non-linear amplifier module (TWT) and "Bit
Error Rate" module.

The spectral density, A(i)^2 + B(i)^2 in frequency domain integrated on
several samples, is flat.
If needed, a sinX/X spectrum (X =  f T) can be specified, in order to take
into account the rectangular shape of digital signals.
An unmodulated signal can also be specified, with unity envelope.
The signal spectrum then consists in a single line at the zero (central)
frequency.
Other choices: isolated pulse, and step pulse.
In every case, if the canal filters are intersymbol free, and if the
receiving filter is matched (if the image conjugate of its transfer function
equals the Fourier transform of a receive pulse), modules "Coherent
demodulation" and "Bit Error Rate" give a null degradation versus theory.



2) Constant envelope PM modulations
   --------------------------------
The signal is settled at every symbol as above, but each intermediate
sample is calculated by linear or sinusoidal interpolation (for PSK and QAM,
interpolation was done by filtering the signal).
The spectrum is neither flat, nor in sinX/X. It is not necessary to use a
transmitting filter to limit interference from/to adjacent channels.

Modules "Coherent demodulation" and "Bit Error Rate" indicate always
a non-zero degradation. Dimensioning the receive filter leads only to a
compromise between:

   - degradation due to intersymbol distortion, if bandwidth is too small,
   - degradation due to thermal noise if bandwidth is too large.

The "Digital modulator" module must be placed at the beginning of the canal.
It sets the sampling parameters dT and dF.

Read User's guide for more details.



Note: The output signal of this module can also be viewed as a base band
      signal (c.f. section "Fresnel plan" of User's guide). Hence, a FSK
      modulation (f.i. GMSK) can be simulated by tuning this module in "AM"
      and having it followed by a "Frequency modulator" module.














                           Coherent demodulation

The first task of this module consists in re-treiving informations saved in
the file "NBW" by the various filtering modules of the receiver, and in
calculating the equivalent noise bandwidth.
To speed calculation, the user can fix manually the noise bandwidth, when it
is known in advance (for instance  raised cosine filter).

The theoretical C/N corresponding to the BER entered by the user is displayed
(C is the peak modulation power, except for truncated QAM: in this case, C
is the power corresponding to a corner of the constellation square, and C/N
for peak power is displayed in parenthesis).

Then, the signal is time-shifted with a time lead equal to the opposite of
the sum of group delays of filters (transmission and reception), at
central frequency. Doing so, temporal samples n 0 + k NechSymb constitute
a first approximation of optimum sampling instants.

A) Then, two sets of Ns complex numbers are compared:
   - the set constituted by symbols transmitted by "Digital modulator"
     module, saved beforehand,
   - the set constituted by the Ns elements of arrays A() and B() with
   number 0 + k NechSymb, after ad hoc rotation and amplification.
   The optimum rotation/amplification couple is find using an algorithm
   minimising the RMS (root mean square) difference between values of the
   two above sets.
   This first operation eliminates the ambiguity modulo /2, /4, /8 etc.
   of the carrier phase.

B) Then a fine temporal shift of the signal is worked out, in order to lower
   as much as possible the above RMS difference. The optimum temporal shift
   is got by interpolating between adjacent temporal samples.
   Such a method is effective only if NechSymb is larger than 2.

C) Operation A is worked out again.

The advantage of this first method is the computation speed.

A second method can be chosen, in which BER is optimised instead of RMS
error in operations B and C. The result is more accurate, at the expanse of
a longer calculation time.

For checking purpose, the user can fix manually the values of gain, rotation
and temporal shift.

At last, BER is computed from the probability that a gaussian noise N present
at module input exceed a given threshold (Erfc function), for a C/N equal to
the theoretical C/N displayed above, but here, C is the reference level.
The signal is rotated in the best way, but its level remains unchanged. So,
theoretical BER is only obtained if the peak modulation power at module input
equals the reference power, and if there is neither intersymbol interference,
nor interferers.

This BER depends strongly on the signal level at the module input. The
value of the optimum amplification calculated by this module is transmitted
to the "Bit Error Rate" module, if present downstream. It represents the
part of C/N degradation due to signal level.

At module output, the signal is phase-shifted by the optimum rotation
previously computed, in order to display the signal constellation, eye
diagrams, etc., but signal level is not changed.

In satellite transmission, this module simulates the down-link noise,
up-link noise being simulated by a previous "Gaussian noise" module.

This module can also be used in case of FSK modulation: the "Digital
modulator" module is tuned in "AM", acting as a frame generator in baseband,
it drives a "FM modulator" module which modifies the parameters of modulation
recognition Mo$ and Symb%().

A rather abnormal use of this module is done in the prerecorded canal
FSKQUAD.CAN: simulation of a two frequencies FSK with quadratic detection.
In this case, detection not being coherent, the noise must be directly
simulated by a "Gaussian noise" module and not by function Erfc. You must
enter 999 at the third line of menu, this module only counts errors present
at module input, one by one, and computed BER is practically limited to high
values, such as 10^-2.






In this module, N represents the rms noise value at the demodulator input,
except at the bottom line, only displayed if the computed or specified
equivalent noise bandwidth is different from the Nyquist bandwidth:
Then, N represents the rms noise value integrated in the Nyquist bandwidth.













                               Bit Error Rate


This module must be preceded by a "Coherent demodulation" module.

As the former module, it calls a procedure that, for a given value of the
carrier to noise ratio C/N in the Nyquist bandwidth, calculates the BER
corresponding to the level of each sample by means of the Erfc() function,
on each carrier axis, and calculates the mean value.

Two C/N values are displayed (note the definitions):

- The theoretical C/N corresponding to a given BER, C being the power of a
  peak modulation state: for QAM, one of the four corners of the
  constellation square.
- The computed C/N, C being the reference power and N being the level of a
  gaussian noise supposed to be applied at the input of module "Coherent
  demodulation", simulated by function erfc(), and integrated in the
  Nyquist.

For a given sample, the computed BER is equal to the theoretical BER if its
value equals the value of the transmitted symbol, this last value being
saved in memory.
If it is the case for all samples, the mean BER computed by this module
equals the theoretical BER, and the eye diagram is fully open.

In case of intersymbol distortion or interferences, the mean BER increases.

In case of attenuation, because a TWT output backoff for instance, BER also
increases, very rapidly.

The "Bit Error Rate" module displays two tables, successively:

   - a table, calculated every half dB but displayed every dB, giving the
     calculated BER, from 10^-K1 to 10^-K2, K1 et K2 being entered by the
     user. If K1 and K2 are different, this table is then displayed on a
     graphic form.

   - a table obtained by linear interpolation between the results of the
     former table, giving the degradation (difference between computed and
     theoretical values of C/N, in dB), versus integer values of BER.
     For guidance, the table displays the part of degradation due to the
     mean signal value at sampling points (amplification value used by the
     "Coherent demodulation" module).
     Note: Partial degradations are not additive. Please, read the User'
     guide for an exact definition of the degradation.

The last table can be saved on disk, if asked, to be imported later in any
word processor software.

Warning: if the signal at the input of "Coherent demodulator" module is yet
errored (f.i. previous addition of a gaussian noise), the entered minimum
BER must not be less than the corresponding BER! In such a case, a warning
message is displayed.






                        Differential demodulation


This module computes the BER in PM modulation in case of differential
demodulation, by counting individual errors in presence of a previous
"Gaussian noise" module (function Erfc cannot be used, as in modules
"Coherent demodulator" and "BER").

At module output, in order to display the eye diagram, the product of
A(I)+jB(I) by [A(I0)+jB(I0)] EXP j Phi is put in arrays A() and B(), with:

     I0=I-NechSymb (previous symbol sample),
     Phi= 0 in two phases modulation,
          /4 if NPhase>2,
          plus /NPhase, for any NPhase value, for K-2K, LIN and SINUS
          modulation types.




                                    TWT

This module calls a file which gives, as a function of input level in dB,
the output level in dB and the input/output phase-shift in degrees, for a
sinusoidal input signal.

For a 0 dB input level (saturation of TWT, or 1 dB compression point of a
FET amplifier), the output level is always 0 dB (.707 on each carrier axis).
Input levels are negative (and backoffs are positive) if powers are smaller
than 0 dB.
In the file, the input level must mandatorily be given dB per dB, from -20 dB
to + 10 dB, for instance.

Between the given values of input level, and below the smaller one, the
program interpolates with a quadratic law.
Above the larger input level, the program keeps the file data corresponding
to the maximal input level, and displays a warning message.

An input attenuator A dB allows the user to set the working level.

The module calculates and displays the output backoff -10 log P, P being
the global output power, sum of A(i)^2 + B(i)^2 (arrays being read at the
module output). This power would be equal to 1 in case of amplification of
an unmodulated monocarrier with input level A dB.

This backoff takes into account the mean input signal level, the value of
input attenuator, the modulation type, eventually the adjacent channels,
intermodulation products, etc.












                                   Limiter

This module simulates an envelope limiter acting on modulated carrier.
Warning: in principle, this module must be used in a canal point at which
the signal represents a modulated carrier.
It can be used in a canal point representing a baseband signal, but be
cautious about its meaning.
It works in time domain, and modifies only the signal envelope:
E = [A(i)^2+B(i)^2].
Soft limiter
   Let Limit = 10^(L/20) be the limitation level.
   If E<L at limiter input, the ith sample is not modified.
   If not, output E is given the value of a truncated sine signal.
   If E (input) >> Limit, E (output) tends to  4 Limit /.
   An optional amplification by (- L - 20 Log 4/) can be set in such a way
   that output level tends asymptotically to 0 dB if E >> Limit.
Hard limiter
   If the user enters L = -999, envelope E of output signal is set to 1,
   whatever input value is.

                              Calculated filter

This module simulates a Butterworth, Tchebycheff or anti-Tchebycheff filter
with infinite unloaded Q (no loss) elements.
If a null value is entered as central frequency, one simulates either a
low pass filter or symmetrical band-pass filter.
To simulate a dissymmetrical band-pass filter, simply enter its central
frequency value.
Three options are offered as regard group delay (GD):
   - normal group delay,
   - idem, minus central frequency GD. This recommended option centres the
     impulse response on sample #0, an interesting feature, peculiarly for
     graphics. Signal distortions due to GD variations are not changed.
   - null GD, simulating a perfect equalisation. The used algorithm is then
     different, in order to speed calculation.

As for any other filtering module, filter can be included in the receiver
for calculation of equivalent noise bandwidth. At the first filtering module
to be included, the square of transfer function module is saved in a file
named NBW, in the repertory of temporary files designated at screen #1.
For following filters, each file element is multiplied by the square of
module transfer function.


















                             Raised cosine filter

This module simulates raised cosine (Nyquist) filters which, if canal is
linear, afford a null intersymbol distortion.

Filter parameters are:

   - cut-off frequency, 1/2T if intersymbol-free filter,
   - roll-off coefficient, from 0% (rectangular shape) to 100%,
   - percentage of total roll-off. For intersymbol-free filtering, the sum
     of transmission and reception filter percentages must equal 100.

Group delay is null.







                       Filter defined point per point

This module simulates a real filter, with a measured transfer function.
Transfer function must be given, as a function of frequency,
   - by amplitude, expressed in decibels,
   - and:
      - either by phase, expressed in degrees,
      - or by group delay, expressed in Ut/Uf. In this case, the utility
        program FIL_TWT.EXE converts GD into phase.

Entry of transfer function is preferably made using utility program
FIL_TWT.EXE. This program creates a file with a .FIL extension, called by
this module (see "Files" chapter, in this notice).







                              Gaussian filter



Let us call B the 3 dB bandwidth in baseband (a 2B value must be entered in
the module menu) and let G = LOG (2) / [2 B^2].

The transfer fonction is EXP(- G F^2) = EXP[- 0.5 LOG(2) (F/B)^2].
If F = B, above expression equals 0.707.

The impulse response EXP[-(t)^2/G] is also gaussian.

Note: Writing mathematical equations in ASCII is not easy, and leads to
      ambiguities. Please, refer to User's guide.






                              Whitening filter


Amplitude/frequency characteristic of this filter varies as x/sinx, with
x =  F (T/K).
Generally, this filter is used at the transmission side, just after a
"Digital modulator" module generating rectangular symbols, with sinx/x
shaped spectrum. In this case, K=1.

K can be larger than one, if the x/sinx spectrum to be whitened comes from a
transversal filter sampled with hold, with less than NechSymb samples per
symbol.

Sinx being null for x = , the whitening function is calculated only for
x < 0,9975 , and the last computed value is maintained for larger values
of x.




                             Transversal filter

A transversal filter output sample is obtained by addition to input central
sample a weighted sum of:
-   Nc input signal leading samples,
-   Nc input signal delayed samples.

Nc being the specified number of coefficients, the filter comprises a
central coefficient equal to 1, Nc upstream coefficients and Nc downstream
coefficients.

The same filtering is done on A() and B() signals. There is no coupling from
A() to B() and from B() to A(), as in transversal filters of an
"Auto-adaptative equalizer" module.

The number of samples per symbol Nss must be specified:
The time T/Nss represents,
- the delay between two delay line taps of an analog transversal filter,
- the sampling period in a digital transversal filter.

The coefficients values can come from,

- calculation of a raised cosine filter impulse response, truncated to
   Nc/Nss symbols.
  If Nc = Nss x Ns / 2 is entered, impulse response is not truncated, and
  theoretical performances are obtained.
- an ASCII file.

Varying Nc allows to evaluate the performance degradation due to a too small
number of samples of impulse response.

In both cases, coefficients can be quantized with 2^NbBit equidistant
values, from -1 to +1, NbBit being the specified number of bits.
Varying NbBit allows to evaluate the performance degradation due to a too
rough quantization (digital filter).

The input signal of a reception digital filter, or the output signal of a
transmission digital filter can also be quantized by a "ModuleQuant" module
put, respectively, upstream or downstream of filter.

Transfer function is periodic, with a Nss/T period.

At filter output,
- the filter temporal periodicity is always Tm,
- the filter frequential periodicity remains Fm if the filter is analog, and
  reduces to Fm/(NechSymb/Nss) if the filter is digital because, in the last
  case, only one temporal sample every NechSymb/Nss is present.

If Nss<NechSymb, two complementary filters must be used:

- a first one, before transversal filter, if signal bandwidth is larger than
  Nss/T (sampling theorem).
  In practice, the purpose of this filter is:
  - at the transmit part, to limit the modulator output spectrum at Nss/T,
  - at the receive part, to avoid a perturbation by adjacent channels, if
    present.
- a second one, after the transversal filter, to erase the undesirable signal
  spectrum periods, except if the transversal filter is analog.
  In practice, the purpose of this filter is:
  - at the transmit part, to avoid saturation of the power amplifier and
    overlapping adjacent channel spectrum, if present,
  - at the receive part, to apply to the receiver only the central period of
    the signal spectrum, rebuilding the lacking temporal samples.


The bandwidth of these filters must be:
- sufficiently small to eliminate undesirable spectrum periods,
- sufficiently large not to distort the signal.
The required bandwidth is as large (easier filter implementation) as the
specified number of samples per symbol is large.

In case of a digital transversal filter, a holding sampler can be represented
by an additional sinX/X transfer function, with X = fT/Nss.

If this module is used, the "Arrays" choice at screen #1 is mandatory.





                            Subsidiary filtering

Module coming in complement of other filters, simulating in basebanb (bb) or
in high frequency, after modulation (rf):

   - a linear or quadratic variation of amplitude/frequency or GD/frequency
     characteristics,
   - a same attenuation and/or phase-shift of every signal samples.

For linear variations of amplitude or GD, and for a signal phase-shift, the
result depends on the bb/rf choice.

Using two 90 phase-shift in base band allows, for instance, to build a SSB
modulator.

As for other filters, this filter can be visualized, and included in noise
bandwidth calculation.



                         Equivalent noise bandwidth

This module is not directly accessible by the user.

Seven types of filtering modules can be designated as included in the
receiver, to be taken into account in noise bandwidth calculation.

The transfer function module is always equal to 1 at central frequency, except
"Auto-adaptative equalizer" (for even order Tchebycheff filters, the module is
greater than 1 at ripple peaks).

At every received filter, the N elements of a file named "NBW", in the
repertory of temporary files, are multiplied by the square of the envelope
of the current filter.

This file is initiated at every passage in the canal. The computation of the
noise bandwidth is made in the "Coherent demodulation" module.



                               Two rays model

The two rays radio-electric transmission model is employed to characterize
the performances of digital links in presence of a selective fading.
Only the first ray is present without fading.
The second ray is characterized by:

- the ratio Ro of its amplitude to that of the first ray, always positive
  and inferior to 1 in the used model,
- its relative delay Tau, positive in case of minimum phase fading and
  negative in case of non minimum phase fading,
- and the difference from central frequency of the most near notch of model
  amplitude/frequency response (periodic response, with period 1/Tau);
  this difference depends on the phase-shift between rays.

It is possible to calculate the so called "signature" for a given notch
frequency: a "Loop" module varies Ro in a specified range and displays the
RMS error result given by a "Coherent demodulation" module placed after the
"Two rays model" module. Characterizing the signature by BER is not wise,
because:

- the pseudo-random sequence length is generally too small to compute
  accurately, by direct simulation, the BER due only to intersymbol
  distortion,
- it would be necessary to know the distribution law of RMS error amplitude
  to derive the BER from it.

As for other filters, to centre symbols on sample #0, Gd at central frequency
must be subtracted from GD. However, this module being generally associated
with a "Auto-adaptative equalizer" module, variations of GD in the signal
bandwidth can be very large.
For this reason, subtracted GD is not central frequency GD, but the mean GD
value in Nyquist bandwidth.

The two rays model describing a phenomena occurring upstream the receiver
antenna, must not be included in calculation of the receiver equivalent noise
bandwidth.



                         Auto-adaptative equalizer

This module must be placed before a "Coherent demodulation" module, or
at the canal end, if the purpose is only to draw a signature.

Equalized linear distortions come from preceding filters and/or from a
"Two rays model" placed just before.

The simulated equalizer is:
- linear : no decision is taken in the loop,
- synchronous, delays being multiples of T.

Two structures can be chosen:
-  transversal, leading and following signals being added without any loop,
-  or transversal for the upstream part and recursive for the downstream part.
An equalizer equipped with N1 upstream taps and N2 downstream taps comprises
N1 + N2 + 1 complex coefficients indexed i : i =  -N1 ... 0 ... N2.
First, all coefficients are nulled, except the real part of the central
coefficient.

The coefficients are refreshed at every symbol, in order to make the central
sample of symbol the most close of:
- either the constellation nearest nominal state, simulating real conditions,
- or the transmitted state, at modulator output, to speed convergence.

The algorithm used for ith coefficient is:
Coef = Coef - Eps (SGN(Ai) * ErrA - Sgn(Bi) * ErrB) for direct path,
Coef = Coef - Eps (SGN(Ai) * ErrB + Sgn(Bi) * ErrA) for quadrature path.

The central coefficient central (i=0) multiplies the signal by a complex
coefficient, simulating AGC and APC (carrier recovery).

For i<>0, Ai+jBi is,
- either the upstream equalizer signal (MMSE),
- or the downstream equalizer signal (Zero Forcing) at a time preceding
  of i symbols the time of evaluation of errors ErrA and ErrB.
If asked, errors can be replaced by their sign, the incrementation step of
coefficients Eps being reduced in order to avoid a too large residual
oscillation of coefficients.

If errors are not quantized, Eps can be set larger.
A small Eps value leads to a slower equalizer convergence.
The equalizer can diverge if Eps is either too small or too large.

Convergence is shown by:
- displaying the constellation, except if the module is included in a loop
  (see "Loop" module),
- periodically computing RMS error,
- displaying the progression of coefficient values.

The user can specify, in number of FFT frames, the total time allowed to
convergence.

At beginning of the module, level recovery (AGC) and phase recovery (modulo ,
/2 or /n as a function of modulation type) are applied to the distorted
signal, to initiate  the central coefficient.
Later, this job is done at every symbol by the equalizer algorithm.
Equalizer input signal is periodic, with period Ns symbols. Several periods
can be required to acquire convergence. If distortion is too severe, it is
better to choose a high Ns value.

If canal is linear, two samples per symbol (N = 2 Ns) are sufficient.

It is better to choose the highest possible value of Ns, hence of N.
As opposed to other modules, computation times increases less rapidly than N.

For AM and QAM modulations, coefficient refreshing can be restricted only to
the case in which the estimated or transmitted symbol is located  on the
constellation periphery, sometimes easing convergence.

In case of equalisation of a selective fading, simulated by par a "Two rays
model", the value Ro of the perturbating ray can be progressively increased
to determine the "signature" in Holding mode. Convergence is faster in this
case. The signature limit is defined by a specified value of RMS error.
The RMS error increases very rapidly in the vicinity of the signature edges.

The selectivity -20 log (1-Ro) on signature edges, in "Holding" or "Capture"
modes can be obtained automatically, the program increasing selectivity by
dichotomy (see User's guide). If the canal is terminated by a "Loop" module
incrementing the notch frequency, the full signature drawing is obtained.

As it is possible that the selectivity on signature edges be infinite (Ro=0),
you are asked to enter a maximum value to be tested RoLogMax.
Accuracy of calculation is the half of the minimum incrementation step of
selectivity, equal to the manual incrementation step of selectivity entered
at line #5 of menu.

The sampling instant To can be fine tuned, with dTo increments but, generally,
it is not necessary to do so.

The simulated equalizer works only for AM, QAM (non offset) and PSK (normal
and K_2K type) modulations.








                               Quantization

Two parameters Dyn (dynamic) and k (number of quantizing bits, preceded or
not by a zero, f.i. "08" instead of "8"), must be specified.

At module input, the signal dynamic is limited from -Dyn to +Dyn.

At module output, signal is quantized at levels separated by
Step = 2 Dyn / (2^k - 1), and takes:
   2^k values between  Dyn if "k" is entered (no zero quantized level),
   2^k -1 values between Dyn - Step/2 and -Dyn + Step/2 if "0k" is entered.

Note: Without any interference, the signal dynamic is, respectively, 1 or
0.707 if one or two carrier axis are modulated. An entered dynamic equal to
twice this value is generally enough to take into account filtering
overshoots.

Caution : if the signal is sampled with less than NechSymb samples per symbol,
as it is the case at the output of a "Digital modulator" module tuned in
"Flat spectrum" (Dirac pulses), the dynamic is higher.
                               Butler matrix

This module applies the concept of Butler matrix to the power amplification
of a satellite repeater.

A Butler matrix of order n (4, 8, 16, etc.) comprises n inputs, n outputs,
and a set of hybrid 3 dB couplers and phase-shifters.
For a Butler matrix, attenuation between input #i (from 0 to n-1) and output
#j (from 0 to n-1) is 10 log(n), and phase-shift is 2ij/n.
The second matrix has opposite phase-shifts.
A set constituted by n amplifiers inserted between two Butler matrix has the
following properties:
-The input signal of upstream matrix input #K goes across all the amplifiers
 but is only present at downstream matrix output #K,
-For a wise disposition of input signal frequencies, the intermodulation
 products at frequency Fi are found at a different output that the signal of
 the same frequency Fi, and can be eliminated by filtering,
-The global output power of the n amplifiers can be shared between one or
 several signals, in a flexible way.


See "The Butler matrix transponder", W.A.Sandrin, BSTJ Vol 4, Nb 2,
Fall 1974, page 340

The n signals to be amplified, of monocarrier or multicarrier type, must be
saved beforehand in n separate files.

Two "Butler matrix" modules must be put in the canal:

Upstream matrix (upstream TWTs)
---------------
This first module calculates the signals present at the outputs of the n TWT,
and saves them in files.
The n input signals are read, phase-shifted by the value given in the above
article (value depending on both input and output), attenuated by 10 log n dB,
voltage summed, amplified by the TWT, and saved in n different files.
Nota: for n = 16, 32 files are used. If N = 4096, the storage capacity must
be larger than 32 * 2 * N * 8 = 2 Megabytes.



Downstream matrix
-----------------
The calculation is similar, except there is no more any TWT.
Calculation is done for one output, without any saving process.

The set of both matrix is optimum in the Sandrin sense, if the signal
frequencies of the upstream matrix are in the order given at page 326 of
the above article (accesses are numbered from 0 to n-1 in the program, and
from 1 to n in the article).

Levels
------
If the input signals of the upstream matrix are unmodulated carriers, and if
their level is 0 dB ( A(i)^2 + B(i)^2 = 1 ), the TWTs work with an input
multicarrier back-off equal to the value of their input attenuator.
If Dec is the multicarrier output back-off, the input signal of upstream
matrix input #j can be founded at each upstream matrix output with a level
-Dec -10 log n, and at downstream matrix output #j with a -Dec dB level.


If the input signals of the upstream matrix are the sum of m carriers with the
same 0 dB level, they must be attenuated by 10 log m before saving in order
that TWTs work with a multicarrier input backoff equal to the value of their
input attenuator.

One of the components of the signal at upstream matrix input #j can be
founded at downstream matrix output #j with a level a few less than
-Dec -10 log m dB.

If "Coherent demodulation" and "Bit Error Rate" modules are following, a
degradation near 10 log m + Dec will occur.








                            Frequency modulator

The instantaneous frequency of the output signal of this module is
proportional to the input baseband signal amplitude.
The input baseband signal is held by array A(), B() being void.
The output signal is held by A()+jB().

Must be specified:

- the modulation sensitivity, in frequency units per Volt,
- the coupling mode, DC or AC, for transmitting or not transmitting the DC
  component of input baseband signal,
- if DC, the input level corresponding to the central frequency (if AC, this
  level is the mean level of the input signal).

Unlike Digital modulator module, this module must not be placed at the
beginning of a canal. The baseband signal applied to its input is created
by another upstream module, for instance "Sine and DC steps", which sets
the sampling parameters dT and dF.

If the FM modulator is used to create a digital FSK modulation (then the
first module "Digital modulator" acts as a baseband signal generator, and
sets Mo$ to "AM"),
- a NPhase modulation is created, NPhase being equal to the number of levels
  NNiv entered in the first module,
- the modulation has a constant envelope of type "LIN" if the first module
  is tuned in "SINX/X" or has the K_2K type if the first module is tuned in
  "FLAT" spectrum,
- two adjacent phases are distant by 2/NPhase,
- the modulation slope must be set manually to
            Symbol rate * (NNiv-1)/2/NNiv
- for a downstream "Coherent demodulator" module, Mo$ and the set of
  transmitted symbols Symb%() are modified in order to compute BER.

WARNING: Do not use a RANDom frame. Only PSEUdo-random frames issued from
"Digital modulator" module, with two or more levels, have a zero mean.
It is not the case for random frames, the "Frequency modulator" module
would perform automatically a level adjustment, unsuitable to this type
of use (see User's guide).

                           Frequency demodulator

The output signal amplitude of this module is proportional to the
instantaneous frequency of the input signal, slope in Volt/MHz being the
inverse of upstream frequency modulator slope.

The input signal is represented by A()+jB().
The output baseband signal is held by array A(); array B() is void .

Restoration of the output signal DC component has not been deemed to be
necessary, because this component has no effect on following modules
(baseband filters) eventually placed downstream. Therefore, there is a
direct proportionality between:
- the output signal amplitude and
- the difference between the instantaneous frequency of the input signal and
  the central frequency.




                             Sine and DC steps


This module generates a sinusoidal signal superimposed to DC steps, as in the
test signal used to measure differential gain and differential phase.

It must be placed at the beginning of canal, and sets sampling parameters
dT and dF.

The number of sine periods per step must be an integer, power of two.

The choice of parameters (number of steps, number of sine periods per step,
sine frequency and N) must lead to a frame bandwidth much larger than
the signal spectrum bandwidth (Carson bandwidth). The Carson bandwidth
depends upon the sine frequency and the frequency deviation.

To help the choice of parameters, the frame bandwidth is displayed at the
end of every entry screen.


                           Differential gain/phase

In this module, a graphic displays the differential gain and differential
phase of the sine signal transmitted by module "Sine and DC steps",
necessarily present upstream, the parameters of which being memorised.

Calculation is done for every sine period, and result is displayed by a
point. Points located on both sides of a transition between DC steps are
not displayed (F6 links or not points with a straight line).

The points located on a same DC step should have the same ordinate. The last
property allows to check the validity of results. Particularly, alignment is
bad if the frame bandwidth is too small.

The differential phase is displayed after subtracting the mean phase at the
middle of DC steps.

Take care to the synchronism of transmit/receive signals: all filters must
have the "GD0" parameter.  See User's guide.

                               Pre/deemphasis

The "Pre/deemphasis" module is intended to be placed upstream a frequency
modulator, and downstream a frequency demodulator.
The parameters of 625 lines TV CCIR network are offered as default
(11 dB attenuation at low frequencies, 3 dB gain at high frequencies for the
preemphasis network).

Note: If the frequency deviation is specified at low frequencies, as it is
      usual in satellite transmission, the value to enter in the
      "Frequency modulator" module entry screen must be increased by 11 dB.









                        Interference Reduction Factor

This module computes the IRF (Interference Reduction Factor), namely the
ratio of the two following powers:

- power of modulated signal at the output of receiver filter(s),
- power of the same signal, at the same point, when the signal spectrum is
  frequency shifted by a specified figure.

The IRF module must be placed two times in the canal, upstream and downstream
the receiver filter(s).
The signal goes one time across the first module, and two times across the
receiver filter(s) and across the second module.

Before frequency shifting, the signal is saved in a file named IRF, placed
in the repertory of temporary files. The file size is about 16 N bytes.

See User's guide section 5.22 for more details.


                                Interferences

This module places in the vicinity of modulated signal frequency one or
several interferers, modulated at the same bit rate, and with the same
type.
Each interferer is obtained by shifting the main signal in frequency and
in time (for decorrelation), and eventually changing the level.
The maximum decorrelation is got for half the FFT frame duration Tm (Tm is
displayed by "Digital modulator" module). So, it is a good idea to enter
shifts multiple of Tm/(K+1), K being the number of interferers.

All signals are voltage added: If the following module is a non-linear
amplifier ("TWT" module), the input multicarrier backoff is zero dB if the
input attenuator is set to 20 log(K) dB.

If K is not too high, the interferers characteristics can be entered by hand,
separated by commas, other wise it is necessary to write a .PER file with
the utility program FIL_TWT.EXE.


                                   Power K

This module sets the signal to its Kth power, in time domain. The module is
set to its Kth or (1/K)th power, phase is multiplied or divided by K.
The variation of instantaneous frequency, derivative of the phase, is
modified in the same ratio.
K must be an integer, power of two.

For a phase division by K, the 2/K ambiguity is resolved by choosing,
among K samples, the nearest one from the previous sample.

With sampling (third line of menu), only are taken into account the central
samples of symbols, with number 0, NechSymb, 2 NechSymb, etc., others are
nulled.

With limitation, the output module of all samples is set to one.

Without limitation, module is set to its power:
- K in case of multiplication,
- 1/K in case of division, that has no physical meaning.

If you want to simulate a carrier recovery by multiplication/filtering/
division, choose "Limitation" for the phase division in order not to
modify the signal level in the "Coherent demodulator" module (the "Stock"
module, tuned in "READ/" or "WRITE/" being used to simulate the return to
baseband, see User's guide chapter 8).














                                Gaussian noise

This module adds a gaussian noise to each signal sample, in time domain.
You must enter the wanted C/N and the RF band b in which the noise is
defined.
C is the reference level.
Hence, the rms noise voltage on each axis is:
0.707 -10 log (C/N) + 10 log (N*dF/b)  (Fm=N*dF is the frame bandwidth).

Recall:
In digital modulation, the signal power is 0 dB at a modulation peak, at
the output of "Digital modulator" module.
In FM, at the output of a "FM modulator" module, the signal power is 0 dB.

On each axis, the gaussian noise is obtained by BASIC instruction RND, which
gives a sequence with uniform distribution between 0 and 1.
The logarithm of the terms of this sequence has a Rayleigh distribution.
Multiplying it by the cosine of an angle uniformly distributed between
0 and  (other call of RND), a gaussian distribution is obtained.

If you choose "NO" reinitiation, the pseudo-random sequence issued from
instruction RND is scrambled at every passage in the module, in order to
allow to perform the mean of several results (f.i. using a "Loop" module).
If you choose "YES", the result will be the same from one computation to
another.

