Challenge

Project - Position control of mass spring damper system

[NOTE : HERE I SHOULD BE WHAT I AM UNDERSTAND THE CONCEPT THAT'S MENTION AND MORE OVER DETAILS REFERENCE ADDED FROM BASED ON ONLINE REFERENCE ARTICULES ATTACHED FOR MORE CLARIFICATION]

QUESTION :

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

ANSWER :

ANSWER I SPLITTED TO 2 TYPES BASED ON BELOW LIKE,

 UNDER DAMEPED SYSTEM Z= 0.5

 MORE DAMPED BEHAVIOUR SYSTEM Z = 0.9

AIM :

To 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

Mass Spring Damper System

Transfer function and state space model are developed for system shown below.

(input) f(t) = external force applied on mass  
(output) z(t) = position unknown
  m = mass  
  k = spring constant  
  b = damping coefficient  

Differential Equation

1 unknown so 1 equation is needed.

Newton's 2nd law:

(eq. 1)

Transfer Function

Laplace transform (eq. 1):

Solve for Z(s)/F(s):

(solution)

Block Diagram

State Space Model

When there is a mass in a system, its position and velocity are commonly chosen as state variables. Also, position, velocity, and force (input) are sufficient to determine this system's future position (output). For these reasons, position and velocity are chosen as state variables.

State vector:

Input vector:

Output vector:

Rewrite (eq. 1) in these new notations:

Rearrange equations to express ẋ(t) and y(t) in terms of x(t) and u(t):

Organize into matrix format:

(solution)
Based on the artical we take transfer function equation in matlab script file.
 
UNDER DAMEPED SYSTEM Zeta= 0.5 :
 
MATLAB FILE :
 
clear all;
clc;
m=3.6; %kg
c=100; %Ns/m
k=400; %N/m
fn = 1; %frequency unit is Hz
wn=sqrt(k/m); %angular (rotational) speed unit is rad/s
wn2=wn^2;
% consider a spring mass under damper system with zeta = 0.5 and frequency = 1 Hz
zeta=0.5;
�nd B matrix
A=[0 1;-k/m -c/m];
B=[0 ;1/m];
�sireed poles
p1=-zeta*wn+wn*sqrt(zeta^2-1);
p2=-zeta*wn-wn*sqrt(zeta^2-1);
P=[p1;p2]
% pole placement design
K=place(A,B,P)
Kp=K(1);
Kd=K(2);
Ki=750;
 
 
 

SIMULINK :

USED BLOCK DETAILS :

 Scope - Display signals generated during simulation

The Simulink Scope block and DSP System Toolbox Time Scope block display time domain signals.

Add - Add or subtract inputs

The Sum block performs addition or subtraction on its inputs.

Add, Subtract, Sum of Elements, Sum :

The Sum block performs addition or subtraction on its inputs. The Add, Subtract, Sum of Elements, and Sum blocks are identical blocks. This block can add or subtract scalar, vector, or matrix inputs. It can also collapse the elements of a signal and perform a summation.Add or subtract inputs

Integrator - Integrate signal

The Integrator block outputs the value of the integral of its input signal with respect to time.

Gain - Multiply input by constant

The Gain block multiplies the input by a constant value (gain).The input and the gain can each be a scalar, vector, or matrix.

You specify the value of gain in the Gain parameter. The Multiplication parameter lets you specify element-wise or matrix multiplication. For matrix multiplication, this parameter also lets you indicate the order of the multiplicands.

Gain is converted from doubles to the data type specified in the block mask offline using round-to-nearest and saturation. The input and gain are then multiplied, and the result is converted to the output data type using the specified rounding and overflow modes.

Integrator :
Integrate signal.The Integrator block outputs the value of the integral of its input signal with respect to time.If the integrator limits its output (see Limiting the Integral), the initial condition must fall inside the integrator's saturation limits. If the initial condition is outside the block saturation limits, the block displays an error message.

Pulse Generator
Generate square wave pulses at regular intervals.The Pulse Generator block generates square wave pulses at regular intervals. The block waveform parameters, Amplitude, Pulse Width, Period, and Phase delay, determine the shape of the output waveform. The following diagram shows how each parameter affects the waveform.

UNDER DAMEPED SYSTEM Z= 0.5 :

here 

 PULSE GENERATOR give reference input add to using sum block.proportional gain Kp[K(1)] get from ouput of sum block.derivative gain Kd[K(2)] derivate using devative block value get from sum block integrative gain Ki integrate using ingrator block value get from sum block.Kp,Kd,Ki gain output value add to sum 1 block.output of sum1 block value to transfer based formula[1/(m.s^2+c.s+k)] using tramsfer fcn block in this output value give to scope block and also pulse generator input directly connect with scope

PULSE GENERATOR INPUT :

 

once simulink built than configuraion to 

TRANSFER FUNCTION :

PROPORTION GAIN Kp :

DERIVATIVE GAIN Kd :

INTEGRATIVE GAIN ki :

once configuration finish save and run the simulink file check the ouput result in scope

OUTPUT RESULT :

zeta = 0.5

STOP TIME = 30 SEC

SCOPE :

 

Based on the artical we take transfer function equation in matlab script file.
 
MORE DAMEPED SYSTEM BEHAVIOUR Zeta= 0.9 :
 
MATLAB FILE :
 
clear all;
clc;
m=3.6; %kg
c=100; %Ns/m
k=400; %N/m
fn = 1; %frequency unit is Hz
wn=sqrt(k/m); %angular (rotational) speed unit is rad/s
wn2=wn^2;
% consider a spring mass More damper system with zeta = 0.9 and frequency = 1 Hz
zeta=0.9;
�nd B matrix
A=[0 1;-k/m -c/m];
B=[0 ;1/m];
�sireed poles
p1=-zeta*wn+wn*sqrt(zeta^2-1);
p2=-zeta*wn-wn*sqrt(zeta^2-1);
P=[p1;p2]
% pole placement design
K=place(A,B,P)
Kp=K(1);
Kd=K(2);
Ki=750;
 
 

SIMULINK :

USED BLOCK DETAILS :

 Scope - Display signals generated during simulation

The Simulink Scope block and DSP System Toolbox Time Scope block display time domain signals.

Add - Add or subtract inputs

The Sum block performs addition or subtraction on its inputs.

Add, Subtract, Sum of Elements, Sum :

The Sum block performs addition or subtraction on its inputs. The Add, Subtract, Sum of Elements, and Sum blocks are identical blocks. This block can add or subtract scalar, vector, or matrix inputs. It can also collapse the elements of a signal and perform a summation.Add or subtract inputs

Integrator - Integrate signal

The Integrator block outputs the value of the integral of its input signal with respect to time.

Gain - Multiply input by constant

The Gain block multiplies the input by a constant value (gain).The input and the gain can each be a scalar, vector, or matrix.

You specify the value of gain in the Gain parameter. The Multiplication parameter lets you specify element-wise or matrix multiplication. For matrix multiplication, this parameter also lets you indicate the order of the multiplicands.

Gain is converted from doubles to the data type specified in the block mask offline using round-to-nearest and saturation. The input and gain are then multiplied, and the result is converted to the output data type using the specified rounding and overflow modes.

Integrator :
Integrate signal.The Integrator block outputs the value of the integral of its input signal with respect to time.If the integrator limits its output (see Limiting the Integral), the initial condition must fall inside the integrator's saturation limits. If the initial condition is outside the block saturation limits, the block displays an error message.

Pulse Generator
Generate square wave pulses at regular intervals.The Pulse Generator block generates square wave pulses at regular intervals. The block waveform parameters, Amplitude, Pulse Width, Period, and Phase delay, determine the shape of the output waveform. The following diagram shows how each parameter affects the waveform.

MORE DAMEPED BEHAVIOUR SYSTEM Zeta= 0.9 :

here 

 PULSE GENERATOR give reference input add to using sum block.proportional gain Kp[K(1)] get from ouput of sum block.derivative gain Kd[K(2)] derivate using devative block value get from sum block integrative gain Ki integrate using ingrator block value get from sum block.Kp,Kd,Ki gain output value add to sum 1 block.output of sum1 block value to transfer based formula[1/(m.s^2+c.s+k)] using tramsfer fcn block in this output value give to scope block and also pulse generator input directly connect with scope

PULSE GENERATOR INPUT :

once simulink built than configuraion to 

TRANSFER FUNCTION :

PROPORTION GAIN Kp :

DERIVATIVE GAIN Kd :

INTEGRATIVE GAIN ki :

once configuration finish save and run the simulink file check the ouput result in scope

OUTPUT RESULT :

zeta = 0.9

STOP TIME = 30 SEC

SCOPE :

CONCLUSION :

To Simulink model like the one presented in the slides with feedback control gains.

        Re-design the control gain, K, for a ζ of 0.5(under damping system and 0.9(also called more damping behaviour) and analyze the response for a pulse reference signal.

answer and result file find and atteched to file

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.