Understanding calculation of 2nd order LTI DE response to step input

  • #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##.
 
Last edited:
Physics news on Phys.org
  • #2
Go back to (4). What is [itex]\omega_n[/itex] in terms of [itex]m[/itex] and [itex]k[/itex]?
 
  • Like
Likes DaveE
  • #3
What is n? You never specified where or why it exists. To specify a second order homogeneous equation requires two conditions (you tacitly assume ##{\dot u}(0)=0## but never actually specify. This is very confused. Correcting your booknotes sseems a very bad way to proceed. Perhaps you need to work a particular problem and ask particular questions.
 
  • #4
##n## in ##\omega_n## simply means "natural" frequency and I forgot to define this variable in the OP that is true.
 
  • #5
But yes, ##\omega_n=\sqrt{\frac{k}{m}}## and the last equation I have in the OP does come out to that which means that it is true.

$$\frac{m\omega_n^2-k}{k}=0$$

$$\implies \omega_n=\sqrt{\frac{k}{m}}$$
 
  • #6
hutchphd said:
What is n? You never specified where or why it exists. To specify a second order homogeneous equation requires two conditions (you tacitly assume ##{\dot u}(0)=0## but never actually specify. This is very confused. Correcting your booknotes sseems a very bad way to proceed. Perhaps you need to work a particular problem and ask particular questions.
So in summary, this whole question is just a silly one because I just needed to keep going with the final step shown above.

Now, about the ##\dot{x}(0^-)=0## assumption. It actually was used but in my OP I forgot to mention it. Let me show how:

We have

$$m\ddot{x}+kx=u(t)$$

This represents two different differential equations on two different intervals.

The solutions, taken together are,

$$x(t)=\begin{cases} a_1\cos{\omega_n t}+a_2\sin{\omega_n t}\ \ \ \ \ \text{for}\ t<0 \\ \frac{1}{k}+c_1\cos{\omega_n t}+c_2\sin{\omega_n t}\ \ \ \ \ \text{for}\ t>0\end{cases}$$

We can differentiate this to obtain ##\dot{x}(t)##.

Since the initial conditions refer to the values of ##x(t)## and ##\dot{x}(t)## in the limit of ##t## approaching zero from below, then we only need consider the solution ##x(t)## and derivative ##\dot{x}(t)## for ##t<0##.

By evaluating the limits of these functions when ##t## approaches 0 from below we end up finding that ##a_1=a_2=0##.

At this point, we still need to find ##c_1## and ##c_2## and this is what I do in my OP.
 
Last edited:
  • #7
That seems overstated. The questioning is very important, but I do not know what your question actually is. Your final question is "why is this self-consistent?"" which seems odd to me.
 
  • #8
hutchphd said:
That seems overstated. The questioning is very important, but I do not know what your question actually is. Your final question is "why is this self-consistent?"" which seems odd to me.
The reason I said my OP question is silly is because indeed the question was about if the last equation I wrote was true.

And turns out all I needed to do was simplify the equation, which is a very simple thing to do and I simply overlooked it.
 
  • #9
OK. Sometimes one should take a minute for thought!! I have published a few things where that would have been a good plan! A few deep breaths......less caffeine....etc
 
  • Like
Likes zenterix

Similar threads

  • Calculus and Beyond Homework Help
Replies
6
Views
97
  • Calculus and Beyond Homework Help
Replies
1
Views
62
  • Calculus and Beyond Homework Help
Replies
1
Views
142
Replies
12
Views
234
  • Calculus and Beyond Homework Help
Replies
5
Views
160
  • Introductory Physics Homework Help
Replies
6
Views
919
  • Calculus and Beyond Homework Help
Replies
1
Views
492
  • Introductory Physics Homework Help
Replies
16
Views
323
  • Calculus and Beyond Homework Help
Replies
11
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
324
Back
Top