Uploaded May 2020 | Updated November 2026, 3 hours ago
(Source code for simulator: github.com/pms67/ControlSystemDesign-Tutorial)
Control system design covering aspects all the way from theory to the final, real-world implementation. This includes: mathematical modelling of dynamic systems, parameter estimation, theoretical controller design with practical considerations, simulation in software (Matlab and custom simulator written in Unity), and implementation in the real world (mechanical, electrical, and software).
The system to be controlled I call a 'balanced aeropendulum', which effectively is half of a quadcopter with one degree of freedom.
This video series will consist of six videos (including this one), covering all topics mentioned previously. ID: QIBvbJtYjWuHiTG0uCoK
(Source code for simulator: github.com/pms67/ControlSystemDesign-Tutorial)
Control system design covering aspects all the way from theory to the final, real-world implementation. This includes: mathematical modelling of dynamic systems, parameter estimation, theoretical controller design with practical considerations, simulation in software (Matlab and custom simulator written in Unity), and implementation in the real world (mechanical, electrical, and software).
The system to be controlled I call a 'balanced aeropendulum', which effectively is half of a quadcopter with one degree of freedom.
This video series will consist of six videos (including this one), covering all topics mentioned previously. ID: QIBvbJtYjWuHiTG0uCoK
![PCB Traces 101 - Phils Lab #112
Basics and guidelines for PCB traces (tracks), including geometry/materials, sizing (power and signal), thermals, current-handling, controlled impedance, delay, and more. (AD: This video includes a paid promotion for Altium).
[SUPPORT]
Hardware design courses: https://phils-lab-shop.fedevel.education
Course content: https://www.phils-lab.net/courses
Free trial of Altium Designer: https://www.altium.com/yt/philslab (AD)
Patreon: https://www.patreon.com/phils94
[GIT]
https://github.com/pms67
[SOCIAL]
Instagram: https://instagram.com/philslabyt
[LINKS]
IPC-2221 calculator: https://www.4pcb.com/trace-width-calculator.html
Trace inductance calculator: https://spok.ca/index.php/resources/tools/106-traceindcalc
Differential pairs video: https://www.youtube.com/watch?v=xwrdvhm4vgw
Controlled impedance: https://www.protoexpress.com/blog/controlled-impedance-really-matters/
PCB design for EMI/SI video: https://www.youtube.com/watch?v=VtzPL8wQ8-E
Critical length calculator: https://www.protoexpress.com/tools/bandwidth-rise-time-and-critical-length-calculator/
Kicad controlled impedance video: https://www.youtube.com/watch?v=0fteCxn5XXA
Stackup/controlled impedance video: https://www.youtube.com/watch?v=p3w22veWMbk
[TIMESTAMPS]
00:00 Introduction
00:43 Altium Designer Free Trial (Ad)
01:09 Basics
03:51 Geometry
07:07 Geometry/Material Cost
07:49 Resistance, Inductance, Capacitance
11:33 Power Delivery
12:59 IPC-2221 Calculator
14:09 PDN Inductance
15:31 Inductance Calculator
16:43 Power Planes
17:09 Differential Pairs
17:38 Controlled Impedance
18:54 Critical Length Calculator
20:05 Contr. Imp. Configs & Further Resources
21:30 Propagation Delays & Delay Matching
23:01 Practical Guidelines
29:55 Outro PCB Traces 101 - Phils Lab #112](https://i.ytimg.com/vi/xEVntmYLARw/mqdefault.jpg)

![High-Speed PCB Delay Matching Explained - Phils Lab #110
Tips on PCB trace delay matching/tuning for high-speed interfaces. Covering basics, microstrip/stripline, differential pairs, timing margins, and practical tips. PCBs by PCBWay https://www.pcbway.com (AD: This video includes a paid promotion for PCBWay and Altium).
[SUPPORT]
Hardware design courses: https://phils-lab-shop.fedevel.education
Course content: https://www.phils-lab.net/courses
Free trial of Altium Designer: https://www.altium.com/yt/philslab (AD)
Patreon: https://www.patreon.com/phils94
[GIT]
https://github.com/pms67
[SOCIAL]
Instagram: https://instagram.com/philslabyt
[TIMESTAMPS]
00:00 Introduction
01:10 Altium Designer Free Trial (Ad)
01:33 PCBWay (Ad)
01:54 Courses
02:08 Delay Matching Basics
03:29 Outer vs Inner Layer
05:50 Delay Calculator
06:30 Timing Margins
07:15 DDR Skew Spec & Derating
08:40 Same Layer/Transition Routing
11:25 Delay Tuning Example (Single-Ended)
13:55 Differential Pairs
15:29 Intra-Pair Tuning Example
16:16 Additional Tips
17:57 Package Delays
18:55 Outro High-Speed PCB Delay Matching Explained - Phils Lab #110](https://i.ytimg.com/vi/xdUR3NzXUkc/mqdefault.jpg)
![Real-Time Impulse Response Simulation in Software (STM32 DSP) - Phils Lab #126
Impulse response system modelling, simulation, and real-time implementation on an STM32 microcontroller for a guitar cabinet. PCBs by PCBWay https://www.pcbway.com (AD: This video includes a paid promotion for PCBWay).
[SUPPORT]
Hardware design courses: https://phils-lab-shop.fedevel.education
Course content: https://www.phils-lab.net/courses
Patreon: https://www.patreon.com/phils94
[GIT]
https://www.github.com/pms67
[SOCIAL]
Instagram: https://www.instagram.com/philslabyt
[LINKS]
Impulse Response Wiki: https://en.wikipedia.org/wiki/Impulse_response
FIR Filtering Video: https://www.youtube.com/watch?v=uNNNj9AZisM
STM32 + I2S + DMA Set-Up Video: https://www.youtube.com/watch?v=zlGSxZGwj-E
[TIMESTAMPS]
00:00 Intro
00:58 PCBWay (Ad)
01:34 Impulse Response (IR) Basics
04:17 Getting an IR
06:03 IR Audio Sample
06:15 Time Domain
07:51 Frequency Domain
09:31 FIR Filter
11:04 Truncation
14:18 Firmware Implementation
17:18 Test Set-Up
17:43 Measurements (Frequency Domain, IR Length)
21:03 Guitar Demo (Varying IR Length)
21:46 Guitar Demo (Guitar Rig vs Custom DSP)
22:20 Outro Real-Time Impulse Response Simulation in Software (STM32 DSP) - Phils Lab #126](https://i.ytimg.com/vi/xjQBpsu9Tzc/mqdefault.jpg)
![STM32 USB MIDI Controller Tutorial (TinyUSB) - Phils Lab #169
How to create your own, custom USB MIDI controller with STM32 microcontrollers and the TinyUSB USB MIDI device stack.
Limited-time: $2 for 6-layer PCBs up to 100×100 mm - grab your $33 coupon now: https://jlcpcb.com/events/6-layer-pcb?from=PhilsLab (Ad)
Altium Develop: http://altium.com/yt/philslab (Ad)
[SUPPORT]
Hardware design courses: https://phils-lab-shop.fedevel.education
Course content: https://www.phils-lab.net/courses
Patreon: https://www.patreon.com/phils94
[LINKS]
TinyUSB: https://docs.tinyusb.org/en/latest/index.html
TinyUSB Git: https://github.com/hathach/tinyusb
TinyUSB CDC Video: https://youtu.be/XgsnJdY8LsY
STM32 ADC DMA TIM Video: https://youtu.be/_K3GvQkyarg
USB MIDI Spec:https://www.usb.org/sites/default/files/midi10.pdf
[TIMESTAMPS]
00:00 Intro
01:58 JLCPCB (Ad)
02:59 Altium Develop (Ad)
03:52 Hardware Overview
06:00 CubeIDE Set-Up
08:37 TinyUSB MIDI Device Class
14:21 Receiving MIDI Messages
18:30 Testing Reception with Python Mido
22:49 Sending MIDI Messages
27:04 Testing with DAW
29:42 Outro STM32 USB MIDI Controller Tutorial (TinyUSB) - Phils Lab #169](https://i.ytimg.com/vi/xpWwych65vc/mqdefault.jpg)
![(Sponsored) Differential Pairs - PCB Design Basics - Phils Lab #83
Differential pair PCB design basics, covering differential signalling benefits, references, impedance control, inter- and intra-pair matching, and termination.
(AD: This video includes a paid promotion for Altium).
***Advanced Hardware Design Course Survey***
https://forms.gle/X4jwvtZeJ1jTXh7r9
Rick Hartley video: https://www.youtube.com/watch?v=QG0Apol-oj0
[SUPPORT]
Free trial of Altium Designer: https://www.altium.com/yt/philslab (AD)
Patreon: https://www.patreon.com/phils94
Mixed-signal hardware design course: https://phils-lab-shop.fedevel.education
[GIT]
https://github.com/pms67
[TIMESTAMPS]
00:00 Introduction
00:20 Altium Designer Free Trial (Ad)
00:43 Rick Hartley Diff Pair Video
01:05 Single-Ended vs Differential Signalling
03:25 Differential Signalling Benefits
03:58 Twisted Pair Diff Pair
04:58 PCB Diff Pair
07:00 Impedance and Coupling
09:55 Impedance Calculation Examples (Altium Designer)
12:55 SE and DIFF Impedance to Trace Width and Spacing
14:16 Matching (Inter- and Intra-Pair)
16:18 Matching Example (Altium Designer)
18:10 Termination
21:29 Outro (Sponsored) Differential Pairs - PCB Design Basics - Phils Lab #83](https://i.ytimg.com/vi/xwrdvhm4vgw/mqdefault.jpg)

![How To Write A Driver (Audio CODEC & I2C) - Phils Lab #142
Audio CODEC basics and configuration via I2C in C using an STM32 microcontroller. PCBs by PCBWay https://www.pcbway.com (AD: This video includes a paid promotion for PCBWay.)
[SUPPORT]
Hardware design courses: https://phils-lab-shop.fedevel.education
Course content: https://www.phils-lab.net/courses
Patreon: https://www.patreon.com/phils94
[GIT]
https://www.github.com/pms67
[SOCIAL]
https://www.instagram.com/philslabyt
[LINKS]
STM32 + I2S Video: https://www.youtube.com/watch?v=zlGSxZGwj-E
CS4270 Datasheet: https://statics.cirrus.com/pubs/proDatasheet/CS4270_DS686F2.pdf
Linux CS4270 Driver: https://github.com/torvalds/linux/blob/master/sound/soc/codecs/cs4270.c
DSP Playlist: https://www.youtube.com/watch?v=MrbffdimDts&list=PLXSyc11qLa1ZCn0JCnaaXOWN6Z46rK9jd
[TIMESTAMPS]
00:00 Intro & Hardware Overview
02:46 PCBWay (Ad)
03:17 I2S Signals
05:47 Master/Slave Mode
06:34 Clock Ratios
06:55 CODEC Config Basics
08:56 Hardware Connections
09:24 Typical Config Steps
11:53 Datasheet Walkthrough
16:34 MCU I2S/I2C Config
17:23 Driver Header
19:07 Driver Source (Reset, Register Read/Write)
19:59 Driver Source (Power Settings, Device ID)
24:02 Driver Source (CODEC Config)
29:21 Outro How To Write A Driver (Audio CODEC & I2C) - Phils Lab #142](https://i.ytimg.com/vi/ysORoOeIzHY/mqdefault.jpg)
![ESP32 + PCB Antenna Hardware Design Tutorial - Phils Lab #90
How to design custom hardware using ESP32 MCUs (ESP32-C3, NOT pre-made modules!) and PCB antennas (inverted F, in this case). PCBs by PCBWay https://www.pcbway.com
Showing examples and real, working hardware (WiFi scan test), a full schematic walkthrough, and a PCB design walkthrough. Final test using Arduino IDE & ESP32 expansion.
Many more ESP32 firmware & hardware tutorial videos to come!
(AD: This video includes a paid promotion for PCBWay and Altium).
[SUPPORT]
Free trial of Altium Designer: https://www.altium.com/yt/philslab (AD)
Patreon: https://www.patreon.com/phils94
Mixed-signal hardware design course: https://phils-lab-shop.fedevel.education
Advanced Hardware Design Course Survey
https://forms.gle/X4jwvtZeJ1jTXh7r9
[GIT]
https://github.com/pms67/ESP32-USB-Dongle
[LINKS]
Instagram: https://instagram.com/philslabyt
ESP32 Hardware Design Guidelines: https://www.espressif.com/sites/default/files/documentation/esp32_hardware_design_guidelines_en.pdf
ESP32-C3 Datasheet: https://www.espressif.com/sites/default/files/documentation/esp32-c3_datasheet_en.pdf
TI PCB Antenna Application Note: https://www.ti.com/lit/an/swra117d/swra117d.pdf
[TIMESTAMPS]
00:00 Introduction
00:29 Altium Designer Free Trial (Ad)
00:49 PCBWay (Ad)
01:19 ESP32-C3 and Hardware Overview
04:28 ESP32 Hardware Design Guidelines
06:14 Schematic - ESP32-C3 Power Pins
07:26 Schematic - Crystal
08:50 Schematic - Chip Enabled (Reset)
09:16 Schematic - SPI FLASH
10:21 Schematic - USB and Power
12:29 Schematic - UART, Sensor
13:26 Schematic - Bootmode Select
14:10 Schematic - PCB Antenna
17:43 Schematic - RF Matching Network
22:15 PCB - Overview & Stack-Up
23:47 PCB - Controlled Impedance
24:10 PCB - General Guidelines, Decoupling
25:54 PCB - Antenna and Matching Network
29:22 WiFi Test (Arduino IDE)
33:37 Outro ESP32 + PCB Antenna Hardware Design Tutorial - Phils Lab #90](https://i.ytimg.com/vi/yxU_Kw2de08/mqdefault.jpg)
![PID Controller Implementation in Software - Phils Lab #6
Source code available here: https://github.com/pms67/PID
How to implement a PID controller in software using C, discussing theory and practical considerations. Demonstration of PID controller code using a custom flight simulator.
If youre enjoying my content, please consider becoming a patron: https://www.patreon.com/phils94
[NOTE] Something I forgot to mention in the video! Note on derivative-on-measurement: Since the error signal effectively going into the differentiator does not depend on the setpoint: e[n] = 0 - measurement, and therefore (e[n] - e[n - 1]) = (0 - measurement) - (0 - prevMeasurement) = -Kd * (measurement - prevMeasurement). Note the minus sign compared to derivative-on-error!
Ive made the change in the Git repo - before you would have had to use a negative Kd gain to get the same result. Now you can, as normal with derivative-on-error, use a positive Kd gain as usual.
Additional note: The derivative low-pass filter can be controlled by the constant tau, which is the time constant of the filter (-3dB frequency in Hz, fc = 1 / (2*pi*tau)). A larger value of tau means the signal is filtered more heavily. As tau approaches zero, the differentiator approaches a pure differentiator with no filtering.
[TIMESTAMPS]
00:00 Introduction
00:39 Control system basics
02:40 PID representation in continuous domain
04:57 Converting from the continuous to the discrete domain
06:11 PID controller difference equation
07:35 Practical considerations
10:48 Basic software structure
11:53 Implementation in C
18:46 Example: Flight simulator using PID controller code
ID: QIBvbJtYjWuHiTG0uCoK PID Controller Implementation in Software - Phils Lab #6](https://i.ytimg.com/vi/zOByx3Izf5U/mqdefault.jpg)
![PCB Design Rules 101 - Phils Lab #170
Basics of PCB design rules and constraints, examining important rules and translating manufacturing constraints to rules, custom rules (net classes, priorities), and rooms.
Get Your $30 Coupon! Small Size 6-Layer PCBs Starting at $2: https://jlcpcb.com/6-layer-pcb?from=PhilsLab (Ad)
Altium Develop: http://altium.com/yt/philslab (Ad)
[SUPPORT]
Hardware design courses: https://phils-lab-shop.fedevel.education
Course content: https://www.phils-lab.net/courses
Patreon: https://www.patreon.com/phils94
[LINKS]
TinyUSB: https://docs.tinyusb.org/en/latest/index.html
TinyUSB Git: https://github.com/hathach/tinyusb
TinyUSB CDC Video: https://youtu.be/XgsnJdY8LsY
STM32 ADC DMA TIM Video: https://youtu.be/_K3GvQkyarg
USB MIDI Spec:https://www.usb.org/sites/default/files/midi10.pdf
[TIMESTAMPS]
00:00 Intro
04:19 JLCPCB (Ad)
05:34 Altium Develop (Ad)
06:29 Stack-Up and Controlled Impedance
11:03 Design Rule Basics
13:29 Clearance & Width
20:44 Solder Mask Expansion
24:51 Polygon Connect
26:35 More Important Rules
29:59 Custom Rules & Priorities
32:36 Net Class Rules
35:44 Rooms (Area-/Location-Based Rules)
38:43 Design Rules Check (DRC)
40:56 Outro PCB Design Rules 101 - Phils Lab #170](https://i.ytimg.com/vi/zeH3WbMWvdg/mqdefault.jpg)