How fast can I use PID? Should I use it at all?

Application:

There is one shaft (Roller1) that will be turning at a rate which is open loop, monitored, possibly varying, but not by much. It is simply hooked up to a DC motor and it is monitored with an optical encoder for the purpose of turning another shaft (Roller2) at the appropriate rate. Roller2 must turn at a rate which is a function of Shaft1's current angular velocity AND the total angle it has turned...because the diameter of one of the rollers is changing as film is rolled onto it.

Implementation:
This has to happen fast and be precise or error will stack up. What I was originally going to do, was every "small time interval" of say 50ms, I would

  1. grab the small-time-interval-averaged/roughly instantaneous Roller1 angular velocity and its integrated total angle

  2. based on this, calculate what we know the Roller2 speed SHOULD be (this will be changing even if Roller1's speed is constant)

  3. Use PID to adjust the Roller2's DC motor speed to match the calculated value--Roller2 has an optical encoder as well.

I was going to use the PID_Beta6 library in the Playground. I had assumed that if I ran Compute() once per 50 ms small-time-interval, it would compute me an Output no matter what, so that I would be readjusting Roller2's speed every 50ms, keeping up with the changing diameter. I cannot afford to wait 1s. But now I think the library will only Compute() once per second by default. If you create with advanced options, there is a "SetSampleTime(int NewSampleTime)" method that will let me set the SampleTime down to 1ms. However now I have to ask, if I am doing this at such a high rate, should I be using the PID library at all, or should I write my own PI function?

I could SetSampleTime(1) and then the PID would calculate an Output every time I ran my loop. I'm just wondering if it makes sense to do this, or if I need to operate so fast, if using PID doesn't really make sense anymore.

Not sure about this given what little information was in the post, but it sounds like a PID control won't be of much help.

Are you trying to maintain a consistent tension? If so, a simple slip clutch will work much better.

I don't know much about the PID library but many people run PID loops on the ATMEGA into the many kHz range. Maybe a dozen lines of C code. Google robotics pid.

Precisely measuring rate and speed from encoders will depend on how fast they are turning. If they are turning "fast" then you get plenty of edges to count for a given delta T to estimate rate.

Not clear to me what the mechanics of your setup is. Roller1 and 2 have no physical connection ?

There is no physical connection. However, a film is being wound onto Roller2 and the linear speed of the film must remain proportional to Roller1's angular velocity. The tightness of the film is not an issue; there is a slipper clutch to keep it tight. But

I used pid.SetSampleTime(1). If I understand right, now whenever I run pid.Compute() every 50ms, it will definitely compute me a new value. I could not afford to wait 1 second like the default. Now all that remains is tuning. The tuning suggestions given in the library documentation don't seem very relevant.