LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ultrafast discrete PID on FPGA

Hello, I'm working on a control system for a scanning tunneling microscope, and need to implement an ultrafast PID control- preferably on our NI-7833R FPGA module.

So far, I've got an analog input loop, and a PID loop running at 200 ticks (about 5us). With the discrete PID controller in the FPGA module, I've only managed to use proportional and integral gains of 1 [I16], anything else brings the PID to saturation. The problem is that even these smallest possible value of PID gains makes my system highly unstable. So my question is:

- Is it possible to use this discrete PID controller at this high speed?
- Would it help to keep the sampling at max (5us), and slow the PID output down by eg a running average?
- Do anyone have any other suggestions on how to implement this?

Looking forward to your answers!
0 Kudos
Message 1 of 2
(4,155 Views)
 
Hey saxegaard,
 
There might be two issues with what you are trying to do. First, are you familiar with the scaling scheme for the PID gains (for example, 256 == gain of 1)? There is good help in the documentation that discusses scaling with PID. If you are familiar with the PID gains and how they work, then it might be helpful to post some of your code to see what the problem might be. It could be a scaling problem external to the PID function.
 
The second issue could be speed: According to the spec below for your board, NI PXI-7833R, you can get a max value of 200kHz (just acquisition). You would spend some time on the PID also, depending on the number of channels. So, potentially, you would have a slower frequency. On the other side, you could develop your own fast ADC and enter that into the digital lines. At this point, you could potentially achieve the rates you are looking for.
 
I hope this helps. Please let us know if you are still having issues adjusting your PID paramaters, or if you have any further questions or concerns related to this post. Also, please include what versions of software that you are using. Thanks, and have a great day.
 
Regards,
DJ L.
0 Kudos
Message 2 of 2
(3,458 Views)