LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem Getting in pid fpga

Please some one can help me????

I try to make position control by PID controler using LabVIEW FPGA tool kit my servo motor work range of voltage between -12V to 12V ,

FPGA Kit that i used is spartan 3e ,my small project plan required to read the reference positon & the feedback signal using NI DAQ,by using host interactive mode i send the data to FPGA ,FPGA work as a processing that contain the PID block to generate the controll signal,back again to main program i received the output signal and bring it out from pc to servo motor using NI DAQ as shown in the figure>>

Main VI

 

FPGA VI

 

my problem if i change the derivative gain from 0 to 2^16 the response of motor not change as shown in image

 

response2.jpg

 

second problem any value for integral gain make the system unstable as shown

 

3.jpg

0 Kudos
Message 1 of 3
(2,775 Views)

i work on this project with my friend from first year in college this result is old as you seen.

i use the trial version 30 days of Labview 2009 that i download from the NI site that time now (NOT HACK VERSION) i work on NI rio evaluation kit software that my college buy it. it........

 

 

0 Kudos
Message 2 of 3
(2,762 Views)

Are you entering random numbers for the gain values? The maximum derivative gain is just under 128, because it's a signed, fixed-precision integer with 8 integer bits. A derivative gain of 1000 is out of range, and probably has no effect as you're seeing. Conversely, an integral gain of 1 is likely much too high. Try setting that value to something like 0.01 and see if it's still so unstable.

 

The correct way to do this is to use a tuning procedure such as the Ziegler-Nichols method to calculate initial gain values, which you can then slightly adjust by hand if necessary.

 

Why are you doing the PID on the FPGA, but taking the output back up to the host? There's no need for the FPGA in this situation, use the standard LabVIEW PID toolkit instead. Once you have that working, you can consider moving the PID to the FPGA if the IO is also on the FPGA.

0 Kudos
Message 3 of 3
(2,735 Views)