Skip to content
Tactiverge

Learning Rooms/✦ Level 5 · Research Engineer/Computing and algorithms

Discrete control #1: Introduction and overview

Brian Douglas · 22 min 22 s · captions on YouTube · nothing loads until you press play

By the end you can…

  • Model a sampled P loop on a first-order plant exactly between samples.
  • Derive the gain limit K·Kp < (1 + a)/(1 − a), with a = e^(−T/τ), and use it.
  • Explain why sampling, delay and big gains together cause discrete-time instability.
?Predict▶Watch✓Practise⚙Build

Watch it all: no segment has been checked by hand for this video yet.

1.Predict before you press play

Sampling period 0.5 s, plant τ = 1 s, K = 1. Which gain is unstable?

Pick one before you press play. A wrong guess is fine: it is what makes the video stick.

2.See the idea first

Play with this diagram for a minute. It gives you something to hang the video on.

Loading the interactive…

Can't use the diagram? Read a description instead

The sampled-loop diagram plots the output only at sample times. With a modest gain the samples rise to a level just below the set point. Past the computed gain limit they alternate above and below with growing size. Shortening the sample period raises the limit.

3.Watch, actively

Why a controller running on a computer behaves differently from the ideal continuous one, including sampling effects on stability.

22 min 22 s · captions on YouTube · source

Nothing loads from YouTube until you press play.

Watch for…

  • → Listen for what changes when a controller is implemented digitally, and why the sample rate matters.

Pause whenever you like. Rewatching a hard minute is a good habit, not a failure.

Can't stream it? Read the idea instead

A controller on a computer only measures and acts at sampling instants, and holds its output in between. That delay adds lag to the loop, so gains that were stable in continuous time can become unstable when the sample rate is too slow.

What the video covers (our own note, written when we verified it): Why a controller running on a computer behaves differently from the ideal continuous one, including sampling effects on stability.

Written by Tactiverge in our own words, not a transcript. The full lesson below explains the idea without the video.

Read it instead

Jot down one thing that surprised you and one question you still have.

Private: saved only on this device, never sent to Tactiverge.

4.Practise what you just saw

These come from the lesson that use this video and are checked on the server. Wrong answers get a hint and another try.

Practice 1 · a fresh version every time

A digital P controller samples a first-order plant (τ = 0.5 s, K = 0.5) every T = 2 s and holds its output between samples. Above what gain Kp does the loop become unstable?

Practice 2 · a fresh version every time

You simulate a P-controlled loop τ·dy/dt + y = K·Kp·(r − y) with explicit Euler. τ = 0.2 s, K = 2, Kp = 4. Above what time step dt (in seconds) does the simulation become unstable?

s

Practice 3

Your digital P loop oscillates. Which change is most likely to fix it without slowing the response?

Practice 4

The per-sample multiplier p = −0.6. How does the error behave?

5.Try it yourself

No simulation models this idea yet. The lesson below has an interactive diagram instead.

6.Where engineers use it

Motor current loops run at tens of kHz because the electrical time constant is around a millisecond; temperature loops can run at 1 Hz because τ is minutes.

From the applied view in the lesson When a computer makes a stable loop unstable. Checked by automated tests only.

7.Build something with it

Follow-up project

For the Smart Greenhouse or any heater you model, choose a sample period from the closed-loop time constant, compute the gain limit, and state your safety margin (for example, 'Kp at one third of the limit').

Open BUILD 007: Design a Smart Greenhouse →

Where this video lives

In the course catalogue: CTRL-420 Dynamic response and PID design

The video is by Brian Douglas, embedded from YouTube with privacy-enhanced mode and never autoplayed. The room around it (prompts, notes, practice, projects) is Tactiverge's, written with AI assistance and checked by automated tests only.