top of page
Search

Grid equation for SCE project manager

This system helps Southern California Edison better predict and manage electricity demand and supply. It tells us the best times to charge EVs or run appliances, reduces stress on the grid, lowers costs, and improves reliability — all while using real-time data and forecasts to make smarter decisions before problems happen.


The system is designed mathematically is flexible enough to scale beyond EVs and appliances. Here’s why and how:

  1. Core Model Is Function-Based:

    • The system uses parameter functions P(x)P(x) and transformation functions T(x)T(x) to compute iterative sums.

    • You can define P(x)P(x) to represent any weighting factor — e.g., regional demand, generation output, renewable variability, or storage capacity.

    • T(x)T(x) can represent the transformation or influence of that input — e.g., voltage deviation, frequency deviation, or predicted load.

  2. Summation Depth Allows Granularity:

    • The iterative sum

      ree

      can scale with more layers (L) to reflect finer-grained phenomena like substation flows, distributed solar output, or industrial load patterns.

  3. Domain Flexibility:

    • xx is not limited to a single appliance or EV — it can represent any continuous or discrete domain, like time slices across a day, nodes in the grid, or multiple geographical regions.

  4. Predictive Inputs:

    • You can feed the system with real-world demand and supply forecasts, e.g., historical load curves, weather-dependent generation models, or market prices.

    • By customizing the function definitions, mathematicians can simulate complex interactions beyond simple appliance behavior.

  5. Scalability at Runtime:

    • Steps (resolution) and depth (iteration) can be increased to handle large datasets without changing the core algorithm — making it possible to evaluate city-wide or region-wide grid behaviors.

In short: The math is modular and parametrically customizable, to scale from a single household’s appliance/E.V. loads to entire grid-level demand and supply scenarios, enabling real-world predictive modeling and optimization.


 User Guide: QCAD Grid Proof of Concept App

1. Purpose of the Tool

The QCAD Grid Proof of Concept app demonstrates how different grid scenarios — convergence, divergence, and bifurcation — affect the balance between electricity supply and demand. It allows project managers to explore the impact of:

  • Electric vehicle (EV) charging shifts

  • Battery storage capacity

  • Renewable supply variability

  • Real spreadsheet (CSV) demand/supply data

2. System Requirements

  • Browser: Chrome, Edge, or Firefox (latest versions)

  • No installation needed: Runs locally by opening the HTML file

  • Optional: Microsoft Excel (or Google Sheets) for preparing and reviewing CSV files

3. Interface Overview

Left Panel (Simulation Controls)

  • Grid Pressure P(x): Adjusts how strongly demand reacts in the simulation (higher = more stress).

  • Timing T(x): Adjusts how supply scales or shifts with renewable timing.

  • EV Fleet Shift %: Percentage of EV demand that can be shifted to off-peak hours.

  • Battery Capacity (MW): Total storage available to support the grid.

  • Mode: Select the QCAD system behavior:

    • Convergence → supply and demand move toward balance.

    • Divergence → supply and demand separate, grid strain increases.

    • Bifurcation → outcomes split randomly into different possible states.

  • Run Simulation: Starts the calculation.

  • Download CSV: Exports the results to a spreadsheet.

  • Spreadsheet Data Upload: Allows loading a CSV with real supply/demand values.

Right Panel (Results & Visualization)

  • Chart:

    • Blue line = Supply

    • Red line = Demand

  • Results Preview: Shows first 10 rows of numeric results (supply, demand, balance).

4. How to Use

Step 1 — Run a Simple Simulation

  1. Open the HTML app in your browser.

  2. Enter values for P(x), T(x), EV shift %, and battery capacity.

  3. Select a Mode (Convergence, Divergence, or Bifurcation).

  4. Click Run Simulation.

  5. View supply/demand curves on the chart.

Step 2 — Upload Spreadsheet Data

  1. Prepare a CSV file with two columns:

    • Column A = Supply (MW)

    • Column B = Demand (MW)

  2. Click Choose File under Spreadsheet Data.

  3. The file will load, and simulation will automatically include this data.

Step 3 — Export Results

  1. After running a simulation, click Download CSV.

  2. A file named qcad_results.csv will save to your computer.

  3. Open it in Excel or Google Sheets for detailed analysis.

5. Example Workflow

  • Upload a demand profile (e.g., residential evening peak).

  • Set EV Shift = 30% and Battery = 200 MW.

  • Compare Divergence Mode vs. Convergence Mode.

  • Export both runs to CSV → compare results side-by-side in Excel.

6. Notes & Limitations

  • This app is a proof of concept, not a production-grade forecasting tool.

  • Supply/demand data must be numeric values; non-numeric rows will be skipped.

  • Results are illustrative, not predictive — they show the effect of QCAD dynamics under different conditions.

  • Not an actual product of Southern California Edison. This is an experimental platform coming from the desk of Travis RC Stone
    Not an actual product of Southern California Edison. This is an experimental platform coming from the desk of Travis RC Stone

    Application of QCAD Modeling to Grid Demand-Supply Optimization

    Prepared for: Southern California Edison (SCE)

    Prepared by: Travis Raymond-Charlie Stone

    Date: September 2025

    Executive Summary

    The Southern California grid is entering a period of unprecedented complexity, driven by increasing renewable penetration, growing electrification of transportation, and rising demand-side uncertainty. Traditional load forecasting and scheduling methods struggle to capture the dynamic, nonlinear behaviors of millions of devices — EVs, distributed storage, smart appliances — interacting simultaneously.

    This paper proposes the application of the QCAD (Quantum Convergence and Divergence) Equation as an advanced analytical framework for modeling grid balancing under uncertainty. QCAD is designed to identify regions of convergence (stability), divergence (instability), and bifurcation (multiple possible outcomes) in recursive systems. Applied to the grid, this framework provides a new lens for evaluating when to draw from or inject into distributed energy resources (DERs), and for determining optimal timing of appliance and EV load operation.

    Problem Statement

    Current grid challenges in California include:

    1. Limited Visibility of Demand → Utilities lack granular insight into real-time household and distributed asset behavior.

    2. Variable Supply → Renewable generation introduces volatility in supply curves.

    3. Load Peaks from EV Charging → The rapid adoption of EVs risks severe evening load spikes.

    4. Distributed Decision-Making → Millions of devices now participate in grid dynamics, but in uncoordinated ways.

    To maintain reliability, SCE must adopt predictive, system-level modeling to guide demand response, incentive design, and automated scheduling.

    QCAD Framework


    ree

    Where:

    • P(x)P(x) = grid pressure function (price signals, load stress, renewable variability)

    • T(x)T(x) = device transformation function (EV charging, appliance load, storage behavior)

    • LL = recursion depth (time horizon of grid planning)

    The aggregated result maps stability or instability across a domain, showing how the system behaves as participation changes.

    Application to SCE Grid Operations

    1. EV Charging Optimization

      • Convergence Mode: Incentivize EVs to charge midday during high solar generation.

      • Divergence Mode: Evening charging without control leads to rapid load escalation.

      • Bifurcation Mode: Split outcomes depending on participation levels in demand response programs.

    2. Appliance Scheduling

      • Household and commercial appliances (HVAC, dryers, refrigeration) can be shifted into convergence valleys, avoiding strain.

    3. Distributed Storage Dispatch

      • QCAD models identify when coordinated discharge prevents peak overload.

      • Bifurcation thresholds highlight minimum participation rates for reliability.

    4. Policy & Incentive Design

      • Pricing signals can be mapped to convergence regimes to encourage consumer behavior aligned with grid stability.

    Strategic Benefits for SCE

    • Resilience: Identify instability risks before they cascade into outages.

    • Efficiency: Optimize utilization of renewables and DERs.

    • Cost Reduction: Reduce peak demand charges and defer infrastructure upgrades.

    • Scalability: Apply the framework across residential, commercial, and industrial demand response programs.

    Recommendations

    1. Pilot Project → Implement QCAD modeling within a microgrid or EV-heavy community to test predictive alignment of loads.

    2. Integration with Demand Response Systems → Use QCAD outputs to guide incentive signals for EVs and appliances.

    3. Collaboration with DER Providers → Incorporate QCAD into battery and EV aggregators’ scheduling platforms.

    4. Expand Forecasting Tools → Combine QCAD with existing forecasting for renewable generation to enhance grid situational awareness.

    Conclusion

    The QCAD Equation provides Southern California Edison with a novel, mathematically rigorous framework to model, anticipate, and manage the dynamic interactions of supply and demand in a renewable-heavy, electrified future. By explicitly quantifying convergence, divergence, and bifurcation behaviors, SCE can better anticipate grid stress points and design demand-side interventions that maintain reliability while accelerating California’s transition to clean energy.


Grid load simulation 

1. Define Variables

For each time step (frame), we consider:

Symbol

Meaning

DD

Demand (MW) – electricity needed at this time

SS

Supply (MW) – electricity generated at this time

EE

EV load (MW) – amount of energy charged to/discharged from EVs

LL

Total load (MW) – net effect on the grid

2. Total Load Formula

The total load LL at each time step is:

L=D−S+EL = D - S + E

  • If L>0L > 0, the grid needs extra energy to meet demand.

  • If L<0L < 0, there’s excess energy that could be stored or exported.

3. Step-by-Step Hand Calculation

Suppose we have 3 frames (time steps). Example values:

Frame

D (MW)

S (MW)

E (MW)

1

120

100

10

2

140

110

5

3

130

130

-5

Step 1: Frame 1

L1=D1−S1+E1=120−100+10=30 MWL_1 = D_1 - S_1 + E_1 = 120 - 100 + 10 = 30 \text{ MW}

Step 2: Frame 2

L2=D2−S2+E2=140−110+5=35 MWL_2 = D_2 - S_2 + E_2 = 140 - 110 + 5 = 35 \text{ MW}

Step 3: Frame 3

L3=D3−S3+E3=130−130+(−5)=−5 MWL_3 = D_3 - S_3 + E_3 = 130 - 130 + (-5) = -5 \text{ MW}

4. Optional Metrics

a) Grid Surplus/Deficit

Surplus/Deficit=S−D−E\text{Surplus/Deficit} = S - D - E

Positive → surplus energyNegative → deficit energy

b) EV Adjustment Recommendation

If L>0L > 0 → consider discharging EVs to supply extra energy.If L<0L < 0 → consider charging EVs to absorb excess energy.

5. How to Do By Hand

  1. Make a table with D, S, E for each frame.

  2. Apply the formula: L=D−S+EL = D - S + E per frame.

  3. Note whether the grid is short or overloaded.

  4. Decide action on EVs or appliances based on L.

This is exactly what the animation app does, except the app calculates many frames quickly




[Grid Data + Forecasts]

[Load & Supply Modeling] ← P(x), T(x), Mode

[Simulation Engine] ← Iterative computation

[Decision Module] ← Optimal actions

[UI Visualization / Spreadsheet Output]

[Actions Executed in Field]

└─── Feedback → [Load & Supply Modeling]


Workflow Description

1. Grid Data Input

  • Real-time SCED telemetry (generation, demand, distributed storage)

  • Forecasts: weather, solar/wind output, historical load patterns

2. Load & Supply Modeling

  • P(x) function → Parameter weighting (e.g., demand intensity, supply constraints)

  • T(x) function → Transformation (e.g., EV behavior, appliance impact)

  • Mode selection → Convergence / Divergence / Bifurcation analysis

3. Simulation Engine

  • Iteratively computes system response

  • Generates predicted system states across time (frames)

  • Tracks historical states in cache for rewind/step analysis

4. Decision Module

  • Evaluates optimal actions:

    • When to charge/discharge EVs

    • When to run appliances

  • Uses current and predicted grid states

5. User Interface / Spreadsheet Output

  • Visualizes results (frames, curves, heatmaps)

  • Exports numerical results for further analysis

  • Allows stakeholders to simulate “what-if” scenarios

6. Feedback Loop

  • Actions taken (EV charge/discharge, appliance scheduling) feed back into grid model

  • Continuous recalculation improves accuracy over time



    Here’s a concise visual comparison table that could be presented to stakeholders:

Feature / Capability

Existing Grid Systems

Predictive Dynamic Optimization (Your System)

Decision Approach

Reactive (after event occurs)

Predictive (anticipates demand/supply)

Data Resolution

Aggregated, delayed

Real-time and device-level

Load Optimization

Limited or none

Individual appliances, EVs, and energy storage

Grid Stress Management

Minimal, often manual

Proactively reduces peaks and overloads

Efficiency / Cost Savings

Indirect, often delayed

Direct, optimized energy use reduces costs

Scalability

Regional or substation level

Extensible to homes, buildings, EV fleets

Decision Latency

Minutes to hours

Seconds to minutes (real-time actionable)

User / Consumer Impact

Passive

Active: can choose optimal times for usage

a concrete example of P(x) and T(x) that models full-grid load and generation for SCE at scale, suitable for a predictive simulation, includes both the math and a step-by-step explanation for real-world applicability.

1. Define the Domain

Let xx represent time slices across the day (e.g., 15-minute intervals). For Southern California Edison:

x=1,2,…,96(96 intervals for 24 hours at 15 min each)x = 1, 2, \dots, 96 \quad \text{(96 intervals for 24 hours at 15 min each)}

Other variables:

  • D(x)D(x) = Base demand at time xx (MW)

  • R(x)R(x) = Renewable generation at time xx (MW), solar/wind

  • B(x)B(x) = Battery or storage dispatch at time xx (MW)

  • EV(x)EV(x) = Electric vehicle load at time xx (MW)

  • G(x)G(x) = Total generation at time xx = R(x)+Gconventional(x)R(x) + G_\text{conventional}(x)

2. Define P(x) — Grid Pressure / Weighting Function

P(x)=wd⋅D(x)+wEV⋅EV(x)−wr⋅R(x)−wb⋅B(x)P(x) = w_d \cdot D(x) + w_{EV} \cdot EV(x) - w_r \cdot R(x) - w_b \cdot B(x)

Where:

  • wd=1.0w_d = 1.0 → weight on base demand

  • wEV=1.2w_{EV} = 1.2 → EV load has slightly higher pressure

  • wr=0.8w_r = 0.8 → renewable generation offsets stress

  • wb=1.0w_b = 1.0 → storage reduces grid stress

Interpretation:

  • High P(x)P(x) → time of day with high demand relative to generation, stressing the grid.

  • Low P(x)P(x) → surplus energy available.

Example calculation at 6 PM (typical evening peak):

  • D(72)=9,000 MWD(72) = 9,000\,MW

  • EV(72)=1,200 MWEV(72) = 1,200\,MW

  • R(72)=500 MWR(72) = 500\,MW

  • B(72)=300 MWB(72) = 300\,MW

P(72)=1.0⋅9000+1.2⋅1200−0.8⋅500−1.0⋅300P(72) = 1.0 \cdot 9000 + 1.2 \cdot 1200 - 0.8 \cdot 500 - 1.0 \cdot 300P(72)=9000+1440−400−300=10,740 (grid pressure units)P(72) = 9000 + 1440 - 400 - 300 = 10,740 \, \text{(grid pressure units)}

3. Define T(x) — Transformation / Load-Shifting Function

T(x)=α⋅EVshift(x)+β⋅Appshift(x)+γ⋅Bdispatch(x)T(x) = \alpha \cdot EV_\text{shift}(x) + \beta \cdot App_\text{shift}(x) + \gamma \cdot B_\text{dispatch}(x)

Where:

  • α,β,γ∈[0,1]\alpha, \beta, \gamma \in [0,1] are participation coefficients (percent of controllable load shifted)

  • EVshift(x)EV_\text{shift}(x) = amount of EV load that can be shifted at time xx

  • Appshift(x)App_\text{shift}(x) = appliance load that can be delayed/advanced

  • Bdispatch(x)B_\text{dispatch}(x) = battery charge/discharge action

Example:

  • α=0.5\alpha = 0.5, 50% of EVs participate

  • β=0.3\beta = 0.3, 30% of appliance load can shift

  • γ=1.0\gamma = 1.0, all battery dispatch available

At 6 PM:

  • EVshift(72)=1,200 MWEV_\text{shift}(72) = 1,200\,MW → 50% can be shifted = 600 MW

  • Appshift(72)=2,000 MWApp_\text{shift}(72) = 2,000\,MW → 30% can be shifted = 600 MW

  • Bdispatch(72)=300 MWB_\text{dispatch}(72) = 300\,MW

T(72)=0.5⋅1200+0.3⋅2000+1.0⋅300=600+600+300=1,500 MWT(72) = 0.5 \cdot 1200 + 0.3 \cdot 2000 + 1.0 \cdot 300 = 600 + 600 + 300 = 1,500\,MW

4. Total Grid Load / Stress Adjustment

We can now calculate adjusted stress on the grid:

L(x)=P(x)−T(x)L(x) = P(x) - T(x)

At 6 PM:

L(72)=10,740−1,500=9,240 (adjusted pressure units)L(72) = 10,740 - 1,500 = 9,240 \, \text{(adjusted pressure units)}

  • Positive L(x)L(x) → grid under stress, consider further mitigation

  • Negative L(x)L(x) → surplus energy available

5. Iterative Simulation Across the Day

  • For x=1…96x = 1 \dots 96:

    1. Compute P(x)P(x) using real demand, generation, and storage data

    2. Compute T(x)T(x) based on controllable assets and participation rates

    3. Calculate L(x)=P(x)−T(x)L(x) = P(x) - T(x)

    4. Flag times when L(x)L(x) exceeds threshold → send action signals

Optional: Incorporate bifurcation analysis for uncertainty:

Lpred(x+1)=L(x)+ϵ,ϵ∼random perturbation reflecting forecast errorL_\text{pred}(x+1) = L(x) + \epsilon, \quad \epsilon \sim \text{random perturbation reflecting forecast error}

6. How It Scales for SCE

  • 96 frames/day × 365 days/year → full annual grid simulation

  • Replace placeholders with real SCED telemetry, solar/wind forecasts, EV fleet data, and distributed storage

  • Adjust weights wd,wEV,wr,wbw_d, w_{EV}, w_r, w_b based on historical grid behavior

  • Participation coefficients α,β,γ\alpha, \beta, \gamma reflect program adoption rates

  • Can export CSV or run visualization for each time slice

Summary

  • P(x) = “grid pressure” based on total demand vs. generation

  • T(x) = “transformative mitigation” via EV load shifting, appliance scheduling, and battery dispatch

  • L(x) = P(x) - T(x) → real-time grid stress metric

  • Modular, scalable to hundreds of thousands of devices, entire SCE footprint, and multi-year simulations




ree

P(x) – Grid Pressure Function

  • Combines all sources of stress on the grid:

    • Base demand D(x) from homes and businesses

    • EV load EV(x)

    • Renewable generation R(x) (negative contribution reduces stress)

    • Battery dispatch B(x) (charging increases demand, discharging reduces it)

  • Weighted sum:

P(x)=wDD(x)+wEVEV(x)−wRR(x)−wBB(x)P(x) = w_D D(x) + w_{EV} EV(x) - w_R R(x) - w_B B(x)

T(x) – Load Mitigation / Transformation Function

  • Represents coordinated adjustments to reduce stress:

    • EV charging shift (α fraction of EV load moved to off-peak)

    • Appliance scheduling (β fraction of flexible load shifted)

    • Battery dispatch (γ fraction applied)

  • Sum of mitigations:

T(x)=αEV(x)+βAppliance Load+γB(x)T(x) = \alpha EV(x) + \beta \text{Appliance Load} + \gamma B(x)

Adjusted Grid Stress L(x)

L(x)=P(x)−T(x)L(x) = P(x) - T(x)

  • Positive L(x): extra demand, may need additional generation or EV discharge

  • Negative L(x): surplus energy, can absorb with storage or shift loads

The graph shows a full-day (24-hour) simulation in 15-minute intervals:

  • Blue line (P(x)): raw grid pressure from demand minus renewable contributions

  • Green line (T(x)): mitigation from EV/appliance shifts and battery dispatch

  • Red line (L(x)): net grid stress after mitigation, showing peaks smoothed and troughs filled

This illustrates how the system can predict and optimize grid stress in real-time, accounting for millions of devices and generation sources, scalable to Southern California Edison’s entire service area.



 
 
 

Comments


bottom of page