5.5 Event Detection and Location
A continuation power flow event is triggered when the value of one of the elements of an
event function changes sign from one continuation step to the next. The event occurs at
the point where the corresponding value of the event function passes through zero.
Matpower provides event functions to detect the location at which the continuation
power flow reaches the following:
- a specified target value
- the nose point
- the end of a full trace
- a generator reactive power limit
- a generator active power limit
- a bus voltage magnitude limit
- a branch flow limit
Each event function is registered with an event name, a flag indicating whether or not
the location of the event should be pinpointed, and if so, to within what tolerance. For
events that are to be located, when an event interval is detected, that is, when an element
of the event function value changes sign, Matpower adjusts the continuation step size
via a False Position or Regula Falsi method until it locates the point of the zero-crossing
to within the specified tolerance.
The detection of an event zero, or even an event interval, can be used to trigger further
actions. The CPF callback function capability was extended in Matpower 6.x to include
the ability to handle events by including information about any event intervals or zeros
detected. For example, Matpower includes a callback that fixes the reactive output of a
generator and converts its bus from PV to PQ when the corresponding event function
indicates that its reactive power limit has been reached. Another responds to the
detection of the nose point by signaling the termination of the continuation. In
fact, continuation power flow termination for nose point, target lambda or full
trace modes are all based on CPF callback functions in conjunction with event
detection.
While Matpower does include a mechanism for supplying user defined callback
functions, it does not yet have a corresponding mechanism for user specified event
functions.