PPOD User Guide
This article outlines the setup and use of the 6 DoF PPOD for part manipulation and flexure testing, as well as use of the analysis program for flexure test results.
For all uses of the 6 DoF PPOD the computer must have the National Instruments PCI-6224 input DAQ card and the National Instruments PCI-6713 output DAQ card. The installed National Instruments brand DAQ hardware can be checked using the MATLAB command:
Calling this with no argument outputs a structure with all of the available DAQ hardware installed on the computer:
All input channels are single-ended readings because the accelerometers require this mode. To read in differential mode (ex. the voltage across a resistor) use two channels (one on either side of the resistor) and subtract one from the other.
This board is the interface between the DAQ cards and the hardware that runs the PPOD and collects data.
- The output card connects to the lower left socket in the photo above. The input card has two ribbon cables that connect to the other two sockets along the bottom: the upper cable on the PCI card connects to the right socket (channels AI0:AI15) and the lower cable connects to the middle socket (channels AI16:AI31).
- The ribbon cable socket along the right edge connects to the accelerometer/speaker board.
- The D-Sub socket in the upper right corner is for the force sensor used in flexure testing experiments. The switches above the screw terminals should both be to the left when the force sensor is plugged in.
- The power socket is on the left edge with the power switch found directly below it.
- The six speaker outputs are found along the top with speaker 1 on the far left and speaker 6 on the right.
- All screw terminals should be empty during normal use (with the exception of channels 16:17 and 24:25 which can be used at any time). The screw terminals can be used to read in different signals. To read in from the screw terminals for channels 0:15, unplug the ribbon cable leading to the accelerometer board. To read channels 18:23, slide the right switch found above the screw terminals to the right. The same goes for channels 26:31 with the left switch.
For part manipulation the force sensor should be unplugged as it adds noise to the other signals in the system.
The following is a reference guide for the PPOD_6D_Master_GUI.m used to control the PPOD. To begin the program go to the directory containing the PPOD files then enter in the workspace
Note: Whenever a field in the GUI is updated make sure to click in another box afterward to ensure that the updates have been saved to the handles data structure.
When selecting a plate motion, look at the plate motion plots to make sure they display the selected motion before starting. Notationally, a rotation in the θ direction is about the x-axis in a right hand manner, rotation in the φ direction is about the y-axis, and rotation about the ψ is about the z-axis.
- Frequency - The base frequency of the plate motion is defined in the f= box at the top of the window.
- Saved Motions - The list in the upper right corner of the window has all of the stored plate motions. To select one, simply highlight it. The field parameters can be edited in the box just left of the list but changes will not be saved to the saved motion files. To save a plate motion, use the Save Signals button in the bottom center of the window.
- User Defined Motion - Users can input new fields either by editing an existing plate motion or loading one of the TEMPLATE motions and specifying the parameters. Sinusoidal motions are the default however other motions can be input in the boxes below the list of motions. All motions must be periodic for the controller to function properly.
Instead of defining a plate motion that the controller tries to match, you can define the inputs to each actuator and see how the plate responds. To do this use the User Specified Control Signals button in the middle of the GUI. This will open a new window with controls and input fields much the same as the standard GUI. This mode is useful for debugging the system, specifically to make sure hardware, such as accelerometers or amplifiers, is working properly. In this mode the accelerometer plugs can be moved to the accelerometers on the actuators for further debugging since there is no control on plate motion.
- Samples per second - The number of samples read in on each input channel per second (maximum total samples rate is 250 kHz).
- Transient Cycles - The number of control cycles to wait after an update to allow the system to reach steady state.
- Logged Cycles - The number of control cycles to store and analyze. If this is increased then the processing cycles should be increased proportionally.
- Processing cycles - The number of control signals to wait while computations are performed on the logged cycles and the control signals are updated.
- Control Signals
- Highest Controlled Harmonic - The number of harmonics that the controller uses to eliminate high frequency noise. Increase the Processing Cycles if the harmonic is increased above the default value.
- Controller Gain - Sets the DC gain of the controller.
- Saturation Voltage - Sets the upper limit on the voltage that can be sent to the amplifiers.
- Initial Control Signals - Previous signals will take the last used controller values for the signal being run as the initial control signals. If there is no previous signal then it defaults to zeros. Frequency Response Based Guess will use values taken from the last frequency response as the initial control signals. Zeros will start all of the control signals at zero.
- Frequency Response - Users can generate a new frequency response of the plate as a guess for the control signals. This should be done if modifications have been made to the PPOD or the base frequency is changed. If the past frequency response does not include the base frequency and the desired harmonics, you will be prompted to generate a new one.
Running the PPOD and Plots
To run the PPOD click the Run button in the lower right corner of the window. Stop it by pressing the button again. The maximum number of controller updates for the PPOD to run can be set to the left of the Run button. If the PPOD is not stopped using the Stop button, use the Reset DAQ button to reset the DAQ cards otherwise there will be an error. The handles structure can be exported to the base MATLAB workspace using the Export Handles button in the bottom center of the window.
The signals being sent to each actuator over one period are displayed along the left side of the window. If the signals are being saturated then increase the saturation voltage (up to a maximum of 8 V or so, depending on the amplifier gain; if set too high it may damage the amplifiers or actuators).
- Connect flexure to mounting plate. For Tygon flexures use epoxy to adhere flexure to mounting stem.
- Attach the force sensor mount to the PPOD so the label goes along the PPOD's positive y-axis. Use C-clamps to attach the mount to the plate.
- Place the steel T-bar over the PPOD as seen in diagram above. If top surface is too low, place metal plates under legs.
- Place end of flexure into force sensor mount, tighten with hex key. Place plate flush with T-bar, if necessary use shims or angle brackets to place flexure in desired orientation. Attach to T-bar using C-clamps.
Future work: Create a more versatile and permanent mounting system like the system used on the PPOD.
The Flexure_GUI.m program uses the PPOD to generate a response of a flexure at user-specified frequencies. It moves the plate along each of the 6 degrees of freedom, sweeping through all frequencies in one direction before moving on to the next, and saves the data to the handles data structure. Below is a picture of the user interface and a field reference guide
- Controller Parameters - Same as above. Note that the frequency sweep in a direction will stop if any actuator signal becomes saturated. This was done to make the process more automated and prevent damage to the PPOD. However with the added weight of the force sensor mount and clamps, setting the saturation voltage too high may cause the PPOD to damage itself by shaking too hard. It is recommended to stay at the default value of 4V unless the sweep is being carefully monitored.
- Actuator and Plate Signal plots - Same as above.
- Max Number of Updates - The number of controller updates per frequency in the sweep. Increase from the default if the frequency sweep is coarse (3 Hz between steps). For each sweep the controller will use a frequency response-based guess for the first frequency then use the previous signal for all subsequent frequencies; small steps are recommended between frequencies to allow the controller to reach steady state.
- Plate Motion
- f - A matrix of the frequencies to sweep through when testing the flexure.
- A - The upper box is a 1x3 matrix of the magnitude of the linear accelerations and the lower box is a 1x3 matrix of the angular accelerations to use in the frequency sweep. Decrease these values for stiff materials as the plate motion is more difficult to control and large forces may damage the force sensor. For both linear and rotational components, the order is x y z.
- Plate Frequency Response - This functions the same as above. If the run button is pressed and the previous frequency response does not include all the sweep frequencies and their harmonics, you will be prompted to generate a new plate frequency response.
- Flexure Frequency Response - This runs the flexure test. From past experience, a sweep of frequencies from 15 - 60 Hz will capture most of the important flexure response for Tygon flexures. Most sweeps do not make it past 40 - 45 Hz due to actuator saturation.
- Force Signals - These are plots of the forces being read by the force sensor. Typically there is significant high frequency noise in the signals on the order of 0.5 V.
Further information can be found in the article Flexure Characterization and Design.
To analyze the results from a flexure test, follow the steps laid out below. The system model is a linear mass, spring, damper system and the transfer function is from accelerations to forces.
- Importing Data - Select the parameters (mass, damping, spring constants) that you would like the program to fit to the data. If any of the boxes are unchecked then another GUI will appear prompting you to input values. Leaving an entry as NaN will fit that parameter, Zeros will set all values to 0, Import allows you to import the values from a previous saved fit, and Done accepts the values and advances the program. To begin, press the Import Data button in the bottom center of the screen.
- Plot Options - On the left side of the GUI, there are several options for the user. There are two types of plots: FFT and Bode plots. More details about these can be found below. The y-scale can either be linear (Force in Newtons) or logarithmic (dB). The frequency can either be in Hz or rad/s. The other options are for changing the inputs/output set to plot. The upper box is for a single input to all of the outputs and the lower box is for all of the inputs to a single output.
- FFT Plots - This option displays the fast Fourier transform of the chosen input/output signals on the upper row of plots, with a legend showing the frequencies in the lower left plot. The options for the FFT plots are found in the lower left corner. You can set the frequencies to plot as well as the number of harmonics of base frequency to plot. The x-scale can be switched between harmonic and absolute frequency. Ideally all harmonics that are not the first should be zero (all other signals are noise).
- Bode Plots - Th-is option displays the Bode plots of the chosen input/output signal. Each plot shows the data as points and the best fit model as a solid line.
- Flexure Parameters - This button opens a new window displaying the fit (or input) mass, damping, and spring coefficients for the flexure being tested. Save the three matrices to the base MATLAB workspace using the button at the bottom of the window.
- Export Options - Export Handles will save the handles structure to the base MATLAB workspace. Save Handles will save the handles structure to a .mat file in the location chosen for future use.
If the PPOD is not performing properly, the following steps should followed to ensure everything is set up correctly. There are a number of simple steps outlined below that fix most of the problems encountered during use of the PPOD. If problems persist, a more in-depth examination of the code and/or physical setup is needed and is beyond the scope of this tutorial.
- Check if any of the tensioning springs are loose. Check the flexures to ensure that they are screwed in properly, that the glue holding the flexures in place has not broken, and that there are no signs of buckling, fatigue, or other failure visually apparent in any flexures (this is likely an issue if one control signal is significantly larger than the others). Replace flexures as necessary (best to replace all at once). When changing flexures, sometimes it is necessary to rotate an actuator slightly to keep the flexure aligned. To do this, loosen the bolts found on the underside of the base below the desired actuator. Most of these mechanical problems will show up as rattling noises and difficulty controlling. These are the first things to check and are the most likely sources of problems.
- Visually inspect the system to ensure that everything is connected properly and powered. Take care to look at the actuator/accelerometer board as the wires can break off in the screw terminals. If you forget to turn the amplifiers on before starting the PPOD, make sure to stop the PPOD before turning them on. DO NOT USE THE PREVIOUS SIGNALS as they may have grown greatly to try to achieve the desired plate motion. If the signals are not reset and are used to run the PPOD it may damage the system.
- Check the amplifiers to make sure they are at the correct gain. The lower two amplifiers should be set to +8 and the top amplifier set to +11 for channel 1 and +13 for channel 2 for the output voltages to be the same. These numbers can be easily checked/calibrated with the User Specified Control Signals and an oscilloscope. This can lead to difficulty controlling the system.
- If the PPOD fails to start and there is a MATLAB error about the DAQ boards, there may be a problem with the DAQ initialization in MATLAB. This can be a problem if there have been any hardware changes recently. To fix this use the daqhwinfo('nidaq') command from above and check that the BoardNames and InstalledBoardIds in the output structure against those specified in the file Initializedaqinfo.m. These are found in the handles.daqinfo.ai and handles.daqinfo.ao objects, set in lines 25-26. Output channels should be 0:6 (0 is the clock pulse, 1:6 are speaker channels) set in line 36. Input channels should be 0:11 (for the 12 accelerometer signals) set in line 39.
- If one or more signals are zero, or the signals do not match the plate motions then there may be a problem with the speaker/accelerometer connections. Check the connections on the back on the amplifiers. CH 1 input corresponds to Channel A output, and CH 2 with Channel B. Ex. Channel 1 leading out from the DAQ board should connect to CH 1 of the bottom amplifier and the leading out of Channel A should connect to the screw terminal labeled Speaker 1 on the accelerometer board. Accelerometer 1 should be found above Speaker 1, Accelerometer 2 should be found above Speaker 2, etc on the PPOD. The pins on the accelerometers plug into the holes on the ribbon cable sockets that are closest to the end of the cable. As a last resort, check the MATLAB function L2Wconverter.m to ensure that the accelerometer locations in the function correspond to the actual locations on the plate.