ACDCConverter.py 4.87 KB
Newer Older
1
from cimpy.cgmes_v2_4_15.ConductingEquipment import ConductingEquipment
2
3
4
5
6
7
8
9
10
11


class ACDCConverter(ConductingEquipment):
	'''
	A unit with valves for three phases, together with unit control equipment, essential protective and switching devices, DC storage capacitors, phase reactors and auxiliaries, if any, used for conversion.

	:baseS: Base apparent power of the converter pole. Default: 0.0
	:idleLoss: Active power loss in pole at no power transfer. Converter configuration data used in power flow. Default: 0.0
	:maxUdc: The maximum voltage on the DC side at which the converter should operate. Converter configuration data used in power flow. Default: 0.0
	:minUdc: Min allowed converter DC voltage. Converter configuration data used in power flow. Default: 0.0
Philipp Reuber's avatar
Philipp Reuber committed
12
	:numberOfValves: Number of valves in the converter. Used in loss calculations. Default: 0
13
14
15
16
	:ratedUdc: Rated converter DC voltage, also called UdN. Converter configuration data used in power flow. Default: 0.0
	:resistiveLoss: Converter configuration data used in power flow. Refer to poleLossP. Default: 0.0
	:switchingLoss: Switching losses, relative to the base apparent power 'baseS'. Refer to poleLossP. Default: 0.0
	:valveU0: Valve threshold voltage. Forward voltage drop when the valve is conducting. Used in loss calculations, i.e. the switchLoss depend on numberOfValves * valveU0. Default: 0.0
17
	:DCTerminals:  Default: "many"
18
19
20
21
22
23
24
25
26
27
28
	:PccTerminal: All converters' DC sides linked to this point of common coupling terminal. Default: None
	:idc: Converter DC current, also called Id. Converter state variable, result from power flow. Default: 0.0
	:poleLossP: The active power loss at a DC Pole  = idleLoss + switchingLoss*|Idc| + resitiveLoss*Idc^2 For lossless operation Pdc=Pac For rectifier operation with losses Pdc=Pac-lossP For inverter operation with losses Pdc=Pac+lossP Converter state variable used in power flow. Default: 0.0
	:uc: Converter voltage, the voltage at the AC side of the bridge. Converter state variable, result from power flow. Default: 0.0
	:udc: Converter voltage at the DC side, also called Ud. Converter state variable, result from power flow. Default: 0.0
	:p: Active power at the point of common coupling. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution in the case a simplified power flow model is used. Default: 0.0
	:q: Reactive power at the point of common coupling. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution in the case a simplified power flow model is used. Default: 0.0
	:targetPpcc: Real power injection target in AC grid, at point of common coupling. Default: 0.0
	:targetUdc: Target value for DC voltage magnitude. Default: 0.0
		'''

29
30
	cgmesProfile = ConductingEquipment.cgmesProfile

Philipp Reuber's avatar
Philipp Reuber committed
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
	possibleProfileList = {'class': [cgmesProfile.EQ.value, cgmesProfile.SV.value, cgmesProfile.SSH.value, ],
						'baseS': [cgmesProfile.EQ.value, ],
						'idleLoss': [cgmesProfile.EQ.value, ],
						'maxUdc': [cgmesProfile.EQ.value, ],
						'minUdc': [cgmesProfile.EQ.value, ],
						'numberOfValves': [cgmesProfile.EQ.value, ],
						'ratedUdc': [cgmesProfile.EQ.value, ],
						'resistiveLoss': [cgmesProfile.EQ.value, ],
						'switchingLoss': [cgmesProfile.EQ.value, ],
						'valveU0': [cgmesProfile.EQ.value, ],
						'DCTerminals': [cgmesProfile.EQ.value, ],
						'PccTerminal': [cgmesProfile.EQ.value, ],
						'idc': [cgmesProfile.SV.value, ],
						'poleLossP': [cgmesProfile.SV.value, ],
						'uc': [cgmesProfile.SV.value, ],
						'udc': [cgmesProfile.SV.value, ],
						'p': [cgmesProfile.SSH.value, ],
						'q': [cgmesProfile.SSH.value, ],
						'targetPpcc': [cgmesProfile.SSH.value, ],
						'targetUdc': [cgmesProfile.SSH.value, ],
						 }

53
	serializationProfile = {}
54
55
56

	__doc__ += '\n Documentation of parent class ConductingEquipment: \n' + ConductingEquipment.__doc__ 

57
	def __init__(self, baseS = 0.0, idleLoss = 0.0, maxUdc = 0.0, minUdc = 0.0, numberOfValves = 0, ratedUdc = 0.0, resistiveLoss = 0.0, switchingLoss = 0.0, valveU0 = 0.0, DCTerminals = "many", PccTerminal = None, idc = 0.0, poleLossP = 0.0, uc = 0.0, udc = 0.0, p = 0.0, q = 0.0, targetPpcc = 0.0, targetUdc = 0.0,  *args, **kw_args):
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
		super().__init__(*args, **kw_args)
	
		self.baseS = baseS
		self.idleLoss = idleLoss
		self.maxUdc = maxUdc
		self.minUdc = minUdc
		self.numberOfValves = numberOfValves
		self.ratedUdc = ratedUdc
		self.resistiveLoss = resistiveLoss
		self.switchingLoss = switchingLoss
		self.valveU0 = valveU0
		self.DCTerminals = DCTerminals
		self.PccTerminal = PccTerminal
		self.idc = idc
		self.poleLossP = poleLossP
		self.uc = uc
		self.udc = udc
		self.p = p
		self.q = q
		self.targetPpcc = targetPpcc
		self.targetUdc = targetUdc
		
	def __str__(self):
		str = 'class=ACDCConverter\n'
		attributes = self.__dict__
		for key in attributes.keys():
			str = str + key + '={}\n'.format(attributes[key])
		return str