# Modelling of ball and beam system

I'm trying to model a basic ball and beam system using Euler-Lagrange Equation. My system looks something like this:

I have come up with this final Euler-Lagrange Equation:

$$\left(\frac{J_B}{r^2}+ m \right) \ddot{r}_B + mg\beta\theta - mr_B \dot{\theta}^2 = 0.$$

Where $$J_B$$ is the ball's moment of inertia, $$r$$ is the radius of the ball, $$m$$ is the mass of the ball, $$g$$ is the acceleration constant, $$\beta$$ is the ratio $$d/L$$, $$r_B$$ is the position of the ball along the beam, and finally $$\theta$$ is the gear angle.

The Euler-Lagrange Equation was acquired after finding the partial derivatives with respect to $$r_B$$.

My question is: How do I proceed with finding the transfer function? I have seen two research papers straight away cancelling the term with $$\dot{\theta}$$ from the equation, changing the equation to laplace domain, and finding $$r_B$$ to $$\theta$$. I'm assuming that this was done due to an assumption, but I'm unable to figure out what this assumption is. Is this a correct way to do it?

Alternatively, can I proceed with leaving the $$\dot{\theta}$$ term and changing it to the laplace domain, and again find the transfer function from there?

Also, the research paper has proceeded with finding the transfer function from the Euler-Lagrange equation taken by finding the partial derivatives with respect to $$r_B$$. What about finding it with respect to $$\theta$$?

I'm a bit confused, so I'd appreciate some clarification.

• Hi, welcome to Physics Stackexchange! Would you be able to reference the papers please? I would be intrested to have a look. Commented Jul 22, 2021 at 10:29
• @ChrisLong I have done that to the picture I added, but for some reason it isn't shown. The name of the paper is "Modelling and Control of Ball and Beam System using Coefficient Diagram Method (CDM) based PID controller" Commented Jul 23, 2021 at 12:08

In the paper you referenced the $$\dot\alpha$$ term which will become the $$\dot\theta$$ term is dropped when they linearise the equation as the $$\dot\alpha$$ term is quadratic and is assumed to be negligible. Obviously, retaining this term will increase accuracy though.
The Euler-Lagrange equation with respect to $$r_B$$ is used because $$r_B$$ is the only degree of freedom. $$\theta$$ and $$\dot\theta$$ are not free but fixed like $$d,L,J_B,m$$ (albeit a fixed function of $$t$$) as they are the driving terms. If the wheel was not driven then you would also consider the Euler-Lagrange equations with respect to $$\theta$$ but then I am not sure the transfer function would make much sense to calculate as then you have no driving "force".
• I haven't read the paper in its entirety so do let me know if I have assumed something I should not have. That said it looks like $\theta$ is changed by some controller not by the physics of the system in the diagram in the OP. In order to use the Lagrangian formulation with $\theta$ being a degree of freedom we would need to somehow expand the Lagrangian to encapsulate the feedback loop. However, it is likely easier to treat $\theta$ as a driving force and compute the driving force required based on $r_B$. Effectively we are deciding the equation of motion for $\theta$, not the phsyics. Commented Jul 23, 2021 at 23:51