Dynamic Systems:

Complex Number and Harmonic Motion


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

Table of Contents

1. Complex Number

$$z_1 = a_1 + b_1i, \quad \vec{z}_1 = \begin{bmatrix} a_1 \\ b_1 \end{bmatrix} $$


$$z_2 = a_2 + b_2i, \quad \vec{z}_2 = \begin{bmatrix} a_2 \\ b_2 \end{bmatrix} $$

1.1. Operation

  • Add
$$ \begin{align*} z &= z_1 + z_2 = (a_1 + a_2) + (b_1 + b_2)i \\ \\ \vec{z} &= \vec{z}_1 + \vec{z}_2 = \begin{bmatrix} a_1 \\ b_1 \end{bmatrix}+ \begin{bmatrix} a_2 \\ b_2 \end{bmatrix} = \begin{bmatrix} a_1 + a_2 \\ b_1 + b_2 \end{bmatrix} \end{align*} $$



  • Multiply
$$\begin{cases} z_1=r_1e^{i\theta_1}\\ \\ z_2=r_2e^{i\theta_2} \end{cases} \quad\Longrightarrow\quad \begin{cases} z_1\centerdot z_2=r_1r_2e^{i(\theta_1+\theta_2)} \\ \\ {z_1 \over z_2}={r_1 \over r_2}e^{i(\theta_1-\theta_2)} \end{cases} $$



  • Euler's Formula:
$$ e^{i\theta} = \text{cos}\theta + i\text{sin}{\theta}$$
  • Complex number in complex exponential
$$ \begin{align*} \vec{z} &= r \, \text{cos}\theta + i\,r\,\text{sin}\theta \\ &= r\,(\text{cos}\theta + i\text{sin}\theta) \\ &= re^{i\theta}\\ \\ r &: \text{magnitude (length)} \\ \theta &: \text{phase (angle)} \end{align*} $$



1.2. Geometrical Meaning of $e^{i\theta}$

  • $e^{i\theta}: \text{point on the unit circle with angle of } \theta$



  • $\theta = \omega t$
  • $e^{i\omega t}: \text{rotating on an unit circle with angular velocity of } \omega$.



  • Question: what is the physical meaning of $e^{-i\omega t}$?

1.3. Sinusoidal Functions from Circular Motions



  • Real part ($\cos$ term) is the projection onto the $Re${} axis.
  • Imaginary part ($\sin$ term) is the projection onto the $Im${} axis.



$$\text{cos }\omega t = \large{e^{i\omega t } + e^{-i\omega t} \over 2}$$

1.4. $i$ Multiplying

$$ \begin{align*} ie^{i\theta} & = {?}\\ \\ z_1 & = i = e^{i \frac{\pi}{2}}\\ z_2 & = e^{i\theta} \\ \\ z_1 \cdot z_2 &= e^{i \left(\frac{\pi}{2} + \theta \right)} \end{align*} $$

  • $i$ multiplication $\implies$ $90^{o}$ rotation forward



1.5. n-th Power of the Complex Exponential


$$\begin{align*} z &= e^{i\theta} \\ \\ z^n &= \left(e^{i\theta}\right)^n = e^{in\theta} \end{align*}$$

Example

  • Find the solutions of $z^{12} = 1$

1.6. Differential and Integral Operations


  • $e^{j\omega t}$ : meaning of differential and integral operations

$\quad \;\implies$ will re-visit when PID controller.

  • Differentiation
    • future


$${d \over dt} \left(e^{j\omega t} \right) = j \omega e^{j\omega t} = \omega e^{j {\pi \over 2}}e^{j\omega t} = \omega e^{j \left(\omega t + {\pi \over 2} \right)}$$




  • Integration
    • past or historical information


$$\int e^{j\omega t} = {1\over j\omega}e^{j\omega t} = {1 \over \omega} (-j) e^{j\omega t} = {1 \over \omega} e^{j \left(\omega t - {\pi \over 2} \right)}$$



2. Circular Motion

  • Particle rotates on the circle with angular velocity of $\omega$
$$ p(t) = re^{i\omega t} $$

2.1. Velocity in Circular Motion


$$\begin{align*} \upsilon(t) &= \frac{dp(t)}{dt} = r\cdot i \omega e^{i\omega t}= i\, r \omega \, e^{i\omega t} \\ \\ \lvert \upsilon(t) \rvert &= r\omega\\ \angle \upsilon(t) &= \omega t + \frac{\pi}{2} \end{align*}$$


2.2. Acceleration in Circular Motion


$$\begin{align*} a(t) &= \frac{d \upsilon(t)}{dt} = r\omega i \cdot i \omega e^{i\omega t}= - r \omega^2 e ^{i\omega t} \\ \\ \lvert a(t) \rvert &= r\omega^2\\ \angle a(t) &= \omega t + \pi \end{align*}$$


3. Harmonic Motion

3.1. Spring and Mass System

  • What kind of motion?




  • Equations of motion



$$ \begin{align*} -kx &= m\ddot{x} \\ m\ddot{x} + kx &= 0 \\ \ddot{x} + {k \over m} x &= 0 \\ \\ \ddot{x} + \omega_n^2x &= 0,\; \omega_n=\sqrt{k \over m} \end{align*} $$

  • Differential Equation
    • $2^{\text{nd}}$ order ODE (ordinary differential Equation)
    • No additional external force (suppose our system contains $m$, $k$)
    • spring force ($-kx$) is internal force

$\quad \Rightarrow$ No input force

$\quad \Rightarrow$ Two initial conditions determine the future motion.

$\qquad \begin{cases} x(0) = x_0\\ \dot{x}(0) = v_0 \end{cases}$

  • Solutions
    • Assume (or educated guess from Physics 1) that the solution is


$$x(t) = R\cos(\omega_n t+\phi)$$

$\;\; \quad \quad$ Unknowns $R$ and $\phi$ are determined by $x_0, v_0$

3.2. Circular Motion

  • Sinusoidal can be seen as a projection of a circular motion.


$$ \begin{align*} z(t) &= Re^{j(\omega_n t+\phi)}\\ \dot{z}(t) &= jR\omega_n e^{j(w_nt+\phi)}= j\omega_n z(t)\\ \ddot{z}(t) &= -{\omega_n}^2 z(t)\\ \\ \Rightarrow \;& \; \ddot{z}(t) + {\omega_n}^2z(t) = 0 \end{align*} $$


  • We know that two initial conditions ($x_0, v_0$ at $t=0$) will determine every motions.


3.3. Determine Unknown Coefficients

  • How to obtain $A, \phi$ from $x_0, v_0$

    $$ \begin{array}{} x(t) = R\cos(\omega t + \phi) & x(0)=R\cos\phi = x_0 \\\\ \dot{x}(t) = -R\omega\sin(\omega t + \phi) &\dot{x}(0) = -R\omega\sin(\phi) = -v_0 \end{array} $$

  • Determine Unknown Coefficients from circle
$$ \begin{align*} x_0 &= R\cos\phi\\ v_0 &= v\sin\phi=R\omega\sin\phi \end{align*} $$


4. Pendulum

  • Equations of motion




$$ \begin{align*} -T + mg\cos \theta &= -ml \omega^2 \\ -mg\sin \theta &= ma = ml \ddot{\theta} \end{align*} $$

  • From Nonlinear to Linear

$\quad \;$ nonlinear system approximation possible?


$$ \begin{array}{} \ddot{\theta} + {g \over l}\text{sin}\theta = 0 & \Rightarrow & \ddot{\theta} + {g \over l}\theta = 0 \end{array} $$

  • period is independent of mass (non-intuitive)
$$\omega^2 = \frac{g}{l}$$
In [1]:
%%html
<center><iframe src="https://www.youtube.com/embed/YlSC2DfphaY?rel=0"
width="420" height="315" frameborder="0" allowfullscreen></iframe></center>

Note

  • 'Equations of motion' means
    • Apply $F=ma$ to find ordinary differential equations
    • Its solution will describe how it moves
  • 'Simple harmonic motion' means
    • Equation of motion will satisfy
$$\ddot{x} + w_n^2x = 0$$

5. Simulation of Free Vibration


$$ z(t) = e^{j \omega t} = \cos \omega t + j \sin\omega t$$

  • $\omega$: angular velocity, [rad/sec]
  • $f$: frequency, [rev/sec = Hz]
$$\omega = 2\pi f$$
  • One revolution per sec
$$ \begin{align*} \omega &= 2\pi \\ f &= 1 \end{align*}$$
In [3]:
t = 0:0.01:1;
f = 1;
w = 2*pi*f;

z = exp(1j*w*t);
plot(real(z),imag(z),'.'), axis equal, ylim([-1.1 1.1])

In [4]:
subplot(2,1,1), plot(t,real(z),'.')
subplot(2,1,2), plot(t,imag(z),'.')

6. Damped Free Vibrarion

  • more realisic

6.1. Experiment first

In [4]:
%%html
<center><iframe src="https://www.youtube.com/embed/vDulP6vTa9g?rel=0"
width="560" height="315" frameborder="0" allowfullscreen></iframe></center>
  • in a mathematical form (from the educated guess)
    • exponentially decaying while oscillating
$$z(t) = e^{-\gamma t} e^{j \omega t}$$
In [5]:
r = 0.3;

f = 1;
w = 2*pi*f;

t = 0:0.01:10;
z = exp(-1*r*t).*exp(1j*w*t);

plot(real(z),imag(z)), axis equal, ylim([-1.1,1.1])

In [6]:
plot(t,real(z),t,exp(-1*r*t),'r--',t,-exp(-1*r*t),'r--')

  • Assume damping causes exponential decay while oscillating


$$ \begin{align*}z(t) &= e^{-\gamma t} e^{-j\omega t} = e^{-(\gamma +j\omega)t}\qquad \text{normalized for simplicity}\\ \upsilon(t) &= \frac{dz(t)}{dt} = -(\gamma + j\omega) e^{-(\gamma +j\omega)t} \\ a(t) & = \frac{d^2z(t)}{dt^2} = (\gamma + j\omega)^2 e^{j \omega t} = (\gamma ^2 - \omega^2 + j2\gamma \omega) e^{-(\gamma +j\omega)t} \end{align*}$$



$$ \left\{ (\gamma ^2 - \omega^2 + j2\gamma \omega) e^{-(\gamma +j\omega)t} \right\} + 2\gamma \left\{ \left( -(\gamma + j\omega) e^{-(\gamma +j\omega)t}\right) \right\} + \left(\gamma^2 + \omega^2 \right) \left\{ e^{-(\gamma +j\omega)t} \right\} \\ = a(t) + 2\gamma \upsilon(t) + \left(\gamma^2 + \omega^2 \right) z(t) = \frac{d^2z(t)}{dt^2} + 2\gamma \frac{dz(t)}{dt} + (\gamma^2 + \omega^2) z(t) = 0$$


  • Show $ z(t) = e^{-\gamma t} e^{j\omega t} $ also satisfies
$$\frac{d^2z(t)}{dt^2} + 2\gamma \frac{dz(t)}{dt} + \left(\gamma^2 + \omega^2 \right) z(t) = 0$$
  • Given the differential equation
$$\ddot z(t) + 2\gamma \, \dot z(t) + \left(\gamma^2 + \omega^2 \right) z(t) = 0$$
  • Solution is a linear combination of
$$ z(t) = e^{-\gamma t} \left(A e^{j\omega t} + B e^{-j\omega t}\right)$$
  • $A,B$ are determined by initial conditions

6.2. Mass, spring, and damper system




$$ \begin{align*} m \ddot x(t) + c \dot x(t) + k x(t) &= 0 \implies \\ \ddot x(t) + 2\zeta \omega_n \dot x(t) + \omega_n^2 x(t) &= 0 \qquad \text{where } \; \omega_n^2 = \frac{k}{m} = \gamma^2 + \omega^2 \end{align*}$$
  • parameters
$$ \begin{align*} \omega_n^2 &= \frac{k}{m} = \gamma^2 + \omega^2 & \text{: natural angular velocity}\\ \omega^2 &= \omega_n^2 - \gamma^2 & \text{: actual angular velocity}\\ \gamma & = \zeta \omega_n &\text{: decaying factor} \\ \omega^2 &= \omega_n^2 \left(1 - \zeta^2 \right)\\ 0 \leq \zeta &= \sqrt{1-\left(\frac{\omega}{\omega_n}\right)^2} \leq 1 & \text{: damping ratio} \end{align*} $$
  • solution
$$ z(t) = e^{-\zeta \omega_n t}\left( A e^{j\omega_n \sqrt{1-\zeta^2}} + B e^{-j\omega_n \sqrt{1-\zeta^2}} \right) $$
In [7]:
%plot -s 800,250

f = 1;
wn = 2*pi*f;
zeta = [0.1 0.2 0.5 0.8];
t = 0:0.01:10;

for i = 1:4
    r = zeta(i)*wn;
    w = wn*sqrt(1-zeta(i)^2);
    z = exp(-1*r*t).*exp(1j*w*t);
    subplot(1,4,i), plot(real(z),imag(z)), grid on
    axis equal, axis([-1.1,1.1 -1.1 1.1])
    title(['\zeta = ',num2str(zeta(i))],'fontsize',8)
end

In [8]:
for i = 1:4
    r = zeta(i)*wn;
    w = wn*sqrt(1-zeta(i)^2);
    z = exp(-1*r*t).*exp(1j*w*t);
    plot(t,real(z)), hold on    
end

hold off
legend(['\zeta = ',num2str(zeta(1))],['\zeta = ',num2str(zeta(2))],...
['\zeta = ',num2str(zeta(3))],['\zeta = ',num2str(zeta(4))])

Example: Door lock

In [9]:
%%html
<center><iframe src="https://www.youtube.com/embed/C2P_5Q8XROk?rel=0"
width="560" height="315" frameborder="0" allowfullscreen></iframe></center>

Example: Torsional Pendulum

In [10]:
%%html
<center><iframe src="https://www.youtube.com/embed/pnhE_-fW0pE?rel=0"
width="420" height="315" frameborder="0" allowfullscreen></iframe></center>

Example: unicopter

In [11]:
%%html
<center><iframe src="https://www.youtube.com/embed/N8UX_TDMn-Y?rel=0" 
width="560" height="315" frameborder="0" allowfullscreen></iframe></center>
In [12]:
%%javascript
$.getScript('https://kmahelona.github.io/ipython_notebook_goodies/ipython_notebook_toc.js')