Loading ...
Sorry, an error occurred while loading the content.

1999Apparent inconsistency in SL Conditional Actions calculation

Expand Messages
  • Paul Hyde
    Jul 18, 2014
      Hello all,

      I have been doing some work on observing meteor scatter using Spectrum Lab and I have come across something that I do not understand in the results captured using the Conditional Actions script.

      The basic function is to measure the maximum signal withing a range of frequencies, plus the average noise between those frequencies.  If the max signal is more than 17 dB above the noise, then the system logs the time and the signal and noise levels.

      if( initialising ) then A=0:Sig=0:C=0:low=4000:high=4800:Mtime=0:MSig=0:MNoise=0
      if( always ) then A=noise(low,high):Sig=peak_a(low,high):h2=str("hh:mm:ss",now)
      So each time around the loop (Evaluation time set at 100 ms) specific values are derived from the output of a particular FFT calculation and assigned to the A and Sig registers.  These values will not change until the next loop.

      if( Sig>(A+17) ) then C=C+1:timer0.restart(2)
      This starts (or restarts) a 2-second timer and increments a Duration counter

      if( C=1 ) then Mtime=h2:MSig=Sig:MNoise=A
      This transfers the A and Sig values at the trigger point into ‘holding’ registers.  It only happens when C=1, so only in the first pass through the loop.

      if( timer0.expired(1) ) then fopen2("c:\\Spectrum\\"+"event_log"+str("YYYYMMDD",now)+".txt",a): fp2(Mtime+","+str(MSig)+","+str(MNoise)+","+str(C)):fclose2:C=0
      Once the trigger condition has not been met for 2 seconds the values in the holding registers are saved to file and C is reset.

      However I am finding that the system is capturing events with margins of less than 17 dB.  Curiously it seems to capture events that are between approx 9.6 and 12 dB above the noise, then there is a 'forbidden zone' where very few events are registered, and then it registers events where the difference is 17 dB or more - as it is intended to do.

      I amended the script to use Sig>(A+20).  This did not affect the occurrence of 'false' triggers around 10 dB but it did widen the 'forbidden' zone before starting to regisrter more events at 20 dB upwards.

      So the trigger system does have some effect. If the system triggered for every event I would expect a normal distribution of signal levels and not a mysterious region where there are very few.  It seems that either the value in the MSig register is changing in subsequent loops, or the Sig > (A+17} test sometimes fires when it should not.

      Does anyone have any ideas how I can try to investigate this further - or even what I'm doing wrong?


      Paul Hyde

    • Show all 5 messages in this topic