Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PID source code for pic 16f877a

Status
Not open for further replies.

haytham

Full Member level 4
Joined
Jun 6, 2004
Messages
228
Helped
16
Reputation
32
Reaction score
3
Trophy points
1,298
Activity points
1,365
pid autotune source code

Hi
I am looking for PID control algorithm with self tune to use it in controlling a Heater using PIC MC and PICC compiler.

Could anyone help?

Thanks

Added after 21 minutes:

Hi
I forget to say that heater output will be the PWM output of the PIC16f877

Thanks
 

pid autotuning sample code

From memory:

Control Theory states:
All PID control loop factors can be acquired by inputting a step
function to the control system and monitoring the system loop response.

Can't recall exact details but with temperature control loop this should
be relatively straight forward to implement and adapt for seft-tune.

hope this helps Polymath
 
self tuning pid vissim

u Should use Neural Networks or Fuzzy-Neural Networks to agree this.
 

self tuning bacnet pid

Hi all
I am searching for a ready to use code if possible
could any one help ??

Thanks
 

tune pid

i am also in search of a PID controller source code....... will anybody plz help...
 
zigler nichols

Well may be you could use Fuzzy-Neural Networks or may be not - its one of those things - today it would be obvious but tomorrow it may not be so clear.

Decisions, decisions if only there was a method of making a lot of simple little decisions would that equal one big decision - I'm not so sure now.

Polymath - I think.
 

auto tune or self tune pid

Here's an example PID code in C:
 
code fuzzy self-tuning pid action

Sorry for bad Englees!javascript:emoticon(':cry:')
Crying or Very sad

For Selt Tuning you can do the things that I am Working on. Suppose you have a temprature control system, whose output is temperature and input is voltage.

Now by following the zigler nichols open loop test (as temp. sys are slow (1st or 2nd order sys)), javascript:emoticon(':arrow:')
Arrow
1) Make sure the temprature of the heater is at room temperature before starting the
controller.
2) Set the desired temperature (35 deg) (optional for auto tuning)
3) Now apply the Step signal (Voltage using D to A) ~= 10 V to heater for 5 min.
4) Measure the Temp. using any semiconductor Temp. Sensor (IC) at an interval of .1
sec or .01 sec. (depends on the enviormental and other conditions and RAM) and
store it into RAM.
5) Now after 5 min, record the last data and stop measuring it. This value is the Steady State Value of the Temp from which we can get the Value of Process Gain K.
6) From above stored data now we can determine the rise time Tr (time for reaching 90% of the Steady State Value-Calulated from the step 5).
7) From this two values we can find the approximate values of Kp, Kd and Ki (Zigler Nichols Table) which will work fine in most situations but with high overshoot and sometimes unstable systems.

I have done this using PIC16F877 and asm. language. But as is it is prototype there is no need to post the code and schematic. I am also trying to implement other methods and see which one is more suitable for autotuning and then post the Zip file. May be it will take 2 or more months approx if not drop the idea.

:cry::cry:
 

PID+self tune

Hello All

I am finding diff. in implementing PID controller for temperature....... i need to implement in c code..whats the formula How can use integral of differentiator in c code with lower level controller & Compiler IDE,

Added after 14 minutes:

PID:

I am using 89V51RD2 Controller for controlling temperature 0 to 400.

How to map pid o/p with actual o/p. I can't understand on what basis I can decided the
Firing angle (DAC o/p) b'coz in any case my o/p and tempreture has not any certain relation.
response time of diff material is also different.

any suggestion of ans code in C?
therotical concept of implementation?

???????????????
 

    V

    Points: 2
    Helpful Answer Positive Rating
    V

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top