All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
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. Answer: How to implement the equations of mass-spring-damper in Matlab Simulink? Answer: The equation shown below is implemented in…
Somaraju Vijay Kumar
updated on 12 Jul 2023
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.
Answer:
How to implement the equations of mass-spring-damper in Matlab Simulink?
Answer:
The equation shown below is implemented in Simulink as follows
The obtained equations of the mass-spring-damper system can be rearranged to obtain the state space equations of the system. With consideration of initial condition zero,
Now by creating a matrix of variables obtained above,
The assumed solution is,
For the case d=0 means damping is zero (un damped)
For critically damped system
And for underdamped system
What is PID Controller?
A proportional-integral-derivative controller (PID controller or three-term controller) is a control loop mechanism employing feedback that is widely used in industrial control systems and a variety of other applications requiring continuously modulated control. The proportional integral derivative controller produces an output, which is the combination of the outputs of proportional, integral, and derivative controllers. The feedback from the plant whichever is a controllable parameter is given as input to the PID controller and the processed error is minimized to get the desired output if tuning of the parameter is done optimally. The mathematically PID controller can be defined by the following equation where e(t) is the error signal with respect to time, Kp, Ki and KD are PID constants.
Increasing the proportional gain () has the effect of proportionally increasing the control signal for the same level of error. The fact that the controller will "push" harder for a given level of error tends to cause the closed-loop system to react more quickly, but also to overshoot more. Another effect of increasing
is that it tends to reduce, but not eliminate, the steady-state error.
The addition of a derivative term to the controller () adds the ability of the controller to "anticipate" error. With simple proportional control, if
is fixed, the only way that the control will increase is if the error increases. With derivative control, the control signal can become large if the error begins sloping upward, even while the magnitude of the error is still relatively small. This anticipation tends to add damping to the system, thereby decreasing overshoot. The addition of a derivative term, however, has no effect on the steady-state error.
The addition of an integral term to the controller () tends to help reduce steady-state error. If there is a persistent, steady error, the integrator builds and builds, thereby increasing the control signal and driving the error down. A drawback of the integral term, however, is that it can make the system more sluggish (and oscillatory) since when the error signal changes sign, it may take a while for the integrator to "unwind."
The general effects of each controller parameter (,
,
) on a closed-loop system are summarized in the table below. Note, these guidelines hold in many cases, but not all. If you truly want to know the effect of tuning the individual gains, you will have to do more analysis, or will have to perform testing on the actual system.
Apply Laplace transform on both sides.
The parameter which is under control must have some properties or free from some properties such as rise time, settling time, overshoot and steady state error. The impact of PID parameters on such properties can be found in the below table.
Rise Time:
Rise time is defined as the time taken for a signal to cross from a specified low value to a specified high value. In analog and digital electronics, the specified lower value and specified higher value are 10% and 90% of the final or steady-state value. So, the rise time is typically defined as how long it takes for a signal to go from 10% to 90% of its final value.
Settling Time:
The settling time of a dynamic system is defined as the time required for the output to reach and steady within a given tolerance band. It is denoted as Ts. Settling time comprises propagation delay and time required to reach the region of its final value. It includes the time to recover the overload condition incorporated with slew and steady near to the tolerance band.
The tolerance band is a maximum allowable range in which the output can be settle. Generally, the tolerance bands are 2% or 5%.
Peak Over Shoot:
(MP) is defined as the deviation of the response at the peak time from the final value of the response. it is also called the maximum overshoot. We can write it as
Steady State Error:
Steady-state error is defined as the difference between the desired value and the actual value of a system output in the limit as time goes to infinity (i.e., when the response of the control system has reached steady-state).
Steady-state error is a property of the input/output response for a linear system. In general, a good control system will be one that has a low steady-state error.
Stability of the System
A system is stable if every bounded input yields a bounded output. We call this statement the bounded-input, bounded-output (BIBO) definition of stability.
The stability of a linear closed loop system can be determined from the locations of the closed loop poles in the s-plane.
The location of poles of the transfer function decides the stability of the system. Which is shown in the above figure for critically stable, unstable, and stable systems.
For our case, the transfer function is determined from the constants of motor and state space equations,
Simulink Modelling of Mass spring damper system modeling with PID Controller
configuration paremeters of project step time is 20sec and slover selection typeis fixed step
the solver settings are shown above
the reference speed is i am giving pluse generator input as shown below
Input pluse generatorgraph shown below
In above data is given for transfer function shown in the below
Take m = 3.6; %kg k = 400; %N/m c = 100; %Ns/m
In the sumlink control system PID Controller tuned and given parameter shown in below
output graph is shown in below and pid controller tuned pluse generator pid tuned in show
CONCLUSION: From the above results, we can infer that:
1. All values are displayed in the workspace and stored in the file z.mat
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Project - Position control of mass spring damper system
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. Answer: How to implement the equations of mass-spring-damper in Matlab Simulink? Answer: The equation shown below is implemented in…
12 Jul 2023 02:18 PM IST
Project 2
Using MATLAB/simulink and the drive cycle from the attached excel sheet, find- The max heat generation of the battery Answer : Given data Maxmium Heat = I^2 X Rt Current (I)=-0.896 Resistance = 2 mill ohm =0.002 ohm Time(t)= 2 mints= 120 sec Maxmium Heat = I^2 X Rt Maxmium Heat = -0.896^2…
05 Mar 2023 05:10 AM IST
Project 2
Using MATLAB/simulink and the drive cycle from the attached excel sheet, find- The max heat generation of the battery Answer : Given data Maxmium Heat = I^2 X Rt Current (I)=-0.896 Resistance = 0.5 mill ohm =0.002 ohm Time(t)= 2 mints= 120 sec Maxmium Heat = I^2 X Rt Maxmium Heat = (-0.896)…
04 Mar 2023 04:58 PM IST
Project 1
1. Design a battery pack for a car roughly 150 Kw with 120 V. Use 3500 mAh 3.6V nominal NMC chemistry cell. a. Design the battery pack configuration. Answer : Given data : Power(P)=150 Kw Voltage(V)=120 V Nominal Current(I)=3.5A Nominal Voltage(V)=3.6 V To find the Number of cell in series …
28 Feb 2023 05:05 PM IST
Related Courses
0 Hours of Content
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.