Documentation ¶
Index ¶
Constants ¶
View Source
const ( SinglePhaseFault = iota ThreePhaseFault = iota OverVoltage = iota UnderVoltage = iota OverFrequency = iota UnderFrequency = iota CapacitorOverCurrent = iota )
Emulated event types
View Source
const EmulatedFaultCurrentMagnitude = 80
EmulatedFaultCurrentMagnitude is the additional fault current magnitude added to one circuit end
View Source
const EmulatedFaultStartSamples = 1000
EmulatedFaultStartSamples is the number of samples before initiating an emulated fault
View Source
const MaxEmulatedCapacitorOverCurrentSamples = 8000
MaxEmulatedCapacitorOverCurrentSamples is the number of samples for emulating a fault
View Source
const MaxEmulatedFaultDurationSamples = 6000
MaxEmulatedFaultDurationSamples is the number of samples for emulating a fault
View Source
const MaxEmulatedFrequencyDurationSamples = 8000
MaxEmulatedFrequencyDurationSamples is the number of samples for emulating frequency deviations
View Source
const TwoPiOverThree = 2 * math.Pi / 3
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Anomaly ¶
type Anomaly struct { InstantaneousAnomalyProbability float64 InstantaneousAnomalyMagnitude float64 // trend anomalies, providing periodic positive or negative slopes of given magnitude and duration IsTrendAnomaly bool `yaml:"IsTrendAnomaly"` IsRisingTrendAnomaly bool `yaml:"IsRisingTrendAnomaly"` TrendAnomalyDuration float64 `yaml:"TrendAnomalyDuration"` // duration in seconds TrendStartDelay float64 `yaml:"TrendStartDelay"` // duration in seconds TrendStartIndex int `yaml:"TrendStartIndex"` // number of time step ticks TrendAnomalyIndex int `yaml:"TrendAnomalyIndex"` // number of time step ticks TrendAnomalyMagnitude float64 `yaml:"TrendAnomalyMagnitude"` // contains filtered or unexported fields }
type Emulator ¶
type Emulator struct { // common inputs SamplingRate int `yaml:"SamplingRate"` // The sampling rate of the emulator Ts float64 `yaml:"Ts"` // The time step for a given sampling rate Fnom float64 `yaml:"Fnom"` // Nominal frequency Fdeviation float64 `yaml:"Fdeviation"` // Frequency deviation V *ThreePhaseEmulation `yaml:"VoltageEmulator,omitempty"` // Voltage Emulator I *ThreePhaseEmulation `yaml:"CurrentEmulator,omitempty"` // Current Emulator T *TemperatureEmulation `yaml:"TemperatureEmulator,omitempty"` // Temperature Emulation Sag *SagEmulation `yaml:"SagEmulator,omitempty"` // Sag Emulator // common state SmpCnt int `yaml:"-"` // contains filtered or unexported fields }
Emulator encapsulates the waveform emulation of three-phase voltage, three-phase current, or temperature
func NewEmulator ¶
func (*Emulator) StartEvent ¶
StartEvent initiates an emulated event
type SagEmulation ¶
type SagEmulation struct { MeanStrain float64 `yaml:"MeanStrain,omitempty"` // Mean strain MeanSag float64 `yaml:"MeanSag,omitempty"` // Mean sag MeanCalculatedTemperature float64 `yaml:"MeanCalculatedTemperature,omitempty"` // Mean calculated temperature // outputs TotalStrain float64 `yaml:"-"` // Total strain Sag float64 `yaml:"-"` // Sag CalculatedTemperature float64 `yaml:"-"` // Calculated temperature }
type TemperatureEmulation ¶
type TemperatureEmulation struct { MeanTemperature float64 `yaml:"MeanTemperature"` // Mean temperature NoiseMax float64 `yaml:"NoiseMax"` // Maximum noise ModulationMag float64 `yaml:"ModulationMag,omitempty"` // Magnitude modulation Anomaly Anomaly `yaml:"Anomaly"` // Anomaly T float64 `yaml:"-"` }
type ThreePhaseEmulation ¶
type ThreePhaseEmulation struct { // inputs PosSeqMag float64 `yaml:"PosSeqMag"` // Positive Sequence Magnitude PhaseOffset float64 `yaml:"PhaseOffset,omitempty"` // Phase Offset NegSeqMag float64 `yaml:"NegSeqMag,omitempty"` // Negative Sequence Magnitude NegSeqAng float64 `yaml:"NegSeqAng,omitempty"` // Negative Sequence Angle ZeroSeqMag float64 `yaml:"ZeroSeqMag,omitempty"` // Zero Sequence Magnitude ZeroSeqAng float64 `yaml:"ZeroSeqAng,omitempty"` // Zero Sequence Angle HarmonicNumbers []float64 `yaml:"HarmonicNumbers,flow,omitempty"` // Harmonic Numbers HarmonicMags []float64 `yaml:"HarmonicMags,flow,omitempty"` // Harmonic magnitudes in pu, relative to PosSeqMag HarmonicAngs []float64 `yaml:"HarmonicAngs,flow,omitempty"` // Harmonic Angles NoiseMax float64 `yaml:"NoiseMax,omitempty"` // Maximum noise // define anomalies PosSeqMagAnomaly Anomaly // positive sequence magnitude anomaly PosSeqAngAnomaly Anomaly // positive sequence angle anomaly PhaseAMagAnomaly Anomaly // phase A magnitude anomaly FreqAnomaly Anomaly // frequency anomaly HarmonicsAnomaly Anomaly // harmonics magnitude anomaly // event emulation FaultPhaseAMag float64 `yaml:"-"` FaultPosSeqMag float64 `yaml:"-"` FaultRemainingSamples int `yaml:"-"` // state change PosSeqMagNew float64 `yaml:"-"` PosSeqMagRampRate float64 `yaml:"-"` // outputs A, B, C float64 `yaml:"-"` // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.