Stand With Ukraine

Monday, December 28, 2020

Superposition of two harmonic oscillations

This post is about backward engineering properties of combined oscillations from the resulting superposed motion. In some way it is a simplified form of the harmonic analysis. And my curiosity for it was induced by a problem from Savchenko et al.

This problem has taken my mind for quite some time so I decided to write it up here.

Problem statement Given the graph (Fig. 1) of a motion resulting from a superposition of two harmonic oscillations determine amplitudes and frequencies of the constituent oscillations (i.e. of the oscillations being combined to get the net motion).

image.png

Fig. 1: Resulting motion from the superposition of two harmonic oscillations.

Solution

According to the graph the resulting motion can be expressed as:

$$ x(t) = a_1\sin\omega_1 t + a_2\sin\omega_2 t \tag{1} $$

Our task is to determine $a_1, a_2, \omega_1, \omega_2$.

Next we apply transformations to the equation to present it in the following form

$$ x(t) = \hat A (t) \sin(\omega_0 t + \hat\phi) $$

The ideas for the transformations are taken from this lecture.

Let's express $\omega_{1,2}$ as

$$ \omega_1 = \omega - \varepsilon \\ \omega_2 = \omega + \varepsilon $$

Then substituting these into equation (1) and expanding the sines of sum, we get:

$$ x(t) = (a_1 +a_2)\cos\varepsilon t \cdot \sin\omega t + (a_2 -a_1)\sin\varepsilon t \cdot \cos\omega t $$

Now (here, I think, is the most important statement) we can find $\hat A(t)$ and $\hat\phi(t)$ such that:

$$ \left\{\begin{array}{l} (a_1 +a_2)\cos\varepsilon t = \hat A(t)\cos\hat\phi(t) \\ (a_2 -a_1)\sin\varepsilon t = \hat A(t)\sin\hat\phi(t) \end{array}\right.\tag{2} $$

Indeed, using equations (2), we can construct $\hat A(t)$ and $\hat\phi(t)$:

$$ \left\{\begin{array}{l} \hat A(t)^2 = a_1^2 + a_2^2 + 2 a_1a_2 \cos 2\varepsilon t \\ \tan\hat\phi(t) = \frac{a_2 - a_1}{a_2 + a_1}\tan\varepsilon t \end{array}\right.\tag{3} $$

Then using the expressions for $\hat A(t)$ and $\hat\phi(t)$ we can get the expression for the result motion as follows:

$$ x(t) = \hat A(t) \cos(\omega t - \hat\phi(t)) $$

From (3) and the graph of the resulting motion we can get the amplitudes of the constituents:

$$ \left\{\begin{array}{l} \hat A_{\max} = a_1 + a_2 = A\\ \hat A_{\min} = a_2 - a_1 = B \end{array} \right.\Rightarrow \left\{\begin{array}{l} a_1 = \frac{A-B}{2}\\ a_2 = \frac{A+B}{2}\\ \end{array} \right.\tag{4} $$

From (3) we get that the frequency of variation of the amplitude $\hat A(t)$ is $2 \varepsilon$. If we neglect the variation of $\hat\phi(t)$ (this is a point maybe where more rigor is needed) we can approximate the higher frequency variation of the resulting motion as $\omega$. Summarizing the above statements we have for the frequencies of the constituents:

$$ \left\{\begin{array}{l} 2 \varepsilon = \Omega \\ \omega = \omega_0 \\ \end{array} \right.\Rightarrow \left\{\begin{array}{l} \omega_2 - \omega_1 = \Omega \\ \omega_2 + \omega_1 = 2\omega_0\\ \end{array} \right.\Rightarrow \left\{\begin{array}{l} \omega_1 = \omega_0 - \frac{\Omega}{2} \\ \omega_2 = \omega_0 + \frac{\Omega}{2} \end{array} \right.\Rightarrow \left\{\begin{array}{l} \omega_1 = \frac{2\pi}{\tau} - \frac{\pi}{T} \\ \omega_2 = \frac{2\pi}{\tau} + \frac{\pi}{T} \end{array} \right.\tag{5} $$

The last terms in (4) and (5) are the solutions of the problem.

Discussion

In this section I would like to describe my way to the above solution.

At first I wrote a sum of two harmonics and was trying to see if there is something simple relating amplitudes or frequencies of the two terms to the graph of the net motion. But I could not see an easy way to relate those, and decided to work out the formula for the net graph and from there, maybe, I could get some kind of sum of two harmonic functions.

The formula I have come up with for the net motion using the graph is following:

$$ x(t) = \left[ \frac{A-B}{2} \sin\Omega t + \frac{A+B}{2} \right] \sin\omega_0 t $$

But there is no way this could be brought to the sum of 2 harmonics. It is easy to see when the multiplication is performed there is a product of sines and that leads to two more harmonics.. I even calculated a quick Fourier transform for the function and got the confirmation that this function has energy localized at three frequencies: $\omega_0$, $\omega_0 \pm \Omega$.

The time was passing and as I got more curious I started googling and reading about superposition of harmonic oscillations. And I found just what I needed in a physics lecture on acoustics (link), that brought me easily to answer the question about the amplitudes, although to work out the frequencies I had to think a bit more.

Tuesday, October 6, 2020

Kubuntu 20.04 CPU and Network history are not showing up in KSysGuard

When I saw this problem and started googling, the solution that helped others was to copy SystemLoad2.sgrd file from a system folder to
~/.local/share/ksysguard/
, but that did not help me...

But removing the file
~/.local/share/ksysguard/SystemLoad2.sgrd
and restarting KSysGuard solved the issue for me. Therefore this solution is here, hope someone will find it useful as well.

Tuesday, September 8, 2020

Physics problem: A mass on an oscillating inclined plane

This problem comes from the problem book by Savchenko et al. which I mentioned in the blog before. It is the last problem on harmonic oscillations in the edition I have (3.30*). Since I am posting it here, it means that the solution took me quite long time and I have still some points that are not completely clear to me (hoping someone will comment and clarify it for me :-)).

Problem statement

Consider an inclined plane at an angle $\alpha$ with respect to the horizon. The plane is oscillating harmonically at high frequency along the axis ($x$) parallel to its surface and making the same angle $\alpha$ with the horizon (as shown in Fig. 1). The maximum speed of the oscillating plane is $v_0$. An object is then placed on the inclined plane. The friction coefficient between the plane and the object is $\mu$. Assuming that $\mu \gg \tan\alpha$ determine how would the object move and its mean velocity after a long period of time.

Fig. 1: Oscillating inclined plane with the mass on it, forces are shown at the moment when the object is sliding up the plane with the inertia force directed upwards.

Link to the latex source of the figure

Solution

We will consider the object in the reference frame tight to the oscillating plane. In this reference frame there would be the inertial force (varying harmonically) acting on the object and the object will oscillate up and down the inclined plane. Since the frequency of the oscillations of the plane is high, then we can consider that there are only two states of the object: it is moving upwards and downwards with respect to the plane. So the object will be oscillating on the plane up and down.

Let's take $T$ to be the period of the oscillating motion of the object. Which is equal to the period of oscillations of the plane.

Let's denote:

  • $t_1$ - time it takes the object to travel up with respect to the plane
  • $t_2=T-t_1$ - time it takes the object to travel down with respect to the plane

Let's consider projections of forces acting upon the object on the $x$-axis parallel to the inclined plane:

$$ F_x = \pm\,\mu m g \cos\alpha - m g \sin\alpha - m\omega v_0 \cos\left( \omega t + \phi_0 \right) $$

The last term of the equation above is the force of inertia, assuming that the velocity of the inclined plane varies according to the formula $v(t)=v_0\sin\left( \omega t + \phi_0 \right)$. Since the object is sliding, there is the friction force $F_f=\pm\,\mu N = \pm\,\mu m g\cos\alpha$ acting on the object in the direction opposite to its velocity.

Eventually, after a long time the change of momentum during each period $T$ would be 0 (stationarity condition):

$$ \Delta p = \int_{0}^{T}dp = \int_{0}^{T}{F_x}{dt} = 0 \tag{1} $$

Substituting the $F_x$ into the expression above:

$$ -m g T \sin\alpha - \mu m g t_1 \cos\alpha + \mu m g t_2 \cos\alpha = 0 $$$$ - T \sin\alpha - \mu t_1 \cos\alpha + \mu \left( T - t_1 \right) \cos\alpha = 0 \Rightarrow \boxed{t_1 = \frac{T}{2} \left( 1 - \frac{\tan\alpha}{\mu} \right)} $$

By definition the mean velocity is:

$$ \overline{v} \;\equiv\; \frac{1}{T}\left[\int_{0}^{t_1}{v_1(t)}{dt} + \int_{t_1}^{T}{v_2(t)}{dt} \right] \tag{2} $$

Let's determine the functions $v_1(t)$ and $v_2(t)$.

Let's note that the velocity should be 0 at the turning points, therefore:

$$ v_1(0) = v_1(t_1) = v_2(t_1) = v_2(T) = 0 $$

Applying the second Newton's law the velocity time derivatives can be expressed as:

$$ \begin{split} d_t v_1(t) & = -\mu g \cos\alpha - \omega v_0 \cos\left( \omega t + \phi_0 \right), t\in[0, t_1] \\ d_t v_2(t) & = \mu g \cos\alpha - \omega v_0 \cos\left( \omega t + \phi_0 \right), t\in[t_1, T] \end{split} $$

Here we neglected the projection of the gravity force ($F_{gx} = -mg\sin\alpha$) as it is much smaller than the force of friction, according to the problem statement.

Integrating the equations for acceleration and using the 0-velocity conditions at turning points, we get:

$$ \begin{split} v_1(t) & = -\mu g t \cos\alpha - v_0 \sin\left(\omega t + \pi \right), t\in[0, t_1] \\ v_2(t) & = \mu g (t - t_1) \cos\alpha - v_0 \left(\sin\left( \omega t + \pi \right) - \sin\left( \omega t_1 + \pi \right)\right), t\in[t_1, T] \end{split} $$

$\phi_0=\pi$ follows from the equations $v_1(0) = 0$ and $v_1(t_1)=0$.

Finally, by substituting the expressions for $v_1(t)$ and $v_2(t)$ we get:

$$ \begin{split} \overline{v}\cdot T & = \int_{0}^{t_1}{-\mu g t \cos\alpha}{dt} + \int_{t_1}^{T}{\mu g (t - t_1) \cos\alpha}{dt} - \int_{0}^{t_1}{v_0 \sin\left( \omega t + \pi \right)}{dt}\\ & - \int_{t_1}^{T}{v_0 \sin\left( \omega t + \pi \right)}{dt}+\int_{t_1}^{T}{v_0 \sin\left( \omega t_1 + \pi \right)}{dt}\\ \end{split} $$

By simplifying and integrating, we get:

$$ \overline{v}\cdot T = -(T-t_1) v_0 \sin\left( \omega t_1 \right) $$

then substituting $t_1$ and using the equation $\omega \cdot T = 2\pi$:

$$ \begin{split} \overline{v} \cdot T & = -\left(\frac{T}{2} + \frac{\tan\alpha}{\mu}\right) v_0 \sin\left(\pi - \frac{\tan\alpha}{\mu} \pi \right) \\ & = -v_0 \left(\frac{T}{2} + \frac{\tan\alpha}{\mu}\right) \sin\left(\frac{\tan\alpha}{\mu} \pi \right) \\ & \approx -v_0 \frac{T}{2} \frac{\tan\alpha}{\mu} \pi \end{split} $$

Then the final expression for the mean velocity is:

$$ \boxed{\overline{v} = -v_0 \frac{\tan\alpha}{2\mu} \pi} $$

Reflections

  • Let's double check that $v_1(t_1)=0$, i.e.,

    $$ -\mu g t_1 \cos\alpha - v_0 \sin\left(\omega t_1 + \pi \right) = 0 $$

    Substituting $t_1$:

    $$ -\mu g \frac{T}{2} \left( 1 - \frac{\tan\alpha}{\mu} \right) \cos\alpha + v_0 \sin\left(\omega \frac{T}{2} \left( 1 - \frac{\tan\alpha}{\mu} \right) \right) = 0 $$

    Simplifying: $$ -\mu g \frac{T}{2} \left( 1 - \frac{\tan\alpha}{\mu} \right) \cos\alpha + v_0 \sin\left(\pi\frac{\tan\alpha}{\mu}\right) = 0 $$

    Using the approximation $\frac{\tan\alpha}{\mu} \ll 1$:

    $$ -\mu g \frac{T}{2} \cos\alpha + v_0 \pi\frac{\tan\alpha}{\mu} = 0 $$

    Well, it seems that in order to have $v_1(t_1) = 0$, it is necessary that the period of oscillation be:

    $$ T=v_0 2\pi\frac{\tan\alpha}{\mu^2 g\cos\alpha} $$

    This makes me uncomfortable with the solution and the problem statement. Maybe there is something more to the motion described in the problem than I understand...

  • It is very easy to verify as well that $v_2(T) = 0$, assuming that $t_1\approx T/2$.

    $$ \begin{split} v_2(T) & = \mu g (T - t_1) \cos\alpha - v_0 \left(\sin\left( \omega T + \pi \right) - \sin\left( \omega t_1 + \pi \right)\right) \\ & = \mu g (T - t_1) \cos\alpha + v_0\sin\left( \omega t_1 + \pi \right) \end{split} $$

    Then using the condition $v_1(t_1)=0$, we get $$ v_2(T) = \mu g (T - t_1) \cos\alpha - \mu g t_1 \cos\alpha \approx 0 $$

  • $\overline{v} < 0$, so the object will slide down from the plane.

Sunday, March 15, 2020

Connecting Wifi from command line on ubuntu 19.04

Sometimes I end up in a situation when the desktop environment does not work... That happened recently, and I had to search again how to connect to wifi from the terminal. Below is what I did:
ifconfig # to see the interface, in my case it was wlp4s0
nmcli d connect wlp4s0 --ask # to connect to my saved wifi connection (it will ask for a password)

Tuesday, February 18, 2020

Proving that $\sqrt{2}$ is irrational

In this post I would like to tell you about a math problem that I encountered for the first time during my 9th grade math exam. I guess I was 15 years old back then. The question, if I remember correctly, was to proove that $\sqrt{2}$ is irrational. At the exam I was trying to proove it assuming that the inverse statement is true, i.e. assuming that $\sqrt{2}$ is rational. So basically I did the following:

$$ \sqrt{2} \in Q \Rightarrow \text{ exist } m, n \in Z \text{ such that } \sqrt{2} = \frac{m}{n}\Rightarrow m = n \sqrt{2} $$

And stopped there saying that this is a contradiction because of the whole number on the left and real numer on the right, but the fact that $n\sqrt{2}$ is a real number requires proof not less than the initial problem statement. I guess I got 0 points for the proof like that. I remember that I did very bad at that exam, and the mark was low (almost failed). It nevertheless taught me to never leave an exam even if completed in advance, so at all my following exams at school and the university I was double checking my solutions If I had time and had never left an exam before the alocated time elapsed.

But, surprisingly, I have never got back to this problem afterwards. Until, 20 years later, my wife got the same question as homework. At that point I decided to revisit it. Please see my solution below, still using the contrary assertion:

\begin{equation} \text{Let } \sqrt{2} \in Q \Rightarrow \text{ exist } m, n \in Z \text{ such that } \sqrt{2} = \frac{m}{n}\Rightarrow m = n \sqrt{2} \Rightarrow \boxed{m^2 = 2 n^2} \end{equation}$$ \text{Exist } k, l = 0, 1, 2, ..., +\infty \text{ such that } \left\{\begin{array}{l} &m=2^k\cdot m_1\\ &n=2^l\cdot n_1\\ \end{array}\right. $$

where $m_1, n_1$ are odd.

Substituting the above expressions for $m$ and $n$ into the last part of the equation $m^2 = 2 n^2$, we get:

$$ 2^{2k} m_1^2 = 2^{2l + 1} n_1^2, $$

where $m_1^2, n_1^2$ are odd, because $m_1$ and $n_1$ are odd.

In order to be equal the left and right parts should have equal powers of each divisor. Therefore for the divisor 2 it is necessary that $2k = 2l + 1$, which is not possible, since the sets of odd and even numbers do not intersect. Since our assumption that $\sqrt{2} \in Q$ leads to a contradiction we conclude that the inverse to our initial assumption is true, i.e. $\sqrt{2} \notin Q$.

Saturday, February 8, 2020

Arithmetics practice app for my son in Vue.js

I wanted to make some interactive pages recently to incite my son to learn arithmetics and also to learn something new and cool for myself. I decided to use Vue.js and am now happy that I did. Below is the link to my application, I hope you will enjoy it:

Arithmetics practice link

The source code of the application can be found on GitHub.