Project - Position control of mass spring damper system
Aim
Obtain the transfer function of a mass spring damper system and use it in the model,Add a PID controller to adjust the force on mass so that its position .
Model

A pulse generator block is used as a reference force input signal for the system. the transfer function block is used for the implementation of the mass spring damper system.the system drived equation in the laplace transform is used in the transfer function. the variables are defined same in the matlab script. the output of the transfer function is the displacement of the system.which is the fed back in the PID controller as an error signal after subtraction it from the reference signal.using a controller the system throw the best tracking response.
Pulse Generator
The parameters of the pulse generator
Amplitude=1
Period=10sec
Pulse width=50
PID Controller
The PID values are selected automatically for the best response through PID tuner.

PID Tuner
The tuned response of the PID Tuner. response time is increased manually we get the best outcome and the same response is upgraded for thr system using the update block option.

Scope Output
The scope output is the best tracking response of the system. it is achieved with the help of the PID controller with very small overshoot and undershoot of the signal can be seen.

Conclusion
finally we Obtain the transfer function of a mass spring damper system and used in the model and the PID controller to adjust the force on mass so that its position.