sunspec / svp_energy_lab

SVP library that enables communication with energy lab equipment.
10 stars 23 forks source link

pvsim and gridsim need to have detailed descriptions for all methods #39

Closed jayatsandia closed 4 years ago

jayatsandia commented 4 years ago

Received comment from SIRFN lab stating that the functionality created by each of the methods in pvsim and gridsim aren't clear.

Question:

E.g., what should be done in “power_on()”? Just close the output relay? Or also set the voltage? Close it at 0V and then raise the voltage, or set the voltage and then turn on with open circuit voltage?

Should “power_on()” already set an irradiance? Or will this be done explicitly with “irradiance_set”?

What of those things should be done in init?

When one calls iv_curve_config(), what is the state before and afterwards regarding output relay, output voltage and irradiation? The driver for TerraSAS does “self.tsas.cmd('SOURce:CURVe "%s", (@%s)\r' % (SVP_CURVE, self.index)) “ and then “self.tsas.cmd('SOURce:EXECute (@%s)\r' % (self.index))” but I have no idea what is behind this command

Should a disconnect() turn off the simulator output before? Or should it keep running with last irradiance set value? And to turn the output of, somebody you have to call “power_off()” explicitly? Wanna have a disconnect() in the destructor?

My response:

We do need to do better about defining the behavior for both the PV and Grid simulators. Unfortunately, each piece of equipment has slight difference to their operations. In the case of power_on(), the PV simulator should provide DC voltage to the EUT. Irradiance will either be set to the default value or one entered in the PV sim parameters.

iv_curve_config() creates and IV curve and then sets it for the channels that are being used to power the eut. It does not change the relay state. Obviously it would be good practice to have the power off (relay open) when changing the IV curve in the simulator, but there’s nothing explicit about the order of those commands in the TerraSAS driver.

In general, open() and close() are used for the communication connections. power_on() and power_off() are used to energize the DC bus (e.g., close the relay). I don’t like using power_off() at the end of any scripts because it takes the EUT longer to restart. I typically configure the simulators and then verify they are operating at the beginning of the scripts.

jayatsandia commented 4 years ago

Mostly addressed in the last pull request.