Skip to content
View in the app

A better way to browse. Learn more.

Power Forum - Renewable Energy Discussion

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Infinisolar with Modbus card - stable "zeroing" ?

Featured Replies

Hi,

Who out there is using an Infinisolar inverter - and using the the Modbus card and an SDM630 meter to zero feed-back to the grid?

If you are, does it work well?  Is it able to get the nett grid consumption close to zero?

I have just setup mine - but I'm using a program I wrote to emulate the SDM630 meter with the actual power measurements coming from a Carlo Gavazzi ET112.

I wrote a Python program with pymodbus.  It polls the values off the ET112, converts them from scaled integers to IEEE754 floats, and dishes them out when the inverter comes asking.

My code looks like its working right - I can see the modbus card asking for the "Total system power" and the number I give back is the right value read from the ET112.

But what I see happening is that the modbus card turns on the taps - feeding more power in - and the amount coming from the grid drops.  Like it should.

When it gets the grid nearly to zero I sometimes have a minute or two where the grid inflow is close to zero.  But then suddenly the card seems to "reset" the feed in - the push back from the inverter goes to 0 - grid consumption goes up.

The cycle then repeats and repeats:

image.thumb.png.13ed9b381542cd4caaa55016e7dc411f.png

 

Now this sort of control loop is always tricky and can be unstable.  But I'm polling the ET112 3 times a second and the modbus asks once a second so its getting very fresh data.

It looks like some of "fail safe" is being triggered in the modbus card code.  Probably it is to do with seeing negative power readings coming back from the meter.

But once it is triggered then it gets retriggered over and over again and the feed-in oscillates up and down.

(Update: the pool pump went off and house load on the grid side went down a lot and now the feed in seems to have stabilised)

If @riogrande75 knows how to emulate the Voltronic Modbus server then I'm sure I can write a more stable control loop.

@plonkster I saw you posted about improving this control loop in the Venus.  What's the trick?

I don't have any way to change the code in the Modbus card, but if I can understand what is happening I could maybe tweak the number I feed back to the inverter to help stabilise this control loop running on the Modbus card.

I'm wondering whether I'll do better if I smooth the reading I send to the inverter - maybe make an average of a few seconds worth of readings.

 

 

IMG_0279.thumb.jpg.20915b37243e2429d3021c9cd1c0dcea.jpg

1 hour ago, Elbow said:

 I saw you posted about improving this control loop in the Venus.  What's the trick?

Oh there isn't really much to be done. It's slow. It's like a drunk man trying to walk in a straight line... it's only at zero when it goes over it... 🙂

I'm not sure what you are referring to or what I might have been thinking of when I wrote it, but there isn't much to be done. The only thing that was added -- years ago already -- is a small low pass filter. Because the EM24 meters have a bit of latency, so if you don't damp it you get a bit of oscillation.

9 hours ago, Elbow said:

I'm wondering whether I'll do better if I smooth the reading I send to the inverter - maybe make an average of a few seconds worth of readings.

Interesting. It seems you have to avoid the inverter overshooting the power target and going into export.

As a first cut, you might just try and aim for say 100 W of grid power, rather than zero. So subtract 100 from the meter's power number (clip at zero of course) and send that to the inverter.

As a refinement, you might try aiming for 100 W if the inverter power has changed a lot recently, aim for 50 W if the inverter hasn't changed power more than say 500 W for a while, and aim for zero if the power hasn't changed more than say 200 W. All these figures will have to be adjusted based on results. [ Edit: I'm not sure if you want to react to load power changes or inverter set-point power changes. Perhaps both, though I'm thinking it's more likely to be inverter set-point changes that you need to react to. ]

Maybe there's a way of coming up with the figure to aim for based on a moving average of the absolute values of a few past power level changes.

It's tricky because you're attempting a control system for a control system that you didn't write. If the Infini inverter did its job properly, you wouldn't have this problem.

Control theory. Always the hardest part for me.

Edited by Coulomb

18 hours ago, Elbow said:

Hi,

Who out there is using an Infinisolar inverter - and using the the Modbus card and an SDM630 meter to zero feed-back to the grid?

If you are, does it work well?  Is it able to get the nett grid consumption close to zero?

I have just setup mine - but I'm using a program I wrote to emulate the SDM630 meter with the actual power measurements coming from a Carlo Gavazzi ET112.

I wrote a Python program with pymodbus.  It polls the values off the ET112, converts them from scaled integers to IEEE754 floats, and dishes them out when the inverter comes asking.

My code looks like its working right - I can see the modbus card asking for the "Total system power" and the number I give back is the right value read from the ET112.

But what I see happening is that the modbus card turns on the taps - feeding more power in - and the amount coming from the grid drops.  Like it should.

When it gets the grid nearly to zero I sometimes have a minute or two where the grid inflow is close to zero.  But then suddenly the card seems to "reset" the feed in - the push back from the inverter goes to 0 - grid consumption goes up.

The cycle then repeats and repeats:

image.thumb.png.13ed9b381542cd4caaa55016e7dc411f.png

 

Now this sort of control loop is always tricky and can be unstable.  But I'm polling the ET112 3 times a second and the modbus asks once a second so its getting very fresh data.

It looks like some of "fail safe" is being triggered in the modbus card code.  Probably it is to do with seeing negative power readings coming back from the meter.

But once it is triggered then it gets retriggered over and over again and the feed-in oscillates up and down.

(Update: the pool pump went off and house load on the grid side went down a lot and now the feed in seems to have stabilised)

If @riogrande75 knows how to emulate the Voltronic Modbus server then I'm sure I can write a more stable control loop.

@plonkster I saw you posted about improving this control loop in the Venus.  What's the trick?

I don't have any way to change the code in the Modbus card, but if I can understand what is happening I could maybe tweak the number I feed back to the inverter to help stabilise this control loop running on the Modbus card.

I'm wondering whether I'll do better if I smooth the reading I send to the inverter - maybe make an average of a few seconds worth of readings.

 

 

IMG_0279.thumb.jpg.20915b37243e2429d3021c9cd1c0dcea.jpg

HI Elbow,

where you are get SNMP card for your inverter i am interesting about that, i will try connection via RS485 to ethernet

please share with me

8 hours ago, Coulomb said:

Interesting. It seems you have to avoid the inverter overshooting the power target and going into export.

But how would the inverter know? Your simulated modbus meter is its only source of info.

I would add a small low-pass filter and tune it until I get nice smooth curves. Basically, you feed in a percentage of the "error" (aka the difference) on every iteration, so if the previous reading was 100W and the new one is 200W, the delta is 100W, and you take 60% (for example) of that, and you set the new measurement to 160W. You then repeat the process... if the power value has remained stable the new error is 40W, of which you again take 60%, leaving you with 184W, and eventually you approach the actual value asymptotically. Of course, if the actual reading varies all the time, this ends up smoothing it out at an average value. There is an article on Wikipedia explaining the math for working out what the cut-off frequency will be, but if you just make it nice and slow ie around 5 iterations for a stable value to get there... that ought to do it.

I'm speculating that the problem might be a kind of oscilation. In the system.

If that doesn't work, well then I'd go the other way and use the inverter's feed-in power and opportunistically feed a portion of that into the reading... eg something like 110% of the grid reading minus 10% of the inverter feed-in value... an approximation. Why? Cause then an adjustment in the inverter's power reflects immediately in the faked power reading. It might be that it gives up because the adjustments that it is making appears to have no effect (because the latency is too much), so maybe by faking it a bit you can appease the inverter's control loop.

18 hours ago, Elbow said:

3 times a second

Oh, about this. Check the documentation of the ET112. It doesn't update the modbus registers that often. I think it updates either once every 500mS or once every second. It measures more frequently (so the energy counters are more accurate than this), but in terms of reading the meter once a second is really about as good as it gets.

  • 2 months later...

I need some help setting up a 3kW infini Plus (RCT) inverter with a modbus card and SDM630 meter.

I get the meter to communicate with the card, but the inverter does not seem to see the card. Any advice? Might be a dip switch setting.. I don't know. Apparently the inverter is supposed to flash on the screen "EC-On2".. But I don't see any of that.

Any help would be appreciated.

  • Author
On 2019/07/24 at 7:18 PM, Johann1982 said:

I need some help setting up a 3kW infini Plus (RCT) inverter with a modbus card and SDM630 meter.

I get the meter to communicate with the card, but the inverter does not seem to see the card. Any advice? Might be a dip switch setting.. I don't know. Apparently the inverter is supposed to flash on the screen "EC-On2".. But I don't see any of that.

Any help would be appreciated.

My one didn’t flash anything on the screen. I can tell it works by seeing how the inverter manages its output.

  • 7 months later...

Hi @Elbow did you get your setup working properly in the end?

From the pic you posted it looks like my inverter is the same as yours and I am contemplating getting a Modbus Card and SDM630 meter to feed excess PV to the non-critical loads.

Mind sharing where you bought the Modbus Card?

Regards

Edited by francois

  • 1 year later...

Hi, this post is old but I answer my experience.

using an infinisolar 10kw tri with zero output to grid function and it is working well.

the overshoot is sometimes about 20W when charge is changing too quickly.

the energy meter is the EASTRON SDM630 conntected to the modbus card in the inverter.

I have writen a document to explain in details how to setup this but this is in French.

zéro injection infinisolar 10kW triphasé.pdf

  • 1 month later...
  • 10 months later...

I'm struggling with this 10kw infini modbus setup I don't seem to be able to get either my batteries (Pylontech), which claim to be able to communicate with inverter via MODBUS, or the 3ph modbus CT meter to talk to eachother.

No idea how to tell if batteries are communicating with inverter since there don't appear to be any link lights etc; however there is a little icon on my meter which is two arrows, one pointing left and one right, which is supposed to indicate modbus communication and it doesn't come on. I also don't have the EC-ON2 shown on inverter screen (as is shown in french PDF).

I have set the meter to 19,200 rate, address 1, parity none, end bit 1 but that doesn't seem to have done it.

I have tried swapping the blue/white wires at the meter end and no change.

Can anybody point me in the right direction? That would be greatly appreciated!

Thanks

Edited by user27
typos

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.