Let us consider to control the position of a cart with mass M placed on a slope with angle θ as illustrated in Figure 1. We can move the cart by force f along the x-axis parallel to the slope. Assume that f can be sufficiently large to pull up the cart. Friction between the cart and the slope and air resistance are negligible. We let f(t),x(t), and v(t) denote the force f, the position, and the velocity of the cart at time t, respectively. The magnitude of gravity acceleration is denoted by g.
Suppose that x(0)=0 and v(0)=0 at time t=0. We consider a method to move the cart to the position x=L. Answer the following questions.
(1) Find the position and the velocity of the cart when we accelerate it with a constant force f(t)=F (F>0) until the time t1.
(2) We want to deaccelerate the cart with a constant force f(t)=−F (F>0) from the time t1 in Question (1) until the time t2 (t2≥t1) so that x(t2)=L and v(t2)=0. Find t1 and t2 which realize this motion.
Next, we consider to give a force proportional to the displacement from the target position x=L. Specifically, we give f(t)=k1{L−x(t)}. k1 is a positive constant.
(3) Write down the equations of motion for this case.
(4) Draw a graph of x(t).
Next, we consider to further add a force proportional to the velocity of the cart. Specifically, we give f(t)=k1{L−x(t)}−k2v(t). k1 and k2 are positive constants.
(5) Explain an effect caused by adding −k2v(t) and the reason why this effect occurs.
(6) Find the condition regarding k1 and k2 so that x(t) does not oscillate. You can use the following facts if necessary.
The general solution of a differential equation
dt2d2x+adtdx+bx=0 (a and b are real-valued constants)⋯(A)
can be represented by the solution of the quadratic equation
r2+ar+b=0⋯(B)
as follows:
When Eq.(B) has two different real roots p and q,
x=C1ept+C2eqt
When Eq.(B) has two different imaginary roots h±ki,
x=eht(C1coskt+C2sinkt)
When Eq.(B) has a double root p,
x=ept(C1+C2t)
Here, C1 and C2 are constants of integration.
(7) Draw a graph of x(t) under the condition obtained in Question (6).
Next, we consider to further add a force proportional to the integral of the displacement from the target position. Specifically, we give f(t)=k1{L−x(t)}−k2v(t)+k3∫0t{L−x(τ)}dτ. k1,k2, and k3 are positive constants.
(8) Explain an effect caused by adding k3∫0t{L−x(τ)}dτ and the reason why this effect occurs.
We apply Newton's second law to the motion of the cart along the slope.
The forces acting on the cart are the applied force F (up the slope) and the component of gravity Mgsinθ (down the slope).
The equation of motion is:
Ma=F−Mgsinθ
The acceleration a1 is:
a1=MF−Mgsinθ
For the stated uphill acceleration, F>Mgsinθ is required.
Since initial velocity v(0)=0 and initial position x(0)=0, we integrate with respect to time t:
Velocity:
v(t)=a1t=MF−Mgsinθt
Position:
x(t)=21a1t2=2MF−Mgsinθt2
(2) Bang-Bang Control (Acceleration and Deceleration)
Let the acceleration during the first phase (0≤t≤t1) be a1=MF−gsinθ.
Let the acceleration during the second phase (t1<t≤t2) be a2. The force is −F, so:
a2=M−F−Mgsinθ=−MF−gsinθ
At time t1, the position x1 and velocity v1 are:
v1=a1t1
x1=21a1t12
For t>t1, the velocity is given by v(t)=v1+a2(t−t1). We require v(t2)=0:
Effect: The term −k2v(t) acts as a damper (viscous friction). It suppresses the oscillation of the cart, causing the amplitude of the vibration to decay over time so that the position converges to a steady value.
Reason: The force −k2v(t) is always opposite to the direction of motion. This performs negative work on the system, dissipating kinetic energy until the cart stops moving (v=0).
In particular, for E=21Mx˙2+21k1(x−xeq)2, the equation of motion gives E˙=−k2x˙2≤0.
Under the condition k22≥4Mk1 (overdamped or critically damped), the system approaches the equilibrium without oscillating.
The equilibrium position is found by setting derivatives to zero:
k1xfinal=k1L−Mgsinθ⟹xfinal=L−k1Mgsinθ
Write xeq=L−Mgsinθ/k1 and ω=k1/M. At critical damping, k2=2Mω,
x(t)=xeq{1−(1+ωt)e−ωt}.
For overdamping, put a=(k2−k22−4Mk1)/(2M) and b=(k2+k22−4Mk1)/(2M), so 0<a<b. Then
x(t)=xeq(1−b−abe−at−ae−bt).
Both curves start with zero slope and converge monotonically to xeq. For xeq>0, they rise from below; the steady error is exactly L−xeq=Mgsinθ/k1. The graph shows the normalized response with damping ratio ζ=k2/(2Mk1); ζ=1.5 is an illustrative overdamped case.
For xeq=0, x(t)≡0 for every k2>0, even when the characteristic roots are complex; the discriminant condition describes non-oscillatory modes and the nonzero response.
Effect: Provided that the closed loop is stable, the addition of the integral term k3∫0t{L−x(τ)}dτ eliminates the steady-state error, causing the cart to converge exactly to the target position x=L. For this third-order system, the Routh--Hurwitz condition is k1k2>Mk3 (in addition to k1,k2,k3>0).
Reason: In the previous cases (P and PD control), the controller relied on the position error (L−x) to generate force. To counteract gravity (Mgsinθ), a non-zero error was required (steady-state error).
With the integral term, if there is any steady error L−x=0, the integral value grows over time, increasing the applied force f. This accumulation continues until the force is sufficient to balance gravity exactly when the error is zero (x=L). In steady state, x˙=0,x¨=0, and x=L, making the integral term provide the constant force Mgsinθ.
Differentiating the closed-loop equation gives the characteristic polynomial Ms3+k2s2+k1s+k3. Its Routh first column is
M,k2,k2k1k2−Mk3,k3.
All entries are positive exactly under the stated stability condition. At the stable equilibrium, the integral state is ∫0∞(L−x(τ))dτ=Mgsinθ/k3.