필터 지우기
필터 지우기

Simscape Integration leads to an error

조회 수: 2 (최근 30일)
muhammed said parlak
muhammed said parlak 2021년 9월 12일
답변: Dallas Perkins 2023년 10월 13일
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

답변 (1개)

Dallas Perkins
Dallas Perkins 2023년 10월 13일
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.

카테고리

Help CenterFile Exchange에서 Troubleshooting에 대해 자세히 알아보기

태그

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by