Categories

[SKATEway]Post 6

Hello,

This 3 days I essentially worked on the diagram bloc to self balance our board with a null angle to the horizontal.

Its a simple PID but we have to add some stuff to make the regulation working. First we need to prevent the wind up on the integrator when the output is satured. Then the D componet increase hight frequencies noise. So we attach a low pass filter. FinaLly we have the value to apply on the motor. The board move to an other angle. Perturbations can emerge. Like the ground slope, the wind or humans. We got the final position now. We need accelerometer and gyroscope output to calculate the new angle of the board to the horizontal. We can directly use the output of the accelerometer but we have to apply an anti drift filter to the gyroscope output to cancel the integrated error over the time. Then we compare the request angle with this angle and do the operation again.

Here, the diagram bloc !

Charles

 

Charles Fromonteil

Student télécom ParisTech embeded system

4 comments to [SKATEway]Post 6

  • Loki

    That’s great,
    How do you plan to do the anti drift for the gyro values ?

    You know that some imu are sensible to temperature changes, you can use a resistor with a pwm to do a temperature regulation 😉 (Some imu have internal temperature sensing that you can read with the gyro/accel values).
    But I dont know if that’s necessary for the reference you’ve chosen.

  • Charles

    Hello,
    Thank you for your comment.
    To handle the anti drift I plan to use the final angle as start point and not the last gyro values. I’ll will upload the new diagram.
    For the temperature, I have already read about it but I didnt really care. I will ask to my teacher if it is needed in our case.

  • Loki

    Yes temperature control is really not mandatory I was just suggesting that as a bonus as it requires only one pwm and few components (resistor + MOS etc).
    I’m not sure what you mean by final angle ? The final estimated angle ? as the result of the integration of the gyro ?
    It’s that angle that will drift over time so you need to compensate it actually as well as the gyros.

    Try to run the algorithm on a imu that’s not moving to observe the gyro and angle drift over time.

    Also what will the update rate of the control loop ?

  • Charles

    I will run the algorithm as soon as I can.

Leave a Reply