Skip to the content
2 layers88.5 × 57.5 mmLead Compensator, the printed circuit board in 3D

Analog lead compensator for a second-order plant to improve transient performance (reduced overshoot, faster settling).

Size
88.5 × 57.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
29
Nets
22
Pads
81
Tracks, vias
122, 4
Pours
1
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
17 Feb 2026
Updated
17 Feb 2026

Overview

Lead Compensator is an open-source printed circuit board by ardagurbuuz, from the ardagurbuuz/Lead-Compensator repository on GitHub. It is a 2-layer board of 88.5 × 57.5 mm with 29 parts on 22 nets, routed with 122 tracks and 4 vias.

Its parts include 15 resistors, 4 capacitors, 2 ICs and 1 switch. It belongs with the audio and music boards of this library.

README

README.md

Analog Lead Compensator Controller (Plant + Compensator)

This repository documents an end-to-end control + hardware workflow: designing a lead compensator, validating it at model-level (MATLAB/Simulink) and circuit-level (SPICE tools), and implementing it as an op-amp analog controller on a KiCad PCB.

A benchmark plant model is used as the baseline system:

$$ G(s)=\frac{2}{s(s+1)} $$


System overview (what is being built)

The project compares two closed-loop configurations under the same input:

  1. Uncompensated loop: plant-only closed-loop response
  2. Compensated loop: plant + lead compensator closed-loop response

This block-level structure is implemented and cross-validated across tools:


What this project is (and why it matters)

A lead compensator adds phase lead in a chosen frequency range. Practically, it helps achieve:

  • faster transient response (shorter settling time),
  • reduced overshoot,
  • improved stability margins when the baseline plant dynamics are “too slow” or “too oscillatory”.

Why this plant?

The plant

G(s) = 2 / (s(s+1))

was chosen deliberately because it is a clean benchmark that exposes the core trade-offs a lead compensator is meant to address:

  • The 1/s term introduces an integrator, which is a common structure when the system output represents an accumulated quantity (position/angle/level).
  • The 1/(s+1) term adds a dominant first-order lag, a very typical dynamic limitation in real systems.
  • Together, this plant is simple enough to analyze clearly, yet rich enough to show meaningful improvements in transient behavior when compensation is applied.

In short: it’s an intentional baseline that makes controller impact measurable and transferable.


Design goals

The project is built around a single, clear comparison:

  • Uncompensated (plant-only) response vs.
  • Compensated (plant + lead compensator) response

with the intent to improve transient performance (reduced overshoot, faster settling) while keeping the design implementable in analog hardware.


Control design method (Root Locus)

The compensator was selected using Root Locus–based design, specifically:

  • Dominant pole targeting: choose desired dominant closed-loop pole locations that meet transient expectations (overshoot/settling trade-off).
  • Angle condition: determine where a compensator zero/pole should be placed so the desired pole location satisfies the Root Locus angle requirement.
  • Magnitude condition: compute the required gain so the point lies on the locus.

This approach links performance objectives directly to pole locations and results in a compensator that is both analyzable and implementable.


Verification workflow (MATLAB → Simulink → SPICE tools)

This project intentionally uses multiple tools because each one answers a different question. Using only one would leave blind spots.

1) MATLAB (calculation sanity-check)

MATLAB is used to verify the math: pole/zero placement logic, gain consistency, and quick numeric checks. This prevents “it looks right” errors before simulation.

2) Simulink (system-level behavior)

Simulink is used to observe signals and step responses in a clean block-diagram environment and to compare compensated vs. uncompensated outputs under the same stimulus.

3) LTspice (ideal circuit-level cross-check)

LTspice is used to rebuild the control structure as ideal analog circuits, for two reasons:

  • It verifies the design at circuit level (not only transfer-function level).
  • It enables quick iteration and clean A/B comparison of plant-only vs. compensated behavior.

4) Proteus (practical pre-PCB simulation + switching)

Proteus is used as the “last realism check” before committing to PCB:

  • It supports a switch-based workflow: using a DPDT switch model to toggle between plant-only and compensated paths, enabling direct comparison with the same source/instrumentation.
  • It is also convenient for validating the integrated circuit behavior and wiring logic in a more “lab-like” simulation setup.

In short:

  • LTspice (SPICE tool) = ideal, controlled circuit verification and fast iteration
  • Proteus (SPICE tool) = integrated validation with switching and final pre-PCB confidence

Hardware implementation (Analog + PCB)

After validating behavior in simulation, the controller is implemented using op-amp analog circuitry and captured in KiCad as:

  • schematic,
  • PCB layout and routing,
  • manufacturing-ready board representation.

A key constraint throughout the hardware step is real-world component availability:

  • Some ideal resistor values from initial calculations are not standard off-the-shelf values.
  • Where needed, values are realized using series/parallel combinations (documented/verified at simulation stage before PCB finalization).

Fabrication note: The current PCB is a 2-layer design. If single-sided fabrication is required, it will generally need rerouting and/or jumpers.


Reproducibility (how to run / view everything)

This repo is structured so each stage can be opened independently.

MATLAB / Simulink

Folder: matlab-simulink/

  • lead_compensator.m → calculation/verification script
  • plant_comp.slx → compensated system model
  • uncomp_step_response.slx → baseline (plant-only) response model

Open in MATLAB/Simulink and run the script/models to reproduce the response comparison.

LTspice

Folder: ltspice/

  • lead-compensator.asc → circuit file

Open in LTspice and run the transient simulation to inspect waveforms.

Proteus

Folder: proteus/

  • lead-compensator.pdsprj → project file (includes switch-based comparison setup)

Open in Proteus, run simulation, and toggle the switch to compare modes.

KiCad

Folder: kicad/

  • lead-compensator.kicad_sch → schematic
  • lead-compensator.kicad_pcb → PCB layout
  • lead-compensator.kicad_pro → project settings

Open the .kicad_pro project file in KiCad, then inspect schematic/PCB.


Repository structure

  • docs/images/ → curated images used in README
  • kicad/ → KiCad schematic + PCB
  • matlab-simulink/ → MATLAB + Simulink models
  • ltspice/ → LTspice circuit (SPICE tool)
  • proteus/ → Proteus project (SPICE tool)

Tools

MATLAB, Simulink, LTspice (SPICE tool), Proteus (SPICE tool), KiCad


Keywords (for recruiters and technical readers)

Root Locus, dominant poles, angle condition, magnitude condition, lead compensator, transient response, overshoot, settling time, circuit-level validation, op-amp analog implementation, PCB design, DRC-clean layout, end-to-end engineering workflow.

Parts

29
QtyValueFootprintReferences
5100kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR1, R2, R3, R4, R13
4100nCapacitor_THT:C_Rect_L4.6mm_W3.8mm_P2.50mm_MKS02_FKP02CDCP5, CDCP6, CDCP7, CDCP8
410kResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P5.08mm_HorizontalR5, R6, R7, R8
210uCapacitor_THT:C_Radial_D5.0mm_H11.0mm_P2.00mmC1, C2
21kResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P5.08mm_HorizontalR14, R15
21uCapacitor_THT:C_Radial_D5.0mm_H11.0mm_P2.00mmC3, C4
2330kResistor_THT:R_Axial_DIN0414_L11.9mm_D4.5mm_P15.24mm_HorizontalR10, R11
110MResistor_THT:R_Axial_DIN0309_L9.0mm_D3.2mm_P12.70mm_HorizontalRLK16
133kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR12
1560kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR9
1Conn_01x02TerminalBlock_Degson:TerminalBlock_Degson_DG250-3.5-02P_1x02_P3.50mm_45DegreeJ_IN1
1Conn_01x03TerminalBlock_Degson:TerminalBlock_Degson_DG250-3.5-03P_1x03_P3.50mm_45DegreeJ_PWR2
1SW_Slide_DPDTButton_Switch_THT:SW_CK_JS202011AQN_DPDT_AngledSW1
1TL071Package_DIP:DIP-8_W7.62mmU2
1TL074Package_DIP:DIP-14_W7.62mmU1

Similar boards

  • 2 layers52.3 × 10.5 mmStackLink, the printed circuit board in 3D

    StackLink

    gusmanb/logicanalyzer

    24 channel, 100Msps logic analyzer hardware and software

    29 parts5.1kGPL-3.0
  • 2 layers56 × 20 mmHallEffectXY Endstop, the printed circuit board in 3D

    HallEffectXY Endstop

    VoronDesign/Voron-Hardware

    Cool Hardware designed by the Voron Design group

    29 parts1.1kGPL-3.0
  • 2 layers50 × 23.2 mmAnalog, the printed circuit board in 3D

    Analog

    hoglet67/RGBtoHDMI

    Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI

    29 parts1kGPL-3.0
  • 2 layers16.8 × 13.6 mmE Fidget Lite, the printed circuit board in 3D

    E Fidget Lite

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    29 parts915
  • 2 layers85 × 12.5 mmTERES PCB3-TOUCH BTN Rev.A, the printed circuit board in 3D

    TERES PCB3-TOUCH BTN Rev.A

    OLIMEX/DIY-LAPTOP

    Do It Yourself Open Source Hardware and Software Modular Hacker's Friendly Laptop

    29 parts578Apache-2.0
  • 2 layers33.7 × 97.8 mmHAN ESP TSS721, the printed circuit board in 3D

    HAN ESP TSS721

    UtilitechAS/amsreader-firmware

    ESP8266 and ESP32 compatible firmware to read, interpret and publish data to MQTT from smart electrical meters, both DLMS and DSMR is supported

    29 parts470
  • 2 layers80 × 55 mmGB CARTPP XC, the printed circuit board in 3D

    GB CARTPP XC

    Gekkio/gb-hardware

    Game Boy -related custom hardware by gekkio

    29 parts379CC-BY-4.0
  • 2 layers55 × 58 mmProto ads bee mcu board, the printed circuit board in 3D

    Proto ads bee mcu board

    PantsForBirds/adsbee

    Open Source Embedded ADS-B Receiver

    29 parts344GPL-3.0

Questions

How big is the Lead Compensator PCB?

It measures 88.5 × 57.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Lead Compensator use?

29 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Lead Compensator KiCad files?

From the ardagurbuuz/Lead-Compensator repository on GitHub, at the commit this page was made from: the board is kicad/lead-compensator.kicad_pcb and its schematic kicad/lead-compensator.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Lead Compensator design in my own project?

Its repository states no licence, so its author keeps all rights: ask ardagurbuuz before reusing the design.