VI-Scanner
For the second algorithm to be tested in this work, the shadow management of modern MPP trackers is to be implemented. Thereby the IU-characteristic of the solar module is scanned quickly in an interval of several minutes and it is checked at which point the maximum power can be drawn. This operating point is then set for the next interval.
The code in VI scanner loop uses two loops to find the maximum power point of the PV-module. It increments the duty cycle of the device from 0% to 70% and measures the voltage, current, and power of the device. When the voltage
VI Scanner loop
power_curve =[]
while(True):
for duty in range(70):
device.setDutyCycle(duty)
time.sleep_ms(20)
device.getfilteredADC()
device.calcADCData()
time.sleep_ms(20)
power_curve.append(device.power[0])
device.printOut()
if device.voltage[0] < 12:
print('Abbruch ', device.voltage[0])
break
power_max = max(power_curve)
duty_max = power_curve.index(power_max)
power_curve.clear()
device.setDutyCycle(duty_max)
time.sleep_ms(100)
device.getfilteredADC()
device.calcADCData()
time.sleep(60)