Spring Mass Damper

PID Control of Spring-Mass-Damper Model

You are now following this Submission

This simple example shows the application of P, I, D alone, and PI, PD, and PID controller to spring-mass-damper model.
Model Equation: mx'' + cx' + kx = F
where,
m = mass of block,
c = damping constant,
k = spring constant
and F is the applied force, x is the resulting displacement of the block
Transfer Function (Laplace Transform of model):
X(s)/F(s) = 1/(ms^2 + cs + k)

Cite As

Yajur Kumar (2026). Spring Mass Damper (https://www.mathworks.com/matlabcentral/fileexchange/64920-spring-mass-damper), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0