PowerManagementUnitSamplingWithoutCurrentLocalTime

The PMU component of the power grid emulation project requires sampling at a rate of 80 samples per period of the grid frequency (60Hz in the US). Furthermore these samples must be synchronous with a UTC clock such that every 60x80th sample falls on the UTC seconds transition to within +-2.5uS. This Ptolemy example explores how to generate such sampling events for designs where these events are NOT produced outside of the control of the embedded microprocessor (thought to be the common case). For simplicity this example assumes that the grid frequency is 2Hz (rather than 60) and that 5 samples per grid period (rather than 80) are required. This is done to make the plots less dense and more readable, and because the resulting sample interval is 0.1S rather than 1/(60x80) which cannot be exactly represented in binary representation with an LSB of 1ns (as in IEEE 1588). To further simplify the plots, the UTC clock actor generates a 1PPS (one pulse per second) event to model a UTC time base with an LSB of 0.01S. These frequencies and periods are parameters of the system model. The supervisor actor issues three events at times that are parameters of the system.: -'startup' indicating that the entire system is initialized, -'pause' indicating that receiving platforms reinitialize (for example due to lost synchronization), -'resume' indicating that normal operation can resume. The PMU actor has two states: 'initialization' and 'running'. Sampling events are to be generated only in the 'running' state. The 'DiscreteSamples' are produced based on a DiscreteEvent clock actor. The UTCSamples are produced based on the UTC time base. All events are plotted in the top level DE frame of reference..

PowerManagementUnitSamplingWithoutCurrentLocalTime is available in two formats:

See Web Start Help for details.