restback.blogg.se

Magic touch spacecontrol
Magic touch spacecontrol










  1. #MAGIC TOUCH SPACECONTROL SERIAL#
  2. #MAGIC TOUCH SPACECONTROL FULL#
  3. #MAGIC TOUCH SPACECONTROL TRIAL#

#MAGIC TOUCH SPACECONTROL SERIAL#

The timestamps and ball coordinates were sent to the serial port:

magic touch spacecontrol

In order to find C, the platform was tilted one unit to the right and the ball was rolled several times toward the left. This relationship, including the small angle approximation of tilt angle (a = sin(theta) ≈ theta) and conversion to digitizer units, is all incorporated into the constant C. We need to find the value of C such that it incorporates the relationship between the control input, u, the degree of tilt in the table, and the resulting acceleration on the ball. The only way to control the position is by changing the tilt of the table. Given the relationship dx/dt = v, the state matrix equation is: Let the state, x, of the table include 2 variables, position and velocity, x and v. But the magic of state space control has solutions for this in the form of robustness methods.įortunately the dynamics of the table are not too complicated. any deviation from the ideal dynamics described in your equations will lead to steady state error. The steady state error of plain vanilla state space control is horrible- i.e.

magic touch spacecontrol

I had naively believed that the magic of state space would take care of steady state errors.

#MAGIC TOUCH SPACECONTROL TRIAL#

After a lot of parameter tuning and more trial and error than I care to admit, it worked- sort of. I want to go back to these at some point.

#MAGIC TOUCH SPACECONTROL FULL#

I also tried to use a linear quadratic regulator for the full linear quadratic gaussian (LQG) enchilada. I tried to use a Kalman filter as an observer because the resistive touchscreen sometimes glitches (perhaps from small dead spots in the resistive layer).

magic touch spacecontrol

I think I bit off a little too much the first time around. It provided almost all of the functionality of Matlab for this kind of work. The python control library ( ) was very helpful. I would like to share some of the things I learned along the way. I found the entire process in turns daunting and not so bad.

  • Simulate some more to confirm it works as expected.
  • Simulate using the python control library to confirm correct dynamics.
  • Convert continuous time system to discrete time system.
  • Come up with a set of equations describing the dynamics of the system.
  • Measure the dynamics of the ball balancing platform.
  • I wanted to see if I could actually get this to work. Steve Brunton has a bunch of videos on Youtube including a series called "Control Bootcamp." There are plenty of videos about control theory but precious few showing actual implentation. I had ideas of converting to state space control- using linear algebra to control stuff. It then sat on a shelf for a while until I saw an article on HaD titled, "Talking Head Teaches LaPlace Transform." It initially started off using PID (proportional, integral, derivative) control using the Arduino and it worked reasonably well after finding the correct tuning parameters. Add an Arduino for a few bucks, a steel ball, wires and a battery holder and the total bill of materials was under $20 and came together in an afternoon.

    magic touch spacecontrol

    The platform is tilted using micro-sized hobby servos, $2 each. The ball position is sensed using a resistive touch screen picked up for $1.50 at AllElectronics. Last year, I built this low budget ball balancing platform with my kids. The convergence of math, electromechanics, sensors, and programming holds a place dear to my heart. I've been interested in control systems for a long time.












    Magic touch spacecontrol