The task is to extend the 1D ball bouncing simulation to two dimensions (x and y), and plot the ball motion for several bounces, including horizontal and vertical motion versus time and versus each other.For the horizontal motion we can assume that the ball slips when in contact with ground and that this slippage causes a proportional reduction in horizontal velocity. We can choose an initial condition so that the ball moves to the right and I have to show how the bouncing dies out over time with a coefficient of restitution of less than 1. You may choose your own values for coefficient of restitution and horizontal damping rate.

댓글 수: 7

Adam Danz
Adam Danz 2021년 8월 30일
Sounds like a fairly clear starting point. What's your question? Where do you need help?
I know the equation for 1D bouncing ball problem i.e. y'' = -9.8. But what will be the equation in the x-direction?
DGM
DGM 2021년 8월 31일
편집: DGM 2021년 8월 31일
The way the text reads, it seems that friction modeling is very simplified. Much like using the coefficient of restitution to describe the relationship between the y-component of approach and rebound velocities, it seems that you are to use a similar proportionality to describe the overall relationship between the x-components before and after the contact event.
If that interpretation is correct, then the x-component of velocity would be a piecewise-constant function, where the relative change in value at each step is the same.
Could you please explain by giving some examples or with the help of equations?
DGM
DGM 2021년 8월 31일
편집: DGM 2021년 8월 31일
You should already have the equations of motion that you need. Conceptually, you can analyze the system between contact events as any other ballistic motion problem. You have a given x,y velocity, gravity dictates a parabolic trajectory until the ball makes contact with the ground again. At that point, the sign of the y-component of velocity is flipped and the magnitude multiplied by the coefficient of restitution (less than 1). Simultaneously, the x-component of velocity is multiplied by what the text is referring to as a damping rate (another coefficient less than 1). The contact position and the reduced velocity vector are the initial conditions for the next cycle. Since we're neglecting aerodynamic drag, the x-component of velocity is constant between contact events.
To add to this: just like the ballode example, you need to call ode45() using event functions, and the event functions (contact with the floor detected) must signal for termination. The ode45() call will terminate, and you adjust the boundary conditions the way DGM indicates, and then you call ode45() again with the new boundary conditions.
Do not try to use if statements or whatever inside the code to detect bouncing and try to do everything in one run: the mathematics of the techniques used by the ode*() functions requires that you stop the run at each discontinuity.
Thanks Walter. It makes sense now.

댓글을 달려면 로그인하십시오.

 채택된 답변

Image Analyst
Image Analyst 2021년 9월 1일
편집: Image Analyst 2021년 9월 1일

0 개 추천

Can't you just replace your 1-D y with z, then make a new y for the second dimension? Then you'll have a Vx and Vy instead of only a Vx. Then after each bounce you need to decrease the Vx and Vy by the appropriate amount due to the slippage. (The attached demos are generic, with nothing specific to your slipping simultation.)

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Programming에 대해 자세히 알아보기

태그

질문:

2021년 8월 30일

편집:

2021년 9월 1일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by