DPsim
Loading...
Searching...
No Matches
SteamTurbineGovernor.h
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
4#pragma once
5
9
10namespace CPS {
11namespace Signal {
12
14 public SharedFactory<SteamGovernorParameters> {
15public:
17 Real R = 0;
19 Real T1 = 0;
21 Real T2 = 0;
23 Real T3 = 0;
24
33
36
38 Real Kbc = 0;
39};
40
46 public Base::Governor,
47 public SharedFactory<SteamTurbineGovernor> {
48private:
49 std::shared_ptr<SteamGovernorParameters> mParameters;
50
51 // ### Setpoints ###
52 Real mPref = 0;
53
54 // ### State variables (previous step) ###
55 Real mDelOm_prev = 0;
56 Real mDelOm_2prev = 0;
57 Real mP1_prev = 0;
58
59 // ### State variables (current step) — loggable via .attr() ###
61 const Attribute<Real>::Ptr mDelOm;
63 const Attribute<Real>::Ptr mP1;
65 const Attribute<Real>::Ptr mP;
67 const Attribute<Real>::Ptr mPgvLim;
69 const Attribute<Real>::Ptr mPgv;
70
71 // ### Auxiliar variables computed in initializeStates ###
72 Real mCa = 0;
73 Real mCb = 0;
74
75 // ### Internal transient ###
76 Real mDerPgv = 0;
77
78public:
80 : SimSignalComp(name, name), mDelOm(mAttributes->create<Real>("DelOm")),
81 mP1(mAttributes->create<Real>("P1")),
82 mP(mAttributes->create<Real>("P")),
83 mPgvLim(mAttributes->create<Real>("PgvLim")),
84 mPgv(mAttributes->create<Real>("Pgv")) {}
85
87
88 void
89 setParameters(std::shared_ptr<Base::GovernorParameters> parameters) final;
90 void initializeStates(Real Pref) final;
91 Real step(Real Omega, Real dt) final;
92};
93
94} // namespace Signal
95} // namespace CPS
AttributePointer< Attribute< T > > Ptr
Definition Attribute.h:250
Base model for Governors.
AttributeList::Ptr mAttributes
Attribute List.
spdlog::level::level_enum Level
Definition Logger.h:33
Real Pmin
Minimum mechanical power (pu)
Real dPmax
Maximum rate of change of Pgv (pu/s)
Real T3
Time constant T3 of the actuator.
Real Pmax
Maximum mechanical power (pu)
Real dPmin
Minimum rate of change of Pgv (pu/s)
Real T2
T2 related to the lead in the controller K(1+sT2)
Real R
Droop — the value 1/K in the controller K(1+sT2)/(1+sT1)
Real OmRef
Speed setpoint (pu); typically 1.
Real T1
T1 related to the lag in the controller K(1+sT2)/(1+sT1)
Real Kbc
Anti-windup proportional gain.
void setParameters(std::shared_ptr< Base::GovernorParameters > parameters) final
void initializeStates(Real Pref) final
Set steady-state initial values (call after setParameters, before first step)
Real step(Real Omega, Real dt) final
Step the governor and return the valve/gate opening signal Pgv.
SimSignalComp(String uid, String name, Logger::Level logLevel=Logger::Level::off)
std::string String
Definition Definitions.h:65
double Real
Definition Definitions.h:62