I am trying to model a simple mass-spring oscillator in Simulink and using a fixed-step discrete solver. The system is modeled using two in-series discrete-time integrator blocks. I initialize the downstream integrator with a value to represent an initial displacement delta from neutral. I expect the system to oscillate indefinitely with the natural frequency.
I get the result I expect if I set the integrator method to "Integration:Trapezoidal" in the discrete-time integrator blocks. However, if I set this parameter to "Integration: Backward Euler" the oscillation rapidly dampens out. If I set this parameter to "Integration: Forward Euler" the oscillation rapidly diverges.
Why are the results inconsistent between the three integration schemes and what causes algebraic loop warnings when employing the 'Backward Euler' or 'Trapezoidal' schemes?
Best Answer