Uncategorized

Transfer Functions

Background

In control theory, a system is some mathematical relation between an input and an output.  Systems are usually represented as a rectangle connecting some input function to an output function. Figure 1  depicts a SISO (single input, single output) system taking in an input function of time $u(t)$ and returning an output function of time $y(t)$.

generalSISO
Figure 1: A SISO system

Generally, ordinary differential equations (ODEs) are the simplest way to represent a system.

  • Note: dependent variables for ODEs (usually, this is time) are generally positive real numbers

Laplace Transform

We use the Laplace transform to switch between a function of real numbers (for our purposes, lets assume this is time $t$) to a function of some complex variable $s$ (Figure 2). Note that our $s$ variable turns out to denote frequency since our original function is a function of time.

laplace
Figure 2: Laplace transfrom for our input function $u(t)$ and our output function $y(t)$ from Figure 1.

Specifically, the expression for the Laplace transfrom of a single-variable function of time $f(t)$ is \begin{equation} F(s) = \mathcal{L} \left[ f(t) \right] = \int_{0}^{\infty} f(t)e^{-st} dt \end{equation}

The following equations are simplified expressions of the Laplace transform for $f(t)$ and its corresponding first and second order ODEs:

\begin{equation*} \mathcal{L} \left[ f(t) \right]  = F(s) \end{equation}

\begin{equation*} \mathcal{L} \left[ f'(t) \right]  = sF(s) – f(0) \end{equation}

\begin{equation*} \mathcal{L} \left[ f”(t) \right] = s^2 F(s) – sf(0) – f'(0) \end{equation}

Transfer Function (SISOs)

The transfer function $H(s)$ for a dynamic SISO system relates an input $u(t)$ with an output $y(t)$ as shown in Figure 3:

transferfunctionSISO
Figure 3: Transfer function for a SISO system

Examples

Example 1: Mechanical System

Find the transfer function for a single translational damped mass-spring system (depicted in Figure 4)

mass_spring1
Figure 4: Translational mass-spring system with damping
  • Aside: we can find the equation of motion for such a system using Newton’s and D’Alembert equations
  • The ODE describing our mass-spring system turns out to be…  \begin{equation} F(t)=m \ddot{x}(t) + c\dot{x}(t) + kx(t) \end{equation}
    • Variables:
      • $F(t)=$ an external force $[\mathrm{N}]$ acting on our mass $m \, [\mathrm{kg}]$
        • Note: this is the input for our system
      • $x(t)=$ the displacement $[\mathrm{m}]$ of our object due to $F(t)$
        • Note: this is the output for our system
      • $c=$ the damping coefficient $[\mathrm{Ns/m}]$
      • $k=$ the spring constant (i.e., stiffness) $[\mathrm{N/m}]$

Assume our initial conditions are $x(0)=0$ and $\dot{x}(0)=0$

First, let’s apply the Laplace transform to each individual term in our ODE for the mass-spring system:

\begin{equation*} \mathcal{L}[\ddot{x}]  = s^2 X(s) – sx(0) – \dot{x}(0) = s^2 X(s) \end{equation}

\begin{equation*} \mathcal{L}[\dot{x}]  = sX(s) – x(0) = sX(s) \end{equation}

\begin{equation*} \mathcal{L}[x(t)]  = X(s) \end{equation}

\begin{equation*} \mathcal{L}[F(t)]  = F(s) \end{equation}

Subsituting these expressions into our ODE is equivalent to taking the Laplacian of both sides:

\begin{equation} F(s) = ms^2 X(s) + cs X(s) + k X(s) \  =  X(s) (ms^2 + cs + k)  \end{equation}

Rearragning our $F(s)$ equation as follows gives us our transfer function $H(s)$ for the sytem:

\begin{equation} H(s) = \frac{X(s)}{F(s)} = \frac{1}{ms^2 + cs + k}  \end{equation}

Thus, we have defined our mechanical system as a second order ODE and as a transfer function. Figure 5 depicts the corresponding system diagrams in terms of the ODE and in terms of the transfer function.

mechanicalsystem
Figure 5: Two equivalent system diagrams for our mass-spring system. The top system diagram represents our mass-spring system in terms of a second order ODE. The bottom system diagram represents our mass-spring system in terms of a transfer function.

Sources

How to find the transfer function of a system

  • Note: most of the content in the article originally comes from the above link
Mathematics

Trigonometry Review

[latexpage]

More content coming in the near future 🙂

SOHCAHTOA

For any right triangle (i.e., a triangle with a $90^\circ$ angle between two of its segments), we can apply the following equations to determine the length of segments that comprise the triangle or the degree of the acute angles in the triangle.

 

sohcahtoa

SOH: \begin{equation*} \sin(\theta) = \frac{\mathrm{opposite}}{\mathrm{hypotenuse}} \end{equation}

CAH: \begin{equation*} \cos(\theta) = \frac{\mathrm{adjacent}}{\mathrm{hypotenuse}}  \end{equation}

TOA: \begin{equation*} \tan(\theta) = \frac{\mathrm{opposite}}{\mathrm{adjacent}}  \end{equation}

Equation for a Circle

A circle is defined as the set of points lying at a fixed distance from some center point. If we set the center of a circle with a radius $r$ to be the origin of a 2D Cartesian coordiante system, then we can use the Pythagorean theorem to find any set of points $P:(r_x, r_y)$ that lie along the perimeter of our circle. Equation of a circle

If we want to know the $r_x$ and $r_y$ coordinates associated with some $0 \leq \theta \leq 2\pi$ radians, we can use our first two SOHCAHTOA equations:

  • $r_x= r \cos(\theta)$
  • $r_y = r \sin(\theta)$

Aside: to convert between radians and degrees, use the equality $\pi \, \mathrm{rad} = 180^\circ$

  • Thus, $1 \, \mathrm{rad} = (\frac{180}{\pi})^\circ \approx 57.2958^\circ$

    radian
    $1 \, \mathrm{rad} \approx 57.3^\circ$

The Unit Circle

Unit Circle

Mathematics

Probability

[latexpage]

Counting Techniques

  1. Multiplication rule
    • Suppose there are $r$ items in a set
    • Also, let’s say there are $n_1$ possibilities for the $r=1^{\mathrm{st}}$ item, $n_2$ possibilities for the $r=2^{\mathrm{nd}}$ item, …, and $n_r$ possibilities for the $r=r^{\mathrm{th}}$ item
      • Then, the total number of possibilities for all the different $r$ items is $(n_1)(n_2) \cdot … \cdot (n_r)$
  2. Permulations 
    • permutation is an ordered set of $r$ items selected from a (larger) set of $n$ items without replacement
    • Note: these are a special case of the multiplication rule
      • Specifically, we use permutations when the order in which we choose an item from a set is relevant
    • Theorem: the number of $n$ distinct items selected $r$ at a time without replacement is… \begin{equation} \frac{n!}{(n-r)!} \end{equation}
  3. Combinations 
    • combination is an unordered set of $r$ items taken from a (larger) set of $n$ objects without replacement
    • Theorem: the number of combinations of $r$ items taken without replacement from a (larger) set of $n$ distinct objects is… \begin{equation} \binom{n}{r} = \frac{n!}{(n-r)!r!} \end{equation}

Random Variables

Two different kinds of random variables:

  1. Discrete random variables: characterized by a probability mass function
  2. Continuous random variables: characterized by a probability density function

 

**CORRECTION: As pointed out by adityaguharoy, there acutally random variables/distributions that are both discrete and continuous (e.g., the cumulative distribution function). Hopefully I’ll remember update this post with more details 🙂

Physics

Special Relativity – Part 2

[latexpage]

Review

From Special Relativity – Part 1, we know that the speed of light is constant in all inertial frames of reference

  • Michelson-Morely experiment (1887) showed that the wave-nature of light is not necessarily a mechanical wave causing a disturbance in a medium
    • In fact, the results of this experiment suggested that there is no medium through which light travels as a mechanical wave
  • However, it would be a few more decades until the wave-particle duality nature of light was explained in terms of electromagnetic waves

Some Newtonian Physics

Frame of reference (FoR) = an abstract coordinate system that is uniquely fixed (i.e., located and oriented) based on a set of physical reference points

Inertial frame of reference = a FoR in which objects that have a net force of zero acting on them are not accelerated (i.e., they are at rest or move at a cohnstant velocity without changing directions)

  • In other words, any object that “lives” inside an inertial FoR only accelerates when a physical force is applied to it
  • Also sometimes called a Galiliean reference frame
  • Importantly, Einstein’s theory of special relativity only applies for inertial FoRs traveling at a constant velocity relative to one another
    • A few decades later, Einstein developed general relativity, which applies to inertial reference frames that are accelerating relative to one another

Notes:

  • For simplicity, we will only consider 1D movement (specifically, movement in the horizontal direction)
  • As we do more advance physics, we shouldn’t necessarily think as time “driving” position (i.e., graphing an objects position as a function of time)
    • Although it may feel counterintuitive at first (in most contexts, we graph time on the horizontal axis), but in the context of these “path-time” and later spacetime diagrams, we are going to plot position on the horizontal axis and time on the vertical axis
    • Maybe changes in position are what drive time!

Constructing our Thought Experiment

Consider a scenario where an observer named Donald Trump is sitting in a spaceship that is drifting through space at a constant velocity

  • Furthermore, let’s define $S:(x,t)$ as an inertial reference frame in 1D space, whose $x=0$ coordinate corresponds with Trump’s position at any given time $t$
  • Thus, from Trump’s perspective, his position is constant at the $x=0 \mathrm{m}$ in the $S$-frame
  • Here is a Newtonian path-time diagram for Trump’s position in the $S$-frame (each $T_i$-th point represents Trump’s position in the $S$-frame at $t=i$ seconds)

    S-frame
    Figure 1: Newtonian path-time diagram of Trump’s position in $S:(x,t)$

Now, let’s introduce a second observer named Barack Obama who is sitting in a different spaceship that is traveling at half the speed of light in the positive $x$-direction

  • We can define a new inertial FoR called $S'(x’,t’)$ whose $x’=0$ coordinate corresponds with Obama’s position at any given time $t’$
    • Note: we can classify this as an inertial FoR because it is moving at a constant velocity $v=0.5c$ (where $c = 3 \cdot 10^8 \mathrm{m/s}$ is the speed of light) relative to another inertial FoR (i.e., the $S$-frame, which is defined by Trump’s position)
  • Thus, from Obama’s perspective, his position is constant at the $x’=0 \mathrm{m}$ in the $S’$-frame
  • Here is a Newtonian path-time diagram for Obama (each $O_i$-th point represents Obama’s position in the $S’$-frame at time $t’=i$ seconds)

    S'-frame
    Figure 2: Newtonian path-time diagram of Obama’s position in $S’:(x’,t’)$

Transforming Between Different Intertial FoRs

Aside: The Galilean Transformation

Newtonian/classical physics uses the Galilean transformation to transform between points of view (i.e., coordinate systems) for observers/objects “observing” the same event $E$ from different inertial FoRs

  • Put more simply, Newtonian/classical physics assumes the Galilean transformation accurately describes transforming between different coordinate systems for different intertial FoRs
  • For example, if we wanted to transform between the coordinates describing where/when an event occurs in the $S$-frame to coordinates in the $S’$-frame, we would use the following equations:

$\begin{matrix} t’ = t \\ x’ = x – vt  \end{matrix}$ where $v=$ the velocity of the $S’$-frame relative to the $S$-frame

The invariance of spatial distances is the most significant property in Galilean transformations (i.e., $\Delta x = \Delta x’$)

  • This property eventually breaks down for speeds near the speed of light

Galiliean physics also relies on the concept of absolute time

  • Absolute time = the time difference between two events $E_1$ and $E_2$ is the same in all inertial FoRs

Take-home-messages about the Galielean transformation:

  • Newtonian/classical physcis assumes space and time are absolute in all FoRs
  • However, for this to hold true, the speed of light should vary among inertial FoRs moving at different velocities relative to one another
  • As it turns out, the speed of light is always observed to be $c \approx 3\cdot 10^8 \mathrm{m/s}$
    • Consequently, Newtonian/classical physics “breaks down” for different inertial FoRs traveling at velocities $v \approx c$ relative to one another
    • Specifically, a unit length for both the time and space axes in one inertial FoR (e.g., $S:(x,t)$ or Trump’s experience of the passage of time and the distance of an event relative to himself) will differ from the unit lengths of these axes in another inertial FoR traveling at a different velocity relative to the first FoR (e.g., $S’:(x’,t’)$ or Obamas experience of the passage of time and the distance of an event relative to himself)

Also, I should probably note that the primary goal of this post is to show that the Galilean transformation does not hold for inertial FoRs traveling at or near the speed of light

Overlaying Path-Time Diagrams Using the Galilean Transformation

Assuming the Galilean transformation holds, let’s overlay the path-time diagram for Obama in the $S’$-frame onto Trump’s path-time diagram in the $S$-frame where Obama’s spaceship passes Trump’s spaceship at $t=0 \mathrm{s}$:

S-frame overlayed with S'-frame
Figure 3: The $S’$-frame overlayed on top of the $S$-frame
  • This path-time diagram shows Obama’s position changing relative to Trump’s, where Trump’s position is assumed to be constant
  • Since we are assuming the Galiliean transformation accurately transforms the $S$ and $S’$ coordinate systems, we drew the $t’$ axis so that $t’=t \, \, \forall t’$ and $x’=x$ at $t=0$

Similarly, Trumps path-time diagram overlayed on top of Obama’s would look something like this:

S'-frame overlayed with S-frame
Figure 4: The $S$-frame overlayed on top of the $S’$-frame

Let’s add some more obersvers/events to our thought experiment

Suppose there are two other spaceships, one containing George Bush and the other containing Bill Clinton

  • Assume the following $S$-frame coordinates for the spaceships
    • Bush’s spaceship: $(3\cdot 10^8 \mathrm{m}, 0 \mathrm{s})$
    • Clinton’s spaceship: $(6\cdot  10^8 \mathrm{m}, 0 \mathrm{s})$
  • Let’s also assume the velocity of these spaceships are the same as Obama’s
    • Thus, from Trump’s perspective (i.e., the $S$-frame), these spaceships are traveling at half the speed of light in the positive $x$-direction
    • From Obama’s perspective (i.e., the $S’$-frame), these spaceships remain at a fixed distance from his spaceship
  • Here is a path-time diagram of the $S’$-frame overlayed on top of the $S$-frame for these events:
    S-frame overlayed with S'-frame with Bush and Clinton
    Figure 5: The same path-time diagram depicted in Figure 3, but including Bush’s and Clinton’s path-time trajectories (green). Here, $B_i$ vertices denote Bush’s spaceship at time $t=t’=i$ seconds and $C_i$ vertices denote Clinton’s spaceship at time $t=t’=i$ seconds

     

Now, suppose Trump turns on a light located on the outersurface of his spaceship at $t=0$

  • If we draw a path-time diagram in the $S$-frame for the first photon emitted from this light, it would look something like this:
    S-frame with photon
    Figure 6: $S$-frame with a path-time trajectory for Trump and a path-time trajectory for the photon emitted at $t=0$

     

So far, everything looks alright, but if we try to overlay these sequence of events with the $S’$-frame and path-time trajectories for Bush and Clinton, we will see that things start to get contradictory with observations from nature (e.g., Michelson-Moorley experiment)

S-frame overlayed with S'-frame with Bush, Clinton, and Photon
Figure 7: The same path-time diagram depicted in Figure 5, but including a path-time trajectory for a photon emitted from the $S$-frame at $t=0 \mathrm{s}$ and $x=0 \mathrm{m}$
  • Consider the photon emitted from the flashlight Trump turned on at $t=0$ seconds (orange line in Figure 7)
    • Note: the velocity of the photon (that is, light) is $c=3\cdot 10^8 \mathrm{m/s}$
    • At $t=2 \mathrm{s}$, the photon will have traveled $6 \cdot 10^8 \mathrm{m}$ relative to Trump (i.e., in the $S$-frame)
    • Using the Galilean transformation and assuming the velocity of the $S’$-frame relative to the $S$-frame is $v=0.5c$, the position of the photon at $t=t’=2 \mathrm{s}$ is…

$x'(t’=2 \mathrm{s}) = x(t=2 \mathrm{s}) – v*2 \mathrm{s}$

$x'(t=2 \mathrm{s}) = 6 \cdot 10^8 \mathrm{m} – (0.5)(3 \cdot 10^8 \mathrm{m/s})(2 \mathrm{s})$

$x'(t=2 \mathrm{s}) = 6 \cdot 10^8 \mathrm{m} – 3 \cdot 10^8 \mathrm{m} = 3 \cdot 10^8 \mathrm{m}$

  • Thus, from Obama’s point of view (i.e., the $S’$-frame), the velocity of the photon relative to the $S’$-frame seems to be $1.5 \cdot 10^9 \mathrm{m/s}$ (i.e., half the speed of light) in the positive $x$-direction
    • However, we also know that in reality, regardless of which inertial frame of reference we are in, the speed of light is always the same (i.e., the speed of light should be $3 \cdot 10^8 \mathrm{m/s}$ in both the $S$ and $S’$-frames
    • Our classical/Newtonian/Galiliean understanding of the universe starts to break down!
      • Any time we make a prediction and it is not observed in nature, it means our conception of the universe is not complete (Note: it still isn’t complete today!)
      • We need a new way to conceptualize/visualize path-time diagrams

 

More content, editing, and diagrams coming soon! 😀 Also, I apologize if anyone takes offense to my version of Einstien’s thought experiement. I’m just trying to keep things interesting becuase this material can be a real mental “climb” if you know what I mean. Plus, I figure most people know who Trump, Obama, Bush, and Clinton are, so it applies to most people (I was going to use Game of Thrones characters, but not everyone knows who they are)

Personal remarks/thoughts:

  • Should we take into account the biological processes involved in the processing of time, space, and light sensation/perception?
  • 10/5/18 Update:
    • Photometry: the science of the measurement of light in terms of percieved brightness with respect to the human eye (wiki – photometry)
      • Note: this is distinct from radiometry – the science of measuring of radiant energy (which includes the light being measured in photometry)
      • Thought: Do the limitations/bounds of what an organism can/cant percieve have anything to do with different groups of spectral lines for a given element?

 

Sources

Physics

Waves in Physics

[latexpage]

General notes:

  • A hallmark property of waves is interference
  • In physics, waves are usually associated with the transmission of enegry between different points in space

Three Types of Waves

  1. Mechanical waves
  2. Electromagnetic waves
  3. Matter waves

Mechanical waves

Mechanical waves are propagations of a disturbance thorugh a material medium due to periodic motion of particles that comprise the medium from their mean positions

  • Existence of a medium is essential for propagation of a mechanical wave
    • Propagation occurs due to properties of the medium such as elasticity and inertia
  • Energy and momentum propagate via motion of particles in the medium BUT the overall medium remains in its original position
  • Two main types of mechanical waves:
    1. Transverse waves = the vibration of particles in the medium occurs perpendicular to the direction of wave propagation (e.g., vibration on a string)
    2. Longitudinal waves = the vibration of particles in the medium occurs parallel to the direction of wave propagation (e.g., oscillations in a spring, internal water waves, tsunamis, sound waves etc.)

Electromagnetic waves

Electromagnetic waves = periodic distortions in electric and magnetic fields

  • Two components: an electric component and a magnetic component
  • Initiated when charged particles (e.g., electrons) begin vibrating due to various forces acting on them
    • The vibration of these charged particles then results in the emission of energy called electromagnetic radiation
  • Importantly, electromagnetic waves do NOT require a medium to travel through
    • As far as we know, this property is unique to electromagnetic waves
  • Other properties:
    • Travel at the speed of light ($3 \cdot 10^8 \mathrm{m/s}$) in a vacuum
    • Can be polarized
    • Transverse in nature
      • Propagate out from their source (i.e., the vibrating particles)
      • Oscillations of waves occur perpendicular to the direction they are propagating/traveling
        • Furthermore, in the case of electromagnetic waves, oscillations in the magnetic component occur in a direction perpendicular to oscillations in the electric componet
    • No medium required
    • All EM waves have momentum (thus, they have kinetic energy)

Matter waves

Matter waves (or, de Broglie waves) = depict the wave-like properties of all matter

  • Assumes wave-particle duality for all matter
  • Frequency of these waves depends on their kinetic energy
  • Momentum is not directly (or, inversely) proportional to position of the wave

Miscellaneously-classed waves

Surface waves (or, Rayleigh waves) = can have mechanical or electromagntic nature

Standing waves = a wave that remains constant