Skip to content

Analysis and simulation of a simple vibro-impact model developed in Go - principally as a learning exercise

License

Notifications You must be signed in to change notification settings

FelixDux/imposcg

Repository files navigation

Impact Oscillator

Overview

This project is an opportunity for me to practice some new (for me) programming techniques, while at the same time indulging in a bit of nostalgia by revisiting the research I did for my PhD. I have not kept up to date with developments in the field since I left academia in 1992, so nothing in this project is likely to contribute to current research. Instead my aim is to reproduce the programming aspects of the work I did then, but with the benefit of 3 decades of software engineering experience and using languages and technologies which were not available back then.

Mathematical Background

I completed my PhD in 1992 and have not followed academic developments since that time, so the work described here is probably outdated and makes no reference to more recent research.

Most of my thesis was devoted to a simple mathematical model comprising a forced harmonic oscillator whose motion is constrained by a hard obstacle, from which it rebounds instantaneously:

equation

equation

where equation

This can be nondimensionalised as follows:

equation

which gives:

equation

equation

where

equation

Because a coefficient of restitution of less than 1 is sufficient to introduce dissipation into the system, for most of my thesis I simplified further by setting the damping coefficient equation to zero, so that the problem reduces to:

equation

equation

The impact introduces a discontinuity into the system which makes it strongly nonlinear, so that it exhibits many of the complex behaviours associated with nonlinear dynamical systems.

The Impact Map

A Poincaré map is a useful way of reducing a continuous dynamical system to a discrete system with one fewer dimensions. In this case the form of the problem naturally induces a map - which we call the impact map - which takes the phase (time modulo the forcing period) and velocity at one impact to the phase and velocity at the next impact. What makes it interesting is that it does not strictly conform to the textbook definition of a Poincaré map, because when impacts occur with zero velocity the trajectory in phase space is tangential to the surface equation. At points which map to zero-velocity impacts, the impact map is not only discontinuous but singular. This underlies many of the complex dynamics which are observed for some parameter ranges.

The domain (and range) of the impact map, the impact surface, is geometrically an infinite half-cylinder, since the impact velocities range over equation, while the phase ranges over equation.

Periodic Orbits

Periodic motions can be classified by labelling them with two numbers, the number of impacts in a cycle and the number of forcing periods, so that a (m, n) orbit repeats itself after m impacts and n forcing cycles. The simplest of these are (1, n) orbits, which correspond to fixed points of the impact map. These can be extensively studied analytically and formulas can be obtained for the impact velocity Vn as the parameters equation, equation and r are varied.

This reveals that, as equation is varied while equation and r are held fixed, the Vn-response curve is an ellipse (or rather half an ellipse as negative Vn is of no interest), centred on the origin. As equation is varied, this ellipse rotates, so that its major axis is vertical for equation, is tilted into the negative equation quadrant (for positive Vn) for equation and into the positive equation quadrant for equation. In the tilted cases, the lower branch of the half-ellipse always corresponds to dynamically unstable orbits. The point where the upper and lower branches meet corresponds to a saddle-node or fold bifurcation. As we vary equation away from this point, the orbit corresponding to the upper branch will remain stable until either (i) it loses stability to a supercritical period-doubling bifurcation and is replaced by a (2, 2n) orbit or (ii) it is destroyed by the occurrence of an intervening impact, which makes the analytically-derived (1, n) orbit unphysical. Case (i) is typically the prelude to a period-doubling cascade of a kind familiar to anyone who has studied chaotic dynamical systems.

It turns out that, at least for small values of equation, forcing frequencies near the 'resonant' values equation are associated with comparatively simple dynamics dominated by globally attracting (1, n) orbits, while the intervening regions of parameter space are characterised by much more complex behaviour, including chaotic attractors and multiple competing periodic orbits.

'Grazing'

My supervisor, Chris Budd, coined the term 'grazing' for a kind of bifurcation in which a periodic orbit is destroyed by the occurrence of an intervening impact. At the bifurcation point, this intervening impact has zero velocity, hence the term 'grazing'. This phenomenon can be investigated in terms of the geometry of the impact map by studying the set S of impact points which map to a zero velocity impact. This has the form of a 'branched manifold', i.e. a set of curves of codimension 1 which branch off each other at various points. If one draws a line transverse to this manifold and observes how the image of the impact map equation varies as one moves along the line, one finds that, as one crosses S from one direction (the 'non-impact side') v1 drops discontinuously to zero, while as one approaches S from the other direction (the 'impact side') it drops continuously to zero but at a rate which equation as equation. This results in a strong local distortion of the phase flow. It also means that much of the local dynamics can be understood by reference to a one-dimensional map.

The occurrence of intervening low-velocity impacts combined with the fact that, on the non-impact side, the dynamics continues to behave as if there were no intervening impact, helps to explain why for parameter values in the neighbourhood of a 'grazing' bifurcation of a stable (1, n) orbit, one often observes the appearance of competing (3, 3n) orbits.

A chapter of my thesis was devoted to a particularly striking instance of 'grazing', which occurs in the resonant case equation, which has certain simplifying features which make it particularly instructive.

'Sticking' and 'Chatter'

'Grazing' occurs when a point equation on the impact surface corresponds to a local maximum of the motion x(t). In general, there will also be a range of points equation for which the acceleration is positive and so the mass will be temporarily held motionless against the obstacle. If a low velocity impact occurs near this region, there will be an infinite sequence of low-velocity impacts converging in a finite time on a zero-velocity impact. This corresponds physically to a low-energy juddering of the mass against the obstacle. Our numerical simulation has to detect this behaviour and suitably truncate the infinite sequence. This behaviour can occur as part of a periodic orbit, in which case we label it equation.

References

Functionality

The software generates graphical plots of the following:

  • Scatter plots of iterated applications of the impact map for a given set of parameter values and initial conditions
  • Plots of the singularity set on the impact surface
  • Domain of attraction plots on the impact surface for competing equation, equation and chaotic orbits (be warned: these can take a long time to run - and are likely to timeout on AWS Lambda)

Various other interesting plots will come later, time permitting, including:

  • equation response curves for (1, n) orbits for a given values of equation and r, showing bifurcation points where orbits become dynamically unstable or unphysical (the latter established numerically)
  • Time series plots of x(t) for a given set of parameter values and initial conditions
  • The 'stroboscopic' Poincaré map, which samples the displacement and velocity at each forcing cycle
  • Plots of the velocity vs. the displacement
  • equation response curves for (1, n) orbits for fixed equation
  • Numerically-generated sensitivity/bifurcation plots

Architecture

The implementation is in Go and uses Gin to expose an HTTP API and to serve an SPA from the root endpoint, which acts as a front-end to the API. To illustrate its capability, it has been deployed on AWS lambda behind an AWS API Gateway. You can access the SPA here or, alternatively, you can try out the API endpoints here.

The AWS Lambda deployment was just to give me practice in basic AWS provisioning. Given sufficient time, I will investigate a distributed architecture in which large jobs (impact maps with > 5000 iterations, or domain of attraction plots with, say, a 200 equation 200 grid) will be chunked into separate Lambda calls (sequentially in the case of an impact map, in parallel in the case of a domain of attraction plot or a singularity set), each of which is small enough not to time out.

Installing and Running

If you have docker installed and are running in a bash environment, the simplest way to get started is to run docker-compose up.

If you prefer not to use docker, then you will need Go installed. With Go installed and on your path, run:

go run impact.oscillator.go

or

go build
./imposcg

The SPA can then be accessed at http://localhost:8080 and the API at http://localhost:8080/swagger/index.html.

About

Analysis and simulation of a simple vibro-impact model developed in Go - principally as a learning exercise

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published