Searching \ for 'PID question.' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/io/motors.htm?key=PID
Search entire site for: 'PID question.'.

Truncated match.
PICList Thread
'PID question.'
1998\03\06@081440 by Mark Lezama

flavicon
face
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

1998\03\06@125029 by Justin Grimm

flavicon
face
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    spam_OUTreaperTakeThisOuTspamsouthwest.com.au


----------
{Quote hidden}

1998\03\06@174334 by Calvin

flavicon
face
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 removed}

1998\03\06@233639 by Mike Keitz

picon face
On Fri, 6 Mar 1998 14:23:05 -0600 Calvin <.....tgoKILLspamspam.....CHIH1.TELMEX.NET.MX>
writes:
>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.

It depends on what the process is of course.  For simple fast processes
I'd agree that analog can work well and digital offers no advantage (I
won't go as far as to say that PID is "inherently analog" though).  For
example, I have a Magnavox CD player (ca. 1984) that uses op-amps
throughout the servo loops that keep the laser beam on track on the disk.
I suspect newer players still do this process mostly analog, it's just
buried in the big chips.

Analog has the neat feature that you can just wire in some potentiometers
and unpluggable capacitors and play with it until the control is
"optimized."  This can be hard to explain to the boss though.

On the other hand, if the process is slow enough that the time constants
in the integrator and differentiator run to seconds or minutes, analog
components to do that can get unwieldy.  Or if you want or need to add
various nonlinear special cases ("fuzzy PID" ???) it may be best to go
digital.


_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

1998\03\07@094527 by Mark Lezama
flavicon
face
Yes, you are right. but I have and interface with a host computer, and the
parameters need to be change from a long distance. Is there any way to do this
with OP-amps? at lest in digital comuniation.

Mark Lezama

Calvin escribis:

> 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 removed}

1998\03\07@094913 by Mark Lezama

flavicon
face
Thanks Justin. I will try to implement. I think is the problem is the # of
bit I have to use a floting point rutine. BTW, in the formula I dont know
what means "Time since error ocurred", maybe Is a fool question but I am
trying to understand anything before implement the code.

Mark Lezama.

Justin Grimm escribis:

{Quote hidden}

1998\03\08@043220 by Justin Grimm

flavicon
face
No worries, Mark
Time since error occured means- the time (in minutes) since the error
was last zero  i.e. PV = SP. The integral multiplies the 'GAIN constant' by
the ERROR. The result is then multiplied by the 'INTEGRAL constant'
(repeats/minute)
and then multiplied by the TIME since the PV "last" equalled the SP.
The TIME for this calculation should be in minutes or any part of.  i.e.
2.039 minutes.

As you can see the integral component corrects for the offset over time.
I hope this helps
Let us know of your progress
Justin Grimm    KILLspamreaperKILLspamspamsouthwest.com.au


----------
> From: Mark Lezama <RemoveMEmfidelTakeThisOuTspamTELCEL.NET.VE>
> To: spamBeGonePICLISTspamBeGonespamMITVMA.MIT.EDU
> Subject: Re: PID question.
> Date: Saturday, 7 March 1998 22:45
>
> Thanks Justin. I will try to implement. I think is the problem is the #
of
> bit I have to use a floting point rutine. BTW, in the formula I dont know
> what means "Time since error ocurred", maybe Is a fool question but I am
> trying to understand anything before implement the code.
>
> Mark Lezama.
>
> Justin Grimm escribis:
>
> > 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
{Quote hidden}

to
> > > implement.
> > >
> > > Thanks in advance!
> > >
> > > Mark Lezama

1998\03\08@043803 by Justin Grimm

flavicon
face
Also Microchip's AN531 app note on their website has some PID code in it.
Good luck
Justin Grimm    EraseMEreaperspamsouthwest.com.au


----------
> From: Mark Lezama <RemoveMEmfidelEraseMEspamEraseMETELCEL.NET.VE>
> To: RemoveMEPICLISTspam_OUTspamKILLspamMITVMA.MIT.EDU
> Subject: Re: PID question.
> Date: Saturday, 7 March 1998 22:39
>
> Yes, you are right. but I have and interface with a host computer, and
the
> parameters need to be change from a long distance. Is there any way to do
this
> with OP-amps? at lest in digital comuniation.
>
> Mark Lezama
>
> Calvin escribis:
>
> > 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 removed}

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...