Abstract
This paper describes a mathematical model, estimation technique, and experiment exploring the nonlinear dynamics of a spherical pendulum subject to air drag in the presence of a steady horizontal velocity field. The pendulum’s dynamics are derived with drag as a quadratic function of the pendulum’s flow-relative velocity in both spherical and Cartesian coordinates. Numerical simulations are presented to illustrate the diverse motions that may be exhibited by the system. The model can be representative of many real-world systems that consist of an object tethered from a stationary platform in the presence of wind, or from a moving platform that induces a relative wind. The observed motion of the spherical pendulum can also be used to infer steady wind conditions. A simple experiment is described that demonstrates a pendulum-based wind sensor. A ping-pong ball is suspended on a string in the presence of an air blower and a video recording is used to measure the angular motion. The recorded measurements are then processed to infer the wind applied by the blower. Three techniques are used to compute an estimate of the wind: a static estimate based on an equilibrium assumption, a dynamic estimate that considers the instantaneous angular velocity, and an extended Kalman filtering approach. The system can serve as an instructive demonstration for students studying mechanical engineering as it provides an opportunity to discuss concepts related to damped harmonic motion, air resistance, spherical coordinates, numerical simulation, signal processing, and sensor calibration.
Introduction
The pendulum is widely used in engineering and physics education as an example of simple harmonic motion.
1
In textbooks on engineering dynamics, it is often first treated as a concentrated point mass suspended by a massless and inextensible string oscillating in the vertical plane subject only to gravity and tension.
2
The pendulum is also used in a variety of laboratory experiments wherein students infer the value of gravitational acceleration and study the effects of damping.
3
As noted by Nelson and Olsson,
3
when using the pendulum to measure the acceleration of gravity
Many studies have previously investigated air resistance (e.g., linear and/or quadratic drag 4 ) on a pendulum. However, these have typically been studied under the assumption of still air. When an external air flow is introduced, as we shall see, its effect on the spherical pendulum model is to alter the direction and magnitude of the drag force in comparison to the drag in still air. This introduces an asymmetry in the dynamics as the pendulum swings with or against the wind. If the air flow does not vary over time, then the pendulum achieves equilibrium at an angle that is offset from the vertical. As further motivation for studying the spherical pendulum in wind, we discuss how the apparatus can be used as a simple anemometer. Our approach is conceptually similar to the educational exercise presented by Hernandez et al. 5 wherein an optical computer mouse wheel sensor was retrofit to measure the angles of an irregularly shaped drag body and infer the wind velocity from the equilibrium angle. This article delves deeper into the equations of motion that govern this system and proposes an apparatus for experimentation that is constructed with low-cost materials that are readily available (e.g., a ping-pong ball, webcam, string, masking tape, drinking straws, and an air blower or fan). By recording videos and using image processing, the position of the pendulum bob relative to the attachment point is determined and used in subsequent analysis. This approach follows the success of prior works that have used videos for pendulum-based educational experimentation. For example, Ristano et al. 6 used stereo cameras to characterize pendulum oscillations, and Bacon et al. 7 recorded and analyzed videos to characterize the air drag on a swinging meter stick. Other techniques for capturing pendulum angle or timing include using smart phones 8 and rotary motion sensors 9 . Our use of a simple spherical drag body allows comparison with well-established theoretical models and naturally prompts a discussion of concepts such as Reynolds number, turbulence, and comparison between theoretical and experimental results.
The motion of a pendulum in wind has been studied in prior work. For example, a practical motivation for analyzing the spherical pendulum in wind is to model the motion of objects tethered to a stationary platform in wind (e.g., tower cranes carrying loads in the presence of wind
10
), or objects tethered to a moving platform (e.g., tethered cargo being transported by helicopters
11
). The pendulum dynamics analyzed in this paper can therefore be considered a special case of such prior works. However, our focus is on describing the dynamics of this spherical pendulum as a standalone device used as a pedagogical example for a laboratory-scale wind-sensor (anemometer). Anemometers are used in numerous applications such as measuring the atmospheric boundary in environmental science
12
and monitoring wind patterns in urban environments.
13
Several anemometer designs have been developed that exploit various physical principles which present an opportunity to discuss with students:
Hot-wire
14
anemometers rely on convective cooling effects on a temperature-sensitive resistive material.
15
Sonic anemometers
16
are based on the principle of air flow perturbing the speed of sound travel time between an acoustic transmitter and receiver and measuring the resulting phase shift or delay of a pulse train.
17
Cup anemometers
18
capture wind along several paddles or cups and convert this into rotational motion that can be measured with encoders or other means and correlated with wind speed.
18
Multi-hole pressure probes
19
obtain three components of flow velocity by comparing differential, static, and total pressures (according to Bernoulli’s equation) measured by pressure transducers and using a look-up-table obtained from wind tunnel calibration.
20
Drag body devices
21
typically use a sphere (or other object with a well identified drag model
22
) mounted on a rigid support. The deflection of the support under the influence of a wind-induced aerodynamic force is measured (e.g., using strain gauges,21,23 lasers with position-sensitive detectors (PSDs) to measure displacement
24
, or other techniques.25,26)
The design proposed in this paper is most closely associated with the drag body devices mentioned above. Spheres used for this purpose simplify analysis due to their symmetry and because their drag coefficient (as a function of Reynolds number) has been well-documented.22,27
Three wind estimation techniques are proposed that rely on angular data of the pendulum model. The first two methods are the simplest and rely on either (1) an equilibrium assumption giving a closed-form wind estimate equation, or (2) a numerical approach that considers the non-equilibrium dynamics. Lastly, this paper also describes the use of Kalman filtering for estimating the magnitude of a steady wind. While Kalman filtering is a more advanced topic it can potentially be incorporated into a lab or classroom demonstration related to mechatronics, control, or signal processing, similar to the popular experiment involving control and system identification of an inverted pendulum.28–30
In summary, the contributions of this paper are: (1) a teaching method that uses an analytical model of the equations of motion of the spherical pendulum in wind derived in both spherical and Cartesian coordinates, (2) three methods to infer the steady wind components from a time-history of pendulum angles, and (3) an apparatus and experimental comparison that can be used for classroom demonstration.
The remainder of the paper is organized as follows. First, a model of the dynamics of the spherical pendulum in wind is formulated. Next, numerical simulations are presented and an alternate set of singularity-free equations are derived. Several approaches to estimate the components of the wind speed by observing the pendulum’s motion are then presented. Next, an experimental apparatus and demonstration is described that illustrates the wind estimation approach. Finally, the paper is concluded and future work is described.
Analytical model
Consider a spherical pendulum with a bob of mass

Left: Cartesian coordinate system. Right: Spherical coordinate system.
The position of a particle is described in the spherical frame by the coordinates

Free-body diagram of the spherical pendulum subject to a constant horizontal wind velocity.
Tension acts towards point
Having established all forces, the equations of motion are given by Newton’s 2nd Law:
Numerical simulations
This section presents several illustrative simulations of the equations of motion.
Singularity-free equations of motion
One of the challenges with simulating the system above is that a singularity exists at
Illustrative simulations
A set of four numerical simulation of the spherical pendulum in a steady wind are shown in Figures 3–6.





Comparison of three estimation techniques using simulated noise-free data.
The parameters of the model used in simulation (see Table 1) were chosen to be representative of the experiment to be described later.
Model parameters.
The reference area used in the drag calculation is
Wind estimation techniques
To determine the wind components for the case of a constant wind three approaches are considered, as described next.
Method #1: Equilibrium-Based estimate
We can rearrange the equilibrium condition (10) for
Moreover, a simplification occurs if the Cartesian frame is rotated so that
Method #2: Dynamic estimate
If instead we consider the pendulum at a non-equilibrium point then (4)–(6) form a system of three equations with three unknown values
Method #3: Extended Kalman filter
Rather than only relying on the data at each particular point in time, an extended Kalman filter (EKF) recursively compresses all past information into the current estimate of the state that is more robust to measurement and modeling errors or noise. The predecessor of the EKF, the Kalman filter (KF), was invented in 1960 by engineer Rudolf E. Kalman 33 to recursively estimate the state of a linear dynamical system under Gaussian measurement and process noise. The key idea is that the state of a dynamical system is represented by a Gaussian random vector with a mean and covariance that can be updated recursively as new measurements are obtained. The KF assumes knowledge of how much the dynamic process may vary due to inherent process noise and how much the measurement of the process may vary due to sensor noise (represented as covariance matrices). When a new measurement is obtained, a prediction of the state/measurement is compared to the actual obtained measurement and the estimate of the system state is produced that combines both sources of information (sensor and prediction) in an optimal (least-square error) way. By including knowledge of the underlying physics the estimate obtained is provably optimal and generally superior to an estimate based on traditional filtering (e.g., a low-pass filter). The KF was later extended to handle dynamics that are nonlinear, leading to the “extended” KF. A variant of the EKF was used in the Apollo lunar module’s guidance system. The history surrounding the use of the EKF in the Apollo program can be of interest to students.
In the problem of this paper, the pendulum’s dynamics evolve in continuous time while the measurements are regularly spaced in discrete time. Hence, a sampled-data EKF is used (refer to Simon
34
for more details). We again restrict our analysis here to the case where the motion is purely in the
There are many references that provide step-by-step procedures for designing a sampled-data EKF (e.g., see Simon
34
). We omit repeating these descriptions here and focus on providing the Jacobian of (18)–(20) which is required for the linearization step of the EKF. The Jacobian is
Simulation example
The three estimation techniques are compared in Figure 7 for a simulation that begins with the pendulum hanging downward at rest in the presence of a wind of 4.35 m/s. The Kalman filter is initialized hanging with an estimate of 2.5 m/s. In this example, the equilibrium point estimate varies as the pendulum oscillates but begins to settle around the actual value after a few seconds. The dynamic point estimate, which considers perfect knowledge of the angular rate, continuously estimates the correct value of the wind. The EKF approach requires about half a second to converge.
Experimental demonstration
Apparatus
A laboratory spherical pendulum was developed that consisted of a standard ping-pong ball (see left panel of Figure 8) tied on a string (a fishing line) and suspended from a wooden plank. The connection point was secured at the edge of the plank with masking tape. The source of wind was a custom-made blower that was built from an 11 inch drone propeller, brushless motor, and electronic speed controller (ESC). The ESC was powered by a 21 V DC power supply and connected to an Arduino control board. A laptop was used to set the throttle percentage to the ESC. As can be seen in Figure 8, the propeller was mounted inside of a duct which contained a large number of drinking straws that are glued together. Forcing the air to pass through the straws helps remove rotational components of the air flow to produce more consistent and uniform flow for experimentation (similar “flow straighteners” are often used in the design of wind tunnels).

The experimental setup included a drag body spherical pendulum, webcam, and blower.
In principle, this custom propeller and flow straightener setup can be replaced by any sufficiently powerful fan or blower to reproduce the experiment. A rigidly mounted webcam recorded the motion of the pendulum in response to an applied wind. The parameters of Table 1 were assumed. The density was assumed to be standard sea-level density and the mass, string length, and sphere radius could be measured directly. Anticipating flow speeds of around 5 m/s the Reynolds number is approximately 13,300. The drag coefficient (of the ping-pong ball sphere only) based on this Reynolds number
27
is
The simulated motion of the pendulum with the theoretical drag coefficient above did not produce a good match with experimental data. Thus, it was manually tuned to provide a better fit. The fit was conducted by comparing the output of the simulation to an experiment in which the ball was released from rest at an angle of about 84 degrees. The results are shown in Figure 9. A value of

Experiment and model comparison for the pendulum released from rest at an angle of about 84 deg. in the absence of wind.
An interesting asymmetry was observed in amplitude of the experimental data (i.e., the amplitude reduces and then increases with every oscillation). This suggests unaccounted for energy storage in the system. The fishing line used was previously reeled on a spool and without the weight of the ball it had a moderate curve and springiness. It is possible that the string holding the ping-pong ball behaves like a leaf spring that asymmetrically stores and releases potential energy. The interaction of the adhesive of the masking tape or a slight angular offset in how it was secured could have also played a role as the string was clamped by the tape rather than pinned to a spherical free joint.
Data collection and image processing
Data was recorded by the webcam at 30 Hz and was then saved as a series of images corresponding to each frame (1920 x 1080 pixels). A color mask based on a range of values similar to the pink hue of the ping-pong ball was created and applied to the images, resulting in a new binary image. The binary image was further refined by removing all connected components in the image that have fewer than a threshold number of pixels. Next, a “hole filling” operation was performed to address the reflection/glare on the ball and produce a nearly circular image. Lastly, the circular Hough transform was used to determine the center of the circle. The MATLAB functions used in this procedure include:

Time history of image pixel data collected.
The videos being processed all began with the ball hanging at rest. Once the image pixels were obtained, the first few seconds were averaged to establish this nominal (downward-hanging) position of the center of the ball. Next, the location of the hinge point of the string in pixel units (directly above the nominal position) was determined by inspection of the image and marked. From these reference points the angle of the pendulum could be computed. To compute the angular rate and angular acceleration a basic finite (forward) differencing scheme was applied. A second order low pass filter was applied to the angular rate and angular acceleration data to improve the smoothness of the results. The resulting angular data is shown in Figure 11 with an overlay of simulated data. The simulated data uses the model parameters of Table 1 with an assumed wind speed of 4.15 m/s. The experimental data and the simulated model exhibit some discrepancy that appears as a change in damping and shorter period of oscillation compared to the model established in the absence of wind (Figure 9). Possible reasons for this discrepancy are discussed later in this article.

Time history of inferred angular data from experiment.
Wind estimation: Experimental evaluation
A series of experiments were performed wherein the ping-pong ball initially began at rest and subsequently was perturbed by starting the blower. The experiments were around a minute in length and the air blower was set to various throttle settings (ranging from 20% to 70% in 10% increments). Independently, prior to the experiment, a low-cost handheld anemometer (Model: Btmeter BT
Figure 12(a) illustrates the experimental and simulated time-history response and equilibrium angle of the pendulum released from rest with wind in the

Predicted response of pendulum for range of blower speeds assuming the identified model parameters in Table 1. (a) Experimental (solid lines) and simulated (dashed lines) time history of pendulum angle; (b) Predicted equilibrium angle.
The comparison in Figure 12(a) exposes some limitations of the proposed model: the magnitude of the predicted angle approximates the experimental data reasonably for the initial response (peak near 1 second), but afterwards it appears the experiment has a response with a faster natural frequency and lower damping. This is surprising as the model parameters were shown to have an excellent fit with the data in Figure 9 where the blower was off, and it is well known that a pendulum’s natural frequency depends only on its length. Moreover, for low and medium wind speeds (blue and yellow lines in Figure 12(a)) the oscillations are approximately around the predicted dashed line equilibrium, but for the green line the oscillations are around a lower angle than predicted. Further discussion of possible unmodeled effects is provided in the following section.
Figure 13 shows a comparison of the three methods used to estimate the wind over time for the case of 40% throttle. This data is analogous to the idealized simulation of Figure 7 as it uses the same wind value and initial condition. The experiment data from this trial is shown in Figure 11.

Comparison of three estimation techniques using experimental data with 50% throttle.
During the initial start-up phase from 0–3 seconds the EKF is converging from its initial condition. Once converged, the EKF performs well and holds a relatively steady value with some small oscillations. Unlike the ideal (noise-free) case, the EKF estimate performs better than the dynamic estimate when using real (noisy) data. The dynamic estimate is particularly susceptible to errors in angular velocity, as illustrated by several outliers visibile in Figure 13. When applying the dynamic estimation method to noisy data, the equation (17) cannot be satisfied exactly. Hence a least-square optimization is formulated using the MATLAB function
The overall comparison of the three estimation techniques for different throttle settings alongside the handheld anemometer measurement is shown in Figure 14. The mean and standard deviation of the estimates from the last 10 seconds of each run was calculated and used to plot the wind estimate mean and deviation bars. The results show that the estimates match the measured speed fairly well for throttle settings of 20%, 30%, and 40% but tend to produce lower values for higher throttle settings.

Overall comparison of wind estimates and measurement during experiments with varying throttle setting.
Among the three estimates the mean values appear fairly consistent. The EKF produces the lowest variance with a standard deviation of between 0.08–0.16 m/s for the flow speeds tested ranging from 1.35 to 6.7 m/s. This is expected since the EKF is designed to tolerate noise in measurements and produces an estimate that encodes data from a time-history of measurements, whereas the dynamic and equilibrium methods treat each data point in time independently. For low throttle settings the dynamic estimate produces lower variance than the equilibrium-based estimate, and this trend is reversed for higher throttle settings. This maybe a result of the angular velocity data being more accurate at lower wind speeds. Overall, Figure 14 demonstrates good agreement between measured and estimated values at lower throttle settings but the measured value is significantly higher at 60% and 70% throttle. This higher value may be due to the non-uniformity of the flow and/or other unmodeled effects.
Discussion of unmodeled effects
There are several possible factors which may introduce unmodeled effects that explain the observed discrepancy between model and experimental results:
Non-uniformity of the flow: The flow magnitude generally decreases away from the fan and exhibits a radial distribution that varies with distance from axis of the flow. Since the ground truth measurements were taken with a handheld anemometer at the nominal resting position of the pendulum (i.e., at the location where it hangs vertically and closer to the edge of the blower’s flow) the pendulum may be experiencing slightly varied flow conditions from what was measured when it is at large angles closer towards the center of the flow. Turbulence of the flow: Although the flow straightener was used to reduce turbulence, there still may be residual components of turbulence that lead to time-varying aerodynamic forces not accounted for in the quadratic drag model. Wake interaction: In the presence of the wind, the wake generated by the sphere is convected downstream. As a result, the pendulum moves into its own wake as it swings with the flow and moves into relatively undisturbed air as it swings against the flow. This asymmetry introduces a dependence on the history of the flow-field. More generally, bodies in an oscillating flow can experience unsteady forces from vortex shedding and phase-lagged fluid response. These effects are commonly represented in engineering models by additional force terms that depend on velocity, acceleration, and added mass (e.g., the Morison equation). Out-of-plane motion: High throttle settings also tend to exhibit more horizontal motion that violates the assumption of purely vertical motion used in the image-processing-based angle estimation.
Introducing additional force terms and increasing the model complexity may reduce the discrepancy, however this is outside the scope of this paper. Alternatively, a more direct approach from the perspective of wind-sensor design is to treat the pendulum and blower as a generic second-order closed-loop system and select multiple values of the damping ratio
Despite the discrepancies observed, the proposed apparatus and corresponding analysis is sufficient to achieve educational objectives. The discrepancy can be used as a point of discussion with students regarding modeling assumptions and their validity under different experimental conditions. The discrepancy is largest for higher wind speeds, and thus experimental demonstrations can be limited to lower speeds where there is greater agreement with the model.
Potential design improvements
There are many factors that can potentially affect the degree to which undesirable oscillations are present in the data due to the experimental design. The authors briefly tested using heavier spheres by filling the ping-pong balls with either foam beads or lead shot in an epoxy matrix. The heavier lead-shot-filled ball (approximately 240g) displayed minimal movement even in the strongest blower setting. The foam-filled ball (approximately 20g) exhibited an intermediate amplitude in its response to wind inputs, but it still oscillated considerably in the wind. In principle, one could tune the pendulum length, pendulum string material, and drag object size, and weight to provide an improved signal-to-noise ratio (i.e., an angular deflection sufficient to overcome image processing noise and be larger than the amplitude of oscillations).
Conclusion
This paper described the dynamics of a spherical pendulum in wind and presented several simulation examples that illustrate the rich dynamics exhibited by this system. A simple device was constructed that allows recording pendulum motion data (when confined to a vertical plane of motion) and to exploit such data for predicting the wind velocity generated by an indoor blower. The apparatus, when combined with an EKF estimator, produces a reasonable estimate of the wind, especially for low to moderate wind speeds. While there are some discrepancies between the model and the experiment, the performance is sufficient to demonstrate the working principle of the spherical pendulum as an anemometer in an educational context. Some of the challenges encountered, such as simulating equations of motion with a singularity, or noise introduced when computing numerical derivatives through finite differencing, and complexity surrounding turbulence and vortex shedding can serve as learning opportunities for students.
Future work may consider extending the data collection and estimation approach to support arbitrary three-dimensional motions and improving the apparatus through alternative drag body and blower designs (or using a calibrated wind tunnel). Modeling and accounting for a more complex non-uniform and turbulent flow-field could help improve the accuracy in laboratory-scale experiments which inherently have such limitations. Developing a web-based simulator for students could also improve accessibility and support remote and at-home experimentation and learning.
