13 #include <dpsim-models/SimPowerComp.h>
14 #include <dpsim-models/SimSignalComp.h>
15 #include <dpsim-models/Task.h>
33 Matrix
mA = Matrix::Zero(2, 2);
35 Matrix
mB = Matrix::Zero(2, 2);
37 Matrix
mC = Matrix::Zero(2, 2);
39 Matrix
mD = Matrix::Zero(2, 2);
58 PLL(String name, Logger::Level logLevel = Logger::Level::off);
64 void setInitialValues(Real input_init, Matrix state_init, Matrix output_init);
73 AttributeBase::List &attributeDependencies,
74 AttributeBase::List &modifiedAttributes);
77 AttributeBase::List &attributeDependencies,
78 AttributeBase::List &modifiedAttributes);
80 Task::List getTasks();
86 mPrevStepDependencies, mAttributeDependencies, mModifiedAttributes);
88 void execute(Real time, Int timeStepCount) {
100 mPrevStepDependencies, mAttributeDependencies, mModifiedAttributes);
102 void execute(Real time, Int timeStepCount) {
const Attribute< String >::Ptr mName
Human readable name.
void setInitialValues(Real input_init, Matrix state_init, Matrix output_init)
Setter for initial values.
const Attribute< Matrix >::Ptr mOutputPrev
Previous Output.
Real mKp
Proportional constant of PI controller.
Real mTimeStep
Integration time step.
void signalStep(Real time, Int timeStepCount)
step operations
Matrix mD
matrix D of state space model
const Attribute< Real >::Ptr mInputRef
This is never explicitely set to reference anything, so the outside code is responsible for setting u...
const Attribute< Matrix >::Ptr mInputCurr
Current Input.
const Attribute< Matrix >::Ptr mStatePrev
Previous State.
void signalAddStepDependencies(AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes)
add step dependencies
Matrix mC
matrix C of state space model
const Attribute< Matrix >::Ptr mOutputCurr
Current Output.
void setSimulationParameters(Real timestep)
Setter for simulation parameters.
Matrix mB
matrix B of state space model
void setParameters(Real kpPLL, Real kiPLL, Real omegaNom)
Setter for PLL parameters.
Real mOmegaNom
Nominal frequency.
void composeStateSpaceMatrices()
Composition of A, B, C, D matrices based on PLL parameters.
Matrix mA
matrix A of state space model
void signalAddPreStepDependencies(AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes)
pre step dependencies
const Attribute< Matrix >::Ptr mStateCurr
Current State.
const Attribute< Matrix >::Ptr mInputPrev
Previous Input.
void signalPreStep(Real time, Int timeStepCount)
pre step operations
Real mKi
Integration constant of PI controller.
Tasks to be defined by every component.