DPsim
Loading...
Searching...
No Matches
Base_SynchronGenerator.cpp
1/* Copyright 2017-2021 Institute for Automation of Complex Power Systems,
2 * EONERC, RWTH Aachen University
3 *
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
7 *********************************************************************************/
8
9#include <dpsim-models/Base/Base_SynchronGenerator.h>
10
11using namespace CPS;
12
13void Base::SynchronGenerator::setBaseParameters(Real nomPower, Real nomVolt,
14 Real nomFreq) {
15 mNomPower = nomPower;
16 mNomVolt = nomVolt;
17 mNomFreq = nomFreq;
18 mNomOmega = nomFreq * 2 * PI;
19
20 // Set base stator values
21 mBase_V_RMS = mNomVolt / sqrt(3);
22 mBase_V = mBase_V_RMS * sqrt(2);
24 mBase_I = mBase_I_RMS * sqrt(2);
26
30
33}
34
35void Base::SynchronGenerator::setBaseParameters(Real nomPower, Real nomVolt,
36 Real nomFreq,
37 Real nomFieldCur) {
38 mNomFieldCur = nomFieldCur;
39 Base::SynchronGenerator::setBaseParameters(nomPower, nomVolt, nomFreq);
40}
41
43 Real nomPower, Real nomVolt, Real nomFreq, Real nomFieldCur, Int poleNumber,
44 Real Rs, Real Ll, Real Lmd, Real Lmq, Real Rfd, Real Llfd, Real Rkd,
45 Real Llkd, Real Rkq1, Real Llkq1, Real Rkq2, Real Llkq2, Real inertia) {
46 mParameterType = ParameterType::perUnit;
47 mNumericalMethod = NumericalMethod::Trapezoidal;
48
49 setBaseParameters(nomPower, nomVolt, nomFreq, nomFieldCur);
50 setAndApplyFundamentalPerUnitParameters(poleNumber, Rs, Ll, Lmd, Lmq, Rfd,
51 Llfd, Rkd, Llkd, Rkq1, Llkq1, Rkq2,
52 Llkq2, inertia);
53}
54
56 Real nomPower, Real nomVolt, Real nomFreq, Int poleNumber, Real nomFieldCur,
57 Real Rs, Real Ld, Real Lq, Real Ld_t, Real Lq_t, Real Ld_s, Real Lq_s,
58 Real Ll, Real Td0_t, Real Tq0_t, Real Td0_s, Real Tq0_s, Real inertia) {
59 mParameterType = ParameterType::perUnit;
60 mNumericalMethod = NumericalMethod::Trapezoidal;
61
62 setBaseParameters(nomPower, nomVolt, nomFreq, nomFieldCur);
63 setOperationalPerUnitParameters(poleNumber, inertia, Rs, Ld, Lq, Ll, Ld_t,
64 Lq_t, Ld_s, Lq_s, Td0_t, Tq0_t, Td0_s, Tq0_s);
65 calculateFundamentalFromOperationalParameters();
66}
67
68void Base::SynchronGenerator::setOperationalPerUnitParameters(
69 Int poleNumber, Real inertia, Real Rs, Real Ld, Real Lq, Real Ll, Real Ld_t,
70 Real Lq_t, Real Ld_s, Real Lq_s, Real Td0_t, Real Tq0_t, Real Td0_s,
71 Real Tq0_s) {
72 mPoleNumber = poleNumber;
73 **mInertia = inertia;
74
75 **mRs = Rs;
76 **mLl = Ll;
77 **mLd = Ld;
78 **mLq = Lq;
79
80 **mLd_t = Ld_t;
81 **mLq_t = Lq_t;
82 **mLd_s = Ld_s;
83 **mLq_s = Lq_s;
84 **mTd0_t = Td0_t;
85 **mTq0_t = Tq0_t;
86 **mTd0_s = Td0_s;
87 **mTq0_s = Tq0_s;
88}
89
90void Base::SynchronGenerator::setAndApplyFundamentalPerUnitParameters(
91 Int poleNumber, Real Rs, Real Ll, Real Lmd, Real Lmq, Real Rfd, Real Llfd,
92 Real Rkd, Real Llkd, Real Rkq1, Real Llkq1, Real Rkq2, Real Llkq2,
93 Real inertia) {
94 Base::SynchronGenerator::setFundamentalPerUnitParameters(
95 poleNumber, Rs, Ll, Lmd, Lmq, Rfd, Llfd, Rkd, Llkd, Rkq1, Llkq1, Rkq2,
96 Llkq2, inertia);
97
98 Base::SynchronGenerator::applyFundamentalPerUnitParameters();
99}
100
101void Base::SynchronGenerator::setFundamentalPerUnitParameters(
102 Int poleNumber, Real Rs, Real Ll, Real Lmd, Real Lmq, Real Rfd, Real Llfd,
103 Real Rkd, Real Llkd, Real Rkq1, Real Llkq1, Real Rkq2, Real Llkq2,
104 Real inertia) {
105 // PoleNumber otherwise not set but currently not used in SynchronGeneratorDQ
106 mPoleNumber = poleNumber;
107 **mInertia = inertia;
108
109 **mRs = Rs;
110 **mLl = Ll;
111 mLmd = Lmd;
112 mLmq = Lmq;
113
114 mRfd = Rfd;
115 mLlfd = Llfd;
116 mRkd = Rkd;
117 mLlkd = Llkd;
118 mRkq1 = Rkq1;
119 mLlkq1 = Llkq1;
120 mRkq2 = Rkq2;
121 mLlkq2 = Llkq2;
122}
123
124void Base::SynchronGenerator::applyFundamentalPerUnitParameters() {
125 // derive further parameters
126 **mLd = **mLl + mLmd;
127 **mLq = **mLl + mLmq;
128 mLfd = mLlfd + mLmd;
129 mLkd = mLlkd + mLmd;
130 mLkq1 = mLlkq1 + mLmq;
131 mLkq2 = mLlkq2 + mLmq;
132
133 // base rotor values
134 mBase_ifd = mLmd * mNomFieldCur;
135 mBase_vfd = mNomPower / mBase_ifd;
136 mBase_Zfd = mBase_vfd / mBase_ifd;
137 mBase_Lfd = mBase_Zfd / mBase_OmElec;
138
139 // derive number of damping windings
140 if (mRkq2 == 0 && mLlkq2 == 0)
141 mNumDampingWindings = 1;
142 else
143 mNumDampingWindings = 2;
144
145 if (mNumDampingWindings == 1) {
146 mVsr = Matrix::Zero(6, 1);
147 mIsr = Matrix::Zero(6, 1);
148 mPsisr = Matrix::Zero(6, 1);
149 mInductanceMat = Matrix::Zero(6, 6);
150 mResistanceMat = Matrix::Zero(6, 6);
151
152 // Determinant of Lq(inductance matrix of q axis)
153 // Real detLq = -(mLl + mLmq)*(mLlkq1 + mLmq) + mLmq*mLmq;
154 // Determinant of Ld (inductance matrix of d axis)
155 // Real detLd = (mLmd + mLl)*(-mLlfd*mLlkd - mLlfd*mLmd - mLmd*mLlkd) +
156 // mLmd*mLmd*(mLlfd + mLlkd);
157
158 mInductanceMat << **mLd, mLmd, mLmd, 0, 0, 0, mLmd, mLfd, mLmd, 0, 0, 0,
159 mLmd, mLmd, mLkd, 0, 0, 0, 0, 0, 0, **mLq, mLmq, 0, 0, 0, 0, mLmq,
160 mLkq1, 0, 0, 0, 0, 0, 0, **mLl;
161
162 mResistanceMat << **mRs, 0, 0, 0, 0, 0, 0, mRfd, 0, 0, 0, 0, 0, 0, mRkd, 0,
163 0, 0, 0, 0, 0, **mRs, 0, 0, 0, 0, 0, 0, mRkq1, 0, 0, 0, 0, 0, 0, **mRs;
164
165 // Compute inverse Inductance Matrix:
166 mInvInductanceMat = mInductanceMat.inverse();
167 } else {
168 mVsr = Matrix::Zero(7, 1);
169 mIsr = Matrix::Zero(7, 1);
170 mPsisr = Matrix::Zero(7, 1);
171 mInductanceMat = Matrix::Zero(7, 7);
172 mResistanceMat = Matrix::Zero(7, 7);
173
174 // Determinant of Lq(inductance matrix of q axis)
175 // Real detLq = -mLmq*mLlkq2*(mLlkq1 + mLl) - mLl*mLlkq1*(mLlkq2 + mLmq);
176 // Determinant of Ld (inductance matrix of d axis)
177 // Real detLd = (mLmd + mLl)*(-mLlfd*mLlkd - mLlfd*mLmd - mLmd*mLlkd) +
178 // mLmd*mLmd*(mLlfd + mLlkd);
179
180 mInductanceMat << **mLd, mLmd, mLmd, 0, 0, 0, 0, mLmd, mLfd, mLmd, 0, 0, 0,
181 0, mLmd, mLmd, mLkd, 0, 0, 0, 0, 0, 0, 0, **mLq, mLmq, mLmq, 0, 0, 0, 0,
182 mLmq, mLkq1, mLmq, 0, 0, 0, 0, mLmq, mLmq, mLkq2, 0, 0, 0, 0, 0, 0, 0,
183 **mLl;
184
185 mResistanceMat << **mRs, 0, 0, 0, 0, 0, 0, 0, mRfd, 0, 0, 0, 0, 0, 0, 0,
186 mRkd, 0, 0, 0, 0, 0, 0, 0, **mRs, 0, 0, 0, 0, 0, 0, 0, mRkq1, 0, 0, 0,
187 0, 0, 0, 0, mRkq2, 0, 0, 0, 0, 0, 0, 0, **mRs;
188
189 // Compute inverse Inductance Matrix:
190 mInvInductanceMat = mInductanceMat.inverse();
191 }
192}
193
194void Base::SynchronGenerator::calculateFundamentalFromOperationalParameters() {
195 mLmd = **mLd - **mLl;
196 mLmq = **mLq - **mLl;
197
198 mLlfd = mLmd * (**mLd_t - **mLl) / (mLmd - **mLd_t + **mLl);
199 mLlkq1 = mLmq * (**mLq_t - **mLl) / (mLmq - **mLq_t + **mLl);
200
201 mLlkd = mLmd * mLlfd * (**mLd_s - **mLl) /
202 (mLlfd * mLmd - (mLmd + mLlfd) * (**mLd_s - **mLl));
203 mLlkq2 = mLmq * mLlkq1 * (**mLq_s - **mLl) /
204 (mLlkq1 * mLmq - (mLmq + mLlkq1) * (**mLq_s - **mLl));
205
206 mRfd = (mLmd + mLlfd) / (**mTd0_t * mNomOmega);
207 mRkd = (1 / (**mTd0_s * mNomOmega)) * (mLlkd + mLmd * mLlfd / (mLmd + mLlfd));
208 mRkq1 = (mLmq + mLlkq1) / (**mTq0_t * mNomOmega);
209 mRkq2 =
210 (1 / (**mTq0_s * mNomOmega)) * (mLlkq2 + mLmq * mLlkq1 / (mLmq + mLlkq1));
211
212 Base::SynchronGenerator::applyFundamentalPerUnitParameters();
213}
214
215void Base::SynchronGenerator::setInitialValues(Real initActivePower,
216 Real initReactivePower,
217 Real initTerminalVolt,
218 Real initVoltAngle,
219 Real initMechPower) {
220 mInitElecPower = Complex(initActivePower, initReactivePower);
221 mInitTerminalVoltage = initTerminalVolt;
222 mInitVoltAngle = initVoltAngle;
223 mInitMechPower = initMechPower;
224 mInitialValuesSet = true;
225}
226
228 // Power in per unit
229 Real init_P = mInitElecPower.real() / mNomPower;
230 Real init_Q = mInitElecPower.imag() / mNomPower;
231 Real init_S_abs = sqrt(pow(init_P, 2.) + pow(init_Q, 2.));
232 // Complex init_S = mInitElecPower;
233 // Terminal voltage in pu
234 Real init_vt_abs = mInitTerminalVoltage / mBase_V;
235 // Complex init_vt = Complex(mInitTerminalVoltage*cos(mInitVoltAngle),
236 // mInitTerminalVoltage*sin(mInitVoltAngle));
237 Real init_it_abs = init_S_abs / init_vt_abs;
238 // Complex init_it = std::conj( init_S / init_vt );
239 // Power factor
240 Real init_pf = acos(init_P / init_S_abs);
241 // Load angle
242 Real init_delta = atan(((mLmq + **mLl) * init_it_abs * cos(init_pf) -
243 **mRs * init_it_abs * sin(init_pf)) /
244 (init_vt_abs + **mRs * init_it_abs * cos(init_pf) +
245 (mLmq + **mLl) * init_it_abs * sin(init_pf)));
246 // Real init_delta_deg = init_delta / PI * 180;
247
248 // Electrical torque
249 // Real init_Te = init_P + **mRs * pow(init_it, 2.);
250
251 // dq stator voltages and currents
252 Real init_vd = init_vt_abs * sin(init_delta);
253 Real init_vq = init_vt_abs * cos(init_delta);
254 Real init_id = init_it_abs * sin(init_delta + init_pf);
255 Real init_iq = init_it_abs * cos(init_delta + init_pf);
256
257 // Rotor voltage and current
258 Real init_ifd = (init_vq + **mRs * init_iq + (mLmd + **mLl) * init_id) / mLmd;
259 Real init_vfd = mRfd * init_ifd;
260
261 // Flux linkages
262 Real init_psid = init_vq + **mRs * init_iq;
263 Real init_psiq = -init_vd - **mRs * init_id;
264 Real init_psifd = mLfd * init_ifd - mLmd * init_id;
265 Real init_psikd = mLmd * (init_ifd - init_id);
266 Real init_psiq1 = -mLmq * init_iq;
267 Real init_psiq2 = -mLmq * init_iq;
268
269 // Initialize mechanical variables
270 **mOmMech = 1;
271 **mMechPower = mInitMechPower / mNomPower;
272 **mMechTorque = **mMechPower / 1;
273 mThetaMech = mInitVoltAngle + init_delta - PI / 2.;
274 **mDelta = init_delta;
275
276 if (mNumDampingWindings == 2) {
277 mVsr << init_vd, init_vfd, 0, init_vq, 0, 0, 0;
278 mIsr << -init_id, init_ifd, 0, -init_iq, 0, 0, 0;
279 mPsisr << init_psid, init_psifd, init_psikd, init_psiq, init_psiq1,
280 init_psiq2, 0;
281 } else {
282 mVsr << init_vd, init_vfd, 0, init_vq, 0, 0;
283 mIsr << -init_id, init_ifd, 0, -init_iq, 0, 0;
284 mPsisr << init_psid, init_psifd, init_psikd, init_psiq, init_psiq1, 0;
285 }
286
287 if (mNumDampingWindings == 2) {
288 mVsr << init_vd, init_vfd, 0, init_vq, 0, 0, 0;
289 mIsr << -init_id, init_ifd, 0, -init_iq, 0, 0, 0;
290 mPsisr << init_psid, init_psifd, init_psikd, init_psiq, init_psiq1,
291 init_psiq2, 0;
292 } else {
293 mVsr << init_vd, init_vfd, 0, init_vq, 0, 0;
294 mIsr << -init_id, init_ifd, 0, -init_iq, 0, 0;
295 mPsisr << init_psid, init_psifd, init_psikd, init_psiq, init_psiq1, 0;
296 }
297
298 **mElecTorque = (mPsisr(3, 0) * mIsr(0, 0) - mPsisr(0, 0) * mIsr(3, 0));
299
300 // Initialize controllers
301 if (mHasExciter) {
302 // Note: field voltage scaled by Lmd/Rfd to transform from synchronous generator pu system
303 // to the exciter pu system
304 mExciter->initialize(init_vt_abs, (mLmd / mRfd) * init_vfd);
305 }
306}
307
308void Base::SynchronGenerator::calcStateSpaceMatrixDQ() {
309 if (mNumDampingWindings == 2) {
310 mLad = 1. / (1. / mLmd + 1. / **mLl + 1. / mLlfd + 1. / mLlkd);
311 mLaq = 1. / (1. / mLmq + 1. / **mLl + 1. / mLlkq1 + 1. / mLlkq2);
312
313 mPsisr = Matrix::Zero(7, 1);
314
315 mOmegaFluxMat = Matrix::Zero(7, 7);
316 mOmegaFluxMat << 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
317 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
318 0, 0, 0, 0, 0;
319
320 mFluxStateSpaceMat =
321 Matrix::Zero(7, 7); // order of lambdas: ds; fd; kd; qs; kq1; kq2; 0s
322 mFluxStateSpaceMat << **mRs / **mLl * mLad / **mLl - **mRs / **mLl,
323 **mRs / **mLl * mLad / mLlfd, **mRs / **mLl * mLad / mLlkd, 0, 0, 0, 0,
324 mRfd / mLlfd * mLad / **mLl, mRfd / mLlfd * mLad / mLlfd - mRfd / mLlfd,
325 mRfd / mLlfd * mLad / mLlkd, 0, 0, 0, 0, mRkd / mLlkd * mLad / **mLl,
326 mRkd / mLlkd * mLad / mLlfd, mRkd / mLlkd * mLad / mLlkd - mRkd / mLlkd,
327 0, 0, 0, 0, 0, 0, 0, **mRs / **mLl * mLaq / **mLl - **mRs / **mLl,
328 **mRs / **mLl * mLaq / mLlkq1, **mRs / **mLl * mLaq / mLlkq2, 0, 0, 0,
329 0, mRkq1 / mLlkq1 * mLaq / **mLl,
330 mRkq1 / mLlkq1 * mLaq / mLlkq1 - mRkq1 / mLlkq1,
331 mRkq1 / mLlkq1 * mLaq / mLlkq2, 0, 0, 0, 0,
332 mRkq2 / mLlkq2 * mLaq / **mLl, mRkq2 / mLlkq2 * mLaq / mLlkq1,
333 mRkq2 / mLlkq2 * mLaq / mLlkq2 - mRkq2 / mLlkq2, 0, 0, 0, 0, 0, 0, 0,
334 -**mRs / **mLl;
335
336 mFluxToCurrentMat =
337 Matrix::Zero(7, 7); // need for electric torque id, iq ->1st and 4th row
338 mFluxToCurrentMat << 1. / **mLl - mLad / **mLl / **mLl,
339 -mLad / mLlfd / **mLl, -mLad / mLlkd / **mLl, 0, 0, 0, 0,
340 -mLad / **mLl / mLlfd, 1. / mLlfd - mLad / mLlfd / mLlfd,
341 -mLad / mLlkd / mLlfd, 0, 0, 0, 0, -mLad / **mLl / mLlkd,
342 -mLad / mLlfd / mLlkd, 1. / mLlkd - mLad / mLlkd / mLlkd, 0, 0, 0, 0, 0,
343 0, 0, 1. / **mLl - mLaq / **mLl / **mLl, -mLaq / mLlkq1 / **mLl,
344 -mLaq / mLlkq2 / **mLl, 0, 0, 0, 0, -mLaq / **mLl / mLlkq1,
345 1. / mLlkq1 - mLaq / mLlkq1 / mLlkq1, -mLaq / mLlkq2 / mLlkq1, 0, 0, 0,
346 0, -mLaq / **mLl / mLlkq2, -mLaq / mLlkq1 / mLlkq2,
347 1. / mLlkq2 - mLaq / mLlkq2 / mLlkq2, 0, 0, 0, 0, 0, 0, 0, 1. / **mLl;
348 } else {
349 mLad = 1. / (1. / mLmd + 1. / **mLl + 1. / mLlfd + 1. / mLlkd);
350 mLaq = 1. / (1. / mLmq + 1. / **mLl + 1. / mLlkq1);
351
352 mPsisr = Matrix::Zero(6, 1);
353
354 mOmegaFluxMat = Matrix::Zero(6, 6);
355 mOmegaFluxMat << 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1,
356 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
357
358 mFluxStateSpaceMat = Matrix::Zero(6, 6);
359 mFluxStateSpaceMat << // same order as above; only without kq2
360 **mRs / **mLl * mLad / **mLl - **mRs / **mLl,
361 **mRs / **mLl * mLad / mLlfd, **mRs / **mLl * mLad / mLlkd, 0, 0, 0,
362 mRfd / mLlfd * mLad / **mLl, mRfd / mLlfd * mLad / mLlfd - mRfd / mLlfd,
363 mRfd / mLlfd * mLad / mLlkd, 0, 0, 0, mRkd / mLlkd * mLad / **mLl,
364 mRkd / mLlkd * mLad / mLlfd, mRkd / mLlkd * mLad / mLlkd - mRkd / mLlkd,
365 0, 0, 0, 0, 0, 0, **mRs / **mLl * mLaq / **mLl - **mRs / **mLl,
366 **mRs / **mLl * mLaq / mLlkq1, 0, 0, 0, 0,
367 mRkq1 / mLlkq1 * mLaq / **mLl,
368 mRkq1 / mLlkq1 * mLaq / mLlkq1 - mRkq1 / mLlkq1, 0, 0, 0, 0, 0, 0,
369 -**mRs / **mLl;
370
371 mFluxToCurrentMat = Matrix::Zero(6, 6);
372 mFluxToCurrentMat << 1. / **mLl - mLad / **mLl / **mLl,
373 -mLad / mLlfd / **mLl, -mLad / mLlkd / **mLl, 0, 0, 0,
374 -mLad / **mLl / mLlfd, 1. / mLlfd - mLad / mLlfd / mLlfd,
375 -mLad / mLlkd / mLlfd, 0, 0, 0, -mLad / **mLl / mLlkd,
376 -mLad / mLlfd / mLlkd, 1. / mLlkd - mLad / mLlkd / mLlkd, 0, 0, 0, 0, 0,
377 0, 1. / **mLl - mLaq / **mLl / **mLl, -mLaq / mLlkq1 / **mLl, 0, 0, 0,
378 0, -mLaq / **mLl / mLlkq1, 1. / mLlkq1 - mLaq / mLlkq1 / mLlkq1, 0, 0,
379 0, 0, 0, 0, 1. / **mLl;
380 }
381}
382
383Real Base::SynchronGenerator::calcHfromJ(Real J, Real omegaNominal,
384 Int polePairNumber) {
385 return J * 0.5 * omegaNominal * omegaNominal / polePairNumber;
386}
387
388void Base::SynchronGenerator::addExciter(Real Ta, Real Ka, Real Te, Real Ke,
389 Real Tf, Real Kf, Real Tr) {
390 mExciter = Signal::Exciter::make("Exciter", CPS::Logger::Level::info);
391 mExciter->setParameters(Ta, Ka, Te, Ke, Tf, Kf, Tr);
392 mHasExciter = true;
393}
394
395void Base::SynchronGenerator::addGovernor(Real Ta, Real Tb, Real Tc, Real Fa,
396 Real Fb, Real Fc, Real K, Real Tsr,
397 Real Tsm, Real Tm_init, Real PmRef) {
398 mTurbineGovernor = Signal::TurbineGovernor::make("TurbineGovernor",
399 CPS::Logger::Level::info);
400 mTurbineGovernor->setParameters(Ta, Tb, Tc, Fa, Fb, Fc, K, Tsr, Tsm);
401 mTurbineGovernor->initialize(PmRef, Tm_init);
402 mHasTurbineGovernor = true;
403}
Matrix mIsr
Vector of stator and rotor currents.
Real mNomFreq
nominal frequency fn [Hz]
Real mLmd
d-axis mutual inductance Lmd [H]
Real mBase_I
base stator current peak
Bool mHasExciter
Determines if Exciter is activated.
std::shared_ptr< Signal::Exciter > mExciter
Signal component modelling voltage regulator and exciter.
const Attribute< Real >::Ptr mMechTorque
mechanical torque
Real mLmq
q-axis mutual inductance Lmq [H]
Real mBase_I_RMS
base stator current RMS
const Attribute< Real >::Ptr mMechPower
mechanical Power Pm [W]
Real mNomVolt
nominal voltage Vn [V] (phase-to-phase RMS)
Matrix mVsr
Vector of stator and rotor voltages.
Matrix mPsisr
Vector of stator and rotor fluxes.
Real mBase_L
base stator inductance
Real mBase_Z
base stator impedance
void addExciter(Real Ta, Real Ka, Real Te, Real Ke, Real Tf, Real Kf, Real Tr)
Add voltage regulator and exciter.
const Attribute< Real >::Ptr mRs
stator resistance Rs [Ohm]
void addGovernor(Real Ta, Real Tb, Real Tc, Real Fa, Real Fb, Real Fc, Real K, Real Tsr, Real Tsm, Real Tm_init, Real PmRef)
Add governor and turbine.
std::shared_ptr< Signal::TurbineGovernor > mTurbineGovernor
Signal component modelling governor control and steam turbine.
void setBaseAndFundamentalPerUnitParameters(Real nomPower, Real nomVolt, Real nomFreq, Real nomFieldCur, Int poleNumber, Real Rs, Real Ll, Real Lmd, Real Lmq, Real Rfd, Real Llfd, Real Rkd, Real Llkd, Real Rkq1, Real Llkq1, Real Rkq2, Real Llkq2, Real inertia)
Initializes the base and fundamental machine parameters in per unit.
Real mRfd
field resistance Rfd [Ohm]
Real mNomOmega
nominal angular frequency wn [Hz]
Real mBase_OmElec
base electrical angular frequency
const Attribute< Real >::Ptr mLl
leakage inductance Ll [H]
Real mBase_OmMech
base mechanical angular frequency
const Attribute< Real >::Ptr mDelta
rotor angle delta
Real mLfd
field inductance Lfd [H]
Int mNumDampingWindings
Number of damping windings in q.
Real mBase_V
base stator voltage (phase-to-ground peak)
Real mNomPower
nominal power Pn [VA]
void setBaseAndOperationalPerUnitParameters(Real nomPower, Real nomVolt, Real nomFreq, Int poleNumber, Real nomFieldCur, Real Rs, Real Ld, Real Lq, Real Ld_t, Real Lq_t, Real Ld_s, Real Lq_s, Real Ll, Real Td0_t, Real Tq0_t, Real Td0_s, Real Tq0_s, Real inertia)
const Attribute< Real >::Ptr mOmMech
rotor speed omega_r
Bool mHasTurbineGovernor
Determines if Turbine and Governor are activated.
const Attribute< Real >::Ptr mElecTorque
electrical torque
Real mBase_V_RMS
base stator voltage (phase-to-ground RMS)