LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

tuning pid, kindly check my vi

Solved!
Go to solution

Hi,

 

I have been trying to tune PID for motor speed control..

i tried both the pid and auto tuning pid...

however, i cannot tune the parameters properly.. the system doesnt respond well at all...

though i get good open loop resonse for the system.

auto tuning doesnt give any results unless if i manually make the noise factor to be near zero.. the wizard auto calculates noise factor to be ard 8 or 9...

i also tried increasing the relay amplitude from 1 to 2.

iam reading the speed data by rotary encoders connected to the counter input of BNC 2120.

the system turns very oscillatory as soon as i apply proportional gain .. doesnt react well to integral or derivative control..and goes unstable..

however when i simulated the system , i got academic model of pid gains to be kp of 1, Ti of 0.001 and Td 0.

 

which model is used in the pid vi and auto pid vi?

is it academic model or any other?

 

pls check my vi attached to see if theres anything wrong withthe vi itself??

 

 

regards,

 

ruser

 

 

 

0 Kudos
Message 1 of 6
(3,464 Views)

In general, you should scale all inputs and output to % full scale.  The default limits of the PID are +/-100% so set accordingly.

Also, you might consider letting the PID use its own internal dt timing.  Also, if your signals are nosiy then prefilter using the PID

FIR filter vi's.

0 Kudos
Message 2 of 6
(3,450 Views)

Hey Ruser,

 

Here is an Article on tuning a servo motor (PID controller). It is directed towards tuning a servo motor while using an NI motion controller. However, the principles of applying the Ziegler–Nichols method are still valid for tuning your pid controller.

Message Edited by BCho on 03-24-2010 05:06 PM
Hope this helps.
-Ben

WaterlooLabs
0 Kudos
Message 3 of 6
(3,417 Views)
One thing to remember if using the internal dt timing is that it doesn't provide protection for overflow of the timer, which if occurs can saturate your controller outputs for a period of time. Depending on your application this might not be desirable.
David
www.controlsoftwaresolutions.com
0 Kudos
Message 4 of 6
(3,397 Views)

I'm not sure you would really need to worry about an overflow since the ms timer vi in LabVIEW hold 2^32 ms which is approx. 49 days.

If your PID loop is waiting that long between cycles then you probably have bigger issues at hand.  Also, keep in mind that the PID

internal timer loop, which is always subtracting the current from the previous timer value, will still be correct even when the timer overflow occurs.

0 Kudos
Message 5 of 6
(3,385 Views)
Solution
Accepted by topic author ruser

Hi all,

 

Thanks for all the suggestions, i tried the internal dt and filtering.. the feddback process is fast and hence doesnt take much time.. more than a few secobnds..

 

i finally found the reason.. the system is closed loop unstable in the feed forward and feedback states..well it does stabilize but after around 65 seconds which is too large a time for the process to hold on...

 

thanks a lot again,...

 

regards,

ruser.

 

0 Kudos
Message 6 of 6
(3,371 Views)