20210714



[begin transmission 3/?]


This post will be a slight deviation from the main subject I was addressing in this series of posts.
It was my intent to briefly explain systems theory and dynamics before getting into optimal control.
However, in my elaboration re: dynamics, the question of how to solve differential equations came up.
Possessing a deep appreciation for history of maths and engineering, I can't help but gush about the Laplace transform.


History Lesson

Let us begin w/ a brief discussion of the background of the Laplace transform. If it wasn't already apparent to you, the technique is named after none other than Pierre-Simon Laplace, the French mathematician and scientist. The history of this technique is somewhat mysterious, as the entire Enlightenment era had tons of great thinkers (and their even greater egos) rivaling each other, often times converging onto the same kinds of ideas. As a result giving credit where credit is due can be a contentious affair. But for the most part, yes, Pierre-Simon Laplace is widely credited w/ being the primary developer of the technique, using it mostly in his work on probability.

What I absolutely love about the history of the Laplace transform is that it was developed in the 18th century--remained in relative obscurity, being confined to the dusty libraries of mathematicians' minds--only to make a strong resurgence in the 20th century when the demands of warfare forced it into the mainstream. This is why, outside of teasing of course, I never give my mathematically or theory-inclined contemporaries too much of a hard time. As outlandish or worthless some abstraction may seem at the time, one that makes you think "When the hell am I ever going to use that?", one can never be too certain when a need may arise that grants a once useless concept newfound utility. Certainly Laplace couldn't have envisioned his mathematics being used to operate the fire-control systems directing the behemoth canons aboard the naval destroyers of WWII. So that ostensibly stupid idea your math friend dreamt up after his fourth pint of beer? It may just save the day in a century or two's time.

Okay, okay. That's enough history and fangirling. Let's get back to technical matters.


What Is It Though?

Technically-speaking, the Laplace transform is an integral operation that takes a time-domain function and transforms it into the complex s-domain. These words mean absolutely nothing to you, so let us unpack these concepts. An integral operation is like any other mathematical operation--just like addition, subtraction, or taking a derivative, only it involves integrals. The Laplace transform involves integration, as demonstrated by its formal definition:

\begin{equation} \mathscr{L}(f(t)) = F(s) = \int_{0}^{\infty}f(t)e^{-st}dt \tag{1}\end{equation}

When you take your time-domain function f(t) (that is, a function that has its independent variable t for time; virtually all real-world signals) and plop it into the Laplace transform above, you get its s-domain representation. What is the s-domain? It is the complex frequency-domain. What is the complex frequency-domain? Well, first understand the frequency-domain. To do this, take Fourier's theorem to heart: every periodic time-domain signal can be decomposed into sinusoidal components. These sinusoids have a frequency (how many times per time unit they complete a cycle, often expressed in Hertz) associated with them. What the frequency-domain representation of a signal reveals is 'how much' of the signal is found across the frequency spectrum. Here's a figure of a simple sinusoid that illustrates this:

Figure 1. A simple sine wave

The complex frequency-domain, the s-domain, is complex-valued , meaning it has two components: a real part and an imaginary part. It assumes the form:

\begin{equation} s = \sigma \pm j\omega \tag{2}\end{equation}

Remember when you learned about imaginary numbers and thought to yourself "When will I ever use this?". Well...here it is, coming back to haunt you. By the way, want to know another way to determine whether someone is a mathematician or an engineer? Ask them to write down a complex number. Mathematicians favor using "i" to denote imaginary numbers; engineers use "j". The imaginary part, the part to the right of the plus minus, refers to the frequency portion of the signal. The sigma part refers to the decay/growth of the signal. You might've noticed in Equation 1 that there is an exponential; this is exactly what the sigma part represents. Intuitively, this makes sense: real-world signals can and do indeed grow or decay over time. If sigma is positive, the signal grows; if sigma is negative, it decays. Those that are paying close attention, or have a background in signal processing will be able to appreciate right now that an ever-growing signal is something that is not...not very desirable.

And that's a very brief introduction into Fourier and complex analysis. I didn't expect to get too deeply into it, yet here we are. In truth you really don't have to understand this stuff to be able to solve differential equations using the Laplace transform, but a thorough understanding helps you gain a reliable intuition as an engineer. For example, had you not known that the s-domain conveys information regarding the growth/decay of a signal, you would be able to read a root-locus plot (a tool often used in classical control theory analysis) and determine that your system is underdamped, resulting in a large overshoot or unstable response.


Application of the Laplace Transform

It's about time we solve our mass-spring-damper mathematical model. Here it is, in case you had forgotten:

\begin{equation} M\ddot y + b \dot y + ky = r(t) \tag{3}\end{equation}

It is our wish to obtain y--the response of the system in the form of a vertical displacement--subject to an applied force r(t). Let's say that r(t) is a Heaviside function, also known as a step function u(t); this is reasonable, as it is often times the case in the real world that a constant force is applied to a system at any given moment in time then it is unapplied. Mathematically:

\begin{equation} u(t) = \begin{cases} 0 \quad if \quad t < 0 \\ 1\quad if \quad t > 0 \end{cases}\tag{4}\end{equation}

Graphically:

Figure 2. Heaviside function

So, how do we apply the Laplace transform? Well, you perform the operation term-by-term to Equation 3 and solve the integral. Honestly, solving integrals is such a pain in the ass, and we leave that kind of busy work to mathematicians. Being the jocks of academia engineers, instead we memorize the Laplace transform of several functions. They are as follows:

\begin{equation}f(t) = u(t), \quad \mathscr{L}(f(t)) = \frac{1}{s} \tag{5}\end{equation}
\begin{equation}f(t) = e^{at}, \quad \mathscr{L}(f(t)) = \frac{1}{s-a} \tag{6}\end{equation}
\begin{equation}f(t) = t^{n}, n=1, 2, 3..., \quad \mathscr{L}(f(t)) = \frac{n!}{s^{n+1}} \tag{7}\end{equation}
\begin{equation}\mathscr{L}(f(t)) = F(s) \tag{8} \end{equation}
\begin{equation}\mathscr{L}(\dot f(t)) = sF(s) - f(0) \tag{9}\end{equation}
\begin{equation}\mathscr{L}(\ddot f(t)) = s^{2}F(s) - sf(0) -\dot f(0) \tag{10}\end{equation}

Now that we have our handy table to refer to, and keeping in mind that M, b, and k are merely constants, applying the Laplace transform to Equation 3 yields:

\begin{equation}M\mathscr{L}(\ddot y) + b\mathscr{L}(\dot y) + k\mathscr{L}(y) = \mathscr{L}(u(t))\tag{11}\end{equation}

Using the table above:

\begin{equation}M(s^{2}Y(s)-sy(0)-\dot y(0)) + b(sY(s) - y(0)) + kY(s) = \frac{1}{s}\tag{12}\end{equation}

What the hell. What are these y(0) terms? These are initial conditions. When solving differential equations, it is necessary that these are given or assumed. Because we're utilizing a frequency-domain approach, our system is assumed to be using zero'd out initial conditions. Applying our initial conditions yields:

\begin{equation}Ms^{2}Y(s) + bsY(s) + kY(s) = \frac{1}{s}\tag{13}\end{equation}

A little bit of algebraic manipulation:

\begin{equation}Y(s) = \frac{1}{s(Ms^{2}+bs+k)}\tag{14}\end{equation}

We're almost there! Problem is, we didn't declare the parameters when we formulated the problem in the previous post. We'll take care of that right now; let's suppose mass M is equal to 1, coefficient of friction b is equal to 8, and spring constant k equal to 15. Of course these are easy-peasy numbers that work out nicely but are highly unrealistic. Equation 14 becomes:

\begin{equation}Y(s) = \frac{1}{s(s^{2}+8s+15)}\tag{15}\end{equation}

Notice anything different about our dynamic equation? Noti--well, yes, very astute of you. All of the t's have been replaced by s's. But beyond that, and this is fairly key, notice that our differential equation has now been transformed into a simple algebraic equation. This is what makes the Laplace transform fairly attractive. There are no derivatives or integrals to be found here, so it's now much easier to solve. So let's solve it, utilizing the method of partial fraction decomposition. All that this method does is take a rational expression and decomposes it into constituent fractions. The set up looks something like this:

\begin{equation}\frac{1}{s(s+3)(s+5)}=\frac{A}{s}+\frac{B}{(s+3)}+\frac{C}{(s+5)}\tag{16}\end{equation}

All we did here was take the polynomial in the denominator and factored it out. Then we equated it to a sum of fractions and declared new constants A, B, and C; one for each factor. The idea here is to now solve for these constants. Next, we multiply both sides by the denominator:

\begin{equation}s(s+3)(s+5) \frac{1}{s(s+3)(s+5)}=(\frac{A}{s}+\frac{B}{(s+3)}+\frac{C}{(s+5)})s(s+3)(s+5)\tag{17}\end{equation}

Cancelling out some terms and simplifying the expression yields:

\begin{equation}1 = A(s+3)(s+5) + B(s)(s+5) + C(s)(s+3)\tag{18}\end{equation}

The next step in our approach is to set s equal to something to reduce this expression. If we set s = -3, so that the terms grouped w/ A and C go to zero, we get:

\begin{equation} 1 = -6B\Rightarrow\ B = \frac{-1}{6}=-0.166\tag{19}\end{equation}

Similarly, if we set s = -5 so that the terms grouped w/ A and B go to zero:

\begin{equation} 1 = 10C\Rightarrow\ C = \frac{1}{10}=0.1\tag{20}\end{equation}

Finally, setting s = 0, so that the terms grouped w/ B and C go to zero:

\begin{equation} 1 = 15A\Rightarrow\ A = \frac{1}{15}=0.066\tag{21}\end{equation}

Repopulating Equation 16 w/ the constants we solved for:

\begin{equation}Y(s)=\frac{0.066}{s}-\frac{0.166}{(s+3)}+\frac{0.1}{(s+5)}\tag{22}\end{equation}

Finally, at this stage we apply the inverse Laplace transform (simply going the other way in our handy little table), we can go from the s-domain back to the time-domain; we transform Y(s) back into y(t):

\begin{equation}\mathscr{L^{-1}}(Y(s))=\mathscr{L^{-1}}(\frac{0.066}{s})-\mathscr{L^{-1}}(\frac{0.166}{(s+3)})+\mathscr{L^{-1}}(\frac{0.1}{(s+5)})\tag{23}\end{equation}

\begin{equation}y(t)=(0.066 - 0.166e^{-3t}+ 0.1e^{-5t})u(t)\tag{24}\end{equation}

As a reminder, b/c I know we sort of went through a lot here that it is all too easy to lose the plot, we solved the differential equation--Equation 3--by finding y(t) that satisfies it. That is the mathematical interpretation. Practically, Equation 3 was the mathematical model for our mass-spring-damper system; y(t) is the response of the system (remember, in the form of a vertical displacement) subject to an applied force modeled by u(t).

If you made it this far, congrats. You've made it one month into an introductory course in classical control theory. Keyword here is classical. These kinds of mathematics, as I mentioned before, were in vogue in the early half of the 20th century; I don't want to say that these methods are completely outdated, as they are still used today, but what you must understand is that they are fairly limited. If there is anything at all that you take away from this post is that the Laplace transform method used here only applies to linear, time-invariant systems. You might think to yourself "Wow! How useless! Most real-world systems and phenomenon are non-linear and time-varying in nature.". That last statement is true, but the s-domain approach still has some utility, as several non-linear systems can be linearized w/o losing too much fidelity, and depending on the time scale under consideration time-variance can be made negligible.

If these notions make you feel uncomfortable, if they make you roll your eyes and scoff, I recommend you revise your attitude or get out of engineering. Although the discipline does demand a fair amount of precision, you must come to terms w/ dropping any notion of perfectionism; approximations, tolerances, and trade-offs rule the day when it comes to dealing w/ real-world problems. The world is a complex, messy place, and neat, tidy little solutions rarely, if ever, occur.

...And I'm catching myself before I get too rant-y. Right. So if the frequency-domain approach is seen as an antiquated method of solving differential equations involved in classical control theory, what is the alternative? Glad you asked. Descriptively enough, it's known as modern control theory, or state-space control. This is what's in vogue these days and w/ good reason, as it enables for the analysis of ALL kinds of systems: linear/non-linear, time-invariant/time-varying, single-input-single-output/multi-input-multi-output, deterministic/stochastic etc. Moreover, it doesn't involve any exotic transformations; you can conduct your analysis and design in the time-domain. I don't think I'll get into it, but I'll cover a few concepts related to the field, as they're prerequisite towards understanding the real good stuff: optimal control.

[end transmission 3/?]

20210713



20210621



[begin transmission 2/?]

As promised, the day has finally come. We're covering dynamics. God help us all.
I'd like to preface this explanation w/ the qualification that dynamics is a very general term.
Just like systems, dynamics can assume a mechanical, electrical, biological, financial, etc. flavor.
The entire point of dynamics is to describe how these types of systems change over time, using mathematical formalisms.

Sounds crazy, right? You're trying to capture the overwhelming complexity of the world in mere symbols.
With good reason that dynamics is a field of study in itself, w/ people dedicating their lives in the pursuit.
Myself, by no means am I an expert, but in my profession I have to have an acute understanding of them.
It's a piece of the greater picture, and a very important piece at that, but it is not the entire story.

Anyways, let's get to it.


Normal Mode: Dynamics. But First, Babby Mode: Algebra

Okay, so I'm kind of torn as to where to begin. I'm assuming most of my readers are literate in basic algebra, and understand the concept of a function. But for completeness sake, let me remind you that a function is merely an equation that establishes a relationship between an input variable and an output variable (ignore multivariate functions for now). You put a quarter into the machine and receive a gumball. Here's a simple function:

\begin{equation} y(x) = x + 2 \tag{1}\end{equation}

You can take your input variable, x, and determine the value of y, the output variable. Suppose that x = 2, you can conclude that y = 4. If you conclude here that y is anything else other than four--and you're not a pure mathematician armed w/ a formal proof--please take your critical theory idiocy elsewhere. For the rest of you, onwards.

Functions can be expressed graphically. For a univariate function such as Eq. 1, this only takes two axes to describe:

Figure 1. Graph of y(x) = x + 2

I apologize if this is all so painfully rudimentary and unnecessary, but I read something like 40% of Americans can't read basic graphs. So here I hope it makes sense that, if you assume a value of x = 2, you can see that y = 4; if you assume a value of x = 3, y = 5, etc. String a bunch of these x and y value pairs together and you get the graphical representation of our function.


Normal Mode: Dynamics. No, no. Hold on. First Calculus.

But okay, you probably knew all of this. Let's graduate from algebra and tackle calculus. The central concept of calculus is that of the derivative: namely, that for every function (ignore discontinuous functions) there exists another function that describes its sensitivity to change in input variables. The common notation for a derivative is dy/dx. To illustrate the concept of the derivative, consider the gumball example above: suppose you put in two quarters--how would this affect the number of gumballs spat out? What if you insert three quarters? Four? A normal gumball machine will yield one gumball per quarter, so you get two, three, and four, respectively. Mathematically:

\begin{equation} y(x) = x \tag{2}\end{equation}


Graphically:

Figure 2. Graph of y(x) = x

Where y is the number of gumballs spat out, x is the number of quarters inserted. To graphically determine the derivative of this function, take any sample point for x, let's say 3, and increment it by one unit. Then observe how y changes accordingly. If you go from x = 3 to x = 4, then y behaves accordingly, going from y = 3 to y = 4. Expressing this change as a ratio defines the function's derivative:

\begin{equation} \frac{dy}{dx} = \frac{y(4) - y(3)}{4 - 3} = \frac{4 - 3}{4 - 3} = \frac{1}{1} = 1 \tag{3}\end{equation}


The derivative for our function is simply 1. Again, remember, a derivative describes a function's sensitivity to change in input. x, our input, is being changed, and as a result y changes. For every one unit change in x, y changes by one unit as well.

 Now, suppose that the gumball manufacturing supply chain is disrupted by a global pandemic, lowering the supply of available gumballs. Also suppose that God awful Democratic policy has disincentivized gumball factory workers from working--by offering them more in unemployment than they'd otherwise earn by working--resulting in an additional decrease in the supply of available gumballs. Since gumballs are now scarce and demand hasn't proportionally decreased but remained constant or even increased, the price of gumballs has now increased. Now gumballs cost four quarters a piece. Mathematically:

\begin{equation} y(x) = 0.25x \tag{4}\end{equation}


And graphically:

Figure 3. Graph of y(x) = 0.25x


Following the same procedure as before, we take x = 3, increment it by one unit, and observe the change in y. We then express that as a ratio to obtain the derivative:

\begin{equation} \frac{dy}{dx} = \frac{y(4) - y(3)}{4 - 3} = \frac{1 - 0.75}{4 - 3} = \frac{0.25}{1} = 0.25 \tag{5}\end{equation}

And yes, I botched the mathematical modeling here on the first cut, how embarrassing. I caught it on my own.

So far we've covered two basic examples of determining a function's derivative. These functions are linear, so determining them are child's play. We've obtained them w/ the help of graphs; this is cumbersome. A good student that paid attention in calculus class or an engineer worth their salt knows derivatives of several functions by heart; it's akin to memorizing one's times tables. Such functions are as follows:

\begin{equation} y(x) = cos(x), \frac{dy}{dx} = -sin(x)\tag{6}\end{equation}

\begin{equation} y(x) = sin(x), \frac{dy}{dx} = cos(x)\tag{7}\end{equation}

\begin{equation} y(x) = tan(x), \frac{dy}{dx} = sec^2(x)\tag{8}\end{equation}

\begin{equation} y(x) = ln(x), \frac{dy}{dx} = \frac{1}{x}\tag{9}\end{equation}

\begin{equation} y(x) = e^x, \frac{dy}{dx} = e^x\tag{10}\end{equation}


And if they're not memorized, there are several readily implementable heuristics available to obtain them, such as the power rule, chain rule, product rule, quotient rule...etc. We won't cover how these heuristics are derived because I don't remember how they are derived; that's left for mathematicians to fawn over because, much like how one doesn't need to understand the Carnot cycle to drive a car, an engineer doesn't need to understand the derivation of every single one of their mathematical tools to successfully employ them.

...Why on Earth did we use gumballs as an example? Let's illustrate an example that is easily comprehensible yet readily translatable to an engineering context. For your consideration, the scenario of going for a run. Why a run? Because we can describe a run in terms of spatial position, velocity, and acceleration. These three quantities are directly related to each other by, you guessed it, their derivatives. Specifically, by their time derivatives. What is a time derivative? It's the derivative of a function w/ respect to time. Want to know how you can tell an engineer from a mathematician? Ask a mathematician to write down the symbol for a derivative, and they'll ask "with respect to what?". Ask an engineer the very same thing and they'll instinctually write down something like dy/dt. This is because, in most dynamics problems, we're concerned w/ how systems change over time. An engineer is concerned w/ the sensitivity of a particular function as time changes.

Right, so the time derivative of a function that describes position yields velocity; take the time derivative of velocity and you get acceleration. This ought to make intuitive sense: you describe a point in space via length units, such as a meter; I am 5 meters ahead of you. You describe a velocity in terms of length units per time units, such as m/s; I am running at a speed of 4.5 m/s; for every increment of 1 time unit, my position changes by 4.5 length units. Accelerations are reported as...well, a variety of other units, but keeping w/ meters and seconds, as m/s^2; I am accelerating 2 m/s^2; for every increment of 1 time unit, my velocity changes by 2 velocity units.  These three quantities are used frequently in classical mechanics types of problems.

Personally I like to go for a three mile run every other day, keeping up a pace of about six minutes per mile. In engineering units (meters and seconds), this translates to a total of 4827 meters, ran in 1080 seconds. Therefore, my velocity is, on average, 4.47 meters per second. Below are graphical representations of the run, the first describing position:

Figure 4. Position Graph

So, at time 100 seconds (t = 100) I'll be 447 meters along the track, at time 101 seconds (t = 101) I'll be at 451.5 meters along the track, at 102 seconds (t = 102) 455.9 meters along the track, etc. Easy enough, right?

As mentioned before, my velocity, on average is 4.47. This is confirmed by the position graph, as moving 1 time unit increases my position by 4.47 meters. So if we take the derivative of the position at every time point, we obtain the following velocity graph:

Figure 5. Velocity Graph

It's a straight, flat line. What the heck. Why? Well, that's because we're running at a constant velocity of 4.47 m/s. There are no changes in the velocity, hence it is flat. Why did I show you this, this is boring. It is because it helps one grasp what an acceleration, the second time derivative of position, is. Much like how velocity describes change in position per time unit, acceleration describes change in velocity per time unit. Here, because our velocity is constant (it doesn't change at all, but remains 4.47 m/s), acceleration is zero. Hence, our acceleration graph looks like this:

Figure 6. Acceleration Graph

The second, equally important concept of calculus is that of the antiderivative. It is simply the inverse of the derivative, and is mathematically implemented via the integral operation. As such, taking the time integral of acceleration yields velocity; taking the time integral of velocity yields position. Thus, differentiating and integrating is commonplace in dynamics, as it yields several variables of interest. Much like derivatives, the antiderivatives of common functions are memorized like your times tables, and for those that aren't so easy to obtain, there are heuristics to follow to determine them.

Alright, I hope that I haven't lost too many of you. These things are really elementary to understand, but I'm sure my ham-fisted attempts at explaining them are making them seem much more complicated than they need to be. Part of that is because I've been dealing w/ these kinds of things for a thousand years, so tons of information is taken as for granted and lots of small, nuanced details are omitted in explanation. One of such nuances include notation; let's get square that circle here quickly.


Normal Mode: Dyna--No, Dot Notation

Let's take the following function as an example. Suppose it is our equation that describes our position at any given time (hence t):

\begin{equation} y(t) = t^2 + 5t + 11 \tag{11}\end{equation}


Quick note on notation (heh): I like to represent functions w/ their arguments. Here, rather than just leaving it as y = blah blah blah, I like to write y(t) = blah blah blah. This reminds me that y is a function of time. One more note here, but notice that this function is non-linear. All equations that we've been dealing w/ before have been linear, making them trivial to differentiate or integrate. This one is a second degree polynomial (second because the 'highest' power contained by a term is 2). Although this equation is non-linear, it is still trivial to differentiate and obtain our velocity equation. It is obtained using the heuristic known as the power rule. For every t term, you take its power, multiply the term by it, and decrease the power by one. So, term-by-term:

\begin{equation} \frac{d}{dt}(t^2) = 2t \tag{12}\end{equation}


For the next term, t is implicitly raised to the power of 1, so:

\begin{equation} \frac{d}{dt}(5t) = 5 \tag{13}\end{equation}


And constants--terms that have no t--simply evaluate to zero and can be omitted:

\begin{equation} \frac{d}{dt}(11) = 0 \tag{14}\end{equation}


Putting all of our terms together, we obtain our velocity equation:

\begin{equation} \frac{dy}{dt} = 2t + 5 + 0 = 2t + 5\tag{15}\end{equation}


To obtain the second derivative, our acceleration equation (notice the difference in notation), apply power rule once more:

\begin{equation} \frac{d^2y}{dt^2}=\frac{d}{dt}(2t+5) = 2\tag{16}\end{equation}


I don't like this notation, I think it's too busy. So, allow me to introduce you to dot notation. Dot notation is much more compact and cuter. The first derivative:

\begin{equation} \dot y = 2t+5\tag{17}\end{equation}


And the second derivative:

\begin{equation} \ddot y = 2\tag{18}\end{equation}


...Okay. Armed w/ a fundamental understanding of functions, their time derivatives/integrals, and dot notation, we can now tackle dynamics in earnest.


...May I Say It Now? Normal Mode: Dynamics

Right. As stated before, dynamics seeks to capture the behavior of a system of interest and represent that behavior mathematically, to varying degrees of complexity. That representation is known as a model. Typically a model is expressed via a series of differential equations.  What are differential equations? They are simply equations that have derivatives in them. This should make sense, since systems in the natural world evolve over time, so you must be able to express how that system's variables change w/ respect to time (the time derivative).

Let's not get caught up on superfluous examples. Let's go straight to an engineering example. Let's step through the process a mathematical modeler would undertake to obtain dynamic equations. Consider the following spring-mass-damper mechanical system, commonly found in automobile shock absorbers:

Figure 7. (a) Schematic of spring-mass-damper system. (b) Free-body diagram of spring-mass-damper system.

On the left is a simplified schematic representation of the system. Pertinent features are an object of mass M, walls that have a coefficient of friction b, and a spring with a spring constant k. Notice that these terms, M, b, and k are intrinsic properties of their corresponding entities. Thus, they are parameters, and not variables. They do not change with respect to time (though they can, and that would introduce more complexity to our model). On the right is what's called a free-body diagram of the same system; it is meant to demonstrate all of the forces acting on an object. Here we can see that the object of mass M is subject to three forces: a frictional force by, a spring force ky, and an applied force r(t). The fourth vector y (a quantity that specifies a magnitude and a direction, such as forces, typically designated as an arrow) refers to a displacement along the y-axis (the object moves strictly vertically, up and down).

\begin{equation} M\ddot y + b \dot y + ky = r(t) \tag{19}\end{equation}


This is known as a second order differential equation. Second order because, you guessed it, the highest derivative found here is 2. This particular equation--obtained by analyzing the pertinent forces involved in a system and applying the appropriate physical principles--describes the displacement y of the mass M, subject to the three aforementioned forces. And that's the core of what a modeler does, really. They examine the system under question, determine the pertinent forces at play, and use physics to formulate a series of dynamical equations that collectively form a model. This part is incredibly tricky as, once again, you're trying to capture the enormous amount of complexity in the world and represent it mathematically. Fidelity, that is, how accurately your model represents real-world phenomenon, increases as complexity increases.

This particular example is merely a toy; in reality that b parameter would probably be non-uniform--it's value changing depending on the position of mass M. Or worse yet, perhaps it does not vary just according to the position of mass M, but also according to the temperature of the system. Thus that parameter b is no longer a simple constant, but becomes a function. And not only is it a simple function, but a multivariate function, depending on position and temperature. Those two quantities, position and temperature are not simple constants either; they change w/ time. Hence, they need to be modeled w/ differential equations too. If you're following me so far, you can easily see how things can get hairy, as mathematical models of increasing fidelity incorporate more differential equations that are often times coupled. This is both the bane and beauty of dynamical systems: the quantities that differential equations describe are often times interdependent on each other. 

Great, so now we have this mathematical model in the form of a second order differential equation. What now? The answer is, of course, to solve it. What the heck are we solving for? I like to conceptualize this part as analogous to solving for a variable in an algebraic equation. When you're solving an algebraic equation, such as x + 2 = 5, you apply some simple arithmetic to arrive at x = 3. You're solving for a scalar; that is, a simple number. When you're solving differential equations, you're not solving for a scalar, but rather a function; the very same thing that we defined at the start of this post. However, very much unlike algebraic equations, sometimes differential equations can't be solved w/ pen and paper, following a set procedure to solve them. This is known as an analytical method. No, almost all of the mathematical models that describe real-world complex systems must be solved via numerical methods--in short, by computer simulation.

Numerical approaches to solving differential equations is an ENTIRE discipline in it's own right. As far as I'm concerned, this is the fundamental mathematical basis for what will probably be referred to in the future (if not already) as "simulation theory". No, not the hypothesis that we're living in a simulation. I mean the formal discipline on how to construct simulations. But anyway, that's enough of that digression. Back to our example.

Lucky for us, our little toy model of a mass-spring-damper system is amenable to an analytical solution. There is a set, procedural, pen-and-paper way to work it out. We don't have to (but we very well could) simulate it in order to solve it. Though, now I have to wonder whether or not I should get into the nitty-gritty and introduce you all to the Laplace transform. I think I will, but this post has gone on long enough. We'll pick it up in the next one.

[end transmission 2/?]

20210607

 


[begin transmission]

I can't believe this was taken a little under a year ago.
So much had happened between now and then...it's almost impossible to imagine.
Maybe we'll see you in New Genesis?
Probably not; my squad appears to shrink w/ each iteration. But I can always hope.

Wherever you are, be well. Beyond Lightspeed. I always thought that suited you nicely.
Keep accelerating, keep following that upward trajectory.

[end transmission]

20210521

 


20210509



 [begin transmission 1/?]

What's that? What do I do for a living? Are you sure you want to tread those waters?
No, I'm not an English or philosophy teacher. Nor do I live in a Christian convent.
I'm an electrical engineer. Underwhelmingly that's my quite plain, current title that doesn't do my skillset and duties justice.
Electrical engineering is supremely interdisciplinary, encompassing a variety of fields. Certainly more than you'd think.

It is not limited to being bent over a workbench soldering circuitry together, even though that can be fun in its own right.
For me that was all in a past life, when I was a hungry (literally and figuratively) undergraduate student.
Burnt fingers and popped capacitors...the joys and horrors of analogue electronics. All in a rite of passage, I suppose.
No, these days the source of my headaches are computer simulations, particularly as they pertain to the defense industry.

You wouldn't know it by talking to me, as I tend to shy away from discussing technical matters with laypeople.
So instead I vociferously state my opinions on things nearly everyone has input on: politics and culture.
Also, dealing w/ impersonal, cold machines and sterile mathematics day-in and day-out makes me crave the humanities.
Okay, so I'll try to explain things as simply and cleanly as possible; but these things are complex: consider this fair warning.

If you're mathematically-inclined, get your coffee, get your pastry, settle in and enjoy the brief lecture.
If you're not...I promise, we'll take things slow. I'll start w/ the basics; it's good practice for me anyway.

Easy Mode: Systems Theory

Let us first begin w/ an explanation of systems theory (if you really want to sound highfalutin, cybernetics; the term has assumed a very specific meaning nowadays, but has classically referred to the field of automatic control systems). In engineering, we are concerned w/ the manipulation of material and forces for the betterment of humanity. Towards this end, we organize the environment into systems: sets of components in the environment that are interconnected and embody principles that characterize it as a whole. These systems can be electrical, mechanical, biological, social, financial, etc. in nature. Now, it isn't enough to organize the environment into these discretized modules label them as systems and call it a day; we also need to be able to control these systems to harness them towards our ends. Here we cross into the realm of control theory, my formal academic field of study (to those interested, you'll find control engineering curricula within the mechanical or electrical engineering departments of most universities). In control engineering, we discretize systems further into sub-components, the central component being known as the process. Conceptualize the process as a component that simply receives an input and causally spits out an output, as illustrated below:


In order to control this process, we need to introduce components to the system. We can throw in a controller, the component that generates a control signal (more on that in a bit--sit tight) and an actuator, the component that takes the generated control signal and affects the process in some manner. This assembly, of a controller, actuator, and process is known canonically as an open-loop control system:


Notice here that the input into the open-loop control system is labeled as 'desired output response'. This is critical, as recall that we wish to harness these systems towards our ends (that is, we have a desired response from our system). Also notice that the output of the open-loop control system is labeled as 'output'. This is different from 'desired output'. Thus, I hope that you can logically infer that we can have an output that is not what we want. This is important to keep in mind, as the difference between output response and desired output response (AKA error) is absolutely INTEGRAL in describing the next tier of sophistication: the closed-loop control system. A closed-loop control system is identical to an open-loop control system, with the characteristic difference being that the output response is detected by sensors and fedback to the controller. Below is the block diagram:


So now that we've described a system abstractly to an adequate level of sophistication, it's time to illustrate a real-world example. What's something that is nearly universally experienced and understood...ah, alright. Let's use the boring, textbook example of driving a car. In this scenario, the closed-loop control system is you (the driver) and the car. The car is the process, your foot on the acceleration pedal is the actuator, and your brain is the controller. As you push down on the acceleration, the car moves forward; you see with your eyes the car moving forward, and you feel the acceleration with the proprioreceptors in your body. Therefore your eyes and proprioreceptors are sensors that feedback signals to your brain. If you notice that the road is disappearing under you car at an alarming rate, and you're being plastered into the back of the driver's seat, it is probably an indication that you're going much too fast; your brain will compute this difference between what is actually happening and what you want to happen (error) and generate a signal (control signal) to your foot to ease up on the acceleration.

To cite an example of a more engineering flavor, you could easily see how systems and control theory applies to robotics. To bring, say, the end effector (hand) of a robotic arm to a fixed point in 3D space, you must apply a particular voltage to a servomotor (conceptualize these as the 'joints' of the arm) to cause it to rotate, moving the attached linkage (the 'bone' of the arm) through space. Information regarding the position of the linkage could be coded by the resistance exhibited by a potentiometer (an electrical component that assumes a particular resistance depending on it's angular position) located at the joint.


Effectively, your potentiometer is the sensor, the servomotor is the actuator, and a computer or microcontroller would be the controller that receives the potentiometer data (i.e. a resistance value) and calculates an appropriate control signal (i.e. a command voltage) to send to the servomotor based off of that data. In order for the end effector of the robotic arm to be brought to a particular point in space, a specific voltage has to be sent to the servomotor. The voltage sent can be too little, resulting in us failing to reach the intended point and feelings of disappointment; or too much, resulting in us overshooting the intended point, sometimes to comical result:


Now, the above scenarios consider closed-loop control systems. This can easily be adapted into an open-loop control system. Merely cut off the feedback loop by driving with a blindfold on. Exciting as this may sound, I would not recommend this for any non-YoRHa units operating in the field. Although an open-loop control system sounds more basic than a closed-loop control system, it is still a very important concept to understand, as there are several real-world challenges concerned with the control of these types of systems.

I think that's a good place to stop for now. Most of this was conceptual in nature, making for a light and easy read (at least I hope). In the next section we will get a bit more technical, as I'll have to introduce dynamics into the conversation. But no worries, we won't do anything too crazy.

[end transmission 1/?]

20210502

 



[begin transmission]

Professor, we have a problem.

Between you and I, that is. There's a fault between us, formed by a difference in thought and opinion.
For me such a difference is tolerable and not insurmountable in maintaining a strong friendship, but maybe it's less tolerable for you? I'm not sure. If I had to guess, no, it wouldn't be too much of a challenge for you, considering that you've managed to befriend people of Neo-Fascist ideology, despite your political leanings. In short, you're not opposed to listening, entertaining, and otherwise engaging amicably with others that think differently from yourself. That is not the issue; I could be wrong, maybe it is too steep of an incline to traverse, but I think I'm right in this instance.

Your parting words, "Alright, well I made a pact to myself that I wouldn't stick around people who are more interested in appearances than telling the truth." are particularly troublesome. For one, I've never lied about my sex. Anyone that has asked me directly and in earnest I have equally answered directly and earnestly. Granted, I qualify this with the admission that I have never volunteered the information freely; that is NOT the same as being untruthful. I have said it several times before and by now it is a relatively well-known fact that I am a very private person. I don't pry into people's lives without their permission and I expect the same courtesy be rendered unto me.

Why are you so secretive, 2B? What have you got to hide? What are you afraid of?
Apart from the more sterile reasons, of not wanting my personal matters to contaminate my objectives with Lunar and threads, there are several personal reasons. The first and most readily understandable is that I am very selective with who I share details about my life with. Admittedly, I am slow to build trust with (keyword: slow. Spare me the juvenile sentiment of being so damaged you cannot ever trust), and that turns off a lot of people as it makes me come off as impersonal, slightly cold, maybe even outright hostile in certain circumstances. Why? The typical, expected response first: I have lived long and thoroughly enough to have had my fair share of horribly close relationships. Unfortunately, even sizable emotional investment does not guarantee protection from betrayal; there is no limit to the contempt of someone that is sufficiently hurt and destabilized. Sharing intimate details about yourself with another implicitly renders you vulnerable and at their mercy, for the knowledge you impart into them can be readily weaponized against you. They know exactly what stings, and so they know precisely where to strike. You're guilty of this type of betrayal, and honestly it has lead me to believe that my trust was indeed misplaced. Nevertheless, I think my reticence is understandable in this regard.

The second response: I do not have the time nor energy to maintain several consequential, sentimentally-rich relationships. Every decision we make comes at an opportunity cost, and that includes who we choose to become close to. Every minute spent in meaningful engagement with someone is at expense of a minute spent in meaningful engagement with someone else. I cherish my closest friends, the ones that have been with me for decades now, and so I do not take the sharing of personal details and connecting with others so lightly. The people I choose to invest myself in are privileged in the manner that they receive my priority. Yes, yes, it all sounds so conceited; allow me to temper that by mentioning that I consider myself privileged whenever someone shares their time, attention, sincere thoughts, and personal details with me. Unquestionably it goes both ways.

This is something I think you fail to appreciate: how much of a privilege it is to get to truly know someone. With all due respect, Professor, sometimes I get the sensation that you are not engaged in conversation with someone--particularly when you are attempting to help them with sagely advice--to help them them in proper, but to test and perhaps confirm ideas that you are enamored with at the time. I am not denigrating you here, nor am I saying that your advice is unhelpful (it is, which is why I'd hope you'd eventually come around, read this, and return); in fact, I think it is indicative of a scientific mindset, wanting to confirm/reject hypotheses. However, you and I are both aware of/harsh critics of scientism and can recognize that there is a place and time for scientific thinking.

Getting back to the situation at hand, I'm reminded of something I read from Erich Fromm. Paraphrasing, there is a need for humanity to gain knowledge, particularly knowledge of how other people tick, and in this pursuit "a child takes something apart, breaks it up in order to know it; or it takes an animal apart; cruelly tears off the wings of a butterfly in order to know it, to force its secret." . I think this characterizes you to the T. A modern, scientific mind--a well-meaning mind--however an immature, naive, and narcissistic mind. I don't levy these criticisms against you for absolutely no reason, nor do I say these while thinking I'm absolutely clear of flaws myself. God knows how wretched I am, and I struggle with my shortcomings everyday. With that qualification in order, I think you are immature out of the unwarranted rudeness you show me and others. Naive because I don't think you've had the prerequisite experience to support half of what you claim to believe. Narcissistic since you refuse to recognize your own ignorance, and an air of entitlement stemming from your expectation for me to answer to you.

The fact of the matter is that I do not owe you answers. You can ask me questions, and I try to provide an honest answer to the best of my ability. In this particular matter, there are some issues that I'm still working out and I simply haven't formulated a solution quite yet. And still, all the same, it is my prerogative to refuse to answer. Call it cowardice, call it laziness, call it hypocrisy--I already addressed this. I do not wish to share this aspect of my life with you. Take the hint, think as you will, and move on. But from as far as I've been able to tell you haven't be capable of doing so; no, instead you've devolved towards taking little passive-aggressive potshots at me and mine in the general chat. It's left me disappointed, because I expected so much better from you. You're capable of intelligent, sophisticated thought, and to see your resort to this is such a damn waste. You've insisted this is a form of constructive "bullying" on your part; a "masculine" way of getting people back on track. Well, allow me to insist in kind that your bullying isn't winning any hearts and minds, and I'm informed that several of the others have often raised eyebrows to some of the things you have said. So please, reevaluate and reconsider your approach, as you are only beclowning yourself and having the opposite intended effect. If you want people to listen to you, be someone worthy of respect. Respect as a man, in turn, is earned from competence and magnanimity. It isn't extracted from others through shame.

Masculinity is obviously very important to you, something that ought to be valued. I'm entirely in agreement; in fact we have common objectives in that we wish to restore some semblance of pride in masculinity within the hearts of our young men. It's become strikingly apparent that we differ in methodology. That's okay, but I am telling you that your implementations are in desperate need of refinement. My suggestions? Quit shaming guys for demonstrating the tiniest bit of femininity; that is what got us into this crisis of masculinity in the first place. Stop disparaging women for being women; complaining and insulting women is the mark of a pathetic incel. Relax your preoccupation with gender; seeing issues through only one lens makes you blind to the larger picture. These are all suggestions and by no means are you obligated to enact all of them or even some of them. But they are criticisms made in earnest, so please do at least take them into consideration.

Why the hell should I listen to you, 2B? You're not one to lecture about masculinity. This very mindset seems to be in vogue these days and it is worthy of contempt. Races cannot comment on the plight of other races; heterosexuals cannot comment on gay or trans issues; men cannot comment on the experience of women. For all of the preaching of diversity, some on your side of the aisle are very unreceptive towards the input of non-members of the group. Need I remind you that often times it takes a certain feminine influence and charm to remind a man of his masculinity? I am perfectly qualified to remark on matters of masculinity; because you feel threatened by this, I cannot help but feel perhaps you need to work on your own credentials and be less concerned with mine.

[end transmission]