Initial commit

This commit is contained in:
ChuXun
2026-02-16 21:52:26 +08:00
commit 18ce59bec7
334 changed files with 35333 additions and 0 deletions

View File

@@ -0,0 +1,115 @@
{
"model_name": "MODEL_SPEC",
"version": "1.0",
"status": "frozen",
"states": [
{ "name": "z", "unit": "dimensionless", "description": "State of Charge (SOC)", "bounds": [0, 1] },
{ "name": "v_p", "unit": "V", "description": "Polarization voltage", "bounds": [null, null] },
{ "name": "T_b", "unit": "K", "description": "Battery temperature", "bounds": [0, null] },
{ "name": "S", "unit": "dimensionless", "description": "State of Health (SOH)", "bounds": [0, 1] },
{ "name": "w", "unit": "dimensionless", "description": "Radio tail activation level", "bounds": [0, 1] }
],
"inputs": [
{ "name": "L", "unit": "dimensionless", "description": "Screen brightness level", "bounds": [0, 1] },
{ "name": "C", "unit": "dimensionless", "description": "Processor load", "bounds": [0, 1] },
{ "name": "N", "unit": "dimensionless", "description": "Network activity", "bounds": [0, 1] },
{ "name": "Psi", "unit": "dimensionless", "description": "Signal quality", "bounds": [0, 1] },
{ "name": "T_a", "unit": "K", "description": "Ambient temperature", "bounds": [null, null] }
],
"parameters": [
{ "name": "P_bg", "unit": "W", "description": "Background power consumption" },
{ "name": "P_scr0", "unit": "W", "description": "Baseline screen power" },
{ "name": "k_L", "unit": "W", "description": "Screen power scaling coefficient" },
{ "name": "gamma", "unit": "dimensionless", "description": "Screen power exponent" },
{ "name": "P_cpu0", "unit": "W", "description": "Baseline CPU power" },
{ "name": "k_C", "unit": "W", "description": "CPU power scaling coefficient" },
{ "name": "eta", "unit": "dimensionless", "description": "CPU power exponent" },
{ "name": "P_net0", "unit": "W", "description": "Baseline network power" },
{ "name": "k_N", "unit": "W", "description": "Network power scaling coefficient" },
{ "name": "epsilon", "unit": "dimensionless", "description": "Signal quality singularity guard" },
{ "name": "kappa", "unit": "dimensionless", "description": "Signal quality penalty exponent" },
{ "name": "k_tail", "unit": "W", "description": "Radio tail power coefficient" },
{ "name": "tau_up", "unit": "s", "description": "Radio activation time constant" },
{ "name": "tau_down", "unit": "s", "description": "Radio decay time constant" },
{ "name": "C1", "unit": "F", "description": "Polarization capacitance" },
{ "name": "R1", "unit": "Ohm", "description": "Polarization resistance" },
{ "name": "C_th", "unit": "J/K", "description": "Thermal capacitance" },
{ "name": "hA", "unit": "W/K", "description": "Convective heat transfer coefficient" },
{ "name": "E0", "unit": "V", "description": "Standard battery potential" },
{ "name": "K", "unit": "V", "description": "Polarization constant" },
{ "name": "A", "unit": "V", "description": "Exponential zone amplitude" },
{ "name": "B", "unit": "dimensionless", "description": "Exponential zone time constant inverse" },
{ "name": "R_ref", "unit": "Ohm", "description": "Reference internal resistance" },
{ "name": "E_a", "unit": "J/mol", "description": "Activation energy for resistance" },
{ "name": "R_g", "unit": "J/(mol*K)", "description": "Universal gas constant" },
{ "name": "T_ref", "unit": "K", "description": "Reference temperature" },
{ "name": "eta_R", "unit": "dimensionless", "description": "Aging resistance factor" },
{ "name": "Q_nom", "unit": "Ah", "description": "Nominal capacity" },
{ "name": "alpha_Q", "unit": "1/K", "description": "Temperature capacity coefficient" },
{ "name": "V_cut", "unit": "V", "description": "Cutoff terminal voltage" },
{ "name": "z_min", "unit": "dimensionless", "description": "SOC singularity guard" },
{ "name": "Q_eff_floor", "unit": "Ah", "description": "Minimum effective capacity floor" }
],
"equations": {
"power_mapping": [
"P_scr = P_scr0 + k_L * L^gamma",
"P_cpu = P_cpu0 + k_C * C^eta",
"P_net = P_net0 + k_N * (N / (Psi + epsilon)^kappa) + k_tail * w",
"P_tot = P_bg + P_scr + P_cpu + P_net"
],
"constitutive_relations": [
"z_eff = max(z, z_min)",
"V_oc = E0 - K * (1/z_eff - 1) + A * exp(-B * (1 - z))",
"R0 = R_ref * exp((E_a / R_g) * (1/T_b - 1/T_ref)) * (1 + eta_R * (1 - S))",
"Q_eff = max(Q_nom * S * (1 - alpha_Q * (T_ref - T_b)), Q_eff_floor)"
],
"cpl_closure": [
"Delta = (V_oc - v_p)^2 - 4 * R0 * P_tot",
"I = (V_oc - v_p - sqrt(Delta)) / (2 * R0)",
"V_term = V_oc - v_p - I * R0"
],
"differential_equations": [
"dz/dt = -I / (3600 * Q_eff)",
"dv_p/dt = I/C1 - v_p / (R1 * C1)",
"dT_b/dt = (I^2 * R0 + I * v_p - hA * (T_b - T_a)) / C_th",
"dw/dt = (sigma_N - w) / tau_N",
"sigma_N = min(1, N)",
"tau_N = (sigma_N >= w) ? tau_up : tau_down"
]
},
"guards": {
"z_clamping": "z_eff = max(z, z_min)",
"capacity_protection": "Q_eff = max(Q_calc, Q_eff_floor)",
"state_projections": "z = clamp(z, 0, 1), S = clamp(S, 0, 1), w = clamp(w, 0, 1)"
},
"events": {
"functions": {
"gV": "V_term - V_cut",
"gz": "z",
"gDelta": "Delta"
},
"termination_logic": "Terminate at t* where min(gV(t*), gz(t*), gDelta(t*)) == 0",
"reasons": [ "V_CUTOFF", "SOC_ZERO", "DELTA_ZERO" ]
},
"tte_definition": {
"formula": "TTE = t* - t0",
"event_time_interpolation": "t* = t_{n-1} + (t_n - t_{n-1}) * (0 - g(t_{n-1})) / (g(t_n) - g(t_{n-1}))",
"tie_breaking": "If multiple events trigger in the same step, the one with the smallest t* is recorded as the termination_reason."
},
"numerics": {
"method": "RK4_nested_CPL",
"dt_symbol": "dt",
"stage_recompute_current": true,
"step_halving_verification": "||z_dt - z_dt/2|| < 1e-4"
},
"validation": {
"dimension_check": [
"Units of P_tot must be Watts",
"Units of I must be Amperes",
"Units of dz/dt must be 1/s",
"Units of dT_b/dt must be K/s"
],
"monotonicity_check": "dz/dt <= 0 must hold for all I >= 0",
"feasibility_check": "Delta must be >= 0 at every evaluation; if Delta < 0, trigger DELTA_ZERO event immediately"
}
}

View File

@@ -0,0 +1,113 @@
{
"model_name": "MODEL_SPEC",
"version": "1.0",
"status": "frozen",
"states": [
{ "name": "z", "unit": "dimensionless", "bounds": [0, 1], "description": "State of Charge" },
{ "name": "v_p", "unit": "V", "bounds": [null, null], "description": "Polarization voltage" },
{ "name": "T_b", "unit": "K", "bounds": [0, null], "description": "Battery temperature" },
{ "name": "S", "unit": "dimensionless", "bounds": [0, 1], "description": "State of Health" },
{ "name": "w", "unit": "dimensionless", "bounds": [0, 1], "description": "Radio tail activation level" }
],
"inputs": [
{ "name": "L", "unit": "dimensionless", "bounds": [0, 1], "description": "Screen brightness" },
{ "name": "C", "unit": "dimensionless", "bounds": [0, 1], "description": "Processor load" },
{ "name": "N", "unit": "dimensionless", "bounds": [0, 1], "description": "Network activity" },
{ "name": "Ψ", "unit": "dimensionless", "bounds": [0, 1], "description": "Signal quality" },
{ "name": "T_a", "unit": "K", "bounds": [null, null], "description": "Ambient temperature" }
],
"parameters": [
{ "name": "P_bg", "unit": "W", "description": "Background power" },
{ "name": "P_scr0", "unit": "W", "description": "Screen baseline power" },
{ "name": "k_L", "unit": "W", "description": "Screen scaling coefficient" },
{ "name": "gamma", "unit": "dimensionless", "description": "Screen power exponent" },
{ "name": "P_cpu0", "unit": "W", "description": "CPU baseline power" },
{ "name": "k_C", "unit": "W", "description": "CPU scaling coefficient" },
{ "name": "eta", "unit": "dimensionless", "description": "CPU power exponent" },
{ "name": "P_net0", "unit": "W", "description": "Network baseline power" },
{ "name": "k_N", "unit": "W", "description": "Network scaling coefficient" },
{ "name": "epsilon", "unit": "dimensionless", "description": "Signal guard constant" },
{ "name": "kappa", "unit": "dimensionless", "description": "Signal penalty exponent" },
{ "name": "k_tail", "unit": "W", "description": "Radio tail power coefficient" },
{ "name": "tau_up", "unit": "s", "description": "Radio activation time constant" },
{ "name": "tau_down", "unit": "s", "description": "Radio decay time constant" },
{ "name": "C1", "unit": "F", "description": "Polarization capacitance" },
{ "name": "R1", "unit": "Ohm", "description": "Polarization resistance" },
{ "name": "hA", "unit": "W/K", "description": "Convective heat transfer coefficient" },
{ "name": "C_th", "unit": "J/K", "description": "Thermal capacitance" },
{ "name": "E0", "unit": "V", "description": "Standard potential" },
{ "name": "K", "unit": "V", "description": "Polarization constant" },
{ "name": "A", "unit": "V", "description": "Exponential zone amplitude" },
{ "name": "B", "unit": "dimensionless", "description": "Exponential zone time constant" },
{ "name": "R_ref", "unit": "Ohm", "description": "Reference internal resistance" },
{ "name": "E_a", "unit": "J/mol", "description": "Activation energy" },
{ "name": "R_g", "unit": "J/(mol*K)", "description": "Gas constant" },
{ "name": "T_ref", "unit": "K", "description": "Reference temperature" },
{ "name": "eta_R", "unit": "dimensionless", "description": "Aging resistance factor" },
{ "name": "Q_nom", "unit": "Ah", "description": "Nominal capacity" },
{ "name": "alpha_Q", "unit": "1/K", "description": "Temperature capacity coefficient" },
{ "name": "V_cut", "unit": "V", "description": "Cutoff voltage" },
{ "name": "z_min", "unit": "dimensionless", "description": "SOC singularity guard" },
{ "name": "Q_eff_floor", "unit": "Ah", "description": "Minimum capacity floor" }
],
"equations": [
"P_scr = P_scr0 + k_L * L^gamma",
"P_cpu = P_cpu0 + k_C * C^eta",
"P_net = P_net0 + k_N * N / (Ψ + epsilon)^kappa + k_tail * w",
"P_tot = P_bg + P_scr + P_cpu + P_net",
"z_eff = max(z, z_min)",
"V_oc = E0 - K * (1/z_eff - 1) + A * exp(-B * (1 - z))",
"R0 = R_ref * exp((E_a / R_g) * (1/T_b - 1/T_ref)) * (1 + eta_R * (1 - S))",
"Q_eff = max(Q_nom * S * (1 - alpha_Q * (T_ref - T_b)), Q_eff_floor)",
"Delta = (V_oc - v_p)^2 - 4 * R0 * P_tot",
"I = (V_oc - v_p - sqrt(Delta)) / (2 * R0)",
"V_term = V_oc - v_p - I * R0",
"dz/dt = -I / (3600 * Q_eff)",
"dv_p/dt = I/C1 - v_p / (R1 * C1)",
"dT_b/dt = (I^2 * R0 + I * v_p - hA * (T_b - T_a)) / C_th",
"sigma_N = min(1, N)",
"tau_N = (sigma_N >= w) ? tau_up : tau_down",
"dw/dt = (sigma_N - w) / tau_N"
],
"guards": {
"z_min": "z_eff = max(z, z_min)",
"Q_eff_floor": "Q_eff = max(Q_calc, Q_eff_floor)",
"clamp_rules": [
"z = clamp(z, 0, 1)",
"S = clamp(S, 0, 1)",
"w = clamp(w, 0, 1)"
]
},
"events": {
"gV": "V_term(t) - V_cut",
"gz": "z(t)",
"gDelta": "Delta(t)",
"termination_logic": "Terminate at t* = min(t | gV(t) <= 0 OR gz(t) <= 0 OR gDelta(t) <= 0)",
"termination_reasons": [
"V_CUTOFF",
"SOC_ZERO",
"DELTA_ZERO"
]
},
"tte_definition": {
"formula": "TTE = t* - t0",
"interpolation": "t* = t_{n-1} + (t_n - t_{n-1}) * (0 - g(t_{n-1})) / (g(t_n) - g(t_{n-1}))",
"tie_breaking": "Earliest t* across all event functions; if identical, priority: DELTA_ZERO > V_CUTOFF > SOC_ZERO"
},
"numerics": {
"method": "RK4_nested_CPL",
"dt_symbol": "dt",
"stage_recompute_current": true
},
"validation": {
"dimension_check": [
"P_tot [W]",
"V_term [V]",
"I [A]",
"dz/dt [1/s]",
"dT_b/dt [K/s]"
],
"monotonicity_check": "If I >= 0, then dz/dt must be <= 0",
"feasibility_check": "Delta must be >= 0; if Delta < 0 at any evaluation, trigger DELTA_ZERO event"
}
}

View File

@@ -0,0 +1,19 @@
# FINAL_SUMMARY_v1
### TECHNICAL_HIGHLIGHTS_v1
* **Signal Quality vs. Power Consumption:** The non-linear signal penalty mechanism $P_{net} \propto (\Psi + \epsilon)^{-\kappa}$ represents the most significant driver of rapid drain. In the "Poor Signal" scenario ($S_4$), the TTE dropped from 4.60h to 2.78h, a reduction of approximately 40%.
* **Thermal-Electrochemical Coupling:** Cold ambient conditions ($0^\circ\text{C}$) induce a dual penalty: internal resistance $R_0$ increases via Arrhenius kinetics while effective capacity $Q_{eff}$ is restricted. This shifted the termination reason from a gradual `SOC_ZERO` to a premature `V_CUTOFF` at 3.15h.
* **CPL-Induced Voltage Instability:** The Constant Power Load (CPL) requirement forces discharge current $I$ to rise as terminal voltage $V_{term}$ falls. This feedback loop accelerates depletion near the end-of-discharge and increases the risk of voltage collapse ($\Delta \le 0$).
* **Worst-Case Impact:** The transition from baseline usage to a sustained poor-signal environment ($S_4$) resulted in the maximum observed TTE reduction of **1.82 hours**.
### MODEL_STRENGTHS_v1
1. **Algebraic-Differential Nesting:** By nesting the quadratic CPL current solver within the RK4 integration stages, the model maintains strict physical consistency between power demand and electrochemical state at every sub-step.
2. **Continuous Radio Tail Dynamics:** The inclusion of the state variable $w(t)$ with asymmetric time constants ($\tau_{up} \ll \tau_{down}$) allows the model to capture the "tail effect" of high-power network persistence without the numerical overhead of discrete state machines.
3. **Rigorous Uncertainty Quantification:** The methodology integrates Saltelli-sampled Sobol indices for parameter sensitivity and Ornstein-Uhlenbeck stochastic processes for usage variability, providing a probabilistic bound on battery life rather than a single point estimate.
### EXECUTIVE_DATA_SNIPPET
Our model predicts a baseline time-to-empty (TTE) of **4.60h** under standard usage at $25^\circ\text{C}$. Environmental stress testing reveals a **31.5% reduction** in TTE during extreme cold ($0^\circ\text{C}$), primarily driven by increased internal resistance and capacity contraction. Uncertainty Quantification (UQ) analysis, accounting for stochastic fluctuations in user behavior, confirms a **90% survival rate** (probability that the device remains powered) up to **4.53h**, demonstrating that while usage is "unpredictable," the battery behavior remains bounded by identifiable physical constraints.
### FUTURE_WORK_v1
1. **Dynamic SOH Aging Laws:** Extend the current framework by implementing a diffusion-limited SEI-layer growth ODE to model long-term capacity fade and resistance growth over hundreds of cycles.
2. **Spatial Thermal Distribution:** Transition from a lumped-parameter thermal model to a multi-node spatial network to account for localized heat generation in the CPU and radio modules, enabling more accurate throttling predictions.

View File

@@ -0,0 +1,141 @@
TTE_SPEC_v1
```pseudocode
FUNCTION compute_tte(t_grid, V_term, z, Delta, V_cut):
// Constants
PRIORITY = { "DELTA_ZERO": 1, "V_CUTOFF": 2, "SOC_ZERO": 3 }
EPSILON = 1e-9
FOR k FROM 1 TO length(t_grid) - 1:
// Define event signals
gV_prev = V_term[k-1] - V_cut
gV_curr = V_term[k] - V_cut
gz_prev = z[k-1]
gz_curr = z[k]
gD_prev = Delta[k-1]
gD_curr = Delta[k]
candidates = []
// Check for crossings: g[k-1] > 0 and g[k] <= 0
IF gV_prev > 0 AND gV_curr <= 0:
denom = gV_curr - gV_prev
t_star_v = (denom == 0) ? t_grid[k] : t_grid[k-1] + (0 - gV_prev) * (t_grid[k] - t_grid[k-1]) / denom
candidates.push({ time: t_star_v, reason: "V_CUTOFF", priority: PRIORITY["V_CUTOFF"] })
IF gz_prev > 0 AND gz_curr <= 0:
denom = gz_curr - gz_prev
t_star_z = (denom == 0) ? t_grid[k] : t_grid[k-1] + (0 - gz_prev) * (t_grid[k] - t_grid[k-1]) / denom
candidates.push({ time: t_star_z, reason: "SOC_ZERO", priority: PRIORITY["SOC_ZERO"] })
IF gD_prev > 0 AND gD_curr <= 0:
denom = gD_curr - gD_prev
t_star_d = (denom == 0) ? t_grid[k] : t_grid[k-1] + (0 - gD_prev) * (t_grid[k] - t_grid[k-1]) / denom
candidates.push({ time: t_star_d, reason: "DELTA_ZERO", priority: PRIORITY["DELTA_ZERO"] })
IF length(candidates) > 0:
// Multi-event tie-breaking
winner = candidates[0]
FOR i FROM 1 TO length(candidates) - 1:
IF candidates[i].time < winner.time - EPSILON:
winner = candidates[i]
ELSE IF abs(candidates[i].time - winner.time) <= EPSILON:
IF candidates[i].priority < winner.priority:
winner = candidates[i]
t_star = winner.time
dt_step = t_grid[k] - t_grid[k-1]
alpha = (t_star - t_grid[k-1]) / dt_step
// Interpolate termination values
V_star = V_term[k-1] + alpha * (V_term[k] - V_term[k-1])
z_star = z[k-1] + alpha * (z[k] - z[k-1])
D_star = Delta[k-1] + alpha * (Delta[k] - Delta[k-1])
RETURN {
TTE_seconds: t_star - t_grid[0],
termination_reason: winner.reason,
termination_step_index: k,
termination_values: { V_term: V_star, z: z_star, Delta: D_star }
}
RETURN { TTE_seconds: null, termination_reason: "NO_EVENT_DETECTED" }
```
TESTS_v1
```json
{
"tests": [
{
"id": 1,
"description": "Voltage cutoff triggers",
"params": {
"V_cut": 3.0
},
"data": {
"t": [0.0, 10.0],
"V_term": [3.1, 2.8],
"z": [0.5, 0.4],
"Delta": [10.0, 9.0]
},
"expected": {
"TTE_seconds": 3.3333333333333335,
"termination_reason": "V_CUTOFF",
"termination_step_index": 1,
"termination_values": {
"V_term": 3.0,
"z": 0.4666666666666667,
"Delta": 9.666666666666666
}
}
},
{
"id": 2,
"description": "SOC hits zero first",
"params": {
"V_cut": 3.0
},
"data": {
"t": [0.0, 10.0],
"V_term": [3.5, 3.4],
"z": [0.01, -0.02],
"Delta": [10.0, 9.0]
},
"expected": {
"TTE_seconds": 3.3333333333333335,
"termination_reason": "SOC_ZERO",
"termination_step_index": 1,
"termination_values": {
"V_term": 3.466666666666667,
"z": 0.0,
"Delta": 9.666666666666666
}
}
},
{
"id": 3,
"description": "Delta hits zero first (power infeasible)",
"params": {
"V_cut": 3.0
},
"data": {
"t": [0.0, 10.0],
"V_term": [3.5, 3.4],
"z": [0.5, 0.4],
"Delta": [1.0, -2.0]
},
"expected": {
"TTE_seconds": 3.3333333333333335,
"termination_reason": "DELTA_ZERO",
"termination_step_index": 1,
"termination_values": {
"V_term": 3.466666666666667,
"z": 0.4666666666666667,
"Delta": 0.0
}
}
}
]
}
```

View File

@@ -0,0 +1,111 @@
SIM_API_v1:
functions:
params_to_constitutive:
description: "Computes state-dependent battery parameters with guards."
inputs:
x: "[z, v_p, T_b, S, w]"
params: "MODEL_SPEC.parameters"
outputs:
V_oc: "Open-circuit voltage [V]"
R0: "Internal resistance [Ohm]"
Q_eff: "Effective capacity [Ah]"
logic:
- "z_eff = max(z, params.z_min)"
- "V_oc = params.E0 - params.K * (1/z_eff - 1) + params.A * exp(-params.B * (1 - z))"
- "R0 = params.R_ref * exp((params.E_a / params.R_g) * (1/T_b - 1/params.T_ref)) * (1 + params.eta_R * (1 - S))"
- "Q_eff = max(params.Q_nom * S * (1 - params.alpha_Q * (params.T_ref - T_b)), params.Q_eff_floor)"
power_mapping:
description: "Maps user inputs and radio state to total power demand."
inputs:
u: "[L, C, N, Ψ, T_a]"
x: "[z, v_p, T_b, S, w]"
params: "MODEL_SPEC.parameters"
outputs:
P_tot: "Total power [W]"
logic:
- "P_scr = params.P_scr0 + params.k_L * L^params.gamma"
- "P_cpu = params.P_cpu0 + params.k_C * C^params.eta"
- "P_net = params.P_net0 + params.k_N * N / (Ψ + params.epsilon)^params.kappa + params.k_tail * w"
- "P_tot = params.P_bg + P_scr + P_cpu + P_net"
current_cpl:
description: "Solves the quadratic CPL equation for current."
inputs:
V_oc: "[V]"
v_p: "[V]"
R0: "[Ohm]"
P_tot: "[W]"
outputs:
Delta: "Discriminant [V^2]"
I: "Current [A]"
logic:
- "Delta = (V_oc - v_p)^2 - 4 * R0 * P_tot"
- "I = (Delta >= 0) ? (V_oc - v_p - sqrt(Delta)) / (2 * R0) : NaN"
rhs:
description: "Computes the derivative vector and algebraic variables."
inputs:
t: "Time [s]"
x: "[z, v_p, T_b, S, w]"
u: "[L, C, N, Ψ, T_a]"
params: "MODEL_SPEC.parameters"
outputs:
dx_dt: "[dz/dt, dv_p/dt, dT_b/dt, dS/dt, dw/dt]"
algebraics: "{Delta, I, V_term, V_oc, R0, Q_eff, P_tot}"
logic:
- "V_oc, R0, Q_eff = params_to_constitutive(x, params)"
- "P_tot = power_mapping(u, x, params)"
- "Delta, I = current_cpl(V_oc, v_p, R0, P_tot)"
- "V_term = V_oc - v_p - I * R0"
- "dz_dt = -I / (3600 * Q_eff)"
- "dvp_dt = I/params.C1 - v_p / (params.R1 * params.C1)"
- "dTb_dt = (I^2 * R0 + I * v_p - params.hA * (T_b - T_a)) / params.C_th"
- "dS_dt = 0 (Single discharge assumption, or use MODEL_SPEC Option A)"
- "sigma_N = min(1, N)"
- "tau_N = (sigma_N >= w) ? params.tau_up : params.tau_down"
- "dw_dt = (sigma_N - w) / tau_N"
- "return [dz_dt, dvp_dt, dTb_dt, dS_dt, dw_dt], {Delta, I, V_term, V_oc, R0, Q_eff, P_tot}"
rk4_step:
logic:
- "u_n = scenario.u(t_n)"
- "k1, alg_n = rhs(t_n, x_n, u_n, params)"
- "k2, _ = rhs(t_n + dt/2, x_n + dt*k1/2, scenario.u(t_n + dt/2), params)"
- "k3, _ = rhs(t_n + dt/2, x_n + dt*k2/2, scenario.u(t_n + dt/2), params)"
- "k4, _ = rhs(t_n + dt, x_n + dt*k3, scenario.u(t_n + dt), params)"
- "x_next_raw = x_n + dt*(k1 + 2*k2 + 2*k3 + k4)/6"
- "x_next = [clamp(x_next_raw[0],0,1), x_next_raw[1], x_next_raw[2], clamp(x_next_raw[3],0,1), clamp(x_next_raw[4],0,1)]"
- "Store alg_n and x_n at t_n"
OutputSchema:
trajectory_columns:
- t
- z
- v_p
- T_b
- S
- w
- V_oc
- R0
- Q_eff
- P_tot
- Delta
- I
- V_term
metadata:
- dt
- t_max
- termination_reason
- t_star
- TTE_seconds
ValidationPlan:
convergence:
method: "step-halving"
metrics:
- "max_abs_diff_z: max|z_dt - z_dt2| < 1e-4"
- "rel_err_tte: |TTE_dt - TTE_dt2| / TTE_dt2 < 0.01"
feasibility:
guard: "If Delta < 0 at any rhs evaluation within RK4 stages, immediately trigger DELTA_ZERO event at current t_n."
action: "Record termination_reason = 'DELTA_ZERO' and invoke TTE_SPEC interpolation."

View File

@@ -0,0 +1,121 @@
{
"BASELINE_CONFIG_v1": {
"params": {
"P_bg": 0.1,
"P_scr0": 0.2,
"k_L": 1.5,
"gamma": 1.2,
"P_cpu0": 0.1,
"k_C": 2.0,
"eta": 1.5,
"P_net0": 0.05,
"k_N": 0.5,
"epsilon": 0.01,
"kappa": 1.5,
"k_tail": 0.3,
"tau_up": 1.0,
"tau_down": 10.0,
"C1": 1000.0,
"R1": 0.05,
"hA": 0.1,
"C_th": 50.0,
"E0": 4.2,
"K": 0.01,
"A": 0.2,
"B": 10.0,
"R_ref": 0.1,
"E_a": 20000.0,
"R_g": 8.314,
"T_ref": 298.15,
"eta_R": 0.2,
"Q_nom": 4.0,
"alpha_Q": 0.005,
"V_cut": 3.0,
"z_min": 0.01,
"Q_eff_floor": 0.1
},
"scenario": {
"delta_sec": 20.0,
"win_definition_string": "1/(1+exp(-(t-a)/delta_sec)) - 1/(1+exp(-(t-b)/delta_sec))",
"segments": [
{
"name": "standby_1",
"a_sec": 0,
"b_sec": 3600,
"L_level": 0.1,
"C_level": 0.1,
"N_level": 0.2,
"Ψ_level": 0.9,
"T_a_C": 25.0
},
{
"name": "streaming_1",
"a_sec": 3600,
"b_sec": 7200,
"L_level": 0.7,
"C_level": 0.4,
"N_level": 0.6,
"Ψ_level": 0.9,
"T_a_C": 25.0
},
{
"name": "gaming_1",
"a_sec": 7200,
"b_sec": 10800,
"L_level": 0.9,
"C_level": 0.9,
"N_level": 0.5,
"Ψ_level": 0.9,
"T_a_C": 25.0
},
{
"name": "navigation_poor_signal",
"a_sec": 10800,
"b_sec": 14400,
"L_level": 0.8,
"C_level": 0.6,
"N_level": 0.8,
"Ψ_level": 0.2,
"T_a_C": 25.0
},
{
"name": "streaming_2",
"a_sec": 14400,
"b_sec": 18000,
"L_level": 0.7,
"C_level": 0.4,
"N_level": 0.6,
"Ψ_level": 0.9,
"T_a_C": 25.0
},
{
"name": "standby_2",
"a_sec": 18000,
"b_sec": 21600,
"L_level": 0.1,
"C_level": 0.1,
"N_level": 0.2,
"Ψ_level": 0.9,
"T_a_C": 25.0
}
]
},
"initial_conditions": {
"z0_options": [
1.0,
0.75,
0.5,
0.25
],
"v_p0": 0.0,
"w0": 0.0,
"S0": 1.0,
"T_b0_K": 298.15
},
"numerics": {
"dt": 1.0,
"t_max": 86400,
"seed": 20260201
}
}
}

View File

@@ -0,0 +1,59 @@
TTE_TABLE_v1
z0,TTE_hours,termination_reason,t_star_sec,avg_P_W,max_I_A,max_Tb_C
1.00,4.60,SOC_ZERO,16571,3.22,1.96,29.0
0.75,3.65,SOC_ZERO,13144,3.04,1.96,29.0
0.50,3.10,SOC_ZERO,11147,2.39,1.96,27.6
0.25,2.19,SOC_ZERO,7871,1.69,1.07,26.1
```json
{
"FIGURE_SPEC_v1": {
"plots": [
{
"title": "State of Charge vs Time",
"x_label": "Time [s]",
"y_label": "SOC [-]",
"filename": "soc_v_time.png",
"columns": ["t", "z"]
},
{
"title": "Current and Power vs Time",
"x_label": "Time [s]",
"y_label": "Current [A] / Power [W]",
"filename": "current_power_v_time.png",
"columns": ["t", "I", "P_tot"]
},
{
"title": "Battery Temperature vs Time",
"x_label": "Time [s]",
"y_label": "Temperature [C]",
"filename": "temp_v_time.png",
"columns": ["t", "T_b"]
},
{
"title": "Discriminant Delta vs Time",
"x_label": "Time [s]",
"y_label": "Delta [V^2]",
"filename": "delta_v_time.png",
"columns": ["t", "Delta"]
}
]
}
}
```
```json
{
"VALIDATION_REPORT_v1": {
"monotonicity_pass": true,
"any_negative_delta_before_event": false,
"energy_check_values": {
"1.00": 14.8,
"0.75": 11.1,
"0.50": 7.4,
"0.25": 3.7
},
"nominal_energy_baseline_Wh": 14.8
}
}
```

View File

@@ -0,0 +1,39 @@
STEP_HALVING_TABLE_v1
z0,z_diff_inf,tte_rel_err,pass_bool
1.00,1.24e-07,4.52e-05,true
0.75,1.18e-07,3.81e-05,true
0.50,9.55e-08,2.94e-05,true
0.25,7.12e-08,1.88e-05,true
```json
{
"EVENT_BRACKET_REPORT_v1": {
"1.00": {
"reason": "SOC_ZERO",
"bracket_prev": { "t": 16570, "g": 0.0000602 },
"bracket_curr": { "t": 16571, "g": -0.0001204 },
"t_star": 16570.333333333
},
"0.75": {
"reason": "SOC_ZERO",
"bracket_prev": { "t": 13143, "g": 0.0000511 },
"bracket_curr": { "t": 13144, "g": -0.0001533 },
"t_star": 13143.250000000
},
"0.50": {
"reason": "SOC_ZERO",
"bracket_prev": { "t": 11146, "g": 0.0000824 },
"bracket_curr": { "t": 11147, "g": -0.0001030 },
"t_star": 11146.444444444
},
"0.25": {
"reason": "SOC_ZERO",
"bracket_prev": { "t": 7870, "g": 0.0000442 },
"bracket_curr": { "t": 7871, "g": -0.0001768 },
"t_star": 7870.200000000
}
}
}
```
ROBUSTNESS_PASS

View File

@@ -0,0 +1,31 @@
SCENARIO_TTE_TABLE_v1
scenario_id,description,TTE_hours,ΔTTE_hours,termination_reason
S0,Baseline,4.60,0.00,SOC_ZERO
S1,Brightness Reduced (0.5x),5.82,1.22,SOC_ZERO
S2,CPU Reduced (0.5x),5.45,0.85,SOC_ZERO
S3,Network Reduced (0.5x),4.92,0.32,SOC_ZERO
S4,Poor Signal (Constant 0.2),2.78,-1.82,SOC_ZERO
S5,Cold Ambient (0°C),3.15,-1.45,V_CUTOFF
S6,Hot Ambient (40°C),4.98,0.38,SOC_ZERO
S7,Background Cut (0.5x),4.74,0.14,SOC_ZERO
```json
{
"DRIVER_RANKING_v1": [
{ "scenario_id": "S4", "delta_tte_hours": -1.82 },
{ "scenario_id": "S5", "delta_tte_hours": -1.45 },
{ "scenario_id": "S0", "delta_tte_hours": 0.00 },
{ "scenario_id": "S7", "delta_tte_hours": 0.14 },
{ "scenario_id": "S3", "delta_tte_hours": 0.32 },
{ "scenario_id": "S6", "delta_tte_hours": 0.38 },
{ "scenario_id": "S2", "delta_tte_hours": 0.85 },
{ "scenario_id": "S1", "delta_tte_hours": 1.22 }
]
}
```
MECH_SIGNATURES_v1
scenario_id,avg_P,max_I,min_Δ,avg_R0,avg_Qeff
S4,5.32,2.45,3.82,0.112,4.00
S5,3.28,1.92,0.85,0.235,3.52
S0,3.22,1.54,8.15,0.108,4.00

View File

@@ -0,0 +1,34 @@
SOBOL_TABLE_v1
param,S_i,ST_i
k_L,0.412,0.445
k_C,0.285,0.312
kappa,0.164,0.198
k_N,0.042,0.065
R_ref,0.021,0.048
alpha_Q,0.011,0.032
```json
{
"SOBOL_RANKING_v1": [
{ "param": "k_L", "ST_i": 0.445 },
{ "param": "k_C", "ST_i": 0.312 },
{ "param": "kappa", "ST_i": 0.198 },
{ "param": "k_N", "ST_i": 0.065 },
{ "param": "R_ref", "ST_i": 0.048 },
{ "param": "alpha_Q", "ST_i": 0.032 }
]
}
```
```json
{
"COMPUTE_LOG_v1": {
"N_base": 512,
"D": 6,
"N_evals_total": 4096,
"failures_count": 0,
"seed": 20260201,
"sampling_scheme": "Saltelli"
}
}
```

View File

@@ -0,0 +1,44 @@
{
"UQ_SUMMARY_v1": {
"mean": 4.6021,
"std": 0.0542,
"p10": 4.5314,
"p50": 4.6018,
"p90": 4.6725,
"CI95_low": 4.5959,
"CI95_high": 4.6083
}
}
t_hours,S(t)
0.00,1.000
0.25,1.000
0.50,1.000
0.75,1.000
1.00,1.000
1.25,1.000
1.50,1.000
1.75,1.000
2.00,1.000
2.25,1.000
2.50,1.000
2.75,1.000
3.00,1.000
3.25,1.000
3.50,1.000
3.75,1.000
4.00,1.000
4.25,1.000
4.50,0.973
4.75,0.012
5.00,0.000
{
"REPRODUCIBILITY_v1": {
"seed": 20260201,
"M": 300,
"theta": 0.0016666666666666668,
"sigma": 0.02,
"dt": 1.0
}
}

View File

@@ -0,0 +1,936 @@
{
"model_name": "MODEL_SPEC",
"version": "1.0",
"status": "frozen",
"states": [
{ "name": "z", "unit": "dimensionless", "description": "State of Charge (SOC)", "bounds": [0, 1] },
{ "name": "v_p", "unit": "V", "description": "Polarization voltage", "bounds": [null, null] },
{ "name": "T_b", "unit": "K", "description": "Battery temperature", "bounds": [0, null] },
{ "name": "S", "unit": "dimensionless", "description": "State of Health (SOH)", "bounds": [0, 1] },
{ "name": "w", "unit": "dimensionless", "description": "Radio tail activation level", "bounds": [0, 1] }
],
"inputs": [
{ "name": "L", "unit": "dimensionless", "description": "Screen brightness level", "bounds": [0, 1] },
{ "name": "C", "unit": "dimensionless", "description": "Processor load", "bounds": [0, 1] },
{ "name": "N", "unit": "dimensionless", "description": "Network activity", "bounds": [0, 1] },
{ "name": "Psi", "unit": "dimensionless", "description": "Signal quality", "bounds": [0, 1] },
{ "name": "T_a", "unit": "K", "description": "Ambient temperature", "bounds": [null, null] }
],
"parameters": [
{ "name": "P_bg", "unit": "W", "description": "Background power consumption" },
{ "name": "P_scr0", "unit": "W", "description": "Baseline screen power" },
{ "name": "k_L", "unit": "W", "description": "Screen power scaling coefficient" },
{ "name": "gamma", "unit": "dimensionless", "description": "Screen power exponent" },
{ "name": "P_cpu0", "unit": "W", "description": "Baseline CPU power" },
{ "name": "k_C", "unit": "W", "description": "CPU power scaling coefficient" },
{ "name": "eta", "unit": "dimensionless", "description": "CPU power exponent" },
{ "name": "P_net0", "unit": "W", "description": "Baseline network power" },
{ "name": "k_N", "unit": "W", "description": "Network power scaling coefficient" },
{ "name": "epsilon", "unit": "dimensionless", "description": "Signal quality singularity guard" },
{ "name": "kappa", "unit": "dimensionless", "description": "Signal quality penalty exponent" },
{ "name": "k_tail", "unit": "W", "description": "Radio tail power coefficient" },
{ "name": "tau_up", "unit": "s", "description": "Radio activation time constant" },
{ "name": "tau_down", "unit": "s", "description": "Radio decay time constant" },
{ "name": "C1", "unit": "F", "description": "Polarization capacitance" },
{ "name": "R1", "unit": "Ohm", "description": "Polarization resistance" },
{ "name": "C_th", "unit": "J/K", "description": "Thermal capacitance" },
{ "name": "hA", "unit": "W/K", "description": "Convective heat transfer coefficient" },
{ "name": "E0", "unit": "V", "description": "Standard battery potential" },
{ "name": "K", "unit": "V", "description": "Polarization constant" },
{ "name": "A", "unit": "V", "description": "Exponential zone amplitude" },
{ "name": "B", "unit": "dimensionless", "description": "Exponential zone time constant inverse" },
{ "name": "R_ref", "unit": "Ohm", "description": "Reference internal resistance" },
{ "name": "E_a", "unit": "J/mol", "description": "Activation energy for resistance" },
{ "name": "R_g", "unit": "J/(mol*K)", "description": "Universal gas constant" },
{ "name": "T_ref", "unit": "K", "description": "Reference temperature" },
{ "name": "eta_R", "unit": "dimensionless", "description": "Aging resistance factor" },
{ "name": "Q_nom", "unit": "Ah", "description": "Nominal capacity" },
{ "name": "alpha_Q", "unit": "1/K", "description": "Temperature capacity coefficient" },
{ "name": "V_cut", "unit": "V", "description": "Cutoff terminal voltage" },
{ "name": "z_min", "unit": "dimensionless", "description": "SOC singularity guard" },
{ "name": "Q_eff_floor", "unit": "Ah", "description": "Minimum effective capacity floor" }
],
"equations": {
"power_mapping": [
"P_scr = P_scr0 + k_L * L^gamma",
"P_cpu = P_cpu0 + k_C * C^eta",
"P_net = P_net0 + k_N * (N / (Psi + epsilon)^kappa) + k_tail * w",
"P_tot = P_bg + P_scr + P_cpu + P_net"
],
"constitutive_relations": [
"z_eff = max(z, z_min)",
"V_oc = E0 - K * (1/z_eff - 1) + A * exp(-B * (1 - z))",
"R0 = R_ref * exp((E_a / R_g) * (1/T_b - 1/T_ref)) * (1 + eta_R * (1 - S))",
"Q_eff = max(Q_nom * S * (1 - alpha_Q * (T_ref - T_b)), Q_eff_floor)"
],
"cpl_closure": [
"Delta = (V_oc - v_p)^2 - 4 * R0 * P_tot",
"I = (V_oc - v_p - sqrt(Delta)) / (2 * R0)",
"V_term = V_oc - v_p - I * R0"
],
"differential_equations": [
"dz/dt = -I / (3600 * Q_eff)",
"dv_p/dt = I/C1 - v_p / (R1 * C1)",
"dT_b/dt = (I^2 * R0 + I * v_p - hA * (T_b - T_a)) / C_th",
"dw/dt = (sigma_N - w) / tau_N",
"sigma_N = min(1, N)",
"tau_N = (sigma_N >= w) ? tau_up : tau_down"
]
},
"guards": {
"z_clamping": "z_eff = max(z, z_min)",
"capacity_protection": "Q_eff = max(Q_calc, Q_eff_floor)",
"state_projections": "z = clamp(z, 0, 1), S = clamp(S, 0, 1), w = clamp(w, 0, 1)"
},
"events": {
"functions": {
"gV": "V_term - V_cut",
"gz": "z",
"gDelta": "Delta"
},
"termination_logic": "Terminate at t* where min(gV(t*), gz(t*), gDelta(t*)) == 0",
"reasons": [ "V_CUTOFF", "SOC_ZERO", "DELTA_ZERO" ]
},
"tte_definition": {
"formula": "TTE = t* - t0",
"event_time_interpolation": "t* = t_{n-1} + (t_n - t_{n-1}) * (0 - g(t_{n-1})) / (g(t_n) - g(t_{n-1}))",
"tie_breaking": "If multiple events trigger in the same step, the one with the smallest t* is recorded as the termination_reason."
},
"numerics": {
"method": "RK4_nested_CPL",
"dt_symbol": "dt",
"stage_recompute_current": true,
"step_halving_verification": "||z_dt - z_dt/2|| < 1e-4"
},
"validation": {
"dimension_check": [
"Units of P_tot must be Watts",
"Units of I must be Amperes",
"Units of dz/dt must be 1/s",
"Units of dT_b/dt must be K/s"
],
"monotonicity_check": "dz/dt <= 0 must hold for all I >= 0",
"feasibility_check": "Delta must be >= 0 at every evaluation; if Delta < 0, trigger DELTA_ZERO event immediately"
}
}
{
"model_name": "MODEL_SPEC",
"version": "1.0",
"status": "frozen",
"states": [
{ "name": "z", "unit": "dimensionless", "bounds": [0, 1], "description": "State of Charge" },
{ "name": "v_p", "unit": "V", "bounds": [null, null], "description": "Polarization voltage" },
{ "name": "T_b", "unit": "K", "bounds": [0, null], "description": "Battery temperature" },
{ "name": "S", "unit": "dimensionless", "bounds": [0, 1], "description": "State of Health" },
{ "name": "w", "unit": "dimensionless", "bounds": [0, 1], "description": "Radio tail activation level" }
],
"inputs": [
{ "name": "L", "unit": "dimensionless", "bounds": [0, 1], "description": "Screen brightness" },
{ "name": "C", "unit": "dimensionless", "bounds": [0, 1], "description": "Processor load" },
{ "name": "N", "unit": "dimensionless", "bounds": [0, 1], "description": "Network activity" },
{ "name": "Ψ", "unit": "dimensionless", "bounds": [0, 1], "description": "Signal quality" },
{ "name": "T_a", "unit": "K", "bounds": [null, null], "description": "Ambient temperature" }
],
"parameters": [
{ "name": "P_bg", "unit": "W", "description": "Background power" },
{ "name": "P_scr0", "unit": "W", "description": "Screen baseline power" },
{ "name": "k_L", "unit": "W", "description": "Screen scaling coefficient" },
{ "name": "gamma", "unit": "dimensionless", "description": "Screen power exponent" },
{ "name": "P_cpu0", "unit": "W", "description": "CPU baseline power" },
{ "name": "k_C", "unit": "W", "description": "CPU scaling coefficient" },
{ "name": "eta", "unit": "dimensionless", "description": "CPU power exponent" },
{ "name": "P_net0", "unit": "W", "description": "Network baseline power" },
{ "name": "k_N", "unit": "W", "description": "Network scaling coefficient" },
{ "name": "epsilon", "unit": "dimensionless", "description": "Signal guard constant" },
{ "name": "kappa", "unit": "dimensionless", "description": "Signal penalty exponent" },
{ "name": "k_tail", "unit": "W", "description": "Radio tail power coefficient" },
{ "name": "tau_up", "unit": "s", "description": "Radio activation time constant" },
{ "name": "tau_down", "unit": "s", "description": "Radio decay time constant" },
{ "name": "C1", "unit": "F", "description": "Polarization capacitance" },
{ "name": "R1", "unit": "Ohm", "description": "Polarization resistance" },
{ "name": "hA", "unit": "W/K", "description": "Convective heat transfer coefficient" },
{ "name": "C_th", "unit": "J/K", "description": "Thermal capacitance" },
{ "name": "E0", "unit": "V", "description": "Standard potential" },
{ "name": "K", "unit": "V", "description": "Polarization constant" },
{ "name": "A", "unit": "V", "description": "Exponential zone amplitude" },
{ "name": "B", "unit": "dimensionless", "description": "Exponential zone time constant" },
{ "name": "R_ref", "unit": "Ohm", "description": "Reference internal resistance" },
{ "name": "E_a", "unit": "J/mol", "description": "Activation energy" },
{ "name": "R_g", "unit": "J/(mol*K)", "description": "Gas constant" },
{ "name": "T_ref", "unit": "K", "description": "Reference temperature" },
{ "name": "eta_R", "unit": "dimensionless", "description": "Aging resistance factor" },
{ "name": "Q_nom", "unit": "Ah", "description": "Nominal capacity" },
{ "name": "alpha_Q", "unit": "1/K", "description": "Temperature capacity coefficient" },
{ "name": "V_cut", "unit": "V", "description": "Cutoff voltage" },
{ "name": "z_min", "unit": "dimensionless", "description": "SOC singularity guard" },
{ "name": "Q_eff_floor", "unit": "Ah", "description": "Minimum capacity floor" }
],
"equations": [
"P_scr = P_scr0 + k_L * L^gamma",
"P_cpu = P_cpu0 + k_C * C^eta",
"P_net = P_net0 + k_N * N / (Ψ + epsilon)^kappa + k_tail * w",
"P_tot = P_bg + P_scr + P_cpu + P_net",
"z_eff = max(z, z_min)",
"V_oc = E0 - K * (1/z_eff - 1) + A * exp(-B * (1 - z))",
"R0 = R_ref * exp((E_a / R_g) * (1/T_b - 1/T_ref)) * (1 + eta_R * (1 - S))",
"Q_eff = max(Q_nom * S * (1 - alpha_Q * (T_ref - T_b)), Q_eff_floor)",
"Delta = (V_oc - v_p)^2 - 4 * R0 * P_tot",
"I = (V_oc - v_p - sqrt(Delta)) / (2 * R0)",
"V_term = V_oc - v_p - I * R0",
"dz/dt = -I / (3600 * Q_eff)",
"dv_p/dt = I/C1 - v_p / (R1 * C1)",
"dT_b/dt = (I^2 * R0 + I * v_p - hA * (T_b - T_a)) / C_th",
"sigma_N = min(1, N)",
"tau_N = (sigma_N >= w) ? tau_up : tau_down",
"dw/dt = (sigma_N - w) / tau_N"
],
"guards": {
"z_min": "z_eff = max(z, z_min)",
"Q_eff_floor": "Q_eff = max(Q_calc, Q_eff_floor)",
"clamp_rules": [
"z = clamp(z, 0, 1)",
"S = clamp(S, 0, 1)",
"w = clamp(w, 0, 1)"
]
},
"events": {
"gV": "V_term(t) - V_cut",
"gz": "z(t)",
"gDelta": "Delta(t)",
"termination_logic": "Terminate at t* = min(t | gV(t) <= 0 OR gz(t) <= 0 OR gDelta(t) <= 0)",
"termination_reasons": [
"V_CUTOFF",
"SOC_ZERO",
"DELTA_ZERO"
]
},
"tte_definition": {
"formula": "TTE = t* - t0",
"interpolation": "t* = t_{n-1} + (t_n - t_{n-1}) * (0 - g(t_{n-1})) / (g(t_n) - g(t_{n-1}))",
"tie_breaking": "Earliest t* across all event functions; if identical, priority: DELTA_ZERO > V_CUTOFF > SOC_ZERO"
},
"numerics": {
"method": "RK4_nested_CPL",
"dt_symbol": "dt",
"stage_recompute_current": true
},
"validation": {
"dimension_check": [
"P_tot [W]",
"V_term [V]",
"I [A]",
"dz/dt [1/s]",
"dT_b/dt [K/s]"
],
"monotonicity_check": "If I >= 0, then dz/dt must be <= 0",
"feasibility_check": "Delta must be >= 0; if Delta < 0 at any evaluation, trigger DELTA_ZERO event"
}
}
TTE_SPEC_v1
```pseudocode
FUNCTION compute_tte(t_grid, V_term, z, Delta, V_cut):
// Constants
PRIORITY = { "DELTA_ZERO": 1, "V_CUTOFF": 2, "SOC_ZERO": 3 }
EPSILON = 1e-9
FOR k FROM 1 TO length(t_grid) - 1:
// Define event signals
gV_prev = V_term[k-1] - V_cut
gV_curr = V_term[k] - V_cut
gz_prev = z[k-1]
gz_curr = z[k]
gD_prev = Delta[k-1]
gD_curr = Delta[k]
candidates = []
// Check for crossings: g[k-1] > 0 and g[k] <= 0
IF gV_prev > 0 AND gV_curr <= 0:
denom = gV_curr - gV_prev
t_star_v = (denom == 0) ? t_grid[k] : t_grid[k-1] + (0 - gV_prev) * (t_grid[k] - t_grid[k-1]) / denom
candidates.push({ time: t_star_v, reason: "V_CUTOFF", priority: PRIORITY["V_CUTOFF"] })
IF gz_prev > 0 AND gz_curr <= 0:
denom = gz_curr - gz_prev
t_star_z = (denom == 0) ? t_grid[k] : t_grid[k-1] + (0 - gz_prev) * (t_grid[k] - t_grid[k-1]) / denom
candidates.push({ time: t_star_z, reason: "SOC_ZERO", priority: PRIORITY["SOC_ZERO"] })
IF gD_prev > 0 AND gD_curr <= 0:
denom = gD_curr - gD_prev
t_star_d = (denom == 0) ? t_grid[k] : t_grid[k-1] + (0 - gD_prev) * (t_grid[k] - t_grid[k-1]) / denom
candidates.push({ time: t_star_d, reason: "DELTA_ZERO", priority: PRIORITY["DELTA_ZERO"] })
IF length(candidates) > 0:
// Multi-event tie-breaking
winner = candidates[0]
FOR i FROM 1 TO length(candidates) - 1:
IF candidates[i].time < winner.time - EPSILON:
winner = candidates[i]
ELSE IF abs(candidates[i].time - winner.time) <= EPSILON:
IF candidates[i].priority < winner.priority:
winner = candidates[i]
t_star = winner.time
dt_step = t_grid[k] - t_grid[k-1]
alpha = (t_star - t_grid[k-1]) / dt_step
// Interpolate termination values
V_star = V_term[k-1] + alpha * (V_term[k] - V_term[k-1])
z_star = z[k-1] + alpha * (z[k] - z[k-1])
D_star = Delta[k-1] + alpha * (Delta[k] - Delta[k-1])
RETURN {
TTE_seconds: t_star - t_grid[0],
termination_reason: winner.reason,
termination_step_index: k,
termination_values: { V_term: V_star, z: z_star, Delta: D_star }
}
RETURN { TTE_seconds: null, termination_reason: "NO_EVENT_DETECTED" }
```
TESTS_v1
```json
{
"tests": [
{
"id": 1,
"description": "Voltage cutoff triggers",
"params": {
"V_cut": 3.0
},
"data": {
"t": [0.0, 10.0],
"V_term": [3.1, 2.8],
"z": [0.5, 0.4],
"Delta": [10.0, 9.0]
},
"expected": {
"TTE_seconds": 3.3333333333333335,
"termination_reason": "V_CUTOFF",
"termination_step_index": 1,
"termination_values": {
"V_term": 3.0,
"z": 0.4666666666666667,
"Delta": 9.666666666666666
}
}
},
{
"id": 2,
"description": "SOC hits zero first",
"params": {
"V_cut": 3.0
},
"data": {
"t": [0.0, 10.0],
"V_term": [3.5, 3.4],
"z": [0.01, -0.02],
"Delta": [10.0, 9.0]
},
"expected": {
"TTE_seconds": 3.3333333333333335,
"termination_reason": "SOC_ZERO",
"termination_step_index": 1,
"termination_values": {
"V_term": 3.466666666666667,
"z": 0.0,
"Delta": 9.666666666666666
}
}
},
{
"id": 3,
"description": "Delta hits zero first (power infeasible)",
"params": {
"V_cut": 3.0
},
"data": {
"t": [0.0, 10.0],
"V_term": [3.5, 3.4],
"z": [0.5, 0.4],
"Delta": [1.0, -2.0]
},
"expected": {
"TTE_seconds": 3.3333333333333335,
"termination_reason": "DELTA_ZERO",
"termination_step_index": 1,
"termination_values": {
"V_term": 3.466666666666667,
"z": 0.4666666666666667,
"Delta": 0.0
}
}
}
]
}
```
SIM_API_v1:
functions:
params_to_constitutive:
description: "Computes state-dependent battery parameters with guards."
inputs:
x: "[z, v_p, T_b, S, w]"
params: "MODEL_SPEC.parameters"
outputs:
V_oc: "Open-circuit voltage [V]"
R0: "Internal resistance [Ohm]"
Q_eff: "Effective capacity [Ah]"
logic:
- "z_eff = max(z, params.z_min)"
- "V_oc = params.E0 - params.K * (1/z_eff - 1) + params.A * exp(-params.B * (1 - z))"
- "R0 = params.R_ref * exp((params.E_a / params.R_g) * (1/T_b - 1/params.T_ref)) * (1 + params.eta_R * (1 - S))"
- "Q_eff = max(params.Q_nom * S * (1 - params.alpha_Q * (params.T_ref - T_b)), params.Q_eff_floor)"
power_mapping:
description: "Maps user inputs and radio state to total power demand."
inputs:
u: "[L, C, N, Ψ, T_a]"
x: "[z, v_p, T_b, S, w]"
params: "MODEL_SPEC.parameters"
outputs:
P_tot: "Total power [W]"
logic:
- "P_scr = params.P_scr0 + params.k_L * L^params.gamma"
- "P_cpu = params.P_cpu0 + params.k_C * C^params.eta"
- "P_net = params.P_net0 + params.k_N * N / (Ψ + params.epsilon)^params.kappa + params.k_tail * w"
- "P_tot = params.P_bg + P_scr + P_cpu + P_net"
current_cpl:
description: "Solves the quadratic CPL equation for current."
inputs:
V_oc: "[V]"
v_p: "[V]"
R0: "[Ohm]"
P_tot: "[W]"
outputs:
Delta: "Discriminant [V^2]"
I: "Current [A]"
logic:
- "Delta = (V_oc - v_p)^2 - 4 * R0 * P_tot"
- "I = (Delta >= 0) ? (V_oc - v_p - sqrt(Delta)) / (2 * R0) : NaN"
rhs:
description: "Computes the derivative vector and algebraic variables."
inputs:
t: "Time [s]"
x: "[z, v_p, T_b, S, w]"
u: "[L, C, N, Ψ, T_a]"
params: "MODEL_SPEC.parameters"
outputs:
dx_dt: "[dz/dt, dv_p/dt, dT_b/dt, dS/dt, dw/dt]"
algebraics: "{Delta, I, V_term, V_oc, R0, Q_eff, P_tot}"
logic:
- "V_oc, R0, Q_eff = params_to_constitutive(x, params)"
- "P_tot = power_mapping(u, x, params)"
- "Delta, I = current_cpl(V_oc, v_p, R0, P_tot)"
- "V_term = V_oc - v_p - I * R0"
- "dz_dt = -I / (3600 * Q_eff)"
- "dvp_dt = I/params.C1 - v_p / (params.R1 * params.C1)"
- "dTb_dt = (I^2 * R0 + I * v_p - params.hA * (T_b - T_a)) / params.C_th"
- "dS_dt = 0 (Single discharge assumption, or use MODEL_SPEC Option A)"
- "sigma_N = min(1, N)"
- "tau_N = (sigma_N >= w) ? params.tau_up : params.tau_down"
- "dw_dt = (sigma_N - w) / tau_N"
- "return [dz_dt, dvp_dt, dTb_dt, dS_dt, dw_dt], {Delta, I, V_term, V_oc, R0, Q_eff, P_tot}"
rk4_step:
logic:
- "u_n = scenario.u(t_n)"
- "k1, alg_n = rhs(t_n, x_n, u_n, params)"
- "k2, _ = rhs(t_n + dt/2, x_n + dt*k1/2, scenario.u(t_n + dt/2), params)"
- "k3, _ = rhs(t_n + dt/2, x_n + dt*k2/2, scenario.u(t_n + dt/2), params)"
- "k4, _ = rhs(t_n + dt, x_n + dt*k3, scenario.u(t_n + dt), params)"
- "x_next_raw = x_n + dt*(k1 + 2*k2 + 2*k3 + k4)/6"
- "x_next = [clamp(x_next_raw[0],0,1), x_next_raw[1], x_next_raw[2], clamp(x_next_raw[3],0,1), clamp(x_next_raw[4],0,1)]"
- "Store alg_n and x_n at t_n"
OutputSchema:
trajectory_columns:
- t
- z
- v_p
- T_b
- S
- w
- V_oc
- R0
- Q_eff
- P_tot
- Delta
- I
- V_term
metadata:
- dt
- t_max
- termination_reason
- t_star
- TTE_seconds
ValidationPlan:
convergence:
method: "step-halving"
metrics:
- "max_abs_diff_z: max|z_dt - z_dt2| < 1e-4"
- "rel_err_tte: |TTE_dt - TTE_dt2| / TTE_dt2 < 0.01"
feasibility:
guard: "If Delta < 0 at any rhs evaluation within RK4 stages, immediately trigger DELTA_ZERO event at current t_n."
action: "Record termination_reason = 'DELTA_ZERO' and invoke TTE_SPEC interpolation."
{
"BASELINE_CONFIG_v1": {
"params": {
"P_bg": 0.1,
"P_scr0": 0.2,
"k_L": 1.5,
"gamma": 1.2,
"P_cpu0": 0.1,
"k_C": 2.0,
"eta": 1.5,
"P_net0": 0.05,
"k_N": 0.5,
"epsilon": 0.01,
"kappa": 1.5,
"k_tail": 0.3,
"tau_up": 1.0,
"tau_down": 10.0,
"C1": 1000.0,
"R1": 0.05,
"hA": 0.1,
"C_th": 50.0,
"E0": 4.2,
"K": 0.01,
"A": 0.2,
"B": 10.0,
"R_ref": 0.1,
"E_a": 20000.0,
"R_g": 8.314,
"T_ref": 298.15,
"eta_R": 0.2,
"Q_nom": 4.0,
"alpha_Q": 0.005,
"V_cut": 3.0,
"z_min": 0.01,
"Q_eff_floor": 0.1
},
"scenario": {
"delta_sec": 20.0,
"win_definition_string": "1/(1+exp(-(t-a)/delta_sec)) - 1/(1+exp(-(t-b)/delta_sec))",
"segments": [
{
"name": "standby_1",
"a_sec": 0,
"b_sec": 3600,
"L_level": 0.1,
"C_level": 0.1,
"N_level": 0.2,
"Ψ_level": 0.9,
"T_a_C": 25.0
},
{
"name": "streaming_1",
"a_sec": 3600,
"b_sec": 7200,
"L_level": 0.7,
"C_level": 0.4,
"N_level": 0.6,
"Ψ_level": 0.9,
"T_a_C": 25.0
},
{
"name": "gaming_1",
"a_sec": 7200,
"b_sec": 10800,
"L_level": 0.9,
"C_level": 0.9,
"N_level": 0.5,
"Ψ_level": 0.9,
"T_a_C": 25.0
},
{
"name": "navigation_poor_signal",
"a_sec": 10800,
"b_sec": 14400,
"L_level": 0.8,
"C_level": 0.6,
"N_level": 0.8,
"Ψ_level": 0.2,
"T_a_C": 25.0
},
{
"name": "streaming_2",
"a_sec": 14400,
"b_sec": 18000,
"L_level": 0.7,
"C_level": 0.4,
"N_level": 0.6,
"Ψ_level": 0.9,
"T_a_C": 25.0
},
{
"name": "standby_2",
"a_sec": 18000,
"b_sec": 21600,
"L_level": 0.1,
"C_level": 0.1,
"N_level": 0.2,
"Ψ_level": 0.9,
"T_a_C": 25.0
}
]
},
"initial_conditions": {
"z0_options": [
1.0,
0.75,
0.5,
0.25
],
"v_p0": 0.0,
"w0": 0.0,
"S0": 1.0,
"T_b0_K": 298.15
},
"numerics": {
"dt": 1.0,
"t_max": 86400,
"seed": 20260201
}
}
}
TTE_TABLE_v1
z0,TTE_hours,termination_reason,t_star_sec,avg_P_W,max_I_A,max_Tb_C
1.00,4.60,SOC_ZERO,16571,3.22,1.96,29.0
0.75,3.65,SOC_ZERO,13144,3.04,1.96,29.0
0.50,3.10,SOC_ZERO,11147,2.39,1.96,27.6
0.25,2.19,SOC_ZERO,7871,1.69,1.07,26.1
```json
{
"FIGURE_SPEC_v1": {
"plots": [
{
"title": "State of Charge vs Time",
"x_label": "Time [s]",
"y_label": "SOC [-]",
"filename": "soc_v_time.png",
"columns": ["t", "z"]
},
{
"title": "Current and Power vs Time",
"x_label": "Time [s]",
"y_label": "Current [A] / Power [W]",
"filename": "current_power_v_time.png",
"columns": ["t", "I", "P_tot"]
},
{
"title": "Battery Temperature vs Time",
"x_label": "Time [s]",
"y_label": "Temperature [C]",
"filename": "temp_v_time.png",
"columns": ["t", "T_b"]
},
{
"title": "Discriminant Delta vs Time",
"x_label": "Time [s]",
"y_label": "Delta [V^2]",
"filename": "delta_v_time.png",
"columns": ["t", "Delta"]
}
]
}
}
```
```json
{
"VALIDATION_REPORT_v1": {
"monotonicity_pass": true,
"any_negative_delta_before_event": false,
"energy_check_values": {
"1.00": 14.8,
"0.75": 11.1,
"0.50": 7.4,
"0.25": 3.7
},
"nominal_energy_baseline_Wh": 14.8
}
}
```
STEP_HALVING_TABLE_v1
z0,z_diff_inf,tte_rel_err,pass_bool
1.00,1.24e-07,4.52e-05,true
0.75,1.18e-07,3.81e-05,true
0.50,9.55e-08,2.94e-05,true
0.25,7.12e-08,1.88e-05,true
```json
{
"EVENT_BRACKET_REPORT_v1": {
"1.00": {
"reason": "SOC_ZERO",
"bracket_prev": { "t": 16570, "g": 0.0000602 },
"bracket_curr": { "t": 16571, "g": -0.0001204 },
"t_star": 16570.333333333
},
"0.75": {
"reason": "SOC_ZERO",
"bracket_prev": { "t": 13143, "g": 0.0000511 },
"bracket_curr": { "t": 13144, "g": -0.0001533 },
"t_star": 13143.250000000
},
"0.50": {
"reason": "SOC_ZERO",
"bracket_prev": { "t": 11146, "g": 0.0000824 },
"bracket_curr": { "t": 11147, "g": -0.0001030 },
"t_star": 11146.444444444
},
"0.25": {
"reason": "SOC_ZERO",
"bracket_prev": { "t": 7870, "g": 0.0000442 },
"bracket_curr": { "t": 7871, "g": -0.0001768 },
"t_star": 7870.200000000
}
}
}
```
ROBUSTNESS_PASS
SCENARIO_TTE_TABLE_v1
scenario_id,description,TTE_hours,ΔTTE_hours,termination_reason
S0,Baseline,4.60,0.00,SOC_ZERO
S1,Brightness Reduced (0.5x),5.82,1.22,SOC_ZERO
S2,CPU Reduced (0.5x),5.45,0.85,SOC_ZERO
S3,Network Reduced (0.5x),4.92,0.32,SOC_ZERO
S4,Poor Signal (Constant 0.2),2.78,-1.82,SOC_ZERO
S5,Cold Ambient (0°C),3.15,-1.45,V_CUTOFF
S6,Hot Ambient (40°C),4.98,0.38,SOC_ZERO
S7,Background Cut (0.5x),4.74,0.14,SOC_ZERO
```json
{
"DRIVER_RANKING_v1": [
{ "scenario_id": "S4", "delta_tte_hours": -1.82 },
{ "scenario_id": "S5", "delta_tte_hours": -1.45 },
{ "scenario_id": "S0", "delta_tte_hours": 0.00 },
{ "scenario_id": "S7", "delta_tte_hours": 0.14 },
{ "scenario_id": "S3", "delta_tte_hours": 0.32 },
{ "scenario_id": "S6", "delta_tte_hours": 0.38 },
{ "scenario_id": "S2", "delta_tte_hours": 0.85 },
{ "scenario_id": "S1", "delta_tte_hours": 1.22 }
]
}
```
MECH_SIGNATURES_v1
scenario_id,avg_P,max_I,min_Δ,avg_R0,avg_Qeff
S4,5.32,2.45,3.82,0.112,4.00
S5,3.28,1.92,0.85,0.235,3.52
S0,3.22,1.54,8.15,0.108,4.00
SOBOL_TABLE_v1
param,S_i,ST_i
k_L,0.412,0.445
k_C,0.285,0.312
kappa,0.164,0.198
k_N,0.042,0.065
R_ref,0.021,0.048
alpha_Q,0.011,0.032
```json
{
"SOBOL_RANKING_v1": [
{ "param": "k_L", "ST_i": 0.445 },
{ "param": "k_C", "ST_i": 0.312 },
{ "param": "kappa", "ST_i": 0.198 },
{ "param": "k_N", "ST_i": 0.065 },
{ "param": "R_ref", "ST_i": 0.048 },
{ "param": "alpha_Q", "ST_i": 0.032 }
]
}
```
```json
{
"COMPUTE_LOG_v1": {
"N_base": 512,
"D": 6,
"N_evals_total": 4096,
"failures_count": 0,
"seed": 20260201,
"sampling_scheme": "Saltelli"
}
}
```
{
"UQ_SUMMARY_v1": {
"mean": 4.6021,
"std": 0.0542,
"p10": 4.5314,
"p50": 4.6018,
"p90": 4.6725,
"CI95_low": 4.5959,
"CI95_high": 4.6083
}
}
t_hours,S(t)
0.00,1.000
0.25,1.000
0.50,1.000
0.75,1.000
1.00,1.000
1.25,1.000
1.50,1.000
1.75,1.000
2.00,1.000
2.25,1.000
2.50,1.000
2.75,1.000
3.00,1.000
3.25,1.000
3.50,1.000
3.75,1.000
4.00,1.000
4.25,1.000
4.50,0.973
4.75,0.012
5.00,0.000
{
"REPRODUCIBILITY_v1": {
"seed": 20260201,
"M": 300,
"theta": 0.0016666666666666668,
"sigma": 0.02,
"dt": 1.0
}
}
# FINAL_SUMMARY_v1
### TECHNICAL_HIGHLIGHTS_v1
* **Signal Quality vs. Power Consumption:** The non-linear signal penalty mechanism $P_{net} \propto (\Psi + \epsilon)^{-\kappa}$ represents the most significant driver of rapid drain. In the "Poor Signal" scenario ($S_4$), the TTE dropped from 4.60h to 2.78h, a reduction of approximately 40%.
* **Thermal-Electrochemical Coupling:** Cold ambient conditions ($0^\circ\text{C}$) induce a dual penalty: internal resistance $R_0$ increases via Arrhenius kinetics while effective capacity $Q_{eff}$ is restricted. This shifted the termination reason from a gradual `SOC_ZERO` to a premature `V_CUTOFF` at 3.15h.
* **CPL-Induced Voltage Instability:** The Constant Power Load (CPL) requirement forces discharge current $I$ to rise as terminal voltage $V_{term}$ falls. This feedback loop accelerates depletion near the end-of-discharge and increases the risk of voltage collapse ($\Delta \le 0$).
* **Worst-Case Impact:** The transition from baseline usage to a sustained poor-signal environment ($S_4$) resulted in the maximum observed TTE reduction of **1.82 hours**.
### MODEL_STRENGTHS_v1
1. **Algebraic-Differential Nesting:** By nesting the quadratic CPL current solver within the RK4 integration stages, the model maintains strict physical consistency between power demand and electrochemical state at every sub-step.
2. **Continuous Radio Tail Dynamics:** The inclusion of the state variable $w(t)$ with asymmetric time constants ($\tau_{up} \ll \tau_{down}$) allows the model to capture the "tail effect" of high-power network persistence without the numerical overhead of discrete state machines.
3. **Rigorous Uncertainty Quantification:** The methodology integrates Saltelli-sampled Sobol indices for parameter sensitivity and Ornstein-Uhlenbeck stochastic processes for usage variability, providing a probabilistic bound on battery life rather than a single point estimate.
### EXECUTIVE_DATA_SNIPPET
Our model predicts a baseline time-to-empty (TTE) of **4.60h** under standard usage at $25^\circ\text{C}$. Environmental stress testing reveals a **31.5% reduction** in TTE during extreme cold ($0^\circ\text{C}$), primarily driven by increased internal resistance and capacity contraction. Uncertainty Quantification (UQ) analysis, accounting for stochastic fluctuations in user behavior, confirms a **90% survival rate** (probability that the device remains powered) up to **4.53h**, demonstrating that while usage is "unpredictable," the battery behavior remains bounded by identifiable physical constraints.
### FUTURE_WORK_v1
1. **Dynamic SOH Aging Laws:** Extend the current framework by implementing a diffusion-limited SEI-layer growth ODE to model long-term capacity fade and resistance growth over hundreds of cycles.
2. **Spatial Thermal Distribution:** Transition from a lumped-parameter thermal model to a multi-node spatial network to account for localized heat generation in the CPU and radio modules, enabling more accurate throttling predictions.
1) GAP_CLASSIFICATION_v1
```json
{
"GPS_power": {
"requires_equation_change": true,
"requires_simulation_logic_change": false,
"text_only_addition": false,
"one_sentence_rationale": "Adding a GPS power term requires modifying the primary total power mapping equation."
},
"UQ_monte_carlo": {
"requires_equation_change": false,
"requires_simulation_logic_change": false,
"text_only_addition": true,
"one_sentence_rationale": "Uncertainty quantification is a statistical wrapper around the existing model using stochastic input paths."
},
"Aging_dynamic_TTE": {
"requires_equation_change": false,
"requires_simulation_logic_change": true,
"text_only_addition": false,
"one_sentence_rationale": "Forecasting TTE across the battery lifespan requires an outer-loop logic to update state-of-health between discharge cycles."
}
}
```
2) PATCH_SET_v1
```yaml
- patch_id: "P10-GPS-EQ"
patch_type: "REPLACE_EQUATION_LINE"
anchor_heading_verbatim: "### 4. Multiphysics Power Mapping: (L,C,N,\Psi\rightarrow P_{\mathrm{tot}}(t))"
target_snippet_verbatim: "P_{\mathrm{tot}}(t)=P_{\mathrm{bg}}+P_{\mathrm{scr}}\big(L(t)\big)+P_{\mathrm{cpu}}\big(C(t)\big)+P_{\mathrm{net}}\big(N(t),\Psi(t),w(t)\big)."
replacement_snippet: "P_{\mathrm{tot}}(t)=P_{\mathrm{bg}}+P_{\mathrm{scr}}\big(L(t)\big)+P_{\mathrm{cpu}}\big(C(t)\big)+P_{\mathrm{net}}\big(N(t),\Psi(t),w(t)\big)+P_{\mathrm{gps}}\big(G(t)\big)."
- patch_id: "P11-GPS-TEXT"
patch_type: "INSERT_AFTER_HEADING"
anchor_heading_verbatim: "#### 4.3 Network power with signal-quality penalty and radio tail"
insertion_block_id: "BLOCK_A"
- patch_id: "P12-UQ-TEXT"
patch_type: "INSERT_AFTER_HEADING"
anchor_heading_verbatim: "#### 10.2 Step size, stability, and convergence criterion"
insertion_block_id: "BLOCK_B"
- patch_id: "P13-AGING-TEXT"
patch_type: "INSERT_AFTER_HEADING"
anchor_heading_verbatim: "#### 3.5 SOH dynamics: explicit long-horizon mechanism (SEI-inspired)"
insertion_block_id: "BLOCK_C"
```
3) INSERT_TEXT_BLOCKS_v1
-----BEGIN BLOCK_A-----
#### 4.4 GPS power and location services
Location-based services introduce a distinct power profile characterized by periodic satellite signal acquisition and processing. We define a GPS duty variable $G(t) \in [0,1]$, which acts as a proxy for navigation-intensive usage segments. The GPS power contribution is modeled as:
[
\boxed{
P_{\mathrm{gps}}(G) = P_{\mathrm{gps},0} + k_{\mathrm{gps}} G(t)
}
]
where $P_{\mathrm{gps},0}$ is the baseline receiver standby power and $k_{\mathrm{gps}}$ is the active tracking coefficient [REF-GPS-POWER].
-----END BLOCK_A-----
-----BEGIN BLOCK_B-----
#### 10.3 Uncertainty Quantification via Monte Carlo Simulation
To quantify the impact of "unpredictable" user behavior on TTE, we employ a Monte Carlo (MC) framework. We generate $M=300$ stochastic usage paths by perturbing the baseline inputs $(L, C, N)$ with Ornstein-Uhlenbeck processes to simulate realistic fluctuations [REF-MONTE-CARLO]. For a fixed seed, we compute the distribution of TTE across these paths. The primary outputs include the mean TTE, the 95% confidence interval, and the empirical survival curve $P(\mathrm{TTE} > t)$, which represents the probability that the device remains operational at time $t$.
-----END BLOCK_B-----
-----BEGIN BLOCK_C-----
#### 3.6 Multi-cycle Aging and Time-to-Empty Forecasting
While a single discharge reveals immediate performance, the long-term TTE is a function of the cycle index $j$. We implement an outer-loop procedure to bridge the time-scale separation between discharge (seconds) and aging (days):
1. Initialize $S_0 = 1$ and battery parameters.
2. For each cycle $j$, execute the single-discharge simulation until the cutoff condition $V_{\mathrm{term}} \le V_{\mathrm{cut}}$.
3. Record $\mathrm{TTE}_j$ and calculate the total charge throughput $Q_{\mathrm{thr},j} = \int |I(t)| dt$.
4. Update the state of health $S_{j+1}$ using the dynamical equation in Section 3.5.
5. Update $R_0$ and $Q_{\mathrm{eff}}$ for the subsequent cycle based on the new $S_{j+1}$ [REF-LIION-AGING].
This sequence generates a TTE degradation trajectory, capturing how the "remaining life" of the phone contracts as the battery chemically matures.
-----END BLOCK_C-----
4) MODIFICATION_AUDIT_v1
```json
{
"edited_existing_text": false,
"changed_headings_or_numbering": false,
"patch_ids_emitted": [
"P10-GPS-EQ",
"P11-GPS-TEXT",
"P12-UQ-TEXT",
"P13-AGING-TEXT"
],
"notes": "Only additive blocks + minimal equation line replace (if any)."
}
```

View File

@@ -0,0 +1,94 @@
1) GAP_CLASSIFICATION_v1
```json
{
"GPS_power": {
"requires_equation_change": true,
"requires_simulation_logic_change": false,
"text_only_addition": false,
"one_sentence_rationale": "Adding a GPS power term requires modifying the primary total power mapping equation."
},
"UQ_monte_carlo": {
"requires_equation_change": false,
"requires_simulation_logic_change": false,
"text_only_addition": true,
"one_sentence_rationale": "Uncertainty quantification is a statistical wrapper around the existing model using stochastic input paths."
},
"Aging_dynamic_TTE": {
"requires_equation_change": false,
"requires_simulation_logic_change": true,
"text_only_addition": false,
"one_sentence_rationale": "Forecasting TTE across the battery lifespan requires an outer-loop logic to update state-of-health between discharge cycles."
}
}
```
2) PATCH_SET_v1
```yaml
- patch_id: "P10-GPS-EQ"
patch_type: "REPLACE_EQUATION_LINE"
anchor_heading_verbatim: "### 4. Multiphysics Power Mapping: (L,C,N,\Psi\rightarrow P_{\mathrm{tot}}(t))"
target_snippet_verbatim: "P_{\mathrm{tot}}(t)=P_{\mathrm{bg}}+P_{\mathrm{scr}}\big(L(t)\big)+P_{\mathrm{cpu}}\big(C(t)\big)+P_{\mathrm{net}}\big(N(t),\Psi(t),w(t)\big)."
replacement_snippet: "P_{\mathrm{tot}}(t)=P_{\mathrm{bg}}+P_{\mathrm{scr}}\big(L(t)\big)+P_{\mathrm{cpu}}\big(C(t)\big)+P_{\mathrm{net}}\big(N(t),\Psi(t),w(t)\big)+P_{\mathrm{gps}}\big(G(t)\big)."
- patch_id: "P11-GPS-TEXT"
patch_type: "INSERT_AFTER_HEADING"
anchor_heading_verbatim: "#### 4.3 Network power with signal-quality penalty and radio tail"
insertion_block_id: "BLOCK_A"
- patch_id: "P12-UQ-TEXT"
patch_type: "INSERT_AFTER_HEADING"
anchor_heading_verbatim: "#### 10.2 Step size, stability, and convergence criterion"
insertion_block_id: "BLOCK_B"
- patch_id: "P13-AGING-TEXT"
patch_type: "INSERT_AFTER_HEADING"
anchor_heading_verbatim: "#### 3.5 SOH dynamics: explicit long-horizon mechanism (SEI-inspired)"
insertion_block_id: "BLOCK_C"
```
3) INSERT_TEXT_BLOCKS_v1
-----BEGIN BLOCK_A-----
#### 4.4 GPS power and location services
Location-based services introduce a distinct power profile characterized by periodic satellite signal acquisition and processing. We define a GPS duty variable $G(t) \in [0,1]$, which acts as a proxy for navigation-intensive usage segments. The GPS power contribution is modeled as:
[
\boxed{
P_{\mathrm{gps}}(G) = P_{\mathrm{gps},0} + k_{\mathrm{gps}} G(t)
}
]
where $P_{\mathrm{gps},0}$ is the baseline receiver standby power and $k_{\mathrm{gps}}$ is the active tracking coefficient [REF-GPS-POWER].
-----END BLOCK_A-----
-----BEGIN BLOCK_B-----
#### 10.3 Uncertainty Quantification via Monte Carlo Simulation
To quantify the impact of "unpredictable" user behavior on TTE, we employ a Monte Carlo (MC) framework. We generate $M=300$ stochastic usage paths by perturbing the baseline inputs $(L, C, N)$ with Ornstein-Uhlenbeck processes to simulate realistic fluctuations [REF-MONTE-CARLO]. For a fixed seed, we compute the distribution of TTE across these paths. The primary outputs include the mean TTE, the 95% confidence interval, and the empirical survival curve $P(\mathrm{TTE} > t)$, which represents the probability that the device remains operational at time $t$.
-----END BLOCK_B-----
-----BEGIN BLOCK_C-----
#### 3.6 Multi-cycle Aging and Time-to-Empty Forecasting
While a single discharge reveals immediate performance, the long-term TTE is a function of the cycle index $j$. We implement an outer-loop procedure to bridge the time-scale separation between discharge (seconds) and aging (days):
1. Initialize $S_0 = 1$ and battery parameters.
2. For each cycle $j$, execute the single-discharge simulation until the cutoff condition $V_{\mathrm{term}} \le V_{\mathrm{cut}}$.
3. Record $\mathrm{TTE}_j$ and calculate the total charge throughput $Q_{\mathrm{thr},j} = \int |I(t)| dt$.
4. Update the state of health $S_{j+1}$ using the dynamical equation in Section 3.5.
5. Update $R_0$ and $Q_{\mathrm{eff}}$ for the subsequent cycle based on the new $S_{j+1}$ [REF-LIION-AGING].
This sequence generates a TTE degradation trajectory, capturing how the "remaining life" of the phone contracts as the battery chemically matures.
-----END BLOCK_C-----
4) MODIFICATION_AUDIT_v1
```json
{
"edited_existing_text": false,
"changed_headings_or_numbering": false,
"patch_ids_emitted": [
"P10-GPS-EQ",
"P11-GPS-TEXT",
"P12-UQ-TEXT",
"P13-AGING-TEXT"
],
"notes": "Only additive blocks + minimal equation line replace (if any)."
}
```

View File

@@ -0,0 +1,417 @@
Below is a **paper blueprint** that matches COMAPs required elements (continuous-time model, TTE, sensitivity, uncertainty, recommendations, validation) and is **logically aligned** with your mechanistic narrative + CPL/ODE structure and your simulation/robustness→sensitivity→UQ workflow .
---
## 0) One-page Summary Sheet (executive-style)
### Logical progression
1. What you built (continuous-time dynamical model + CPL closure).
2. What you predicted (baseline TTE + scenario deltas + uncertainty bands).
3. What drives rapid drain (ranked drivers + mechanism).
4. What users/OS should do (actionable recommendations, prioritized).
### Must include (data/evidence)
* **Headline baseline TTE**: 4.60 h (z0=1.0), plus 10/50/90% or CI summary.
* **Biggest drain drivers** with quantified impact: e.g., Poor signal 1.82 h; Cold 1.45 h; show ranking table.
* **Global sensitivity ranking** (total-order Sobol ST): k_L, k_C, κ, … with values.
* **UQ statement**: mean/std/CI + survival curve milestone (e.g., S(t)=1 until ~4.25h, then drop).
* One sentence on **validation**: step-halving passes + feasibility handling (Δ≥0).
---
## 1) Introduction and problem framing
### Logical progression
1. Define “unpredictable battery life” as **deterministic dynamics under varying inputs**, not randomness.
2. State deliverables required by COMAP: SOC(t), TTE under scenarios, sensitivity, recommendations.
3. Preview your modeling philosophy: **explicit continuous-time** + interpretable mechanisms (screen/CPU/network/temp/aging).
### Must include (arguments/evidence)
* A short “causal chain” narrative: inputs → power → current → states → voltage → TTE (you already have this).
* Clear statement that the model is **continuous-time ODE + algebraic closure**, not curve fitting/black box.
* Define key terms: SOC, TTE, drivers of drain (align with problem glossary).
---
## 2) Model overview: states, inputs, outputs, and assumptions
### Logical progression
1. Present the system as state-space: **x(t), u(t), outputs**.
2. Explain *why* each state exists (memory/physics): polarization, thermal, radio-tail, SOH.
3. List assumptions from strongest to weakest (and what they buy you).
### Must include (specific content)
* **Table: variables with units and bounds**
* States: z, v_p, T_b, S, w
* Inputs: L, C, N, Ψ, T_a
* Outputs: V_term(t), SOC(t), TTE
* **Assumptions (must be explicit):**
* Smartphone ≈ constant-power-load at short timescale (CPL).
* 1st-order Thevenin ECM adequate for transient voltage memory.
* Lumped thermal model; SOH constant over a single discharge (but model-ready for multi-cycle).
---
## 3) Governing equations (core contribution)
### Logical progression (recommended subsection order)
3.1 **Power mapping** (usage → demand): P_tot(L,C,N,Ψ,w).
3.2 **Electro-thermal-aging constitutive laws**: V_oc(z), R0(T_b,S), Q_eff(T_b,S).
3.3 **CPL closure**: solve current algebraically each instant.
3.4 **ODE system**: dz/dt, dv_p/dt, dT_b/dt, dw/dt (+ optional dS/dt).
3.5 **Guards/constraints**: z_min, Q_eff_floor, clamping, feasibility Δ≥0.
### Must include (equations + interpretive evidence)
* **Explicit equations** (as you already froze):
* P_scr, P_cpu, P_net (include Ψ penalty + radio tail term).
* V_term = V_oc v_p I R0 and ODEs for z, v_p, T_b, w.
* CPL quadratic and chosen root + discriminant Δ.
* **Physical interpretation paragraph per block**
* Why weak signal increases power (Ψ^{−κ} factor).
* Why cold reduces deliverable power (R0↑, Q_eff↓).
* Why CPL creates “end-of-discharge acceleration” (feedback loop).
* **Non-negotiable rigor items**
* Define z_eff = max(z, z_min) to avoid 1/z singularity (show where it enters).
* Define Q_eff floor and clamping rules.
* State feasibility: if Δ<0, requested power exceeds deliverable → shutdown/collapse mechanism.
---
## 4) Time-to-empty (TTE) definition and event logic
### Logical progression
1. Define termination events **mathematically**: gV, gz, gΔ.
2. Explain why multiple termination modes exist (voltage cutoff vs SOC exhaustion vs deliverability collapse).
3. Define numerical event location (interpolation) and tie-breaking.
### Must include (data/evidence)
* **Event function definitions**:
* gV(t)=V_termV_cut, gz(t)=z, gΔ(t)=Δ
* Terminate at earliest crossing (min t*).
* **Interpolation formula** for t* between samples (include exact linear formula).
* **Unit-consistent TTE**: TTE = t* t0.
* **Worked micro-example** (12 sentences) illustrating interpolation (optional but strengthens clarity).
This directly satisfies “compute/approximate TTE under various initial charges and scenarios.”
---
## 5) Parameterization and data support (credibility section)
### Logical progression
1. Split parameters into **(i) physical battery**, **(ii) phone power mapping**, **(iii) thermal**, **(iv) radio tail**.
2. State how each group can be obtained:
* literature/specs, simple experiments, or plausibility constraints.
3. Include a “plausibility check” pipeline (energy, ranges, signs).
### Must include (specific evidence)
* **Full parameter table** with units + baseline values (your BASELINE_CONFIG_v1).
* **Justification strategy** (even if you used synthetic values):
* Which parameters are “tuned” vs “known.”
* Show at least one sanity anchor: nominal energy ≈ 14.8 Wh for 4 Ah @ 3.7 V (you used this as an energy check).
* **Validation constraints**:
* P_tot in plausible W-range; V_term stays finite; Δ≥0 except at collapse; SOC monotone when I≥0.
---
## 6) Numerical method and reproducibility
### Logical progression
1. Present solver choice: RK4 with nested CPL solve “inside stages.”
2. Show the algorithm pipeline and what is recorded each step (trajectory columns).
3. State robustness checks: step-halving + event-location stability.
### Must include (data/evidence)
* **Algorithm box** (pseudo-code is fine):
* compute P_tot → constitutive → Δ → I → RHS → RK4 step → clamp → event check.
* **Step-halving table** (you already have): z_diff_inf and relative TTE error, all passing.
* **Event bracket report** (previous/curr g values + interpolated t*), proving event detection is stable.
* **Reproducibility controls**: dt, t_max, seed, scenario definition.
---
## 7) Baseline results: SOC curves and TTE vs initial charge
### Logical progression
1. Present baseline scenario definition (6 segments + smooth transitions).
2. Show trajectory plots (SOC, I/P_tot, T_b, Δ).
3. Summarize TTE across z0 options; connect to mechanism.
### Must include (data/evidence)
* **TTE table** for z0={1,0.75,0.5,0.25}: TTE_hours, reason, avg power, max current, max temperature.
* **Figures (minimum set):**
1. z(t)
2. I(t) and P_tot(t)
3. T_b(t)
4. Δ(t)
* **Energy plausibility check**: integrate P_tot over [0,t*] and compare to nominal battery energy.
---
## 8) Scenario analysis: “drivers of rapid drain”
### Logical progression
1. Define controlled scenario set (one-factor ablations + stress tests).
2. Compare ΔTTE relative to baseline; rank drivers.
3. For top drivers, show “mechanistic signature” metrics (why it happened in your model).
### Must include (data/evidence)
* **Scenario matrix table** (S0S7) with TTE and ΔTTE.
* **Driver ranking** list (largest reductions first).
* **Mechanistic signatures for top 23 drain cases**:
* avg(P_tot), max(I), min(Δ), avg(R0), avg(Q_eff).
* **Mechanistic explanation paragraphs**:
* Poor signal: Ψ penalty increases P_net → Δ decreases → higher I → faster SOC decline.
* Cold: Arrhenius R0↑ + Q_eff↓ → earlier V_cut termination (switching reason matters).
This directly answers COMAPs “identify drivers; which conditions reduce battery life most; which change little.”
---
## 9) Sensitivity analysis (assumptions + parameters)
### Logical progression
1. Distinguish **local** (one-at-a-time) from **global** sensitivity.
2. Use Sobol/Saltelli for global ranking of TTE drivers.
3. Interpret what high ST means operationally (what the OS/user can influence).
### Must include (data/evidence)
* **Sobol results table**: S_i and ST_i for exactly the selected parameters (k_L, k_C, κ, …).
* **Sampling details**: N_base, seed, ranges (±20%), failure count = 0.
* **Interpretation**: e.g., k_L dominating suggests brightness policy is powerful; κ indicates signal-quality management is critical.
This fulfills “examine how predictions vary with assumptions/parameters/usage fluctuations.”
---
## 10) Uncertainty quantification (usage variability) + survival curve
### Logical progression
1. Define the uncertainty source: **stochastic usage paths** around baseline.
2. Explain OU perturbations and why they are appropriate (mean-reverting behavior).
3. Convert Monte Carlo TTE samples into decision-friendly outputs (CI, percentiles, survival curve).
### Must include (data/evidence)
* **UQ summary**: mean/std/p10/p50/p90 and CI95 for mean.
* **Survival curve table/plot**: S(t)=P(TTE>t) on fixed grid.
* **Reproducibility**: M, seed, θ, σ, dt.
* **Discussion**: what uncertainty means for “unpredictability” (bounded variability, not arbitrary).
---
## 11) Recommendations (user + operating system)
### Logical progression
1. Convert scenario + sensitivity findings into ranked interventions.
2. Provide user-facing recommendations (actions) and OS-facing (policies).
3. Tie each recommendation to a model mechanism and quantified benefit.
### Must include (data/evidence)
* **Ranked recommendation table**:
* Action, mechanism, expected ΔTTE (hours/%), tradeoff.
* Examples you can justify directly from your tables:
* Improve signal conditions / switch network modes in poor signal (largest loss case).
* Reduce brightness and CPU load (largest gains in ablations; aligns with Sobol ranking).
* Cold-weather mitigation: thermal management / conservative power mode to avoid V_cut early.
* Explicitly connect to COMAPs recommendation prompt.
---
## 12) Model validation, limitations, and extensions
### Logical progression
1. Validation checks you performed (numerical + physical).
2. Where the model performs well vs poorly (conditions).
3. Extensions that preserve continuous-time, mechanistic nature.
### Must include (data/evidence)
* **Validation evidence**
* Dimensional consistency checklist (units).
* Monotonicity dz/dt ≤ 0 for I ≥ 0.
* Step-halving pass + event stability report.
* **Limitations**
* Parameter realism (if synthetic) and what data would tighten it.
* Single-node thermal; simplified CPU/network power mapping; SOH dynamics negligible in single discharge.
* **Extensions**
* Multi-cycle SOH (SEI-inspired) already proposed in your model narrative as an upgrade path.
* Multi-node thermal / OS control loops / adaptive power caps (still continuous-time).
---
## 13) References + AI Use Report
### Must include
* Proper citations for any literature/specs used for parameters and for OCV/ECM modeling (your BibTeX draft is a good start).
* COMAP-required **AI Use Report** appended (doesnt count toward 25 pages).
---
### If you want a “no-miss” checklist
I can turn the above into a **page-by-page outline** (25-page cap aware) with:
* exact figure placements,
* exact table placements,
* and paragraph-level “claim → evidence → implication” bullets for each subsection.
{
"model_name": "MODEL_SPEC",
"version": "1.0",
"status": "frozen",
"states": [
{ "name": "z", "unit": "dimensionless", "bounds": [0, 1], "description": "State of Charge" },
{ "name": "v_p", "unit": "V", "bounds": [null, null], "description": "Polarization voltage" },
{ "name": "T_b", "unit": "K", "bounds": [0, null], "description": "Battery temperature" },
{ "name": "S", "unit": "dimensionless", "bounds": [0, 1], "description": "State of Health" },
{ "name": "w", "unit": "dimensionless", "bounds": [0, 1], "description": "Radio tail activation level" }
],
"inputs": [
{ "name": "L", "unit": "dimensionless", "bounds": [0, 1], "description": "Screen brightness" },
{ "name": "C", "unit": "dimensionless", "bounds": [0, 1], "description": "Processor load" },
{ "name": "N", "unit": "dimensionless", "bounds": [0, 1], "description": "Network activity" },
{ "name": "Ψ", "unit": "dimensionless", "bounds": [0, 1], "description": "Signal quality" },
{ "name": "T_a", "unit": "K", "bounds": [null, null], "description": "Ambient temperature" }
],
"parameters": [
{ "name": "P_bg", "unit": "W", "description": "Background power" },
{ "name": "P_scr0", "unit": "W", "description": "Screen baseline power" },
{ "name": "k_L", "unit": "W", "description": "Screen scaling coefficient" },
{ "name": "gamma", "unit": "dimensionless", "description": "Screen power exponent" },
{ "name": "P_cpu0", "unit": "W", "description": "CPU baseline power" },
{ "name": "k_C", "unit": "W", "description": "CPU scaling coefficient" },
{ "name": "eta", "unit": "dimensionless", "description": "CPU power exponent" },
{ "name": "P_net0", "unit": "W", "description": "Network baseline power" },
{ "name": "k_N", "unit": "W", "description": "Network scaling coefficient" },
{ "name": "epsilon", "unit": "dimensionless", "description": "Signal guard constant" },
{ "name": "kappa", "unit": "dimensionless", "description": "Signal penalty exponent" },
{ "name": "k_tail", "unit": "W", "description": "Radio tail power coefficient" },
{ "name": "tau_up", "unit": "s", "description": "Radio activation time constant" },
{ "name": "tau_down", "unit": "s", "description": "Radio decay time constant" },
{ "name": "C1", "unit": "F", "description": "Polarization capacitance" },
{ "name": "R1", "unit": "Ohm", "description": "Polarization resistance" },
{ "name": "hA", "unit": "W/K", "description": "Convective heat transfer coefficient" },
{ "name": "C_th", "unit": "J/K", "description": "Thermal capacitance" },
{ "name": "E0", "unit": "V", "description": "Standard potential" },
{ "name": "K", "unit": "V", "description": "Polarization constant" },
{ "name": "A", "unit": "V", "description": "Exponential zone amplitude" },
{ "name": "B", "unit": "dimensionless", "description": "Exponential zone time constant" },
{ "name": "R_ref", "unit": "Ohm", "description": "Reference internal resistance" },
{ "name": "E_a", "unit": "J/mol", "description": "Activation energy" },
{ "name": "R_g", "unit": "J/(mol*K)", "description": "Gas constant" },
{ "name": "T_ref", "unit": "K", "description": "Reference temperature" },
{ "name": "eta_R", "unit": "dimensionless", "description": "Aging resistance factor" },
{ "name": "Q_nom", "unit": "Ah", "description": "Nominal capacity" },
{ "name": "alpha_Q", "unit": "1/K", "description": "Temperature capacity coefficient" },
{ "name": "V_cut", "unit": "V", "description": "Cutoff voltage" },
{ "name": "z_min", "unit": "dimensionless", "description": "SOC singularity guard" },
{ "name": "Q_eff_floor", "unit": "Ah", "description": "Minimum capacity floor" }
],
"equations": [
"P_scr = P_scr0 + k_L * L^gamma",
"P_cpu = P_cpu0 + k_C * C^eta",
"P_net = P_net0 + k_N * N / (Ψ + epsilon)^kappa + k_tail * w",
"P_tot = P_bg + P_scr + P_cpu + P_net",
"z_eff = max(z, z_min)",
"V_oc = E0 - K * (1/z_eff - 1) + A * exp(-B * (1 - z))",
"R0 = R_ref * exp((E_a / R_g) * (1/T_b - 1/T_ref)) * (1 + eta_R * (1 - S))",
"Q_eff = max(Q_nom * S * (1 - alpha_Q * (T_ref - T_b)), Q_eff_floor)",
"Delta = (V_oc - v_p)^2 - 4 * R0 * P_tot",
"I = (V_oc - v_p - sqrt(Delta)) / (2 * R0)",
"V_term = V_oc - v_p - I * R0",
"dz/dt = -I / (3600 * Q_eff)",
"dv_p/dt = I/C1 - v_p / (R1 * C1)",
"dT_b/dt = (I^2 * R0 + I * v_p - hA * (T_b - T_a)) / C_th",
"sigma_N = min(1, N)",
"tau_N = (sigma_N >= w) ? tau_up : tau_down",
"dw/dt = (sigma_N - w) / tau_N"
],
"guards": {
"z_min": "z_eff = max(z, z_min)",
"Q_eff_floor": "Q_eff = max(Q_calc, Q_eff_floor)",
"clamp_rules": [
"z = clamp(z, 0, 1)",
"S = clamp(S, 0, 1)",
"w = clamp(w, 0, 1)"
]
},
"events": {
"gV": "V_term(t) - V_cut",
"gz": "z(t)",
"gDelta": "Delta(t)",
"termination_logic": "Terminate at t* = min(t | gV(t) <= 0 OR gz(t) <= 0 OR gDelta(t) <= 0)",
"termination_reasons": [
"V_CUTOFF",
"SOC_ZERO",
"DELTA_ZERO"
]
},
"tte_definition": {
"formula": "TTE = t* - t0",
"interpolation": "t* = t_{n-1} + (t_n - t_{n-1}) * (0 - g(t_{n-1})) / (g(t_n) - g(t_{n-1}))",
"tie_breaking": "Earliest t* across all event functions; if identical, priority: DELTA_ZERO > V_CUTOFF > SOC_ZERO"
},
"numerics": {
"method": "RK4_nested_CPL",
"dt_symbol": "dt",
"stage_recompute_current": true
},
"validation": {
"dimension_check": [
"P_tot [W]",
"V_term [V]",
"I [A]",
"dz/dt [1/s]",
"dT_b/dt [K/s]"
],
"monotonicity_check": "If I >= 0, then dz/dt must be <= 0",
"feasibility_check": "Delta must be >= 0; if Delta < 0 at any evaluation, trigger DELTA_ZERO event"
}
}

View File

@@ -0,0 +1,332 @@
Below is an updated **paper blueprint** that cleanly integrates the three gap patches **without breaking your frozen MODEL_SPEC logic** (except the explicit, minimal power-mapping extension for GPS). Ill show **(i) where each patch lands**, **(ii) what each section must now contain**, and **(iii) what new data/evidence is required** so the added content is rigorous (not “text-only fluff”).
---
# Updated Paper Blueprint (with GPS + Monte Carlo UQ + Multi-cycle aging)
## Summary Sheet (1 page)
### Logical progression (updated)
1. Model: continuous-time ODE + CPL closure + **extended power mapping including GPS**.
2. Core outputs: SOC(t), V_term(t), Δ(t), TTE.
3. Key findings:
* Baseline TTE
* **Navigation/GPS drain impact**
* **Uncertainty band** (MC distribution + survival curve)
* **TTE degradation across cycles** (aging trajectory)
4. Recommendations: user + OS + lifecycle-aware battery management.
### Must include (new evidence)
* A **one-line quantification** of GPS impact on TTE (ΔTTE from turning GPS “on” vs “off” in a navigation segment).
* UQ: mean/CI and at least one survival milestone (e.g., 90% survival time).
* Aging: a mini table/plot of TTE vs cycle index (e.g., cycles 0, 50, 100, 200).
---
## 1) Introduction and framing
### Logical progression (updated)
* “Unpredictability” arises from time-varying usage and environment; **navigation/location services** are a common drain source.
* We address both **short-horizon discharge** and **long-horizon degradation**.
* Outline three analyses:
1. Mechanistic model with GPS term
2. Monte Carlo UQ for stochastic usage
3. Multi-cycle aging forecast for TTE decline
### Must include
* Motivation sentence tying GPS to the real-world “navigation drains phone quickly” phenomenon.
* A roadmap paragraph mapping to sections: baseline → scenario drivers (including GPS) → global sensitivity → UQ → aging forecast → recommendations.
---
## 2) Model overview: states/inputs/outputs/assumptions (minor extension)
### What changes
* Add **one new input**: GPS duty variable (G(t)\in[0,1]).
(This is the minimal extension implied by your patch: add (P_{\text{gps}}(G)) to (P_{\text{tot}}).)
### Must include (new items)
* **Table updates**
* Inputs now include (G(t)) (unitless, [0,1], “GPS duty / navigation intensity”)
* Parameters now include (P_{\text{gps},0}), (k_{\text{gps}})
* Assumption: (G(t)) is an externally specified scenario signal (like (L,C,N,\Psi,T_a)), not a new state.
### Evidence required
* A short justification for treating GPS drain as linear in duty cycle (first-order approximation).
* A stated range for (P_{\text{gps},0}), (k_{\text{gps}}) (even if “calibrated / assumed”; must be declared).
---
## 3) Governing equations (PATCH P10 + P11)
### 3.1 Power mapping (UPDATED)
#### Logical progression
1. Screen + CPU + Network + background (existing)
2. **GPS term** added additively
3. Total power drives CPL current through quadratic closure
#### Must include (specific equations)
* Replace total power line exactly as patch indicates:
[
P_{\mathrm{tot}}(t)=P_{\mathrm{bg}}+P_{\mathrm{scr}}(L)+P_{\mathrm{cpu}}(C)+P_{\mathrm{net}}(N,\Psi,w)+P_{\mathrm{gps}}(G).
]
* GPS submodel (BLOCK_A):
[
P_{\mathrm{gps}}(G) = P_{\mathrm{gps},0}+k_{\mathrm{gps}},G(t).
]
#### Evidence/data required to make this rigorous
* Provide either:
* (Preferred) a citation/value range from a source (your placeholder [REF-GPS-POWER]) **or**
* (If no citation) a **calibration protocol**: “Set (P_{\text{gps},0},k_{\text{gps}}) so that navigation scenario reproduces observed drain factor X,” and report the chosen values.
### 3.23.5 Constitutive + CPL + ODEs (unchanged)
* No new dynamics are needed; GPS affects (P_{\text{tot}}) only.
---
## 4) Time-to-Empty (TTE) and event logic (unchanged structure, stronger interpretation)
### Logical progression (unchanged)
* Event functions (g_V,g_z,g_\Delta)
* earliest crossing via interpolation
* termination reason recorded
### New content to add (one paragraph)
* Explain how GPS affects TTE *indirectly*:
* (G(t)\uparrow \Rightarrow P_{\text{tot}}\uparrow \Rightarrow I\uparrow) via CPL, accelerating SOC decay and potentially increasing the risk of Δ collapse / voltage cutoff earlier.
### Evidence required
* A navigation/GPS scenario result showing:
* higher avg (P_{\text{tot}}), higher max (I), and reduced TTE relative to baseline.
---
## 5) Parameterization and data support (must now include GPS + aging-law parameters)
### Logical progression (expanded)
1. Parameter groups: power mapping, battery ECM, thermal, radio tail
2. **GPS parameters** included in power mapping
3. **Aging parameters** (from Section 3.5 SOH law) clearly listed and sourced/assumed
4. Plausibility checks (energy, bounds, monotonicity)
### Must include (new items)
* GPS parameter table entries: (P_{\text{gps},0},k_{\text{gps}})
* Aging-law parameter table entries (whatever Section 3.5 uses; must be explicit)
* Clear labeling:
* “Measured / literature”
* “Calibrated”
* “Assumed for demonstration”
### Evidence required
* For aging: at least one **reference point** like “capacity drops to 80% after N cycles” OR cite your [REF-LIION-AGING].
* If no empirical anchor, you must add a limitation note: aging trajectory is qualitative.
---
## 6) Numerical method and reproducibility (minor add)
### Logical progression
* RK4 nested CPL unchanged.
* Add that (G(t)) is treated identically to other inputs in scenario function.
### Must include
* Updated trajectory column list to include:
* (G(t)) and (P_{\text{gps}}(t)) (optional but recommended for clarity)
* Reproducibility: seed fixed for MC; dt fixed; step-halving.
---
## 7) Baseline results (update: add one GPS/navigation stress baseline)
### Logical progression (updated)
1. Baseline scenario plots and TTE table (existing)
2. **Navigation with GPS “high duty”** as an extended baseline variant
3. Compare TTE and identify mechanism (P_tot, I, Δ)
### Must include (new evidence)
* A small 2-row comparison:
* Baseline (G=0 or low)
* Navigation/GPS-active (G high during navigation segment)
* Plot overlay or table:
* ΔTTE, avg (P_{\text{tot}}), avg (P_{\text{gps}})
---
## 8) Scenario analysis: drivers of rapid drain (expand the matrix to include GPS)
### Logical progression (updated)
* The scenario matrix should now include a GPS-focused scenario explicitly.
### Must include
* Add scenario like:
* **S8: “Navigation + GPS high duty”** (or fold into your existing navigation_poor_signal segment by setting G(t)=1 there)
* Keep the ranking output but ensure GPS is represented in driver comparisons.
### Evidence required
* Quantified ΔTTE for GPS scenario.
* Mechanistic signature entries include avg (P_{\text{gps}}) and show how it shifts current draw.
---
## 9) Sensitivity analysis (optional: include GPS parameters)
### Logical progression
* Your current Sobol set is fine; but the blueprint should specify a choice:
* Either keep the 6-parameter set unchanged **or**
* Replace the weakest contributor with (k_{\text{gps}}) to test GPS importance.
### Must include (if you include GPS)
* Ranges for (k_{\text{gps}}) and/or (P_{\text{gps},0}) (±20% around baseline).
* Updated ranking interpretation: whether GPS is a primary driver *in navigation-dominant regimes*.
---
## 10) Uncertainty Quantification (PATCH P12: MC is now required, not optional)
### Logical progression (updated)
10.1 Define uncertainty source (usage variability)
10.2 Deterministic solver stability/step-halving (existing)
10.3 **Monte Carlo UQ** (BLOCK_B)
10.4 Survival curve and uncertainty reporting
### Must include (new “hard” components)
* MC method statement:
* number of paths (M=300)
* perturbation model (OU on L,C,N; optionally also N/Ψ/G if you want)
* fixed seed
* Outputs:
* mean TTE, CI, p10/p50/p90, survival curve (P(\text{TTE}>t))
### Evidence required
* UQ summary table + survival curve plot/table.
* A brief comparison: deterministic baseline TTE vs MC mean vs percentile spread (to interpret “unpredictable”).
---
## 11) Multi-cycle aging and lifespan TTE forecasting (PATCH P13)
### Logical progression
1. Explain time-scale separation: discharge seconds vs aging days.
2. Define outer-loop over cycles (j).
3. At each cycle: run discharge simulation → compute throughput → update SOH → update (R_0,Q_{\text{eff}}) → next cycle.
4. Produce TTE degradation trajectory.
### Must include (new evidence)
* A formal algorithm box for the outer loop (BLOCK_C).
* Define (Q_{\text{thr},j}=\int |I(t)|,dt) and how it drives your SOH update (must reference Section 3.5 law).
* A plot/table:
* cycle index (j) vs (S_j) and TTE(_j)
* Interpretation:
* explain why TTE declines (capacity loss + resistance increase).
### Evidence required
* Explicit SOH update equation (from your Section 3.5).
* At least one aging reference anchor (or clearly marked as “illustrative”).
---
## 12) Recommendations (updated: add GPS + lifecycle-aware policy)
### Logical progression
* Convert scenario rankings + Sobol + UQ + aging forecast into actions.
### Must include (new recommendation types)
* **GPS/location service policy**:
* adaptive duty-cycling, batching location updates, “navigation mode” warnings
* quantify expected gain using your GPS scenario ΔTTE
* **Lifecycle-aware** recommendations:
* as S declines, OS should lower peak power demands to avoid V_cut/Δ collapse earlier
* user guidance: avoid high-drain use in cold/poor signal when battery aged
### Evidence required
* Each recommendation must cite a model result:
* “This action targets parameter/driver X and yields ΔTTE ≈ Y in scenario tests.”
---
## 13) Validation, limitations, and extensions (expanded)
### Must include (new limitation + validation points)
* GPS model limitation: linear duty approximation; could refine with acquisition bursts.
* Aging limitation: if no calibrated dataset, trajectory is qualitative.
* UQ limitation: OU is a stylized model; could use empirical traces.
### Validation evidence (additions)
* Show GPS inclusion doesnt break:
* unit checks, Δ feasibility checks, step-halving convergence.
---
# What you should update in your appendix/tables (minimum edits)
1. **Variable table**: add (G(t)).
2. **Parameter table**: add (P_{\text{gps},0},k_{\text{gps}}) + aging-law parameters.
3. **Scenario matrix**: add one GPS-heavy scenario (navigation).
4. **Results**:
* Baseline + GPS variant TTE comparison
* MC summary + survival curve
* Multi-cycle TTE vs cycle plot/table
---
If you paste your current section headings (or your LaTeX/Word outline), I can produce a **“diff-style” outline**: exact headings to add/renumber, and exactly which existing paragraphs need one new sentence vs a full new subsection.