Control System design(Part-1)-Getting started with MATLAB

If coding is an art, are you smart? Will you be a part? presenting the chart

saravana annamalai
4 min readSep 23, 2020
image from Mathworks

MATLAB is an programming language that was created for the reason of doing Matrix computations. The Abbreviation of MATLAB is MATrix LABoratory”. MATLAB is the software product created by MATHWORKS. But now MATLAB has many features to support different things in engineering. By using MATLAB, we can design control systems, design a vehicle systems, can signal processing, image processing and so on.

Today we are going to see about how to use MATLAB for control system designing. This read will contain some basic commands in matlab for control systems.

Pre-requisites: basic knowledge in control system design.

#1. Transfer Function: Transfer function is the mathematical model of any system. Transfer Function is defined as the ratio of the output to the input. It is denoted by R(s)/C(s), where R(s) and C(s) is the output and input in frequency domain(Laplace) respectively.

For instances, our transfer function T=(s+1)/(s+1)(s+2)

here R(s)=(s+1) and C(s)=(s²+3s+2)

In matlab, instead of writing (s+1), we can easily give the place value of the equation, such as s+1 can be written as [1 1], where first one takes variable s and the rest remains same.

tf(num,denom) is the command used to declare transfer function in matlab. num is the numerator and denom is the denominator.

#2 Poles and Zeros:

Poles: In Transfer Function, Poles are the roots of the denominator which drives the transfer function to infinity.

In the above example, poles are -1 and -2. on substituting these values in the denominator of TF, it will leads to infinity.

Zeros: In Transfer Function, Zeros are the roots of the numerator which drives the transfer function to zero.

In the above example, zeros is -1. on substituting these values in the numerator of TF, it will leads to zero.

MATLAB code snippet to find zeros and poles:

The function zero(sys) will yield you a zeros of the system, where sys=Transfer function.

Pole(sys) will give you a respective poles of the given transfer function.

#3 Step Response:

Step response is the response generated by the system, when a step signal is given as a input.

Step signal: The condition for unit step is given above in the image. The Amplitude of signal is 1 when time, t>0 and 0 for t<0. The amplitude value is not defined at t=0. So we assume that the value of step at t=0 as 0.

So when this step signal is given to any transfer function, it will generate a response called “STEP RESPONSE”.

In MATLAB, we can plot a graph for the response. It can be done by

step(sys) is the function which yield you the step response of the system, sys is the Transfer function of the system.

the response for the above code snippet is given below:

These are some of the pre-defined functions which help you in doing stuffs easy. There are lots of methods and functions in MATLAB which make your work easy and also you can design your system at the short interval of time without any hard calculations. Thus we are at the end of part-1, see you in the next one, until then Enjoy Learning!!!.

--

--

saravana annamalai
saravana annamalai

Written by saravana annamalai

Hey Everyone, I'm Annamalai, here I take you to the journey of understanding the core behind the concepts and the adventure of programming.

No responses yet