Class BasicFreqDomBeam

java.lang.Object
beamformer.algorithms.BeamInformation
beamformer.algorithms.basicFreqDomain.BasicFreqDomBeam

public class BasicFreqDomBeam extends BeamInformation
Author:
mo55
  • Field Details Link icon

    • startIdx Link icon

      protected int startIdx
      The index number in the FFT data unit that corresponds to the minimum frequency to analyse
    • steeringVecs Link icon

      protected ComplexArray[] steeringVecs
      An array of ComplexArray objects, of size numFreqBins. Each ComplexArray object holds a double array of complex numbers, with one complex number for each hydrophone element.
    • chanOrder Link icon

      protected int[] chanOrder
      The order of channels in the incoming FFT data units array
  • Constructor Details Link icon

    • BasicFreqDomBeam Link icon

      public BasicFreqDomBeam(BasicFreqDomBeamFormer beamformer, int channelMap, int sequenceNum, PamVector beamVec, PamVector[] elementLocs, int[] channelList, double[] weights, double[] freqBins, double speedOfSound)
      Main Constructor.
      Parameters:
      beamformer - The BasicFreqDomBeamFormer creating this beam
      channelMap - a bitmap indicating which channels are part of this group
      sequenceNum - the sequence number of this beam
      beamVec - A PamVector describing this beam direction
      elementLocs - an array of PamVectors giving the hydrophone element X,Y,Z locations, one PamVector for each element in this group
      channelList - a list of channels in this beam. Note that the order of the list MUST MATCH the order of the locations in elementLocs
      weights - an array of double values, one for each element in this group.
      freqBins - an array of frequencies to calculate the steering vector over
      speedOfSound - the speed of sound in the water
  • Method Details Link icon

    • calcSteeringVec Link icon

      protected void calcSteeringVec()
      Calculates a steering vector over all hydrophones and frequency bins.

      A phase delay of the form ejinvalid input: '&#969't is calculated for each frequency bin, where invalid input: '&#969'=the angular frequency (=2*invalid input: '&#960'*center-of-freq-bin) and t is the time delay based on the location of the hydrophone.

      t is calculated as the location vector of the hydrophone / speed of sound (=locVec/c).

      The wave number k is defined as invalid input: '&#969'/c. Substituting for t gives the phase delay in the form ej*k*locVec, which can also be expressed through Euler's formula as cos(k*locVec)+j*sin(k*locVec). The cos/sin values are saved to the ComplexArray steeringVecs[freqBinIdx].

      Parameters:
      elementNumber - the hydrophone number
    • process Link icon

      public ComplexArray process(FFTDataUnit[] fftDataUnits)
      Process a set of FFTDataUnit objects using the preset frequency bin range
      Parameters:
      fftDataUnits - the group of FFTDataUnits to analyse
      Returns:
      complex array of summed beamformed data. Note that the size of the array is the number of frequency bins in the full frequency range, as specified by the user in the parameters GUI
    • process Link icon

      public ComplexArray process(FFTDataUnit[] fftDataUnits, int startBin, int endBin)
      Process a set of FFTDataUnit objects using a given frequency bin range.
      Parameters:
      fftDataUnits - the group of FFTDataUnits to analyse
      startBin - first bin to process
      endBin - last bin to process (not inclusive, so endBin can equal fftLength/2)
      Returns:
      complex array of summed beamformed data. Note that the size of the array is the number of frequency bins in the full frequency range, as specified by the user in the parameters GUI, even if only a portion of that range was actually processed
    • getChannelOrder Link icon

      protected void getChannelOrder(FFTDataUnit[] fftDataUnits)
      loop over the number of channels and determine the order of the hydrophones in the FFTDataUnits object. Create a look up table to match the order of hydrophones in the fftDataUnits array to the order in the steeringVecs array
      Parameters:
      fftDataUnits -
    • getChannelMap Link icon

      public int getChannelMap()
      Returns:
      the channelMap
    • getSequenceMap Link icon

      public int getSequenceMap()
      Returns:
      the sequenceMap
    • setWeights Link icon

      public void setWeights(double[] weights)
      Parameters:
      weights - the weights to set
    • clearChannelOrderList Link icon

      public void clearChannelOrderList()
      clear the list of channel orders