Calculating angles,calculating velocity

  • Thread starter Thread starter bradleyk
  • Start date Start date
  • Tags Tags
    Velocity
AI Thread Summary
The discussion focuses on calculating angles and velocity using sensors that provide angular rotation and acceleration data, respectively. The user seeks guidance on employing PID control to manage these calculations and reduce cumulative errors. Key points include the need for discrete integration to convert sensor rates to position and the importance of tuning PID parameters: proportional, integral, and derivative gains. Suggestions for minimizing errors involve predictive filtering and understanding the outputs of the sensors. Overall, the conversation emphasizes the integration of sensor data and PID control for accurate motion tracking.
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:
Thread 'How can I find the cleanout for my building drain?'
I am a long distance truck driver, but I recently completed a plumbing program with Stratford Career Institute. In the chapter of my textbook Repairing DWV Systems, the author says that if there is a clog in the building drain, one can clear out the clog by using a snake augur or maybe some other type of tool into the cleanout for the building drain. The author said that the cleanout for the building drain is usually near the stack. I live in a duplex townhouse. Just out of curiosity, I...
Thread 'Where is my curb stop?'
My water meter is submerged under water for about 95% of the year. Today I took a photograph of the inside of my water meter box because today is one of the rare days that my water meter is not submerged in water. Here is the photograph that I took of my water meter with the cover on: Here is a photograph I took of my water meter with the cover off: I edited the photograph to draw a red circle around a knob on my water meter. Is that knob that I drew a red circle around my meter...
Back
Top