Power System Platform  2026w10a-beta
Loading...
Searching...
No Matches
PowerQuality.h
Go to the documentation of this file.
1#ifndef POWERQUALITY_H
2#define POWERQUALITY_H
3
5
6#include <wx/intl.h> //_()
7#include <wx/string.h>
8
17{
18public:
19 struct HarmonicYbus {
20 double order;
21 std::vector<std::vector<std::complex<double> > > yBus;
22 };
23
25 PowerQuality(std::vector<Element*> elementList);
27
28 virtual wxString GetErrorMessage() { return m_errorMsg; }
29
30 virtual void CalculateHarmonicYbusList(double systemPowerBase = 100e6, HarmLoadConnection loadConnection = HarmLoadConnection::PARALLEL);
31 virtual void CalculateHarmonicYbus(std::vector<std::vector<std::complex<double> > >& yBus,
32 double systemPowerBase,
33 double order,
34 bool ignoreTransformerConnection = false,
35 HarmLoadConnection loadConnection = HarmLoadConnection::PARALLEL);
36
37 virtual bool CalculateDistortions(double systemPowerBase = 100e6, HarmLoadConnection loadConnection = HarmLoadConnection::PARALLEL);
38 virtual bool CalculateFrequencyResponse(double systemFreq = 60.0,
39 double initFreq = 0.0,
40 double endFreq = 1500.0,
41 double stepFreq = 1.0,
42 int injBusNumber = 0,
43 double systemPowerBase = 100e6,
44 HarmLoadConnection loadConnection = HarmLoadConnection::PARALLEL);
45 virtual std::vector<double> GetHarmonicOrdersList();
46 virtual std::vector<double> GetFrequencies() { return m_frequencyList; }
47
48protected:
49 std::vector<std::vector< std::complex<double> > > GetTransformerHarmAdmmitance(Transformer* transformer, double systemPowerBase, double hOrder, bool ignoreConnection = false);
50
51 std::vector<HarmonicYbus> m_harmYbusList;
52 std::vector<double> m_frequencyList;
53 wxString m_errorMsg = "";
54};
55
56#endif // POWERQUALITY_H
Base class for electrical calculations providing general utility methods.
Responsible for the power quality calculations.
Two-winding transformer power element.
Definition Transformer.h:84