0

I'm making a dynamical system model in Simulink. It is a drop test on 2 springs. I want that after first drop the object will stop, so that in the accelaration graph there will be only 1 maximum. Am asking for a detailed answer. Thanks in advance.

The system to model

The system to model

Current acceleration Graph

Current acceleration Graph

Simulink model

Simulink model

I know the time of the first cycSimulink modelle, but I calculate it only in the end of the run. I understand that I can use Matlab function in Simulink, and maybe a Subsystem.

when_shock=(acc.Time(two_times(2))+acc.Time(two_times(1)))/2;

I need the accelatarion graph to have only one peak. Meaning only one drop accures, after which the object stops. The force where the arrow shoud be zero after force drop.

Phil Goddard
  • 10,571
  • 1
  • 16
  • 28
  • Your model is pretty messy, which makes it difficult to both understand and describe exactly what needs to be done. But the the first step would be for you to read the doc on the [Integrator](https://www.mathworks.com/help/simulink/slref/integrator.html) block, and in particular the sections on `Resetting the State` and `Creating Self-Resetting Integrators`. That's because you should really be holding the acceleration state at zero (after the first bounce), not just feeding a signal with value 0 into it. – Phil Goddard Apr 25 '19 at 21:09
  • I'm resetting the state of the first integral(acceleration). And if I have only one spring it work's great. But with 2 springs it gives me an error that I cannot resolve: Block diagram 'Model_with_base' contains 1 algebraic loop(s). TSimulink.BlockDiagram.getAlgebraicLoops('Model_02_with_base') or the command line Simulink debugger by typing sldebug('Model_02_with_base') in the MATLAB command window. To eliminate this message, set Algebraic loop to "none". And something about “discontinuity” Simplified model to understand my model is added: https://ibb.co/8s7LHFp – user128512 Apr 27 '19 at 17:05
  • Are you using the output of the integrator or its state-port? If the output then re-read the `Creating Self-Resetting Integrators` to see why you should be using the state-port instead. – Phil Goddard Apr 28 '19 at 04:20
  • Yeah, the state port solved the problem. Now I'm having an issue with the "initial condition". Is there a good resource except from Mathworks website? I would really like to see some more explanations and examples. Thanks a lot – user128512 May 01 '19 at 11:48
  • What do you mean by "having an issue"? – Phil Goddard May 01 '19 at 13:40
  • When I choose a condition that is not zero, the model goes insane and I can't understand why. – user128512 May 02 '19 at 14:04

0 Answers0