summaryrefslogtreecommitdiffstats
path: root/Project
diff options
context:
space:
mode:
Diffstat (limited to 'Project')
-rw-r--r--Project/Branch.h7
-rw-r--r--Project/Bus.h7
-rw-r--r--Project/Capacitor.h7
-rw-r--r--Project/ElectricCalculation.h2
-rw-r--r--Project/Electromechanical.h2
-rw-r--r--Project/Element.h4
-rw-r--r--Project/ElementDataObject.h7
-rw-r--r--Project/ElementPlotData.h8
-rw-r--r--Project/Exponential.h11
-rw-r--r--Project/Fault.h2
-rw-r--r--Project/Gain.h10
-rw-r--r--Project/GraphicalElement.h7
-rw-r--r--Project/IndMotor.h7
-rw-r--r--Project/Inductor.h7
-rw-r--r--Project/Line.h7
-rw-r--r--Project/Load.h7
-rw-r--r--Project/Machines.h7
-rw-r--r--Project/PowerElement.h8
-rw-r--r--Project/PowerFlow.h7
-rw-r--r--Project/PropertiesData.h7
-rw-r--r--Project/RateLimiter.h19
-rw-r--r--Project/Shunt.h7
-rw-r--r--Project/Sum.h7
-rw-r--r--Project/SyncGenerator.h7
-rw-r--r--Project/SyncMotor.h7
-rw-r--r--Project/Text.h7
-rw-r--r--Project/TransferFunction.cpp3
-rw-r--r--Project/TransferFunction.h21
-rw-r--r--Project/Transformer.h7
29 files changed, 193 insertions, 23 deletions
diff --git a/Project/Branch.h b/Project/Branch.h
index 10c45d2..684c8b4 100644
--- a/Project/Branch.h
+++ b/Project/Branch.h
@@ -21,6 +21,13 @@
#include "PowerElement.h"
#include "Bus.h"
+/**
+ * @class Branch
+ * @author Thales Lima Oliveira <thales@ufu.br>
+ * @date 06/10/2017
+ * @brief Abstract class for branch power elements.
+ * @file Branch.h
+ */
class Branch : public PowerElement
{
public:
diff --git a/Project/Bus.h b/Project/Bus.h
index f974a86..f4bdb04 100644
--- a/Project/Bus.h
+++ b/Project/Bus.h
@@ -59,6 +59,13 @@ struct BusElectricalData {
std::vector<std::complex<double> > stabVoltageVector;
};
+/**
+ * @class Bus
+ * @author Thales Lima Oliveira <thales@ufu.br>
+ * @date 06/10/2017
+ * @brief Node for power elements. All others power elements are connected through this.
+ * @file Bus.h
+ */
class Bus : public PowerElement
{
public:
diff --git a/Project/Capacitor.h b/Project/Capacitor.h
index 3dc126f..1a6ed57 100644
--- a/Project/Capacitor.h
+++ b/Project/Capacitor.h
@@ -28,6 +28,13 @@ struct CapacitorElectricalData {
ElectricalUnit reactivePowerUnit = UNIT_MVAr;
};
+/**
+ * @class Capacitor
+ * @author Thales Lima Oliveira <thales@ufu.br>
+ * @date 06/10/2017
+ * @brief Shunt capactior power element.
+ * @file Capacitor.h
+ */
class Capacitor : public Shunt
{
public:
diff --git a/Project/ElectricCalculation.h b/Project/ElectricCalculation.h
index f3ad824..9dee71a 100644
--- a/Project/ElectricCalculation.h
+++ b/Project/ElectricCalculation.h
@@ -60,8 +60,8 @@ struct ReactiveLimits {
* @class ElectricCalculation
* @author Thales Lima Oliveira
* @date 09/01/2017
- * @file ElectricCalculation.h
* @brief Base class of electric calculations, with general methods.
+ * @file ElectricCalculation.h
*/
class ElectricCalculation
{
diff --git a/Project/Electromechanical.h b/Project/Electromechanical.h
index 1514a53..bd6784d 100644
--- a/Project/Electromechanical.h
+++ b/Project/Electromechanical.h
@@ -45,8 +45,8 @@ struct SyncMachineModelData {
* @class Electromechanical
* @author Thales Lima Oliveira <thales@ufu.br>
* @date 23/09/2017
- * @file Electromechanical.h
* @brief Calculates the electromechanical transient based on disturbances (e.g. system fault).
+ * @file Electromechanical.h
*/
class Electromechanical : public ElectricCalculation
{
diff --git a/Project/Element.h b/Project/Element.h
index 3f15416..21f8def 100644
--- a/Project/Element.h
+++ b/Project/Element.h
@@ -61,8 +61,8 @@ enum ContextMenuID {
* @class OpenGLColour
* @author Thales Lima Oliveira
* @date 18/01/2017
- * @file Element.h
* @brief Class to manage color of OpenGL.
+ * @file Element.h
*/
class OpenGLColour
{
@@ -107,8 +107,8 @@ class OpenGLColour
* @class Element
* @author Thales Lima Oliveira <thales@ufu.br>
* @date 19/09/2017
- * @file Element.h
* @brief Base class of all elements of the program. This class is responsible for manage graphical and his data.
+ * @file Element.h
*/
class Element
{
diff --git a/Project/ElementDataObject.h b/Project/ElementDataObject.h
index 0318ded..838411d 100644
--- a/Project/ElementDataObject.h
+++ b/Project/ElementDataObject.h
@@ -26,6 +26,13 @@ struct ElementsLists {
std::vector<Bus*> parentList;
};
+/**
+ * @class ElementDataObject
+ * @author Thales Lima Oliveira <thales@ufu.br>
+ * @date 06/10/2017
+ * @brief Class to store the elements in the clipboard.
+ * @file ElementDataObject.h
+ */
class ElementDataObject : public wxDataObjectSimple
{
public:
diff --git a/Project/ElementPlotData.h b/Project/ElementPlotData.h
index 1f0acf7..16c6017 100644
--- a/Project/ElementPlotData.h
+++ b/Project/ElementPlotData.h
@@ -24,6 +24,14 @@
#include <vector>
+/**
+ * @class PlotData
+ * @author Thales Lima Oliveira <thales@ufu.br>
+ * @date 06/10/2017
+ * @brief This class is responsible to manage the graphical data of electromechanical result to be plotted on chart
+ * viewer.
+ * @file ElementPlotData.h
+ */
class PlotData : public wxTreeItemData
{
public:
diff --git a/Project/Exponential.h b/Project/Exponential.h
index e9fd019..accdd48 100644
--- a/Project/Exponential.h
+++ b/Project/Exponential.h
@@ -27,7 +27,6 @@ class ExponentialForm;
* @author Thales Lima Oliveira <thales@ufu.br>
* @date 05/10/2017
* @brief Generates an output following an exponential function.
- * \f$ output = A\cdot e^{B\cdot input} \f$
* @file Exponential.h
*/
class Exponential : public ControlElement
@@ -46,7 +45,15 @@ class Exponential : public ControlElement
virtual void GetValues(double& aValue, double& bValue);
virtual void SetValues(double aValue, double bValue);
-
+
+ /**
+ * @brief Calculates the exponential.
+ *
+ * <center>\f$ output = A\cdot e^{B\cdot input} \f$</center>
+ * @param input Input value.
+ * @param timeStep Time step.
+ * @return Aways true.
+ */
virtual bool Solve(double input, double timeStep);
virtual Element* GetCopy();
diff --git a/Project/Fault.h b/Project/Fault.h
index 0ed82d6..ef10189 100644
--- a/Project/Fault.h
+++ b/Project/Fault.h
@@ -23,8 +23,8 @@
* @class Fault
* @author Thales Lima Oliveira
* @date 10/01/2017
- * @file Fault.h
* @brief Calculate the fault of the system and update the elements data.
+ * @file Fault.h
*/
class Fault : public ElectricCalculation
diff --git a/Project/Gain.h b/Project/Gain.h
index 6b378d2..7245e2f 100644
--- a/Project/Gain.h
+++ b/Project/Gain.h
@@ -30,7 +30,6 @@ class GainForm;
* @author Thales Lima Oliveira <thales@ufu.br>
* @date 05/10/2017
* @brief Provide an output multiplying the input by a constant.
- * \f$ output = K \cdot input \f$
* @file Gain.h
*/
class Gain : public ControlElement
@@ -49,7 +48,14 @@ class Gain : public ControlElement
virtual void SetValue(double value);
virtual double GetValue() const { return m_value; }
virtual void UpdatePoints();
-
+ /**
+ * @brief Multiply the input by a constant
+ *
+ * <center>\f$ output = K \cdot input \f$</center>
+ * @param input Input value.
+ * @param timeStep Time step.
+ * @return Always true.
+ */
virtual bool Solve(double input, double timeStep);
virtual Element* GetCopy();
diff --git a/Project/GraphicalElement.h b/Project/GraphicalElement.h
index e536dbd..ab03b6f 100644
--- a/Project/GraphicalElement.h
+++ b/Project/GraphicalElement.h
@@ -20,6 +20,13 @@
#include "Element.h"
+/**
+ * @class GraphicalElement
+ * @author Thales Lima Oliveira <thales@ufu.br>
+ * @date 06/10/2017
+ * @brief Abstract class for graphical elements shown with power elements in workspace.
+ * @file GraphicalElement.h
+ */
class GraphicalElement : public Element
{
public:
diff --git a/Project/IndMotor.h b/Project/IndMotor.h
index 0c16b9d..511eb61 100644
--- a/Project/IndMotor.h
+++ b/Project/IndMotor.h
@@ -30,6 +30,13 @@ struct IndMotorElectricalData {
ElectricalUnit reactivePowerUnit = UNIT_MVAr;
};
+/**
+ * @class IndMotor
+ * @author Thales Lima Oliveira <thales@ufu.br>
+ * @date 06/10/2017
+ * @brief Induction motor power element.
+ * @file IndMotor.h
+ */
class IndMotor : public Machines
{
public:
diff --git a/Project/Inductor.h b/Project/Inductor.h
index a78c79b..ffd65da 100644
--- a/Project/Inductor.h
+++ b/Project/Inductor.h
@@ -28,6 +28,13 @@ struct InductorElectricalData {
ElectricalUnit reactivePowerUnit = UNIT_MVAr;
};
+/**
+ * @class Inductor
+ * @author Thales Lima Oliveira <thales@ufu.br>
+ * @date 06/10/2017
+ * @brief Inductor shunt power element.
+ * @file Inductor.h
+ */
class Inductor : public Shunt
{
public:
diff --git a/Project/Line.h b/Project/Line.h
index 598e671..aa6baf2 100644
--- a/Project/Line.h
+++ b/Project/Line.h
@@ -49,6 +49,13 @@ struct LineElectricalData {
std::complex<double> faultCurrent[2][3];
};
+/**
+ * @class Line
+ * @author Thales Lima Oliveira <thales@ufu.br>
+ * @date 06/10/2017
+ * @brief Power line element.
+ * @file Line.h
+ */
class Line : public Branch
{
public:
diff --git a/Project/Load.h b/Project/Load.h
index 9e0f363..2244a88 100644
--- a/Project/Load.h
+++ b/Project/Load.h
@@ -32,6 +32,13 @@ struct LoadElectricalData {
LoadType loadType = CONST_POWER;
};
+/**
+ * @class Load
+ * @author Thales Lima Oliveira <thales@ufu.br>
+ * @date 06/10/2017
+ * @brief Loas shunt power element.
+ * @file Load.h
+ */
class Load : public Shunt
{
public:
diff --git a/Project/Machines.h b/Project/Machines.h
index 4c8e48e..db6f449 100644
--- a/Project/Machines.h
+++ b/Project/Machines.h
@@ -23,6 +23,13 @@
class ControlElementContainer;
class ControlElementSolver;
+/**
+ * @class Machines
+ * @author Thales Lima Oliveira <thales@ufu.br>
+ * @date 06/10/2017
+ * @brief Abstract class for rotary machines power elements.
+ * @file Machines.h
+ */
class Machines : public PowerElement
{
public:
diff --git a/Project/PowerElement.h b/Project/PowerElement.h
index 2c39d27..93a2357 100644
--- a/Project/PowerElement.h
+++ b/Project/PowerElement.h
@@ -87,8 +87,8 @@ enum PowerFlowDirection {
* @class SwitchingData
* @author Thales Lima Oliveira
* @date 18/01/2017
- * @file PowerElement.h
* @brief Switching data of power elements.
+ * @file PowerElement.h
*/
struct SwitchingData {
std::vector<SwitchingType> swType; /**< Type of switching */
@@ -99,8 +99,8 @@ struct SwitchingData {
* @class IntegrationConstant
* @author Thales Lima Oliveira
* @date 24/05/2017
- * @file PowerElement.h
* @brief Integration constants to calculate dynamic elements through trapezoidal integration method
+ * @file PowerElement.h
*/
struct IntegrationConstant {
double c; /**< C value */
@@ -109,10 +109,10 @@ struct IntegrationConstant {
/**
* @class PowerElement
- * @author Thales Lima Oliveira
+ * @author Thales Lima Oliveira <thales@ufu.br>
* @date 18/01/2017
+ * @brief Abstract class of power elements.
* @file PowerElement.h
- * @brief Base class of power elements.
*/
class PowerElement : public Element
{
diff --git a/Project/PowerFlow.h b/Project/PowerFlow.h
index 75cd3a5..54780b4 100644
--- a/Project/PowerFlow.h
+++ b/Project/PowerFlow.h
@@ -23,6 +23,13 @@
#include <wx/string.h>
#include <wx/intl.h> //_()
+/**
+ * @class PowerFlow
+ * @author Thales Lima Oliveira <thales@ufu.br>
+ * @date 06/10/2017
+ * @brief Calculate the power flow.
+ * @file PowerFlow.h
+ */
class PowerFlow : public ElectricCalculation
{
public:
diff --git a/Project/PropertiesData.h b/Project/PropertiesData.h
index d63a906..3e6bbf6 100644
--- a/Project/PropertiesData.h
+++ b/Project/PropertiesData.h
@@ -54,6 +54,13 @@ struct GeneralData {
GUITheme theme = THEME_LIGHT;
};
+/**
+ * @class PropertiesData
+ * @author Thales Lima Oliveira <thales@ufu.br>
+ * @date 06/10/2017
+ * @brief General and simulation data manager.
+ * @file PropertiesData.h
+ */
class PropertiesData
{
public:
diff --git a/Project/RateLimiter.h b/Project/RateLimiter.h
index bab52db..3d57498 100644
--- a/Project/RateLimiter.h
+++ b/Project/RateLimiter.h
@@ -49,16 +49,17 @@ class RateLimiter : public ControlElement
void SetLowLimit(double lowLimit) { m_lowLimit = lowLimit; }
/**
* @brief Calculate the rate and limits it if exceeds.<br>
- * The rate is calculated by:<br><br>
- * \f$ rate = \frac{x(i) - y(i-1)}{\Delta t} \f$<br><br>
- * \f$ x(i) \f$ is the current input and \f$ y(i-1) \f$ is the previous output.<br>
- * If the \f$rate\f$ is greater than rising rate (\f$ R \f$), the output will be:<br><br>
- * \f$ output = \Delta t \cdot R + y(i-1)\f$<br><br>
+ *
+ * The rate is calculated by:
+ * <center>\f$ rate = \frac{x(i) - y(i-1)}{\Delta t} \f$</center>
+ * Where, \f$ x(i) \f$ is the current input and \f$ y(i-1) \f$ is the previous output.<br><br>
+ * If the \f$rate\f$ is greater than rising rate (\f$ R \f$), the output will be:<br>
+ * <center>\f$ output = \Delta t \cdot R + y(i-1)\f$</center>
* If the \f$rate\f$ is lower than falling rate (\f$ F \f$), the output will be:<br><br>
- * \f$ output = \Delta t \cdot L + y(i-1) \f$<br><br>
- * Otherwise:<br><br>
- * \f$ output = input \f$.
- * @param input input value.
+ * <center>\f$ output = \Delta t \cdot F + y(i-1) \f$</center>
+ * Otherwise:
+ * <center>\f$ output = input \f$</center>.
+ * @param input Input value.
* @param timeStep Time step.
* @return Always true.
*/
diff --git a/Project/Shunt.h b/Project/Shunt.h
index eb0384a..94424a4 100644
--- a/Project/Shunt.h
+++ b/Project/Shunt.h
@@ -21,6 +21,13 @@
#include "PowerElement.h"
#include "Bus.h"
+/**
+ * @class Shunt
+ * @author Thales Lima Oliveira <thales@ufu.br>
+ * @date 06/10/2017
+ * @brief Abstract class for shunt power elements.
+ * @file Shunt.h
+ */
class Shunt : public PowerElement
{
public:
diff --git a/Project/Sum.h b/Project/Sum.h
index 3a5e289..e91e139 100644
--- a/Project/Sum.h
+++ b/Project/Sum.h
@@ -23,6 +23,13 @@
class SumForm;
class ConnectionLine;
+/**
+ * @class Sum
+ * @author Thales Lima Oliveira <thales@ufu.br>
+ * @date 06/10/2017
+ * @brief Sum the all inputs (can choose the input signal).
+ * @file Sum.h
+ */
class Sum : public ControlElement
{
public:
diff --git a/Project/SyncGenerator.h b/Project/SyncGenerator.h
index c2fa80b..cb1b146 100644
--- a/Project/SyncGenerator.h
+++ b/Project/SyncGenerator.h
@@ -130,6 +130,13 @@ struct SyncGeneratorElectricalData {
Machines::SyncMachineModel model = Machines::SM_MODEL_1;
};
+/**
+ * @class SyncGenerator
+ * @author Thales Lima Oliveira <thales@ufu.br>
+ * @date 06/10/2017
+ * @brief Synchronous generator power element.
+ * @file SyncGenerator.h
+ */
class SyncGenerator : public Machines
{
public:
diff --git a/Project/SyncMotor.h b/Project/SyncMotor.h
index 90b7186..4950922 100644
--- a/Project/SyncMotor.h
+++ b/Project/SyncMotor.h
@@ -124,6 +124,13 @@ struct SyncMotorElectricalData {
Machines::SyncMachineModel model = Machines::SM_MODEL_1;
};
+/**
+ * @class SyncMotor
+ * @author Thales Lima Oliveira <thales@ufu.br>
+ * @date 06/10/2017
+ * @brief Synchronous motor (synchronous compensator) power element.
+ * @file SyncMotor.h
+ */
class SyncMotor : public Machines
{
public:
diff --git a/Project/Text.h b/Project/Text.h
index 03acd48..f5544f1 100644
--- a/Project/Text.h
+++ b/Project/Text.h
@@ -62,6 +62,13 @@ enum DataType {
DATA_PF_CURRENT
};
+/**
+ * @class Text
+ * @author Thales Lima Oliveira <thales@ufu.br>
+ * @date 06/10/2017
+ * @brief Element that shows power element informations in workspace.
+ * @file Text.h
+ */
class Text : public GraphicalElement
{
public:
diff --git a/Project/TransferFunction.cpp b/Project/TransferFunction.cpp
index 39e9b4f..ed6640a 100644
--- a/Project/TransferFunction.cpp
+++ b/Project/TransferFunction.cpp
@@ -273,7 +273,8 @@ void TransferFunction::CalculateSpaceState(int maxIteration, double error)
int order = static_cast<int>(m_denominator.size());
std::vector<double> denominator = m_denominator;
std::vector<double> numerator;
-
+
+ //[Ref.] http://lpsa.swarthmore.edu/Representations/SysRepTransformations/TF2SS.html
int k = order;
for(int i = 0; i < order; i++) {
int numIndex = i - (order - static_cast<int>(m_numerator.size()));
diff --git a/Project/TransferFunction.h b/Project/TransferFunction.h
index fd83ba4..af84ba5 100644
--- a/Project/TransferFunction.h
+++ b/Project/TransferFunction.h
@@ -25,6 +25,13 @@
class TransferFunctionForm;
+/**
+ * @class TransferFunction
+ * @author Thales Lima Oliveira <thales@ufu.br>
+ * @date 06/10/2017
+ * @brief Calculates the time response by a frequency domain transfer function.
+ * @file TransferFunction.h
+ */
class TransferFunction : public ControlElement
{
public:
@@ -51,7 +58,21 @@ class TransferFunction : public ControlElement
virtual void UpdateTFText();
virtual void UpdateText() { UpdateTFText(); }
virtual SpaceState GetSpaceState() { return m_ss; }
+ /**
+ * @brief Convert the transfer function to space state on controllable canonical form (CCF).
+ * @param maxIteration Max number of solution iteration.
+ * @param error Tolerance for calculation.
+ */
virtual void CalculateSpaceState(int maxIteration = 100, double error = 1e-3);
+ /**
+ * @brief Calculates the time response by the space state form of transfer function.
+ *
+ * Uses the implicit trapezoidal rule to solve:
+ * <center>\f$ y_{n+1}=y_n+\frac{1}{2}h(y'_n+y'_{n+1}) \f$</center>
+ * @param input Input value.
+ * @param timeStep Time step.
+ * @return true if the calculation converges, false otherwise.
+ */
virtual bool Solve(double input, double timeStep);
virtual Element* GetCopy();
diff --git a/Project/Transformer.h b/Project/Transformer.h
index 6c5efea..3b0d314 100644
--- a/Project/Transformer.h
+++ b/Project/Transformer.h
@@ -68,6 +68,13 @@ struct TransformerElectricalData {
std::complex<double> faultCurrent[2][3];
};
+/**
+ * @class Transformer
+ * @author Thales Lima Oliveira <thales@ufu.br>
+ * @date 06/10/2017
+ * @brief Two-winding transformer power element.
+ * @file Transformer.h
+ */
class Transformer : public Branch
{
public: