Skip to content

Latest commit

 

History

History
421 lines (329 loc) · 15.4 KB

File metadata and controls

421 lines (329 loc) · 15.4 KB

PD180 Mode - Technical Specification

Overview

PD180 is a high-quality SSTV mode that prioritizes image fidelity over transmission speed. Like PD120, it uses a dual-luminance encoding where each scan line produces two pixel rows. The format transmits Y-even, V-avg, U-avg, and Y-odd components (4 channels per scan line), with shared chrominance between the two rows. PD180 provides 50% longer pixel dwell time than PD120 (286µs vs 190µs per pixel), resulting in better signal-to-noise ratio and higher image quality at the cost of longer transmission time.

Image Specifications

Parameter Value
Resolution 640×496 pixels
Aspect Ratio ~1.29:1 (approximately 4:3)
Scan Lines 248 (each produces 2 pixel rows)
Pixel Rows 496 total (248 × 2)
Scan Line Time ~751.68ms per scan line
Total Duration ~3 minutes 6 seconds (186 seconds)
VIS Code 96
Pixel Dwell Time 286µs per pixel (50% longer than PD120)

Frequency Mapping

Signal Frequency Purpose
Sync Pulse 1200 Hz Line boundary marker (20ms)
Black Level 1500 Hz Minimum brightness
Gray Level 1900 Hz Center frequency
White Level 2300 Hz Maximum brightness

Frequency Range: 800 Hz (1500-2300 Hz) represents 0-255 pixel values

Scan Line Structure

Total: 751.68ms per scan line (produces 2 pixel rows)

|--20ms--|--2.08ms--|------182.4ms------|------182.4ms------|------182.4ms------|------182.4ms------|
  Sync    S.Porch    Y-even (Luma)       V-avg (R-Y)         U-avg (B-Y)         Y-odd (Luma)
 1200Hz   1500Hz     640 pixels          640 pixels          640 pixels          640 pixels
                     1500-2300Hz         1500-2300Hz         1500-2300Hz         1500-2300Hz

                     ↓                   ↓         ↓         ↓
                     Row 0               └─────────┴─────────┘  Shared chroma
                     Row 1               Row 0 & Row 1 use same V-avg & U-avg

Pixel dwell time: 182.4ms ÷ 640 pixels = 285µs per pixel

Timing Breakdown

  1. Sync Pulse: 20ms @ 1200 Hz

    • Purpose: Scan line boundary detection
    • Same as PD120 (distinguishes PD modes from Robot36)
    • Longer sync allows better reliability at weak signal levels
  2. Sync Porch: 2.08ms @ 1500 Hz

    • Purpose: Transition period after sync
    • Stabilization time for receiver
    • Same as PD120
  3. Y-even Channel (Even Row Luminance): 182.4ms

    • 640 pixels of brightness information for first pixel row
    • Frequency range: 1500-2300 Hz (black to white)
    • 50% longer than PD120 (182.4ms vs 121.6ms)
    • Pixel dwell time: 285µs (vs 190µs in PD120)
  4. V-avg Channel (Red Difference, Averaged): 182.4ms

    • 640 pixels of V (R-Y) color difference
    • Shared between both even and odd rows
    • Centered at 128 (1900 Hz)
    • Longer dwell time improves color accuracy
  5. U-avg Channel (Blue Difference, Averaged): 182.4ms

    • 640 pixels of U (B-Y) color difference
    • Shared between both even and odd rows
    • Centered at 128 (1900 Hz)
    • Better SNR in chroma channels
  6. Y-odd Channel (Odd Row Luminance): 182.4ms

    • 640 pixels of brightness information for second pixel row
    • Frequency range: 1500-2300 Hz (black to white)
    • Uses same V-avg and U-avg as Y-even for color

Color Encoding: Dual-Luminance with Shared Chroma

PD180 uses the identical dual-luminance structure as PD120, but with longer pixel times for improved quality.

Dual-Luminance Strategy

Scan Line 0: Y-even₀[640] + V-avg₀[640] + U-avg₀[640] + Y-odd₀[640]  → Row 0 & Row 1
Scan Line 1: Y-even₁[640] + V-avg₁[640] + U-avg₁[640] + Y-odd₁[640]  → Row 2 & Row 3
Scan Line 2: Y-even₂[640] + V-avg₂[640] + U-avg₂[640] + Y-odd₂[640]  → Row 4 & Row 5
...
Scan Line 247: Y-even₂₄₇[640] + V-avg₂₄₇[640] + U-avg₂₄₇[640] + Y-odd₂₄₇[640]  → Row 494 & Row 495

Key Insight: Each scan line produces TWO pixel rows:

  • Row N (even): Uses Y-even + V-avg + U-avg
  • Row N+1 (odd): Uses Y-odd + V-avg + U-avg (same chroma)

Total: 248 scan lines × 2 rows = 496 pixel rows

Advantages of PD180 over PD120

  1. Higher SNR: 50% longer pixel time improves signal-to-noise ratio
  2. Better color accuracy: Longer chroma sampling reduces color noise
  3. Improved fine detail: More stable frequency measurement per pixel
  4. Less sensitivity to fading: Longer averaging window reduces flutter
  5. Cleaner gradients: Better horizontal low-pass filtering characteristics

Disadvantages

  1. Longer transmission time: ~3 minutes vs ~2 minutes for PD120
  2. Less forgiving of Doppler shift: Longer pixel times amplify frequency drift
  3. Requires more stable conditions: Longer transmission increases chance of interference
  4. Not suitable for fast QSOs: Better for dedicated image transmission sessions

PD180 vs PD120 Comparison

Feature PD120 PD180 Difference
Pixel Dwell Time 190µs 286µs +50%
Channel Time 121.6ms 182.4ms +50%
Scan Line Time 508ms 752ms +48%
Total Time 126 seconds (2m 6s) 186 seconds (3m 6s) +48%
SNR Improvement Baseline ~1.8 dB better Better in noise
Frequency Resolution ±5 Hz typical ±3 Hz typical More precise
Use Case ISS SSTV (fast passes) Quality images (long passes) Speed vs quality
VIS Code 95 96 Different modes

Mathematical Analysis

SNR Improvement:

SNR_improvement = 10 × log₁₀(T_PD180 / T_PD120)
                = 10 × log₁₀(286µs / 190µs)
                = 10 × log₁₀(1.505)
                = 1.78 dB

The longer pixel dwell time provides approximately 1.8 dB improvement in signal-to-noise ratio, which can be significant when operating near the noise floor.

YUV to RGB Conversion (ITU-R BT.601)

PD180 uses the same color space conversion as PD120 and Robot36:

// Input:
//   Y:  Luminance (0-255)
//   RY: R-Y color difference (0-255, centered at 128)
//   BY: B-Y color difference (0-255, centered at 128)

// Convert to difference signals
const ryDiff = RY - 128;  // -128 to +127
const byDiff = BY - 128;  // -128 to +127

// ITU-R BT.601 conversion
R = Y + 1.402 × ryDiff
G = Y - 0.344136 × byDiff - 0.714136 × ryDiff
B = Y + 1.772 × byDiff

// Clamp to valid range
R = clamp(R, 0, 255)
G = clamp(G, 0, 255)
B = clamp(B, 0, 255)

Signal Processing Pipeline

PD180 uses the same signal processing pipeline as PD120:

1. Sync Detection

  • Monitor for 1200 Hz tone
  • Measure pulse width (must be 20ms ±2ms)
  • Calculate frequency offset for calibration
  • Note: 20ms pulses distinguish PD modes from Robot36 (9ms)

2. Line Extraction

  • Extract audio samples between consecutive sync pulses
  • Should contain ~730ms of audio data (752ms - 20ms sync)
  • Pass to PD180 line decoder

3. Bidirectional Filtering

// Forward pass (left to right)
for (i = yStart; i < endSamples; i++) {
  filtered[i] = EMA.average(samples[i]);
}

// Backward pass (right to left)
EMA.reset();
for (i = endSamples - 1; i >= yStart; i--) {
  filtered[i] = freqToLevel(EMA.average(filtered[i]), freqOffset);
}

4. Channel Sampling

Each channel is sampled at 640 pixels from the 182.4ms duration:

// Sample 640 pixels from 182.4ms Y-even channel
for (x = 0; x < 640; x++) {
  sampleIndex = yEvenStart + (x * channelSamples) / 640;
  Y_even[x] = frequencyToLevel(filtered[sampleIndex]) * 255;
}

// Sample 640 pixels from 182.4ms V-avg channel (R-Y)
for (x = 0; x < 640; x++) {
  sampleIndex = vAvgStart + (x * channelSamples) / 640;
  V_avg[x] = frequencyToLevel(filtered[sampleIndex]) * 255;
}

// Sample 640 pixels from 182.4ms U-avg channel (B-Y)
for (x = 0; x < 640; x++) {
  sampleIndex = uAvgStart + (x * channelSamples) / 640;
  U_avg[x] = frequencyToLevel(filtered[sampleIndex]) * 255;
}

// Sample 640 pixels from 182.4ms Y-odd channel
for (x = 0; x < 640; x++) {
  sampleIndex = yOddStart + (x * channelSamples) / 640;
  Y_odd[x] = frequencyToLevel(filtered[sampleIndex]) * 255;
}

5. RGB Conversion

For each pixel position x (0-639):

// Even row (row 0 of pair)
const yEven = Y_even[x];
const vAvg = V_avg[x];  // R-Y (shared)
const uAvg = U_avg[x];  // B-Y (shared)

const rgbEven = yuv2rgb(yEven, vAvg, uAvg);
pixels[x * 4 + 0] = rgbEven.r;
pixels[x * 4 + 1] = rgbEven.g;
pixels[x * 4 + 2] = rgbEven.b;
pixels[x * 4 + 3] = 255;

// Odd row (row 1 of pair, uses same chroma)
const yOdd = Y_odd[x];
const rgbOdd = yuv2rgb(yOdd, vAvg, uAvg);
pixels[(x + 640) * 4 + 0] = rgbOdd.r;
pixels[(x + 640) * 4 + 1] = rgbOdd.g;
pixels[(x + 640) * 4 + 2] = rgbOdd.b;
pixels[(x + 640) * 4 + 3] = 255;

Implementation Notes

Buffer Size Requirements

PD180 requires larger buffers than PD120 due to longer scan lines:

  • Minimum buffer: 7 seconds (sufficient for 752ms lines + margin)
  • Audio buffer: ~336,000 samples @ 48kHz or ~309,000 @ 44.1kHz
  • Image buffer: 640 × 496 × 4 bytes = 1,269,760 bytes (~1.2 MB)

Sample Rate Handling

  • Supports 44.1 kHz and 48 kHz sample rates
  • All timing calculations scale proportionally
  • Higher sample rate provides better horizontal resolution
  • 48 kHz recommended for PD180 due to longer pixel times

Frequency Calibration

  • Track frequency offset from sync pulse detection
  • Apply offset to all channels (Y-even, V-avg, U-avg, Y-odd)
  • Typical offset: ±50 Hz due to oscillator drift
  • Critical for PD180: Longer pixel times amplify frequency errors

Error Handling

  • Validate line length (should be ~752ms ±5%)
  • Check sync pulse width (must be 20ms, not 9ms)
  • Skip lines with invalid timing
  • Continue decoding even if some lines fail

Performance Characteristics

Metric PD120 PD180
Processing Time ~2 minutes ~3 minutes
Memory Usage ~55 MB ~55 MB (same resolution)
CPU Usage 8-15% (single core) 10-18% (single core)
Minimum SNR 18 dB 16 dB (1.8 dB better)
Data Rate ~4.3 kbps ~2.9 kbps

When to Use PD180

Recommended For:

  • High-quality image transmission where time is available
  • Weak signal conditions where extra SNR helps
  • Fine detail preservation in complex images
  • Long satellite passes with good elevation
  • Dedicated SSTV sessions (not fast QSOs)
  • Recording/playback from audio files
  • Gallery-quality images for awards or display

NOT Recommended For:

  • ISS passes (too long for typical pass duration)
  • Fast mobile operation (takes too long)
  • Poor propagation (longer = more chance of fade)
  • High Doppler environments (frequency drift more significant)
  • Quick QSOs (use PD120 or Robot36 instead)

Common Issues & Solutions

Issue: Image Too Noisy Despite Longer Pixel Time

Cause: Fading or interference during long transmission Solution:

  • Verify stable signal for full 3+ minute duration
  • Check for multipath propagation
  • Increase audio gain if signal is very weak
  • Consider switching to PD120 if conditions are marginal

Issue: Horizontal Stretching or Compression

Cause: Doppler shift or oscillator drift Solution:

  • Verify frequency calibration from sync pulses
  • Check for consistent tone frequencies
  • For satellite work, use Doppler correction software
  • Ensure transmitter and receiver are on same frequency

Issue: Color Fringing or Banding

Cause: Insufficient low-pass filtering Solution:

  • Verify bidirectional EMA filter is active
  • Check filter cutoff frequency settings
  • Increase filter order if needed
  • Verify correct channel timing (182.4ms each)

Issue: Only Partial Image Decoded

Cause: Lost sync during long transmission Solution:

  • Improve signal quality (better antenna, less noise)
  • Check for consistent 20ms sync pulses
  • Verify buffer size is adequate (7+ seconds)
  • Consider recording and playing back for difficult signals

Comparison with Other SSTV Modes

Feature Robot36 PD120 PD180
Resolution 320×240 640×496 640×496
Pixels 76,800 317,440 317,440
Line Time 150ms 508ms 752ms
Pixel Time 275µs 190µs 286µs
Total Time 36s 126s 186s
Sync Pulse 9ms 20ms 20ms
Color Encoding Interlaced YUV Dual-luminance Dual-luminance
SNR Required 20 dB 18 dB 16 dB
Best For Fast QSOs ISS SSTV Quality images

Testing Recommendations

  1. Timing Test: Verify ~752ms between sync pulses
  2. Sync Detection Test: Confirm 20ms pulses at 1200 Hz are detected
  3. Channel Separation Test: Verify all 4 channels (Y-even, V-avg, U-avg, Y-odd) are correctly parsed
  4. Color Test: Use test patterns with known colors (primary colors, grayscale)
  5. Resolution Test: Verify all 640×496 pixels are decoded
  6. SNR Test: Compare PD180 vs PD120 at low signal levels
  7. Duration Test: Confirm total decode time is ~3 minutes 6 seconds

ISS and Satellite Use

Note: PD180 was previously used by the International Space Station for SSTV events, but has been largely replaced by PD120 to allow more images per pass.

Current Usage:

  • ISS: Primarily uses PD120 (faster, more images per pass)
  • LEO Satellites: Some use PD180 for high-quality commemorative images
  • HEO Satellites: Better suited for PD180 due to longer pass times
  • Ground Stations: Often prefer PD180 for maximum quality

Reception Tips:

  • Pass Duration: Need at least 4 minutes for complete image
  • Antenna: Directional (Yagi or helical) recommended
  • Tracking: Essential for Doppler compensation
  • Recording: Always record audio as backup
  • Multiple Passes: May need several passes for complete image

Technical Details

Frequency Accuracy Requirements

PD180 pixel time: 286µs
PD120 pixel time: 190µs

Frequency error effect:
1 Hz error over 286µs = 0.286 millidegree phase shift per pixel
1 Hz error over 190µs = 0.190 millidegree phase shift per pixel

Accumulates over 640 pixels:
PD180: 0.183° total phase shift per Hz error
PD120: 0.122° total phase shift per Hz error

Conclusion: PD180 is 50% more sensitive to frequency errors

Bandwidth Requirements

Nyquist bandwidth: 2 × (max_freq - min_freq)
                 = 2 × (2300 Hz - 1200 Hz)
                 = 2200 Hz minimum

Practical bandwidth: 3000 Hz (1000-4000 Hz) for margin
Same for all PD modes and Robot36

References

  • PD mode specification: SSTV Handbook (Amateur Radio community)
  • Color space: ITU-R BT.601 standard
  • ISS SSTV: ARISS (Amateur Radio on ISS) documentation
  • DSP techniques: Lyons, "Understanding Digital Signal Processing"
  • Original Robot36 implementation: github.com/xdsopl/robot36
  • SSTV mode comparison: W5ISP SSTV Mode Guide

Summary

PD180 provides the highest quality images among the commonly used SSTV modes by trading transmission speed for better signal-to-noise ratio. With 50% longer pixel dwell time than PD120, it offers approximately 1.8 dB improvement in SNR, making it ideal for weak signal conditions and high-quality image transmission when time permits. The dual-luminance encoding (like PD120) provides excellent vertical resolution while maintaining efficient transmission. Choose PD180 when image quality is paramount and you have stable conditions for the full ~3 minute transmission.