Calculating angles,calculating velocity

  • Thread starter Thread starter bradleyk
  • Start date Start date
  • Tags Tags
    Velocity
Click For Summary
SUMMARY

This discussion focuses on calculating angles and velocity using PID (Proportional-Integral-Derivative) control. The user, Brad, is working with sensors that provide angular rotation in degrees per second and acceleration in g's, both sampled at 300Hz. Key challenges include determining the cumulative error in angle and velocity measurements and methods to minimize this error. The conversation highlights the importance of discrete integration and tuning PID parameters (Kp, Ki, Kd) for effective control.

PREREQUISITES
  • Understanding of PID control theory and its parameters (Kp, Ki, Kd)
  • Basic knowledge of discrete integration techniques in calculus
  • Familiarity with sensor data output formats, specifically 10-bit DAC
  • Experience with filtering techniques to minimize measurement errors
NEXT STEPS
  • Research discrete integration methods for converting angular velocity to position
  • Explore PID tuning techniques to optimize response and minimize overshoot
  • Learn about predictive filtering methods to reduce cumulative error in sensor data
  • Investigate the implementation of mean value theorem in error minimization
USEFUL FOR

Engineers, robotics developers, and anyone involved in motion control systems who seeks to improve accuracy in angle and velocity calculations using sensor data.

bradleyk
Messages
2
Reaction score
0
hi,
i am trying to calculate angles and velocity.
i believe i have to use PID (never done before)
angles
i have a sensor that is giving a relative angular rotation in degrees per a second
i can sample this a 300htz
but how can i figure out if i have turned xo and i how can i reduce the cumulative error

velocity
i have a sensor that is giving acceleration in g's
i can sample this a 300htz
but how can i figure out if i am moving @ x ms-2 and i how can i reduce the cumulative error

thanks,
brad

if this is in the wrong spot please move it
 
Engineering news on Phys.org
bradleyk said:
hi,
i am trying to calculate angles and velocity.
i believe i have to use PID (never done before)
angles
i have a sensor that is giving a relative angular rotation in degrees per a second
i can sample this a 300htz
but how can i figure out if i have turned xo and i how can i reduce the cumulative error

velocity
i have a sensor that is giving acceleration in g's
i can sample this a 300htz
but how can i figure out if i am moving @ x ms-2 and i how can i reduce the cumulative error

thanks,
brad

if this is in the wrong spot please move it

Welcome tol the PF, Brad. I went ahead and moved your question to General Engineering for now.

What are the outputs of these sensors like? Are they a byte or two that you are sampling at 300Hz? Or do they offer some sort of pulse outputs or serial data?

Are you familiar with integration in calculus? that's how you go from a rate to a position. In your case, it would be a discrete integration, basically multiplying the rate by the delta time interval to get the quantity. As for minimizing the error, you might want to use the mean value theorem, or maybe some other type of predictive filtering of the data.

What are your thoughts on how to minimize the errors?
 
the output is a 10bit dac where 0 is -300o/s and 1024 is 300o/s and 512 is 0o/s

the output is a 10bit dac where 0 is -1.5g and 1024 is 1.5g and 512 is 0

i believe that
proportional integral derivative
something along the lines of
e3386d1b5511c8ce5b70a4ba8bcfc3e3.png

where the tuning parameters are:

Proportional gain, Kp

Larger values typically mean faster response since the larger the error, the larger the proportional term compensation. An excessively large proportional gain will lead to process instability and oscillation.

Integral gain, Ki

Larger values imply steady state errors are eliminated more quickly. The trade-off is larger overshoot: any negative error integrated during transient response must be integrated away by positive error before reaching steady state.

Derivative gain, Kd

Larger values decrease overshoot, but slow down transient response and may lead to instability due to signal noise amplification in the differentiation of the error.
 
Last edited:

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 9 ·
Replies
9
Views
5K
Replies
2
Views
3K
  • · Replies 6 ·
Replies
6
Views
5K
  • · Replies 15 ·
Replies
15
Views
4K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 9 ·
Replies
9
Views
2K
Replies
14
Views
2K