OK... since you are on the grid, having batteries would be a waste of money, so I suppose you have no batteries.
The answer to your question likely depends on your solar UPS, so check its manual for a feature that would do what you want, and post a comment.
Failing that, the problem is likely to be very complex. If the UPS does not cooperate, then you'd need to measure the power draw for the entire house, combine that with the solar power data, and use some sort of controller to switch your loads.
If you have a very long mains cable between your house and the transformer, then voltage might be an approximation... then again maybe not.
Instead, I'm gonna go on a tangent...
Let's say you got a refrigerator and a freezer. If you put a few bottles of water in there (or more high-tech phase change materials) then you can store cold. A simple timer will then let the freezer/fridge run only during the day, so it runs on solar instead of mains.
Same for your water heater.
I mean, it's a super dumb solution. Timers don't know if the weather is sunny or cloudy... but if the appliances are switched off at night, at least they have a higher chance of running on solar. The total amount of energy used won't change much.
Since you are aiming to save money here, you gotta weigh in system cost and complexity. A pair of $5 timers has very little chance of being a bad investment...
I mean, if you can usefully employ, say, 1kWh per day instead of giving it for free to the electrical provider, you're looking at something like 5 bucks a month. Always good to have, but not something worth spending lots of time, energy and money achieving.
I cannot comprehend how, for example, multiple homes can feed their ... energy into a grid using the lines of the public utility.
That's the way the power stations do it, so why not? All that is required is to keep the AC frequency correct and in-phase with the grid and then raise the voltage above the grid voltage. Current will flow from the higher voltage to the lower.
Can excess PV be fed directly into the grid using an inverter?
Yes, but a grid-tie inverter is required. It will maintain frequency and sync with the grid and also have features to disconnect in a guaranteed safe manner when the mains power is lost. This avoids you trying to power up the city with your little solar panel and also avoids electrocution of the lineman out doing the repairs.
Or is it necessary to go through a "middle man" like a battery, and from there the DC can be converted to AC.
Theoretically no, but there may be practical or separate reasons to have one there.
Is the utility automatically distributing the excess energy from individual homes to other loads in the grid?
You can consider it like water feeding into the national pipework. It will generally be drawn off by the nearest consumer. If the grid voltage starts to rise then the load schedulers need to reduce supply.
Are they "bleeding" it off somewhere similar to a pressure valve in cases where they cannot handle all of it?
In the case of steam power stations, yes, the excess steam will have to be vented. Wind turbines can be turned out of the wind. Hydro can be shut down quickly. Gas turbines can shut down quickly.
Another issue is there are multiple power producers that are using lines that stretch hundreds of miles, and now you have homes feeding energy back into these lines, so I am guessing that a single power producer needs to be in charge of an entire section, so there is no congestion.
It's more likely to be controlled by the network company these days.
Best Answer
Grid attached solar inverters monitor the frequency of the power lines they are attached to. In fact in some jurisdictions there is a requirement that they monitor the line for about five minutes before attaching. During that time we sync a pll to the incoming frequency so that when we generate our output the inverter will be in sync with the line. We are also watching the line voltage (and of course our output current). When we attach to the line, we open our transistors and push current out onto the grid. Our local control system continues to monitor the line and adjust our output to provide a constant current to the grid regardless of where we are in the AC cycle (assuming available solar energy).