
Background: I am trying to model my arm as a spring with constant b. As the arm is on the door it compresses and it accelerates the door and decelerates me. I am trying to solve for door angle theta as a function of time, from the moment when the arm touches the door to the moment the arm is fully compressed. The compression is expressed as the difference in tangential velocity of the door at contact point and the velocity of the man. I have worked through the derivation of the formulas but came up with an error function at the end which I think is not reasonable. I may have done this wrong, so please please help if you have any thoughts. I really need your help.
the derivation is as follows: At $t=0$, Arm just touches the door and being compressed at a rate of
$X(t)=\Delta x=(u_{man}-u_{door})t$
Where $u_{door}$ is the tangential velocity of the door at the current position $r$, which can be expressed as $r=\frac{r_0}{\cos\theta}$. From rotational kinematics, $u_{door}\cos\theta=\dot{\theta}r \Rightarrow u_{door}(t)=r_0\frac{\dot{\theta}(t)}{\cos^2{\theta(t)}}$. For the man, he experiences a deceleration due to compression of the spring, $F_{spring}=bX=ma \Rightarrow a(t)=\frac{b}{m}X(t)$. Hence, $u_{man}=u_0-\frac{b}{m}\int X(t)dt$.
This gives:
$X(t)=(u_0-r_0\frac{\dot{\theta}(t)}{\cos^2\theta(t)} -\frac{b}{m}\int X(t)dt)t$
Rearrange and substitute $g(\dot{\theta},\theta)=u_0-r_0\frac{\dot{\theta}(t)}{\cos^2\theta(t)}$:
$t^{-1}\cdot X(t)=g(\dot{\theta},\theta) -\frac{b}{m} \int X(t)dt$
$\frac{d}{dt}(t^{-1}\cdot X(t))=\frac{d}{dt} (g(\dot{\theta},\theta) -\frac{b}{m} \int X(t)dt)$
$-t^{-2} X(t)+t^{-1} X'(t)=\frac{d}{dt} (g(\dot{\theta},\theta))-\frac{b}{m} X(t)$
Rearrange:
$\frac{1}{t} X'(t)+(\frac{b}{m}-\frac{1}{t^2})X(t)=t\frac{d}{dt} (g(\dot{\theta},\theta))$
$X'(t)+(\frac{bt}{m}-\frac{1}{t})X(t)=t\frac{d}{dt}(g(\dot{\theta},\theta))$
Denote function $f$, such that $f'(t)=(\frac{bt}{m}-\frac{1}{t})$
$X'(t)+f'(t)X(t)=t\frac{d}{dt}(g(\dot{\theta},\theta))$
Multiply both sides by $e^{f(t)}$:
$e^{f(t)}\cdot X'(t)+e^{f(t)}\cdot f'(t)\cdot X(t)=e^{f(t)}\cdot t\cdot \frac{d}{dt} (g(\dot{\theta},\theta))$
LHS can be rewritten as
$e^{f(t)} X'(t)+e^{f(t)} f'(t)X(t)=\frac{d}{dt} (e^{f(t)} X(t))$
Hence,
$\frac{d}{dt} (e^{f(t)} X(t))=t e^{f(t)}\frac{d}{dt} (g(\dot{\theta},\theta))$
$e^{f(t)} X(t)=\int t e^{f(t)} dt\cdot (g(\dot{\theta},\theta))$
from here if you substitute them in, you will find an integral of (exp(2t^2/bm))dt which is non solvable.
The fact that the moment arm of the spring on the pivot changes with the door angle makes this a non-solvable problem analytically and in need of a simulation.
But if you ignore this non-linearity and assume that the arm is always a distance $b$ from the pivot at all times as the hand slides along the door, then there is a solution.
Here is the notation for distances and angles that I am using, as well as a free-body diagram with all quantities shown in their positive state. Note that $x$ starts at a fixed value $x_0$ and grows smaller as the person approaches the door with speed $v_0$. I assume this speed is maintained and $\dot{x} = -v_0$
I have included a push force $F_b$ needed to maintain this constant speed as the door opens. The system has two DOF, $x$ and $\theta$, although since $x$ has prescribed motion, the system is really a 1-DOF system in terms of $\theta(t)$.
The spring force is evaluated at any instant with
$$ F_s = -k_x ( b \theta + x-x_0) -d_x ( b \dot{\theta} + \dot{x} ) \tag{1} $$
where $k_x$ and $d_x$ is the stiffness and damping coefficients for the linear spring.
The convention above is that the spring extends when both $x$ and $\theta$ grow in value. But because $x(t)$ is prescribed, you have
$$ x(t) = x_0 - v_0 t \tag{2} $$ $$ \dot{x} = -v_0 \tag{3}$$
The equation of motion of the door is very similar to what you wrote in the question
$$ I_d \ddot{\theta} = -k_\theta \,\theta -d_\theta \, \dot{\theta} + b\,F_s \tag{4} $$
Where $I_d = \tfrac{1}{3} m_d \ell^3$ is the MMOI about the pivot, and $k_\theta$ and $d_\theta$ are the rotational stiffness and damping coefficient of the door hinge.
Combine (2) and (4) to get the equation of motion of the door
$$ \ddot{\theta} + \left(\frac{b^2 k_x + k_\theta}{I_d}\right) \theta + \left( \frac{b^2 d_x + d_\theta}{I_d} \right) \dot{\theta} - \left( \frac{b v_0 (d_x + k_x t)}{I_d} \right) = 0 \tag{5} $$
Now define the following parameters $\omega_n$ and $\zeta$ that would simplify the solution of the above by using the following substitution.
$$ \begin{aligned} \omega_n^2 & = \frac{b^2 k_x + k_\theta}{I_d} \\ 2 \zeta \omega_n & = \frac{b^2 d+x + d_\theta}{I_d} \\ \end{aligned} $$
Not the equation of motion (5) is re-written as
$$ \ddot{\theta} + 2 \zeta \omega_n \dot{\theta} + \omega_n^2 \theta - \frac{b _0 ( d_x + k_x t)}{I_d} = 0 \tag{5} $$
This ODE has as the solution of the following form
$$ \theta=e^{-\omega_{n}\zeta t}\left(\left(\frac{bv_{0}(2k_{x}\zeta-d_{x}\omega_{n})}{I_{d}\omega_{n}^{3}}\right)\cos(\omega t)-\left(\frac{bv_{0}(d_{x}\omega_{n}\zeta+k_{x}(1-2\zeta^{2}))}{I_{d}\omega_{n}^{3}\sqrt{1-\zeta^{2}}}\right)\sin(\omega t)\right) + \\ + \frac{bv_{0}(d_{x}\omega_{n}-2k_{x}\zeta)}{I_{d}\omega_{n}^{3}}+\frac{bk_{x}v_{0}}{I_{d}\omega_{n}^{2}}t \tag{6} $$
with $\omega = \omega_n \sqrt{1-\zeta^2}$
The full solution above is subject to the following initial conditions
$$\begin{aligned}\lim_{t\rightarrow0}\theta & =0\\ \lim_{t\rightarrow0}\dot{\theta} & =0 \end{aligned} \tag{7}$$
You can verify the I.C. as well as that (6) satisfies (5) fully.