Dynamic Systems:

Forced Response


By Prof. Seungchul Lee
http://iai.postech.ac.kr/
Industrial AI Lab at POSTECH

Table of Contents

1. Linear Time-Invariant (LTI) Systems


The system ${H}$ is a transformation (a rule or formula) that maps an input signal $x$ into a output signal $y$



System examples

$$ \begin{align*} &\text{Identity} \quad &y(t) &= x(t) \quad &\forall t\\ &\text{Scaling} \quad &y(t) &= 2\,x(t) \quad &\forall t\\ &\text{Offset} \quad &y(t) &= x(t)\, + \,2 \quad &\forall t\\ &\text{Square signal} \quad &y(t) &= (x(t))^2 \quad &\forall t\\ &\text{Shift} \quad &y(t) &= x(t + 2) \quad &\forall t\\ &\text{Decimate} \quad &y(t) &= x(2t) \quad &\forall t\\ &\text{Square time} \quad &y(t) &= x(t^2) \quad &\forall t \end{align*} $$

1.1. Linear Systems

A system ${H}$ is linear if it satisfies the following two properties:

1) Scaling


$${H} \{\alpha x\} = \alpha {H}\{x\} \quad \forall \, \alpha \in \mathbb{C}$$




2) Additivity


$$ \text{If}\,\, y_1 = {H} \{x_1\} \,\, \text{and}\,\, y_2 = {H} \{ x_2 \} \, \, \text{then } {H} \{x_1 + x_2\} = y_1 + y_2$$




1.2. Time-Invariant Systems

A system ${H}$ processing infinite-length signals is time-invariant (shift-invariant) if a time shift of the input signal creates a corresponding time shift in the output signal




1.3. Linear Time-Invariant (LTI) Systems


We will only consider Linear Time-Invariant (LTI) systems.


$$\begin{align*} \text{Identity} &\qquad y(t) = x(t) \quad &\forall t &\qquad \text{Linear} &\qquad \text{Time Invariant}\\ \text{Scaling} &\qquad y(t) = 2\,x(t) \quad &\forall t &\qquad \text{Linear} &\qquad \text{Time Invariant}\\ \text{Offset} &\qquad y(t) = x(t)\, + \,2 \quad &\forall t &\qquad \text{Non Linear} &\qquad \text{Time Invariant}\\ \text{Square signal} &\qquad y(t) = (x(t))^2 \quad &\forall t &\qquad \text{Non Linear} &\qquad \text{Time Invariant}\\ \text{Shift} &\qquad y(t) = x(t + 2) \quad &\forall t &\qquad \text{Linear} &\qquad \text{Time Invariant}\\ \text{Decimate} &\qquad y(t) = x(2t) \quad &\forall t &\qquad \text{Linear} &\qquad \text{Time Variant}\\ \text{Square time} &\qquad y(t) = x(t^2) \quad &\forall t &\qquad \text{Linear} &\qquad \text{Time Variant}\\ \end{align*}$$

2. Response to Non-Zero Input

  • So far, natural response of zero input with non-zero initial conditions are examined.


$$ \begin{align*} \dot{y} + {1 \over \tau}y &= 0 \\\\ \ddot{y} + 2\zeta\omega_n\dot{y} + \omega^2_n y &=0 \end{align*} $$





Response to non-zero constant input



  • Assume all the systems are stable
  • Inhomogeneous ODE
$$ \begin{align*} \dot{y} + {1 \over \tau}y &= q' \\\\ \ddot{y} + 2\zeta\omega_n\dot{y} + \omega^2_n y &=p' \end{align*} $$


$\quad\;\implies$ Same dynamics, but it reaches different steady state

$\quad\;\implies$ Good enough to sketch

$$ \begin{align*} (\dot{y}-\dot{q}) + {1 \over \tau}(y-q) &= 0 \\\\ (\ddot{y}-\ddot{p}) + 2\zeta\omega_n(\dot{y}-\dot{p}) + \omega^2_n (y-p) &=0 \end{align*} $$
  • Dynamic system response = transient + steady state
  • Transient response is present in the short period of time immediately after the system is turned on
    • It will die out if the system is stable
  • The system response in the long run is determined by its steady state component only
  • In steady state, all the transient responses go to zero
$${dy \over dt} \rightarrow 0$$
  • Example
$$ \begin{align*} \dot{y} + {1 \over \tau}y &= q, \qquad y(0) = 0 \\\\ \dot{y}(\infty) & = 0 \\ \\ \implies \; y(\infty)& = \tau q \end{align*} $$



  • Example
$$ \begin{align*} \ddot{y} + 2\zeta\omega_n\dot{y} + \omega^2_n y &= p, \qquad y(0) = 0, \; \dot{y}(0) = 0 \\ \\ \ddot{y}(\infty) &= \dot{y}(\infty) = 0 \\ \\ \implies \; y(\infty) &= {p \over \omega^2_n} \end{align*} $$



  • Think about mass-spring-damper system in horizontal setting
$$ \ddot{y} + {c \over m}\dot{y} + {k \over m}y = 0, \qquad \text{where} \; y(0) = y_0, \; \dot{y}(0) = 0 $$



  • Mass-spring-damper system in vertical setting
    • $y(0) = 0 \;$ no initial displacement
    • $\dot{y}(0) = 0\;$ initially at rest


$$ \begin{align*} m\ddot{y} + c\dot{y} + ky &= mg \\ \ddot{y} + {c \over m}\dot{y} + {k \over m}y &= g, \qquad \text{where} \; y(0) = 0, \; \dot{y}(0) = 0 \end{align*} $$




  • Shift the origin of $y$ axis to the static equilibrium point, then act like a natural response with $y(0) = -{mg \over k}$ and $\dot{y}(0) = 0 $ as initial conditions


$$ \ddot{y} + 2\zeta\omega_n\dot{y} + \omega^2_n y ={\omega_n^2}p \quad \longrightarrow \quad (\ddot{y}-\ddot{p}) + 2\zeta\omega_n(\dot{y}-\dot{p}) + \omega^2_n (y-p) =0 $$




3. Time Response to General Inputs


  • We studied output response $y(t)$ when input $x(t)$ is constant
  • Goal: output response of $y(t)$ to general input $x(t)$



3.1. Step Response


Start with a step response example

$$ \dot{x} + 5x = 1 \quad \text{for} \quad t \geq 0, \qquad x(0) = 0$$

or

$$ \dot{x} + 5x = u(t), \qquad x(0) = 0 \qquad \text{where }\; u(t) = \begin{cases} 1 & t >0\\ 0 & \text{otherwise}\end{cases}$$
  • Step function $u(t)$




$$u(t) = \begin{cases} 1 & t \geq 0 \\ 0 & \text{otherwise} \end{cases} $$
  • The solution is given:
$$ x(t) = \frac{1}{5}\left( 1-e^{-5t} \right)$$
In [1]:
t = linspace(0,2,100);
x = 1/5*(1-exp(-5*t));

plot(t,x,t,0.2*ones(size(t)),'k--')
ylim([0,0.25])
xlabel('time')

3.2. Impulse Response

  • Impulse response: difficult to image
  • The unit-impulse signal acts as a pulse with unit area but zero width


$$\delta(t) = \lim_{\epsilon\rightarrow0}p_\epsilon(t)$$




  • The unit-impulse function is represented by an arrow with the number 1, which represents its area




  • It has two seemingly contradictory properties :
    • It is nonzero only at $t = 0$ and
    • Its definite integral ($-\infty$, $\infty$) is 1
  • The Dirac delta can be loosely thought of as a function on the real line which is zero everywhere except at the origin, where it is infinite,


$$\delta(t) = \begin{cases}\infty & x = 0 \\ 0 & x \neq 0\end{cases}$$


$\quad \;$ and which is also constrained to satisfy the identity

$$\int_{-\infty}^{\infty}\delta(t)dt = 1$$
  • Sifting property
$$ \begin{align*} \int_{-\infty}^{\infty}x(t)\delta(t)dt &= \int_{-\infty}^{0^-}x(t)\delta(t)dt + \int_{0^-}^{0^+}x(t)\delta(t)dt + \int_{0^+}^{\infty}x(t)\delta(t)dt \\&= 0 + x(0)\int_{0^-}^{0^+}\delta(t)dt + 0 \\&= x(0)\\\\ \int_{-\infty}^{\infty}x(\tau)\delta(t-\tau)d\tau &= x(t) \end{align*}$$
  • Question: how to realize initial velocity of $v_0 \neq 0$




  • Momentum and impulse in physics I

  • Consider an "impulse" which is a sudden increase in momentum $0 \rightarrow mv$ of an object applied at time $0$

  • To model this,

$$mv - 0 = \int^{0^+}_{0_-}f(t)dt$$

$\quad\;$ where force $f(t)$ is strongly peaked at time 0

  • Actually the details of the shape of the peak are not important, what is important is the area under the curve
$$f(t) = mv\delta(t)$$
  • This is the motivation that mathematician and physicist invented the delta Dirac function


$$ \begin{align*} m\ddot{y} + c\dot{y} + ky &= mv_0\delta(t) \\\\ \ddot{y} + {c \over m}\dot{y} + {k \over m}y &= v_0\delta(t) \end{align*} $$



$$v_0 \delta(t) \quad \longrightarrow \quad \begin{align*} y(0) &= 0\\ \dot{y}(0) &= v_0 \end{align*} \quad \longrightarrow \quad \text{natural response}$$


  • Impulse response to LTI system



$$ \ddot{y} + 2\zeta \omega_n\dot{y} + \omega^2_n y = \delta(t), \qquad \begin{align*} \delta(t) &: \text{input} \\ y &: \text{output} \end{align*} $$


  • Later, we will discuss why the impulse response is so important to understand an LTI system
  • Example: now think about the impulse response
$$ \dot{y} + 5y = \delta(t), \qquad y(0) = 0 $$

$\quad\;$ The solution is given: (why?)

$$ y(t) = h(t) = e^{-5t},\quad t\geq0$$


$\quad\;$ Impulse input can be equivalently changed to zero input with non-zero initial condition (by the impulse and momentum theory)


$$ \int_{0^-}^{0^+}\delta(t) \, dt = u(0^+)-u(0^-)=1$$$$ \dot{y} + 5y = 0, \qquad {y}(0) = 1 $$
In [2]:
t = linspace(0,2,100);
h = exp(-5*t);

plot(t,h,t,zeros(size(t)), 'k--'), 
ylim([-0.1,1.1])
xlabel('time')

3.3. Step Response Again


$$ \begin{align*} \ddot{x} + 2\zeta\omega_n\dot{x}+\omega^2_nx &= u(t) &\text{or} \\ \\ \ddot{x} + 2\zeta\omega_n\dot{x}+\omega^2_nx &= 1, &t > 0 \end{align*} $$
  • Relationship between impulse response and unit-step response



$\quad\;\implies$ impulse response is the derivative of the step response

3.4. Response to a General Input (in Time)


  • Response to a "general input" in time
$$\dot{y} + 5 y = x(t), \quad y(0) = 0$$
  • The solution is given
$$y(t) = h(t) * x(t) \qquad \text{where} \; h(t) \;\text{is impulse response}$$




  • If this is true, we can compute output response to any general input if an impulse response is given

    • impulse response = LTI system
  • Convolution definition
$$ \begin{align*} y(t) = h(t) * x(t) &= \int^\infty_{-\infty}h(\tau)x(t-\tau)d\tau \\ &= \int^\infty_{-\infty}x(\tau)h(t-\tau)d\tau \end{align*} $$
  • $y(t)$ is the integral of the product of two functions after one is reversed and shifted by $t$
  • Time-invariant



  • Linear



  • Response to arbitrary input $x(t)$


$$ \begin{align*} x(t) &= \int_{-\infty}^{\infty} x(\tau) \, \delta(t-\tau) \, d\tau \\ \\ &\downarrow\\ \\ y(t) &= \int_{-\infty}^{\infty} x(\tau) \, h(t-\tau) \, d\tau \; = \; x(t) * h(t) \end{align*} $$




Example: response to a general input

$$ \dot{y} + 3y = 3x(t)$$

The solution is given:

$$ y(t) = h(t)*x(t),\qquad \text{where}\; h(t) = 3e^{-3t}$$
In [3]:
% generate a general input

T = 4;

fs = 100;
Ts = 1/fs;
t = 0:Ts:2*T-Ts;

w0 = 2*pi/T;
x = 1/2*square(w0*t);

plot(t,x,'k')
grid on
ylim([-0.6,0.6])
yticks([-0.5,0,0.5])

In [4]:
% convolution (circular, will be discussed later)

h = 3*exp(-3*t);
y = cconv(x,h,length(t))*Ts;

plot(t,x,'k'), hold on
plot(t,y,'b', 'linewidth',2), hold off
grid on
ylim([-0.6,0.6])
yticks([-0.5,0,0.5])

4. Frequency Response to General Input (in Frequency)

4.1. Response to a Sinusoidal Input


  • When the input $x(t) = e^{j\omega t}$ to an LTI system



$$ \begin{align*} y(t) = h(t) * x(t) = \int^\infty_{-\infty}h(\tau)e^{j\omega(t-\tau)}d\tau &= e^{j\omega t} \underbrace{\int^\infty_{-\infty}h(\tau)e^{-j\omega \tau}d\tau}_{\text{complex function of } \omega} \\\\ &= e^{j\omega t} H(j\omega) \end{align*} $$


  • Fourier Transform
$$H(j\omega) = \int^\infty_{-\infty}h(\tau)e^{-j\omega \tau}d\tau$$




  • $H(j\omega)e^{j\omega t}$ rotates with the same angular velocity $\omega$
$$H(j\omega)= \lvert H(j\omega) \rvert e^{j\angle H(j\omega)}$$



  • Example
$$ \dot{y} + 5y = x(t)$$
In [5]:
% use lsim

A = -5;
B = 1;
C = 1;
D = 0;
G = ss(A,B,C,D);

w = pi;
t = linspace(0,2*pi,200);

x0 = 0;

x = sin(w*t);

[y,tout] = lsim(G,x,t,x0);

plot(t,x), hold on
plot(tout,y), hold off
grid on
xlabel('t')
axis tight, ylim([-1,1])
leg = legend('input','output');
set(leg, 'fontsize', 12)

In [6]:
% sinusoidal inputs with different w

A = -5;
B = 1;
C = 1;
D = 0;
G = ss(A,B,C,D);

x0 = 0;

t = linspace(0,2*pi,200);

W = [1,5,10,20];
for w = W
    x = sin(w*t);
    [y,tout] = lsim(G,x,t,x0);
    plot(tout,y), hold on
end

hold off
grid on
axis tight, ylim([-0.3,0.3])
xlabel('t')
leg = legend('\omega = 1','\omega = 5','\omega = 10','\omega = 20');
set(leg, 'fontsize', 12)

4.2. Response to a Periodic Input (in frequency domain)


4.2.1. Periodic signal


$$ \begin{align*} x(t) &= x(t + T) \\\\ \text{Fundamental frequency } \; {\omega_0} &= 2\pi f\\ \text{Fundamental period }\; T &= \frac{2\pi}{\omega_0} \end{align*} $$


  • Fourier series represent periodic signals in terms of sinusoids (or complex exponential of $e^{j\omega t}$)
  • Fourier series represent periodic signals by their harmonic components



$$ \begin{align*} x(t) &= a_0 + a_1e^{j\omega_0t} + a_2e^{j2\omega_0t} + a_3e^{j3\omega_0t} + \cdots \\\\ &= \sum\limits^\infty_{k=-\infty}a_ke^{jk\omega_0t} \end{align*} $$



4.2.2. Harmonic Representations

  • It is possible to represent all periodic signals with harmonics
  • Question: how to separate harmonic components given a periodic signal
  • underlying properties


$$ \begin{align*} e^{jk_1\omega_0t} \cdot e^{jk_2\omega_0t} &= e^{j(k_1+k_2)\omega_0t} \\\\ \int^{t+T}_t e^{jk\omega_0\tau}d\tau &= \begin{cases} 0 & k \neq 0 \\ T & k = 0 \end{cases} \\\\ &= T\delta[k] \quad \text{where } \delta[k] \text{ is Kronecker delta} \end{align*} $$
  • Assume that $x(t)$ is periodic in $T$ and is composed of a weighted sum of harmonics of $\omega_0 = {2\pi \over T}$
$$x(t) = x(t + T) = \sum\limits^\infty_{k=-\infty}a_ke^{jk\omega_0t}$$
  • Then
$$ \begin{align*} \int_T x(t)e^{-jn\omega_0t}dt &= \int_T \sum\limits^\infty_{k=-\infty}a_ke^{jk\omega_0t} \cdot e^{-jn\omega_0t}dt \\\\ &= \sum\limits^\infty_{k=-\infty}a_k\int_T e^{j(k-n)\omega_0t}dt \\\\ &= a_nT \\\\ \therefore a_k &= {1 \over T}\int_T x(t)e^{-jk\omega_0t} = {1 \over T}\int_T x(t)e^{-jk {2\pi \over T}t} \end{align*} $$


  • Fourier Series: determine harmonic components of a periodic signal


$$ \begin{align*} a_k &= {1 \over T}\int_T x(t) e^{-j\omega_0kt}dt, &\text{analysis}\\ \\ x(t) &= \sum\limits^\infty_{k=-\infty}a_ke^{j\omega_0kt}, &\text{synthesis} \end{align*} $$
  • Example: Fourier Series of Triangle Wave
    • Decompose a triangle wave to a linear combination of complex exponentials


$$ x(t) = \sum_{k = \cdots,-3, -1, 1, 3,\cdots}\frac{-1}{2k^2\pi^2} e^{j 2 \pi k t} = \sum_{k = \cdots,-3, -1, 1, 3,\cdots}\frac{-2}{\omega_0^2 k^2} e^{j \omega_0 k t}$$


In [7]:
T = 1;

fs = 100;
t = 0:1/fs:2*T-1/fs;

w0 = 2*pi/T;
x = 1/8*sawtooth(w0*t, 1/2);

% xhat = Fourier series of triangle ware
xhat = zeros(size(t));

for k = -3:2:3
    xhat = xhat - 2/(w0^2*k^2)*exp(1j*w0*k*t);
end

plot(t, x, 'k'), hold on
plot(t, xhat, 'b', 'linewidth', 2), hold off
grid on
ylim([-2/8,2/8])
xticks([0,1,2])
yticks([-1/8,0,1/8])
Warning: Imaginary parts of complex X and/or Y arguments ignored

  • Example: Fourier Series of Square Wave
    • Decompose a square wave to a linear combination of complex exponentials


$$ x(t) = \sum_{k = \cdots,-3, -1, 1, 3,\cdots}\frac{1}{jk\pi} e^{j2 \pi k t} = \sum_{k = \cdots,-3, -1, 1, 3,\cdots}\frac{2}{j\omega_0 k} e^{j\omega_0 k t} $$


In [8]:
T = 1;

fs = 100;
t = 0:1/fs:2*T-1/fs;

w0 = 2*pi/T;
x = 1/2*square(w0*t);

% xhat = Fourier series of square ware
xhat = zeros(size(t));

for k = -5:2:5
    xhat = xhat + 2/(1j*w0*k)*exp(1j*w0*k*t);
end

plot(t, x, 'k'), hold on
plot(t, xhat, 'b', 'linewidth', 2), hold off
grid on
ylim([-5/8,5/8])
xticks([0,1,2])
yticks([-1/2,0,1/2])
Warning: Imaginary parts of complex X and/or Y arguments ignored

4.2.3. Response to a Periodic Input




  • Periodic input : Fourier series $\rightarrow$ sum of complex exponentials


$$x(t) = \sum\limits^\infty_{k=-\infty}a_ke^{j\omega_0kt}$$


  • Complex exponentials : eigenfunctions of LTI system


$$e^{j\omega_0kt} \quad \longrightarrow \quad H(j\omega_0k)e^{j\omega_0kt}$$


  • Output : same eigenfunctions, but amplitudes and phase are adjusted by the LTI system


$$y(t) = \sum\limits^\infty_{k=-\infty}a_kH(j\omega_0k)e^{j\omega_0kt}$$
  • The output of an LTI system is a "filtered" version of the input
    • with different $T$ periods














  • The output response of LTI


$$ \dot{y} + \frac{1}{\tau}y = \frac{1}{\tau}x(t) $$


  • Linearity: input $ \sum_k a_k x_k(t)$ produces $ \sum_k a_k y_k(t)$
  • Given input $ e^{j\omega t} $
$$ \begin{align*} \dot{y} + \frac{1}{\tau}y &= \frac{1}{\tau}x(t) \\\\ \dot{y} + \frac{1}{\tau}y &= \frac{1}{\tau}e^{j\omega t} \end{align*} $$
  • If $ y = Ae^{j(\omega t + \phi)} $
$$ \begin{align*} j\omega A e^{j(\omega t + \phi)} + \frac{1}{\tau}Ae^{j(\omega t + \phi)} &= \frac{1}{\tau}e^{j\omega t}\\ \left( j\omega + \frac{1}{\tau} \right)Ae^{j\phi} &= \frac{1}{\tau}\\ \end{align*} $$
  • Therefore,
$$ \begin{align*} \lvert H(j\omega) \rvert = A &= \frac{1}{\mid {j\tau \omega + 1}\mid} \\ \angle H(j\omega) = \phi &= -\angle{(j\tau\omega + 1)} \end{align*} $$
In [9]:
T = 1;

fs = 100;
t = 0:1/fs:2*T-1/fs;

w0 = 2*pi/T;
x = 1/2*square(w0*t);

% xhat = Fourier series of square ware
xhat = zeros(size(t));

for k = -19:2:19
    xhat = xhat + 2/(1j*w0*k)*exp(1j*w0*k*t);
end

plot(t, x, 'k'), hold on
plot(t, xhat, 'b', 'linewidth', 2), hold off
grid on
ylim([-5/8,5/8])
xticks([0,1,2])
yticks([-1/2,0,1/2])
Warning: Imaginary parts of complex X and/or Y arguments ignored

In [10]:
tau = 1/5;

yhat = zeros(size(t));

for k = -19:2:19
    w = w0*k;
    A = 1./abs(1j*tau*w + 1);
    Ph = -phase(1j*tau*w + 1);
    yhat = yhat + A*2/(1j*w0*k)*exp(1j*(w*t + Ph));
end

plot(t, x, 'k'), hold on
plot(t, yhat, 'g', 'linewidth', 2), hold off
grid on
ylim([-5/8,5/8])
xticks([0,1,2])
yticks([-1/2,0,1/2])
leg = legend('square', 'output');
set(leg, 'fontsize', 12, 'location', 'best')
Warning: Imaginary parts of complex X and/or Y arguments ignored

4.3. Response to a General Input (Aperiodic Signal) in Frequency Domain


  • An aperiodic signal can be thought of as periodic with infinite period
  • Let $x(t)$ represent an aperiodic signal



  • Periodic extension



$$x_T(t) = \sum\limits^\infty_{k=-\infty}x(t+kT)$$
  • Then


$$x(t) = \lim\limits_{T\rightarrow \infty}x_T(t)$$


  • Example: the periodic square wave
$$ x(t) = \begin{cases}1, & \lvert t \rvert\ < s\\ 0, & s<\lvert t \rvert < \frac{T}{2}\end{cases}$$


$$ \begin{align*} \omega_0 &= {2\pi \over T}\\\\ a_k &= {1 \over T} \int^{T \over 2}_{-T \over 2}x_T(t)e^{-j\omega_0kt}dt \\ &= {1 \over T} \bigg[\int^s_{-s}1 \cdot e^{-j\omega_0kt}dt \bigg] = {1 \over T}\bigg[-{e^{-j\omega_0kt} \over j\omega_0k} \bigg\rvert^s_{-s} \bigg] \\ &= -{1 \over T} \bigg[ {e^{-j\omega_0ks} \over j\omega_0k} - {e^{j\omega_0ks} \over j\omega_0k} \bigg] = {1 \over T} \bigg[{-2 \over j\omega_0k} \cdot {{e^{-j\omega_0ks} - e^{j\omega_0ks}} \over 2} \bigg] \\ &= {1 \over T} {-2 \over j\omega_0k}(-j\text{sin}\omega_0ks) = {1 \over T}{2\text{sin}\omega_0ks \over \omega_0k} \\ &= {2 \over T} {\text{sin} \omega_0ks \over \omega_0k} \\\\ Ta_k &= {2 \text{sin}\omega s \over \omega}, \quad \omega = k\omega_0, \quad \omega_0 = {2\pi \over T} \end{align*} $$


  • Doubling period doubles # of harmonics in given frequency interval




  • As $T \rightarrow \infty$, discrete harmonic amplitudes $\rightarrow$ a continuum $X(j\omega)$


$$\lim\limits_{T\rightarrow \infty} Ta_k = \lim\limits_{T\rightarrow \infty}\int^{T \over 2}_{-T \over 2} x(t)e^{-j\omega t}dt = {2\text{sin}\omega s \over \omega} = X(j\omega)$$


  • As alternative way of interpreting is as samples of an envelope function, specifically


$$Ta_k = {2\text{sin} \omega s \over \omega} \bigg\rvert_{\omega=k\omega_0}$$


  • That is, with $\omega$ thought of as a continuous variable, the set of Fourier series coefficients approaches the envelop function as $T \rightarrow \infty$
  • Aperiodic signal has all the frequency components instead of discrete harmonic components

5. Fourier Transform

  • As $T \rightarrow \infty$, synthesis sum $\rightarrow$ integral
$$ \begin{align*} x(t) &= \sum\limits^\infty_{k=-\infty}a_ke^{j\omega_0kt} = \sum\limits^\infty_{k=-\infty}{X(j\omega_0k) \over T}e^{j\omega_0kt} \\\\ &= \sum\limits^\infty_{k=-\infty} {\omega_0 \over 2\pi} X(j\omega_0k)e^{j\omega_0kt},\\\\ &= \frac{1}{2\pi}\sum\limits^\infty_{k=-\infty} X(j\omega_0k)e^{j\omega_0kt}\omega_0, \quad \omega = k\omega_0, \quad \omega_0 = {2\pi \over T} \\\\ &= {1 \over 2\pi} \int X(j\omega)e^{j\omega t}d\omega \end{align*} $$


  • Fourier transform


$$ \begin{align*} X(j\omega) & = \int^{\infty}_{-\infty} x(t)e^{-j\omega t}dt & \text{analysis}\\ x(t) &= {1 \over 2\pi} \int^{\infty}_{-\infty} X(j\omega)e^{j\omega t}d\omega & \text{synthesis} \end{align*} $$
  • Response to LTI system, $h(t)$
$$ \begin{align*} x(t) &= {1 \over 2\pi} \int^{\infty}_{-\infty} X(j\omega)e^{j\omega t}d\omega \\ y(t) &= {1 \over 2\pi}\int^{\infty}_{-\infty}X(j\omega)H(j\omega)e^{j\omega t}d\omega\\\\\\ x(t)*h(t) \quad & \mathop\longleftrightarrow^{\mathscr{F}}\quad X(j\omega)H(j\omega) \end{align*} $$

5.1. Impulse Response

  • Fourier transform of delta Dirac function
$$\delta (t) \quad \mathop\longrightarrow^{\text{LTI}}\quad h(t)$$


$$\int^{\infty}_{-\infty} \delta(t)e^{-j\omega t}dt = 1$$




  • Delta Dirac function contains all the frequency components with 1
    • Convolution in time
    • Filtering in frequency
  • Impulse basically excites a system with all the frequency of $𝑒^{𝑗\omega 𝑡}$




  • Impulse response contains the information on how much magnitude and phase are filtered via the LTI system at all the frequency

5.2. Frequency Response (Frequency Sweep)


$\implies$ Frequency sweeping is another way to collect LTI system characteristics (same as the impulse response)


Given input $ e^{j\omega t} $

$$ \begin{align*} \dot{y} + 5y &= 5x(t) \\\\ \dot{y} + 5y &= 5e^{j\omega t} \end{align*} $$
  • If $ y = Ae^{j(\omega t + \phi)} $
$$ \begin{align*} j\omega A e^{j(\omega t + \phi)} + 5Ae^{j(\omega t + \phi)} &= 5e^{j\omega t}\\ \left( j\omega + 5 \right)Ae^{j\phi} &= 5\\ \end{align*} $$
  • Therefore,
$$ \begin{align*} \lvert H(j\omega) \rvert = A &= \frac{5}{\mid {j\omega + 5}\mid} \\ \angle H(j\omega) = \phi &= -\angle{(j\omega + 5)} \end{align*} $$
In [11]:
w = 0.1:0.1:100;

A = 5./abs(1j*w+5);
P = -angle(1j*w+5)*180/pi;

subplot(2,1,1), plot(w, A, 'linewidth', 2)
yticks([0,0.5,1])
ylabel('|H(j\omega)|', 'fontsize', 13)
xlabel('\omega', 'fontsize', 15)

subplot(2,1,2), plot(w, P, 'linewidth', 2)
yticks([-90, -45, 0])
ylabel('\angle H(j\omega)', 'fontsize', 13)
xlabel('\omega', 'fontsize', 15)

% later, we will see that this is kind of a bode plot


The second order ODE


$$\begin{align*} \quad \ddot{y} + 2\zeta\omega_n\dot{y} + \omega_n^2 y &= \omega_n^2 \;x(t)\\ \quad \ddot{y} + 2\zeta\omega_n\dot{y} + \omega_n^2 y &= \omega_n^2 \;e^{j \Omega t} \end{align*}$$


  • We know that $y$ is in the form of
$$y = A e^{j(\Omega t + \phi)}$$
  • Then
$$ \begin{align*}\left( -\Omega^2 + j 2\zeta \omega_n \Omega + \omega_n^2 \right)Ae^{j\phi} e^{j\Omega t} &= \omega_n^2 e^{j \Omega t} \\ Ae^{j\phi} &= \frac{ \omega_n^2}{-\Omega^2 + j 2\zeta \omega_n \Omega + \omega_n^2} = \frac{1}{1-\left(\frac{\Omega}{\omega_n}\right)^2 + j 2\zeta \left(\frac{\Omega}{\omega_n}\right)} \end{align*}$$



$$ \begin{align*}A &= \frac{1}{ \sqrt{ \left(1-\left(\frac{\Omega}{\omega_n}\right)^2 \right)^2 + 4\zeta^2 \left(\frac{\Omega}{\omega_n}\right)^2 }} = \frac{1}{ \sqrt{ \left(1-\gamma^2 \right)^2 + 4\zeta^2 \gamma^2 }}, \quad \left(\gamma = \frac{\Omega}{\omega_n} \right)\\ \phi &= -\tan^{-1} \left( \frac{2\zeta \frac{\Omega}{\omega_n}}{1-\left(\frac{\Omega}{\omega_n}\right)^2} \right) =-\tan^{-1} \left( \frac{2\zeta \gamma}{1-\gamma^2} \right) \end{align*}$$
In [12]:
r = 0:0.05:4;

zeta = 0.1:0.2:1;
A = [];
for i = 1:length(zeta)
    A(i,:) = 1./sqrt((1-r.^2).^2 + (2*zeta(i)*r).^2); 
end

plot(r, A)
xlabel('\gamma')
ylabel('A')
legend('0.1','0.3','0.5','0.7','0.9')

In [13]:
phi = [];
for i = 1:length(zeta)
    phi(i,:) = -atan2((2*zeta(i).*r),(1-r.^2));
end

plot(r,phi*180/pi)
xlabel('\gamma')
ylabel('\phi')
legend('0.1','0.3','0.5','0.7','0.9')

  • Resonance
    • Input frequency near resonance frequency
    • Resonance frequency is generally different from natural frequency, but they often are close enough
In [14]:
%%html
<center><iframe src="https://www.youtube.com/embed/CzJ8EKi11pU?rel=0" 
width="560" height="315" frameborder="0" allowfullscreen></iframe></center>
In [15]:
%%html
<center><iframe src="https://www.youtube.com/embed/Mqt_Amkw-0Y?rel=0" 
width="560" height="315" frameborder="0" allowfullscreen></iframe></center>
In [16]:
%%html
<center><iframe src="https://www.youtube.com/embed/TYA8C85CdCc?rel=0" 
width="560" height="315" frameborder="0" allowfullscreen></iframe></center>
In [17]:
%%javascript
$.getScript('https://kmahelona.github.io/ipython_notebook_goodies/ipython_notebook_toc.js')