Sign in

Libre University uses your GitHub account. Signing in is only needed to sit a final test, so the score is kept on your profile.

Arbitrary forcing

Undetermined coefficients needs a forcing whose derivatives stay in a small family, and most real disturbances are nothing of the kind.

A hammer blow, a switch closing, a road profile, an earthquake accelerogram: none of these is a sum of exponentials, polynomials and sinusoids that anyone can write down in advance. Even textbook functions defeat the method, since there is no finite family containing sect or 1/t. This lesson gives the general method, and then shows that the general method has more structure in it than a formula for one answer.

Variation of parameters

The idea is due to Lagrange, and its name says it: take the general homogeneous solution c1y1+c2y2 and let the constants vary. Look for a particular solution of y''+py'+qy=g in the form

yp=u1(t)y1(t)+u2(t)y2(t)

Two unknown functions where one equation is available, so we are free to impose one extra condition, and the right choice makes the algebra collapse. Differentiating,

yp'=u1y1'+u2y2'+(u1'y1+u2'y2)

Impose that the bracket vanishes:

u1'y1+u2'y2=0

This is not a restriction on the answer; it is a choice of how to split the work between the two unknowns, and it keeps second derivatives of u out of the calculation. Differentiating again and substituting into the equation, all the terms containing u1 and u2 undifferentiated collect into u1L[y1]+u2L[y2], which is zero, and what remains is

u1'y1'+u2'y2'=g

Two linear equations for u1' and u2', whose determinant is the Wronskian W=y1y2'-y1'y2, nonzero because the pair is independent. Solving,

u1'=-y2gW,u2'=y1gW

and integrating gives the particular solution

yp=-y1y2gWdt+y2y1gWdt

This works for any g and for variable coefficients too, provided a fundamental set is known. That proviso is the catch: variation of parameters solves the forcing problem completely and says nothing about how to find y1 and y2 in the first place.

Example. Solve y''+y=sect on the interval -π/2<t<π/2.

The homogeneous solutions are y1=cost and y2=sint, with W=cos2t+sin2t=1. Then

u1'=-sintsect=-tant,u2'=costsect=1

so u1=ln|cost| and u2=t. The particular solution is

yp=costln|cost|+tsint

Differentiating twice confirms it. Notice the tsint: the forcing sect contains, in a sense made precise below, some content at the natural frequency, and the response grows accordingly, running off to infinity as tπ/2 where the forcing itself does.

Now you. Solve y''+y=csct on 0<t<π.

Answer

With the same y1, y2 and W=1, u1'=-sintcsct=-1 and u2'=costcsct=cott. So u1=-t and u2=ln|sint|, giving yp=-tcost+sintln|sint|.

The same formula as one integral

Write the two integrals as definite ones from 0 to t, which fixes the constants and makes yp and yp' both vanish at t=0. Then the terms can be gathered under a single integral sign:

yp(t)=0ty1(s)y2(t)-y1(t)y2(s)W(s)g(s)ds

Read that carefully, because it says something the derivation did not. The response at time t is a sum over all earlier times s of the forcing then, g(s), multiplied by a kernel depending on both times. The kernel is a property of the system alone: it contains no reference to the forcing. So the system's entire behaviour under any forcing whatever is encoded in one function of two variables, and for constant coefficients that reduces to a function of one, since only the elapsed time t-s can matter to a system whose properties do not change.

Call that function h. Then

yp(t)=0th(t-s)g(s)ds

which is a convolution. For the damped oscillator mx''+cx'+kx=F(t), taking y1 and y2 as the decaying sine and cosine gives

h(t)=1mωde-ζω0tsinωdt

Impulse and step

That h has a direct physical meaning. Apply a very short, very hard blow: a force lasting Δ with magnitude I/Δ, so that its integral, the impulse, is I however small Δ is. The convolution then gives yp(t)Ih(t) for t beyond the blow, so h is the response to a unit impulse, the impulse response. Mechanically the blow delivers momentum I to a mass that has not yet moved, leaving it at x=0 with velocity I/m, and solving the free equation from that state gives exactly the h above. The convolution formula is then obvious in hindsight: an arbitrary forcing is a succession of small impulses g(s)ds, each producing its own decaying ring, and the system's linearity lets them be added.

The response to a suddenly applied constant force, the step response, is the integral of the impulse response, since a step is the accumulation of impulses. For the damped oscillator, starting at rest,

x(t)=F0k[1-e-ζω0t(cosωdt+ζω0ωdsinωdt)]

It rises to the static deflection F0/k, overshoots, and rings down. The overshoot is worth a formula, since it is what a control engineer is usually paid to reduce: the first peak occurs at tp=π/ωd and exceeds the final value by the fraction

exp(-πζ1-ζ2)

which depends only on the damping ratio.

Example. A system has ω0=4 rad s⁻¹ and ζ=0.25. A constant force is applied suddenly. By what percentage does the response overshoot its final value, and when?

The damped frequency is ωd=41-0.0625=3.873 rad s⁻¹, so the first peak is at π/3.873=0.811 s. The overshoot is exp(-π×0.25/0.9375)=exp(-0.811)=0.444, so the response reaches 144 per cent of its final value before settling.

Now you. The same system is redesigned with ζ=0.5. Find the new overshoot and peak time.

Answer

ωd=40.75=3.464 rad s⁻¹, so the peak is at π/3.464=0.907 s. The overshoot is exp(-π×0.5/0.75)=exp(-1.814)=0.163, that is 16.3 per cent. Doubling the damping cut the overshoot to about a third, at the cost of a slightly later peak.

Why the frequency response answered more than it was asked

There is a second route to the same generality, and in engineering it is the dominant one.

A periodic forcing of period T, however jagged, can be written as a sum of sinusoids at the frequencies ωn=2πn/T, which is the Fourier series developed for the heat equation in 1822 and treated properly in courses on that subject. Take that fact on loan. Linearity does the rest: the response to the sum is the sum of the responses, and the response to each sinusoid is known from the previous lesson, scaled by the amplification A(ωn) and delayed by the phase φ(ωn).

So the amplitude and phase curves are not a special-case answer for sinusoidal driving. They are a complete description of the system, and applying them component by component is what "filtering" means.

The consequences can be startling, because the amplification varies so sharply near resonance.

Example. A square wave of frequency f contains only odd harmonics, with amplitudes proportional to 1,1/3,1/5,1/7 at f,3f,5f,7f. It drives a lightly damped system with ζ=0.05 whose natural frequency is 5f. What comes out?

The gains at ρ=0.2,0.6,1.0,1.4 are 1.04, 1.56, 10.0 and 1.03. Multiplying by the input amplitudes 1.273, 0.424, 0.255 and 0.182 gives output amplitudes 1.33, 0.66, 2.55 and 0.19. The fifth harmonic entered at one fifth the size of the fundamental and leaves nearly twice as large: the output is dominated by a component that was almost invisible in the input, and it oscillates at five times the driving frequency. A structure fed a rough periodic load can therefore ring at a frequency that appears nowhere obvious in the load.

Now you. The same square wave drives a system tuned instead to 3f, with the same damping. The gains at ρ=1/3, 1 and 5/3 are 1.12, 10.0 and 0.56. Which component dominates the output, and by how much over the fundamental?

Answer

Output amplitudes are 1.273×1.12=1.43 for the fundamental, 0.424×10=4.24 for the third harmonic, and 0.255×0.56=0.14 for the fifth. The third harmonic dominates, about three times the fundamental.

Three descriptions of one thing

Gather what has appeared. The impulse response h(t) says what the system does after a tap. The step response is its integral. The frequency response is its amplitude and phase against driving frequency. For a linear system with constant coefficients these are three encodings of the same information, each recoverable from the others: the frequency response is the Fourier transform of the impulse response, and the impulse response is the derivative of the step response.

That is why a shaker test, a hammer test and a step test on the same structure are alternatives rather than complements, and why a specification can be written in whichever language suits: settling time and overshoot for a servo, bandwidth and Q for a filter, ring-down for a bell. It is also the reason linear systems are so heavily used even where the physics is only approximately linear. One measured curve predicts the response to every input that will ever be applied.

The two assumptions that carry all of it

Superposition, which requires linearity, and time invariance, which requires coefficients that do not change. Remove either and the whole apparatus falls.

A system with a spring whose stiffness depends on displacement has no impulse response, because doubling the tap does not double the answer. A system whose mass changes as it burns fuel has no frequency response, because the same input applied later gives a different output. In both cases the convolution integral is simply false, not merely inaccurate, and the honest options are numerical solution and qualitative analysis.

Before reaching those, one generalisation is still missing from the linear theory. Everything so far has had a single dependent variable, and many systems have several coupled together: two tanks in series, two masses on a shared spring, a predator and its prey. The next lesson shows that such systems, and every high order equation as well, are best written as first order systems, and that the plane they live in can be read almost as easily as the phase line was.