--- id: opt-05 title: "Direct Power Measurement Method" section: "Optimization & Simulation" difficulty: "intermediate" estimated_time: 25 prerequisites: ["opt-04", "opt-01"] objectives: - Understand the direct measurement alternative to Thévenin - Set up simulations for direct power measurement - Extract spark resistance through power optimization - Compare advantages and disadvantages of each method tags: ["power-measurement", "simulation", "optimization", "methodology"] --- # Direct Power Measurement Method While the Thévenin equivalent method is powerful and elegant, there's an alternative approach: directly measure power delivered to the spark in a full simulation. Each method has advantages and trade-offs. ## The Direct Measurement Approach ### Concept Instead of extracting a simplified equivalent circuit, keep the **full coupled model** with the spark load present and directly measure power flow. **Setup:** 1. Build complete simulation (primary, secondary, coupling, spark load) 2. Drive primary at operating frequency and amplitude 3. Run AC analysis (or transient with post-processing) 4. Measure power dissipated in spark resistance 5. Repeat for different spark resistance values **Goal:** Find the spark resistance R that maximizes measured power ### Procedure **Step 1: Build Full Model** - Primary tank circuit (L_primary, C_MMC) - Secondary coil (distributed or lumped model) - Topload capacitance - Magnetic coupling k - **Spark load** modeled as R||C_mut in series with C_sh **Step 2: Set Operating Point** - Drive frequency: f_drive (initially at unloaded resonance) - Drive amplitude: V_drive or I_drive - Spark parameters: Choose initial R, C_mut, C_sh **Step 3: Run AC Analysis** - Solve circuit at drive frequency - Extract voltage and current at spark resistor - Calculate power: P = 0.5 × Re{V_spark × I_spark*} Or more directly: ``` P = 0.5 × |I_R|² × R where I_R is current through the resistance R ``` **Step 4: Sweep R Values** - Vary R from 10 kΩ to 200 kΩ (typical range) - For each R, measure P - Plot P vs R - Find R that gives maximum P → this is R_opt_power **Step 5: Validate** - Compare numerical R_opt_power to analytical formula - Check that it matches: R_opt = 1/[ω(C_mut + C_sh)] ## Power Measurement in SPICE ### Method 1: Using Current Through Resistor ``` .param Rspark = 50k Rspark topload node2 {Rspark} Cmut node2 0 8p Csh topload 0 6p .ac lin 1 185k 185k .step param Rspark list 10k 30k 50k 70k 100k 150k .meas ac Ispark_mag find mag(I(Rspark)) .meas ac Pspark param '0.5 * Ispark_mag^2 * Rspark' ``` This sweeps Rspark and calculates power for each value. ### Method 2: Direct Power Function Some SPICE variants support direct power measurement: ``` .meas ac Pspark_real find Re(V(topload)*conj(I(Rspark))) ``` This directly computes complex power and extracts the real part. ### Method 3: Voltage and Current ``` .meas ac Vtop_mag find mag(V(topload)) .meas ac Ispark_mag find mag(I(Rspark)) .meas ac phase_diff param 'ph(V(topload)) - ph(I(Rspark))' .meas ac Pspark param '0.5 * Vtop_mag * Ispark_mag * cos(phase_diff)' ``` This accounts for phase difference in power calculation. ## Worked Example: Direct Optimization **Given:** - DRSSTC simulation at f = 185 kHz - Primary drive: V_drive produces V_top ≈ 350 kV (unloaded) - Spark model: C_mut = 8 pF, C_sh = 6 pF, R = variable **Goal:** Find R_opt_power ### Analytical Prediction First, predict what we should find: ``` C_total = C_mut + C_sh = 8 + 6 = 14 pF ω = 2π × 185×10³ = 1.162×10⁶ rad/s R_opt_power = 1/(ωC_total) = 1/(1.162×10⁶ × 14×10⁻¹²) = 61.5 kΩ ``` We expect maximum power near 61.5 kΩ. ### Simulation Sweep **Run AC analysis with R values:** - R = 20 kΩ → P = 85 kW - R = 40 kΩ → P = 115 kW - R = 60 kΩ → P = 125 kW ← **Maximum** - R = 80 kΩ → P = 118 kW - R = 100 kΩ → P = 105 kW **Result:** Maximum power at R ≈ 60 kΩ **Validation:** Simulation (60 kΩ) matches theory (61.5 kΩ) within rounding! ## Advantages of Direct Measurement ### 1. No Approximations - Full coupled model captures all interactions - No linearization assumptions - Includes all nonlinear effects (if using transient analysis) ### 2. Intuitive - Directly see what you care about: power to spark - No intermediate steps - Easy to visualize results ### 3. Flexibility - Can use any circuit simulator - Works with complex topologies - Easy to add additional elements (damping, protection, etc.) ### 4. Transient Capability - Can extend to time-domain (transient) analysis - Capture burst mode, ramping, dynamics - See energy transfer over time ## Disadvantages of Direct Measurement ### 1. Computational Cost - Must re-run full simulation for each R value - Sweep of 20 points = 20 full simulations - Slow for large parameter spaces ### 2. Limited Insight - Doesn't reveal underlying equivalent circuit - Harder to understand why maximum occurs where it does - Less portable to different load types ### 3. Frequency Coupling - Operating frequency may need adjustment for each R (see next lesson!) - Fixed-frequency comparison can be misleading - Must account for resonance shift ### 4. Sensitivity to Setup - Results depend on drive amplitude, frequency, damping - Harder to isolate spark effects from system effects ## Comparison: Thévenin vs Direct | Aspect | Thévenin Method | Direct Method | |--------|----------------|---------------| | **Speed** | Fast (single extraction + algebra) | Slow (simulation per R value) | | **Insight** | High (reveals equivalent circuit) | Moderate | | **Accuracy** | Excellent (if linear) | Excellent (includes nonlinearities) | | **Flexibility** | Any load instantly | One load per simulation | | **Complexity** | Requires understanding of method | Straightforward | | **Best for** | Sweeps, optimization, understanding | Validation, nonlinear cases | ## When to Use Each Method ### Use Thévenin When: - Exploring many different load configurations - Optimizing spark parameters - Building intuition about matching - Preparing design curves - Speed is important ### Use Direct Measurement When: - Validating Thévenin results - Dealing with significant nonlinearities - Need transient/time-domain behavior - Checking specific operating points - Learning circuit behavior ### Best Practice: Use Both 1. **Start with Thévenin:** Fast exploration, find optimal regions 2. **Validate with Direct:** Confirm key points, check assumptions 3. **Iterate:** If discrepancies exist, understand why ## Accounting for Displacement Currents Both methods can fall victim to the "I_base error" discussed in Module 2.4. ### The Problem **Wrong:** Measuring total current returning through secondary base **Right:** Measuring current specifically through spark resistance ### Why It Matters Total base current includes: - Spark current (what we want) - Displacement currents from secondary to ground - Coupling currents to primary - Environmental coupling **In SPICE:** This isn't usually a problem because you can measure specific branch currents. Use I(Rspark) not I(V_secondary_base). **In physical measurements:** You must use current probes on the spark return path, not the coil base. ## Implementation Tips ### Tip 1: Automate Sweeps Use SPICE .STEP or scripting: ``` .step param Rspark 10k 200k 5k ``` This automatically sweeps from 10 kΩ to 200 kΩ in 5 kΩ steps. ### Tip 2: Log Scale for Wide Ranges Spark resistance varies over decades (10 kΩ to 1 MΩ). Use logarithmic stepping: ``` .step param Rspark list 10k 20k 50k 100k 200k 500k ``` ### Tip 3: Extract Peak Directly Use .MEAS to find maximum automatically: ``` .meas ac Pmax MAX Pspark .meas ac Ropt WHEN Pspark=Pmax ``` ### Tip 4: Verify Power Components Separately measure real and reactive power: ``` P_real = Re{V × I*} Q_reactive = Im{V × I*} S_apparent = |V × I*| ``` Check that Q >> P (highly reactive, as expected). ## Key Takeaways - **Direct measurement:** Keep full model, measure power in spark, sweep R - **Advantages:** Intuitive, no approximations, handles nonlinearity - **Disadvantages:** Slow, less insight, multiple simulations required - **Power formula:** P = 0.5 × |I_R|² × R or P = 0.5 × Re{V × I*} - **Find R_opt:** Sweep R, plot P vs R, identify maximum - **Validation:** Should match analytical R_opt = 1/[ω(C_mut + C_sh)] - **Best practice:** Use Thévenin for exploration, direct measurement for validation - **Beware:** Measure spark current, not base current (displacement current issue) ## Practice {exercise:opt-ex-05} **Problem 1:** You run simulations with the following results: | R (kΩ) | P (kW) | |--------|--------| | 30 | 92 | | 50 | 118 | | 70 | 128 | | 90 | 125 | | 110 | 115 | (a) Estimate R_opt_power from this data (b) If C_total = 12 pF and f = 200 kHz, what does theory predict? (c) Do they match? **Problem 2:** A simulation reports I_R = 2.1 A (peak) through R = 55 kΩ. Calculate the power dissipated. **Problem 3:** You measure V_topload = 340 kV ∠0° and I_spark = 1.8 A ∠-72°. (a) Calculate apparent power S = V × I* (b) Extract real power P = Re{S} (c) Extract reactive power Q = Im{S} (d) Is the spark more resistive or reactive? **Problem 4:** List two scenarios where direct measurement would be preferred over Thévenin extraction. **Problem 5:** Why is it important to measure I(Rspark) rather than I(V_secondary_base) when calculating power? Sketch the circuit showing both current paths. --- **Next Lesson:** [Frequency Tracking and Loaded Poles](06-frequency-tracking.md)