emikit: ground-bounce CM estimator + Montrose envelope + cable CLI#50
Open
UnsignedChad wants to merge 2 commits into
Open
emikit: ground-bounce CM estimator + Montrose envelope + cable CLI#50UnsignedChad wants to merge 2 commits into
UnsignedChad wants to merge 2 commits into
Conversation
three things rolled together because they all needed to land for the estimator-driven TI re-validation to come out right. 1. CableCommonMode gets a Hockanson-1996 estimator that derives I_cm from the signal current spectrum and a user-supplied ground-return partial inductance. ratio is frequency-independent in the relevant band -- the omega in V_gb cancels the omega in cable Z_cm. 2. Spectrum gets the Montrose envelope. the existing trapezoidal sinc has deep nulls at integer f*tau that the EMI receivers chamber data come from do not actually see -- their IF bandwidth catches multiple harmonics close-in and real signals have edge jitter that fills the nulls. BoardAnalysis switched to envelope_sweep -- the right thing for pre-compliance prediction. 3. AnalysisConfig now has a cables vector. analyze_board sums loop + per-cable CM contributions in power per frequency. CLI exposes the relevant flags: --cable-length-cm, --ground-inductance-nh, --cable-cm-uh-per-m, --cable-cm-ua. TI re-validation with the estimator (L_gnd=15 nH, no per-test tuning): Test 1: gap -3.0 dB Test 2: gap -7.1 dB Test 3: gap -17.4 dB tests 1 and 2 within pre-compliance tolerance. test 3 is honest residual -- same SCLK as test 1 but 17 dB more chamber emission from higher sample-rate activity that the single-trace model cannot see. documented in VALIDATION.md as a known limitation. 20 new assertions across cable_cm_test and analysis_test. 114 total in the emikit suite.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #42. Three things landed together because they all had to be in for the TI re-validation to come out right.
1. Ground-bounce CM current estimator
CableSpecgainsground_inductance_handcable_cm_inductance_per_m_h.estimate_cm_current(cable, signal_spectrum)derives I_cm via the Hockanson 1996 model:The omega in V_gb cancels the omega in cable Z_cm so the ratio is frequency-independent in the band of interest. Explicit
cm_current_astill wins if set.2. Montrose envelope spectrum
The existing
harmonic_magnitudelands on the exact sinc curve, which has deep nulls at integer f*tau. Real chambers don't see those nulls -- EMI receivers integrate over their IF bandwidth and real signals have edge jitter. Addedenvelope_magnitudeandenvelope_sweepthat follow the Bode-style two-corner envelope:analyze_boardnow usesenvelope_sweep. This is the standard pre-compliance form (Montrose Ch 5).3. Cables in AnalysisConfig + CLI
AnalysisConfig::cablesis a new vector.analyze_boardpower-sums loop + cable contributions per frequency, returns per-cable diagnostic inAnalysisResult::cables. CLI gains--cable-length-cm,--ground-inductance-nh,--cable-cm-uh-per-m,--cable-cm-ua.TI re-validation -- new numbers
Same fixture (30 mm SCLK over 0.2 mm GND, 6 mA / 2 ns CMOS) plus:
Tests 1 and 2 within pre-compliance tolerance. Test 3 is the honest residual -- same SCLK as Test 1 but 17 dB more chamber emission because of higher sample-rate activity. The single-trace continuous-clock model doesn't see that. Documented as a known limitation in VALIDATION.md.
tests:
114 assertions / 44 cases. 20 new across
cable_cm_test.cpp(estimator math + TI working point) andanalysis_test.cpp(cable wired into BoardAnalysis, mixed loop+cable verdict, cable-only NoData semantics).Known follow-ups