Midterm 2 (Due 5 Apr)#

Date: 25 Mar 24

Introduction to the second midterm project, total score 100 points#

The relevant reading background is:

  1. chapters 4-5 of Taylor.

  2. chapters 6-8 of Boas.

In this midterm project we will start modeling an oscillator. We pull together many of the elements we have used in our analysis of oscillators to do so. There is substantial extra credit for this midterm project and it involves some advanced analysis that we have not done. This is a good opportunity to learn something new and interesting. The second problem is a relatively standard signal processing problem, which is a little different than the examples we have done in class.

Practicalities about midterm projects#

You can work in groups (optimal groups are often 2-3 people) or by yourself. If you work as a group, you must hand in your own work. Remember to write your name(s) and indicate how each person contributed.

Midterms might cover topics from prior homework, lectures, and readings. It is likely that some of the problems might require a little research on your own or might be slightly beyond what we have done on class and in homework. The midterm is meant to be challenging, but it should also be a good place to learn more about the topics covered in the course. We encourage you to use the textbook, notes, and other resources when solving the midterm. Of course, you can also work with others on the midterm, but make sure you write up the solutions yourself. You can ask the any of the teaching staff for help.

Part 1, The Duffing Oscillator (60pt)#

Consider the following equation of motion for a damped and driven oscillator that is not necessarily linear. This is the Duffing equation, which describes a damped driven simple harmonic oscillator with a cubic non-linearity. It’s equation of motion is given by:

\[\ddot{x} + \delta \dot{x} + \alpha x + \beta x^3 = \gamma \cos(\omega t).\]

where \(\alpha\), \(\beta\), \(\delta\), \(\gamma\), and \(\omega\) are constants.

Below is a figure showing the strange attractor of the Duffing Oscillator over four periods. It is locally chaotic, but globally it is stable. This is a common feature of non-linear systems.

Strange attractor

We focus on this one dimensional case, but we will analyze it in parts to put together a full picture of the dynamics of the system. If you are looking for useful parameter choices and initial conditions, we suggest using those listed on the Wikipedia page.

Recall that the potential for this system can give rise to different kinds of behavior depending on the parameters. The figure below shows the potential for different choices of \(\alpha\) and \(\beta\). Make sure you choose your parameters to match the potential you want to study - pick a stable well for solving for trajectories.

Duffing potential

Undamped and undriven case (20 points)#

  1. (5 pt) Consider the undriven and undamped case, \(\delta = \gamma = 0\). What potential would give rise to this kind of equation of motion? Demonstrate that potential gives the expected equation of motion.

  2. (5 pt) Find the equilibrium points of the system for the undriven and undamped case. What are the conditions for stable and unstable equilibrium points? Plot the potential for some choices of \(\alpha\) and \(\beta\) to illustrate your findings.

  3. (5 pt) Plot the phase space for the undriven and undamped case. What are the trajectories of the system? What is the behavior of the system? Does it match your expectations from the potential? The figure above only starts this discussion.

  4. (5 pt) Here you are likely to need a numerical solver. Solve the equation of motion for the undriven and undamped case for a reasonable choice of \(\alpha\) and \(\beta\) and initial conditions. Plot the position as a function of time. What is the behavior of the system? Does it match your expectations from the potential and the phase portrait??

Damped and undriven case (20 points)#

  1. (5 pt) Now consider the damped and undriven case, \(\gamma = 0\). What is the equation of motion in this case? Can you develop this equation of motion fully from a potential (like we did above)? If so, what is the potential? If not, why not?

  2. (5 pt) Plot the phase space for the damped and undriven case. What kinds of trajectories are there?

  3. (10 pt) Here you are likely to need a numerical solver. Solve the equation of motion for the damped and undriven case for a reasonable choice of \(\alpha\), \(\beta\), \(\delta\), and initial conditions. Plot the position as a function of time. What is the behavior of the system? Does it match your expectations from the phase portrait?

Driven and damped case (20 points)#

  1. (5 pt) Now consider the damped and driven case, \(\gamma \neq 0\). What is the equation of motion in this case? Can you develop this equation of motion fully from a potential (like we did above)? If so, what is the potential? If not, why not?

  2. (5 pt) Is it possible to plot the phase space for the driven and damped case? Why or why not? What solutions are available to you to understand the behavior of the system in phase space? Here we are not looking for you to solve the problem, but to conduct research into how people make sense of the behavior of driven and damped systems.

  3. (10 pt) Here you are likely to need a numerical solver. Solve the equation of motion for the driven and damped case for a reasonable choice of \(\alpha\), \(\beta\), \(\delta\), \(\gamma\), \(\omega\), and initial conditions. Plot the position as a function of time. What is the behavior of the system?

Extra credit (up to 30 points)#

  1. (10 pts) The Duffing oscillator can be either a soft or hard spring by changing the sign of the \(\alpha\) term. What happens to the behavior of the system when you change the sign of \(\alpha\)? Can you explain this behavior in terms of the potential?

  2. (20 pts) A critical tool for understanding the behavior of the Duffing oscillator is the Poincaré section. Can you implement a Poincaré section for the driven and damped case? What does it tell you about the behavior of the system?

Part 2, Signal Analysis (40pt)#

We learned that any periodic function can be written using a Fourier series. The expansion we wrote is:

\[f(t) = \dfrac{a_0}{2} + \sum_{n=1}^{\infty} \left( a_n \cos(n\omega t) + b_n \sin(n\omega t) \right).\]

where \(\omega = 2\pi/T\) and \(T\) is the period of the function. The coefficients \(a_n\) and \(b_n\) are given by:

\[a_n = \dfrac{2}{T} \int_{-T/2}^{T/2} f(t) \cos(n\omega t) dt, \quad b_n = \dfrac{2}{T} \int_{-T/2}^{T/2} f(t) \sin(n\omega t) dt.\]

For this part of the midterm you will analyze a triangular wave both analytically and numerically.

Consider the following triangular wave:

\[\begin{split}f(t) = \begin{cases} 1 - 2t & 0 \leq t < 1/2 \\ 2t - 1 & 1/2 \leq t < 1 \end{cases}\end{split}\]

which repeats every \(T = 1\).

  1. (5 pt) Plot the triangular wave. What is the frequency of the wave? Show this on the plot.

  2. (15 pt) Determine the Fourier coefficients \(a_n\) and \(b_n\) for the triangular wave. This should be done analytically.

  3. (10 pt) What is the expression for the approximation of the triangular wave using the first few terms of the Fourier series?

  4. (10 pt) Plot the Fourier series for the first few terms. How many terms do you need to get a good approximation of the triangular wave? Do you notice any problems with the Fourier series? If so, what are they?