Plotting an Spring Damper system, with an MR damper.

조회 수: 4 (최근 30일)
Gidel
Gidel 2023년 8월 4일
답변: Sam Chak 2023년 8월 4일
Hello, I am trying to plot the solution to a second order spring damper system with and without an MR damper, to which a sinusodial force is unput to the whole system. The solution is through simulink. I have the simulink block diagram completed and I do get a graph from scope. My question is, what does the scope plots? whats the vertical and horizontal axis respectively?
Because now I need to plot three individual plots, force vs displacement, force vs velocity and force vs time. Thus I need to bring the scope data to the workspace. Thats why I want to know how to modify such data.

답변 (1개)

Sam Chak
Sam Chak 2023년 8월 4일
To log the data signals to workspace from the Simulink model, use the To Workspace block, as shown below.
Double-click the three blocks and specify the name for the corresponding variable that contains the logged data, and next, select the "Array" format for the data logged to the workspace.
Click the Gear icon to open the Configuration Parameters dialog box. In the Data Import/Export tab, uncheck the Single simulation output.
After runing the simulation, the signals d, f, v are logged in the Workspace. The Time signal (tout) is logged to the Workspace by default as shown in the Configuration Parameters dialog box above.
Now you plot them individually.
figure(1)
plot(tout, f)
figure(2)
plot(d, f)
figure(3)
plot(v, f)

카테고리

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

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by