Mathematical models

Apologies if i have posted this in the wrong forum. Please could Mods move it if so.
I have been doing some calculations to do with trajectories. i have done simple cases making a lot of assumptions like perfect transference of tangential speed of the flywheel to the ball and neglecting things like air resistance. This has been relatively simple so far using constant acceleration equations but i want to increase the accuracy of my model. Such that i can be given my robot’s position on the field (x,y) and can be told what bearing to face and what angle i should raise the flywheel shooter to.
Unfortunately I am only 16 and my knowledge of differential equations is limited, so i am struggling to find a good model for air resistance. I’m also unsure if i need a coefficient of restitution between the ball and the flywheels and how that changes if i add spin to the ball as shown in a recent thread. I’d like to know if anyone else has done some in depth mathematical modelling. I’d also like to know if anyone has a way of calculating where the robot is in terms of (x,y) on the field (taking the blue start zone corner to be the origin). Apologies if my mathematical terms are unfamiliar due to country differences.

Error404, my hat goes off to you for attempting to do full modeling of the ball trajectory. The further you can get - the more insights into this problem you will learn and this will be a huge benefit for your future studies.

In my experience, this problem has too many variables to be able to derive an analytical solution. From the uncertainty in ball’s material squishiness to distribution of balls’ mass and density and, as a result their ballistic coefficients, it will get complicated very fast.

The best strategy, I could think of, is to have an analytical navigation solution for robot’s position on the field and then calculate distance and heading to the high goal target. Once you have that you could rely on the tables that you will experimentally construct.

Those tables listing launcher speed, required to hit the target, as the function of distance to the target, will be very specific to your launcher. You might need to redo them each time you make significant modification to the launcher. But they will be able to “absorb” any unknowns associated with the air drag, non-linear momentum transfer, and any other physical aspects of the launcher.

The hard part, that you will need to conduct a number of tests, controlling for the battery voltage, ball’s mass, its squshiness, etc… Hopefully, none of those will play a major role in the accuracy of the launcher you design, and you end up with just a couple of (min,max) tables for each shooting angle you intend to use. Then you can either interpolate launcher speed for the specific angle, choose several fixed angles to shoot from, or even settle on a fixed launcher angle and only vary flywheel speed.

For navigation solution I would start by looking at this link that jpearman suggested in another thread. If you can figure out math required for the navigation solution based on gyro, wheel encoders’, and line follower sensors’ readings, that would be great!

I was going to do that, at some point. But, I afraid, I already forgot from my college days most of the math that I would need to do it. :slight_smile:

at this point, instead of finding and calculating the reverse of a complicated trajectory equation im thinking of just doing a simulation where if the projectile is too low or too high it adjusts it until its accurate enough, sort of like the number guessing game

Thanks for the replies. My final models will definitely be too complicated for the cortex to handle or will just be too needlessly complicated for not that much gain. I also need to get better at robotC. But i will still make them so that i can buff up my design notebook and confuse the judges (which i seem to have a knack of doing). I’m not very familiar with ballistic coefficients, but i will have a look into them. they sound very helpful.
Are the balls not uniform in density? That seems like a really annoying feature.

here is the thread I made on calculating the robot position in X,Y, this will work as long as you are using traction wheels

I also developed a method to track mecanum wheels movement and translate that to robot movement in x,y if you want me to type that up I can, but it took me 6 pages to explain in my notebook, so I’ll add it here if it is requested

Collin if you could please show the code for the mecanum wheels that would be appreciated. The programmer for my team is attempting an endeavor similar to Error404. It would be a great help if he had an example to work off of.

here is the math

Thank you. the diagrams are especially helpful!