boss_aks Posted December 12, 2008 Report Share Posted December 12, 2008 hello ppl, i am completely new to this lab view .....the place where i work we often need labview to control our equipment......but we need a bit more than that,,,,we nw need a proper pid to ctrl our readings... being a novice i cant evn thnk of makng one by myself....we had plans of buying a pid module but my boss said that no money n make it urself.....so is der ne1 who cn help me in this...i did found a pid example on the forum posted by sum kind n genious person but i wasnt able to connect it to our existing Current Voltage module.... pls help Quote Link to comment
LAVA 1.0 Content Posted December 12, 2008 Report Share Posted December 12, 2008 Hello Boss, please read the forum Guidelines, and pay attention to 'How to ask questions the smart way'. Your post misses interpunction in any form. Using full words is a plus. Ton Quote Link to comment
boss_aks Posted December 12, 2008 Author Report Share Posted December 12, 2008 QUOTE (Ton @ Dec 11 2008, 02:43 PM) Hello Boss,please read the forum Guidelines, and pay attention to 'How to ask questions the smart way'. Your post misses interpunction in any form. Using full words is a plus. Ton Oh, my apologies for that. Quote Link to comment
LAVA 1.0 Content Posted December 12, 2008 Report Share Posted December 12, 2008 QUOTE (boss_aks @ Dec 11 2008, 06:52 AM) hello ppl,i am completely new to this lab view .....the place where i work we often need labview to control our equipment......but we need a bit more than that,,,,we nw need a proper pid to ctrl our readings... being a novice i cant evn thnk of makng one by myself....we had plans of buying a pid module but my boss said that no money n make it urself.....so is der ne1 who cn help me in this...i did found a pid example on the forum posted by sum kind n genious person but i wasnt able to connect it to our existing Current Voltage module.... pls help Doing a little research (i.e. Googling) you should be able to find enough info online to get a good idea of how to implement the PID algorithm. If you'd look on http://en.wikipedia.org/wiki/PID_algorithm' rel='nofollow' target="_blank">Wikipedia you'd find the following pseudocode. This is a pretty good summary of the basic PID algorithm. So try implementing this in LV. Kp, Ki, and Kd are the gains for each of the three components. previous_error = 0 integral = 0 start: error = setpoint - actual_position integral = integral + error*dt derivative = (error - previous_error)/dt output = Kp*error + Ki*integral + Kd*derivative previous_error = error wait(dt) goto start Quote Link to comment
boss_aks Posted December 13, 2008 Author Report Share Posted December 13, 2008 QUOTE (LV_FPGA_SE @ Dec 11 2008, 04:33 PM) Doing a little research (i.e. Googling) you should be able to find enough info online to get a good idea of how to implement the PID algorithm. If you'd look on http://en.wikipedia.org/wiki/PID_algorithm' rel='nofollow' target="_blank">Wikipedia you'd find the following pseudocode. This is a pretty good summary of the basic PID algorithm. So try implementing this in LV. Kp, Ki, and Kd are the gains for each of the three components. previous_error = 0 integral = 0 start: error = setpoint - actual_position integral = integral + error*dt derivative = (error - previous_error)/dt output = Kp*error + Ki*integral + Kd*derivative previous_error = error wait(dt) goto start Thank you so much for your response. I have one more doubt which again might be quite stupid comapred to the standards set by this forum. Where do I put this code? Quote Link to comment
Maca Posted December 13, 2008 Report Share Posted December 13, 2008 You don't use the code directly. You can either rewrite it so it can be used in a formula node (c like code) or implement the code using the standard LV numeric functions. Shown in the attached picture is the algorithm implemented in standard LV numeric functions. I have also added some windup (Integral) and output limits. On a technical note; that there are several different PID algorithms that all behave differently, I.e. not all PID's are alike. The one shown is just one (see http://en.wikipedia.org/wiki/PID_controlle...ndard_PID_form) Also a big thanks to Ton, how cool is his code capture tool, well done mate. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.