DPsim
Loading...
Searching...
No Matches
CPS::Signal::FrequencyRampGenerator Class Reference

Model to generate signals containing a frequency ramp. More...

#include <FrequencyRampGenerator.h>

Inheritance diagram for CPS::Signal::FrequencyRampGenerator:
[legend]
Collaboration diagram for CPS::Signal::FrequencyRampGenerator:
[legend]

Public Member Functions

 FrequencyRampGenerator (String name, Logger::Level logLevel=Logger::Level::off)
 
void setParameters (Complex initialPhasor, Real freqStart, Real ramp, Real timeStart, Real duration, bool smoothRamp=true)
 set frequency ramp specific parameters
 
void step (Real time)
 implementation of inherited method step to update and return the current signal value
 
void stepAbsolute (Real time)
 implementation of inherited method step to update and return the current signal value
 
void stepSmooth (Real time)
 update and return signal value using a cosine shaped ramp
 
- Public Member Functions inherited from CPS::Signal::SignalGenerator
 SignalGenerator (String uid, String name, Logger::Level logLevel=Logger::Level::off)
 
 SignalGenerator (String name, Logger::Level logLevel=Logger::Level::off)
 
Complex getSignal ()
 returns current signal value without updating it
 
- 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 ~SimSignalComp ()
 
virtual void initialize (Real timeStep)
 
virtual void initialize (Real omega, Real timeStep)
 
virtual Task::List getTasks ()
 
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.
 
virtual ~TopologicalSignalComp ()
 
- Public Member Functions inherited from CPS::IdentifiedObject
 IdentifiedObject ()
 
 IdentifiedObject (const String &uid, const String &name)
 
 IdentifiedObject (const String &name)
 
virtual ~IdentifiedObject ()=default
 
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::Mapattributes () const
 
String name ()
 
String uid ()
 Returns unique id.
 
String type ()
 Get component type (cross-platform)
 
virtual String description ()
 

Additional Inherited Members

- Public Types inherited from CPS::Signal::SignalGenerator
typedef std::shared_ptr< SignalGeneratorPtr
 
typedef std::vector< PtrList
 
- Public Types inherited from CPS::SimSignalComp
enum  Behaviour { Initialization , Simulation }
 
typedef std::shared_ptr< SimSignalCompPtr
 
typedef std::vector< PtrList
 
- Public Types inherited from CPS::TopologicalSignalComp
typedef std::shared_ptr< TopologicalSignalCompPtr
 
typedef std::vector< PtrList
 
- Public Types inherited from CPS::IdentifiedObject
typedef std::shared_ptr< IdentifiedObjectPtr
 
typedef std::vector< PtrList
 
- Static Public Member Functions inherited from SharedFactory< FrequencyRampGenerator >
static std::shared_ptr< FrequencyRampGenerator > make (Args &&...args)
 
- Public Attributes inherited from CPS::Signal::SignalGenerator
const CPS::Attribute< Complex >::Ptr mSigOut
 
const CPS::Attribute< Real >::Ptr mFreq
 
- Public Attributes inherited from CPS::IdentifiedObject
const Attribute< String >::Ptr mName
 Human readable name.
 
const Attribute< String >::Ptr mUID
 Unique identifier.
 
- 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.
 

Detailed Description

Model to generate signals containing a frequency ramp.

Inherits from the abstract SignalGenerator class. Models a ramp-like change in the signal's frequency with a given RoCoF. The ramp is further characterised by start frequency, and the start time and duration of the event.

Definition at line 20 of file FrequencyRampGenerator.h.

Constructor & Destructor Documentation

◆ FrequencyRampGenerator()

CPS::Signal::FrequencyRampGenerator::FrequencyRampGenerator ( String name,
Logger::Level logLevel = Logger::Level::off )
inline

Definition at line 49 of file FrequencyRampGenerator.h.

Member Function Documentation

◆ setParameters()

void Signal::FrequencyRampGenerator::setParameters ( Complex initialPhasor,
Real freqStart,
Real ramp,
Real timeStart,
Real duration,
bool smoothRamp = true )

set frequency ramp specific parameters

Definition at line 13 of file FrequencyRampGenerator.cpp.

◆ step()

void Signal::FrequencyRampGenerator::step ( Real time)
virtual

implementation of inherited method step to update and return the current signal value

Implements CPS::Signal::SignalGenerator.

Definition at line 44 of file FrequencyRampGenerator.cpp.

◆ stepAbsolute()

void Signal::FrequencyRampGenerator::stepAbsolute ( Real time)

implementation of inherited method step to update and return the current signal value

Definition at line 70 of file FrequencyRampGenerator.cpp.

◆ stepSmooth()

void CPS::Signal::FrequencyRampGenerator::stepSmooth ( Real time)

update and return signal value using a cosine shaped ramp


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