Plotting an Spring Damper system, with an MR damper.

16 次查看(过去 30 天)
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 Systems 的更多信息

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by