Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Ball and Beam Project, Control Engineering --PLEASE HELP!!

Options
  • 09-03-2015 10:32pm
    #1
    Registered Users Posts: 172 ✭✭


    Hi Everyone,

    I've never posted in the engineering forum before so be gentle. I'm doing the 'ball on a beam' control project for college and I'm badly stuck.



    I understand that I need to use one sensor to know how far along the beam the ball is and another sensor to know what the angle of the beam is. What I do not understand is how I use these two pieces of information together in order to control the motor that is in charge of the beam....

    I've spent ages reading over white papers and other peoples projects online and although there is always two methods of measurement none seems to explain how to use them together....

    I'm using Simulink and an Arduino for the project. If someone would please help me out and explain it to me, or even point me in the right direction I would really appreciate it.

    Thanks,
    Dohda


Comments

  • Registered Users Posts: 5,370 ✭✭✭DublinDilbert


    dohda wrote: »
    Hi Everyone,

    I've never posted in the engineering forum before so be gentle. I'm doing the 'ball on a beam' control project for college and I'm badly stuck.



    I understand that I need to use one sensor to know how far along the beam the ball is and another sensor to know what the angle of the beam is. What I do not understand is how I use these two pieces of information together in order to control the motor that is in charge of the beam....

    I've spent ages reading over white papers and other peoples projects online and although there is always two methods of measurement none seems to explain how to use them together....

    I'm using Simulink and an Arduino for the project. If someone would please help me out and explain it to me, or even point me in the right direction I would really appreciate it.

    Thanks,
    Dohda

    Do you have a model for the ball and beam, which you can use in simulink?

    There's a number of ways to approach this, you could use advanced control techniques like pole placement etc.. Or you could do it by trial and error.

    Are you measuring the position of the ball from one end or measuring its position as a +/- number from the centre? This will effect the set point you choose.

    I would get an outer control loop to try maintain the ball position in the centre of the beam, so set point of 1/2 the beam length or zero, depending on how your measuring ball position.

    The angle of the beam could act like a feed forward control, inside the main control loop to help bring stability to the system.

    The problem with doing this empirically is that it takes a fair amount of experience to do on the fly, like tuning a pid controller etc... So maybe best to stick to modelling the system and closed loop responce with controller before going to the actual system.


  • Registered Users Posts: 172 ✭✭dohda


    Hi. Thanks a mill for the reply.

    I'll explain where I'm at. My plan was to model this in Simulink and work out the details for the controller mathematically. I was intending to use state space control for this and there are some details over on Mathworks that help with the Matlab part of this.

    The problem I am having is understanding how the data from the distance sensor and the potentiometer work together. I cant quite get my head around how you use both pieces of information to control the angle of the beam. Here is an example of the system with one input (beam angle):
    ball005.png

    I'm just not sure where the positioning fits into it.

    Move beam angle based on potentiometer output = OK
    Move beam angle up/down based on ultrasonic/infrared sensor data = OK
    Move beam based on a combination of both = NOT OK :-(

    I really do appreciate you getting back to me. I kind of feel like the whole project will be so much easier once I get my head around this relationship and how the algorithm works with data from two sensors simultaneously.


  • Registered Users Posts: 163 ✭✭BrianDug


    A rough way of doing? this would be to use a ultrasonic sensor either end with the two beams having a limited field of view. Once the ball is X cm away from sensor 1, tilt beam Y degrees and vice versa.

    You would also be able to calculate the speed the ball will travel at based on the angle and distance which you would then able to dictate the severity of the angle to counter the ball motion.

    Also why is the pot needed? I don't see why it is?


  • Registered Users Posts: 172 ✭✭dohda


    Hi BrianDug,

    That was the brief. Some form of beam angle sensor (pot, encoder etc) and a ball positioning sensor (ultrasonic/IR sensor etc). I'm just not sure how to include both of them in the loop.

    DublinDilbert: Do you mean that I should have the positioning sensor control the angle of the beam in order to position the ball and that the data supplied by the pot is then used as an internal feedback loop inside the full loop just to generate an error signal for a smoother operation?

    Thanks for the feedback folks/


  • Registered Users Posts: 5,370 ✭✭✭DublinDilbert


    You say that your control loop uses the angle of the beam as an input?

    I'm not sure you should try to control the angle of the beam, cause in theory the ideal beam angle is 180 degrees.

    You need to control the ball position and try keep it in the middle of the beam. When the ball is dead centre on the beam the error should be zero.


  • Advertisement
  • Registered Users Posts: 172 ✭✭dohda


    Hi,

    I'm sorry. I'm probably not doing a very good job of explaining it as this is all new to me and like I say, I don't fully understand the reasoning myself.

    I have found a link which might do a better job of explaining it than I can (except it uses a linear resistance sensor). It does however talk about the inner and outer loops I'm just hoping someone might be able to explain it in plain english to me.

    http://bea.st/sight/rbbb/


  • Registered Users Posts: 163 ✭✭BrianDug


    PM


  • Registered Users Posts: 4 Laurenzo


    Hey guys I'm a final year mechanical engineering student in DIT with one exam left before I can graduate. The exam is Control Systems and it's on Thurs 27th August. Wondering if anyone could help me at this short notice?
    I am willing to do/pay whatever it takes


Advertisement