Challenge

Project - Position control of mass spring damper system

Matlab script for initial condition


clear all

clc

%Basic parameters of the spring mass system
%mass,
m = 3.6; %kg
%spring constant,
k = 400;
%damping co-efficient,
c = 100; %Ns/m
Wn = k/m;
fn = Wn / (2*pi);
%Underdamped case
zeta = 0.99;
%poles
p1 = -zeta * Wn + Wn * sqrt(zeta^2-1);
p2 = -zeta * Wn - Wn * sqrt(zeta^2-1);
P = [p1;p2];
%A & B matrices
A = [0 1;-k/m c/m];
B = [0;1/m];
%Poles placement design
K = place (A,B,P);
Kp = K(1);
Kd = K(2);

Ki = 50;

Simulink Model



Transfer function



Result


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.