Identify Autotune PID algorithm

Go To Last Post
78 posts / 0 new

Pages

Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


1. I have checked autotune PID for Delta Temperature PID controller for maintaining temperature of oven.

 

2. We set autotune temperature to 75C & current oven temperature is 38C. In attached graph, y axis is reading of temperature divided by 10 so 700 represent 70.0C & x axis is equal interval of reading every 500millisecond.

 

[moderator: no need to use "attachment" for pictures - you can put them inline like this...]

 

 

3. We started the autotune algorithm and measure temperature with our temperature sensor placed closely to delta sensor and with CRO measured the output signal which turn on/off the relay. 

 

4. Here it goes:

a) First relay is given 100% duty cycle and fully on, upto 75C & temperature keep on increasing

b) At 75C, relay is off completely. Temperature keeps on rising as heater is already heating, it falls to 75 in second stage as in pic.

c) Now again delta PID turn on the relay 100% duty cycle, temperature goes below a bit, since it was already cooling & then start rising again in third stage.

d) In fourth stage, it completely turn off the relay, temperature goes up a bit & then falls down to 75C, at this point delta PID shows Autotune complete

e) Then it try to maintain the temperature by maintaining duty cycle according to PID values calculated. Time period is 20seconds & duty cycle varies. 

 

5) Do anyone know which algorithm it may be?  Since no sine in output is observed so most of algo for PID tune are rejected. So it may be:

a) Cohen-Coon Method (Open-loop Test)

b) Ziegler-Nichols Method( open -loop test)

c) Or it may be Delta own algo

d) ANy other algo which fits such kind of graph

6. If its Delta Algo then its ok, otherwise anyone know what else algo it may be? Or how to tune PID values from it

 

 

Attachment(s): 

Last Edited: Wed. Apr 29, 2020 - 10:37 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Vindhyachal Takniki wrote:
First relay is given 100% duty cycle and fully on, upto 75C & temperature keep on increasing

 

PID, Relay????   You have no P, it's just on/off or bang-bang control, the same as the thermostat in your house! What's to "autotune"?

 

Jim

 

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

While autotune it does complete on/off only. Test many times, different set points, different ovens, all uses same algo as I mentioned.

I suspect it uses  Ziegler-Nichols Method( open -loop test)

 

Since in it:

1.Kp=1.2T/l

2. Ti = 2L

3. Td = 0.5L

As mentioned here:  https://www.google.com/imgres?im...

 

 

Calculated PID values from delta controllers are in test in my post(1) are:

1. P = 18.6

2. I = 251

3. D = 62

 

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the link, that is very interesting!

 

 

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

PID is "ok" but you can possibly do things a lot better/smarter since you have a controller.  Things that are trivial with code are almost impossible with an analog circuit...the most they can easily muster is PID, you have many more options.

 

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm with ki0bk / Jim on this.  I think you have over-thought this. 

 

I think it's merely a simple adjustable thermostat -  If too cold, turn on heater; If hot enough, turn off heater.

 

If it is a PID loop, it's miserably underdamped.  You measured 90C in what was supposed to level off at 75!  That's a gargantuan error.  Great theory - but I seriously doubt that's what's going on in practice.  S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What's to say it's not using fuzzy logic? 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Kartman wrote:

What's to say it's not using fuzzy logic? 

 

The Artificial Intelligence that's in the secret spy satellite with the aliens told me over the 5G network that, "In no way should it be misconstrued that I do not disagree.".   devil   S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Here is a good article, please read it before you perform any more programming:

 

https://x-engineer.org/graduate-engineering/signals-systems/control-systems/on-off-control-system/

 

 with our temperature sensor placed closely to delta sensor

What are you talking about?  There is only one sensor.

Your post has failed to provide information--WHY?  State in a clear paragraph what you have & what you want to achieve.   What problems are you facing?

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Thu. Apr 30, 2020 - 03:23 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

1. @ Scroungre , In autotune temperature can go high, after autotune is complete, PID values are calculated, and after that if I set 70C, temperature will rise from current_temp to 75C and set there then there is no overshoot.

 

2. @ avrcandies , what is not clear in my post #1. Didnt I mentioned abt delta algo?

Delta has its own sensor with which its calculated autotune PID and then actual temperature maintain.

We placed our sensor close to delta temperature sensor, and noting their reading to get any idea whats happening. 

 

I have trouble understanding which algo may be implemented and I am trying to achive it my self in C language for MCU. 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Delta has its own sensor with which its calculated autotune PID and then actual temperature maintain.

We placed our sensor close to delta temperature sensor, and noting their reading to get any idea whats happening. 

No, your post said nothing about having two sensors, but now your setup is more clear. 

 

So you are saying the system is working perfectly and there is no problem (yes/no)??   

Instead, you are just trying to figure out what their algoritmn is?  Why?  Why not use your own, you will probably have to do that anyway, unless you have their code.

 

Can you vary your heater drive or is is only possible to be only full on and full off?  (full on/off is called bang-bang control)

 

What coding methods have you made so far?  Can you describe what you have tried?

 

Use a solid-state relay, not a mechanical one and you will have more options (no concern then about mechanical wear & tear)

 

 

 

 

   

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Thu. Apr 30, 2020 - 05:08 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@ avrcandies  because its generic temperature sensor reading.

1. Delta PID is very proven and working fine for us also for heater application.

2. We want to write our own autotune PID code

3.We are trying to figure out becuase its mostly proven and used worldwide and trying to get what works best in industry, and given list of probable algo it may be using in my OP.

I suspect its ZN first method(open loop method)

 

4. First trying to understand algo and then we will do code in C for MCu implementation. SSR are most widely used in industrial oven applications. SSR are onlu used in this application.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Delta PID is very proven 

All PID is based on the delta (error) between the setpoint & the measured, so what do you mean?   It has been proven for many decades!

At least you are using SSR---that will allow many other methods, without worrying about wear & tear of relays.

Why not try one of the algorithms?  You will have to start with one.  Have you even considered a bang-bang?  There is a PWM bang-bang variation (a low freq on/off duty, with overall b-b)...the duty is adjusted 

What power levels is this oven?  1000 W or 10000 W? 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Thu. Apr 30, 2020 - 07:12 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

WOW What a derailed thread this one is!

 

  1. OP wishes to write his own PID Autotuner.
  2. OP has commercial controller from Delta Electronics Inc (A Model No. or link to product page would have been useful).
  3. OP decides to reverse engineer the Autotune algorithm the Delta Controller uses.
  4. OP posts a graph of measurements during the Autotune cycle and asks if any freaks recognise it.
  5. All hell lets loose - telling OP he's doing it wrong.

 

That graph though is interesting it seems the algorithm has measured:

 

  1. Rate of rise of process value with a large error from setpoint at startup
  2. Percentage overshoot from startup once setpoint is reached
  3. Rate of fall of process value from initial overshoot
  4. Percentage undershoot from startup
  5. The same four characteristics again but at setpoint.

 

The above then is the step response from initial conditions and at setpoint.

This is where my control theory knowledge runs out. It was nearly 40 yrs ago I learnt all this and also found it quite a difficult subject.

 

I bet there are some "rules-of-thumb" that apply here because the system is so slow, you may not have to do the full mathematical analysis.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don't believe you can determine what algorithm is being used by looking at the autotune cycle.

Any algorithm is going to be observing the delay time (td), rise time (T), and the process gain (K) during the autotune cycle.

How those values are used in coming up with the PID parameters is what will vary in the different algorithms.

 

However, this autotune seems very different from those I have observed.

What I have seen, is that the autotune will target a point 75% to 90% of the process Set Point for determining its parameters.

Once those parameters are established, the controller will then proceed to the process setpoint.

(Perhaps it is just different for my limited experience.)

 

Edit: Where you might be able to determine the algorithm is after the autotune cycle, by observing the controller actions and process responses. (But I would not want to try to figure it out!)

David (aka frog_jr)

Last Edited: Thu. Apr 30, 2020 - 11:59 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

All PID controllers use the delta between the setpoint and measured parameter, each will have its own implementation of the actual control implementation. 

So determining how each tuning is specifically implemented, just from the response, is probably near impossible.   

It could very well be Z-N of some sort.  The some sort part would be very difficult to reverse engineer.

Once it is tuned, you can apply a step input and prob determine what P I D  values are being used & even that may be difficult, unless the oven and heater characteristics are well known.

Why not just try using Z-N & see how well the final results match up?

Is the graph the similar during normal operation?  If so, as mentioned in #2, it looks more like some form of bang-bang control & may not even be PID.

 

 

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Thu. Apr 30, 2020 - 03:29 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 it looks more like some form of bang-bang control & may not even be PID.

Agreed.

Especially as the dTemp/dTime as the temperature approaches the setpoint is constant until the setpoint is crossed!

 

JC 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DocJC wrote:

 it looks more like some form of bang-bang control & may not even be PID.

Agreed.

Especially as the dTemp/dTime as the temperature approaches the setpoint is constant until the setpoint is crossed!

 

JC 

 

Yep, that bugged me too.  I think the OP's observation that the system stabilizes is more because the oven itself, and its contents, have now come to a reasonably constant value, and so adjusting from there takes very little effort at all, as compared to stone cold.

S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I found two interesting web pages that go some way to explaining Autotune algorithms.

 

https://www.yokogawa.com/uk/library/resources/media-publications/auto-vs-manual-tuning-for-temperature-loops/

 

https://www.eurotherm.com/en/temperature-control-en/pid-control-made-easy/

 

It seems that for a temperature controller the classical methods take much too long, perhaps several hours; also that because heating and cooling are at very different rates the results from the classical methods are far from optimal. Therefore many manufactures "roll-their-own".

 

The Delta Controller in #1 looks like its using a variation of the Cohen & Coon method as described in the Eurotherm document.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

this seems to me like ZS open loop method:  http://techteach.no/publications...

Curve in post#1 has two curves as mentioned in pdf here.

 

1. Now I trying to understand on which of curve this tangent method is applied?

 

2 Also page 4 mentions the formula for PID values where Kp, Ti & Td are mentioned. Surprisingly delta PID autotune parameters after its completed are:   P = 18.6 , I = 251 , D = 62

In Delta Electronics PID you can check calculated PID values.

 

3. if we look on formula page 4
Ti = 4L
Td = 0.5L

 

 

Calculated PID values from Delta PID are always consistent with this formula, we tried very different set point values.

But Delta PID says its PID values while formula in pdf says its KP,Ti,Td values,  but there is striking matching between values & their formulas. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Calculated PID values from Delta PID are always consistent with this formula, we tried very different set point values.

 Does Delta PID imply one is comparing the differences in pid responses to perform an autotune? Maybe multiple passes each make a small adjustment to the parameters & when the changes are small enough, the tuning stops.  

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Will try to implement below method to find tangent on both curves.

Now in microcontroller instead of curves I have values of temperature in array every 500ms. 

So how to find point of inflection and get values of L & T in this in c code?

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

4. First trying to understand algo and then we will do code in C for MCu implementation. 

It seems strange you were asking to determine "which method", which you seem to have ignored.  Now you ask how to program the method you arbitrarily choose.

Have you done any PID coding at all? What has been implemented so far?  You have an array of numbers (data samples) & will have to calculate best-fit slope  and x-intercept. 

Knowing these, you can calculate the T value given the steady state level & the fitted line.

Take your data and do it by hand first....extract the values & put those settings into your PID system...do you get good control response?

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Sat. May 2, 2020 - 07:38 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Vindhyachal Takniki wrote:

this seems to me like ZS open loop method:  http://techteach.no/publications...

Curve in post#1 has two curves as mentioned in pdf here.

I disagree:

In the PDF you linked, Figure-1 is misplaced. It relates to Section-1 where loop stability is discussed. I think you confused Figure-1 as a tuning procedure.

 

{I had written a long post about step responses but replaced with this}

 

You are guilty of not reading the Wikipedia article: https://en.wikipedia.org/wiki/PID_controller .

 

In that there is mention of "Relay (Åström–Hägglund) method" which I hadn't previously heard of, I guess you neither.

... the relay method temporarily operates the process using bang-bang control and measures the resultant oscillations

After reading that section on Wikipedia; I'm convinced  the Delta Controller is certainly using a method based on Åström–Hägglund method.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes its one of following:

1. Cohen-Coon Method (Open-loop Test)
2. Ziegler-Nichols Method( open -loop test)

3.Delta Electroics Own algo

 

My best guess is its ZN open loop due to reason in post#20 I mentioned, and trying to get tangent loop on both curves to get the values.

Yes first want to calculate with values only, will see how close I am & then only will go to c code once its values caluclated on paper are ok.

For this I am trying to read how ot get inflexion point by array of values on paper only.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Vindhyachal Takniki wrote:
Yes its one of following:

 

So sure, but yet so little evidence. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oh I see!

OP's Post #25 is within a minute of my #24. He couldn't have read it.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

e) Then it try to maintain the temperature by maintaining duty cycle according to PID values calculated. Time period is 20seconds & duty cycle varies. 

 

You say it varies ....you mean changing around constantly during the on time?  That is a method to control the amount of output (0 to 100%)... you don't show that

 

Can you read out the PID values that it came up with?  If so, that would greatly help in figuring out what it did.  You have the curves & then the numbers, rather than just the curve.

Since you can probably set the PID values yourself (if you wanted to), it seems like you'd be able to read out what they are after the tuning.

 

 

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Sat. May 2, 2020 - 04:52 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As I mentioned in post#3,

For above graph calculated values are.   Consider these three as equation (A)  . These values one can read from Delta Electonics PID once autotune is done.

1. P = 18.6

2. I = 251

3. D = 62

 

 

As mentioned here:   https://www.google.com/imgres?imgurl=https%3A%2F%2Fi.stack.imgur.com%2F6G8ma.jpg&imgrefurl=https%3A%2F%2Felectronics.stackexchange.com%2Fquestions%2F396028%2Fpi-controller-design-ziegler-nichols-and-unit-step-response-graphing-for-4th-o&tbnid=hJxsSNRwLRsQvM&vet=12ahUKEwj1_czG5I3pAhVXhksFHfgODUkQMygFegUIARDRAQ..i&docid=viLo3yzUxWK-SM&w=1085&h=872&q=ziegler%20nichols%20first%20method&ved=2ahUKEwj1_czG5I3pAhVXhksFHfgODUkQMygFegUIARDRAQ

 

Consider these three as equation (B)

1.Kp=1.2T/l

2. Ti = 2L

3. Td = 0.5L

 

 

If we look closely equation A2 & A3, are closely related to equation B2 & B3.

We tried on two type ofoven with different set points also, this equation always hold.

However Delta PID mentions it as PID values, while formula wise these are Kp,Ti & Td values.

 

 

 

@ N.Winterbottom  thanks, looking it this method now.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

1. Here is another tuning result,  at 80C tuning, blue axis shows the temerature graph scaled to 1. Temperature 10000 indicates 100.00C.

 

2. Red axis is on/off relay.  This is scaled to 10000.  Off means 0 value & on means 10000 value,  this is scaled so that both curves can be compared. 

 

3. My external sensor has some lag in setting temperature, while delta sensor has less lag so it may happen that:

a) During heat, delta gets to 80C fast, meanwhile my sensor is it 78C around

b) Similarly during cool i.e zero pulse, delta temp falls early then my sensor. 

 

After tuning is PWM start happening which then try to maintain temperatrure with PID

 

Calculcated PID values from Delta Electronics PID : 18,302 & 75.

 

4.I have attached excel:  https://drive.google.com/open?id...

a) First colum, is time, this timestamp is from PC, from MCU I take and send read every 500ms.

b) Second column, is temperature/100

c) Third is pulse ssr on/off

d) Fourth is pulse multipled by 10000 just to scale.

 

 

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have suspect that what Delta electronics write are P,I,D values, are actually Kp,Ti & Td values.

where Ti=Kp/Ki  & Td=kd/Kp

 

In attached pdf, page 3 shows how to calculate Kp,ti & Td values.

Little math & it can be shown that Ti=4*Td always.

 

Delta Electronics PID valies,  "I" is always a multiple of 4 of "D".  

We tried in more than 20 setups all give same relationship.

 

I may be wrong here.

 

 

 

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

3. My external sensor has some lag in setting temperature, while delta sensor has less lag so it may happen that:

Why do you not log the controller sensor?  Then you see what it sees & your hypothesis will be easier to match to the situation. 

 

Also, apparently you mean the controller sensor.  Since we are discussing calculations, calling it a delta sensor implies it is performing some mathematical operation (likewise, you could have a peak sensor, or an rms sensor).  So, avoid any potential confusion in the description. Or just call it the sensed temperature.  

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The relay method mentioned in #24 seems like a good bet.  Astrom is well known in the controls world (IEEE Fellow I'm sure).

Why not go read the referenced article and go with that?   If the control stuff is not your suit go hire someone.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here is another Astrom paper that might bear some fruit, it mentions:

 

Another method is to calculate L as the time interval between the step change and the moment the measurement signal crosses a certain small level. The time constant T is then calculated as the time to reach 63% of the final value. This method is also sensitive, since the calculations are based on a few values of the step response only.

 

 Another method, which is based on determination of areas can be used. See Figure 2b. In this method, gain Kp is first determined from the steady-state value of the step response. Area Ao is then determined.

https://www.sciencedirect.com/science/article/pii/S1474667017507624

 

 

Astrom also says:

Derivative action is quite useful for systems which also has lags as we found in Section 5. Derivative action is, however, of limited value for systems that are dead time dominant.

https://www.sciencedirect.com/science/article/pii/S1474667017382162

 

 

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@ avrcandies  logging Delta Electronics PID temeprature sensor notpossible, as sensor controlelr using it to measure temperture, there is no temperature output from controller.

 

https://www.sciencedirect.com/sc...

This article page 3 mentions for strady statte Kp state to reach, but in our method its oscillatory, since we are assuming Relay on/off completely.

Or i am understanding here wrong?

 

So I took reference from pdf mentioned in #31 post. 

 

 

Here is another good article:  https://www.controleng.com/articles/relay-method-automates-pid-loop-tuning/

but formula are not clear here, due to formatting issues i suppose.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If the controller you have is working fine, why don't you just use that, or get another?  It seems like you are mostly going to be guessing what it is truly doing.  You will never be certain how it calculates internally.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

1. Want to write own PID autotuning algo. Tried earlier with ZS-closed loop and matlab methods but found them difficult to control.

2. This relay method seems very good and in pdf attached it seems like many companies use it also.

3. Tu value :  Page 3 mentions of pdf, in it Tu for control effort seems symmetrical i.e equal Ton & Toff.  But in our case its no equal, should I take it as Tu as in image below? 

4. b value:  Similarly page has formula nad graph: Pu=4*b/pi*a . In my graph "b"  is not symmetrical  . Have mentioned in graph. Will it be same?

5.  a value :  a is amplitude of control voltage. What value should I take here? 

In Delta controller PID, MCU is 3.3V powered, it drives a 12V transistors  which drives a SSR relay to urn on 220Vac/50Hz ac on/off for heater.

So should i take value of a = 1(high) , 3.3V,12V?

 

 

 

 

 

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The solution is quite simple: open the Delta unit up, identify the microcontroller. extract the code and reverse engineer. You'll have a solution much faster than the hit and miss method you're using at the moment.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@kartman , ofcourse we have opened Delta unit and identified the MCU and know its part too.

But we wanted to know exactly which is currently stable product in market and tried to emulate that.

 

Now we are trying to caulcate values based on our understanding as in post#37 , based on pdf we found for relay tuning method.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you want to implement a controller method, why even restrict yourself to PID?   In the days of analog electronics, PID was something that could easily be put into place with some opamps, caps and pots.   However with a micro, not only can you easily implement PID, you can easily implement other things that would take a truckload of opamps to do, if even possible at all.   

 

For example, even the dirt simplest moving average filter  Y(n)= X(n)/2+X(n-1)/2  (avg the current & last data points), which is trivial in software, is nearly impossible to build with just an assortment of opamps.  So software allows you to leave the PID behind in the dirt and develop many improvements previous designers could not imagine. Of course, PID lives on,as they say, not that there is anything wrong with that 

 

Not That There'S Anything Wrong With That Seinfeld GIF by myLAB ...

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Wed. May 6, 2020 - 07:15 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

now i am stuck in calculating values of Ku & Tu by formula, as in post#37.

Many different articles have different formulas for same relay method, we are trying as in pdf attached in that post and see the results.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Well doesn't the article mention it:

At that point, it applies a negative step and waits for the process variable to drop back below the setpoint. Repeating this procedure each time the process variable passes the setpoint in either direction forces the process variable to oscillate out of sync with the control effort but at the same frequency. Although the process variable’s oscillations aren’t strictly sinusoidal, their period turns out to be a close approximation of the ultimate period that Ziegler and Nichols used for their tuning rules. And the amplitude of the process variable’s oscillations relative to the amplitude of the control effort’s oscillations approximates the process’s ultimate gain when multiplied by 4/.

 

What do you mean by "you are stuck"?   If you have you own method you won't be stuck, since you are the one creating it.  You will have a long road trying to match your programming of an algorithm against another unknown algorithm.   If they differ just a little (either the method or any of the numbers), waveforms will be a difficult comparison...so what will you end up finding out? Probably either nothing, confusion, or both!

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Wed. May 6, 2020 - 08:51 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@ avrcandies  , based on that I had marked what I thought of Tu & b values in graph. 

1. Didnt take Tu & b values on first cycle, since its when the heater starts, second cycle can be repeated again and again. I think my understanding here is Tu & b should be second cycle only.

 

2. Now need to know how to select value a? 

a is amplitude of control voltage. What value should I take here? 

In Delta controller PID, MCU is 3.3V powered, it drives a 12V transistors  which drives a SSR relay to urn on 220Vac/50Hz ac on/off for heater.

So should i take value of a = 1(high) , 3.3V,12V?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As mentioned many messages ago, the PID controller typically outputs an analog amount  P+I+D terms to the process, like a gas pedal in your car.  This is what the papers you are following assume.   However, you have a relay control system, on or off.  Thus it is not exactly an apples-to-apples comparison.   If the on/off is PWM'd (looks like they might be doing do that at the far right of your graph) then you might be able to calculate an equivalent PID effect.   As far as a paper to follow, you might be better to look at one referencing using a relay output situation during normal operation (I'm not talking about relay tuning method).

In either case, with this setup, the control effort is the amount of heat (including any pwm factor) you are applying (you can scale any subsequent normal operating calculations to that amount). B/A is a gain ratio, where A is input.    You know the power in (A) & the response out (B).

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Wed. May 6, 2020 - 08:49 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But we wanted to know exactly which is currently stable product in market and tried to emulate that.

44 posts on this Thread and I still don't understand what this is about.

 

Who cares how another vender wrote their control algorithm.

 

What is your ultimate hardware platform, and how will your device compare against the competitor?

 

As mentioned above, there are many control algorithms, and many / all of them need some fine tuning for the best performance based upon your actual hardware.

 

Your goal, I would think, is not to emulate another product, but to exceed its performance.

 

To do that you can start with a clean slate, you don't need to know their algo at all.

 

JC 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


Vindhyachal Takniki wrote:
So should i take value of a = 1(high) , 3.3V,12V?

I can't believe you even suggested 3.3V or 12V. They're clearly silly values.

 

The Delta Manual has this picture:

In common with most Temperature Controller manuals it explains Jack S**t but lets assume Pb is "proportional band" and the other descriptions indicate this is a percentage. Therefore a=100.

 

I skipped your attachment in #31 because I thought it was in Italian. It is actually in English and is quite a good explanation.

 

So lets work your numbers through their calcs.

 

Again from the PDF you had in #31

 

 

 

So:

 Î” = 100 (%)

 a = 4 {Estimate in °C from your graph}

 Îµ = 0 {I couldn't see any hysteresis in your graph}

 Pa = 704 {Again; you can do much better from your graph than me (4225 - 2817)/2 }

 

Using:

        4 * Δ           400

Ka = -----------  =  -------- = 31.83

        Ï€ √ a2         Ï€ * 4

 

Pa = 704

 

We can stick these into the table:

 

Kp = 0.6 * Ka = 19.1

Ti = 0.5 * Pa = 352

Td = 0.125 Pa = 88

 

OK - Not hugely different to Delta Calculated Values.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@ N.Winterbottom thanks for reply.

1. How do you come with a=4  (its approx value) . Is it half of min & max diff? 

In graph :

a) setpoint: 80C

b) max temperature in green region: 90.07C  (between pulse high to low and then high again)

c) min temperature in green region: 79.79C   (between pulse high to low and then high again)

d) exact time period as in green arrowed line mentioned : 841 sec

e) there is slight lag between temperature measured by Delta sensor controller and our own sensor placed alongside. So slight error wil be there

 

 

 

2. Tu Time period of pulse can be measured easily as mentioned in arrowed green line.

But I have doubts on how to measure amplitude of temperature varaitions.

 

I have three pdf links, each having below mentions abt amplitude:

a) https://fenix.tecnico.ulisboa.pt...

Its page 3

 

b) second pdf I have attached.   Its page 3

 

c) https://aiecp.files.wordpress.co...   

its page 48

 

 

4. In all images below, all three pdfs mentioned "a" is ampltiude of oscillation of temperature.

But in all they assume some sine wave, so ampltiude of (0 to +peak) & (0 to -peak) seems equal, but in our case its different.

temperature goes higher on positive side i.e  

a) setpoint is 80C, max goes to 90.07

b) setpoint is 80C, min goes to 79.97

 

so in this case what value should I take as amplitude? I have doubt in that?

 

 

 

 

 

 

 

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

Maybe get a really good PID reference like:

https://books.google.com/books?id=edCcDwAAQBAJ&pg=PA99&lpg=PA99&dq=Magnitude+Optimum+Multiple+Integration+(MOMI)%E2%80%9D+method&source=bl&ots=1plDKLj0q_&sig=ACfU3U09-plKEJtGdea3enVV6ht1k7YhOA&hl=en&sa=X&ved=2ahUKEwi2pfXc4KnpAhWQbc0KHQzbDqwQ6AEwBnoECAkQAQ#v=onepage&q=Magnitude%20Optimum%20Multiple%20Integration%20(MOMI)%E2%80%9D%20method&f=false

 

Also, I found another source (different than above link), that gives all the calculations for the following auto tune diagram...however they do calculations quite differently to get the final PID values.  however, they give a long explanation of how they do it with an example.

This is the diagram they calculate from:

 

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Sun. May 10, 2020 - 05:13 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Vindhyachal Takniki wrote:

1. How do you come with a=4  (its approx value) . Is it half of min & max diff? 

I looked at the graph in #1. You said the Setpoint was 75°C and I saw the peak get to 79°C.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


@ N.Winterbottom  Ohok, I thought its graph, in later post.  In first graph I think it was typo. I suppose it was 72C around.

I have seem we get pretty close value if we take a=255. Today we performed three test, 2 on medium size and one on large oven.

 

1. 100C autotune on medium oven.  With a=255, these are values of PID which we get vs values of Delta Electronics PID.

a) Our PID values:  19.677,   294,  73.5

b) Delta values: 20.0,  260,   65

 

 

 

2. 150C autotune on medium oven.  With a=255, these are values of PID which we get vs values of Delta Electronics PID.

a) Our PID values:  19.677,   233.5,   73.5

b) Delta values: 20.0,   232,   58

 

 

 

 

3. 100C autotune on large oven.  With a=255, these are values of PID which we get vs values of Delta Electronics PID.

a) Our PID values:  67.17,   313,   78

b) Delta values: 5.8,   270,   67

 

 

 

Looks like in large oven, our formula some how fails.

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Edit: In above post,  a=255 means the relay output taking it as 255 i.e full 8 bit timer PWM

the amplitude I took is difference between +peak & -peak during entire cycle, not just 0 to +peak.

Pages