Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 18:36 04 Dec 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Electronics : if you want to sync to mains.. this is what "mains" looks like

Author Message
poida

Guru

Joined: 02/02/2017
Location: Australia
Posts: 1422
Posted: 08:47am 27 Nov 2024
Copy link to clipboard 
Print this post

no promises that it will work for ever but it works now.

http://1eq2.cc/f3.html

this is the frequency at Melbourne and the phase, relative to some
starting point and that is not important.
Phase locking does not care about any absolute phase angle, just what it is now.

phase angle change rate is proportional to frequency, by the way.
I measure phase angle by getting the time of zero crossing AC
compared to the GPS 1 second pulse from a GPS module.
I also tune up (or discipline) the local timer of the microcontroller
so as to get accurate frequency.

My estimate of error of frequency is about 0.01%
in other words it's really good.

The GPS 1 second pulse has jitter of the order of 50 or so nanoseconds.
This can be used to average out the jitter and get a very good time source.
I maintain a local 1 second pulse and bring it into close relation to the GSP 1 second pulse using closed loop control (a phase locked loop as it were)

It's good.
Edited 2024-11-27 18:53 by poida
wronger than a phone book full of wrong phone numbers
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2080
Posted: 09:03am 27 Nov 2024
Copy link to clipboard 
Print this post

 
Revlac

Guru

Joined: 31/12/2016
Location: Australia
Posts: 1027
Posted: 10:10am 27 Nov 2024
Copy link to clipboard 
Print this post

I was watching it move around for a bit, interesting stuff, then thought how would it look on a gen set, I'm sure it would be off the scale (compared to the grid) when a load is applied.
Thanks for posting.
Cheers Aaron
Off The Grid
 
poida

Guru

Joined: 02/02/2017
Location: Australia
Posts: 1422
Posted: 12:19am 28 Nov 2024
Copy link to clipboard 
Print this post

thanks for the comments

here is a 24 hour block of the data. you can choose
past days.
When this is compressed into the width of the screen, you can
see large freq deviations.

the link below if for today and so it's incomplete

http://1eq2.cc/f5.php?ddate=20241128
wronger than a phone book full of wrong phone numbers
 
Murphy's friend

Guru

Joined: 04/10/2019
Location: Australia
Posts: 651
Posted: 08:45am 28 Nov 2024
Copy link to clipboard 
Print this post

poida, are you off grid? If so, it would be interesting to see the frequency stability of your inverter during a 24 hour period.

If you run the Nano inverter, that test may be of interest to many who run your design.

I see on my scope that the (off grid) instantaneous frequency jumps up and down a small bit but I'm not sure why. Not that it matters here - just curious.
 
poida

Guru

Joined: 02/02/2017
Location: Australia
Posts: 1422
Posted: 12:42pm 03 Dec 2024
Copy link to clipboard 
Print this post

I'm not off grid. I use street power for cooking, 3 small A/C and clothes washing.
I use inverter power for the rest of the house.

The frequency measuring thing uses an Arduino Due, it runs at 84Mhz.
I feed it the 1 Hz pulse from GPS to tune a phase locked loop that runs
at 1 Hz locally on the chip.

This way, I know how many clocks is exactly 1 second.

since the timers run at 1/2 clock speed it is 42Mhz.
After it locks, it is
41,999,585 clocks for 1 second. This varies over time +/- 1
so it's stable to at least one part in 42 Million.
This is an excellent time reference now.
It gives me great confidence in the accuracy of any frequency measurement.

Today I checked out the inverter (running the nanoverter code, using a $2 nano
as the time base as they all do)

It sits at 49.92 Hz +/- 0.005 Hz
this is far better than mains regulation.
The inverter frequency does not change  under load, as I expected it would not.

below is data from the Due, running the frequency program that produces
the mains freq data as seen on the web page.

Each line is the average of one second's worth of 50Hz frequency measurements.
there is some noise in my work area and it makes for some variance.

first is the number of clocks for the period of the 50 Hz

next is the current number of clocks for exactly 1 second as produced by the GPS

next is the calculated frequency of the input pulse.
I take this from the workbench power, which comes from the inverter.
The pulse is from the trigger output of the DSO when I choose "mains" as the trigger input. This conditions the mains from 240 AC to a 0 - 3.3V TTL pulse.
Perfect for input into the Due microcontroller.

next is "1" or "0" to show if it's in phase lock.

next is a phasor, running from -10.0 to 10.0, showing the relative phase angle
from the GPS 1 second pulse.

last is the correction, in clocks, needed to keep the local 1 second timer in phase
with the GPS 1 Hz pulse.

We can see the frequency is 49.925 +/- 0.005


841320 41999584.00  49.92402  1  0.24261 499
841211 41999584.00  49.92648  1  -1.23669 501
841265 41999585.00  49.92448  1  -2.71719 501
841266 41999584.00  49.92513  1  -4.19664 498
841389 41999584.00  49.92885  1  -5.67373 499
841287 41999585.00  49.92779  1  -7.15092 500
841185 41999584.00  49.92696  1  -8.62651 499
841293 41999584.00  49.92288  1  9.92671 500
841312 41999585.00  49.92248  1  8.44712 500
841210 41999585.00  49.92767  1  6.97020 499
841318 41999584.00  49.92207  1  5.49213 499
841207 41999585.00  49.92735  1  4.01045 500
841247 41999585.00  49.92538  1  2.53526 501
841183 41999585.00  49.92728  1  1.05879 500
841103 41999585.00  49.92883  1  -0.42228 499
841224 41999585.00  49.92645  1  -1.90068 501
841189 41999585.00  49.92637  1  -3.37808 500
841272 41999585.00  49.92395  1  -4.85774 500
841248 41999585.00  49.92378  1  -6.33595 500
841289 41999585.00  49.93134  1  -7.81130 500
841246 41999585.00  49.92588  1  -9.28675 501
841230 41999585.00  49.92631  1  9.26392 500
841380 41999585.00  49.91928  1  7.78623 499
841345 41999585.00  49.92049  1  6.30521 500
841279 41999585.00  49.92369  1  4.82762 499
841330 41999585.00  49.92163  1  3.35148 500
841272 41999584.00  49.92556  1  1.87332 499
841223 41999584.00  49.92709  1  0.39423 500
841261 41999584.00  49.92572  1  -1.08512 499
841191 41999584.00  49.92706  1  -2.56052 500
841173 41999585.00  49.92852  1  -4.03654 500
841212 41999585.00  49.92784  1  -5.51446 501
841235 41999585.00  49.92687  1  -6.99622 499
841254 41999585.00  49.92398  1  -8.47417 500
841309 41999585.00  49.92654  1  -9.95155 499
841215 41999585.00  49.92730  1  8.60474 500
841212 41999585.00  49.92696  1  7.12263 500
841274 41999585.00  49.92393  1  5.64761 499
841209 41999585.00  49.92751  1  4.16773 500
841252 41999585.00  49.92517  1  2.68943 499
841348 41999585.00  49.92174  1  1.20727 500
841152 41999585.00  49.92909  1  -0.26854 501
841275 41999585.00  49.92547  1  -1.74306 499
841196 41999585.00  49.92868  1  -3.22196 500
841195 41999585.00  49.92687  1  -4.70031 501
841238 41999585.00  49.92953  1  -6.17959 500
841195 41999584.00  49.92641  1  -7.65845 498
841241 41999584.00  49.92530  1  -9.13330 499
841240 41999585.00  49.92599  1  9.41837 500
841178 41999585.00  49.92847  1  7.94216 501
841218 41999584.00  49.92752  1  6.46338 498
841216 41999585.00  49.92715  1  4.98432 500

wronger than a phone book full of wrong phone numbers
 
Murphy's friend

Guru

Joined: 04/10/2019
Location: Australia
Posts: 651
Posted: 03:33pm 03 Dec 2024
Copy link to clipboard 
Print this post

Thanks Poda, very reassuring that your inverter (and mine) runs at a very accurate 50hz.

I was curious as I'm using a satellite GPS time pulse (from an old Silicon Chip project) to get a 1Hz time pulse for my home made digital clocks.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6110
Posted: 07:30pm 03 Dec 2024
Copy link to clipboard 
Print this post

The mains supply never claims to be exactly 50Hz, It averages 50Hz so a mains derived clock will maintain time within a few seconds indefinitely.

From the aemc standards:
  Quote  No contingency event or load event
49.75 to 50.25 Hz,
49.85 to 50.15 Hz - 99% of the time


https://www.aemc.gov.au/sites/default/files/content/c2716a96-e099-441d-9e46-8ac05d36f5a7/REL0065-The-Frequency-Operating-Standard-stage-one-final-for-publi.pdf

30 years ago, we used to deliberately get the time a few seconds fast in the morning before the peak so that as load increased, the time gradually came back to correct. As long as we were within 2-3 seconds, everyone was happy.

Generators used mechanical governors and the time standard was a pendulum clock adjusted regularly using the time beeps of the radio.
At that stage, Tasmania's installed capacity was around 1 GW

Jim
Edited 2024-12-04 05:34 by TassyJim
VK7JH
MMedit   MMBasic Help
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2152
Posted: 09:14pm 03 Dec 2024
Copy link to clipboard 
Print this post

  Quote   It averages 50Hz so a mains derived clock will maintain time within a few seconds indefinitely.
Yes, the old synchronous motor clocks never needed adjusting, other than after a outage.

The small brief fluctuations in frequency that Poida's mains plot shows are due to phase shifts along transmission lines rather than actual changes in grid frequency. The endlessly changing pattern of load current and PF combined with the distributed reactance of the transmission lines produces the rapid phase shifts.
If the phase is changing a a rate of 3.6°/second it will appear as a frequency shift of 0.01Hz, relative to the generating end.
 
Chopperp

Guru

Joined: 03/01/2018
Location: Australia
Posts: 1064
Posted: 11:39pm 03 Dec 2024
Copy link to clipboard 
Print this post

  Quote   the time standard was a pendulum clock adjusted regularly using the time beeps of the radio

Ah, the old pendulum clocks.
We had 2 in the old equipment room at Perth Airport back in the '70s when I stared as a trainee tech. (Clocks been there for ages prior)
They fed 1 second pulses around the place:- Control Tower, Fire Station, OPs, Passenger terminals etc. Not sure if minute pulses were sent as well. At 8am every working day, we would tune into WWV (10MHz) to get the time pips to check their accuracy.

No automatic DLS adjustment either when we did a trial over there one summer. Clocks being an our hour out caused some confusion to say the least. Fun resetting them.

Brian    

PS, playing silly buggers, some of us used to stand in front of the clocks & try to synchronize our arms with the two pendulums which were rarely in step.  

Brings back some good memories. Thanks Jim.
ChopperP
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024