Changing
the "Dynamics"
of signals by either "Amplification"
or "Attenuation"
can be achieved by using the "Normalisation"
and "Maximisation"
algorithms
described below.
The
traditional methods of amplifying
or attenuating signals is by the use of external electronic circuits
involving "Op-Amp" devices.
However here we're only using "Software"
to modify the dynamic range of the data.
Before
continuing a note of CAUTION:
Digitised
data has a fixed number of "Quantisation
Levels". e.g. A 12 Bit Analogue-to-Digital Converter
(ADC) will take an analogue input voltage and convert it into
2^12 or 4096 levels
or steps. These series of levels or steps "Roughly"
resemble the original analogue voltage. The larger the number
of bits
that the ADC possesses will improve the representation of the
original data.
The techniques
mentioned below are purely software methods to increase or decrease
the range of these voltages. The number of levels that the amplified
signal contains will be reduced by the same amount of the "Gain"
applied to the signal.
Therefore the final
data will have "Less" levels
or steps within it thus
affecting the data's "Resolution"
and "Accuracy".
The formulaes described
below are used to calculate each new data element of the waveform
at a time and will be incorporated into a "Loop"
within the software to process all the waveform's data.
The
algorithms
described rely on a set of "Signal
Names" which are defined below in the diagram:
Maximisation is equivalent
to using
an "Op-Amp" to "Amplify"
the signal by using software on the data sampled from the "A-D
Converter".
N.B.
THIS ALGORITHM
WILL ONLY WORK IF
THE DATA HAS BEEN PROCESSED BY THE "NORMALISATION" ALGORITHM
FIRST!
To calculate
the "Gain" required to "Amplify"
the signal to the new levels is show in the following formula:
GAIN
=
( NEWMAX
- NEWMIN ) / ( OLDMAX - OLDMIN )
The "New
Amplified" data values are then created using the "Gain"
calculated above "Multiplied"
by the original data thus:
NEWDATA
= OLDDATA * GAIN
However if "Attenuation"
is required instead of "Gain"
then the "Gain Value" calculated
above will be the "Divisor"
in the formula below:
NEWDATA
= OLDDATA / GAIN