Control System
Group:
10 | P a g e
2.1 Objective
To obtain the Transfer Function of system (differential) equation, Its State-Space Model, Its Block diagram
(Simulink model).
2.2 Equipment/Apparatus
2. Software: Matlab and Simulink
2.3 Conduct of Lab
4. Students are required to perform this experiment using the equipment provided.
5. Students are required to work in groups specified by lab engineers.
6. Students are advised to seek help from the course instructor, lab engineers, assigned teaching
assistants (TA) and lab attendants.
+ + =
Let suppose m=1, b=0.9, k=1; Then
+ 0.9 + =
Its Transfer Function is given as
( 2 + 0.9 + 1) () = 1 ()
() 1
= 2
() ( + 0.9 + 1)
11 | P a g e
This system is of second order. This means that the system involves two integrators. Let us define state
variables x1(t) and x2(t) as
2 () = ()
1 () = ()
Then we obtain
2 = = 1
1 = 0.9 1 2 +
The output of the Equation is
= 2
State Space is given as
= +
= +
1 0.9 1 1 1
[ ]=[ ][ ] + [ ]
2 1 0 2 0
1
= [0 1] [ ] + [0]
2
num=[1] %numerator
den=[1 0.9 1] %denominator
transf=tf(num,den) %transfer Function
[A,B,C,D]=tf2ss(num,den) % transfer function to State Space
step(transf) % Step response of the tf
12 | P a g e
2.4.3 Simulink Model
Following are the steps to make a Simulink model
13 | P a g e
2. Click on the button as shown in Figure 2-4 to create model or use File>New>Model or use
short key Ctrl + N
3. A new window will appear as show in Figure 2-5
4. Use the Simulink Library to Drag and Drop the block from it to the model window
5. Derivative and integrator will be available in Simulink>Continuous as in Figure 2-6 or you
can search it in search bar
6. Remaining blocks (Sum, Gain, Constant) can be seen in Commonly Used Blocks
7. Step and Scope are in Source and Sink respectively
8. Interlink the blocks (Click, Drag the line while clicking and move to second block leave the
click) as in Figure 2-7
14 | P a g e
Figure 2-8 Model in Simulink
Note: Change the Graph Colors. Go to parameters >Styles and change the properties as in Figure 2-10
15 | P a g e
2.5 Exercise
After doing the procedure in section 2.4 do the following exercise
16 | P a g e