TurbineGovernor.h 2.96 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
/** Turbine Governor
*
* @file
* @author Markus Mirz <mmirz@eonerc.rwth-aachen.de>
* @copyright 2017, Institute for Automation of Complex Power Systems, EONERC
* @license GNU General Public License (version 3)
*
* DPsim
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
*********************************************************************************/

#pragma once

#include "BaseComponent.h"

namespace DPsim {

	/// Synchronous generator model
	/// If parInPerUnit is not set, the parameters have to be given with their respective stator or rotor
	/// referred values. The calculation to per unit is performed in the initialization.
	/// The case where parInPerUnit is not set will be implemented later.
	/// parameter names include underscores and typical variables names found in literature instead of
	/// descriptive names in order to shorten formulas and increase the readability

	class TurbineGovernor {
	protected:

		// ### Steam Turbine Parameters ####

		/// Time constant of main inlet volume and steam chest
		Real mTa;
		/// Time constant of reheater
		Real mTb;
		/// Time constant of cross over piping and LP inlet volumes
		Real mTc;
		/// Fraction of total turbine power generated by HP section
		Real mFa;
		/// Fraction of total turbine power generated by IP section
		Real mFb;
		/// Fraction of total turbine power generated by LP section
		Real mFc;

		// ### Regulator ####
		/// Main droop
		Real mK;

		// ### Speed Relay and servo motor ####
		/// Time constant of speed relay
		Real mTsr;
		/// Time constant of servo motor
		Real mTsm;
		/// Opening rate limit
		Real mLc1 = 0.1;
		/// Closing rate limit
		Real mLc2 = -1;

		// ### Vaariables ###
		/// Mechanical Torque in pu (output of steam turbine)
		Real mTm = 0;
		/// Valve position
		Real mVcv = 0;
		/// Valve position changing rate
		Real mpVcv = 0;
		/// Boiler pressure
		Real mPb = 1;
		/// Speed reference
		Real mOmRef = 1;
		/// Speed
		Real mOm = 0;
		/// Power Reference
		Real mPmRef;
		/// Input of speed realy
		Real Psr_in = 0;
		/// Input of servor motor
		Real Psm_in = 0;

		
		

		bool mLogActive;
		Logger* mLog;


	public:
		TurbineGovernor() { };
		~TurbineGovernor() {};

		/// Initializes exciter parameters
		TurbineGovernor(Real Ta, Real Tb, Real Tc, Real Fa, Real Fb, Real Fc, Real K, Real Tsr, Real Tsm, Real Tm_init);

		/// Performs an step to update field voltage value
		Real step(Real mOm, Real mOmRef, Real PmRef, Real dt);




	};
}