DPsim
Loading...
Searching...
No Matches
TurbineGovernor.cpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 Institute for Automation of Complex Power Systems, EONERC, RWTH Aachen University
2// SPDX-License-Identifier: MPL-2.0
3
6
7using namespace CPS;
8using namespace CPS::Signal;
9
11 Real Fc, Real K, Real Tsr, Real Tsm) {
12 mTa = Ta;
13 mTb = Tb;
14 mTc = Tc;
15 mFa = Fa;
16 mFb = Fb;
17 mFc = Fc;
18
19 mK = K;
20 mTsr = Tsr;
21 mTsm = Tsm;
22
23 SPDLOG_LOGGER_INFO(mSLog,
24 "Turbine parameters: \n"
25 "Ta: {:e}\nTb: {:e}\nTc: {:e}\n"
26 "Fa: {:e}\nFb: {:e}\nFc: {:e}\n",
27 mTa, mTb, mTc, mFa, mFb, mFc);
28
29 SPDLOG_LOGGER_INFO(mSLog,
30 "Governor parameters: \n"
31 "K: {:e}\nTsr: {:e}\nTsm: {:e}\n",
32 mK, mTsr, mTsm);
33}
34
36 mTm = Tm_init;
37 T1 = (1 - mFa) * PmRef;
38 T2 = mFa * PmRef;
39
40 SPDLOG_LOGGER_INFO(mSLog,
41 "Turbine initial values: \n"
42 "init_Tm: {:e}\ninit_T1: {:e}\ninit_T2: {:e}\n",
43 mTm, T1, T2);
44
45 mVcv = PmRef;
46 mpVcv = 0;
47 Psm_in = PmRef;
48
49 SPDLOG_LOGGER_INFO(mSLog,
50 "Governor initial values: \n"
51 "init_Vcv: {:e}\ninit_pVcv: {:e}\ninit_Psm_in: {:e}\n",
52 mVcv, mpVcv, Psm_in);
53}
54
56 // ### Governing ###
57 // Modelled according to V. Sapucaia-Gunzenhauser, "Modeling and Simulation of Rotating Machines", p.45
58
59 // Input of speed relay
60 Psr_in = PmRef + (OmRef - Om) * mK;
61
62 // Input of servor motor
64
65 // rate of change of valve
66 // including limiter with upper bound 0.1pu/s and lower bound -1.0pu/s
67 mpVcv = (Psm_in - mVcv) / mTsm;
68 if (mpVcv >= 0.1)
69 mpVcv = 0.1;
70 else if (mpVcv <= -1)
71 mpVcv = -1;
72
73 // valve position
74 // including limiter with upper bound 1 and lower bound 0
75 mVcv = mVcv + dt * mpVcv;
76 if (mVcv >= 1)
77 mVcv = 1;
78 else if (mVcv <= 0)
79 mVcv = 0;
80
81 // ### Turbine ###
82 // Simplified Single Reheat Tandem-Compound Steam Turbine
83 // Modelled according to V. Sapucaia-Gunzenhauser, "Modeling and Simulation of Rotating Machines", p.44
84
85 T1 = Math::StateSpaceEuler(T1, -1 / mTb, 1 / mTb, dt, mVcv);
86 T2 = mVcv * mFa;
87 mTm = (mFb + mFc) * T1 + T2;
88
89 return mTm;
90}
static Matrix StateSpaceEuler(Matrix states, Matrix A, Matrix B, Real dt, Matrix u)
Real Psm_in
Input of servor motor.
void initialize(Real PmRef, Real Tm_init)
Real mFb
Fraction of total turbine power generated by IP section.
Real mTsm
Time constant of servo motor.
Real mTb
Time constant of reheater.
Real mTa
Time constant of main inlet volume and steam chest.
Real mFc
Fraction of total turbine power generated by LP section.
Real mTc
Time constant of cross over piping and LP inlet volumes.
Real mpVcv
Valve position changing rate.
Real step(Real mOm, Real mOmRef, Real PmRef, Real dt)
Performs an step to update field voltage value.
Real mTsr
Time constant of speed relay.
Real mFa
Fraction of total turbine power generated by HP section.
Real mTm
Mechanical Torque in pu (output of steam turbine)
Real Psr_in
Input of speed realy.
void setParameters(Real Ta, Real Tb, Real Tc, Real Fa, Real Fb, Real Fc, Real K, Real Tsr, Real Tsm)
Initializes exciter parameters.
Logger::Log mSLog
Component logger.
double Real
Definition Definitions.h:62