News:

  • April 17, 2026, 12:20:51 AM

Login with username, password and session length

Author Topic: PID Loop Issue  (Read 130011 times)

Evilbeard

  • Hero Member
  • *****
  • Posts: 160
Re: PID Loop Issue
« Reply #30 on: December 28, 2016, 07:18:27 AM »
The issue with the drive accelerations is that one is connected to a 120HZ motor, one to a 60HZ motor. If I don't have the rewind at a slightly higher accel / decel times, when the machine stops, it creates slack in the web that causes issue on the next startup. By having the secondary stop a little quicker, it keeps the tension in the web. The rewind drives still seem like react faster than the secondary. I believe this issue has to do with the gear ratio on the mechanics and the difference in maximum frequency.

I could change the accel / decel times and then create a delay in stopping the rewind drives, but that was something I was kinda wanting to avoid for the sake of safety.
« Last Edit: December 28, 2016, 07:49:07 AM by Evilbeard »

Mike Nash

  • Hero Member
  • *****
  • Posts: 652
Re: PID Loop Issue
« Reply #31 on: December 28, 2016, 08:18:26 AM »
Dropping the rewind drive after the line stops is pretty standard. You will never have a controlled tension while stopping otherwise, at best you may hit on a compromise that is acceptable such as you have now.

Evilbeard

  • Hero Member
  • *****
  • Posts: 160
Re: PID Loop Issue
« Reply #32 on: December 28, 2016, 06:47:45 PM »
The biggest issue I've been having is that it looks like someone got to poking around in my secondary drive and gave it an s-curve acceleration. I set this drive to factory default and then loaded my parameters in it when I started the project. I believe the last person I saw poking around in it was my manager.  ::)  I took the S curve out of the acceleration, and it looks to be helping. The issue is now that I can't get it to start at production speeds (anything above 250 FPM). If I turn the gain up to make it start, it oscillates. If I turn it down to where it doesn't oscillate, I don't get good response. Like, for instance, look at this curve. The PV goes to the limit 0 (slack in the film), the SP is at 50%. I don't know why the Output flattens out like it does. Shouldn't it continue going toward 100%? It's not speeding up fast enough and causing roll formation issues.  If I start the line at 250 FPM or less, it gets to speed and stabilizes, and I can then speed it up to production speed. I'm about to take a hammer to this machine.

http://i.imgur.com/l78TIAw.jpg
« Last Edit: December 28, 2016, 06:50:32 PM by Evilbeard »

Evilbeard

  • Hero Member
  • *****
  • Posts: 160
Re: PID Loop Issue
« Reply #33 on: December 28, 2016, 06:57:27 PM »
Also: Just for clarification, on the DMD, the Reset Rate is what we set? So the output changes by the Gain (times the error) every X sec that the Loop is set to. So, if I have it set to 0.5 Gain and it set to 10 sec of Reset, if my error is 10%, my loop will move 5% every 10 seconds?

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3607
  • Darth Ladder
Re: PID Loop Issue
« Reply #34 on: December 28, 2016, 07:18:02 PM »
I don't know why the Output flattens out like it does. Shouldn't it continue going toward 100%?

It is, just very slowly.  Your P is maxed out, so the only increase in output will be due to I, and you can see the output is trending parallel to the bias.

There is some fierce deadtime in your system.  It takes 5 seconds at an output level that eventually causes overshoot before you can even start turn the PV line (though that could be the dancer on the stops and there's excess slack to take up before the dancer even finds out about it).  And that same CV won't get the dancer in position or even close to it in 10 seconds.

What's disturbing the system?  Is the feed speed not stable?  Put a tach on it.  If you have access to a real time line speed signal (and even a winder speed signal), adding those to the trend would be interesting.  And are you sure you CAN change rewind speed fast enough to keep up with the disturbances?  Big enough motor, plenty of drive, etc.  Looking at this, I'm thinking that dancer accumulation length (long path - short path) would be interesting to see.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

Mike Nash

  • Hero Member
  • *****
  • Posts: 652
Re: PID Loop Issue
« Reply #35 on: December 28, 2016, 07:26:47 PM »
Maybe BobO can answer your questions on how Do-more handles these values and functions. I don't want to steer anyone wrong including me.

It might help if you could trend the speed references you are sending the drives along with the PID PV, Bias and Output. I think what I am seeing is a response to nip speed changes but maybe not?

The integral (bias) is starting at only 25% or so in your graph, why is it so low? The proportional gain is low enough that you can only swing about 25% above or below the bias.

But those huge swings make me suspicious that you have an outside influence issue. I would be checking that there is no slippage of the core on the winder shaft, but that is probably not the problem since it is both spindles doing it.

Another nasty gotcha is a dancer that doesn't always move the pot so there is deadband.

Slippage at the nip when the web tension increases.

Stiction at the dancer pivot where your tension has to increase too much to get it to move then it is easier and overshoots.

A hole in the diaphragm in a rolling diaphragm dancer cylinder. Or blowby at certain spots if rings. Non-diaphragm types are bad to be a source of stiction BTW.

I wonder what Controls Guy posted while I was composing this? Cool, we are on the same page I see.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3607
  • Darth Ladder
Re: PID Loop Issue
« Reply #36 on: December 29, 2016, 02:48:05 PM »
Basically, your loop control is WAY slower than the disturbances in the process, which means you need one of a few things:

1) The process is in a non-ideal state and you need to find the cause or causes of the deviations and fix it (slip on the nip as Mike notes would be a good example)...or, if it's not possible or cost effective to correct the process, then:

2) The control needs to have more response capability.  Ample winder motor, make sure the winder drive train is free of backlash, more aggressive tuning, etc....OR

3) More dancer accumulation to buffer transient variation in web speed and let the winder work on the short-term average rather than trying to whipsaw with every variation.

Scenario 2 and 3 will require you to make sure the dancer inertia, friction, and stiction are sufficiently low to follow the web.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

Mike Nash

  • Hero Member
  • *****
  • Posts: 652
Re: PID Loop Issue
« Reply #37 on: December 29, 2016, 11:39:39 PM »
This doesn't help Evilbeard at this point, but I have been putting together a controlled winder simulator in the simulator today. Just crazy I guess. So far, I have "built":

Ramped master reference
Integrator to calculate footage of web through the master nip
Integrator to calculate footage wound onto the spindle
Dancer position from those two footages
Diameter calculator
PID trim
Spindle reference
Calculated spindle speed

I still need to calculate actual diameter build from footage and thickness. And figure out how to add a banging sound when the dancer hits the stops.  ;D

Currently it "runs" and holds the calculated start diameter of 3" for quite awhile. The spindle "manually" creeps the dancer into position when the spindle is started, then the line and PID may be started. It holds position pretty nicely after getting the diameter calculation rate reasonable and tuning the PI and sample rate.

It's almost a pity that it's all "imaginary" in Do-more's simulated mind.  :D

I would really, really love to have a packaged RAMP or even a rate limiter. The alternatives get a bit big and clunky.

So far the bottom line is, it looks like a real section control dancer at the moment since the diameter doesn't build yet. I can definitely see a resemblance to Evilbeard's issues. Too little gain makes the integral too dominant and it swings badly though slow. And I don't even have any emulation of real world lag yet either (RAMP RAMP RAMP).

But right now I am late to bed. If I don't lose interest and can pretty it up a little, I may post it in the examples or something as a toy.

I had a little quirkiness with PC CPU usage maxing out and causing huge delays after setting Memory Manager to retain R,C,D and T. It really seemed to get extreme when a timer started timing. I had this even with only one small program block showing status. Odd. Page faults in DMDesigner.exe were about 1000 per second when it would max out.

Mike Nash

  • Hero Member
  • *****
  • Posts: 652
Re: PID Loop Issue
« Reply #38 on: December 30, 2016, 11:38:02 PM »
I seem to have a functioning simulator. Just like the ones your daddy tunes! Batteries not included.

It's a bit weird to see the thing act pretty much just like most of the real ones I have had to deal with. All of the quirks with none of the waste and time restringing the web. It would be nice if there were a neat way to have a faceplate or something other than data view and trend, though both are great for sure.

Does anyone have a good suggestion on getting the .dmd set so it plays "out of the box"? I'm thinking maybe an Initialize instruction you can toggle on to reset back to "factory". Also, I have tried to clean up unused memory values, but how do you get it to retain data views and trend views if it decides to load without the simulator? I seem to lose stuff if that happens.

I think I want to try to add simulated drive ramp times for what can be learned about the hazards of such. Backlash on dancer feedback I would like to get in too and shouldn't be too hard. Stiction might be harder since that is more of an issue with the drive's speed loop not tight enough to overcome and might be more than I care to bother with.

Hopefully I can package this up and get it on the forum for anyone who wants to play with it. Maybe even this year.

Mike Nash

  • Hero Member
  • *****
  • Posts: 652
Re: PID Loop Issue
« Reply #39 on: December 31, 2016, 11:10:43 AM »
Here is the Dancer Controlled Winder System Simulator

http://forum.hosteng.com/index.php/topic,1925.msg16183.html#msg16183

Mike Nash

  • Hero Member
  • *****
  • Posts: 652
Re: PID Loop Issue
« Reply #40 on: December 31, 2016, 11:12:41 AM »
Post attachment size limit so here is the screen shot of High P Gain and no Reset (integral).

Check the Data View for trend view keys.

Mike Nash

  • Hero Member
  • *****
  • Posts: 652
Re: PID Loop Issue
« Reply #41 on: December 31, 2016, 11:19:45 AM »
Post attachment size limit so here is the screen shot of Low P Gain and Low (fast) Reset (integral).

Check the Data View for trend view keys.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3607
  • Darth Ladder
Re: PID Loop Issue
« Reply #42 on: December 31, 2016, 01:54:27 PM »
I seem to have a functioning simulator. Just like the ones your daddy tunes! Batteries not included.

Wow, cool!  (And you have way too much energy for any one guy)   ;D
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

Mike Nash

  • Hero Member
  • *****
  • Posts: 652
Re: PID Loop Issue
« Reply #43 on: January 02, 2017, 09:29:20 AM »
Evilbeard,

I added the spindle drive accel/decel lag and dancer position feedback lag to my simulator. I need to fix a few minor issues before I upload it again.

I didn't get exactly what I expected. I deal a lot with load cell winders and those may be the ones that are terrible with drive lag since they have no storage. The simulation showed I had to have more than a couple seconds of acc/dec before it got unacceptable. Backlash (deadband) was much more entertaining, especially with integral (reset) having a contribution.

Evilbeard

  • Hero Member
  • *****
  • Posts: 160
Re: PID Loop Issue
« Reply #44 on: January 02, 2017, 10:15:31 AM »
I'm back to work today, and I'm going to get some material back on the machine and adjust a bit. I'm going to manually set the bias to around 75% and then start up the line and see what that does to my results. I don't know why it was so low. I'll keep tweaking on my settings and see what I can get out of this thing. I feel it has to be a setting issue.