Relation between PLC and Artificial Intelligence ?

Join Date
Oct 2003
Location
Mansoura
Posts
46
Dear All

my apprecaition to all.

Could any one Pls. tell me "could you benefited from artificail intelliegence to the world of PLCs"

I.e. can u use artificail intelliegence Techniques " Neural Network, Fuzzy Logic, Genetic Algorithms,.... " to enhance the function of PLC

Thnaks in advance
 
I used a cut down "inteligent" genetic algorithm for a function once. Actually, genetic algorithms were only the insparation, my solution was just a "try and fit" method. To use the current terms it was an "intelegent designer" method rather than an "evolutionary" method.

It was put in place because some operators kept adjusting a stop bar. The result was that the product would either stop too late and crash into the bar, or stop too early and then creep into position wasting time.

Once the GAL was in place, it fixed itself within a few minutes. This compared to previously where it took a few hours for someone to notice, then find me, then connect to PLC, find the correct section of code, tweak and check etc......

As an aside, while genetic algorithms are a new step forward, I would not ever put a raw genetic algorithm in place to control live machinery. I just don't want to have to clean up the mess.
Since genetic algorithms are based on creating errors in your code, PLCs would also be extremely poor at implementing them. I feel that their role within PLC programming would be for specialised, limited functions that can be carefully controlled.

Hope this helps,

Doug
 
Could you simplify, PLs

Dear

Thanks 4 ur reply. but I am week in English, Could you Pls. simplify

Note: I am a good usuage of Genetic algorithms

Thanks in advance
 
Hmmm, difficult.

English is the only language I'm really good at.

Genetic algorithms are a complex subject, so expressing it in simple terms will be difficult.

I will try something tonight (8 more hours in my time zone).

Regards,

Doug
 
Genetic algorithms require the following:

1, the ability to copy your program

2, the ability to generate a random error in the copy

3, a method of running the original and the copy simaltaneously (at the same time)

4, a method of evaluating which one performs the control task better, the original program or the 'mutant'

To close the loop, the better program is kept and becomes the new original.
The process is continuous.
Over a period of time the code 'mutates' into a 'better' control system.

I believe that genetic algorithms may one day form a part of our PLC programming tools. I do not believe they will ever be directly implemented within a PLC. My reasons for this are part technical and part cultural.

Technical:
A PLC does not have the ability to perform the tasks 1 to 4 shown above.
If a PLC is built with the ability to run genetic algorithms, I can see safety problems occurring as random errors are generated and test run on live machinery.

Cultural:
One side effect of a genetic algorithm is that the code quickly becomes too complex to understand. I like to understand the PLC code, so I personally would be reluctant to run a GAL in my code.

I think I may already have started using complex English. I'm sorry, but this is a vast and complex field that combines engineering, programming and evolutionary biology.

It is now 1 am where I am, I think I will go to bed.

Regards,

Doug
 
PID tuning May need one day Genetic

Dear

May be PID tuning," choosing the parameters of the PID block" use genetic algorithms one day, as GAs may be considered as an Optimization Technques.

anyway, all my special regards to you

Bye
 
I tried that and it really doesn't work.

May be PID tuning," choosing the parameters of the PID block" use genetic algorithms one day, as GAs may be considered as an Optimization Technques.

First, PLCs have nothing to do with artificial intelligence. Artificial intelligence is a hyped up and over used term. Anyone would have a hard time convincing me that artificial intelligence exists, yet, and I won't placate some professor that wants to glorify a simple math algorithm. GAs have even less to do with intelligence and more to do with evolution. This is very inefficient as a lot of trial and error is involved.

I tried making a auto tuning program two years ago using an intelligent trial and error routine. First an evaluation routine is required. There are several techniques. ISE, IAE and ITAE. In each case the goal is to make the same change in SP and minimized the value returned by the evaluation function by changing the PID gains. With a stupid GA one would need to try many trials with different gains and you still wouldn't be sure the best gains were found.

A better way is to change a gain and see if the new evaluation is better than the last. If it is, then make another change in the same direction and repeat until the evaluation no longer get better(smaller). At this point one can choose a mid point the last good gain setting and the last gain setting and keep dividing the intervals in half until the minimum evaluation is reached. Then this procedure is repeated with the next gain. Normally you want to try the proportional gain, the integral gain and finally the differential gain. This procedure may need to be repeated.

One can see this is a much better way than using a GA. A binary search for the minimum is almost optimum.

BUT, THERE ARE FLAWS IN THE BINARY SEARCH APPROACH AS WELL AS WITH GAs!!!!

First, it takes a lot of trial and error to find the gains that return the best ( smallest ) evaluation. This may not take too long with a motion controller, but it may take a long time on a temperature control system. Second, the best (minimum) evaluation may be only barely stable and not very robust!

The first problem can be solved by finding a model of the plant and virtually tuning the model. Running the model allows one to do thousands of trials each second. BUT, if you have the model then why bother? If you have the model then ONE CAN CALCULATED THE PID GAINS. No guessing or trial and error involved.

So now the trick is to get an accurate model and calculate the PID gains. No trial and error is involved. So much for GA.

If a model is not available then use one of the evaluation techniques ( ISE, IAE or ITAE ) to find the gains. Be aware though that in the end you are moving poles and zeros around when you change the PID gains. It is the location of the poles and zeros that determine how the system is going to respond so the real trick is to place the poles ( inverse of a time constant ) at location that will give the desired response. All the gains can be calculated IF you have a model and the model is some what linear.
 
Peter,

It seems you followed the same direction I did with a similar conclusion. I ended up using the same "follow the gain then halve it" technique you pointed out.

In my case I was not optimising a PID controller. I had a well defined problem, and ended up copying in the PLC coding how I would actually optimise tha machine manually.

The advantages of GAs would occur where:
The program can copy the PID controller, so get the benifits of using two loops if that turns out to be an advantage.
Labour savings, where you have a shotage of people like us (or other experts in the field).

The main disadvantages are:
The mess that has to be cleaned up afterwards.
Trouble shooting, if it turns out that you forgot to include something necessary in the selection criteria (oops, start again).
Local optimums, once a GA gets to a local optimum it usually cannot go back to find a global optimum.

GAs have an important role to play in the future of engineering, but I don't think that they are well suited to PLC programming.

Doug
 
I would give GA that much credit.

Doug_Adam said:

GAs have an important role to play in the future of engineering, but I don't think that they are well suited to PLC programming.

Notice that my efforts required divide and conquer scheme and the search for gains were not random. I don't think that GA has a place unless the persons conducting the experiment have no clue as to the final goal. In my case I had a goal. It was easy to tell whether the ISE was larger or smaller after each try at modifying the gains. My search for the optimal gains were not random.
 
You can eliminate Disadvantages of GAs

Dear

You can eliminate The disadvantages of GAs. first you mention the local optimum.

when you search for a solution, you do not know the optimal answer, you search for a solution that is good enough. if you know the answer, you do not need to solve that problem.

so when you get any solution "Ex. local one ", you check it up via performance, if it is good, Ok. , and exit form the GAs.

if not try another: and in that case " local optimum ", you said it is a problem, and i agree with you , to some extent

you can elimiante this by:

1- as your goal now to excape from that local point and search for another , you can use "Roulette wheel selection", to keep diversity in the population

2- If you use the roulette wheel, and still there is a problem
you can keep these "local point " in memory "Tabu search", and then if one point appear in the search you can remove it.

3- to get better you must accept the bad move

so there is a technique called "simulated anealing ", Instead of always going upward, try to go upward most of the time: i.e

"there is a chance to go downward if you search for a maximum point."

Regards
 

Similar Topics

For example, I need to choose PNP sensor for a Sink PLC input. Also do Sinking/Sourcing PLC inputs relay to the PLC reading? e.g. PNP sensor for...
Replies
27
Views
19,787
Hi Guys, I'm Using Delta DVP-ES200R On a project, I wanna Establish an Inverse Relationship Between Two Variables (Speed, Motor AMPS)... I Have...
Replies
9
Views
2,004
Hi, folks. I ran into a situation that has never happened to me. I work in a Big 3 assembly plant and have been tasked with setting up a robot...
Replies
21
Views
9,035
Is there a proper procedure to downloading an updated program to a PLC while maintaining the existing tag values? Specifically, I need to add two...
Replies
5
Views
1,573
Back
Top Bottom