DPsim
Loading...
Searching...
No Matches
CPS::Signal::PLL Class Reference
Inheritance diagram for CPS::Signal::PLL:
[legend]
Collaboration diagram for CPS::Signal::PLL:
[legend]

Classes

class  PreStep
 
class  Step
 

Public Member Functions

 PLL (String name, Logger::Level logLevel=Logger::Level::off)
 
void setParameters (Real kpPLL, Real kiPLL, Real omegaNom)
 Setter for PLL parameters.
 
void setSimulationParameters (Real timestep)
 Setter for simulation parameters.
 
void setInitialValues (Real input_init, Matrix state_init, Matrix output_init)
 Setter for initial values.
 
void composeStateSpaceMatrices ()
 Composition of A, B, C, D matrices based on PLL parameters.
 
void signalPreStep (Real time, Int timeStepCount)
 pre step operations
 
void signalStep (Real time, Int timeStepCount)
 step operations
 
void signalAddPreStepDependencies (AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes)
 pre step dependencies
 
void signalAddStepDependencies (AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes)
 add step dependencies
 
Task::List getTasks ()
 
- Public Member Functions inherited from CPS::SimSignalComp
 SimSignalComp (String uid, String name, Logger::Level logLevel=Logger::Level::off)
 
 SimSignalComp (String name, Logger::Level logLevel=Logger::Level::off)
 
virtual void initialize (Real timeStep)
 
virtual void initialize (Real omega, Real timeStep)
 
void setBehaviour (Behaviour behaviour)
 Set behavior of component, e.g. initialization.
 
- Public Member Functions inherited from CPS::TopologicalSignalComp
 TopologicalSignalComp (String uid, String name, Logger::Level logLevel=Logger::Level::off)
 Basic constructor that takes UID, name and log level.
 
 TopologicalSignalComp (String name, Logger::Level logLevel=Logger::Level::off)
 Basic constructor that takes name and log level and sets the UID to name as well.
 
- Public Member Functions inherited from CPS::IdentifiedObject
 IdentifiedObject (const String &uid, const String &name)
 
 IdentifiedObject (const String &name)
 
AttributeBase::Ptr attribute (const String &name) const
 Return pointer to an attribute.
 
template<typename T>
Attribute< T >::Ptr attributeTyped (const String &name) const
 Return pointer to an attribute.
 
const AttributeBase::Map & attributes () const
 
String name ()
 
String uid ()
 Returns unique id.
 
String type ()
 Get component type (cross-platform)
 
virtual String description ()
 

Public Attributes

const Attribute< Real >::Ptr mInputRef
 This is never explicitely set to reference anything, so the outside code is responsible for setting up the reference.
 
const Attribute< Matrix >::Ptr mInputPrev
 Previous Input.
 
const Attribute< Matrix >::Ptr mInputCurr
 Current Input.
 
const Attribute< Matrix >::Ptr mStatePrev
 Previous State.
 
const Attribute< Matrix >::Ptr mStateCurr
 Current State.
 
const Attribute< Matrix >::Ptr mOutputPrev
 Previous Output.
 
const Attribute< Matrix >::Ptr mOutputCurr
 Current Output.
 
- Public Attributes inherited from CPS::IdentifiedObject
const Attribute< String >::Ptr mName
 Human readable name.
 
const Attribute< String >::Ptr mUID
 Unique identifier.
 

Protected Attributes

Real mKp
 Proportional constant of PI controller.
 
Real mKi
 Integration constant of PI controller.
 
Real mOmegaNom
 Nominal frequency.
 
Real mTimeStep
 Integration time step.
 
Matrix mA = Matrix::Zero(2, 2)
 matrix A of state space model
 
Matrix mB = Matrix::Zero(2, 2)
 matrix B of state space model
 
Matrix mC = Matrix::Zero(2, 2)
 matrix C of state space model
 
Matrix mD = Matrix::Zero(2, 2)
 matrix D of state space model
 
- Protected Attributes inherited from CPS::SimSignalComp
Bool mBehaviour = Behaviour::Simulation
 
- Protected Attributes inherited from CPS::TopologicalSignalComp
Logger::Log mSLog
 Component logger.
 
Logger::Level mLogLevel
 Component logger control for internal variables.
 
- Protected Attributes inherited from CPS::IdentifiedObject
AttributeList::Ptr mAttributes = AttributeList::make()
 Attribute List.
 

Additional Inherited Members

- Public Types inherited from CPS::SimSignalComp
enum  Behaviour { Initialization , Simulation }
 
typedef std::shared_ptr< SimSignalCompPtr
 
typedef std::vector< Ptr > List
 
- Public Types inherited from CPS::TopologicalSignalComp
typedef std::shared_ptr< TopologicalSignalCompPtr
 
typedef std::vector< Ptr > List
 
- Public Types inherited from CPS::IdentifiedObject
typedef std::shared_ptr< IdentifiedObjectPtr
 
typedef std::vector< Ptr > List
 
- Static Public Member Functions inherited from SharedFactory< PLL >
static std::shared_ptr< PLL > make (Args &&...args)
 

Detailed Description

Definition at line 19 of file PLL.h.

Constructor & Destructor Documentation

◆ PLL()

PLL::PLL ( String name,
Logger::Level logLevel = Logger::Level::off )

Definition at line 14 of file PLL.cpp.

Member Function Documentation

◆ composeStateSpaceMatrices()

void PLL::composeStateSpaceMatrices ( )

Composition of A, B, C, D matrices based on PLL parameters.

Definition at line 58 of file PLL.cpp.

◆ getTasks()

Task::List PLL::getTasks ( )
virtual

Reimplemented from CPS::SimSignalComp.

Definition at line 117 of file PLL.cpp.

◆ setInitialValues()

void PLL::setInitialValues ( Real input_init,
Matrix state_init,
Matrix output_init )

Setter for initial values.

Definition at line 42 of file PLL.cpp.

◆ setParameters()

void PLL::setParameters ( Real kpPLL,
Real kiPLL,
Real omegaNom )

Setter for PLL parameters.

Definition at line 27 of file PLL.cpp.

◆ setSimulationParameters()

void PLL::setSimulationParameters ( Real timestep)

Setter for simulation parameters.

Definition at line 37 of file PLL.cpp.

◆ signalAddPreStepDependencies()

void PLL::signalAddPreStepDependencies ( AttributeBase::List & prevStepDependencies,
AttributeBase::List & attributeDependencies,
AttributeBase::List & modifiedAttributes )

pre step dependencies

Definition at line 71 of file PLL.cpp.

◆ signalAddStepDependencies()

void PLL::signalAddStepDependencies ( AttributeBase::List & prevStepDependencies,
AttributeBase::List & attributeDependencies,
AttributeBase::List & modifiedAttributes )

add step dependencies

Definition at line 87 of file PLL.cpp.

◆ signalPreStep()

void PLL::signalPreStep ( Real time,
Int timeStepCount )

pre step operations

Definition at line 81 of file PLL.cpp.

◆ signalStep()

void PLL::signalStep ( Real time,
Int timeStepCount )

step operations

Definition at line 95 of file PLL.cpp.

Member Data Documentation

◆ mA

Matrix CPS::Signal::PLL::mA = Matrix::Zero(2, 2)
protected

matrix A of state space model

Definition at line 33 of file PLL.h.

◆ mB

Matrix CPS::Signal::PLL::mB = Matrix::Zero(2, 2)
protected

matrix B of state space model

Definition at line 35 of file PLL.h.

◆ mC

Matrix CPS::Signal::PLL::mC = Matrix::Zero(2, 2)
protected

matrix C of state space model

Definition at line 37 of file PLL.h.

◆ mD

Matrix CPS::Signal::PLL::mD = Matrix::Zero(2, 2)
protected

matrix D of state space model

Definition at line 39 of file PLL.h.

◆ mInputCurr

const Attribute<Matrix>::Ptr CPS::Signal::PLL::mInputCurr

Current Input.

Definition at line 48 of file PLL.h.

◆ mInputPrev

const Attribute<Matrix>::Ptr CPS::Signal::PLL::mInputPrev

Previous Input.

Definition at line 46 of file PLL.h.

◆ mInputRef

const Attribute<Real>::Ptr CPS::Signal::PLL::mInputRef

This is never explicitely set to reference anything, so the outside code is responsible for setting up the reference.

Definition at line 43 of file PLL.h.

◆ mKi

Real CPS::Signal::PLL::mKi
protected

Integration constant of PI controller.

Definition at line 25 of file PLL.h.

◆ mKp

Real CPS::Signal::PLL::mKp
protected

Proportional constant of PI controller.

Definition at line 23 of file PLL.h.

◆ mOmegaNom

Real CPS::Signal::PLL::mOmegaNom
protected

Nominal frequency.

Definition at line 28 of file PLL.h.

◆ mOutputCurr

const Attribute<Matrix>::Ptr CPS::Signal::PLL::mOutputCurr

Current Output.

Definition at line 56 of file PLL.h.

◆ mOutputPrev

const Attribute<Matrix>::Ptr CPS::Signal::PLL::mOutputPrev

Previous Output.

Definition at line 54 of file PLL.h.

◆ mStateCurr

const Attribute<Matrix>::Ptr CPS::Signal::PLL::mStateCurr

Current State.

Definition at line 52 of file PLL.h.

◆ mStatePrev

const Attribute<Matrix>::Ptr CPS::Signal::PLL::mStatePrev

Previous State.

Definition at line 50 of file PLL.h.

◆ mTimeStep

Real CPS::Signal::PLL::mTimeStep
protected

Integration time step.

Definition at line 30 of file PLL.h.


The documentation for this class was generated from the following files: