2. Linear Time Invariant Systems¶
In this section we consider systems that take one input system \(x(t)\) and produce one output signal \(y(t)\). Furthermore we will consider linear time invariant systems. Given an input signal \(x\) the output is \(y=\op L x\).
In this chapter we will learn that a LTI system (which will be defined in the first subsection of this chapter) can be (completely) characterized in several ways:
Impulse Response. If we provide an impulse function as input to the system, i.e. \(x(t)=\delta(t)\) for CT system, the output \(y(t)=h(t)\), where \(h(t)\) is called the impulse response function, completely characterizes the system.
Show code for figure
1import numpy as np 2import matplotlib.pyplot as plt 3import control 4 5fig, (axin, axout) = plt.subplots(ncols=2, sharey=True, figsize=(10,3)) 6fig.tight_layout() 7t = np.linspace(-2, 15, 100) 8x = np.zeros_like(t) 9axin.plot(t, x, 'b') 10axin.stem([0], [1], markerfmt='^b', linefmt='blue', use_line_collection=True) 11axin.set_title('Input = impulse') 12 13P = control.tf([1], [1,1,1]) 14(tim, h) = control.impulse_response(P, np.linspace(0, 15, 100)) 15axout.plot(tim, h, 'b') 16tlt0 = t[t<0] 17axout.plot(tlt0, np.zeros_like(tlt0), 'b') 18axout.set_title('Output = impulse response') 19 20plt.savefig('source/figures/lti_impulse.png')
Step Response. Although the impulse response completely characterizes an LTI system it is not always a practical way to identify a system. For instance consider the system of a vessel full of water that is heated with an electrical heater. Taking the temperature of the water as the output of the system and the heating power as input such a system can be approximated as an LTI system. A pulse as the input would then be a heating system that is fed with an electrical pulse of very short time duration. It is physically (nearly) impossible to have a pulse so powerful in order to raise the temperature of a large amount of water significantly. In those situations the step response is easier to work with. The step response is also a complete and unique characterization of the system. An input step in this case is a signal where until time \(t=0\) no input power is fed to the heater and from time \(t=0\) onward a constant power is fed to the system. What you will then see is that the temperature of the water will slowly increase (with an equilibrium reached when the loss of energy in the water vessel is equal to the supplied heat).
Another example is a mass spring damper system (e.g. the one in a car). If you measure the height of the car above the road as the output of the system, the input signal is the road profile. Feeding this system with a pulse would be to drive over a high but very small brick in the road. Its impulse response would look a bit like the impulse response as sketched in the figure above. Driving with your car unto the pavement is like feeding this system with an input step function. Its response will look a bit like the response shown below.
Show code for figure
1import numpy as np 2import matplotlib.pyplot as plt 3import control 4 5fig, (axin, axout) = plt.subplots(ncols=2, sharey=True, figsize=(10,3)) 6fig.tight_layout() 7t = np.linspace(-2, 15, 100) 8x = np.zeros_like(t) 9x[t>=0] = 1 10axin.plot(t, x, 'b') 11axin.set_title('Input = step') 12 13P = control.tf([1], [1,1,1]) 14(tim, h) = control.step_response(P, np.linspace(0, 15, 100)) 15axout.plot(tim, h, 'b') 16tlt0 = t[t<0] 17axout.plot(tlt0, np.zeros_like(tlt0), 'b') 18axout.set_title('Output = step response') 19 20plt.savefig('source/figures/lti_step.png')
Frequency Response. The third characteristic response of an LTI system is when the input is a periodical sine or cosine function. In this chapter we will prove that given such an input the output is again a periodical sine or cosine function, with the same frequency but with possible altered amplitude or phase (shift). The way in which the amplitude and phase of the input is altered dependent on the frequency of the input signal is called the frequency response of the system.
Show code for figure
1import numpy as np 2import matplotlib.pyplot as plt 3import control 4 5fig, (axin, axout) = plt.subplots(ncols=2, sharey=True, figsize=(10,3)) 6fig.tight_layout() 7t = np.linspace(-20, 15, 1000) 8tp = t[t>=-2] 9x = 5*np.sin(2*t) 10axin.plot(tp, x[t>=-2], 'b') 11axin.set_title('Input = sine') 12 13P = control.tf([1], [1,1,1]) 14(tim, h) = control.forced_response(P, t, x) 15axout.plot(tim[tim>=-2], h[tim>=-2], 'b') 16axout.set_title('Output = damped and shifted sine') 17 18plt.savefig('source/figures/lti_freq.png')
These three ways of characterizing an LTI system are equivalent. In this lecture series we will look at all three and derive the mathematical connection between the three.