View Single Post
  #30   Spotlight this post!  
Unread 19-04-2012, 14:43
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 7,995
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: paper: Shooter Wheel Speed Control

Quote:
Reading the encoder with the getrate from the labview getrate ntroduces a large amount of noise that counteracts any positive effect from the bang-bang (for us). What you suggest is how we started out, and there's a huge amount of error (+/-100rpm).

We'll play around a bit more at 10ms using our own rate calculation and not the FPGA. Perhaps that will improve our results.
I think there's a misunderstanding. When I said "read encoder counts from FPGA" I meant read the counts, not the rate. Then use those counts to compute the rate.

The important thing is to do the steps, in this order, one after the other, in the Timed Structure, at 10ms, with no other code in the structure:
1) read encoder counts from FPGA1

2) use those counts to compute speed; do not filter2

3) send either 0.0 or 1.0 to motor controller3 depending on whether the unfiltered speed from step 2 is above or below the setpoint. no slew rate limiting (no voltage ramping)



... Then, if the above works, try using the GetRate() like Chris suggested, even if it's noisy2:
1) use GetRate() to get speed; do not filter2

2) send either 0.0 or 1.0 to motor controller3 depending on whether unfiltered GetRate() speed is above or below the setpoint. no slew rate limiting (no voltage ramping)



1 read encoder counts using Encoder::Get() or Counter::Get() methods in the Encoder or Counter classes, respectively

2 you can filter the speed signal for display purposes or to control other logic like when to shoot etc, but do not use filtered speed for the bang-bang logic for this test

3 try to send the motor command as directly as possible to the motor controller, bypassing as much overhead as possible which might introduce lag. disable "motor safe" and any other overhead in library code which sends the 0.0 or 1.0 command to the motor controller.





Last edited by Ether : 19-04-2012 at 14:54.
Reply With Quote