Week 3
Question
1. The force on a cutting tool of a shaping machine varies over the length of cut as follows:
Distance (mm) 0 20 40 60 80 100
Force (kN) 60 72 65 53 44 50
Determine the work done as the tool moves through a distance of 100 mm.
2. Create two array data sets x = [22 3 55.6 9 12 10] and y = [5 31 95 56.3 77 61] from the command window. Create a Simulink model to implement equation z=3x2-5y+18 Store result values using To File block.
3. Go to Matlab Help. Type the keyword ‘Mass-Spring-Damper in Simulink and Simscape’. Open the model and solve the following problems:
- Derive the governing equation for the model
- Change the value of mass, damper, and spring for the Simscape model and plot the result. Change the value of Mass, displacement as x0=2 in the Simulink model, and plot the results.
- Make the response from Simscape and Simulink as two separate displays.
NOTE: If you are using Matlab R2021a above versions, kindly convert you to lower or equal to R2021a version and attach it in the submission.
Conversion: Save > Pervoius Version > Choose R2021A or lower version.
Grading Policy :
- Upload the supporting results as images or by any other means
- Write a detailed report
- Report attached as an image will lead to zero marks
- plagiarism is not tolerated
- upload Simulink files if needed through the google drive, any external links will not be accepted
Your Answers
Aim :-
- To write a program in MATLAB to calculate the work done by a cutting tool of a shaper in moving 100 mm.
- To compute the value of a function according to the values of arrays x and y typed in command window and use To File block to save the values.
- To analyse the model Mass-Spring –Damper in Simulink and Simscape and the given questions :
- Derive the equation of the model.
- Change the value of mass,spring and damper for the Simscape model and plot the results.
- Change the value of mass,displacement as x0 = 2 in Simulink model and plot the results.
- Make the response from Simulink and Simscape as two separate displays.
Governing Equations :-
- Work done by a Force on a mass when displaced by a distance x is given by the dot product of Force and Displacement vectors given by:
W= F∙d
2.The 2nd ODE of a Damped Vibrating Systen is given by:
m⋅d2xdt2+b⋅(dxdt)+k⋅x=0m⋅d2xdt2+b⋅(dxdt)+k⋅x=0
where m-Mass of the vibrating system
b-Damping Coefficient
k-Spring Stiffness
x-position,dx-displacement & t- time,dt-change in time
(d2xdt2)−a&(dxdt)−velocity(d2xdt2)-a&(dxdt)-velocity
Body :-
Model 1 :-

Workflow :-
- A repeating sequence input is chosen to show the variation of Force along the length of cut.
- To determine the work done by the tool over a length of 100 mm,an integrator block is used to integrate the Force values wrt their corresponding to displacement values.
Results:-

Model 2 :-

Workflow :-
- In order to form the function z = 3x^2 – 5y + 18 using Simulink blocks,first we need to break this function into three different terms.
- 1st term 3x^2,can be formed using two constant block using constant 3 and x and further squaring x and lastly multiplying them to get the required term.
- 2nd term and 3rd term is obtained using the same above method and atlast summing them up to get the required given equation.
- Results are stored using To File block and can be seen in the MATLAB workspace as z named variable.
Results:-

z values stored using To File block in MATLAB workspace :-

z values :-

Model 3 :-

1.Derivation of governing equation for the model:-

2.Result of the Simscape and Simulink model after changing the value of mass,damper and spring
Plot1:-

Plot 2:-
For seperating the plots into two separate displays,MUX operator should be removed and the input signal is directly given to scope block.
