Challenge

Project - Position control of mass spring damper system

1) 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 follows a reference signal.

Take m = 3.6; %kg k = 400; %N/m c = 100; %Ns/m

The reference signal is shown in the following figure.

SOLUTION:

I am attaching the script file , matlab file and result for reference:

SCRIPT FILE:

clc;
close all;
m=3.6; % mass in kg
k=400; % %N/m
c=100;% NS/m
fn=1.0; % natural frequency
wn=2*pi*fn; % omega n
% A&B matrices
A=[0 1; -k/m -c/m];
B=[0; 1/m];
% zeta value
zeta=0.9;
% poles value
P1= -zeta*wn+wn*sqrt(zeta^2-1);
P2= -zeta*wn-wn*sqrt(zeta^2-1);
P=[P1 ; P2];
%Kp, Kd function
K=place(A, B, P);

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.