Listen

Description

Most engineering failures don’t come from bad algorithms or insufficient data.They come from something much more basic:

We didn’t define the system properly.

That’s what this episode of Coordinated with Fredrik is about — system boundaries, thermodynamics, and how we should think about a home once it stops being a passive consumer and starts behaving like an active energy system

Where does a system begin — and where does it end?

This sounds almost philosophical, but it’s one of the most practical questions an engineer can ask.

Every system needs a boundary. Without one, it’s impossible to reason about control, optimization, or even responsibility. This is true for software systems, mechanical systems, and very much so for energy systems.

Ludwig von Bertalanffy, the father of systems theory, once said:

“The boundaries of a system are not given in nature but are determined by the observer.”

That’s true in many domains — but energy is special.

In energy systems, the boundary is not arbitrary.It is physical, legal, and enforced.

That boundary is the electricity meter.

The meter is not a billing device

We tend to think of the electricity meter as something purely administrative — a device that exists to calculate our bill. But that’s a mistake.

The meter is the point of common coupling (PCC) between your home and the grid.Everything you consume passes through it.Everything you export passes through it.

It is where:

* Ownership changes

* Responsibility changes

* Grid physics ends and home physics begins

* Billing, tariffs, export limits, and fuse constraints apply

In thermodynamic terms, it is the membrane between two systems.

Once you see the meter this way, the right question stops being “What is my inverter doing?” and becomes:

What crosses this boundary, when, and under what constraints?

That single shift changes everything.

Why the old model worked — and why it broke

Historically, homes were boring.

They were passive loads.Power flowed in one direction.Individual behavior didn’t matter much.

From the grid’s perspective, you could aggregate thousands of homes and get remarkably accurate forecasts. The system was statistically predictable because nothing interesting happened at the edges.

So our tooling reflected that worldview.

We read registers.We polled Modbus TCP.We collected telemetry.

And for a long time, that was enough.

The moment homes stopped being predictable

Then we added things.

Solar PV at the edges of the grid.Batteries that store energy over time.Electric vehicles with large, deadline-driven loads.Heat pumps with thermal inertia and weather-dependent efficiency.

Suddenly:

* Power flows both ways

* State matters (SOC, temperature, availability)

* Timing matters more than magnitude

* Homes can go from “doing nothing” to exporting 8 kW in seconds

From the grid’s point of view, a home that used to be a smooth, boring signal becomes bursty, stateful, and hard to predict.

A house might sit at zero net flow for hours — perfectly balanced by solar and storage — and then abruptly inject a large amount of power when a battery fills up or a cloud passes.

The old statistical assumptions no longer hold.

A short detour into thermodynamics (the useful parts)

Thermodynamics gives us the correct mental model for all of this.

Clausius summarized the first and second laws in a single sentence:

“The energy of the universe is constant. The entropy of the universe tends to a maximum.”

Everything that happens inside a home — or any site — sits inside that frame.

The first law: accounting

Energy doesn’t disappear. It transforms.

For a home:

* Energy can be stored chemically (batteries)

* Stored thermally (hot water tanks, slabs, buildings)

* Converted between electrical and thermal forms

* Exported or imported across the meter

Power is just energy per unit time.Storage is what happens when generation and consumption don’t align in time.

In that sense, storage isn’t a device category.It’s a consequence of time mismatch.

The second law: usefulness

The first law tells us energy is conserved.The second law tells us not all energy is equally useful.

Electricity is high-quality energy.Low-temperature heat is low-quality energy.

You can easily turn electricity into heat.You can’t easily turn heat back into electricity.

This is why heat pumps matter so much: they don’t create heat — they move it, exploiting temperature differences to deliver more heat than the electrical energy they consume.

None of this is optional. Software that ignores the second law will always look good in simulations and fail in reality.

From signals to systems: Site, Device, DER

This is where thermodynamics meets software architecture.

Site

The site is the system boundary.Everything behind the meter.

A site has:

* Objectives (cost, comfort, self-consumption, grid services)

* Constraints (main fuses, export limits, tariffs)

* State that evolves over time

Optimization only makes sense at this level.

Device

A device is something you can communicate with.

It has:

* Protocols (Modbus, REST, cloud APIs)

* Registers

* Firmware versions

* Vendor quirks and bugs

Devices answer the question:What can I technically talk to right now?

That’s necessary — but insufficient.

DER (Distributed Energy Resource)

A DER is a logical abstraction.

It represents capability, constraints, and state — independent of protocol.

A battery DER might represent:

* Total capacity

* Current SOC

* Charge/discharge limits

* Efficiency

Whether that battery consists of one module or twenty cells doesn’t matter unless it affects system behavior.

DERs answer the real question:What can this resource do for the system?

Devices are how you talk.DERs are what you reason about.

Why this abstraction matters

Once you define:

* The boundary (the site)

* The resources (DERs)

* The constraints

Control stops being reactive.

The problem becomes:

What should the energy flow across the meter look like over time?

The grid doesn’t care how your system is wired internally.It cares about magnitude, direction, and timing at the boundary.

In that sense, the meter becomes the objective function.

Homes are no longer loads

A modern home has:

* State

* Constraints

* Objectives

* Time-coupled decisions

That’s not a load.

That’s an agent.

We inherited an energy system architecture from a time when homes were boring. They aren’t anymore. That creates real challenges — but also real opportunities.

And none of them can be addressed without going back to first principles and defining the system correctly.



This is a public episode. If you would like to discuss this with other subscribers or get access to bonus episodes, visit frahlg.substack.com