PID Without a PhD, Finally

No, he didn't do that properly. Otherwise, there'd be no need for three Kx constants.

The integrator term accumulates the error per sample by some law/filter and the Kd is multiplied by a filtered version of the difference between the error this sample and the error of the previous sample.

Actuator = (error * Kp) + ( filter1(sum(error)) * Ki ) + ( filter2(delta(error,lastError)) * Kd)

where the filters are very likely extremely stateful and not very filter-ey.

Forms exist for continuous linear PID and they're about what you'd expect.

--
Les Cargill
Reply to
Les Cargill
Loading thread data ...

Oh, you know what I mean. Old-time analog PID controllers often used a different sigal flow path than sum-of-terms.

--
John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  
 Click to see the full signature
Reply to
John Larkin

Oh, I'm sure. I haven't done anything directly with analog PID other than read about them.

--
Les Cargill
Reply to
Les Cargill

formatting link

That is a perfect Analog PID circuit,.. Scroll down to see print.

LAG = (I) With enhanced control. LEAD= (D) " " " Via the BREAK levels. GAIN= (P) Dancer POS is the Set Point (SP) While the input to the buffer is the Process Value (PV)

Jamie

Reply to
M Philbrook

We do it all the time on boards: voltage regulator loops, power amps, that sort of thing.

--
John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  
 Click to see the full signature
Reply to
John Larkin

I have to admit that I do more "seat of the pants" loop tuning in that sort of circumstance than I should.

Sometimes more math and less knob-twiddling is a good thing (sometimes not).

--
Tim Wescott 
Wescott Design Services 
 Click to see the full signature
Reply to
Tim Wescott

Unlike PIDs, most of those should have a pretty simple method for figuring out it's at balance.

I dunno, I've made some things self-calibrating in software lately. I like that better.

--
Les Cargill
Reply to
Les Cargill

Things like output impedance, loop stability, line and load transient regulation sometimes matter.

Sure, but it's not generally practical to make a voltage regulator using an ADC and a DAC and a lot of code. Analog PID is still useful.

We sometimes do temperature controllers as analog PID loops, too. For things like crystal ovens.

--
John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  
 Click to see the full signature
Reply to
John Larkin

Nothing wrong with that. We're not at a blackboard trying to impress a classroom full of EE students, we're trying to design something that works.

Tuning by simulation is quick. Use a little theory to get the starting point. Any serious loop is nonlinear enough that it should be simulated anyhow. Sometimes the only practical way to design a temperature control loop is by breadboarding it; the thermal structure can be too fuzzy to even simulate.

--
John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  
 Click to see the full signature
Reply to
John Larkin

Voltage regulators typically aren't really PID though, I thought. More like P without the I or D.

That seems like a more interesting application.

Reply to
Paul Rubin

I wonder how close you can come by sticking temperature sensors all over the place during development. Then apply heat in a single place and see how the temperature map evolves over time; then move the heat source to another place and repeat, etc. The idea is to get enough info to let you simulate the system accurately using basic thermo equations.

Reply to
Paul Rubin

This is sort of PID:

formatting link

--
John Larkin         Highland Technology, Inc 

lunatic fringe electronics
 Click to see the full signature
Reply to
John Larkin

It's been a while since I've watched the turn-on ramp of a voltage regulator. But about 25 years ago, when a 7805 was causing a part to go into CMOS latchup, it had a classic integrator windup then overshoot event on power-up -- that's not behavior you can get from just proportional.

I'm pretty sure that even today any precision regulator is going to have a built-in integrator.

--
Tim Wescott 
Wescott Design Services 
 Click to see the full signature
Reply to
Tim Wescott

My understanding is that almost all those things are run well in the very linear operating region these days. But I've not dealt too much with load transients.

Heck, I've go at least three amplifiers around here that turn themselves off if you short the output. Done by microprocessor. A nice feature.

Analog PID is fine. It's probably the most common way, really. You won't beat it for size weight and power ( and cost) . But the software voltage regulator might be a thing soon.

Sure. The chambers we used to have all ran PID control.

--
Les Cargill
Reply to
Les Cargill

Well, it'll have dominant-pole compensation, anyway. I very much doubt that that was integrator windup, because the slowest thing in the loop is not the actuator (pass transistor), it's the output filter cap. Thus there's nothing corresponding to overspeeding a motor.

It sounds to me like ordinary slew limiting followed by an underdamped transient response.

ISTM that fixed-coefficient PID is merely a subset of the usual frequency-compensation problem for amplifiers, with the addition of windup control. Separate P, I, and D knobs are convenient for manual tuning, of course, but they're pretty limiting compared to what you can do with RC networks and op amps.

IME PLLs are generally a lot harder to compensate well than (small) temperature control loops, at least once the nonlinearity is removed.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
 Click to see the full signature
Reply to
Phil Hobbs

Not a true integrator, but close, a bunch of gain with a rolloff.

Voltage regulators have the problem that they may dump into all sorts of capacitive loads with various ESRs, or some weird combination of, say, electrolytics in parallel with ceramics. A programmable reg also has a loop gain that varies with the programmed voltage.

If you are lucky, the data sheet will have a map of the safe zone of C and ESR, where the reg is stable, but it could still have a bit of overshoot if the input is applied suddenly. And the load capacitance includes all the bypass caps on other sheets of the schematic.

If you are lucky, you'll have a useful Spice model. If not, breadboard and scope the damping of the load step response.

For a 3t reg, like an LM317 or an 1117, it is often useful to separately bypass the ADJ pin to ground.

--
John Larkin         Highland Technology, Inc 

lunatic fringe electronics
 Click to see the full signature
Reply to
John Larkin

BTDTGTS _sometimes_ you can do that but often this is a SYSTEM based problem, involving many aspects and best guesses can be made but until a complete system is built the thermal and other effects of adjacent components affect the whole system.

I remember a light box for behind some very high brightness LCD screens (4 x 11W fluorescent tubes and their holders), that required fan cooling. The thermal properties got difficult to model, depending on things like slight change of positioning of cabling, of the tube holders let alone slight changes in fan position or ducting or variations between fans. Then we get to heat profile, measured by array of thermistors, that varied depending on how tight the mounting screws of the light box secured it to the frame. Trying to work best way to run 12 thermistor cables to avoid interrupting air flow or changing effects was 'interesting'.

--
Paul Carpenter          | paul@pcserviceselectronics.co.uk 
    PC Services 
 Click to see the full signature
Reply to
Paul

Voltage regulators have an annoying affection for oscillating, especially LDO types that have high open-loop output impedance, namely ones that drive the load from a collector or a drain. The oscillation waveform is usually a triangle, very nonlinear.

Older data sheets, and many newer ones, only hint at stability issues.

This was kind of fun:

formatting link

formatting link

Those regs are only dropping tenths of a volt, so the mosfets are really controlled resistors. Loop dynamics varies with current.

--
John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  
 Click to see the full signature
Reply to
John Larkin

If the question you want to answer is "now that I have it, how to I control it", then you can do swept-sine or step-input tests for system identification, and then design your controller from that.

I prefer swept-sine measurements followed by design based on Bode plots. I like them because they're valid for any linear system, even ones that have distributed states, and because -- to an extent -- you can take nonlinearities into account as part of your control design.

--
Tim Wescott 
Wescott Design Services 
 Click to see the full signature
Reply to
Tim Wescott

A thermal system might have milliHertz responses, heater to sensor. I find it easier to measure the step response, which still might take many minutes to settle, and hack up an RC network model that simulates like the hardware. Diffusion is involved, so it might need a lot of RCs.

The biggest nonlinearity in a closed-loop heater is railing the driver output at 0 and 100%. And there is a square-law heater response if you use a simple voltage drive.

--
John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  
 Click to see the full signature
Reply to
John Larkin

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.