-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1529c82
commit 6eb88b3
Showing
11 changed files
with
2,968 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# IEC 61850 Module | ||
|
||
## Initial Design Approach | ||
|
||
Predefined OT devices | ||
* WTG main controller, yaw controller, blade controller, etc | ||
* Specific, hard-coded tags for each controller | ||
* Enabled via specific elements in OT-sim XML config | ||
|
||
Alternatively, the WTG main controller could provide a 61400-25 IED via MMS | ||
externally, and still use Modbus internally. | ||
|
||
## Future Design Goals | ||
|
||
Fully composable and configurable devices using relevant portions of CID files | ||
in OT-sim XML config. | ||
* Shoot for fully dynamic creation of LDs, LNs, DOs, DAs, etc at runtime | ||
* May require precompilation step at runtime (like examples are now) | ||
|
||
## Predefined Devices | ||
|
||
### WTG Blade Controller | ||
|
||
* LD: | ||
* LN: | ||
* DO: | ||
* DA: | ||
|
||
### Wind Turbine (WTUR) | ||
|
||
iec61400-25-2{ed2.0}b.pdf - pg 22 | ||
|
||
Inherits from "Wind Power Plant Common" - pg 19 | ||
|
||
> Does WTUR need NamPlt, Beh, Health, and Mod since LLN0 already has it? What | ||
> would it be specific to for WTUR vs LLN0? Maybe for a plant-wide logical | ||
> device that has multiple WTUR nodes? | ||
> Turns out it just needs Beh. The others are only mandatory in LLN0 for the | ||
> root LD. A physical device may have multiple logical devices if it's acting as | ||
> a concentrator, for example. | ||
* WTUR | ||
* NamPlt - LPL (iec61850-7-3{ed2.1}en.pdf - pg 106) | ||
* vendor - VisString255 | ||
* swRev - VisString255 | ||
* configRev - VisString255 | ||
* Beh - ENS (iec61850-7-3{ed2.1}en.pdf - pg 36) | ||
* stVal - EnumDA (of type BehaviourModeKind) | ||
* q - Quality | ||
* t - Timestamp | ||
* Health - ENS (iec61850-7-3{ed2.1}en.pdf - pg 36) | ||
* Mod - ENC (iec61850-7-3{ed2.1}en.pdf - pg 70) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#ifndef IED_H | ||
#define IED_H | ||
|
||
#include <stdlib.h> | ||
#include <libiec61850/iec61850_model.h> | ||
|
||
extern IedModel iedModel; | ||
extern LogicalDevice iedModel_WTG; | ||
|
||
#endif // IED_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#ifndef LLN0_H | ||
#define LLN0_H | ||
|
||
#include <stdlib.h> | ||
#include <libiec61850/iec61850_model.h> | ||
|
||
extern LogicalNode iedModel_WTG_LLN0; | ||
extern DataObject iedModel_WTG_LLN0_Mod; | ||
extern DataAttribute iedModel_WTG_LLN0_Mod_Oper; | ||
extern DataAttribute iedModel_WTG_LLN0_Mod_Oper_ctlVal; | ||
extern DataAttribute iedModel_WTG_LLN0_Mod_Oper_operTm; | ||
extern DataAttribute iedModel_WTG_LLN0_Mod_Oper_origin; | ||
extern DataAttribute iedModel_WTG_LLN0_Mod_Oper_origin_orCat; | ||
extern DataAttribute iedModel_WTG_LLN0_Mod_Oper_origin_orIdent; | ||
extern DataAttribute iedModel_WTG_LLN0_Mod_Oper_ctlNum; | ||
extern DataAttribute iedModel_WTG_LLN0_Mod_Oper_T; | ||
extern DataAttribute iedModel_WTG_LLN0_Mod_Oper_Test; | ||
extern DataAttribute iedModel_WTG_LLN0_Mod_Oper_Check; | ||
extern DataAttribute iedModel_WTG_LLN0_Mod_stVal; | ||
extern DataAttribute iedModel_WTG_LLN0_Mod_q; | ||
extern DataAttribute iedModel_WTG_LLN0_Mod_t; | ||
extern DataAttribute iedModel_WTG_LLN0_Mod_ctlModel; | ||
extern DataObject iedModel_WTG_LLN0_Beh; | ||
extern DataAttribute iedModel_WTG_LLN0_Beh_stVal; | ||
extern DataAttribute iedModel_WTG_LLN0_Beh_q; | ||
extern DataAttribute iedModel_WTG_LLN0_Beh_t; | ||
extern DataObject iedModel_WTG_LLN0_Health; | ||
extern DataAttribute iedModel_WTG_LLN0_Health_stVal; | ||
extern DataAttribute iedModel_WTG_LLN0_Health_q; | ||
extern DataAttribute iedModel_WTG_LLN0_Health_t; | ||
extern DataObject iedModel_WTG_LLN0_NamPlt; | ||
extern DataAttribute iedModel_WTG_LLN0_NamPlt_vendor; | ||
extern DataAttribute iedModel_WTG_LLN0_NamPlt_swRev; | ||
extern DataAttribute iedModel_WTG_LLN0_NamPlt_configRev; | ||
|
||
#endif // LLN0_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#ifndef LPHD_H | ||
#define LPHD_H | ||
|
||
#include <stdlib.h> | ||
#include <libiec61850/iec61850_model.h> | ||
|
||
extern LogicalNode iedModel_WTG_LPHD1; | ||
extern DataObject iedModel_WTG_LPHD1_NamPlt; | ||
extern DataAttribute iedModel_WTG_LPHD1_NamPlt_vendor; | ||
extern DataAttribute iedModel_WTG_LPHD1_NamPlt_swRev; | ||
extern DataAttribute iedModel_WTG_LPHD1_NamPlt_configRev; | ||
extern DataObject iedModel_WTG_LPHD1_PhyNam; | ||
extern DataAttribute iedModel_WTG_LPHD1_PhyNam_vendor; | ||
extern DataAttribute iedModel_WTG_LPHD1_PhyNam_hwRev; | ||
extern DataAttribute iedModel_WTG_LPHD1_PhyNam_swRev; | ||
extern DataAttribute iedModel_WTG_LPHD1_PhyNam_serNum; | ||
extern DataAttribute iedModel_WTG_LPHD1_PhyNam_model; | ||
extern DataObject iedModel_WTG_LPHD1_PhyHealth; | ||
extern DataAttribute iedModel_WTG_LPHD1_PhyHealth_stVal; | ||
extern DataAttribute iedModel_WTG_LPHD1_PhyHealth_q; | ||
extern DataAttribute iedModel_WTG_LPHD1_PhyHealth_t; | ||
extern DataObject iedModel_WTG_LPHD1_Proxy; | ||
extern DataAttribute iedModel_WTG_LPHD1_Proxy_stVal; | ||
extern DataAttribute iedModel_WTG_LPHD1_Proxy_q; | ||
extern DataAttribute iedModel_WTG_LPHD1_Proxy_t; | ||
|
||
#endif // LPHD_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#ifndef WTUR_H | ||
#define WTUR_H | ||
|
||
#include <stdlib.h> | ||
#include <libiec61850/iec61850_model.h> | ||
|
||
extern LogicalNode iedModel_WTG_WTUR1; | ||
|
||
extern DataObject iedModel_WTG_WTUR1_Beh; | ||
extern DataAttribute iedModel_WTG_WTUR1_Beh_stVal; | ||
extern DataAttribute iedModel_WTG_WTUR1_Beh_q; | ||
extern DataAttribute iedModel_WTG_WTUR1_Beh_t; | ||
|
||
extern DataObject iedModel_WTG_WTUR1_TotWh; | ||
|
||
extern DataObject iedModel_WTG_WTUR1_TotWh_cntVal; | ||
extern DataAttribute iedModel_WTG_WTUR1_TotWh_cntVal_actVal; | ||
extern DataAttribute iedModel_WTG_WTUR1_TotWh_cntVal_pulsQty; | ||
extern DataAttribute iedModel_WTG_WTUR1_TotWh_cntVal_q; | ||
extern DataAttribute iedModel_WTG_WTUR1_TotWh_cntVal_t; | ||
|
||
extern DataObject iedModel_WTG_WTUR1_TurSt; | ||
|
||
extern DataObject iedModel_WTG_WTUR1_TurSt_st; | ||
extern DataAttribute iedModel_WTG_WTUR1_TurSt_st_stVal; | ||
extern DataAttribute iedModel_WTG_WTUR1_TurSt_st_q; | ||
extern DataAttribute iedModel_WTG_WTUR1_TurSt_st_t; | ||
|
||
extern DataObject iedModel_WTG_WTUR1_W; | ||
|
||
extern DataAttribute iedModel_WTG_WTUR1_W_mag; | ||
extern DataAttribute iedModel_WTG_WTUR1_W_mag_i; | ||
extern DataAttribute iedModel_WTG_WTUR1_W_mag_f; | ||
extern DataAttribute iedModel_WTG_WTUR1_W_q; | ||
extern DataAttribute iedModel_WTG_WTUR1_W_t; | ||
|
||
extern DataObject iedModel_WTG_WTUR1_TurOp; | ||
|
||
extern DataObject iedModel_WTG_WTUR1_TurOp_st; | ||
extern DataAttribute iedModel_WTG_WTUR1_TurOp_st_stVal; | ||
extern DataAttribute iedModel_WTG_WTUR1_TurOp_st_q; | ||
extern DataAttribute iedModel_WTG_WTUR1_TurOp_st_t; | ||
|
||
#endif // WTUR_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#include "ied.h" | ||
#include "lln0.h" | ||
|
||
static void initializeValues() {} | ||
|
||
IedModel iedModel = { | ||
"WIND", | ||
&iedModel_WTG, | ||
NULL, | ||
NULL, | ||
NULL, | ||
NULL, | ||
NULL, | ||
NULL, | ||
NULL, | ||
initializeValues | ||
}; | ||
|
||
LogicalDevice iedModel_WTG = { | ||
LogicalDeviceModelType, | ||
"WTG", | ||
(ModelNode*) &iedModel, | ||
NULL, | ||
(ModelNode*) &iedModel_WTG_LLN0 | ||
}; |
Oops, something went wrong.