DPsim
Loading...
Searching...
No Matches
DP_Ph3_SynchronGeneratorDQTrapez.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/DP/DP_Ph3_SynchronGeneratorDQ.h>
12
13namespace CPS {
14namespace DP {
15namespace Ph3 {
16class SynchronGeneratorDQTrapez
17 : public SynchronGeneratorDQ,
18 public SharedFactory<SynchronGeneratorDQTrapez> {
19public:
20 SynchronGeneratorDQTrapez(String uid, String name,
21 Logger::Level loglevel = Logger::Level::off);
22 SynchronGeneratorDQTrapez(String name,
23 Logger::Level loglevel = Logger::Level::off);
24
25 void setMultisamplingRate(Int rate);
26
27 // #### MNA Section ####
28 void mnaCompInitialize(Real omega, Real timeStep,
29 Attribute<Matrix>::Ptr leftVector) override;
30
33 AttributeBase::List &prevStepDependencies,
34 AttributeBase::List &attributeDependencies,
35 AttributeBase::List &modifiedAttributes) override;
36 void mnaCompPreStep(Real time, Int timeStepCount) override;
37
38protected:
40 Int mMultisamplingRate = 1;
41
42 // #### Trapezoidal Section ####
43
46 void stepInPerUnit(Real time);
47};
48} // namespace Ph3
49} // namespace DP
50} // namespace CPS
SynchronGeneratorDQ(String name, String uid, Logger::Level logLevel=Logger::Level::off)
Defines UID, name and logging level.
void mnaCompAddPreStepDependencies(AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes) override
Add MNA pre step dependencies.
void mnaCompInitialize(Real omega, Real timeStep, Attribute< Matrix >::Ptr leftVector) override
Initializes variables of component.
String uid()
Returns unique id.