The system consists of an electromagnet that acts as the system's actuator by changing the current in the coil windings. A steel ball bearing is the object to be levitated. A phototransistor / photodiode pair are used to estimate the ball's position. The actuator driver was built using a power Op-Amp which allows us to control the winding current given a reference voltage. The actuator driver is controlled through a National Instruments myRIO microcontroller and all the control logic is implemented in LabVIEW.
To be able to have the system fully operational my team had to perform tasks that can be broken down into three main categories
This stage began with deriving the equations of motion for the system. After the system was defined through a set of equations, we set about identifying all relevant physical parameters of the system. Although a model was not necessary for controller design, it allows us to both verify any controller design in simulation and more intelligently design the controller to meet all design requirements. Which is exactly what we did. We built a Simulink model that predicts the system's behavior that was eventually used in the controller design to verify the performance.
The controller was designed using a classical graphical method known as loopshaping. The benefit to using loopshaping is that the visual nature is very intuitive to work with and if done correctly guarantees a robust controller. Further, since the design requirements correspond to the loop transfer function, it is easy to modify the controller to achieve all control objectives. Although we designed the controller using loopshaping, we constrained the search to be a lead controller. After finding a controller that meets all of our design criteria while maintaining good robustness margins, we ran the controller on our simulink model. From there, we tuned the controller until we met all of our design criteria while obeying any hardware constraints such as the current limitation of the power supply. Once we settled on a final controller we moved onto implementing our system.
The implementation of our system had two major tasks:
Sensor and Actuator Driver Calibration
Controller Tuning
The first task of calibration was critical since both the driver and sensor was designed by us, we did not have a datasheet to get typical values from. We ran both the driver and sensor through a set of experiments that allowed us to fully characterize the behavior and determine what the linear regions for both were. From our determined linear regions and the associated gains, we were able to verify in simulation that we would always be operating in those regions. From, there it was a straightforward task of implementing our controller on a myRIO using LabVIEW.
The second task of controller tuning comes from the fact that in our design we made various simplifying assumptions that lead to discrepancies between the derived model and the actual physical system. So, when we implemented our controller on the physical hardware the performance varied slightly from simulation. The tuning stage involved us running the system and modifying the gains until we had satisfactory performance in disturbance rejection and stability.
The end result of the entire project yielded the following products:
The equations of motion of the system along with the identification of all relevant physical parameters
Simulink model of the entire system
A lead controller that stabilizes the ball about an operating point
A linear behaving current driver built using a power Op-Amp
A non-contact sensing scheme using a photodiode / phototransistor pair
A labVIEW program that implements the controller and sensing schemes
The phototransistor / photodiode pair have a nonlinear relationship with the output voltage. We moved the ball at various positions to calibrate the sensor,
After performing system identification, we built a Simulink model that allows us to simulate the system which is very useful when designing the controller
The controller was designed to robustly stabilize the ball. We designed the controller to have as large of a disk margin as we could while maintaining all the design criteria
We used the Simulink model to help iterate the controller design. After designing a controller, we inserted it into the simulation and used the results to tweak the controller until we got satisfactory performance
The image above shows the end result of the steel ball levitating a few millimeters from the electromagnet
After we had the entire system implemented, we ran a few experiments to try and compare the actual system against the experimental