While the analog solution may be elegant, there is nothing inherently analog about generating a correction signal that is the sum of three terms; one proportional to the error, one proportional to the time integral of the error, and one proportional to the time derivative of the error. Thanks for listening Dave ---------- > From: Calvin > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: PID question. > Date: Friday, March 06, 1998 3:23 PM > > Comment: > > PID controls are inherently analog. This does not mean they cannot be > implemented digitally, but it is generally a lot easier to do it with one or > two op-amps. > > Just a thoght > > Calvin > > > -----Original Message----- > From: Justin Grimm > To: PICLIST@MITVMA.MIT.EDU > Date: Viernes 6 de Marzo de 1998 11:45 AM > Subject: Re: PID question. > > > >Funny you should ask, Im working on the same project at the moment. > >The only problem Im having is the maths routines, they seem to be getting > >up to > >64 bit. > >The actual calculation is- > >dMV=G[dE + E*T1*I + D* (dE/T2)] > >where- > >dMV = change in Manipulated Variable > >G = Gain (100/Proportional Band) > >E = Error (SetPoint - ProcessVariable) for reverse action, > > Error (ProcessVariable - Setpoint) for direct action > >dE = ErrorThisScan - ErrorLastScan > >T2 = Time between scans (in minutes) > >T1 = Time since error occured (in minutes) > >I = Integral time (R/M) > >D = Derivative time (minutes) > > > >There are other things to consider as well, integral windup, bumpless > >transfer > >from manual to auto, etc > > > >Anyone knowing any alterations to this equation or anything else > >that might make writing this code easier are most welcome to reply > > > > > > > >Justin Grimm reaper@southwest.com.au > > > > > >---------- > >> From: Mark Lezama > >> To: PICLIST@MITVMA.MIT.EDU > >> Subject: PID question. > >> Date: Friday, 6 March 1998 21:09 > >> > >> I have working with RTU designe base in PIC16c74. I have to control a > >> valve with a 4-20 ma signal, but I want to implement a digital PID > >> controller, anyone here have a PID code or can explain me how I have to > >> implement. > >> > >> Thanks in advance! > >> > >> Mark Lezama > >