SP_Ph1_SynchronGenerator.h 2.69 KB
Newer Older
Markus Mirz's avatar
Markus Mirz committed
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
/**
 * @file
 * @author Jan Dinkelbach <jdinkelbach@eonerc.rwth-aachen.de>
 * @copyright 2017-2018, Institute for Automation of Complex Power Systems, EONERC
 *
 * CPowerSystems
 *
 * 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 <cps/PowerComponent.h>
#include <cps/Solver/PFSolverInterfaceBus.h>


namespace CPS {

namespace SP {
namespace Ph1 {

Jan Dinkelbach's avatar
Jan Dinkelbach committed
33
34
35
36
37
38
39
40
41
        class SynchronGenerator : 
			public PowerComponent<Complex>,
			public SharedFactory<SynchronGenerator>,
			public PFSolverInterfaceBus {
	    private:			
			/// Rate apparent power [VA]
		    Real mRatedApparentPower;
			/// Rated voltage [V]
		    Real mRatedVoltage;
Markus Mirz's avatar
Markus Mirz committed
42

Jan Dinkelbach's avatar
Jan Dinkelbach committed
43
44
45
46
47
48
			/// Active power set point of the machine [W]
			Real mSetPointActivePower;
			/// Voltage set point of the machine [V]
			Real mSetPointVoltage;
			/// Maximum reactive power [VAr]
			Real mMaximumReactivePower;
Markus Mirz's avatar
Markus Mirz committed
49

Jan Dinkelbach's avatar
Jan Dinkelbach committed
50
51
52
53
54
55
56
57
58
59
			/// Base apparent power[VA]
			Real mBaseApparentPower;
			/// Base omega [1/s]
			Real mBaseOmega;
			/// Base voltage [V]
			Real mBaseVoltage;
			/// Active power set point of the machine [pu]
			Real mSetPointActivePowerPerUnit;
			/// Voltage set point of the machine [pu]
			Real mSetPointVoltagePerUnit;
Markus Mirz's avatar
Markus Mirz committed
60
61


Jan Dinkelbach's avatar
Jan Dinkelbach committed
62
63
64
65
66
67
68
69
        public:
			/// Defines UID, name and logging level
			SynchronGenerator(String uid, String name, Logger::Level logLevel = Logger::Level::off);
			/// Defines name and logging level
			SynchronGenerator(String name, Logger::Level logLevel = Logger::Level::off)
				: SynchronGenerator(name, name, logLevel) { }
			/// Setter for synchronous generator parameters
			void setParameters(Real ratedApparentPower, Real ratedVoltage, Real setPointActivePower, Real setPointVoltage, Real maximumReactivePower, PowerflowBusType powerflowBusType);
Markus Mirz's avatar
Markus Mirz committed
70

Jan Dinkelbach's avatar
Jan Dinkelbach committed
71
72
73
74
75
			// #### Powerflow section ####
			/// Set base voltage
			void setBaseVoltage(Real baseVoltage);
			/// Initializes component from power flow data
			void calculatePerUnitParameters(Real baseApparentPower, Real baseOmega);
Markus Mirz's avatar
Markus Mirz committed
76
77
            /// Modify powerflow bus type
			void modifyPowerFlowBusType(PowerflowBusType powerflowBusType) override;
Jan Dinkelbach's avatar
Jan Dinkelbach committed
78
		};
Markus Mirz's avatar
Markus Mirz committed
79
80
81
}
}
}