LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID tuning

Solved!
Go to solution

Hi All

 

I am working with a PID controller and am having some difficulty with working it. 

 

How does one go about tuning the PID to find its best operational values and how do I know when I have these values? 

 

Best wishes 

Andrew 

0 Kudos
Message 1 of 16
(3,643 Views)

you can start to google search about Matlab simulation... on this you can try on this link link

0 Kudos
Message 2 of 16
(3,632 Views)

Since you posted in the LabVIEW forum, I assume this is not a matlab question. I am not even sure if it has anything to do with programming.

 

Is this a black-box PID controller? As a first thing, read the manual. Many have an auto-tune feature to find the best PID settings. What are you trying to control? Systems can differ by many orders of magnitude in the way the respond to input changes. (compare a temperature controller for a jacuzzi to a controller that keeps a maglev train at the correct height!). 

 

You have the correct values of it responds quickly, smoothly and accurately to new settings (no oscillations, no significant overshoot, not excessively slow, no final offset, etc.)

 

 

 

0 Kudos
Message 3 of 16
(3,603 Views)

Hi altenbach

 

Thank you so much for the reply.

 

Yes this not a Matlab problem.

 

 

I am working on a beam pointing Stabilisation project and am using the PID to calculate a manipulated variable which is rhen fed into some picomotors to correct the beams position. 

 

I don't think that this is a black box PID controller, is is built into the labview code. 

 

From memory thus one does not have an auto tune feature.

 

 

Thank you for the advice on getting the correct settings. When I next get to my PC I will keep trying.

 

 

Are there any LabVIEW PID controllers that have this autotune feature?

 

 

0 Kudos
Message 4 of 16
(3,596 Views)

LabVIEW has auto-tuning as part of the PID tools (example).

Message 5 of 16
(3,593 Views)

Hi Altenbach 

 

Wow thank you so much I will try this as soon as possible.

 

I apologise if this is a silly question but will this work with a 1D array input too?

 

 

 

0 Kudos
Message 6 of 16
(3,587 Views)
Solution
Accepted by AndrewIons01

As altenbach mentioned, auto-tuning PIDs are an option.  There are some drawbacks to these and sometimes you need to manually tune.  So, here is (in a very generic sense) the process I personally go through for tuning a PID.

 

 

  1. Set the integrator and derivative terms to 0 so you're working strictly with proportional.
  2. Adjust proportional term until it generally gets you in the ballpark. If your model is linear, you can probably just do a calculation to get you in the range. If not, use several different setpoints to find a proportional value that is closest on average.
  3. Once proportional gets you in the general vicinity, start increasing your integrator.  The main goal here is to try and find the balance between response speed (hitting your setpoint faster) and overshoot/ringing.  If you command a new value and it takes too long to get to the setpoint (approaching it asymptotically), you need to bump up your integrator term. If you command a new value and it starts to ring (decreasing amplitude sine wave), your integrator is too aggressive and you need to decrease it.
  4. Once your P/I terms are tuned, work on the derivative term... if you need it.  I very rarely use the derivative in test systems (perhaps a failing of mine, but there it is) because it is easy to overtune it and cause instability in your PID controller. As a general rule you will want to make very small and incremental changes to your derivative.

 

Message 7 of 16
(3,578 Views)

I'm sorry about misunderstanding, I don't say that here in a LabVIEW forum are a Matlab question, I say that the man need to be open mind and and read / look / search all that is connected with "PID Tuning". as I know from here, it have an 100 years of history. well from what I know until now NOBODY IN THIS WORLD can do a perfect tuning for a PID. from what I know most of successful story are "manual tuned". the "automatic" manner of PID tuning are a good approach but not the best. 

 

with my advise I try to "open mind" at a person with "visual examples", same person that are incredible satisfier to discover... this... https://zone.ni.com/reference/en-XX/help/371361R-01/lvpid/pid_with_autotuning/

 

let's be serious... we try to help here... on this forum ? or... only make homework's ?!

0 Kudos
Message 8 of 16
(3,554 Views)

Hi 

 

Ok i will try manual tuning of my PID controller. I unfortunately have come across another problem. 

 

I am trying yo pass data through a state machine (IMAQdx session) but unfortunately it passes through once, when when it is sent back to the previous state I get the following: 

 

Error -1074360311 occurred at IMAQdx Open Camera.vi

Possible reason(s):

Camera not found

 

I have been using the camera for the rest of the code, this only occurs in one section.

 

 

0 Kudos
Message 9 of 16
(3,501 Views)

Could it be that you use a shift register to pass the name of the camera device between iterations and in one of your states, your tunnel on the case structure that passes this through is not properly connected, clearing the name you stored in that shift register? 

Rolf Kalbermatter
My Blog
0 Kudos
Message 10 of 16
(3,483 Views)