ML1200 and PID

azecraze

Member
Join Date
Mar 2004
Location
New Zealand
Posts
73
Before I go on with anything else, I would first of all like to thank all who helped me thru a very difficult time I was having a few months ago while setting up a mini hydro power plant. This is in relation to analog input to a ML1200 PLC.
Special thanks to Tom, Ron & Mtn_Bkng_Dave.

Here is the post in question.

Ok now to recap on that:

I have a turbine running at 50Hz no load and as I increase the water supply to the turbine, the load is proportionally increased via a Watlow load controller to an element bank load dump. With no PID control, this causes a steady state oscillation of 6 Secs. (The water increases the speed, so the load is increased, so the turbine slows down, so the load is dumped etc etc etc).
I have set up the PID in the PLC using the method described in the ML1200/ML1500 manual and that smooths it out just fine. In fact I am very pleased with the way it has smoothed it out. This then means that as I add actual a SMALL user load to the turbine the load is nicely transferred from the load dump to the actual user. Great Great Great.
The problem is that there is a very poor response to a LARGE load change.
eg 20% of the CV
Invariably, the PID does not think that it should be dumping load to compensate for the increased load and the turbine underspeeds, and that is the end......
So I try tweaking I and D and this causes violent response.
Any ideas as to the correct procedure to correct this would be great.
 
Good idea, I have read a few of yours already, but getting my head around some of it requires more than my puny mind can muster. It's too easy (lazy) to ask a pro!

So how do I implement feed forwards???
 
Last edited:
Feed forward implementation

You should have an idea of how much flow is required for 10% 25% 50% 75% and 100% load. This may or may not be linear. You need to use this data to compute a function or look up table that provides flow as a function off load. Think about it. You should be able to get very close without a PID. If you know the the load is 50% load then you must compute how much flow, say 50% and use this as the bias on the PID. The more accurate the feed forwad function the better the PID with bias will be.

Can you provide us a list of data points for required flow as a function of load? We can then help you with the bias ( feed forward ) function.

In addition, can you provide the data from a RSLogix trend. You know you can plot the SP, PV and CV. This data can be most helpful as I can use it provide a model of your system.
 
Last edited:
I am not actually using the flow to control the load, I am using the frequency. The flow remains constant and the total load never changes.
The load is either sitting in the buffer (PV) or someone has turned on a light or motor etc and it is reduced on the PV to compensate.

eg
Element Bank (PV) , User Load , Hertz
100% , 0% , 50
50% , 50% , 50
25% , 75% , 50
10% , 90% , 50
1% , 99% , 50


I am quite sure that what you are mentioning, I tried a couple of days ago. I put a DIV block in AFTER the PID and it was tracking the CV so that for every HZ that the speed dropped, it divided the CV by a certain value to compensate. The lower the Hz, the more the division. This I might add was very hard to tune and made the PID blink quite hard. A bit over aggressive mainly. I think from what you are saying, I need to add or subtract bias to the PV instead. Am I correct?

Well actually I am about to purchase RSLinx ( I only have RSLinxLite)
and then do some DDE to Excel and then maybe post the data here.
I am have plenty of PV and CV data and no way to plot it. I think I was a bit premature coming here and not being able to present it.
 
Now I am confused

azecraze said:
I am not actually using the flow to control the load, I am using the frequency. The flow remains constant and the total load never changes.

1. This water turbine is turning a generator isn't it?

2. Doesn't the load change every time you turn on another electrical device?

3. Doesn't this cause the turbine generator to slow?

azecraze said:
The load is either sitting in the buffer (PV) or someone has turned on a light or motor etc and it is reduced on the PV to compensate.

eg
Element Bank (PV) , User Load , Hertz
100% , 0% , 50
50% , 50% , 50
25% , 75% , 50
10% , 90% , 50
1% , 99% , 50
[/B]

Shouldn't the SP and PV be 50HZ? The CV, output to the DAC, changes as the load changes to keep the PV at 50HZ.

Isn't there a valve that controls flow to turbine or causes water to bypass the turbine? Which is it? The table seems to indicate that the valve causes the water to bypass the turbine.

azecraze said:
I am quite sure that what you are mentioning, I tried a couple of days ago. I put a DIV block in AFTER the PID and it was tracking the CV so that for every HZ that the speed dropped, it divided the CV by a certain value to compensate. The lower the Hz, the more the division. This I might add was very hard to tune and made the PID blink quite hard. A bit over aggressive mainly. I think from what you are saying, I need to add or subtract bias to the PV instead. Am I correct?
[/B]

We need the CV as a function of the load. This value will be applied to the BIAS. Feed forward is usually applied to the BIAS or SP. To keep things simple I suggest the BIAS for now.

azecraze said:
Well actually I am about to purchase RSLinx ( I only have RSLinxLite)
and then do some DDE to Excel and then maybe post the data here.
I am have plenty of PV and CV data and no way to plot it. I think I was a bit premature coming here and not being able to present it. [/B]

The trend feature is in RS Logix. You can save the acquired data to a file now. Zip and attach this data.
 
as I increase the water supply to the turbine, the load is proportionally increased via a Watlow load controller
The flow remains constant and the total load never changes.
So which is it? constant or not?

If I can guess correctly, you have no vane control on the turbine and use a variable dummy load to control frequency, i.e. by maintaining a constant load. Sounds like a big waste of water.

So, as Peter has said, SP is 50Hz, PV is actual frequency, and CV is output to the load controller.

What is the range of the load?
What increments do you have on the dummy?
What tolerance do you have for frequency? (50 +/- 0.5 ?)
 
Greetings azecraze,

this is just a quick note (just in case you need it) on how to set up the Trend feature in RSLogix500 ... you will not need to invest in a full-featured copy of RSLinx to do this ... (important note: not all versions of RSLogix500 have this built-in Trend feature) ...

[attachment]

Step 1 ... right-click the Trends icon and select “New” from the menu ... example: use “TRYME” as the trend’s name ...

Step 2 ... right-click the chart area of the trend and select “Chart Properties” from the menu ... set up the pens, scaling, etc. with entries that will make sense for your particular system ...

Step 3 ... now graph your system’s response to a few tests ... once you get some good data displayed on the graph, right-click the chart area of the trend and select “Create Snapshot” from the menu ... example: use “TRYME” as the snapshot data file’s name ... and keep the “.DBF” file extension ...

Step 4 ... now you can open the “TRYME.DBF” file with Excel ...

Step 5 ... you can also create an Excel graph to help analyze the data ...

once you’ve got the data captured in a “snapshot” database file, you can zip the file and post it on the forum ... Peter can then take a look at the data and work his mathematical magic on it ... also ... it might be a good idea to post a screen shot of the graph so that everyone else can see what’s going on even without using Excel ...

hope this helps ...

snapshot.jpg
 
I have to suspect the biggest problem is going to be load prediction. It looks like the relationship between the dump requirement and the load requirement is very straightfowrward (you need to dump everything the load doesn't use). However, how do you predict the load? How do you know in advance that someone flipped the lightswitch? How do you know the size of the bulb in the light fixture? This would need to be a very tightly coupled electrical grid with a reasonably small number of known loads to be able to make any kind of load prediction.
I suppose a simple proportional feed forward that uses the measured load current to quickly adjust the dump value might work. But I suspect that would be very prone to oscillation. Since it uses a feed forward basis value that is affected somewhat by the control loop I believe this would really be more of a feedback term.

Keith
 
No a big problem

kamenges said:
I have to suspect the biggest problem is going to be load prediction.
It looks like the relationship between the dump requirement and the load requirement is very straightfowrward (you need to dump everything the load doesn't use). However, how do you predict the load? How do you know in advance that someone flipped the lightswitch? How do you know the size of the bulb in the light fixture? This would need to be a very tightly coupled electrical grid with a reasonably small number of known loads to be able to make any kind of load prediction.

I suppose a simple proportional feed forward that uses the measured load current to quickly adjust the dump value might work. But I suspect that would be very prone to oscillation.


You are right but you should know the load by monitoring the KW meter on the generator. This can then be used to set the bias.

kamenges said:
Since it uses a feed forward basis value that is affected somewhat by the control loop I believe this would really be more of a feedback term.
Keith

Actually it is more of an disturbance rejection system than a feed forward, the it should be stable. It may be that the bias must be ramped nicely from load to the next. We will see. I think we can make this stable. The main thing is to keep the system under damped for all load conditions. That means relying on the BIAS more and the PID tuning less.

That means we aren't tuning for minimum ISE. We are going for stability.
 
Sounds like I need to do a bit of explaining.

This turbine and generator are to run at a constant load at all times. As Gerry put it, I "use a variable dummy load to control the frequency". But it is not a waste of water, as the dummy load is a bank of hot water heater elements. So anything that is not being used by motors etc is used to heat water.

SP is 50Hz, PV is actual frequency, and CV is output to the load controller
Absolutely correct!

What tolerance do you have for frequency? (50 +/- 0.5 ?)
50 +/- 2.0 ( 48 - 52 ) This extra tolerance is to kind of help under large load disturbances.

So a constant load on the turbine at all times to maintain the frequency at 50Hz is the aim. The water flow rate does not change.
When the turbine is first started up, this is what happens:
1. Ensure there is no domestic load online.
2. Open the needle valve to increase the speed up to 50Hz.
3. At this point there is no load, because the speed is correct.
4. Open needle valve further and speed is increased and so the dummy load comes on a bit.
5. Continue increasing the water flow rate, and the dummy load proportionally increases via the PID to compensate.
6. We are now sitting with the needle valve open to the correct place for the full dummy load ( 100% dummy load )
7. User X now turns on a 5Kw motor.
8. The speed of the turbine now slows slightly and so the dummy load controller has to shed load via the PID until everything is back in equilibrium again.
9. The TOTAL LOAD is to remain constant. It is just transferred from the dummy load to the users or back again depending on who is turning stuff on and off.

The dummy load controller ( CV ) ramps up smoothly from 0-100% (0-100Kw) with an analog output of 0 - 32000.


By the way, the Pid can handle a load of 5Kw OK and causes a minor speed disturbance of approx +/- 1hz. The problem I am having is that a load disturbance of approx 20Kw (20%) causes a slowdown to about 47Hz and it cannot recover from this quick enough, and so it drops out and shuts down. The turbine and generator are rated for 100Kw.

Peter Nachtwey:

1. This water turbine is turning a generator isn't it?
Yes

2. Doesn't the load change every time you turn on another electrical device?
Yes. But then it should balance out.

3. Doesn't this cause the turbine generator to slow?
Yes. And the load dump should shed the equivalent amount of power to compensate for it so that the total load remains constant.

Shouldn't the SP and PV be 50HZ? The CV, output to the DAC, changes as the load changes to keep the PV at 50HZ.
I should have written CV on the table, but I wrote PV instead.PV should stay at 50Hz

I currently only have RSLOqix500 Starter, which does not support trends or histogram.

I am hoping to stay away from monitoring the Kw of the Gen to set the bias as this adds another dimension to the equation that I have yet to explore. I presently have a current monitor on all 3 phases to a PLC 4-20ma analog input, but I have not yet worked out the scaling etc to allow this to be used. I would rather not use it if at all possible, however I will not discount it as a last resort option.

And yes I am looking for stability.
 
Last edited:
This is strange.

Why not just have a power meter for the real load and the dummy load. When ever the power meter for the real load changes, add or subtract that amount from the dummy load so the total load stays constant? If you do this quickly enough the PID will not even see a load change.
 
I am actually stuck with what is already installed but what you are saying sounds like a good idea.
I have a slight aversion to spending money so I am trying to make this thing work with what I have.
Another thing is that this is frequency related and I woiuld need to maintain the correct speed even if the TOTAL LOAD was reduced by 50%.


What would be the correct thing to tweak on the PID to give me a snappy response, but still retain a close stability?
I have been all over the innerned, and short of shelling out $6000NZD for some autotuning sofware, all I can find is vague references like:
"If poor response, increase I" or "increasing P gives a faster response". Well of course I get better response, but at the cost of stability. I could only find one long dead forum relating to PID otherwise I wouldn't even bother you guys.
Me no PID man!

This thing is so tantalisingly close.


Any ideas?
 
Last edited:
azecraze said:
I am actually stuck with what is already installed but what you are saying sounds like a good idea.
I have a slight aversion to spending money so I am trying to make this thing work with what I have.
Another thing is that this is frequency related and I woiuld need to maintain the correct speed even if the TOTAL LOAD was reduced by 50%.

Tis this problem with the BIAS. How do you control the frequency when you are not controlling the load? With the water supply? You have not been very clear and I am getting frustrated. First the load is constant. Then its not. What's the deal? Why must I pry this infromation from you? This is why I don't play 20 questions. I thought I might because this is PID related and you can get trend .dbf files to show others.

azecraze said:

What would be the correct thing to tweak on the PID to give me a snappy response, but still retain a close stability?

I don't know. Post a trend .DBF file. I have auto tuning software. I write autotuning software.

azecraze said:

I have been all over the innerned, and short of shelling out $6000NZD for some autotuning sofware, all I can find is vague references like:
"If poor response, increase I" or "increasing P gives a faster response".


I can calculate PID gains that will provide a critically damped result. In a few minutes.

azecraze said:

Well of course I get better response, but at the cost of stability. I could only find one long dead forum relating to PID otherwise I wouldn't even bother you guys.

Did you implement your own ITAE or ISE evaluator? This would help you determine if the gain adjustments are making things better or worse.

azecraze said:

Any ideas?

Lots, but I need answers or data. Between the BIAS and the quick load shifting you should be in good shape.
 
Last edited:

Similar Topics

Hello, I changed controller type in RSLogix 500 from SLC 5/02 to MicroLogix 1200 and was given the ladder logic to update it for the new...
Replies
25
Views
4,707
Hey all! Long time reader, first time poster! I have an EA9-T7CL and an MicroLogix 1200 connected via DF1. I'm all good and got everything mostly...
Replies
3
Views
632
Hi every master,Recently i met a fault about 1762-L40BWA 1,When i get the PLC, The Fault light is lighting, I am not remember the fault message,I...
Replies
0
Views
710
Hello everybody and master,I met a problem about ML1200.It is described as below: 1,When i got this PLC,The FAULT light is lighting, My computer...
Replies
4
Views
1,083
I had planned to use PTO instructions to control a servo motor, single axis only. We have a ML1200 BWA model. According to the ML1200 manual...
Replies
7
Views
3,441
Back
Top Bottom