So, first of all hello👋 I'm new to this forum.

Concerning my question, the system I want to model is a somewhat slightly more complicated version of a two mass-spring-damper system (than treated in university).

The system is composed of two masses $m_1$, $m_2$ vertically connected with a bilinear spring $k_1$/$k_2$ ($k_1 \neq k_2$) and damper $d_1$/$d_2$ ($d_1 \neq d_2$). Furthermore, at the bottom another spring $k_{lg}$ and damper $d_{lg}$ are attached resembling the "landing gear".

The displacement of the two masses is denoted $x_1$ and $x_2$. Also, gravity $g$ is considered.

I modelled the spring damper forces as follows

$$ F_s = \begin{cases} k_1(x_2 - x_1), & \text{if $x_2 - x_1 \geq 0$} \\ k_2(x_2 - x_1), & \text{if $x_2 - x_1 < 0$} \end{cases} $$

$$ F_{s,lg} = \begin{cases} 0, &\text{if $x_2 \geq 0$} \\ k_{lg}x_2 &\text{if $x_2 < 0$} \end{cases} $$

After applying newton's law of momentum conservation, I got the following equation of motion

$$ m_1 \ddot{x}_1 = F_s + F_d + F_{input} - F_{g1} $$

$$ m_2 \ddot{x}_2 = -F_s - F_d + F_{s,lg} + F_{d,lg} - F_{g2} $$

Now, I implemented this dynamical system in MATLAB and wanted to simulate the behaviour to eventually do controller synthesis. However, the simulation fails. I'm not sure whether I did something wrong when modelling or if it's some other issue. So, I wanted to ask whether my approach was correct. I would also appreciate any hints and literature recommendations where similar problems are treated.

Another question I wanted to ask, when modelling the spring with a preload force. Does the equation change to

$$ F_s = \begin{cases} k_1(x_2 - x_1) + F_{s,pre}, & \text{if $x_2 - x_1 \geq 0$} \\ k_2(x_2 - x_1) + F_{s,pre}, & \text{if $x_2 - x_1 < 0$} \end{cases} $$


So, the generated spring force does not only depend on the difference $x_2 - x_1$, but also whether the spring is compressed (stiffness $k_1$) or tensioned (stiffness $k_2$).

Furthermore, I am unsure how to model a preload force. Imagine tightening the spring a bit with a bolted connection. So there's initial force in the spring which does not result in any movement of the spring (I don't know if I described this well enough). There might be a discontinuity in the function of the spring force (I am unsure about this).

Is this equation for such a spring force correct and how to extend this to consider also a preload force?

$$ F_s = \begin{cases} k_1(x_2 - x_1), & \text{if compressed} \\ k_2(x_2 - x_1), & \text{if tensioned} \end{cases} $$


I forgot to describe the landing gear. So, spring $k_{lg}$ and damper $d_{lg}$ connect mass $m_2$ to a massless landing skid. If $x_2 = 0$ the landing skid is contact with the ground and spring is in a neutral position (i.e. no spring force is induced in this position). In presence of gravity the spring is compressed in steady state before lift off. After lift off the skids are no longer in contact with the ground, thus there is also no tension force. I assume that the spring is sufficiently long that it will be never fully compressed, such that there is no normal ground force.

enter image description hereenter image description here

  • $\begingroup$ a spring is modeled as F=kx. Simply replace for a forcing function that you need. If you need a different function for different segments of time, just solve for each segment separately. $\endgroup$
    – Abel
    Mar 21 at 11:12
  • 1
    $\begingroup$ You need to switch to a numerical solution, there is no generic analytical solution for non linear springs, never mind dampers. Describing a system using differential equations is good for understanding the system, but the real world is full of systems that are driven by DEs that are unsolvable by classical means. I'd use Matlab/Octave/Julia/Scilab/Python or even Excel. ChatGPT can write the script, but needs a lot of coaching. $\endgroup$ Mar 21 at 21:11
  • $\begingroup$ I assume that by "non smooth spring" you mean a nonlinear spring. A nonlinear spring is one where $F \ne k x$. If this is the case, then edit your question to use the correct terminology, and give the function for the spring force vs. displacement. $\endgroup$
    – TimWescott
    Mar 23 at 16:04
  • $\begingroup$ @TimWescott thank you for your remark. What I meant with non smooth spring was actually a bilinear spring which is a nonlinearity. So, during tension the spring is way stiffer than during compression. Furthermore, I want to model also a preload in the spring. I'll edit my question. $\endgroup$ Mar 23 at 16:35
  • $\begingroup$ @GregLocock thank you for your response! My goal is indeed to solve this ODE numerically, but I am unsure whether I modelled it correctly to begin with it. $\endgroup$ Mar 23 at 16:50


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.