View Single Post
  #6   Spotlight this post!  
Unread 30-01-2011, 21:40
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,089
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: LabVIEW PID for angles

Quote:
Originally Posted by Ether View Post
I should clarify things a bit.

I am asking if LabVIEW has a PID designed to handle angular process_variable and setpoint inputs directly, without having to do something like this externally:


Code:
angle_error = joystick_command - gyro_angle;
while(angle_error>180)angle_error-=360;
while(angle_error<-180)angle_error+=360;
setpoint = gyro_angle + angle_error;
... and then feed the fabricated setpoint and the gyro_angle into the PID's setpoint and process_variable inputs, respectively.

Not that this is difficult to do, just wondering if there is a PID with this built-in capability.

The pre-processing shown above is of course a general solution to a wide class of angular position-control applications, of which FRC robot rotational orientation is but one example. Unlike linear position control or limited-rotation angular position control, control of angular rotational position in continuous-rotation situations requires that the wrap-around be considered.

There is a lot of interest here on CD about using gyro angular position to control robot orientation. A continuous-rotation wrapper around the LabVIEW PID might for some folks be a helpful addition to the WPI Library next year.


Reply With Quote