• Categories

  • Pages

  • Tags

  • Archives

  • Meta

  • can anyone tell me how can i integrate the output values of gyro sensor….?

    Posted by admin on February 2nd, 2010 and filed under nxt sensors | 2 Comments »

    i am doing a project of making self balancing NXT segway robot using gyro sensor balance on two side way wheels so if any one can know how to integrate the output plz tell me….

    There are various forms of integration. Perhaps more important is to state the reason for this. I guess you want a servo system that balances the robot based on the gyro angle and a "set point"..

    This type of feedback control is called PID control, short for Proportional Integral Derivative. Sometimes it is called a 3 term controller. This is a large subject, but on the other hand there seems to be web sites that include software that implements such control for NXT Segway robots available. See the links below, and maybe follow further links to find something that suits your setup. You may need floating point arithmetic to make the calculation easier. This type of control is also known as a position servo. I am not sure this is the ideal way to do this, but there are examples that do, so that means it works. PID control is widely used in industrial systems.

    The PID type of control relies on the error between the set point and the actual position to move the motor that corrects the position. Proportional control closes on the desired position, slowing as it gets closer to the set point, till the motor stops when the error is small. Integral is used to learn from previous history. It is like manually re-adjusting the set point once the robot is positioned, to get closer to the desired position. Derivative anticipates, by determining the position is close to the set point, so the motor can slow and be ready to stop just before it actually gets there. These controls are usually performed on the error signal, the difference between the required position and the actual position. There will be a setting (constant) for each of these 3 terms, which has to be tuned for best operation, such as fastest settling, minimum overshoot and smallest error.

    While the second link uses a light sensor to measure distance for vertical, it is not much to translate to angle from a gyro. The set point is of course the angle that is read when the gizmo is balanced, or maybe slightly off balance will work too, with a lot of jiggling around..

    If you want to integrate for some other reason, it might be something like adding all the changes in angle (starting from some reference point) to get the current angle, but I would think the gyro has absolute angle outputs which give the current angle. Integration is often used to find "the area under the curve".

    2 Responses

    1. shilp p Says:

      for that you need to know how to integrate the output…the best way to get the answer is to google it!
      References :
      http://www.google.in

    2. Ecko Says:

      There are various forms of integration. Perhaps more important is to state the reason for this. I guess you want a servo system that balances the robot based on the gyro angle and a "set point"..

      This type of feedback control is called PID control, short for Proportional Integral Derivative. Sometimes it is called a 3 term controller. This is a large subject, but on the other hand there seems to be web sites that include software that implements such control for NXT Segway robots available. See the links below, and maybe follow further links to find something that suits your setup. You may need floating point arithmetic to make the calculation easier. This type of control is also known as a position servo. I am not sure this is the ideal way to do this, but there are examples that do, so that means it works. PID control is widely used in industrial systems.

      The PID type of control relies on the error between the set point and the actual position to move the motor that corrects the position. Proportional control closes on the desired position, slowing as it gets closer to the set point, till the motor stops when the error is small. Integral is used to learn from previous history. It is like manually re-adjusting the set point once the robot is positioned, to get closer to the desired position. Derivative anticipates, by determining the position is close to the set point, so the motor can slow and be ready to stop just before it actually gets there. These controls are usually performed on the error signal, the difference between the required position and the actual position. There will be a setting (constant) for each of these 3 terms, which has to be tuned for best operation, such as fastest settling, minimum overshoot and smallest error.

      While the second link uses a light sensor to measure distance for vertical, it is not much to translate to angle from a gyro. The set point is of course the angle that is read when the gizmo is balanced, or maybe slightly off balance will work too, with a lot of jiggling around..

      If you want to integrate for some other reason, it might be something like adding all the changes in angle (starting from some reference point) to get the current angle, but I would think the gyro has absolute angle outputs which give the current angle. Integration is often used to find "the area under the curve".
      References :
      http://www.zehl.com/?nxtway
      http://www.philohome.com/nxtway/nxtway.htm

    Leave a Comment

    Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.