However, after a Google search, it quickly became obvious that I had been practicing and even advocating for digital twin technology for nearly a decade. So now, I'd like to add some concrete math and code to the "Digital Twin" hype, I'll go through a simple pedagogical example that is based around a standard undergraduate mechanical engineering concept. All units will be in metric (because science).

The Jupyter Notebook, which I used to run the simulations and generate all the charts, can be found here.

Simplified Automotive Suspension (AKA Mass-Spring-Damper System)

The mass-spring-damper system above is governed by the following differential equation:

$$ m\ddot{x} + c\dot{x} + kx = c\dot{y} + ky $$

This result can be derived with some Physics 101 knowledge by building a free body diagram and substituting the forces into Newton's Second Law of Motion equation. Note that \(c\) represents the damper coefficient, and \(k\) represents the spring coefficient. If differential equations aren't your thing, the spring resistance changes with position of the mass/base while the damper resistance changes with velocity of the mass/base.

For this system, there are some other important equations and concepts that will become relevant. I won't go into their derivation, but you can find a fairly thorough example here.

Undamped Natural Frequency, \(\omega_n\)

This is the frequency at which the system will vibrate when disturbed if there is no damping. It can be calculated by the simple equation:

$$ \omega_n = \sqrt{\frac{k}{m}} $$

Damped Natural Frequency, \(\omega_d\)

This is the frequency at which the system will actually vibrate when disturbed.

$$ \omega_d = \omega_n \sqrt{1 - \zeta^2} $$

where \(\zeta\) is defined as the damping ratio, and is defined by the equation:

$$ \zeta = \frac{c}{2m\omega_n} $$

Solving these equations

There are many computational solvers for Ordinary Differential Equations. In this case, it was easy to reach for SciPy. Using the SciPy solver, for a single tuple of \(m\), \(c\), \(k\), the position of the mass over time when a car goes over a bump with a height \(y=0.1m\), looks like:

In addition, as \(k\)/\(c\) are varied, you can see that the frequency of oscillation and decay rate change respectively.

Designing an Automotive Suspension

Automotive engineer, Pat, works for a hot new automotive company, ALSET. Pat is helping to design a new luxury sedan that will turn the industry upside down because it will be built with "Digital Twin Technology." Pat is in charge of the suspension, and is under a time crunch, choosing the simplified model shown above.

Because Pat is working on a luxury sedan, Pat will design the suspension to be comfortable. This means that the design will target roughly \(1Hz\) oscillation frequency, which will decay to less than 5% of max displacement after 5 seconds. The target mass of the car is fixed at \(2400kg\) and is evenly distributed between all four wheels. This means each mass-spring-damper system will have a mass of \(\frac{2400kg}{4} = 600kg\). Using the given constraints and the modeling equations above, Pat can find a \(k\) and \(c\) that will theoretically yield the following curve when the car drives over a \(0.1m\) bump:

Pat's designs are put into the prototype, and everyone loves the way the car rides, but this is just step one of the digital twin process.