Open-Loop Model-Based Control for Actuated Mass-Spring-Damper Systems

Background

In mechanical motion control, overshooting – leading to damped oscillations (sometimes called ringing) – is a common phenomenon that can be caused by springiness and flexing of motion components. This phenomenon can be modeled using mass-spring-damper mechanics.

An illustration of the dynamics of a simple mechanical motion control system incorporating a spring and a damper. The orange curve offset to the right represents the target motion and the blue curve represents the simulated dynamics of an end effector.

A simple model illustrating the phenomenon is represented by figure 1. We see that every time the motion changes, the end effector will initially lag behind the commanded position. The lag results in a spring force that pulls the end effector towards the target, causing overshooting and oscillation.

We can model this as follows. Two forces act on the end effector: a spring force F_s with a magnitude determined by the difference between the commanded position x_c and the actual position x, and a damping force F_d with a magnitude determined by the end effector velocity \dot x.

    \begin{align*} F_s &= f_s(x_c - x) \\ F_b &= -f_d(\dot{x}), \end{align*}

where f_s is the spring function and f_d the damping function. For simplicity, we can often model these as linear functions,

    \begin{align*} F_s &= k\cdot(x_c - x) \\ F_b &= -b\dot{x}, \end{align*}

with k being the spring constant and b the damping coefficient.

A Model-Based Control Method

Given the above model, could we devise a control strategy to make the end effector more closely follow the target profile? One key insight is that the end effector can be treated as an inertial mass in space, with its position and velocity affected only by the external forces acting on it. These external forces are exactly the spring and damping forces from the equations above. So if we knew the mass, current position and current velocity of the end effector, we could calculate the exact resultant force required to keep the end effector following a commanded motion profile. If we further knew the damping parameters of the system, we could calculate the current damping force. The difference between the resultant force and the damping force is the additional force that we’d need to add to keep the end effector following its target motion profile.

The second key insight is that we can directly create this force by adding tension to the spring in the system by commanding the end effector to a position away from its current desired position. To calculate the required displacement, d, for a given target spring force, F_s, we’d need to know the system’s spring function, F_s = f_s(d), or rather its inverse, d = f_s^{-1}(F_s). For a linear spring, the equation is simply d = F_s/k, where k is the spring constant from above.

Assuming that we have a way of estimating the system mass, spring and damping parameters, how do we determine the exact position and velocity of the end effector that we need to realize this? The final insight is that we actually don’t need to directly measure these quantities. We can instead optimistically assume that we already have a perfect control system where the end effector position and velocity are exactly what we command them to be. As will be demonstrated later, this assumption is in fact robust to minor modeling errors. The system is naturally integrating and on average the set point and actual position will be the same.

So we start by making the optimistic assumption that the end effector is at the desired location x, following the desired velocity \dot{x} and acceleration \ddot{x}. We can then calculate the damping force F_d = -f_d(\dot{x}). From Newtonian physics we know that F = m\ddot{x}, and subtracting the damping force gives the required spring force F_s = F-F_d. This force can now be realized by adding an offset to the commanded position x_c = x + d, where d = f_s^{-1}(F_s).

Assuming linear spring and damper models, we can write the equations as follows.

    \begin{align*}    F &= m{\ddot{x}} \\    F_d &= -b\dot{x} \\    F_s &= F - F_d \\    d &= \frac{F_s}{k} \end{align*}

Expanding the equation for the displacement d gives

    \[d = \frac{F - F_d}{k} = \frac{m{\ddot{x}} + b\dot{x}}{k}\]

We can further eliminate the mass m by performing the following substitutions.

    \begin{align*}    \frac{b}{m} &= 2\zeta \omega_n \\    \frac{k}{m} &= \omega_n^2, \end{align*}

where \omega_n is the undamped natural angular frequency (radians/s) and \zeta is the damping ratio (ranging from =0 being fully undamped through <1 being underdamped (i.e. overshooting), =1 critically damped, and >1 overdamped). The angular frequency can further be converted to the ordinary undamped natural frequency f_n (Hz) by

    \[\omega_n = 2 \pi f_n.\]

With this, we get the following simple equation for the displacement with the model parameters \omega_n and \zeta,

(1)   \begin{equation*}  \boxed{d = \omega_n^{-2}\ddot{x} + 2\zeta\omega_n^{-1}\dot{x}} \end{equation*}

or as parametrized by the undamped natural frequency f_n and the damping ratio \zeta

(2)   \begin{equation*}  \boxed{d = (2 \pi f_n)^{-2}\ddot{x} + \frac{\zeta}{\pi f_n}\dot{x}.} \end{equation*}

Figure 2 shows the effect of plugging this displacement term into the control signal of the original simulation.

Perfect motion control realized by adding a compensation term to the commanded target position (orange motion profile). The blue curve shows the realized end effector motion.

Sensitivity Analysis

The simulation in figure 2 assumes that we know the system parameters perfectly. In reality there will always be a modeling error. Figure 3 shows the result of simulating a 5% modeling error of the natural frequency f_n and a 10% modeling error of the damping factor \zeta. Even though some overshooting is now present, the system still behaves substantially better than the uncorrected system in figure 1 indicating some robustness to modeling errors. Figure 4 further shows the sensitivity to incorrectly estimated modeling parameters.

The results of motion control when the system parameters are imperfectly estimated. The undamped natural frequency is estimated 5% higher than the simulation model and the damping ratio is estimated 10% lower. The resulting error is still substantially lower than the uncorrected system in figure 1.

Parameter Estimation

The green curve in figure 4 shows the estimation sensitivity to errors in f_n when we assume \zeta = 0. Here it’s worth noting that the optimal value for f_n is independent of the estimate of \zeta. This allows for a simple strategy to estimate the parameters sequentially when \zeta is small. Starting with setting \zeta to zero, we can sweep across f_n, pick the value that minimizes the overshoot error, and follow that by sweeping across \zeta values until the true minimum is found. Once this is done, the estimation process can optionally be repeated once, since the sensitivity to f_n should have increased substantially providing for a more accurate estimation the second round.

Sensitivity analysis simulation showing the max overshoot error as a function of incorrectly estimated parameters for the simulation in figure 2. The blue curve shows the sensitivity to estimating the natural frequency parameter f_n assuming the damping factor \zeta is perfectly known. The orange curve shows the sensitivity to estimation errors in \zeta assuming perfect f_n. The green curve finally shows the sensitivity to estimating f_n when \zeta is estimated as zero. In this case, the minimum for f_n coincides with the true minimum hinting toward a strategy to estimate the parameters sequentially.

Limitations

In all examples above, the target profile is  C^2-continuous, meaning that it has a continuous acceleration profile \ddot x. A discontinuous acceleration profile would create a step change in the correction term d (see eq. 12) which in many systems is not physically possible. More generally, constraints on the setpoint dynamics will constrain the possible target profile. For example if the setpoint is limited by a maximum change rate or speed (\dot x_c), it would impose a limit on the magnitude of the target profile’s third derivative (“jerk”) \dddot{x}.

For systems where a continuous acceleration profile (\ddot{x}) isn’t desired or possible and an instantaneous change of the setpoint x_c is also not possible, we can’t perfectly satisfy the requirements of the correction model. We can however approximate the target profile x_c by introducing a constrained profile x_c' designed to follow x_c as close as possible while satisfying a specified maximum speed limit. In its simplest form we can simply let x_c' lag behind x_c any time there is a commanded instantaneous position change, while moving to catch up as fast as possible within the given speed limits. Figure 5 shows an example simulation of this where the maximum setpoint speed is set to be 2 times the maximum speed of the end effector motion profile \left(\left|\max \dot x_c'\right| \leq 2 \left|\max \dot x\right|\right). While this doesn’t perfectly eliminate the ringing, it still offers a substantial suppression compared to the uncompensated case. It should be noted though that this is from an ideal simulation. In real-life applications discontinuous acceleration profiles will lead to highly varying correction signals and these may have a significant risk of exposing additional modeling errors.

A similar motion profile to the previous simulations, but using a constant acceleration profile rather than a smoother (s-curve) constant jerk profile. This motion profile has discontinuous accelerations giving a correction signal that requires instantaneous position changes. In this simulation we limit the maximum speed of the setpoint x_c to 2 times the maximum target speed for the end effector x and the actual setpoint is forced to lag behind the desired setpoint whenever there is a change in the target profile acceleration. Despite this lag, the resulting motion still exhibits substantially less overshooting than the uncorrected system in figure 1. It should be noted that this is from an ideal simulation. Real applications will likely perform differently.

Extensions

The approach described above can easily be extended to different and more complex models with for example non-linear springs and other damper dynamics. Serially chained articulated structures can straightforwardly be modeled by compounding multiple spring-damper systems, but the continuity requirements would also compound, meaning that a compounded system with n spring-dampers would require a C^{2n}-continuous target profile for a continuous control signal. Parallel structures can often be modeled independently without a compounding continuity constraint. Even though all examples above show underdamped system \left(\zeta<1\right), the approach can also be applied to overdamped systems \left(\zeta >1\right).