|
|
|
/*
|
|
|
|
* AlgorithmWork.h
|
|
|
|
*
|
|
|
|
* Author: Aleksey Gerasimenko
|
|
|
|
* gerasimenko.aleksey.n@gmail.com
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <math.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
#ifndef SYSCTRL_ALGORITHMNORMAL_H_
|
|
|
|
#define SYSCTRL_ALGORITHMNORMAL_H_
|
|
|
|
|
|
|
|
#include "SYSCTRL/AlgorithmBase.h"
|
|
|
|
#include "SYSCTRL/HeadersFLTSYSLIB.h"
|
|
|
|
|
|
|
|
namespace SYSCTRL
|
|
|
|
{
|
|
|
|
|
|
|
|
class AlgorithmWork: public SYSCTRL::AlgorithmBase
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
bool m_reference_switcher;
|
|
|
|
#if ((TYPECONTROL == SCALARCONTROL)&&(SCALARCONTROL_VOLTAGEREGULATOR == SCALARCONTROL_VOLTAGEREGULATOR_ABC))
|
|
|
|
SYSCTRL::VectorOrthogonalProjection m_orts;
|
|
|
|
#endif
|
|
|
|
private:
|
|
|
|
SYSCTRL::SystemEnvironment& m_env;
|
|
|
|
public:
|
|
|
|
AlgorithmWork(SYSCTRL::SystemEnvironment& env);
|
|
|
|
public:
|
|
|
|
void setup();
|
|
|
|
public:
|
|
|
|
void reset();
|
|
|
|
void reset_switcher();
|
|
|
|
public:
|
|
|
|
void execute();
|
|
|
|
private:
|
|
|
|
void (AlgorithmWork::*_execute)();
|
|
|
|
void _execute_run();
|
|
|
|
#if ((TYPECONTROL == SCALARCONTROL)&&(SCALARCONTROL_VOLTAGEREGULATOR == SCALARCONTROL_VOLTAGEREGULATOR_ABC))
|
|
|
|
private:
|
|
|
|
void _execute_single_phase(SYSCTRL::AlgorithmSinglePhaseControl& phase,
|
|
|
|
SYSCTRL::ProjectionAnalogSignalStructure& projection,
|
|
|
|
FLTSYSLIB::PIController& regulator_limit,
|
|
|
|
FLTSYSLIB::PIController& regulator_pfc,
|
|
|
|
//FLTSYSLIB::PIController& regulator_dc,
|
|
|
|
float& dc_volatage,
|
|
|
|
FLTSYSLIB::PIController& regulator_active,
|
|
|
|
FLTSYSLIB::PIController& regulator_reactive);
|
|
|
|
#endif
|
|
|
|
};//AlgorithmNormal
|
|
|
|
|
|
|
|
} /* namespace SYSCTRL */
|
|
|
|
|
|
|
|
#endif /* SYSCTRL_ALGORITHMNORMAL_H_ */
|