ISE Calculation in PLC

Join Date
Apr 2002
Location
Burlington, Ontario
Posts
186
Anyone can answer this, but I'm hoping Peter can comment on his quote,

Here is a trick that I use. Each scan I calculate the error between the SP and PV. I then square this error and add it to a running sum after a change is set point. The process industry calls the ISE ( integrated squared error ). Once you have the ability to calculate the ISE one can adjust a gain and try the change is SP again.

You are constinously calculating the square of the error. Are you only adding to the running sum of the squared error AFTER a setpoint change?? or do you allow the calculation to continously calculate?? If it continously calculates, then as your process changes, your ISE value changes..correct?? The ISE value will change regardless of a change in setpoint.

The reason I'm asking is that I want to try it on one of our processes. I'm continously calculating, but the ISE number changes with process load changes, as expected. Is that how it should be calculated??

Any feedback would be appriciated..

Thank you,

Andrew
 
Good question. I was going to get around to this later when we actually get to doing some PLC code. I am glad someone is finding a use for this.

Andrew Evenson said:
Anyone can answer this, but I'm hoping Peter can comment on his quote,

You are constinously calculating the square of the error. Are you only adding to the running sum of the squared error AFTER a setpoint change?? or do you allow the calculation to continously calculate??

I would issue the move command from the PLC and when I got a valid status back that the axis started to move I would zero the ISE and calculate the first error squared to add to the ISE. I would continue to do this until a fixed number of scans or time has gone by.
You must also be sure that you are making exactly the same move so you can do a apples to apples comparison.


Andrew Evenson said:

If it continously calculates, then as your process changes, your ISE value changes..correct?? The ISE value will change regardless of a change in setpoint.
That is why the ISE must be updated for a fixed number of scans or time. The period over which the ISE is updated should be long enough to record the whole move but not much longer.

Note, we build this into our product and many other motion products do similar things.

Andrew Evenson said:
I'm continously calculating, but the ISE number changes with process load changes, as expected. Is that how it should be calculated??

For a continuous process I would use the ISE and a queue or array. Each scan or update period I would add the new squared error to the ISE and insert the new squared error on the head of the array. I would also remove the old squared error from the tail of the array and subtract it from the ISE. You may need to subtract the old squared error at the tail of the queue or array first so there is room for the new squared error. The array length and sample time can be adjusted to suit your application.

You will need a rung that clears the array and the ISE.

The key point is the the ISE should be for a fixed time.

A simpler way to do this would be to just zero the ISE and integrate errors using a timer. When the timer expires you stop. This is a batch process. I like the earlier continuous process better.

Let us know how it works out!
 
Last edited:
Ill give it a try..

Peter,

Thanks for your response. I am actually trying this on a temperature loop. Do I have the wrong application for it?? The loop is slow, approx. 15min time constant. Would the ITAE calculation be better??

I will play around with it and let you know how it works. I't would be nice to see how this really works in a plc environment because I have a position regulator to tune up in the comming future, which this might come in handy for..

Thanks,

Andrew
 
Re: Ill give it a try..

Andrew Evenson said:
Peter,

Thanks for your response. I am actually trying this on a temperature loop. Do I have the wrong application for it?? The loop is slow, approx. 15min time constant.

That is long. This is an eternity compared to what I am used to in motion control. It takes 5 time constants for the value to reach steady state in response to a manual change in the control. A PID should be able to do much better a PID may still take 2 to 3 time constants to get to the final set point. This equates to 30-45 minutes. If the PID is updated every 6 seconds then you will have 300-450 squared errors in the array when doing a continous ISE.

Andrew Evenson said:

Would the ITAE calculation be better??

I would use the ITAE whenever you make a step change in the set point.
When making a set point change I would clear the ITAE and start a timer and then start integrating the time*abs(sp-pv).

I would use the ISE for when the set point not changing in steps.
This would be good for monitoring the response to load changes.
You may need a big array to hold enough squared errors.

You can do both ISE and ITAE so you can use the one that fits the situation just as I did in the latest spread sheet.
 

Similar Topics

Hi!! I'm looking for Temperature rise calculation software from Rockwell, I just download "Product selection toolbox 2022" but this software is...
Replies
1
Views
236
I don't have a whole lot of experience with RSLinx Enterprise or I guess it's also called FactoryTalk Linx. We have a Rockwell FTView SE based...
Replies
0
Views
37
Hi All, I'm keep getting double quotes in between selections rather than the beginning and the end. Here's the script and please help to find...
Replies
7
Views
822
we have same HMI 2PC / SET LOCAL STATION version 9.0 patch 2021.dec and win10 pro v18.xx 1pc install logix5000 v19 v20 It was going well...
Replies
0
Views
212
Hi, These is an already working plant with HIMA PLC that has a Siemens Comfort Panel HMI connected via Ethernet. HIMA is type 51QHS. I want to...
Replies
0
Views
291
Back
Top Bottom