130 :
Task(**powerControllerVSI.
mName +
".PreStep"),
131 mPowerControllerVSI(powerControllerVSI) {
132 mPowerControllerVSI.signalAddPreStepDependencies(
136 mPowerControllerVSI.signalPreStep(time, timeStepCount);
145 :
Task(**powerControllerVSI.
mName +
".Step"),
146 mPowerControllerVSI(powerControllerVSI) {
147 mPowerControllerVSI.signalAddStepDependencies(
151 mPowerControllerVSI.signalStep(time, timeStepCount);
AttributePointer< Attribute< T > > Ptr
spdlog::level::level_enum Level
PreStep(PowerControllerVSI &powerControllerVSI)
void execute(Real time, Int timeStepCount)
Step(PowerControllerVSI &powerControllerVSI)
void execute(Real time, Int timeStepCount)
Real mTimeStep
Simulation time step.
void setControllerParameters(Real Kp_powerCtrl, Real Ki_powerCtrl, Real Kp_currCtrl, Real Ki_currCtrl, Real Omega_cutoff)
Setter for parameters of control loops.
const Attribute< Matrix >::Ptr mInputPrev
Previous Input.
Matrix mDiscreteA
Cached trapezoidal factors; A and time step are constant during a run.
Matrix mD
matrix D of state space model
Matrix mC
matrix C of state space model
void setParameters(Real Pref, Real Qref)
Setter for general parameters.
void signalAddStepDependencies(AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes)
add step dependencies
const Attribute< Real >::Ptr mVc_q
Real mPInit
initial values for states
void setInitialStateValues(Real pInit, Real qInit, Real phi_dInit, Real phi_qInit, Real gamma_dInit, Real gamma_qInit)
Setter for initial state values.
const Attribute< Real >::Ptr mIrc_q
void updateBMatrixStateSpaceModel()
Update B matrix due to its dependence on the input.
const Attribute< Matrix >::Ptr mStateCurr
Current State.
void signalStep(Real time, Int timeStepCount)
step operations
PowerControllerVSI(String name, Logger::Level logLevel=Logger::Level::off)
void initializeStateSpaceModel(Real omega, Real timeStep, Attribute< Matrix >::Ptr leftVector)
Initialize vectors of state space model.
const Attribute< Real >::Ptr mVc_d
These are never explicitely set to reference anything, so the outside code is responsible for setting...
void initializeSteadyState(Real pRef, Real qRef, Real iD, Real iQ, Real vSourceD, Real vSourceQ)
void signalPreStep(Real time, Int timeStepCount)
pre step operations
const Attribute< Matrix >::Ptr mOutputCurr
Current Output.
Bool mInitialStatesExplicit
void signalAddPreStepDependencies(AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes)
pre step dependencies
const Attribute< Matrix >::Ptr mInputCurr
Current Input.
const Attribute< Matrix >::Ptr mStatePrev
Previous State.
Matrix mA
matrix A of state space model
const Attribute< Matrix >::Ptr mOutputPrev
Previous Output.
const Attribute< Real >::Ptr mIrc_d
Matrix mB
matrix B of state space model
SimSignalComp(String uid, String name, Logger::Level logLevel=Logger::Level::off)
std::vector< AttributeBase::Ptr > mModifiedAttributes
std::vector< AttributeBase::Ptr > mPrevStepDependencies
std::vector< AttributeBase::Ptr > mAttributeDependencies
Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > Matrix
Dense matrix for real numbers.