Simscape Integration leads to an error
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/736369/image.jpeg)
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
0 Kommentare
Antworten (1)
Dallas Perkins
am 13 Okt. 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.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Troubleshooting finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!