LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID with 2 slider controls

I've never messed with PID's but I'm working on a project that I thought would be simple until someone told me that I needed to calibrate my system to another system using PID's.

So here goes with the question. I have a pedistal that moves in the up/down (elevation) and right/left (azimuth) positions. I am to track an object based on elevation and azimuth readings from another pedistal. So before I can track the object I need to sync, or calibrate, my tracking system to the other system. The way this is done is by pointing both systems to the same location (say the top of a mountain). If the master system reads 35 degrees azimuth and 88 degrees elevation and my system reads 34.02 degrees azimuth and 89.20 degrees elevation I need to f
ine tune my system. I can do this by using 2 slider bars that control the up/down and left/right movement of my system so that I can manually move my system to the correct location. Once my system is pointing in the right location, I'm guessing I store some value. Once the system is calibrated, I should be able to track pretty close to where the master system is telling to be.

So thats pretty much all I know I should do. But I don't know how to develop this with PID's. Does anyone have any suggestions, example, etc?

Thanks.

--cjm
0 Kudos
Message 1 of 6
(3,115 Views)
If I understood you correctly, you are reading the two current positions (1)-up-down and (2) left-right, and you have two set points (one for the up-down and the other for the left-right position, read by the master. And the objective is to make the readout for the positions as close as possible and ideally equal to the set points.
Assuming the up-down and left right positions are independent, you can use two PID Loops to address this problem. One for the up-down, and the other to control the left right.
Normally, a PID loop takes two inputs: The SetPoint, and the corresponding readout of the system. It calculates an output signal (to the data acquistion system ) that moves the system in a way so that
(The Set point � Readout ) becomes ideally zero (no e
rror).
The other parameters are the tuning parameters. They control the speed and overshoot of the response, and they have to be properly selected. A system that is poorly tuned may oscillate and can cause damage (depending on the setup)
There is an example that ships with LabView and it has a basic PID controller that you may want to look at first.
A good PID loop should have a mean of setting it in manual mode to make it take any preset voltage (this is what you probably mean by calibration). The basic loop example that ships with LabView does not have that. You have to modify it (assuming you have the basic understanding of the Pid Algorithm), or purchase a PID kit from some vendors. NI have a PID kit that also can autotune the parameters. Or you can get someone from your neighboring school to help you with the algorithm
0 Kudos
Message 2 of 6
(3,115 Views)
I have seen other programs that do something similar to what I'm trying to do but with 2 slider bar, one to control the azimuth the other to control elevation. How is one control able to control 3 settings of the PID.
0 Kudos
Message 3 of 6
(3,115 Views)
assuming total indepedence of the two controls, you may use two independent PID loops,
one for the left right and the other for the up-down control
0 Kudos
Message 4 of 6
(3,115 Views)
I understood that from your previous explaination. But there are 3 settings you can change, the P, I, and D. So my question is how do you change all 3 with one control.
0 Kudos
Message 5 of 6
(3,115 Views)
Refer to the following discussion thread

http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=137&HOID=50650000000500000096110100&HTHREAD=000070038&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0

In general, the objective is to find the optimum signal that would make the error mimimal.
Start with D=0.
I some small value
and small value of P

run the system (can work also with simulations if set to immitate system performance in real time).
If the output voltage and system response is changing too slow, increase P.
Increasing P and I will in general speed the system.
Too large values will create an overshoot (that can be reduced by increasing the D value)
0 Kudos
Message 6 of 6
(3,115 Views)