- #1
zenterix
- 423
- 60
- Homework Statement
- Consider the undamped harmonic oscillator with Heaviside unit step function ##u(t)## as input.
$$m\ddot{x}+kx=u(t)\tag{1}$$
and initial conditions
$$x(0^-)=0\tag{2}$$
- Relevant Equations
- $$\dot{x}(0^-)=0\tag{3}$$
I'd like to go through the derivation of the response function (ie, the so-called 2nd order unit step response).
This question is based on the calculations in these notes on 2nd order unit step response.
Some Initial Observations
The scenario modeled here is an undamped spring-mass system that is at rest until time ##0##, at which point a constant force starts to act on the mass.
The force is finite and causes a constant acceleration, which goes from being ##0## to suddenly being ##1/m##. Thus, acceleration has a discontinuity at ##0##.
Velocity, on the other hand, starts to increase from 0 in small increments. Position does as well.
Thus, position and velocity are continuous.
In the calculation below I will not assume this continuity. Rather it must come out as a result of the calculations.
Note that
$$u(t)=\begin{cases} 0\ \ \ \ \ \text{for}\ t<0\\ 1\ \ \ \ \ \text{for}\ t>0\end{cases}$$
Calculation of 2nd Order Unit Step Response
The general solution of (1) is
$$x(t)=\left (\frac{1}{k}+c_1\cos{\omega_nt}+c_2\sin{\omega_n t}\right )u(t)\tag{4}$$
Note that to find this solution I used initial condition (2).
Then
$$\dot{x}(t)=\left ( -c_1\omega_n\sin{\omega_n t}+c_2\omega_n\cos{\omega_n t} \right ) u(t)+\left (\frac{1}{k}+c_1\right ) \delta(t)\tag{5}$$
$$\ddot{x}(t)=(-c_1\omega_n^2\cos{\omega_n t}-c_2\omega_n^2\sin{\omega_n t})u(t)+c_2\omega_n\delta(t)+\left (\frac{1}{k}+c_1\right )\delta'(t)\tag{6}$$
In order to find the constants ##c_1## and ##c_2##, we can sub in (4) and (6) into the original differential equation.
$$m\ddot{x}+kx=u(t)$$
$$m\left ( (-c_1\omega_n^2\cos{\omega_n t}-c_2\omega_n^2\sin{\omega_n t})u(t)+c_2\omega_n\delta(t)+\left (\frac{1}{k}+c_1\right )\delta'(t) \right ) +k(\left (\frac{1}{k}+c_1\cos{\omega_nt}+c_2\sin{\omega_n t}\right )u(t))=u(t)\tag{7}$$
$$u(t)\left ( m(-c_1\omega_n^2\cos{\omega_n t}-c_2\omega_n^2\sin{\omega_n t}) +k\left (\frac{1}{k}+c_1\cos{\omega_nt}+c_2\sin{\omega_n t}\right ) \right )+mc_2\omega_n\delta(t)+m\left (\frac{1}{k}+c_1\right )\delta'(t)=u(t)\tag{8}$$
Since there are no products of ##\delta(t)## or ##\delta'(t)## on the rhs, we have
$$mc_2\omega_n=0\implies c_2=0$$
$$m\left (\frac{1}{k}+c_1\right )=0\implies c_1=-\frac{1}{k}$$
At this point we've found the constants we're after, but we haven't checked what happens with the factor on the ##u(t)## term in (8). In fact, the notes also do not check.
The check doesn't work for me.
$$m\left (-\left ( -\frac{1}{k}\right )\omega_n^2\cos{\omega_n t})+k\left (\frac{1}{k}+\left ( -\frac{1}{k}\right )\cos{\omega_n t}\right )\right )= 1$$
$$\frac{m\omega_n^2}{k}\cos{\omega_n t}+1-\cos{\omega_n t}=1$$
$$\cos{\omega_n t}\left (\frac{m\omega_n^2}{k}-1\right )=0$$
$$\frac{m\omega_n^2-k}{k}=0$$
I'm not sure what to make of these last equations.
I expected something like ##0=0## or ##1=1##.
Some Initial Observations
The scenario modeled here is an undamped spring-mass system that is at rest until time ##0##, at which point a constant force starts to act on the mass.
The force is finite and causes a constant acceleration, which goes from being ##0## to suddenly being ##1/m##. Thus, acceleration has a discontinuity at ##0##.
Velocity, on the other hand, starts to increase from 0 in small increments. Position does as well.
Thus, position and velocity are continuous.
In the calculation below I will not assume this continuity. Rather it must come out as a result of the calculations.
Note that
$$u(t)=\begin{cases} 0\ \ \ \ \ \text{for}\ t<0\\ 1\ \ \ \ \ \text{for}\ t>0\end{cases}$$
Calculation of 2nd Order Unit Step Response
The general solution of (1) is
$$x(t)=\left (\frac{1}{k}+c_1\cos{\omega_nt}+c_2\sin{\omega_n t}\right )u(t)\tag{4}$$
Note that to find this solution I used initial condition (2).
Then
$$\dot{x}(t)=\left ( -c_1\omega_n\sin{\omega_n t}+c_2\omega_n\cos{\omega_n t} \right ) u(t)+\left (\frac{1}{k}+c_1\right ) \delta(t)\tag{5}$$
$$\ddot{x}(t)=(-c_1\omega_n^2\cos{\omega_n t}-c_2\omega_n^2\sin{\omega_n t})u(t)+c_2\omega_n\delta(t)+\left (\frac{1}{k}+c_1\right )\delta'(t)\tag{6}$$
In order to find the constants ##c_1## and ##c_2##, we can sub in (4) and (6) into the original differential equation.
$$m\ddot{x}+kx=u(t)$$
$$m\left ( (-c_1\omega_n^2\cos{\omega_n t}-c_2\omega_n^2\sin{\omega_n t})u(t)+c_2\omega_n\delta(t)+\left (\frac{1}{k}+c_1\right )\delta'(t) \right ) +k(\left (\frac{1}{k}+c_1\cos{\omega_nt}+c_2\sin{\omega_n t}\right )u(t))=u(t)\tag{7}$$
$$u(t)\left ( m(-c_1\omega_n^2\cos{\omega_n t}-c_2\omega_n^2\sin{\omega_n t}) +k\left (\frac{1}{k}+c_1\cos{\omega_nt}+c_2\sin{\omega_n t}\right ) \right )+mc_2\omega_n\delta(t)+m\left (\frac{1}{k}+c_1\right )\delta'(t)=u(t)\tag{8}$$
Since there are no products of ##\delta(t)## or ##\delta'(t)## on the rhs, we have
$$mc_2\omega_n=0\implies c_2=0$$
$$m\left (\frac{1}{k}+c_1\right )=0\implies c_1=-\frac{1}{k}$$
At this point we've found the constants we're after, but we haven't checked what happens with the factor on the ##u(t)## term in (8). In fact, the notes also do not check.
The check doesn't work for me.
$$m\left (-\left ( -\frac{1}{k}\right )\omega_n^2\cos{\omega_n t})+k\left (\frac{1}{k}+\left ( -\frac{1}{k}\right )\cos{\omega_n t}\right )\right )= 1$$
$$\frac{m\omega_n^2}{k}\cos{\omega_n t}+1-\cos{\omega_n t}=1$$
$$\cos{\omega_n t}\left (\frac{m\omega_n^2}{k}-1\right )=0$$
$$\frac{m\omega_n^2-k}{k}=0$$
I'm not sure what to make of these last equations.
I expected something like ##0=0## or ##1=1##.
Last edited: