Skip to content

Commit e442d38

Browse files
authoredDec 13, 2024··
Merge pull request #586 from jinningwang/bias
2 parents b771d98 + 23ee2ee commit e442d38

File tree

2 files changed

+24
-5
lines changed

2 files changed

+24
-5
lines changed
 

‎andes/models/area.py

+22-5
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,29 @@ class ACEData(ModelData):
5656
def __init__(self):
5757
ModelData.__init__(self)
5858
self.bus = IdxParam(model='Bus', info="bus idx for freq. measurement", mandatory=True)
59-
self.bias = NumParam(default=1.0, info='bias parameter', tex_name=r'\beta',
60-
unit='MW/0.1Hz', power=True)
59+
self.bias = NumParam(default=-1.0, info='bias parameter', tex_name='B',
60+
unit='MW/0.1Hz', power=True, non_positive=True)
6161

6262
self.busf = IdxParam(info='Optional BusFreq device idx', model='BusFreq',
6363
default=None)
6464

6565

6666
class ACEc(ACEData, Model):
6767
"""
68-
Area Control Error model.
68+
Area Control Error model, where bias (B) is an approximation of the actual frequency response (:math:`\\beta`).
69+
Given NERC's definition, the bias should be a negative number.
6970
7071
Continuous frequency sampling.
7172
System base frequency from ``system.config.freq`` is used.
7273
7374
Note: area idx is automatically retrieved from `bus`.
75+
76+
Reference:
77+
78+
NERC, "Balancing and Frequency Control Reference Document, Chapter 1 Balancing Fundamentals: Bias
79+
(B) vs. Frequency Response (Beta)", 2021. Available:
80+
81+
https://www.nerc.com/comm/RSTC_Reliability_Guidelines/Reference_Document_NERC_Balancing_and_Frequency_Control.pdf
7482
"""
7583

7684
def __init__(self, system, config):
@@ -103,10 +111,12 @@ def __init__(self, system, config):
103111
info='Bus frequency',
104112
unit='p.u. (Hz)'
105113
)
114+
# NOTE: here, we use -abs(bias) to ensure that bias is negative to ensure compatibility
115+
# with previous versions
106116
self.ace = Algeb(info='area control error',
107117
unit='p.u. (MW)',
108118
tex_name='ace',
109-
e_str='10 * (bias * imva) * sys_f * (f - 1) - ace',
119+
e_str='- 10 * (-abs(bias) * imva) * sys_f * (f - 1) - ace',
110120
)
111121

112122

@@ -122,6 +132,13 @@ class ACE(ACEc):
122132
can be specified in ``ACE.config.offset``.
123133
124134
Note: area idx is automatically retrieved from `bus`.
135+
136+
Reference:
137+
138+
NERC, "Balancing and Frequency Control Reference Document, Chapter 1 Balancing Fundamentals: ACE Review",
139+
2021. Available:
140+
141+
https://www.nerc.com/comm/RSTC_Reliability_Guidelines/Reference_Document_NERC_Balancing_and_Frequency_Control.pdf
125142
"""
126143

127144
def __init__(self, system, config):
@@ -140,4 +157,4 @@ def __init__(self, system, config):
140157
info='Sampled freq.',
141158
)
142159

143-
self.ace.e_str = '10 * (bias * imva) * sys_f * (fs_v - 1) - ace'
160+
self.ace.e_str = '- 10 * (bias * imva) * sys_f * (fs_v - 1) - ace'

‎docs/source/release-notes.rst

+2
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ Other changes:
4646
- Enhanced three-winding transformer parsing in PSS/E raw files by assigning the equivalent star bus ``area``,
4747
``owner``, and ``zone`` using the high-voltage bus values.
4848
- Minor fix on model ``TGOV1NDB``
49+
- Clarification on models ``ACEc`` and ``ACE`` given NERC's definition, as NERC suggesst that both bias and beta
50+
should be nevative
4951

5052
v1.9.2 (2024-03-25)
5153
-------------------

0 commit comments

Comments
 (0)
Please sign in to comment.