Challenge

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.

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

The reference signal is shown in the following figure.

1. A spring mass damper system is representing by the following differential equation

2. In s-domain the differential equation is

3. In transfer function form the spring mass damper system is

4. Considering the second-order standard tranfer function form

5. The transfer function is

where

6. Setting the parameters for the spring mass damper system, then obtaining the poles and control gain matrix K, we obtain the Kp and Kd parameters (run springMassDamper_position_ctrl.m)

7. Building the simulink model for the transfer function of the spring mass damper system (run Project_PositionControl_of_MassSpringDamperSystem.mdl simulink model)

Where the Pulse ref2 block is set to

8. Then the response for the reference signal is

9. Comparing the reference signal with spring mass damper system response

10. Now implementing the PID controller using the Kp and Kd obtained before and setting the Ki manually at 500 the model is

11. Then the response of the spring mass damper system compare to reference signal is

Conclusions

  • The transfer function responses in the same way that implementing the differential equation directly.
  • The transfer function response clearly is not capable to track the signal input because its magnitud is 10e-3 times minor.
  • It is possible implement a PID controller to improve the response of the system by determing first the Kp and Kd parameters using the pole placement method and then tunning manually the Ki parameter.
  • After implementing the PID controller, the response of the system improve notably and is capable to track reference input.
  • For this PID implementation, the settling time is around 2.5segs.
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.