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

In summary, the response of a second-order linear time-invariant (LTI) differential equation to a step input can be analyzed using the system's transfer function, characterized by its poles and zeros. The step input causes a change in the system's state, leading to a transient response followed by a steady-state response. Key parameters, such as damping ratio and natural frequency, determine the behavior of the system, including overshoot, settling time, and oscillations. The solution typically involves finding the homogeneous and particular solutions, ultimately yielding the complete response of the system to the step input.
  • #1
zenterix
708
84
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

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

What is a 2nd order LTI differential equation?

A 2nd order LTI (Linear Time-Invariant) differential equation is a type of differential equation that involves the second derivative of a function and has constant coefficients. It is often used to model systems in physics and engineering, such as mechanical vibrations or electrical circuits. The general form is \(a \frac{d^2y}{dt^2} + b \frac{dy}{dt} + cy = f(t)\), where \(a\), \(b\), and \(c\) are constants, and \(f(t)\) is the input function.

What is a step input in the context of differential equations?

A step input is a type of input function that changes from one value to another instantaneously and remains at that value indefinitely. Mathematically, it is represented by the Heaviside step function \(u(t)\), which is 0 for \(t < 0\) and 1 for \(t \geq 0\). In the context of differential equations, a step input is often used to analyze the transient response of a system.

How do you find the response of a 2nd order LTI system to a step input?

To find the response of a 2nd order LTI system to a step input, you typically follow these steps: (1) Write the differential equation in standard form. (2) Find the homogeneous solution by solving the characteristic equation. (3) Find the particular solution for the step input. (4) Combine the homogeneous and particular solutions. (5) Apply initial conditions to determine the constants. The complete solution will describe the system's response over time.

What are the different types of responses in a 2nd order LTI system?

The response of a 2nd order LTI system can be classified into three types based on the damping ratio (\(\zeta\)): (1) Overdamped (\(\zeta > 1\)), where the system returns to equilibrium without oscillating. (2) Critically damped (\(\zeta = 1\)), where the system returns to equilibrium as quickly as possible without oscillating. (3) Underdamped (\(\zeta < 1\)), where the system oscillates with a gradually decreasing amplitude before reaching equilibrium.

What role do initial conditions play in solving a 2nd order LTI differential equation?

Initial conditions specify the state of the system at the beginning of the analysis (usually at \(t = 0\)). They are essential for determining the specific constants in the general solution of the differential equation. Without initial conditions, you can only find the general form of the solution, but not the exact response of the system

Back
Top