LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do i control the velocity using PID toolkit and a DAQ card?

I have used a PID control Toolkit of LabVIEW 7 and a multifunction DAQ card for controlling the distance moved by the cylinder shaft. Now I need to control the velocity of the shaft by using only the available things. Is it possible or whether i have to purchase a motion controller card for that.

Kindly help me regarding this. Thanks in advance.
0 Kudos
Message 1 of 4
(3,217 Views)
In principle, you do not need a motion controller,
as long as you have the right time resolution and dsitance estimates, You can use another PID loop to control the velocity.
From, the measurement of distances (d1 and d2), the velocity can be estiamted as (d2-d1)/Time,
This is the value you use to to control the velocity set point. You will have to use a different set of tuning parameters for the velcoict PID.
0 Kudos
Message 2 of 4
(3,217 Views)
Dear Mr.Imad,

Thanks for your early reply. Some more issues are also there in my mind.

1. Whether we can use the CPU clock itself for velocity measurement or we should use the Counter/Timer of the DAQ card?

2. Whether we should vary the tuning parameters (Gain Parameters) of the PID depending on the Velocity setpoint? (Because different velocity setpoint leads to different kind of PID curves). If so, How can we dynamically tune the parameters? Do we need some sort of calibration?

Kindly clear my issues.
0 Kudos
Message 3 of 4
(3,217 Views)
1)
I am assuming you are continuously reading the distance estimates, and the readouts are in a while loop with a constant delay (between readouts update).
I am also assuming that you do not have a velocity sensor, that is you are estimating the velocity by measuring two distances (d2 and d1) and dividing the difference by the time delay of the loop.
If this is the case, the software time delay (of the loop) can be used.
Velocity=(d2-d1)/(time delay between measurements)

2)Normally there is one set of tuning parameters that should work for all regions of interest (of set points). However, in the case where there too much of non linearity between regions, you may have to use two or more set of parameters. This is set by gain scheduling (
if the set point is inbetween interval 1, use this set of parameters, and if it is inbetween interval 2, use another set, etc).

3) you can always preset the PID loop to start at some predetrmined voltage (instead of starting from 0), this will speed up the control and bypass any starting dead zones (bands) of response and control.

4) Note also that if you are estimating and controlling velocity from the distances you are controlling with the PID loop, there is a dependance between the two. The control loop of the distance should have an input from the velcoity, However, assuming independance will make it work for most part.
Message 4 of 4
(3,217 Views)