DPsim
Exciter.h
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 #pragma once
10 
11 #include <dpsim-models/Logger.h>
12 #include <dpsim-models/SimSignalComp.h>
13 
14 namespace CPS {
15 namespace Signal {
18 class Exciter : public SimSignalComp, public SharedFactory<Exciter> {
19 
20 private:
21  // ### Exciter Parameters ####
23  Real mTa;
25  Real mKa;
27  Real mKe;
29  Real mTe;
31  Real mKf;
33  Real mTf;
35  Real mTr;
36 
38  Real mVref = 0;
40  Real mVm_prev = 0;
42  Real mVis_prev = 0;
44  Real mVse_prev = 0;
46  Real mVr_prev = 0;
48  Real mEf_prev = 0;
50  Real mMaxVr;
52  Real mMinVr;
53 
54 protected:
67 
68 public:
70  explicit Exciter(const String &name) : SimSignalComp(name, name) {}
72  Exciter(const String &name, CPS::Logger::Level logLevel);
73 
75  void setParameters(Real Ta, Real Ka, Real Te, Real Ke, Real Tf, Real Kf,
76  Real Tr, Real maxVr = 1.0, Real minVr = -0.9);
78  void initialize(Real Vh_init, Real Vf_init);
80  Real step(Real mVd, Real mVq, Real dt);
81 };
82 } // namespace Signal
83 } // namespace CPS
const Attribute< Real >::Ptr mEf
Exciter output at time k (induced emf by the field current under no-load conditions)
Definition: Exciter.h:66
const Attribute< Real >::Ptr mVis
Output of stablizing feedback at time k.
Definition: Exciter.h:60
void setParameters(Real Ta, Real Ka, Real Te, Real Ke, Real Tf, Real Kf, Real Tr, Real maxVr=1.0, Real minVr=-0.9)
Initializes exciter parameters.
Definition: Exciter.cpp:23
const Attribute< Real >::Ptr mVm
Output of voltage transducer at time k-1.
Definition: Exciter.h:56
Real step(Real mVd, Real mVq, Real dt)
Performs an step to update field voltage value.
Definition: Exciter.cpp:85
const Attribute< Real >::Ptr mVse
Output of ceiling function at time k-1.
Definition: Exciter.h:64
void initialize(Real Vh_init, Real Vf_init)
Initializes exciter variables.
Definition: Exciter.cpp:49
const Attribute< Real >::Ptr mVr
Regulator output at time k.
Definition: Exciter.h:62
const Attribute< Real >::Ptr mVh
Input of voltage transducer.
Definition: Exciter.h:58