State space system gives incorrect plot
Mostra commenti meno recenti

I made a state space system which is displayed above. At first sight everything looks fine, but in reality that isn't the case. When I click on 'run' and I open the scope after the simulation is done, I get a weird result:

The blue graph which is shown in the image above should not have a maximum of such a high value. To put it in perspective: I am simulating a 3DOF mass-spring-damper model (of a car), the graph being wrong is 'x [m] 3'. With the value being over 4000, that would mean that the wheel of my car is moving more than 4000 meters, while the car is driving over a bump with a height of 0.12m.
The thing is, there is no fault in the matrices which are filled in in the state-space block. I have checked those like 6 times together with my teacher, who has a Master of Science title to his name. I suspect the problem to be within the settings of MATLAB/Simulink. My teacher told me it'd probably be a laptop-specific problem, as he stated I did not do anything wrong. Does anyone have an idea of what the problem might be?
If somebody in any case thinks there actually still is something wrong with the matrices, they are as following:

The matrices are defined by the following free-body schematic, I have used mb, kb etc instead of ms, ks etc and used mw, kw etc instead of mu, ku etc:

4 Commenti
Sam Chak
il 10 Dic 2023
Hi @Julian
If you would like us to check, please copy and paste the code that describes the state-space matrices above. Additionally, provide the input signal, preferably in a mathematical equation. Has your teacher ever suspected that the spike was caused by the Derivative block (du/dt)?
Furthermore, has your teacher verified whether the time-derivative of the input signal is correctly modeled? Providing the input signal allows us to gain insights for evaluating and determining the accuracy of the model.
Julian
il 11 Dic 2023
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su General Applications in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



