-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfault.proto
159 lines (130 loc) · 9.98 KB
/
fault.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
// Copyright 2024 Zaphiro Technologies
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
/* <!-- markdownlint-disable -->
Messages describing faults.
*/
package zaphiro.grid.v1;
option go_package = "./grid/v1";
/*
The type of fault connection among phases.
This message is modeled after [CIM PhaseConnectedFaultKind](https://zepben.github.io/evolve/docs/cim/cim100/TC57CIM/IEC61970/Base/Faults/PhaseConnectedFaultKind).
*/
enum PhaseConnectedFaultKind {
PHASE_CONNECTED_FAULT_KIND_UNSPECIFIED = 0;
/* The fault connects the indicated phases to ground. The line to line fault impedance is not used and assumed infinite. The full ground impedance is connected between each phase specified in the fault and ground, but not between the phases. */
PHASE_CONNECTED_FAULT_KIND_LINE_TO_GROUND = 1;
/* The fault connects the specified phases together without a connection to ground. The ground impedance of this fault is ignored. The line to line impedance is connected between each of the phases specified in the fault. For example three times for a three phase fault, one time for a two phase fault. A single phase fault should not be specified. */
PHASE_CONNECTED_FAULT_KIND_LINE_TO_LINE = 2;
/* The fault connects the indicated phases to ground and to each other. The line to line impedance is connected between each of the phases specified in the fault in a full mesh. For example three times for a three phase fault, one time for a two phase fault. A single phase fault should not be specified. The full ground impedance is connected between each phase specified in the fault and ground. */
PHASE_CONNECTED_FAULT_KIND_LINE_TO_LINE_TO_GROUND = 3;
/* The fault is when the conductor path is broken between two terminals. Additional coexisting faults may be required if the broken conductor also causes connections to grounds or other lines or phases. */
PHASE_CONNECTED_FAULT_KIND_LINE_OPEN = 4;
}
/*
An unordered enumeration of phase identifiers. Allows designation of phases for both transmission and distribution equipment, circuits and loads. The enumeration, by itself, does not describe how the phases are connected together or connected to ground. Ground is not explicitly denoted as a phase.
Residential and small commercial loads are often served from single-phase, or split-phase, secondary circuits. For the example of s12N, phases 1 and 2 refer to hot wires that are 180 degrees out of phase, while N refers to the neutral wire. Through single-phase transformer connections, these secondary circuits may be served from one or two of the primary phases A, B, and C. For three-phase loads, use the A, B, C phase codes instead of s12N.
The integer values are from IEC 61968-9 to support revenue metering applications.
This message is modeled after [CIM PhaseCode](https://zepben.github.io/evolve/docs/cim/cim100/TC57CIM/IEC61970/Base/Core/PhaseCode/).
*/
enum PhaseCode {
PHASE_CODE_UNSPECIFIED = 0; //No phases specified.
PHASE_CODE_A = 1; //Phase A.
PHASE_CODE_B = 2; //Phase B.
PHASE_CODE_C = 3; //Phase C.
PHASE_CODE_N = 4; //Neutral phase.
PHASE_CODE_AB = 5; //Phases A and B.
PHASE_CODE_AC = 6; //Phases A and C.
PHASE_CODE_BC = 7; //Phases B and C.
PHASE_CODE_AN = 8; //Phases A and neutral.
PHASE_CODE_BN = 9; //Phases B and neutral.
PHASE_CODE_CN = 10; //Phases C and neutral.
PHASE_CODE_ABC = 11; //Phases A, B, and C.
PHASE_CODE_ABN = 12; //Phases A, B, and neutral.
PHASE_CODE_ACN = 13; //Phases A, C and neutral.
PHASE_CODE_BCN = 14; //Phases B, C, and neutral.
PHASE_CODE_ABCN = 15; //Phases A, B, C, and N.
PHASE_CODE_S1N = 16; //Secondary phase 1 and neutral.
PHASE_CODE_S2N = 17; //Secondary phase 2 and neutral.
PHASE_CODE_S12N = 18; //Secondary phases 1, 2, and neutral.
PHASE_CODE_S1 = 19; //Secondary phase 1.
PHASE_CODE_S2 = 20; //Secondary phase 2.
PHASE_CODE_S12 = 21; //Secondary phase 1 and 2.
PHASE_CODE_X = 22; //Unknown non-neutral phase.
PHASE_CODE_XY = 23; //Two unknown non-neutral phases.
PHASE_CODE_XN = 24; //Unknown non-neutral phase plus neutral.
PHASE_CODE_XYN = 25; //Two unknown non-neutral phases plus neutral.
}
/* The collection of Fault Event Types defined so far.*/
enum FaultEventType {
FAULT_EVENT_TYPE_UNSPECIFIED = 0; //No status defined
FAULT_EVENT_TYPE_STARTED = 1; //Fault started
FAULT_EVENT_TYPE_LOCATED = 2; //Fault located
FAULT_EVENT_TYPE_ENDED = 3; //Fault ended
FAULT_EVENT_TYPE_UNKNOWN = 4; //Information available don't allow us to know if the Fault is active or complete
FAULT_EVENT_TYPE_UPDATED = 5; //Fault data requires to be updated
}
/* Abnormal condition causing current flow through conducting equipment, such as caused by equipment failure or short circuits from objects not typically modelled (for example, a tree falling on a line).
This message is modelled after [CIM Fault](https://zepben.github.io/evolve/docs/cim/cim100/TC57CIM/IEC61970/Base/Faults/Fault) according to the extensions defined in the [fault-data-storage](https://github.com/zaphiro-technologies/architecture/blob/main/features/31-fault-data-storage.md#data-structures) feature.
Faults messages represent events linked to a given fault (identified by the id). From the point of view of storage the sequence of events may be handled in a way that does not map totally to the single event, e.g. by combining multiple events in a single database row.
When a fault is detected, an `Fault` message event of type `FAULT_EVENT_TYPE_STARTED` is generated, when a fault is located (and multiple locations can occur for the same fault) and a `Fault` event message of type `FAULT_EVENT_TYPE_LOCATED` is generated. When a fault ends, a `Fault` event message of type `FAULT_EVENT_TYPE_ENDED` is generated. Certain fields of the Fault event message may be populated only in case of event type `FAULT_EVENT_TYPE_LOCATED` (i.e. `locationProbability`, `measurementTimestamp`).
Headers used in rabbitMQ:
* `id` (string): id of the `Fault`
* `type` (string): always `Fault`
* `producerId` (string): the id of the producer (e.g. a PMU) linked to the notification.
*/
message Fault {
string Id = 1; //The textual id of the fault.
optional string description = 2; //The textual description of the fault.
PhaseConnectedFaultKind kind = 3; //The kind of phase fault.
PhaseCode phases = 4; //The phases participating in the fault. The fault connections into these phases are further specified by the type of fault.
int64 updatedAt = 5; //The date and time at which the fault started/located/ended depending on the Fault Status (Unix msec timestamp).
FaultEventType faultEventType = 6; //The type of the fault event.
optional string faultyEquipmentId = 7; //The equipment with the fault.
optional float faultCurrent = 8; //The current associated to the fault.
repeated string impactedEquipmentIds = 9; //The set of IDs of equipments impacted by the fault.
repeated FaultMeasurement usedMeasurementIds = 10; //The set of measurements used to locate the fault.
optional int64 measurementTimestamp = 11; // The timestamp of the measurements used to compute the fault location.
optional float locationProbability = 12; // The probability associated to the location. (This is relevant because multiple locations can be returned for a fault)
}
/* A fault that occurs on an AC line segment at some point along the length.
This message is modeled after [CIM LineFault](https://zepben.github.io/evolve/docs/cim/cim100/TC57CIM/IEC61970/Base/Faults/LineFault) according to the extensions defined in the [fault-data-storage](https://github.com/zaphiro-technologies/architecture/blob/main/features/31-fault-data-storage.md#data-structures) feature.
Certain fields of the `LineFault` event message may be populated only in case of event type `FAULT_EVENT_TYPE_LOCATED` (i.e. `lengthFromTerminal1`, `lengthUncertainty`).
Headers used in rabbitMQ:
* `id` (string): id of the `Fault`
* `type` (string): always `LineFault`
* `producerId` (string): the id of the producer (e.g. a PMU) linked to the notification.
*/
message LineFault {
Fault fault = 1; //The base fault message.
optional float lengthFromTerminal1 = 2; //The length to the place where the fault is located starting from terminal with sequence number 1 of the faulted line segment.
optional float lengthUncertainty = 3; //The +/- uncertainty on the reported length.
}
/*
A fault applied at the terminal, external to the equipment. This class is not used to specify faults internal to the equipment.
This message is modeled after [CIM EquipmentFault](https://zepben.github.io/evolve/docs/cim/cim100/TC57CIM/IEC61970/Base/Faults/EquipmentFault) according to the extensions defined in the [fault-data-storage](https://github.com/zaphiro-technologies/architecture/blob/main/features/31-fault-data-storage.md#data-structures) feature.
Certain fields of the `EquipmentFault` event message may be populated only in case of event type `FAULT_EVENT_TYPE_LOCATED` (i.e. `terminalID`).
Headers used in rabbitMQ:
* `id` (string): id of the `Fault`
* `type` (string): always `EquipmentFault`
* `producerId` (string): the id of the producer (e.g. a PMU) linked to the notification.
*/
message EquipmentFault {
Fault fault = 1; //The base fault message.
optional string terminalID = 2; //The terminal connecting to the bus to which the fault is applied.
}
message FaultMeasurement {
bool positiveSign = 1; // The sign to be used for the measurement (`true` positive, `false` negative).
string measurementID = 2; // The ID of a measurement used to locate the fault.
}