Saturday 4 June 2016

arduino - modeling transfer function of ping pong ball levitation in a tube as a damper


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!



Answer



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.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...