High-Speed Recording of Frequency Trigger Points


ADwin Systems Log Data at Speeds of 25 Nanoseconds



At CAS DataLoggers we occasionally have customers in the power generation industry whose application involves a quickly-fluctuating waveform. These technicians need to accurately determine the frequency of a given waveform at each of its cycles. This can occur when manufacturers and servicers need to ensure the stability and reliability of their generators. For these applications, we offer real-time ADwin-Light Data Acquisition Systems for accurate frequency monitoring and analysis.



Identifying Fluctuating Waveform Frequencies:



In our most recent example, our customer is working in a power generation application and is investigating a rapidly-fluctuating waveform. This user wants to know its cause, so he needs a way to measure frequency easily. Here our given waveform takes the form of a sinewave, with peaks and valleys like those seen using an oscilloscope or when analyzing the AC power from a wall outlet.



Here our user is concerned with locating the waveform’s Trigger points, which mark the time between two given points in a waveform; for example two points immediately preceding each peak. In our application,



  • Period is denoted as p


  • Frequency is denoted as f


  • The formula we use to find a given frequency is f = 1/p.


In this case, working with a power line’s frequency at 60Hz AC, the period of interest is equal to 16.667 milliseconds. This requires a high-speed system to record.



Capturing Trigger-Point Data:



Our customer is using the ADwin-Light-16 Real-Time DAQ and Control System for flexible signal generation. Consulting for this application, we first define a reference point called the trigger level. Our custom program does this by sampling the waveform very quickly (in this instance at 10 kZ).



The program commands the ADwin datalogger to start a clock, to identify the waveform’s trigger level, and then to sample data until it records the trigger point for a second time. In this way, the user then knows--at a high degree of accuracy--the time between those two points (the peak to peak). This also enables ADwin to calculate the frequency (f) of 1/p (here the trigger level).



ADwin acquires and evaluates input signals to monitor limit values. Users can also set up complex controls by using the ADwin’s capability of synchronously outputting multiple analog and digital signals on a time- or event-triggered base. The ADwin’s processor clock can capture data at extremely small increments as small as 25 nanoseconds. Depending on how fast we sample, we know the time length between the pair of events with extreme accuracy.



Frequency Monitoring Program:



Using the ADbasic programming environment, we developed a short program of just 40 lines which performs this frequency data acquisition. The program instructs the ADwin Light-16 to record the time duration between our two trigger levels. The program below took about 45 minutes to write:



DIM VAL,LAST_VAL AS LONG

DIM NEW_TIME, OLD_TIME, TIME_DIFF AS LONG

DIM TIME_DIFF_SUM, TIME_DIFF_AVG AS LONG

DIM WAIT_TIME AS LONG

DIM NUM_AVG_POINTS, AVG_COUNT AS LONG

DIM FREQ AS FLOAT

DIM TRIG_LEVEL AS LONG

DIM MIN, MAX AS LONG



INIT:

  'Intialize values for sampling

  GLOBALDELAY=4000 '10 kHz sample rate

  TRIG_LEVEL = 35000 ' voltage (in A/D counts) for marking start/end of cycle

  NUM_AVG_POINTS = 5 ' number of cycles to average

  WAIT_TIME = 400000   ' Wait for 1/2 cycle(10 msec.)to prevent false trigger

 

  'Intialize variable for averaging

  TIME_DIFF_SUM = 0

  AVG_COUNT = 0

 

EVENT:

  VAL = ADC(1)

  IF (VAL > TRIG_LEVEL) THEN

    NEW_TIME = READ_TIMER()

    TIME_DIFF = NEW_TIME - OLD_TIME

    IF (TIME_DIFF > WAIT_TIME) THEN

      PAR_1 = TIME_DIFF

      OLD_TIME = NEW_TIME

      TIME_DIFF_SUM = TIME_DIFF_SUM + TIME_DIFF

      INC AVG_COUNT

      IF (AVG_COUNT > NUM_AVG_POINTS)THEN

        TIME_DIFF_AVG = TIME_DIFF_SUM / NUM_AVG_POINTS

        TIME_DIFF_SUM = 0

        AVG_COUNT = 1

      ENDIF

      FREQ = 1 / (TIME_DIFF_AVG * 25.0e-9)

      FPAR_1 = FREQ

    ENDIF

  ENDIF



Benefits:



Many data acquisition systems on the market can sample frequencies, but ADwin hardware is capable of the high speed needed to capture all this frequency data in one cycle. Other data acquisition systems typically have to sample data over 5-10 cycles, having slow averages and too long a window to capture much data. Meanwhile ADwin’s processor clock and resolution can acquire frequency data at speeds of 25 nanoseconds, all during a single cycle for effective frequency analysis.



Additionally, ADlog software can log the values if required. ADwin has many post-measurement capabilities to work with the data—for example, users can view statistics such as standard deviation and Avg/Min/Max.



To learn more about ADwin Real-Time DAQ Systems, or to find the ideal solution for your application-specific needs, contact a CAS Data Logger Applications Specialist at 800-956-4437 or visit our website at www.DataLoggerInc.com.


More from Agricultural & Farming Products

All Topics

COVID-19 Response Suppliers COVID-19 Response:
Can Your Company Help Provide Critical Supplies?

We are using the power of our platform to aid in the mass shortage of critical supplies. If your company can help provide supplies, capabilities, or materials for products such as N-95 Masks and Tyvek SuitsPlease let us know.

COVID-19 Response Suppliers