Video on tuning PID controllers

Yet another video on tuning PID controllers has been tossed into the YouTube pool. ?

formatting link

--

Tim Wescott 
Wescott Design Services 
http://www.wescottdesign.com 

I'm looking for work -- see my website!
Reply to
Tim Wescott
Loading thread data ...

around 18:00 you speak about setting the P gain to 1% of D gain and set it to 2 / 2000 which is 0.1% not 1%??

otherwise very good.

M
Reply to
makolber

Blargh! I should never, ever, try to do math in my head for the final version of anything. I get all the advanced stuff right, and then lose track of the radix point, or flip a sign, or do some other simple thing wrong.

--
Tim Wescott 
Control systems, embedded software and circuit design 
I'm looking for work!  See my website if you're interested 
http://www.wescottdesign.com
Reply to
Tim Wescott

well I would consider my comment a nit pick except that i was trying to gle an the correct rule of thumb.

As a rule of thumb, should the P gain be 1% (or 0.1%) of the D gain? or is the thumb too coarse a measure?

Reply to
makolber

The rule of thumb is that you need to pick something and try it. Endlessly shivering on the brink won't get the job done. You'll find out how good it is when the metal meets the road.

It really depends more on how fast the sampling rate is compared to the ultimate capability of the system -- I suppose I should have worked that in there, but I always just pick a number, and make sure that nothing (machine or human) will get broken if it's way too big.

--
Tim Wescott 
Control systems, embedded software and circuit design 
I'm looking for work!  See my website if you're interested 
http://www.wescottdesign.com
Reply to
Tim Wescott

Fiddling with things until they work is just so unsatisfiying. I want to solve a set of seven coupled nonlinear PDEs and then have it work perfectly first time thanks to my super smart math skills

--


----Android NewsGroup Reader---- 
http://usenet.sinaapp.com/
Reply to
bitrex

Yes. Several dozens of videos down the road I hope to equip people to do just that.

Of course, when you try it in real life you find out that no matter how smart you are, there's always unmodelled features of the system that you missed, requiring you to cycle through measuring and re-doing your equations and re-testing to find the next thing you missed.

So you end up fiddling with things until they work no matter what -- but it can be done in a much more intelligent and guided way than just twisting knobs.

--
Tim Wescott 
Control systems, embedded software and circuit design 
I'm looking for work!  See my website if you're interested 
http://www.wescottdesign.com
Reply to
Tim Wescott

Huh, I'm far from a control expert. And I come at it from an analog point of view. (Zeigler- Nichols (sp) tuning method) So I think first of an overall system gain. Sometimes just gain (proportional) is enough.

If not, then I turn to the integral for more of the gain, and the proportional term starts to look like the damping on the integral gain.

Finally the derivative term may can help speed things up when there are quick changes... (I have done a P+D thing.... it was easy to see the derivative gain vs noise trade off. )

Will you reconcile our different "world views" in upcoming installments?

I assume the derivative band limit is the same as rolling off the derivativ e gain at high frequency.

One thing I'd like to see on the video is a display (computer or 'scope) of the set point, signal, error signal and output (to plant) on the screen . For me that would help a lot in judging "performance" (over shoot vs. oscillations.)

I've got a control system like your balanced arm. And I'd like to make the thing faster.... able to withstand bigger disturbances.

George H.

Reply to
George Herold

Would you be interested in an LTSpice PID circuit that you can play around with all the settings and see what happens?

Reply to
John S

e
?

ative gain at

)

reen.

No , but thanks. I've tried spicing control circuits and it's mostly unsatisfying. The PID part is easy, getting a model for the plant and sensor and coupling (delays) is a pain.

For the problem I'm thinking about the plant is a piezo stack that controls the wavelength of a laser. (by changing the angle of an optical g rating.) Besides having a maximum speed at which it can move, it also has hysteresis. (It's really not that important, what I've done works... but I always wonder if I can make it better.)

I'd look into any good book recommendations. Control is such a wide subjec t.

George H.

Reply to
George Herold

I'll think about it, but I so don't think in those terms. In fact, when I'm doing closed-loop control with op-amps I arrange the circuit so that at least the proportional and integrator gains are set by one R and one C, respectively.

Yes. Exactly.

If you really want to wring the most out of it, do a swept-sine measurement of the plant response and then use the data to do your controller design via Bode plot. This requires either lots of careful hand-measurement, a transfer function analyzer (or dynamic systems analyzer -- the name varies), or a computer-controlled sine-wave generator plus at least a two-channel scope connected to a computer for read-back.

(When I close a serious loop in software it gets an analyzer in software, too, that'll do the sine-wave excitation thing. BTW).

You mention elsewhere that the thing has hysteresis -- you can either deal with this by ignoring it and cranking the gain up as high as you can (I recommend a twin-T circuit for the notch that you'll need to deal with the resonance), or you can try to make a circuit that -- at least to some extent -- corrects for hysteresis directly.

If you go as fast as you can while keeping to no less than critical damping, the hysteresis will take care of itself.

If you choose to do the swept-sine thing, be aware that for a really nicely linear plant you can just do one sweep and -- if your controller model is exact -- be done with it. For a plant with monotonic nonlinearities (like hysteresis) that aren't too severe you can do sweeps and _pretend_ that the result represents a linear plant, then design your controller around that (the method is called "describing function analysis"), but you (A) need to take measurements at both small and large excitations, and (B) the apparent behavior of the plant changes with controller tuning, so you have to iterate a bit.

--
Tim Wescott 
Control systems, embedded software and circuit design 
I'm looking for work!  See my website if you're interested 
http://www.wescottdesign.com
Reply to
Tim Wescott

And -- of course -- that fan trainer's software has an analyzer built in. 'cuz while it's not exactly critical, it _is_ made to teach stuff on.

--
Tim Wescott 
Control systems, embedded software and circuit design 
I'm looking for work!  See my website if you're interested 
http://www.wescottdesign.com
Reply to
Tim Wescott

+1. My HP35665A Dynamic Signal Analyzer cost me $300 plus another $50 for an aftermarket all-options ROM that enables all the software features. It only goes up to 102.4 kHz (51.2 kHz in 2-channel mode) but that's usually lots for control systems. It has a lot of comfort features too, as well as allowing programming in HP Basic (which was pretty cool in 1981 when I started using it on an HP 9826). ;)

It's one of my most useful instruments.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
ElectroOptical Innovations LLC 
Optics, Electro-optics, Photonics, Analog Electronics 

160 North State Road #203 
Briarcliff Manor NY 10510 

hobbs at electrooptical dot net 
http://electrooptical.net
Reply to
Phil Hobbs

If I did a lot of analog control systems I'd get one. As it is, I have the equivalent that I can drop into any control loop software and get the same information.

--
Tim Wescott 
Control systems, embedded software and circuit design 
I'm looking for work!  See my website if you're interested 
http://www.wescottdesign.com
Reply to
Tim Wescott

It boggles my mind sometimes, thinking about how spacecraft manage to get from point A to point B simply by somehow digitally filtering and mucking with a bunch of garbage data that's filled with gravitational gradients and noise corruption from some accelerometers and gyroscopes...

Reply to
bitrex

$50

) but

ve

Well, horses for courses, of course (as Mr. Ed might have put it.) ;)

Usually I'm starting from "what should the plant look like?", so control op timization and plant design proceed in parallel.

But of course I'm doing stuff like PLLS, small-scale temperature controller s, and stabilized lasers, not oil refineries and machine tools and hoverboa rds. My control stuff is probably 75% analogue.

Cheers

Phil Hobbs

Reply to
Phil Hobbs

Space navigaton is lower tech than that! they look at the stars and take bearings to them, the sun, and the planets.

--
This email has not been checked by half-arsed antivirus software
Reply to
Jasen Betts

e
?

Oh no worries, I'll follow along and figure it out.

Me too, sometimes an R for each.

)

Hmm I've got an SRS spectrum analyzer, with a sine wave output. That and a split photodiode should get me a reasonable signal. (Changing the grating angle steers the beam around a bit as well as changing the wavelength.)

I've never looked at something like that for mechanical stuff. Hysteresis would seem to imply that there will be an amplitude dependence to the response...or something else?

Hmm... do you talk about this sort of stuff in your book? (I should break down and buy a copy... support your local starving engineer. :^)

So does hysteresis lead to an oscillation? The thing oscillates at ~3kHz, I've always assumed that it was getting near the (mass loaded) self resonan ce frequency of the piezo.

or you can try to make a circuit that -- at least to some

I'm not sure what weak or strong hysteresis looks like. I'm locking to the side of a spectral absorption line... picture a single d ip. I adjust a DC level to give zero error signal ~1/2 way from top to bottom. If I sweep through the dip from one side and then the other the position of the dip moves by (about) 2-3 full widths of the absorption line. (Depending on the over all amplitude of the sweep.)

George H.

Reply to
George Herold

I know that star trackers were used for IMU position updates on the Space Shuttle, et al. but I don't believe they were accurate enough for moment to moment flight adjustments...the next state vector had to be integrated from the previous state vector based on the internal accelerometer and gyro data

Reply to
bitrex

Which is a known technology used in planes long before GPS: INS (inertial navigation system). Why should it not work in space? The problem with drift due to double integration of acceleration can the be easily corrected with the start tracker.

--
Reinhardt
Reply to
Reinhardt Behm

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.