Results

To determine the set point, the point at which the error of the pendulum is calculated, we removed the pendulum from the turn pot and reinstalled it 180° from its original position.

The integer value, 453, had the highest probability of being the set point. We found in experimentation that this value produced acceleration in the clockwise direction. By trial and error, the set point value was determined to be 458. This value was partial to counterclockwise rotation, but no overall acceleration was observed. We suspect this change from the data collected to be due to a curve in the pendulum rod, that may have offset the center of mass of the pendulum from the upright to downright position.

To check the accuracy of the Arduino, we measured the frequency of pulse output vs. the calculated frequency by the PID algorithm.

There was error in the Arduino frequency output. A linear offset in the error was not found therefore we could not correct for this.

=

The optimal PID constants for the two sampling periods were determined to be,

The 100 Hz (10 ms sampling period) algorithm worked well for high error, or when the pendulum was tapped, and the 3313 Hz (30 ms sampling period) algorithm worked well when the error was low.

Both sampling rates were used in the final code. An error threshold of 1.05° had to be exceeded before the algorithm switched from 3313 Hz to 100 Hz.

The length of the pendulum was adjusted to show the critical angle has no dependence on the length.

Fitting these values to a constant using LSQ fit returned a critical angle of (6.60 ±0.20)° Unfortunately, the reduced χ-squared was 7.21 for a critical angle with no length dependence.

For a data set of 17 points, the confidence interval was calculated to be 0.21. According to the Physics 4052 Lab Manual, a confidence interval between 0.05 and 0.95 is "acceptable" however we think further investigation is needed to prove zero length dependence.