Commit cd626e66 authored by Jan Dinkelbach's avatar Jan Dinkelbach
Browse files

remove covee control parts from averaged inverter for dp1ph

parent 2100aa4c
......@@ -59,8 +59,6 @@ namespace Ph1 {
/// instantaneous frequency
Real mFreqInst=0;
///
Bool mCoveeCtrled=true;
///
Bool mIsLoad=false;
///
......@@ -131,13 +129,9 @@ namespace Ph1 {
///
void addAggregatedGenProfile(std::vector<Real>* genProfile, Real customerNumber);
///
void updateSetPoint(Real time);
///
void initialize(Matrix frequencies);
///
void initializeFromPowerflow(Real frequency);
// #### interface with villas node ####
void ctrlReceiver(Attribute<Real>::Ptr qref);
// #### MNA section ####
/// Initializes internal variables of the component
......@@ -161,8 +155,6 @@ namespace Ph1 {
void controlStep(Real time, Int timeStepCount);
void controlStepDependencies(AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes);
/// interface with power control service
void coveeCtrled(Bool ctrled){mCoveeCtrled=ctrled;};
///
void makeLoad(Bool isLoad){mIsLoad=isLoad;};
///
......@@ -207,18 +199,6 @@ namespace Ph1 {
Attribute<Matrix>::Ptr mLeftVector;
};
class CtrlStep : public Task {
public:
CtrlStep(AvVoltageSourceInverterDQ& AvVoltageSourceInverterDQ) :
Task(AvVoltageSourceInverterDQ.mName + ".CtrlStep"), mAvVoltageSourceInverterDQ(AvVoltageSourceInverterDQ) {
mAttributeDependencies.push_back(AvVoltageSourceInverterDQ.mQRefInput);
mModifiedAttributes.push_back(AvVoltageSourceInverterDQ.attribute("Q_ref"));
}
void execute(Real time, Int timeStepCount);
private:
AvVoltageSourceInverterDQ& mAvVoltageSourceInverterDQ;
};
};
}
}
......
......@@ -126,10 +126,6 @@ void DP::Ph1::AvVoltageSourceInverterDQ::addAggregatedGenProfile(std::vector<Rea
mGenProfile = genProfile;
}
void DP::Ph1::AvVoltageSourceInverterDQ::ctrlReceiver(Attribute<Real>::Ptr qrefInput){
mQRefInput = qrefInput;
}
void DP::Ph1::AvVoltageSourceInverterDQ::initialize(Matrix frequencies) {
mFrequencies = frequencies;
mNumFreqs = static_cast<UInt>(mFrequencies.size());
......@@ -380,8 +376,6 @@ void DP::Ph1::AvVoltageSourceInverterDQ::mnaInitialize(Real omega, Real timeStep
// collect tasks
mMnaTasks.push_back(std::make_shared<MnaPreStep>(*this));
mMnaTasks.push_back(std::make_shared<ControlStep>(*this));
if(mCoveeCtrled)
mMnaTasks.push_back(std::make_shared<CtrlStep>(*this));
mMnaTasks.push_back(std::make_shared<MnaPostStep>(*this, leftVector));
mRightVector = Matrix::Zero(leftVector->get().rows(), 1);
......@@ -404,11 +398,6 @@ void DP::Ph1::AvVoltageSourceInverterDQ::mnaApplyRightSideVectorStamp(Matrix& ri
rightVector += *stamp;
}
void DP::Ph1::AvVoltageSourceInverterDQ::updateSetPoint(Real time){
if(mQRefInput)
mQref = mQRefInput->get();
}
void DP::Ph1::AvVoltageSourceInverterDQ::controlStepDependencies(AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes) {
prevStepDependencies.push_back(this->attribute("i_intf"));
prevStepDependencies.push_back(this->attribute("v_intf"));
......@@ -473,10 +462,6 @@ void DP::Ph1::AvVoltageSourceInverterDQ::mnaPostStep(Real time, Int timeStepCoun
this->mnaUpdateVoltage(*leftVector);
}
void DP::Ph1::AvVoltageSourceInverterDQ::CtrlStep::execute(Real time, Int timeStepCount){
mAvVoltageSourceInverterDQ.updateSetPoint(time);
}
void DP::Ph1::AvVoltageSourceInverterDQ::mnaUpdateCurrent(const Matrix& leftvector) {
if (mWithConnectionTransformer)
mIntfCurrent = mConnectionTransformer->attribute<MatrixComp>("i_intf")->get();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment