2

I am building a control system to levitate a ping pong ball at a given height in a clear plastic tube using an arduino and implementing PID control.

I have to come up with a transfer function... I am using an air pump with pulse width modulation that controls the air speed, the pump is attached to the side of the bottom of the tube, and one end is closed and the other is open in the tube.

I was wondering if my idea would be correct, since one end of the tube is sealed and the other end is open, and the tube is a diameter that just barely fits around the ping pong ball, would I be correct in saying that to develop the transfer function for this system I could model it as a damper?

I was thinking it could be modeled as a damper or piston because the air forms a pocket beneath the ping pong ball and little air escapes around it?

I was looking up Bernoulli principle of lift, but not sure if a damper/piston would be the correct way in modeling this behavior?

If anyone could please shed some light on this I would be truly grateful!

or would it be easier to have both ends of the tube open? Not sure how the math would complicate for the transfer function in either case

Thank You!

clabacchio
  • 13,481
  • 4
  • 40
  • 80
zacharoni16
  • 677
  • 1
  • 9
  • 25
  • I know very little about PID control, but I do know that a ping pong ball will levitate in a stable state above the top of the tube with a little airflow due to the Coanda effect. Granted, that won't help you learn about PID, but it is one way to levitate the ping pong ball... – Kevin Vermeer Mar 03 '12 at 22:05

1 Answers1

6

I would not try to guess all the effects. There are probably some non-obvious things going on, and you can't know all the parameters.

I would measure the step response. Find two pump settings that both result in the ball being within the measurable range within the tube. Then have the controller suddenly switch from one setting to the other open loop. Meanwhile measure what the ball does over time. That is the step response. You can take the derivative of that and get the impulse response. From the impulse response you can predict the motion of the ball for any history of pump settings, assuming this is a linear system. It is probably linear enough over the small range of settings to keep the ball within its normal range.

You can use this as a simulation base to find the parameters for old fashioned PID control. Or you can use the impulse response directly to do a convolution control. You have to low pass filter the control input enough so that convolution kernel doesn't go negative unless your pump is actually reversible and can suck the ball back down.

Olin Lathrop
  • 310,974
  • 36
  • 428
  • 915
  • thanks a lot :), from what I read the general behavior is non-linear and unstable (obviously), if I define a relatively short range of motion that could linearized the system>? – zacharoni16 Mar 03 '12 at 23:39
  • @user: Keep in mind the tranfer function we are talking about, which is pump power in to ball position out. Is that really all that non-linear? If so, then this method won't work well, but neither will PID since that will be tuned to one response. – Olin Lathrop Mar 03 '12 at 23:42
  • 1
    +\$ \infty \$[.](http://www.zombo.com/) – tyblu Mar 04 '12 at 01:22