- Create a new Simulink model and add a Mass block to the model. The Mass block represents the physical mass.
- Add two Integrator blocks to the model, and connect as sown in the fig.
- Add a Gain blocks to the model and set its gain to Damping coefficient and Spring coefficient.
- Add a Scope block to the model to visualize the displacement if necessary.
- To calculate the frequency and stiffness, you can add two more blocks: a Sine Wave block and a Transfer Function block. The Sine Wave block will generate a sinusoidal input signal with a specific frequency, and the Transfer Function block will calculate the system response.
- Configure the Transfer Function block to calculate the system response from the displacement to the input. You can use the transfer function of a spring-mass-damper system to calculate the frequency and stiffness.
Mass-Spring System Simulink
105 次查看(过去 30 天)
显示 更早的评论
I have a mass (x gram) with the following attributes:
Displacement(0) = u, velocity(0) = v, acceleration(0) = a.
I need to make a Block Diagram which could calculate the frequency, stiffness.
I have done these calculations already on paper but I don't know how I would simulate this on Simulink
Does anybody have a clue where to start / how to start?
Thank you for your attention.
0 个评论
回答(2 个)
Pratheek
2023-3-28
Hi Jochem,
I assume you need to calculate the stiffness and frequency of a spring mass system.
To simulate the sysyem in simulink for that you can follow these basic steps:
m reprent Mass in the fig.
These steps should give you a basic idea of how to create a Simulink model that simulates a mass with given attributes and calculates the frequency and stiffness. You may need to adjust the parameters and configurations of the blocks to match your calculations on paper.
Richard
2023-11-28
编辑:Richard
2023-11-28
Hello,
I think you should start by creating a new Simulink model. In Simulink, go to "File" and select "New" to create a new model.
Then, add blocks to the model:To simulate the mass, displacement, velocity, and acceleration, you will need to add appropriate blocks to the Simulink model. Here's a step-by-step guide:
a. Start by adding a "Constant" block from the Simulink Library Browser. Double-click on the block to open its parameters and set the value to the initial displacement "u" of the mass.
b. Add a "Derivative" block from the Simulink Library Browser. Connect the output of the "Constant" block to the input of the "Derivative" block. This block will calculate the velocity of the mass.
c. Similarly, add another "Derivative" block and connect it to the output of the first "Derivative" block. This will calculate the acceleration of the mass.
Next, calculate frequency and stiffness:To calculate the frequency and stiffness of the system, you will need to incorporate mathematical operations in your Simulink model. Here's how you can do it:
a. Add a "Gain" block from the Simulink Library Browser. Connect the output of the second "Derivative" block (acceleration) to the input of the "Gain" block.
b. Double-click on the "Gain" block to open its parameters. In the Gain Value field, enter the stiffness value you calculated on paper.
c. Add a "Transfer Fcn" block from the Simulink Library Browser. Connect the output of the "Gain" block to the input of the "Transfer Fcn" block.
d. Double-click on the "Transfer Fcn" block to open its parameters. In the "Transfer Fcn" tab, define the transfer function of your system using the appropriate coefficients and exponents.
e. Finally, add a "Frequency" block from the Simulink Library Browser. Connect the output of the "Transfer Fcn" block to the input of the "Frequency" block. This block will calculate the frequency of the system.
Finally, once you have completed the block diagram, save the model and run the simulation. Click on the "Run" button in the Simulink toolbar to start the simulation. You can observe the outputs and analyze the results.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 General Applications 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!