User:Steven J. Koch/Notebook/Kochlab/2009/07/28/Feedback tweaking
Steve Koch 16:02, 28 July 2009 (EDT): Figured out (or remembered from before I left) that PhreshPhotonics math needs to have a negative scale factor (using -65535 now) in order for the detector signal to be the "same" as it was before, relative to the piezo translation. This could be because the detector is oriented differently, or because the piezo is oriented differently. It doesn't really matter, but now the old feedback settings (positive setpoint, "reverse acting=T" for force clamp) are working.
I have a new project, titled "Tweaking PID"
- Data file 0. Seemed to work well for 4000 setpoint. However, on the oscilloscope, was not at 4000, but rather was at 2500. Looking at the data file, though, X is kept at 4000, with the noise going between 3000 and 5000-ish.
- Data file 001. Higher voltage. Noise is less (maybe 3500 to 4500). Again, data file shows 4000 setpoint achieved, but oscilloscope computer was showing only 2500.
- Data file 002. Changed the gain settings on the oscilloscope (to match feedbackDAQ), but it still read 2500 during acquisition, while the saved data file says 4000 (same as file 001)
Using NI-MAX on both machines, it looks like X and Sum are reading the same on both computers, even though daq2 is using RSE and steveoffice is using DIFF. This would seem to indicate that it's a stupid programming hiccup?
- The oscilloscope program reads the same on both computers. Even more evidence of some kind of programming snafu.
- Data file 005 is piezo hold and take data. oscilloscope is showing a value of -2500. or maybe -2400. Whereas the software records values of about -5200.
- This seems to imply some kind of subtraction & scaling problem???
Steve Koch 19:37, 28 July 2009 (EDT): Didn't get a chance to fix the scaling problem (it's related to the fact that voltage is needed to scale the values, whereas we're using integers now, so the gains affect everything). Quick notes from working with Anthony on PID:
- Except for what looks like tons of noise, I think force clamp is working. We worked through PID tuning, and preliminarily got:
- Critical gain is about 0.8 (at voltage of 1V or 2V for power controller)
- Period at critical gain is about 5 ms.
- Using National Instruments instruction manual, page 19/147 (http://www.ni.com/pdf/manuals/372192c.pdf), for a "normal" loop, we should use:
- P = 0.144 (0.8*0.18)
- I = 4 ms (0.8)*(5 ms)