Determining sensor orientation

A Matlab extension for Scream! lets you easily determine the exact orientation of a sensor relative to a surface reference sensor, which can be installed on an accurately-surveyed North/South line.

The extension uses the Blacknest correlation method to determine relative orientation. This method was developed at AWE Blacknest in collaboration with Güralp Systems.

Signals received by the N/S component of the reference sensor are correlated with those received at the N/S and E/W components of the sensor being studied, after different amounts of mathematical rotation. The highest correlation will occur when the N/S component of the reference sensor matches the rotated N/S component of the borehole sensor.

Once you know the deviation of the borehole components from the correct orientation, you can instruct the digitiser to rotate the signals algorithmically.

Installing the Scream! extension

The Relative Orientation extension is supplied in the standard distribution of Scream!.

The extension uses Matlab™ libraries. However, you do not need the full Matlab™ package to use the extension. The Matlab™ run-time libraries are also included in the Scream! distribution.

Installing the reference instrument

To measure the orientation of a sensor, you will need a second instrument which is known to point precisely North. We recommend the use of a Güralp H3, a single-component horizontal instrument with an elongated "North" pointer. This is supplied as part of our Borehole Orientation Kit. The instrument should be located on a solid surface as close to the other instrument as possible. Most boreholes are constructed with a concrete base around the top of the borehole; If this is present, we recommend installing the reference sensor there.

Ideally, the two sensors will be directly connected to the same 6-channel digitiser. If you are using separate digitisers, you will need to ensure they are exactly synchronised. This can be done by connecting GNSS receivers to both digitisers and waiting for the control system of each one to settle. This process takes at least twelve hours.

Measuring the orientation

  1. Open the recorded files in Scream!. Under Windows, double-click on the .gcf files in Explorer. Under Linux, you can double-click on the files in Nautilus, Nemo etc if you have configured your system this way or, from the command line, you can run
    scream --view path_to_.gcf_file…

    A WaveView window will open displaying your recorded streams:
  2. Drag the streams across the window so that the reference stream is at the top, the N stream in the middle, and the E stream at the bottom.
  3. Locate a suitable data range. A good range would contain lots of teleseismic events and very little local noise. You should use a period of at least an hour, and preferably much longer.
  4. Hold down the shift key and drag across the WaveView window with the left button until all three streams are selected for the whole range. Make sure there are no gaps in the data you select. If gaps are present in any streams, the selection for those streams will be shown with hatched lines to alert you:

    When you are happy with the selection, release the mouse button, but keep the shift key held down.
  5. When the context menu appears, release the shift key and select Relative Orientation:

  6. Two small windows will appear: a small progress window and, typically, a warning like:

    Scream! produces this warning because the reference sensor is not using a standard N/S channel, but the auxiliary (X) channel. If you are using a separate digitiser, the warning will not appear.

    If you see a different error message, make sure that the streams are in the correct order in the WaveView window. If you still have problems, you may have selected too few data points for it to be confident about the orientation; you should try again with a larger selection.

  7. After a few seconds, the calculation should finish and three windows will appear. (They may obscure each other.) The top window is a graph of Coherence vs Angle:

    The two-stage algorithm rotates the N/S and E/W components of the sensor being tested in small steps.It measures first the amplitude similarity, and then the coherence between the virtual (rotated) N/S component and the reference N/S component, for a number of rotation angles.

    The error in the final calculation is around 2.5°.

    The peak of the coherence curve (upper graph) therefore corresponds to the angle of rotation which best matched the reference component. This angle is shown in the title bar, together with an estimated error.

    You should see a coherence curve which is smooth and symmetrical. If the curve is distorted, either the surface data are too noisy or the data selection is too short.

    The lower graph shows the overall amplitude similarity of the rotated signal. This provides an idea of the sign of the coherence (since signals in perfect antiphase have a high coherence as well as those in phase). If there are two peaks in the coherence graph, the correct one is where the amplitude similarity is most positive.

    The sample plots show that the borehole instrument is installed with its N/S axis at a bearing of –90° from true North.

  8. The second window shows the result of applying the rotation to the signal, i.e. the time series that a sensor in perfect N/S orientation would have produced:
  9. You can perform more accurate calculations by narrowing the search range. This is done in the two left-hand-side entry boxes on the Coherence vs Angle window: the first denotes the centre of the new search and the second specifies its range.The program suggests suitable values for you, so in most cases you can just click to perform another iteration.
  10. A new graph will be displayed showing the results.

    Our sample instrument is thus aligned at –90.61 ± 0.07°.
  11. The error given is only a rough estimate. For best results, you should repeat the orientation experiment several times using different data sets. The true error in the computed orientation can then be determined by observing the spread of the results.

The Blacknest orientation method generally provides a reliable indication of the sensor’s orientation. In most cases, the greatest source of error is in the installation of the reference sensor.

Note: If you have particular difficulty in deriving a stable value, additional information is contained in a third output window, which shows a waterfall plot of Coherence vs Frequency vs Angle. The frequency range used in the calculations is indicated with a black outline.

This plot can be used to select a more advantageous frequency range where the coherence curve is smoother and easier to interpret. In the example above, the frequency range 0.23 to 0.6 Hertz looks particularly promising: the surface within this range forms a smooth, symmetrical arch. Ideally, the peak should be very close to unity and the lowest points, at the margins, should be close to zero. The chosen frequency range can then be entered into the "Between X and Y Hz" boxes at the top of the "Coherence vs Angle" window before clicking again; the data will be filtered accordingly before the coherence is recalculated, increasing the accuracy of the result.
There are many factors which can affect the calculations used to determine sensor orientation. If you have trouble getting consistent, plausible results, please contact This email address is being protected from spambots. You need JavaScript enabled to view it. for advice.

Applying data rotations

Once you have determined the correct angle, you can program your digitiser to apply real-time mathematical rotations to the raw data. The procedure to do this is different for different types of digitisers. Use the links below to jump to the correct section for your digitiser:

DM24 Digitisers

You can configure a DM24 mk3 digitiser to apply a rotation to the digitised data. It can then produce output streams representing ground motion on true North/South and East/West axes.

This is done within the DSP to minimise the reduction in data quality.

To set up the rotation:

  1. Open a terminal session with the digitiser. You can do this over a serial link with a program such as minicom (for Linux) or puTTY (for Microsoft Windows). If you have a serial connection to a PC running Scream!, you can access the digitiser's console by right-clicking on its icon and selecting Terminal… from the context menu.

    Alternatively, if you access the DM24 via an EAM or other Platinum device, you can use the "FORTH Terminal Access" facility, reached via a web-page menu item, located under Tools→Terminal, or use the data-terminal tool from the command line.

    Regardless of the access method, you should see an ok prompt, indicating that the digitiser is ready to receive commands:

  2. Type
    0 rotation AZIMUTH

    where rotation is the angle of deviation from true North that you measured earlier, as a whole number of tenths of a degree. This is the same angle as that given by the orientation program but with the opposite sign.

    The preceding 0 tells the digitiser to apply the rotation to instrument number 0; the first, or only instrument. To apply rotation to the second instrument of a six-channel DM24, start the command with the figure 1.

    Thus in the example above, you would type 0 906 AZIMUTH to make the digitiser rotate signals by –90.6 degrees.

  3. Reboot the digitiser with the command re-boot.
  4. Collect some more data with the transformation active, and carry out another orientation calculation. The data from the down-hole instrument should now have a maximum coherence with the reference sensor at 0°. Check in particular that the sign of the rotation you have applied is correct.

Affinity Digitisers

The affinity digitiser can apply real-time rotation to its digitised data. It can then produce output streams representing ground motion on true North/South and East/West axes.

To configure this, visit the "Data acquisition" page of the web interface:

Enter the required angle - the sign-reversed output of the orientation calculations - into the "Azimuth rotation" field and then click . (This feature assumes that the first three primary ADC channels are digitising the vertical, North/South and East/West components, respectively, of a triaxial digitiser.)

Once configured, collect some more data with the transformation active, and carry out another orientation calculation. The data from the down-hole instrument should now have a maximum coherence with the reference sensor at 0°. Check in particular that the sign of the rotation you have applied is correct.

Minimus Digitisers

You can configure a Minimus digitiser to apply a real-time rotation to the digitised data. It can then produce output streams representing ground motion on true North/South and East/West axes.

The Minimus is capable of applying arbitrary three-dimensional rotations but we shall only use a single rotation about a vertical axis in this case. In the data-transform subsystem of the Minimus, rotations are specified using unit quaternions. This is a very flexible abstraction which avoids the problems associated with the more usual Euler angles, yaw, pitch and roll. Although four independent variables are required to specify a quaternion, a simple rotation about a vertical axis can be specified using just two variables, derived from the desired angle using simple trigonometric functions.

To configure the rotation:

  1. Visit the "Data stream" tab of the unit's web interface. Select "Enable Transform (reboot)" for all three streams, Z, N and E, from the instrument.

  2. Click the 'Reboot' button to reboot the digitiser and wait for the web page to reappear.
  3. Visit the "Data stream" tab again and change the transform drop-down from "Pass-through" to "Rotation (triplet) for the Z stream from the instrument. The other two will change to match.

  4. Move to the "Transforms" tab. Under "Configure Transforms", change the "Parameter Source" drop-down to "Saved User Parameters":

  5. Populate the four boxes in the "Rotation (triplet)" section as follows:

    Field Value
    Scalar cos(θ/2)
    X 0
    Y 0
    Z sin(θ/2)

    where θ is the sign-reversed angle produced by Scream!.

    For example: To configure the rotation of -90.6° as above, first negate the angle and then compute the sine and cosine of +90.6° ÷ 2, paying particular attention to the polarity (sign) of the answer:

    • 90.6° ÷ 2 = 45.3°
    • sin(-45.3°) = 0.711
    • cos(-45.3°) = 0.703
    and then populate the fields in the web page with:

    Field Value
    Scalar 0.703
    X 0
    Y 0
    Z 0.711

    as shown:

  6. Once the parameters have been entered, click the 'Save Parameters' button in order to save the parameters to non-volatile memory. If you neglect to do this, the settings will revert to the defaults when the digitiser is next rebooted.
  7. Collect some more data with the transformation active, and carry out another orientation calculation. The data from the down-hole instrument should now have a maximum coherence with the reference sensor at 0°. Check in particular that the sign of the rotation you have applied is correct.

  Submit Enquiry Contact Us Contact Local Distributor

You can view our case studies to find out more about how our instrumentation is used around the world.



Guralp Systems Limited
Midas House
Calleva Park

Tel: +44 118 981 9056
Fax: +44 118 981 9943