News:

  • August 23, 2026, 02:17:58 AM

Login with username, password and session length

Author Topic: Measuring line frequency and phase angle  (Read 7966 times)

AustinT

  • Full Member
  • ***
  • Posts: 35
Measuring line frequency and phase angle
« on: February 15, 2020, 12:22:25 AM »
I have a question regarding the High speed inputs for measuring line frequency.  Please confirm If I understand this correctly.  If I choose timer and interval scaling , I will get a new frequency reading every cycle.  If I want to average a few cycles then I need to use the counter and scaling function.  This will result in a rolling average frequency .  What would be the best way to do phase angle, just measure the rising edge between two inputs?

Thanks

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6172
  • Yes Pinky, Do-more will control the world!
Re: Measuring line frequency and phase angle
« Reply #1 on: February 15, 2020, 10:36:57 AM »
I would think about the timer vs counter differently. If the frequency is low, use timer. If the frequency is high, use counter. That gives you the best trade off between stable vs responsive data. Then use smoothing to stabilize the data further, if desired. For something like a 60hz line, I?d probably use time. For something like a 10khz pulse train, I?d definitely use counter.

As for phase, yes, measure time between edges with a dual edge timer.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

AustinT

  • Full Member
  • ***
  • Posts: 35
Re: Measuring line frequency and phase angle
« Reply #2 on: February 15, 2020, 12:54:02 PM »
Thank you for the reply.   So if I understand correctly, using the time method for the slow 60 hz signal , every power line cycle it will have an updated frequency.  So if that cycle took 16.67 ms it would say 60 hz , If the next cycle took 2*16.67 , for example, it would say 30 hz after that cycle
Thanks

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6172
  • Yes Pinky, Do-more will control the world!
Re: Measuring line frequency and phase angle
« Reply #3 on: February 15, 2020, 01:17:15 PM »
Thank you for the reply.   So if I understand correctly, using the time method for the slow 60 hz signal , every power line cycle it will have an updated frequency.  So if that cycle took 16.67 ms it would say 60 hz , If the next cycle took 2*16.67 , for example, it would say 30 hz after that cycle
Thanks

Correct. When in free-run mode with interval scaling, it spits out a new frequency every interval. With a counter and rate scale, it sums the counts and converts to frequency at the specified sample time. For low frequency the timer is always best.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Ingeniero

  • Full Member
  • ***
  • Posts: 45
Re: Measuring line frequency and phase angle
« Reply #4 on: February 24, 2020, 09:54:40 PM »
Try a power monitor.  The PLC reads the power monitor output, analog, modbus or others. For cheap you dont have to reinvent the wheel.

If you are using a PLC to synch breakers, I have done it but auto synch and synch checks relays are available for most budgets.