Project

Simulation of Shaping Machine Workdone, Equation Solver and Spring Mass Damper System comparision using SIMULINK

SIMULATION OF SHAPING MACHINE WORK DONE, EQUATION SOLVER AND SPRING MASS DAMPER SYSTEM COMPARISION USIG SIMULINK :-

AIM :-

To make a Simulink model for evaluating shaping machine work done, equation solver and spring mass damper system comparison.

PLATFORM USED :-

  1. Software – Simulink (MATLAB)

SYSTEM SPECIFICATIONS :-

  1. Manufacturer - DELL
  2. Model – Vostro 3478
  3. Operating System - Windows 10
  4. Processor - Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz 1.80GHz
  5. RAM – 8 GB

OBJECTIVES :-

  1. Generate a Simulink model for evaluating work done by a shaping machine.
  2. Generate a Simulink model to solve a given equation with multiple variables.
  3. Comparison of Spring Mass Damper system using Simulink and Simscape.

GENERATE A SIMULINK MODEL FOR EVALUATING WORK DONE BY A SHAPING MACHINE

INTRODUCTION :-

To evaluate the work done using the given parameters of a Shaping Machine Cutting Tool,

GOVERNING EQUATIONS :-

BLOCKS USED :-

  1. Repeating Signal Block – To send the distance and force values.
  2. Integration Block – To integrate both distance and force values for obtaining the work done value.
  3. Display Block – To view the work done value.
  4. Scope – To plot two different data sets for better understanding.

SIMULINK MODEL :-

SIGNAL BLOCK :-

FLOW PROCESS :-

  1. Initially the distance (mm) and force (KN) is inputted through Repeating Signal Block and also the graph is plotted for these values.
  2. Next both distance (mm) and force (KN) are integrated to evaluate the work done values.
  3. Finally, the work done and distance graph is plotted.

RESULT :-

DISTANCE vs FORCE,

DISTANCE vs WORKDONE,

From this graph we can conclude that the work done value is evaluated for all the data points and to verify we can compare the Simulink block display value as well as the above plot (Y-axis) value are same for the distance 100 mm.

GENERATE A SIMULINK MODEL TO SOLVE A GIVEN EQUATION WITH MULTIPLE VARIABLES

INTRODUCTION :-

To solve the following equation by inputting various values from array datasets as follows,

`z = 3x^2-5y+18`

BLOCKS USED :-

  1. Constant – To represent the values of ‘3, 5 & 18’.
  2. Subtract – For solving the equation.
  3. Square – For squaring the solved equation
  4. Product – To evaluate and generate the function output.
  5. Display – To show the evaluated value.
  6. To File – To save the evaluated values w.r.t time interval.

SIMULINK MODEL :-

PROCESS FLOW :-

  • Initially the array datasets to be inputted in the workspace for both ‘x’ and ‘y’ variables.
  • Next the first value from ‘x’ dataset will be taken and squared then multiplied by 3 to get the value of ‘`3x^2`’.
  • Then the first value from ‘y’ dataset will be taken and multiplied by 5 to get the value of ‘`5y`’.
  • Then the final equation is solved and the values are displayed.
  • Finally the saved values are stored in ‘Z_values.mat’ file.

VERIFICATION CALCULATION :-

Always the Simulink displays the last timer value evaluation for the equation.

So,

`x = 10 and y = 61`

Now,

`z = (3x^2)-5y+18`

`z = (3*(10)^2)-(5*61)+18`

`z = 300 – 305 + 18`

`z = 13`

RESULT :-

The equation for all the values from the dataset are solved and stored in ‘.mat’ format file. Here we ran the simulation 10 sec so we can conclude that the same value is obtained for many iterations of the simulation.

COMPARISON OF SPRING MASS DAMPER SYSTEM USING SIMULINK AND SIMSCAPE

THEORY :-

SIMULINK,

Simulink uses block diagram approach and the signal flow is unidirectional.

SIMSCAPE,

Simscape uses physical modelling approach (Real Time Environment). The signal flow is bi-directional between blocks.

BLOCKS USED :-

  1. Gain Block – To multiply with constant value to the input given
  2. Subtract – For solving the equation.
  3. Integrator block – To integrate the velocity and distance values
  4. Goto Block – To send the signal from any subsystem or in main model to any place
  5. From Block – To receive the sent signal from Goto Block
  6. Scope – To plot graph between two parameters
  7. Ideal Translational Motion Sensor Block – To sense the movement (velocity) of the system
  8. Damper, Spring, Mass Block – To model a spring mass damper system
  9. Mechanical Reference – To make sure that all the components are clamped to the ground
  10. Solver Configuration – It specifies the solver parameters before starting the simulation

SIMULINK & SIMSCAPE MODEL (ORIGINAL PARAMETERS) :-

FLOW PROCESS :-

  • The mass (m), spring constant (k), damping co-efficient (b) and spring displacement (x0 = 1) are inputted from the MATLAB workspace window.
  • Then the damping force is generated from the entered damping co-efficient (b) and velocity (`dx/dt`).

`F = bfrac{dx}{dt}`

  • Next the spring restoration force is generated by the entered spring constant (k) and the distance (x).

`F = kx`

  • Then both the forces are subtracted because it’s is in the opposite direction,

`F = - bfrac{dx}{dt} – kx`

  • Now acceleration is calculated,

`a = F/m`

`a = (- bfrac{dx}{dt} – kx)/m`

`a = m/s^2`

  • Then velocity is calculated by integrating,

`v = inta ds`

`v = int(m/s^2) ds`

`v = m/s (SI-Unit)`

Final Value, `v = dx/dt`

  • Again by integrating distance is calculated,

`d = intv ds`

`d = int(m/s) ds`

`d = m (SI-Unit)`

Final Value, `d = x`

  • This process continues according to the input value (b, k and m) provided by the user.
  • When the calculation is stopped the velocity results are plotted using scope for both Simulink and Simscape models.

RESULT :-

Here both the velocity of Simulink and Simscape are same because there is no change in any parameters in the system.

TASK I - DERIVATION OF GOVERNING EQUATION :-

In this model we are using Spring Mass Damper System with Simple Harmonic Motion.

From Newton’s Second Law of Motion,

Acceleration of an object is directly related to the net force and inversely to it’s mass,

`a = F/m`

`F = m/a`

The forces acting on the system are,

Force for movement,

The restoration force of spring i.e., returning to equilibrium position.

`F = - kx`

Resistive force for movement,

The damping force in the system.

`F = -cdx/dt`

Velocity,

It’s defined as the change is position of the object w.r.t time.

`a = (dv)/dt`

Now,

`a = (dv)/dt`

`a = (d/dt)*v`

`a = (d/dt)(dx/dt)`

`a = (d^2t)/(dt^2)`

WKT,

`F = m*a`

`F = m*(d^2t)/(dt^2)`

By equating,

`F = m*a`

`-kx-cdx/dt = m(d^2t)/(dt^2)`

`m(d^2t)/(dt^2)+ kx+ cdx/dt = 0`

TASK II – CHANGING THE PARAMETERS IN SIMULINK MODEL :-

The parameters being changed in the Simulink model are mass (m), Initial spring position (x0 = 2) and then plot the results.

ORIGINAL PARAMETERS CHANGED PARAMETERS

SIMULINK MODEL :-

RESULTS :-

The parameters were successfully changed and the results are obtained in the manner that the generated velocity is damped out.

TASK III – CHANGING THE PARAMETERS IN SIMSCAPE MODEL :-

The parameters being changed in the Simulink model are mass (m), damping co-efficient (b), spring cons and then plot the results.

ORIGINAL PARAMETERS CHANGED PARAMETERS

SIMSCAPE MODEL :-

Subsystem,

In this subsystem Ideal Translational Motion Sensor is used to read the velocity (motion) of the spring mass damper system.

RESULTS :-

The parameters were successfully changed and the results are obtained in the manner that the generated velocity is damped out.

SIMULINK MODEL :-

  1. Work Done, Equation Solver & Spring Mass Damping System

CONCLUSION :-

The work done by shaping machine, solving the equation with array dataset and comparing the spring mass damper system with Simulink and Simscape was completed successfully.

REFERENCES :-

  1. https://in.mathworks.com/help/physmod/simscape/examples/mass-spring-damper-in-simulink-and-simscape.html
  2. http://www.sharetechnote.com/html/DE_Modeling_Example_SpringMass.html
Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.