Initial Modules

Initial Modules

This page provides a list of Initial Modules.  These modules are based on GStreamer plugins.  At the completion of all of these modules we should have achieved the following:

  • The complete software for a high quality VLF metal detector suitable for Humanitarian demining.  An early objective is to create a Open Source Software oriented detector that is comparable in quality to detectors that currently cost several thousand US dollars.
  • A great vehicle to perform further research.  The main direction of our early research is likely to be towards better anomaly characterization using VLF detectors but the software should make a good base for a far larger range of research.
  • A great base for expansion.  Expansion is here meant to cover the following:
    • Expansion in terms of multiple coils.  This can be simply for more information or (as given in our current roadmap) towards using an array of coils to obtain images of the underground anomalies.
    • Expansion in terms of adding extra modules to create detectors covering multiple technologies.  This may include the use of various external transducers.

Sine/Cosine Wave Creator Plugin.

A plugin to create Sine and Cosine waves. There will be an output sine wave for the Transmit coil. The frequency and amplitude of this will be able to be specified by the user. There will be inphase (ie sine) and quadrature (ie cosine) reference outputs of this frequency (the primary frequency) for the Digital Signal Processor (DSP) plugin and the Synthesiser Plugin along with inphase and quadrature reference outputs of its harmonics. The number and which harmonics will be able to be specified by the user. All inphase and quadrature reference outputs have a fixed amplitude of one.   The plugin will be required to resynchronise at the beginning of file storage, the beginning of file playback or at the beginning of playing a created synthesis stream.  See the File Storage/Replay Plugins for details.

Note that the creation of the sine and cosine waves should not be by direct sine or cosine floating point lookup as this would be too processor intensive. It is likely to require creation of tables before it starts up.  The web page at http://www.dattalo.com/technical/theory/sinewave.html gives some possible ways of doing this.

It is expected that this module will be programmed in the C Programming language.

 

File Storage/Replay Plugins:

Create a plugin (or plugins) that can store Pulse Code Modulated (PCM) data input from a Receive Coil and later play it back.  As well as Raw data file storage and retrieval there should be the ability to use lossless codecs such as FLAC, Wavpack and TTA.  The default should be FLAC.  See the Codecs section of http://humanise.org/demining/streaming-options for more information on these.

The plugins have to operate in such a manner that when the file data is replayed back as input to the Digital Signal Processing (DSP) module, the DSP module can synchronise to its Inphase and Quadrature reference inputs in the same synchronisation that it would have had, had it been getting the data directly from the coil.  This could be done by also storing and replaying these reference signals but as this is likely to be used in embedded applications with limited storage it would be better to avoid this.  Suggested method for this is as follows:

Whenever the File Storage Plugin is commanded to store a PCM Stream, the Sine/Cosine Wave Creator is shut down and restarted up in synchronization with the beginning of the stream.  Similarly, whenever the File Replay Plugin is commanded to replay a PCM Stream, the Sine/Cosine Wave Creator is shut down and restarted up in synchronization with the beginning of the stream.  On both the start of file storage and the start of file playback, the Sine/Cosine Wave Creator is designed to resynchronise to its zero point.

The number of PCM streams and which streams that will be stored (and consequently played back) up to the maximum channels that the codec allows, will be configurable by the user.  This will allow us to record both the current and the voltage waveform from the Receive coil and possible the current waveform from the Transmit coil.  Later, it may be used for multiple coil designs.

A facility that we would like is the ability for the user to type text as the PCM data stream is being recorded and this text to also be recorded.  This text needs to be synchronized to the data recording so that as the data is being replayed, the corresponding text is being displayed.  This text can be stored to a different file to that used for the PCM data.  This separate file would have the same name as the PCM data file but a different extension.

This plugin or set of plugins will also handle other streaming file storage and retrieval such as storage and playback of the output of the DSP stream, the output of the analysis stream and the GPS Stream.  These also need to be synchronised.

Open source GStreamer compatible plugins that implement FLAC, Wavpack and TTA file storage and retrieval already exists.  There still remains some work in taking these and modifying for our special requirements.

It is expected that this module will be programmed in the C Programming language.

 

Coil/Anomaly Synthesiser Plugin:

Synthesises the input data from a receive coil. This module will receive the inphase and quadrature reference frequencies from the Sine/Cosine Wave Creator and from these create an output waveform. The user will be able to specify the phase and amplitudes for the primary and harmonics. The user will also be able to specify the amount of noise to be added.

The user must be able to specify the parameters for the synthesis of an anomaly. This should include the change in phase and change in amplitude (for primary and harmonics) that the anomaly creates along with parameters to specify how fast the coil would be travelling over the ground.

It is expected that this module will be programmed in the C Programming language.

 

Digital Signal Processor (DSP) Plugin:

Receive the data from the Receive coil along with reference sine and cosine waves from the Sine/Cosine Wave creator module and calculate the Inphase and Quadrature amplitude components of the frequency of interest. There may also be a requirement to convert this to Phase/Amplitude information (Yet to be decided if this is done here or in the analysis module).

While this is the heart of the detector, it is a relatively simple module. It is not much more than multiplying the waves together and averaging the result.  See http://humanise.org/demining/underlying-maths for the maths behind how this module works.  Further documentation on the concepts which this module will use are currently being prepared. There will be some very exacting requirements as to how the averaging/integration is performed which is likely to include sliding windows and weighted bucket techniques.

There may also be a requirement to produce a second Inphase and Quadrature amplitude components stream pair.  This would be based on the same data as the first except that the averaging part of the calculation would have been performed over a longer period.  An alternative to this is for the analysis module to be able send this module control information that controls the length of the averaging part of the calculation.  The objective here is that the faster the coils are moving over the ground, the shorter the period of PCM stream used for averaging and vice versa.

Participants studying Digital Signal Processing may well have their own ideas as to how this should be done and we are open to other ideas. Note though, we do not believe that a standard Fast Fourier Transformation (FFT) is the right way to do it. Rather, the expectation is that it will be a digital implementation of a Lock-in Amplifier.

It is expected that this module will be programmed in the C Programming language.

 

Analysis and Display Plugin:

Receive Inphase and Quadrature component amplitudes and/or equivalently, Amplitude and Phase information from the DSP Plugin(s). Analyse this and display the result. Maintain graphical output of the phase and amplitude plus inphase and quadrature components. Output results to a stream so that log file(s) can be created and create an audio signal to indicate any anomalies found.

This is likely to be a larger project than the others. It still requires more thorough specification.  It will probably end up split into three plugins.  These will be as follows:

  • Analysis plugin
  • Display plugin
  • Audio Indicator plugin

In order to split this into the three plugins there needs to be a definition of the output from the Analysis plugin to the other two plugins.

It is expected that this module or modules will be programmed in the C or C++ Programming language.

 

Stream Player Module:

This module starts up and stops the various GStreamer plugins. These plugins are the plugins specified here plus other plugins such as the ALSA drivers under the control of the user. This module interfaces to the user, allowing the user to specify all parameters that the plugins require and passes these parameters to the plugins as it starts them up.  The module will have options to store to a file all current parameters as well as to retrieve from a file all parameters.

Note that the Sine Cosine Wave Creator is likely to need time to create lookup tables before it starts up. This may need to be taken into account before any file replay is sent to it.

It is expected that this module will be programmed in the C or C++ Programming language.  For a list of programs that we may use to base this module on see the following webpage:

http://humanise.org/demining/software-base

 

Spectrum Analyser / oscilloscope Plugin:

Spectrum Analyser (FFT) plus multiple channel oscilloscope simulator plugin.   This would be used both as a test tool and as a demonstration/teaching tool.  When used as an oscilloscope it should not only be able to take inputs from audio type streams (ie time domain signals from the sound card, from a file or from the reference frequencies)  but should also be able to take the frequency domain output of the DSP plugin (probably as phase/amplitude pairs), convert it back to time domain and display it.

There are a number of open source modules available that implement a spectrum analyser and/or oscilloscope so the task will largely involve taking one of these, converting to a compatible plugin, converting to our standards and getting it integrated to the rest of the project.  See the following page for a list of programs that this software can be based on:

http://humanise.org/demining/testtool-base

 

Graphical Pipeline Construction and Manipulation Module

Given the number of pipelines and variety of options that this project offers it may be advantageous to incorporate a graphical pipeline construction and manipulation module directly into the application.  The GStreamer project provides the GStreamer Editor that provides these facilities.  While this is intended as a development tool, it may be advantageous to incorporate it into our project as our project has an objective to be useful as a general research tool.

 

GPS Plugin

 The GPS (Global Positioning System) plugin will create a GPS Stream for the Analysis and Display Plugin and for File Storage with the output of the Analysis.  Needs to incorporate some gpsbabel so that it can be used with a multitude of GPS units.  Since Open Source GPS software is already available, this is more a task of converting to a compatible streaming plugin, converting to our standards and getting it integrated with the rest of the project.

It is expected that this module will be programmed in the C or C++ Programming language.

 

 

2 comments

By Aziz
1 year 24 weeks ago

Sine/Cosine Generator

It seems, the code tag isn't working...
<code>
  // Code example
  x -= a*y; // cos-Wert  y += a*x; // sin-Wert</code>
 So it does not make sense to post some code yet. You can't read it.
Aziz

By Ken Dawber
1 year 24 weeks ago

Hi Aziz,   I'll fix the

Hi Aziz,

  I'll fix the <code> up later.  There is still a lot of work to do on this web site.

 For whoever does the Sine/Cosine Generator, the information as to how to create the sines is probably best given at    http://www.dattalo.com/technical/theory/sinewave.html

By the way, I have just created a new Hardware page that includes your original circuit for the interface to the coils on a VLF metal detector.