summaryrefslogtreecommitdiffstats
path: root/Project/PowerQuality.h
diff options
context:
space:
mode:
authorThales Lima Oliveira <thaleslima.ufu@gmail.com>2019-07-18 09:22:27 -0300
committerGitHub <noreply@github.com>2019-07-18 09:22:27 -0300
commit8357c081eb75147bb8f94d8b6e367d88ea3898ed (patch)
tree9d9726fdcefb917475d6b33344d2b832d4e78ef8 /Project/PowerQuality.h
parent295b775ad53eb1e128b705e6028f9690dc6fa640 (diff)
parent7f46d390b8cc1d5f37560f52b222198dbc5e1225 (diff)
downloadPSP.git-8357c081eb75147bb8f94d8b6e367d88ea3898ed.tar.gz
PSP.git-8357c081eb75147bb8f94d8b6e367d88ea3898ed.tar.xz
PSP.git-8357c081eb75147bb8f94d8b6e367d88ea3898ed.zip
Merge pull request #50 from Thales1330/wip/induction-motor
Wip/induction motor
Diffstat (limited to 'Project/PowerQuality.h')
-rw-r--r--Project/PowerQuality.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/Project/PowerQuality.h b/Project/PowerQuality.h
new file mode 100644
index 0000000..47d2260
--- /dev/null
+++ b/Project/PowerQuality.h
@@ -0,0 +1,48 @@
+#ifndef POWERQUALITY_H
+#define POWERQUALITY_H
+
+#include "ElectricCalculation.h"
+
+#include <wx/intl.h> //_()
+#include <wx/string.h>
+
+/**
+ * @class PowerQuality
+ * @author Thales Lima Oliveira <thales@ufu.br>
+ * @date 24/04/2019
+ * @brief Responsible for the power quality calculations.
+ * @file PowerQuality.h
+ */
+class PowerQuality : public ElectricCalculation
+{
+ public:
+ struct HarmonicYbus {
+ double order;
+ std::vector<std::vector<std::complex<double> > > yBus;
+ };
+
+ PowerQuality();
+ PowerQuality(std::vector<Element *> elementList);
+ ~PowerQuality();
+
+ virtual void CalculateHarmonicYbusList(double systemPowerBase = 100e6);
+ virtual void CalculateHarmonicYbus(std::vector<std::vector<std::complex<double> > > &yBus,
+ double systemPowerBase,
+ double order);
+
+ virtual bool CalculateDistortions(double systemPowerBase = 100e6);
+ virtual bool CalculateFrequencyResponse(double systemFreq = 60.0,
+ double initFreq = 0.0,
+ double endFreq = 1500.0,
+ double stepFreq = 1.0,
+ int injBusNumber = 0,
+ double systemPowerBase = 100e6);
+ virtual std::vector<double> GetHarmonicOrdersList();
+ virtual std::vector<double> GetFrequencies() { return m_frequencyList; }
+
+ protected:
+ std::vector<HarmonicYbus> m_harmYbusList;
+ std::vector<double> m_frequencyList;
+};
+
+#endif // POWERQUALITY_H