VDI PHASE SLOPE DISCRIMINATION PROCESS
Multi-Frequency Analysis for Metal Target Identification
STEP 1: INPUT - Multi-Frequency IQ Analysis
Multi-Tone IQ Demodulation
(1-24 frequencies, 1000-20000 Hz)
For each frequency:
• Amplitude (signal strength)
• Phase (degrees)
• I/Q components
VDICalculator.kt:53 - calculateVDI(analysis: List<ToneAnalysis>)
STEP 2: PHASE SLOPE CALCULATION
Phase Slope Formula:

phaseSlope = (phase_highest_freq - phase_lowest_freq) / (freq_diff / 1000)

Units: degrees per kHz
VDICalculator.kt:84 - calculatePhaseSlope()

FERROUS Example (Iron Nail)

Phase vs Frequency
Frequency (kHz)
Phase (°)
Phase Slope: -8.5 deg/kHz
Freq: 1 kHz → Phase: +30°
Freq: 20 kHz → Phase: -130°
Slope = (-130 - 30) / 19 = -8.4 deg/kHz

NON-FERROUS Example (Copper Coin)

Phase vs Frequency
Frequency (kHz)
Phase (°)
Phase Slope: -0.5 deg/kHz
Freq: 1 kHz → Phase: +10°
Freq: 20 kHz → Phase: +0°
Slope = (0 - 10) / 19 = -0.5 deg/kHz
STEP 3: CONDUCTIVITY INDEX CALCULATION
Conductivity Index Formula:

lowFreqAmp = average(first 1/3 of frequencies)
highFreqAmp = average(last 1/3 of frequencies)

conductivityIndex = (highFreqAmp / lowFreqAmp) / 2.0

Range: 0.0 (low conductor) to 1.0 (high conductor)
VDICalculator.kt:101 - calculateConductivityIndex()

Physical Basis: High conductivity metals (copper, silver) respond well to high frequencies. Low conductivity metals (aluminum foil, iron) attenuate at high frequencies.

STEP 4: PHASE CONSISTENCY CHECK
Phase Consistency Formula:

stdDev = standard_deviation(all phase measurements)
consistency = 1.0 - (stdDev / 90°)

Range: 0.0 (inconsistent/noisy) to 1.0 (very consistent)
VDICalculator.kt:122 - calculatePhaseConsistency()

Purpose: Measure confidence in the reading. Solid single targets have consistent phase. Multiple objects, ground minerals, or noise create inconsistent phase readings.

STEP 5: RAW VDI CALCULATION
Phase Slope < 0?
(Ferrous)
↓ YES
normalizedSlope = phaseSlope / -10.0
(clamp 0.0 to 1.0)

VDI = 30 × (1 - normalizedSlope)

Range: 0-30 VDI
Phase Slope ≥ 0?
(Non-Ferrous)
↓ YES
Use conductivityIndex

VDI = 30 + (conductivityIndex × 69)

Range: 30-99 VDI
Amplitude Adjustment
Strong signal (>0.5): +5 VDI
Weak signal (<0.1): -5 VDI
VDICalculator.kt:140 - calculateRawVDI()
STEP 6: VDI SCALE & TARGET CLASSIFICATION
0
30
45
50
65
70
99
FERROUS
LOW CONDUCTOR
GOLD RANGE
HIGH CONDUCTOR
VDI Range Target Type Phase Slope Examples
0-30 FERROUS < -3.0 deg/kHz Iron, steel, nails, bottle caps
31-45 LOW CONDUCTOR -3.0 to 0 deg/kHz Aluminum foil, small aluminum pieces
46-65 MID CONDUCTOR ~0 deg/kHz Pull tabs, brass, zinc pennies
50-70 GOLD RANGE -1 to +1 deg/kHz Gold jewelry, rings, chains
70-99 HIGH CONDUCTOR ~0 to +1 deg/kHz Copper coins, silver, large targets
VDICalculator.kt:174 - classifyTarget()
STEP 7: CONFIDENCE CALCULATION
Confidence Score Formula:

amplitudeScore = clamp(avgAmplitude, 0.0, 1.0)
confidence = (amplitudeScore × 0.3) + (phaseConsistency × 0.7)

Range: 0.0 to 1.0
• 0.8-1.0: High confidence
• 0.5-0.8: Medium confidence
• 0.3-0.5: Low confidence
• 0.0-0.3: Very low (returns UNKNOWN)
VDICalculator.kt:197 - calculateConfidence()

Note: Phase consistency is weighted 70% because it's the most reliable indicator of a solid, single target versus trash, multiple objects, or ground minerals.

FINAL OUTPUT: VDIResult
VDIResult Data Class
Output Structure:

• vdi: Int (0-99)
• confidence: Double (0.0-1.0)
• targetType: TargetType enum
• phaseSlope: Double (deg/kHz)
• conductivityIndex: Double (0.0-1.0)

Example Output: Iron Nail

VDI: 12
Confidence: 0.85 (High)
Type: FERROUS
Phase Slope: -8.5 deg/kHz
Conductivity: 0.15
Description: "Ferrous (Iron/Steel) | Confidence: High"

Example Output: Copper Penny

VDI: 78
Confidence: 0.92 (High)
Type: HIGH_CONDUCTOR
Phase Slope: -0.5 deg/kHz
Conductivity: 0.85
Description: "High Conductor (Cu/Ag) | Confidence: High"
KEY PHYSICS INSIGHTS

Why Phase Slope Discriminates Metals:

Why Multi-Frequency Analysis Works: