Peak Amplitude (V):
Ref Voltage VR (V):
Diode Barrier Vd (V):
--- Input vi
— Output vo
- - Threshold (VR + Vd)
Practical Tip: If VR is negative, the battery symbol in reality would be flipped.
Practical Tip: If VR is negative, the battery symbol in reality would be flipped.
Peak Input (Vp):
Ref Battery (VR):
Barrier (Vd):
1. Transfer Mathematics
The simulation follows the Idealized Series Clipper logic:
// Logic for Positive Clipper (Image 2)
Threshold = VR - Vd
IF (vi < Threshold):
vo = vi - Threshold
ELSE:
vo = 0
Threshold = VR - Vd
IF (vi < Threshold):
vo = vi - Threshold
ELSE:
vo = 0
Note: For Image 1 (Diode flipped), the logic swaps to vi > VR + Vd.
2. Simulation Flow
Step 1: Calculate Input
vi = A sin(ωt) for 800 horizontal pixels.Step 2: Evaluate Diode State: Anode voltage vs Cathode voltage.
Step 3: If Reverse Biased, Current = 0. Output node is pulled to 0V by resistor R.
Step 4: Map voltage to pixel Y-coordinates using
midY - (V * scale).