Azzera filtri
Azzera filtri

Simscape Integration leads to an error

2 visualizzazioni (ultimi 30 giorni)
muhammed said parlak
muhammed said parlak il 12 Set 2021
Risposto: Dallas Perkins il 13 Ott 2023
Hello guys,
I have modelled a mechanical system on SimScape to run an analyze in time domain and obtain the frequency response of it. I'd like to represent ground acceleration and since there is only ideal source for velocity I integrate the acceleration series. But unfortunately it results in wrong velocity series which starts from "0". When I change the initial condition, velocity series result in correct form but this time displacements of the mass get wrong. How can solve this problem?
g=0.5:0.001:1.5;
mdmax=nan(size(g));ddmax=nan(size(g));
for i=1:size(g,2)
freq =g (i);
amp = 1/-freq; b%initial condition parameter for the velocity time series.
data = sim('tmdmodel.slx');
data1 = flip(data.massdisp.Data);
data2 = flip(data.dampdisp.Data);
data3 = flip(data.gdisp.Data);
mdmax(i)= max(abs(data1(2:round(end/2))));
ddmax(i)= max(abs(data2(2:round(end/2))));
end

Risposte (1)

Dallas Perkins
Dallas Perkins il 13 Ott 2023
Hi Muhammed,
Correct, if you are integrating an acceleration input to get velocity you can set the "initial condition" parameter on the integrator block to control initial velocity.
Can you clarify how the resulting displacement is wrong? Generally this will be a function of the mass/spring/damper coefficients so you might need to vary those to get your expected displacement result.

Categorie

Scopri di più su Troubleshooting in Help Center e File Exchange

Tag

Prodotti


Release

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by