Abstract - University of Washington



Lab 3: Magnetic Ball LevitationAbstractThe main goal of this lab is to analyze, model, and control an unstable system. The unstable system in this case is known as the Magnetic Ball Levitator (MBL).IntroductionThis laboratory covers the topics ofPhysical System ModelLaboratory SetupLab Experiments to Determine Model ParametersExploring closed loop control to design a full state controller.Building on the full state controller to construct a PD controller.Augmenting the PD controller to generate a full PID controller.Investigation of estimators and observers.Contents TOC \o "1-3" \h \z \u Abstract PAGEREF _Toc317508462 \h 1Introduction PAGEREF _Toc317508463 \h 1Physical System Model PAGEREF _Toc317508464 \h 3Laboratory Setup PAGEREF _Toc317508465 \h 5Lab Experiments to Determine Model Parameters PAGEREF _Toc317508466 \h 61.Calibration Stand Position Sensor PAGEREF _Toc317508467 \h 62.Calibration Stand Optical Sensor PAGEREF _Toc317508468 \h 93.Calibration Stand Force Transducer PAGEREF _Toc317508469 \h 114.Characterize Magnetic Force PAGEREF _Toc317508470 \h 14Evaluating Optical Sensor Calibration PAGEREF _Toc317508471 \h 18Evaluating Trim Point Calculations PAGEREF _Toc317508472 \h 18Linearize System PAGEREF _Toc317508473 \h 18Position Control Via Full State Feedback PAGEREF _Toc317508474 \h 18Position Control Via PID PAGEREF _Toc317508475 \h 19Items to Address in Report PAGEREF _Toc317508476 \h 20Bibliography PAGEREF _Toc317508477 \h 21Physical System ModelThe purpose of this laboratory experiment is toObtain experience modeling and simulation of non-linear systemsExplore linearization methods to obtain linear models of non-linear systems at given operation conditions.Explore feedback control for an unstable system.Investigate the use of estimators and observers for real systems.The laboratory exercise will involve two main partsModeling of the physical system (an electro-mechanical system).Design and investigation of various feedback control systems for the unstable system. REF _Ref281226203 \h Figure 1 and REF _Ref284919865 \h Figure 2 show the experimental apparatus with its sensor and actuator components. The electro-mechanical system (plant) is an electro-magnet which can be used to move a metallic ball. The magnet acts as the actuator and the sensor is an optical light sensor which outputs a voltage proportional to the amount of light it receives. Figure SEQ Figure \* ARABIC 1: Experimental apparatus (schematics)Figure SEQ Figure \* ARABIC 2: Physical apparatusThe theoretical model of this physical system can be derived from the principle of electro magnetism and Newton’s second law and is covered in class lectures. Some relevant notation includesTable SEQ Table \* ARABIC 1: Relevant notation for systemSymbolUnitsCommentFmNForce applied by magnet on ballFm,critical,minNMinimum force of critical area (area where we care about fitting magnetic force)Fm,critical,maxNMaximum force of critical area (area where we care about fitting magnetic force)VmtvoltsVoltage applied to the magnetVDtvoltsVoltage output from the position sensor (on the calibration stand only)VPtvoltsVoltage output from the optical light sensorVTtvoltsVoltage output from the force transducer (on the calibration stand only)ztmDistance between ball center of mass to tip of magnet (positive downwards)zomNominal levitation distancezminmMinimum distance possible for feedbackzmaxmMaximum distance possible for feedbackzcritical,minmMinimum distance of critical area (area where we care about fitting magnetic force)zcritical,maxmMaximum distance of critical area (area where we care about fitting magnetic force)ztm/sVelocity between ball center of mass to tip of magnet (positive downwards)gm/s2Gravitational acceleration (9.81 m/s2)mkgMass of the ballrmRadius of ballKkepco-Gain of amplifierPαvariousVector of calibration constants for converting Vm to αPβvariousVector of calibration constants for converting Vm to βPDvariousVector of calibration constants for converting VD to zPTvariousVector of calibration constants for converting VT to FmutvoltsControl voltage output from D/AA free body diagram and equations of motion for this system are described in lecture notes.The laboratory consists of three partsThe first part of the laboratory experiment is to set up the test apparatus to collect data which are subsequently used to determine the physical model parametersThe second part will be the design of a control system to stabilize the unstable plant. You should design a control system immediately after the first lab session so that the control gains will be ready at the second-week lab session.The third part involves laboratory experiments which involve estimators and observers.Laboratory SetupThe magnetic ball control experiment uses the following laboratory equipment:DC power supply Model GPC-3030D.Digital multimeterKepco power amplifierOscilloscopePC computer for developmentxPC target PCMathworks softwareVarious specialized testing equipmentFamiliarize yourself with the workbench and the associated equipment listed above. If you have any questions concerning the use of any of the equipment, let the instructor or TA know. Do not operate any equipment without a reasonable knowledge of its function. Electronic components can be easily damaged with excessive voltage or current inputs and electrical instruments can cause injuries if not handled properly.Lab Experiments to Determine Model ParametersWarning! Output voltages from power supply can be dangerous!Warning! No not allow input voltages to exceed +/-15 volts as this will damage the equipment!Do not disconnect any electrical leads once they have been connected!We can now perform various experiments to determine parameters for our model of the system.Set hardware limits on the Kepco amplifier output to the range of [-15,15] volts. Do not skip this step!Ensure all power supplies and sources are “OFF”.Familiarize yourself with the relevant measurement instruments and the hardware-under-test (Magnetic Ball Levitator shown in REF _Ref284919865 \h \* MERGEFORMAT Figure 2).Make a note of the hardware that you are working with so you can continue next week with the same hardware.Further connections will be made as described below.Calibration Stand Position SensorIn this experiment, we take several data points by hand to determine how the output of the position encoder is related to the actual position of the ball. Turn the electromagnet setup upside down and place on the supplied wooden blocks ( REF _Ref315943605 \h Figure 3)Mount the calibration stand position sensor on top of the inverted apparatus.Connect the calibration stand position sensor to the +5V power supply and connect the output of the sensor to a multimeter (see REF _Ref284927699 \h Figure 4 for connections).Use the calibrated aluminum block to set the ball a known distance away from the tip of the magnet. Convert this distance to the corresponding z value by taking into account the ball’s radius.Record the associated output voltage from the sensor at this position.Repeat for various distances to generate a table similar to REF _Ref284928450 \h Table 2. Use this data to a first order calibration curve between VD and z ( REF _Ref311542415 \h Figure 5).Figure SEQ Figure \* ARABIC 3: Inverted magnet mounted on wooden blocks. Calibration stand will go on top of apparatus.Figure SEQ Figure \* ARABIC 4: Calibration stand position sensor (black = ground, bare wire = +5 volts, red = output signal)Table SEQ Table \* ARABIC 2: Example data collected in order to calibrate position sensor on calibration standDistance (m)VD (volts)z (m)Figure SEQ Figure \* ARABIC 5: Example calibration curve for position sensor.Calibration Stand Optical SensorIn this experiment, we determine how the output of the optical sensor is related to the position of the ball. We record data from the output of both the optical sensor and position encoder. The optical sensor is made by Photonic Detectors Inc.Ensure the apparatus is in the inverted position.Connect the calibration stand position sensor to the +5V power supply and simultaneously connect the output of the optical sensor to an available A/D channel (see REF _Ref313532355 \h Figure 6) and a multimeter.Connect the position sensor output to another available A/D channel and a multimeter. Ensure that both all ground connections are using the same ground. A common oversight is to not tie the negative side of the fixed 5 volt power supply to the same ground that the xPC Target A/D board uses.Retract the ball as much as possible (so it is not blocking any light).Create a Simulink model to record data during the run. Start data recording (you may want to choose a slower sampling rate of approximately 0.25 seconds). You model should Measure output voltage from the position sensor, VD. Measure output voltage from the optical sensor, VP.Slowly lower the ball into the sensor window until it is touching the tip of the magnet. Reverse the direction of the ball until it reaches the staring location.Stop data recording.Plot the data and ensure that the values recorded by xPC target are the same values that were displayed on the multimeter during the bine this data with your calibration data from Section “ REF _Ref311467157 \n \h 1. REF _Ref311467157 \h Calibration Stand Position Sensor” to create a graph similar to that shown in REF _Ref311538306 \h Figure 7.Use the information from the graph to create a 1D lookup table Simulink block (‘Lookup Table’) which implements this function.Use the plot to determine the minimum and maximum distances where feedback control is possible with this sensor. Determine an optimal desired distance, zo, where the ball should hover to maximize the amount of feedback possible in both directions.Figure SEQ Figure \* ARABIC 6: Wiring connections for optical sensor (black = ground, red = +5V, green = output signal, other wires not used)Figure SEQ Figure \* ARABIC 7: Data from calibration of optical sensor used to generate a lookup table block in Simulink.Calibration Stand Force TransducerIn this experiment, we determine how the output of the force transducer is related to the actual force applied to the transducer.Ensure the apparatus is in the inverted position.Connect the force transducer to the calibration stand ( REF _Ref311545645 \h Figure 8).Ensure that the force transducer is in the 10N range.Connect the force transducer to power and a multimeter ( REF _Ref317662786 \h Figure 9).Weight the small metal pan assembly which is used to hold the weights.Attach the small metal pan assembly to the force transducer and place a known mass onto the pan. Record the output voltage.Apply different masses to the system and record output voltages. Repeat for various masses to generate a table similar to REF _Ref311542256 \h Table 3. Use this data to a first order calibration curve between VT and force applied to transducer ( REF _Ref311542431 \h Figure 10). Be sure to account for the pan weight in your calibration.Force transducer in free standing calibration stateForce transducer on MBL calibration stand.Figure SEQ Figure \* ARABIC 8: Force transducer with small metal pan assembly and calibration weights.Figure SEQ Figure \* ARABIC 9: Wiring for force transducer. Black cable is the power cable (bare wire in this group is ground, the other is +5V). The white wire is the signal wire (bare wire in this group is ground, the other is the output signal)Table SEQ Table \* ARABIC 3: Example data collected in order to calibrate force sensor on calibration standTest Mass (kg)VT (volts)F (N)Figure SEQ Figure \* ARABIC 10: Example calibration curve for force transducer.Characterize Magnetic ForceIn this experiment, we determine how the force applied by the magnet on the ball is a function of both the ball position and the voltage applied to the magnet.Ensure the apparatus is in the inverted position.Weigh the ball and rod assembly.Connect the ball and rod assembly to the force transducer ( REF _Ref311545695 \h Figure 11).Connect the force transducer to an available A/D channel and a multimeter.Connect the position sensor to another available A/D channel and a multimeter.Connect the Kepco amplifier to the magnet.Create a Simulink model which willApply a known, constant voltage to the Kepco amplifier, u.Measure output voltage from the position sensor, VD. Measure output voltage from the force transducer, VT .Sample data at a reasonable rate.Retract the ball all the way.Set a constant voltage in the Simulink model and start recording data. Collect data for Vm∈0,15 volts (use steps of 1 volt).Slowly lower the ball until you get close to, but not touching, the tip of the magnet (do not let the ball get stuck to the magnet).Slowly reverse the direction of the ball and bring it back to the fully retracted position.Stop recording data.Plot the data for this run and verify that it is reasonable (if not, try removing spikes and outliers). Ensure that the values recorded by xPC target are the same as the values displayed on the multimeter. Repeat if necessary. You plot should be similar to REF _Ref311558776 \h Figure 12.Save the data of u, VD , and VT for each run. Use this data to generate a series of curves similar to REF _Ref311562666 \h Figure 13.Use methods described in lecture to characterize how the magnet force is a function of the ball position and magnet voltage, Fmz,Vm.Figure SEQ Figure \* ARABIC 11: Force transducer with ball and rod assembly (assembly is inverted).Figure SEQ Figure \* ARABIC 12: Example data collected during single runFigure SEQ Figure \* ARABIC 13: Example of calibrated magnetic force data (example data set is incomplete)Stop: You have completed the operations for the first week of lab 3.Evaluating Optical Sensor CalibrationIn this section, you will verify that your calibration of the optical sensor is reasonable.Create an xPC Simulink model which converts the output voltage from the optical sensor to a position (use the data you gathered and reduced from week 1).Collect data with this model while moving the appropriately sized ball up and down from the tip of the magnet.Plot the data and verify that it is reasonable.Evaluating Trim Point CalculationsIn this section, you will verify that your calculation of the trim voltage, u1,o, is reasonable.Set hardware limits on the Kepco amplifier output to the range of [-15,15] volts. Do not skip this step!Hold the ball at your desired trim distance from the tip of the magnet.Create a Simulink model which sends a desired control signal, u(t), to the Kepco (recall that ut is defined as the output from the D/A). Slowly increase the control voltage to the Kepco amplifier to verify that your calculation of u1,o is reasonable.Attempt to levitate the ball with by placing the Kepco in power supply mode and manually controlling the voltage knob. You will earn an instant 4.0 in this class if you are successful.Attempt Bang/Bang ControlIn this section, we will attempt to control this non-linear system with a simple bang/bang controller.Attempt to stabilize the system with a simple bang/bang controller.Experiment with different “on” voltages.Do not spend too much time on this section as we do not anticipate this controller to be successful.Linearize SystemIn this section, you will generate a linear approximation of the system at the desired trim point.Use techniques described in lecture to create a linear approximation of this system at the desired trim point.Verify that the poles of this system predict an unstable system.Position Control Via Full State FeedbackIn this section, you will explore using full state feedback to design a position controller.Pole Placement TechniqueUsing methods described in class, create a full state feedback controller which does not saturate the control signal and only requires position feedback (consider starting with desired closed loop poles around -60,-70.Validate this controller with your non-linear simulation before attempting to implement this controller on the hardware.Create a Simulink model which implements this controller on the hardware.Start the target application and slowly insert your ball into the magnetic field.Plot the response as the system is regulated to zero. Ensure that your controller does not saturate.LQR TechniqueUsing methods described in class, create an LQR feedback controller which does not saturate the control signal and only requires position feedback. Start with Q = diag([10 0]) and R = 0.00001.Repeat the same experiment as the previous section.Investigate the behavior as R increases relative to Q.Position Control Via PIDIn this section, we explore designing a position controller for the motor using a proportional and derivative controller. Proportional and Derivative Control OnlyUse your results from the full state feedback section to design a PD controller.Examine the root locus of your desired PD controller and modify your gains if desired.Test your PD controller with the rmed PID ControlAdd a small integral gain to your controller to create a full PID controller.Verify that the root locus of your system is stable.Test your PID controller with the system.Evaluate the robustness of your controller by adding a second ball to the first.Stop: You have completed the operations for week 2 of lab 3.Items to Address in ReportAn incomplete list of items to address in your lab write up includeDerivation, discussion, and results of obtaining model parameters from experimental resultsComparison of motor inductance derivation using both time and frequency domain approaches.Actual motor friction and approximationsSimulation results and comparison of ODE, state space, and transfer function representations of system with experimental data.Discussion of how P, I, and D components of control compose overall control system.Root locus of appropriate systems for position and velocity control.Analysis and discussion of practical implementations of PID and full state feedback controllers.Discussion regarding LQR and full state feedback controllers (pros/cons, open loop and closed loop poles). BibliographyValidationLevitators and test stands calibrated and verified on 02/22/13 with Robert GordonLevitator12345Optical SensorYESYESYESYESMagnetic coilYESYESYES (no ground)YESController workingYESYES (gains might need adjusting)YESYESCalibration Stand12Position SensorYESYESLoad Cell12Output VoltageYESYES ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download