Dynamical Systems:
Complex Number and Harmonic Motion
Table of Contents
1. Complex Numbers¶
A complex number is an expression of the form:
$$ z = a + bi $$
where $a, b \in \mathbb{R}$, and $i$ is the imaginary unit satisfying $i^2 = -1$.
Complex numbers can be represented both algebraically and geometrically (as vectors in the complex plane).
For example:
$$ 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. Operations with Complex Numbers¶
Addition
The sum of two complex numbers $z_1$ and $z_2$ is obtained by adding their real and imaginary parts:
$$ \begin{aligned} z &= z_1 + z_2 \\ &= (a_1 + a_2) + (b_1 + b_2)i \end{aligned} $$
In vector form, this corresponds to vector addition:
$$ \begin{aligned} \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{aligned} $$
This interpretation is fundamental for understanding complex numbers geometrically in the complex plane, where they correspond to vectors from the origin to the point $(a,b)$.
Multiplication and Division of Complex Numbers
Complex numbers can be conveniently expressed in polar (or exponential) form:
$$ z_1 = r_1 e^{i \theta_1}, \quad z_2 = r_2 e^{i \theta_2} $$
where:
- $r_i = |z_i|$ is the magnitude (modulus) of $z_i$
- $\theta_i = \arg(z_i)$ is the argument (phase angle) of $z_i$
Using this form, we can express multiplication and division as follows:
$$ \begin{cases} z_1 \cdot z_2 = r_1 r_2 e^{i(\theta_1 + \theta_2)} \\\\ \dfrac{z_1}{z_2} = \dfrac{r_1}{r_2} e^{i(\theta_1 - \theta_2)} \end{cases} $$
This shows that:
- When multiplying, magnitudes multiply and angles add.
- When dividing, magnitudes divide and angles subtract.
1.2. Euler's Formula¶
A cornerstone of complex analysis is Euler's formula, which links the exponential and trigonometric representations of complex numbers:
$$
e^{i\theta} = \cos\theta + i \sin\theta
$$
Complex Number in Polar (Exponential) Form
Combining magnitude and angle:
$$ \begin{aligned} z &= r \cos\theta + i r \sin\theta \\ &= r (\cos\theta + i \sin\theta) \\ &= r e^{i\theta} \end{aligned} $$
where:
- $r$ is the magnitude (length) of the complex number:
$$ r = |z| = \sqrt{a^2 + b^2} $$
- $\theta$ is the phase (angle):
$$ \theta = \arg(z) = \tan^{-1}\left(\dfrac{b}{a}\right) $$
1.2.1. Geometrical Meaning of $e^{i\theta}$¶
The complex exponential $e^{i\theta}$ has a rich geometrical interpretation in the complex plane:
- $e^{i\theta}$ represents a point on the unit circle in the complex plane, located at an angle $\theta$ measured from the positive real axis (counterclockwise).
Mathematically:
$$ e^{i\theta} = \cos\theta + i\sin\theta $$
Geometrically, this corresponds to the point:
$$ (\cos\theta, \sin\theta) $$
which lies on the unit circle.
1.2.2. Time-Dependent Angle: $\theta = \omega t$¶
If we let the angle $\theta$ evolve over time as $\theta = \omega t$, where $\omega$ is the angular velocity, we obtain:
$$ e^{i\omega t} $$
This describes a point rotating counterclockwise on the unit circle with angular velocity $\omega$. At any time $t$, the angle from the positive real axis is $\omega t$.
Physical Meaning of $e^{-i\omega t}$
The complex exponential:
$$ e^{-i\omega t} $$
represents a point rotating clockwise on the unit circle with the same angular velocity $\omega$. Specifically:
- The angle from the positive real axis at time $t$ is $-\omega t$.
- This is the mirror image of $e^{i\omega t}$ with respect to the real axis.
In physical terms, $e^{-i\omega t}$ can model:
- Clockwise rotation in mechanical or electrical systems
- Complex conjugate behavior in signal processing (e.g., representing negative frequencies)
- Time reversal symmetry in dynamical systems
Summary
- $e^{i\theta}$: counterclockwise rotation by angle $\theta$
- $e^{i\omega t}$: counterclockwise rotation with angular velocity $\omega$
- $e^{-i\omega t}$: clockwise rotation with angular velocity $\omega$
1.3. Sinusoidal Functions from Circular Motions¶
Complex exponentials such as $e^{i\omega t}$ represent circular motion in the complex plane, where $\omega$ is the angular velocity and $t$ is time. This motion can be decomposed into projections onto the real and imaginary axes, which correspond to cosine and sine functions, respectively.
Geometric Interpretation
The complex exponential $e^{i\omega t}$ traces a counterclockwise circle with radius 1 as $t$ increases.
The real part corresponds to the projection onto the real ($\Re$) axis, giving a cosine wave.
The imaginary part corresponds to the projection onto the imaginary ($\Im$) axis, giving a sine wave.
Projections
- Real Part (Cosine):
$$ \Re(e^{i\omega t}) = \cos \omega t $$
- Imaginary Part (Sine):
$$ \Im(e^{i\omega t}) = \sin \omega t $$
These projections are visualized in the figures, showing how the point $e^{i\omega t}$ on the unit circle casts shadows (projections) onto the $\Re$ and $\Im$ axes.
Euler’s Formula and Trigonometric Identities
Euler’s formula:
$$ e^{i\omega t} = \cos \omega t + i \sin \omega t $$
Using this, we can express cosine as:
$$ \cos \omega t = \frac{e^{i\omega t} + e^{-i\omega t}}{2} $$
Similarly, sine can be expressed as:
$$ \sin \omega t = \frac{e^{i\omega t} - e^{-i\omega t}}{2i} $$
Physical Interpretation
- The real projection represents the cosine component of the circular motion, capturing the horizontal displacement as the point rotates.
- The imaginary projection represents the sine component, capturing the vertical displacement.
Together, these form the basis of sinusoidal signals commonly used in physics, engineering, and signal processing.
1.4. Multiplication by $i$¶
Let’s explore the effect of multiplying a complex number by $i$
$$ \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*} $$
Thus, multiplying a complex number by $i$ corresponds to rotating it by $90^{o}$ counterclockwise in the complex plane.
1.5. n-th Power of the Complex Exponential¶
Consider a complex number expressed in exponential form:
$$ \begin{aligned} z &= e^{i\theta} \\[10pt] z^n &= \left(e^{i\theta}\right)^n = e^{in\theta} \end{aligned} $$
This identity follows directly from the rules of exponents for exponentials.
Example: Solving $z^{12} = 1$
We are tasked with finding all complex solutions of:
$$ z^{12} = 1 $$
Express 1 in exponential form:
$$ 1 = e^{i2\pi k}, \quad k \in \mathbb{Z} $$
Thus, we set:
$$ z^{12} = e^{i2\pi k} $$
Taking the 12th root on both sides gives:
$$ z = e^{i \frac{2\pi k}{12}} = e^{i \frac{\pi k}{6}}, \quad k = 0, 1, \dots, 11 $$
These are the 12th roots of unity, evenly spaced around the unit circle in the complex plane.
1.6. Differential and Integral Operations¶
Let us consider the meaning of differential and integral operations applied to the complex exponential $e^{j\omega t}$, which will be revisited later in the context of PID controllers.
Differentiation (Future Behavior)
Differentiating $e^{j\omega t}$ with respect to time:
$$ \frac{d}{dt} \left( e^{j\omega t} \right) = j \omega e^{j\omega t} = \omega e^{j\frac{\pi}{2}} e^{j\omega t} = \omega e^{j \left( \omega t + \frac{\pi}{2} \right)} $$
This result indicates that differentiation of a complex exponential corresponds to a phase shift of $+\frac{\pi}{2}$ (i.e., $90^\circ$) and scaling by $\omega$.
Integration (Past or Historical Information)
Integrating $e^{j\omega t}$ with respect to time:
$$ \int e^{j\omega t} \, dt = \frac{1}{j\omega} e^{j\omega t} = \frac{1}{\omega} (-j) e^{j\omega t} = \frac{1}{\omega} e^{j \left( \omega t - \frac{\pi}{2} \right)} $$
Integration thus corresponds to a phase shift of $-\frac{\pi}{2}$ (i.e., $-90^\circ$) and scaling by $\frac{1}{\omega}$.
These operations reflect how differentiation emphasizes the future rate of change, while integration accumulates past information. Both are essential in signal processing and control theory.
2. Circular Motion¶
A particle rotates on a circle of radius $r$ with an angular velocity $\omega$.
$$ p(t) = r e^{i\omega t} $$
Here, $p(t)$ represents the particle's position vector in the complex plane.
2.1. Velocity in Circular Motion¶
The velocity $v(t)$ is the derivative of position:
$$ v(t) = \frac{d p(t)}{d t} = r \cdot i \omega e^{i\omega t} = i r \omega e^{i\omega t} $$
Magnitude of velocity:
$$ |v(t)| = r \omega $$
Phase angle (relative to the real axis):
$$ \angle v(t) = \omega t + \frac{\pi}{2} $$
This indicates the velocity vector is always perpendicular to the position vector.
2.2. Acceleration in Circular Motion¶
The acceleration $a(t)$ is the derivative of velocity:
$$ a(t) = \frac{d v(t)}{dt} = r \omega i \cdot i \omega e^{i\omega t} = -r \omega^2 e^{i\omega t} $$
Magnitude of acceleration:
$$ |a(t)| = r \omega^2 $$
Phase angle:
$$ \angle a(t) = \omega t + \pi $$
The acceleration vector is always directed opposite to the position vector, pointing toward the circle's center (centripetal acceleration).
Key Geometric Insight
- Position vector rotates with $\omega t$
- Velocity vector leads by $\frac{\pi}{2}$ (perpendicular)
- Acceleration vector leads by $\pi$ (opposite direction)
Equation of Motion:
$$ \begin{aligned} F &= -kx = m \ddot{x} \\\\ m \ddot{x} + kx &= 0 \\\\ \ddot{x} + \frac{k}{m} x &= 0 \\\\ \ddot{x} + \omega_n^2 x &= 0, \quad \omega_n = \sqrt{\frac{k}{m}} \end{aligned} $$
Characteristics:
- A second-order ordinary differential equation (ODE)
- No external forces; $-kx$ represents the restoring force
- The solution is fully determined by initial conditions:
$$ \begin{cases} x(0) = x_0 \\\\ \dot{x}(0) = v_0 \end{cases} $$
General Solution:
$$ x(t) = R \cos(\omega_n t + \phi) $$
where $R$ (amplitude) and $\phi$ (phase) are determined by the initial conditions.
3.2. Circular Motion Interpretation¶
Simple harmonic motion can be interpreted as the projection of a particle moving in uniform circular motion in the complex plane.
Position in Complex Plane:
$$ z(t) = R e^{j(\omega_n t + \phi)} $$
Derivatives:
$$ \begin{aligned} \dot{z}(t) &= j \omega_n R e^{j(\omega_n t + \phi)} = j \omega_n z(t) \\\\ \ddot{z}(t) &= -\omega_n^2 R e^{j(\omega_n t + \phi)} = -\omega_n^2 z(t) \end{aligned} $$
Thus,
$$ \ddot{z}(t) + \omega_n^2 z(t) = 0 $$
The real part of $z(t)$ gives the displacement:
$$ x(t) = \Re[z(t)] = R \cos(\omega_n t + \phi) $$
3.3. Determining $R$ and $\phi$¶
Use the initial conditions $x(0)=x_0$ and $\dot{x}(0)=v_0$:
$$ \begin{aligned} x(0) &= R \cos\phi = x_0 \\\\ \dot{x}(0) &= -R \omega_n \sin\phi = v_0 \end{aligned} $$
Solve for $R$ and $\phi$:
$$ \begin{aligned} R &= \sqrt{x_0^2 + \left(\frac{v_0}{\omega_n}\right)^2} \\\\ \phi &= \tan^{-1}\left(-\frac{v_0}{\omega_n x_0}\right) \end{aligned} $$
These uniquely determine the amplitude and phase of the motion based on the initial conditions.
Applying Newton's second law:
$$ \begin{aligned} -T + mg\cos \theta &= -ml\omega^2 \quad \text{(radial)} \\\\ -mg\sin \theta &= m a_t = m l \ddot{\theta} \quad \text{(tangential)} \end{aligned} $$
Thus, the equation of motion for the angular displacement becomes:
$$ m l \ddot{\theta} + mg \sin \theta = 0 $$
which simplifies to:
$$ \ddot{\theta} + \frac{g}{l} \sin \theta = 0 $$
This is a nonlinear second-order ODE.
4.2. Linear Approximation¶
For small angles ($\theta \approx 0$), we can approximate:
$$ \sin \theta \approx \theta $$
Thus, the equation becomes linear:
$$ \ddot{\theta} + \frac{g}{l} \theta = 0 $$
which represents simple harmonic motion (SHM) with natural frequency:
$$ \omega_n^2 = \frac{g}{l}, \quad \omega_n = \sqrt{\frac{g}{l}} $$
Observation:
The period of the pendulum is independent of mass (non-intuitive result):
$$ T = \frac{2\pi}{\omega_n} = 2\pi \sqrt{\frac{l}{g}} $$
from IPython.display import YouTubeVideo
YouTubeVideo('YlSC2DfphaY', width = "560", height = "315")
5. Simulation of Free Vibration¶
Consider the complex representation of a free vibration signal:
$$ z(t) = e^{j \omega t} = \cos(\omega t) + j \sin(\omega t) $$
- $\omega$: angular velocity (radians per second)
- $f$: frequency (revolutions per second or hertz, Hz)
The relationship between $\omega$ and $f$ is:
$$ \omega = 2\pi f $$
For one revolution per second ($f=1$ Hz):
$$ \begin{aligned} \omega &= 2\pi \text{ rad/s} \\\\ f &= 1 \text{ Hz} \end{aligned} $$
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])
subplot(2,1,1), plot(t,real(z),'.')
subplot(2,1,2), plot(t,imag(z),'.')
from IPython.display import YouTubeVideo
YouTubeVideo('vDulP6vTa9g', width = "560", height = "315")
We model this with:
$$ z(t) = e^{-\gamma t} e^{j \omega t} = e^{-(\gamma + j\omega) t} $$
where:
- $\gamma$: exponential decay rate
- $\omega$: oscillation frequency
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])
plot(t,real(z),t,exp(-1*r*t),'r--',t,-exp(-1*r*t),'r--')
Derivatives:
$$ \begin{align*} \dot{z}(t) &= -(\gamma + j\omega) e^{-(\gamma + j\omega) t} \\\\ \ddot{z}(t) &= (\gamma + j\omega)^2 e^{-(\gamma + j\omega) t} \\\\ &= (\gamma^2 - \omega^2 + j 2\gamma \omega) e^{-(\gamma + j\omega) t} \end{align*} $$
Verification of the Differential Equation:
$$ \frac{d^2z}{dt^2} + 2\gamma \frac{dz}{dt} + (\gamma^2 + \omega^2) z(t) $$
Substituting the derivatives:
$$ = (\gamma^2 - \omega^2 + j2\gamma \omega) e^{-(\gamma + j\omega) t} - 2\gamma(\gamma + j\omega)e^{-(\gamma + j\omega)t} + (\gamma^2 + \omega^2) e^{-(\gamma + j\omega) t} = 0 $$
Thus, $z(t)$ satisfies:
$$ \ddot{z}(t) + 2\gamma \dot{z}(t) + (\gamma^2 + \omega^2) z(t) = 0 $$
General Solution:
The solution is a linear combination of two exponentials:
$$ z(t) = e^{-\gamma t}(A e^{j\omega t} + B e^{-j\omega t}) $$
where $A,B$ are determined by initial conditions.
The physical model is:
$$ m\ddot{x}(t) + c\dot{x}(t) + kx(t) = 0 $$
which simplifies to:
$$ \ddot{x}(t) + 2\zeta \omega_n \dot{x}(t) + \omega_n^2 x(t) = 0 $$
where:
- $\omega_n = \sqrt{\frac{k}{m}}$: natural angular frequency
- $\zeta = \frac{c}{2\sqrt{km}}$: damping ratio
Key Parameters
$$ \begin{align*} \omega_n^2 &= \frac{k}{m} = \gamma^2 + \omega^2 \quad &\text{(natural frequency)} \\\\ \omega^2 &= \omega_n^2 - \gamma^2 \quad &\text{(damped frequency)} \\\\ \gamma &= \zeta \omega_n \quad &\text{(decay rate)} \\\\ \omega &= \omega_n \sqrt{1-\zeta^2} \quad &\text{(oscillation frequency)} \\\\ 0 \le \zeta &= \sqrt{1 - \left(\frac{\omega}{\omega_n}\right)^2} \le 1 \quad &\text{(damping ratio)} \end{align*} $$
General Solution
$$ z(t) = e^{-\zeta \omega_n t}\left(A e^{j\omega_n \sqrt{1-\zeta^2} t} + B e^{-j\omega_n \sqrt{1-\zeta^2} t}\right) $$
where $A,B$ are constants determined by initial conditions.
%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
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 Closers
In door closers, the mass-spring-damper system ensures that doors close at a controlled speed and do not slam. The spring mechanism provides the necessary force to return the door to its closed position, while the damper controls the speed of this motion.
from IPython.display import YouTubeVideo
YouTubeVideo('C2P_5Q8XROk', width = "560", height = "315")
Example: Torsional Pendulum
A torsional pendulum is a mechanical system that exhibits angular oscillations about an axis, making it a rotational analog of the linear mass-spring-damper system.
from IPython.display import YouTubeVideo
YouTubeVideo('pnhE_-fW0pE', width = "560", height = "315")
Example: Unicopter
The Unicopter (a unique single-rotor flying platform) serves as an illustrative example of how mass-spring-damper (MSD) dynamics inform control system design in aerial vehicles. By understanding and applying MSD principles, engineers can enhance the stability and responsiveness of such systems.
from IPython.display import YouTubeVideo
YouTubeVideo('N8UX_TDMn-Y', width = "560", height = "315")
%%javascript
$.getScript('https://kmahelona.github.io/ipython_notebook_goodies/ipython_notebook_toc.js')