Skip to content

Computational Structure of LCA

This document explains the mathematical and computational foundations of Life Cycle Assessment as implemented in EcoSemantic through the Brightway2 framework.

Overview

Life Cycle Assessment calculations are fundamentally matrix-based linear algebra operations. Understanding this structure helps you:

  • Build more accurate models
  • Debug unexpected results
  • Optimize complex calculations
  • Understand the relationship between your data and results

The Three Core Matrices

LCA calculations in Brightway2 use three primary matrices:

graph LR
    subgraph "Inventory"
        A[Technosphere Matrix<br/>A]
        B[Biosphere Matrix<br/>B]
    end

    subgraph "Impact Assessment"
        C[Characterization Matrix<br/>C]
    end

    F[Demand Vector<br/>f] --> A
    A --> S[Supply Vector<br/>s]
    S --> B
    B --> I[Inventory<br/>g]
    I --> C
    C --> H[Impact Score<br/>h]

    style A fill:#e3f2fd
    style B fill:#e8f5e9
    style C fill:#fff3e0

1. Technosphere Matrix (A)

The technosphere matrix represents the industrial economy - all human-made products and services.

Structure:

  • Rows: Products (goods and services)
  • Columns: Processes (activities)
  • Values: Exchange amounts between products and processes

Properties:

  • Square matrix (same number of products and processes in most cases)
  • Sparse (most elements are zero)
  • Diagonal typically contains production amounts
         Process 1  Process 2  Process 3
Product 1  [  1.0      -0.5       0.0  ]
Product 2  [ -2.0       1.0      -0.3  ]
Product 3  [  0.0      -1.5       1.0  ]

In this example:

  • Diagonal (1.0, 1.0, 1.0) = Each process produces 1 unit of its reference product
  • Off-diagonal negative values = Consumption of products by other processes

2. Biosphere Matrix (B)

The biosphere matrix represents environmental exchanges - flows between the industrial economy and the natural environment.

Structure:

  • Rows: Elementary flows (emissions, resources)
  • Columns: Processes (same order as technosphere)
  • Values: Amount of environmental exchange per unit of process activity
              Process 1  Process 2  Process 3
CO2 fossil    [  2.5       1.2       0.8  ]
Water use     [ 10.0       5.0      15.0  ]
Iron ore      [  0.0       3.0       0.0  ]

3. Characterization Matrix (C)

The characterization matrix converts physical flows to impact scores.

Structure:

  • Rows: Impact categories
  • Columns: Elementary flows
  • Values: Characterization factors
                    CO2 fossil  CH4 fossil  N2O
Climate Change GWP  [   1.0        28.0      265  ]

The LCA Calculation

Step 1: Life Cycle Inventory (LCI)

The LCI calculation determines how much of each process is needed to satisfy the demand:

$$ \mathbf{A} \cdot \mathbf{s} = \mathbf{f} $$

Solving for the supply vector:

$$ \mathbf{s} = \mathbf{A}^{-1} \cdot \mathbf{f} $$

Where:

  • $\mathbf{A}$ = Technosphere matrix
  • $\mathbf{s}$ = Supply vector (scaling factors for each process)
  • $\mathbf{f}$ = Final demand vector (what you want to produce)

Example:

If you want to produce 5 units of Product 1:

f = [5, 0, 0]ᵀ

Solving A·s = f gives you s = [5.0, 2.5, 0.375]ᵀ

This means:

  • Process 1 runs 5.0 times
  • Process 2 runs 2.5 times (to supply Process 1)
  • Process 3 runs 0.375 times (to supply Process 2)

Step 2: Elementary Flow Inventory

Calculate the total environmental exchanges:

$$ \mathbf{g} = \mathbf{B} \cdot \mathbf{s} $$

Where $\mathbf{g}$ is the inventory vector (total of each elementary flow).

Step 3: Life Cycle Impact Assessment (LCIA)

Apply characterization factors:

$$ \mathbf{h} = \mathbf{C} \cdot \mathbf{g} $$

Where $\mathbf{h}$ is the impact score vector.

Combined Formula

The complete calculation can be expressed as:

$$ \mathbf{h} = \mathbf{C} \cdot \mathbf{B} \cdot \mathbf{A}^{-1} \cdot \mathbf{f} $$

Brightway2's Approach

No Normalization Assumption

Traditional IO-LCA uses:

$$ \mathbf{h} = (\mathbf{I} - \mathbf{A})^{-1} \cdot \mathbf{f} $$

This assumes each process is normalized to produce exactly 1 unit.

Brightway2 uses:

$$ \mathbf{h} = \mathbf{A}^{-1} \cdot \mathbf{f} $$

This does not assume normalization, allowing:

  • Production amounts other than 1.0
  • More flexible modeling
  • Direct use of real-world data

Sparse Matrix Operations

Real LCA databases have thousands of processes but each process only connects to a few dozen others. Brightway2 uses sparse matrix representations:

  • Only non-zero values are stored
  • Dramatically reduces memory usage
  • Enables fast calculations even for large systems

Efficient Solvers

Instead of computing $\mathbf{A}^{-1}$ directly (expensive), Brightway2 uses:

  1. LU Decomposition: Factorize $\mathbf{A} = \mathbf{L} \cdot \mathbf{U}$
  2. Forward/Back Substitution: Solve efficiently

This is much faster, especially for repeated calculations with the same technosphere matrix.

Data Flow in EcoSemantic

sequenceDiagram
    participant User
    participant EcoSemantic
    participant Brightway2
    participant Matrices

    User->>EcoSemantic: Create activity & exchanges
    EcoSemantic->>Brightway2: Write to database

    User->>EcoSemantic: calculate_custom()
    EcoSemantic->>Brightway2: Create ephemeral database
    Brightway2->>Matrices: Build A, B matrices
    Brightway2->>Matrices: Load C matrix (method)
    Matrices->>Brightway2: Solve LCI
    Matrices->>Brightway2: Calculate LCIA
    Brightway2->>EcoSemantic: Return score
    EcoSemantic->>User: Return result
    EcoSemantic->>Brightway2: Clean up ephemeral database

Ephemeral Databases

When you run a custom calculation, EcoSemantic:

  1. Creates a temporary database with your custom activities
  2. Links it to the ecoinvent background database
  3. Builds matrices combining both
  4. Performs the calculation
  5. Cleans up the temporary database

This approach:

  • Keeps your custom data separate from base ecoinvent
  • Allows multiple users to calculate simultaneously
  • Prevents data corruption
  • Optimizes memory usage

Matrix Properties and Requirements

Non-Singular Requirement

The technosphere matrix must be non-singular (invertible) for the calculation to work. This requires:

  • Every product must have exactly one production source
  • No circular dependencies that can't be resolved
  • Properly balanced inputs and outputs

Sign Convention in Matrices

In the technosphere matrix:

Position Sign Meaning
Diagonal Positive Production of reference product
Off-diagonal Negative Consumption of inputs
Off-diagonal Positive Substitution/avoided production

User vs Matrix Convention

Remember: You enter positive values for inputs in EcoSemantic. Brightway2 automatically converts them to negative values in the matrix. See Exchange Conventions for details.

Performance Considerations

Matrix Size

Database Approximate Matrix Size
ecoinvent 3.9.1 ~20,000 × 20,000
ecoinvent 3.12 ~23,000 × 23,000
With custom activities Base + your activities

Calculation Time

Typical calculation times in EcoSemantic:

Operation Typical Time
Standard LCA (single activity) 0.5 - 2 seconds
Custom LCA (simple) 1 - 3 seconds
Custom LCA (complex) 2 - 5 seconds

Optimization Tips

  1. Reuse calculations: If analyzing variations, the technosphere factorization can be reused
  2. Limit custom activities: Each custom activity adds to matrix size
  3. Use appropriate database version: Newer versions are larger but more accurate

Debugging Results

Unexpected Zero Results

If your LCA score is zero, check:

  • [ ] Is there a production exchange for your activity?
  • [ ] Are all exchanges properly linked?
  • [ ] Is the functional unit correctly specified?

Unexpected Large Results

If results seem too large:

  • [ ] Check exchange amounts (unit errors are common)
  • [ ] Verify the correct activity was selected
  • [ ] Confirm the method specification is correct

Negative Results

Negative LCIA results can occur when:

  • Avoided burden credits exceed impacts
  • Biogenic carbon uptake is modeled
  • Substitution effects dominate

Further Reading