# Analyzing Open and Closed Loop Control Systems | Simulink Tutorial

#### Introduction

In control systems, we attempt to model complex physical systems using a series of mathematical tools. One such commonly used technique is the block diagram representation of a system. In this method, physical components of the corresponding systems are modelled with the aid of representative blocks connected orderly. Apart from this, various mathematical tools such as the Laplace Transform is used to analyse the response, stability, and other parameters of the systems.

In real life applications, most control systems are complex in nature, requiring many computations to analyse and study the system completely. In most situations, writing codes for such systems is also a tedious and time-consuming job. Contrary to conventional coding, MATLAB Simulink® provides much a simpler and user-friendly way to simulate, analyse and study any system with great accuracy.

#### Building an Open-loop System in MATLAB Simulink

The following tutorial will demonstrate how to use MATLAB Simulink to build a simple open loop system and analyse it.

1. Open MATLAB

(a) You can use the library icon on the screen to open the Simulink Library Browser as shown in the figure               below.

4. Drag and Drop Components using the Library

(a) After opening the library, GOTO Continuous, select the transfer function block, then drag it to the                    Simulink Model window, and place it.

5. Similarly add other blocks such as the step input block from the sources menu, the gain block, and the scope.

6. Set the values of transfer function and gain by double clicking on the respective blocks.

(a) Example: Double Click on transfer function block.

(b) Now change the numerator and denominator values by entering appropriate values.

7. Once the values have been loaded, simulate the system by clicking on the play button.

8. To observe the response of the systems, double click on the scope. A pop up window will appear to display the       output.

9. Vary the values of the transfer function, gain, or change the input in order to better analyse the system.

#### Building a closed-loop System in MATLAB Simulink

The following tutorial will demonstrate how to use MATLAB Simulink to build a simple closed loop system and analyse it.

1. Open MATLAB

2. Open New << Simulink model

(a) You can use the library icon on the screen to open the Simulink Library Browser as shown in the figure below.

4. Drag and Drop Components using the Library

(a) After opening the library, GOTO Continuous, select the transfer function block, then drag it to the Simulink Model window, and place it.

5. Add the SUM block, gain block, step input and scope.

6. Set the values of transfer function, gain, and the sign at the sum end by double clicking on each individual block.

7. Now simulate the system and observe the response.

8. Vary the values of different blocks and observe the response of any system.

9. The inputs to the system can also be changed.

(a) Using ramp input

(b) Using a user generated (custom) input with the help of the from workspace block

#### Conclusion

With this tutorial, we have seen how we can use MATLAB Simulink to build a control system model and analyse its response. We have seen how to analyse the response of system to standard response. In addition to standard response, we can also use custom input signals and then analyse the system for these signals.

##### Shivani Singh

A final year engineering student from Bharati Vidyapeeth's College of Engineering, New Delhi with great zeal and passion for writing and technology. I have great love for food, nature, reading and am a true Delhiite at heart !

### Recommended Posts

##### Test Post

17 Feb 2018 - Tutorial

##### Counters using conditionally executed subsystems | Simulink Tutorial

16 Feb 2018 - Simulink, Tutorial

##### Regulating drum boiler pressure

16 Feb 2018 - Simulink, Tutorial