Spring Mass Damper

PID Control of Spring-Mass-Damper Model
1.4K Downloads
Updated 1 Nov 2017

View License

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 .

MATLAB Release Compatibility
Created with R2017b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
1.0.0.0