
































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This is lab manual for Control Systems course provided by Dr. Anjum Khalil at Quaid-i-Azam University. It includes: Analyzing, Behavior, Order, System, Theory, State, Space, Simulating, Frequency, Response, Robot
Typology: Exercises
1 / 40
This page cannot be seen from the preview
Don't miss anything!

































Name of student: …………………………………………………………………..
Roll No: …..………………………………………………………………………..
Date of LAB: ………………………………………………………………………
Report submitted on: ….……………………………………………….…………..
Section: ….……………………………………………….………………………..
Marks obtained: …………………………
Control System Lab. Mohammad Ali Jinnah University, Islamabad.
Question no 1. A Linear System
a) A network structure of the form shown below is employed in a Neural Network architecture of ADALINE (Adaptive Linear Combiner).
w U
w2 Y U
w U
As shown, inputs from three different sensors are applied to the weights of the network and after being multiplied by the corresponding weights the inputs are summed together to produce the corresponding output Y. The system is described by the following set of linear equations Y=w1 U1 + w2U2 + w3*U Where the data set is as shown in the table below
U1 U2 U3 Y 2 3 4 6 1 2 3 8 5 6 4 9
Define a data matrix using the data given above and form a simple set of linear equations of the form
U*w=Y
Where U, w and Y are matrices.
b) Solve the set of linear equations by employing the inverse of U and using the Cramer Rule to find out the solution set for w (weights of the net).
w
Control System Lab. Mohammad Ali Jinnah University, Islamabad.
Over No
Runs in this over
Total score
Run average
Wickets in this over
Total no of wickets
Run rate required to win 1 2 3 4 5 6 7 8 9
This table should be returned in the form of a MATRIX for team A and B both. Of course the last column in the table would hold true only for team playing second.
Control System Lab. Mohammad Ali Jinnah University, Islamabad.
Name of student: …………………………………………………………………..
Roll No: …..………………………………………………………………………..
Date of LAB: ………………………………………………………………………
Report submitted on: ….……………………………………………….…………..
Section: ….……………………………………………….………………………..
Marks obtained: …………………………
Control System Lab. Mohammad Ali Jinnah University, Islamabad.
SIMULINK is a program for simulating dynamic systems. As an extension to MATLAB, SIMULINK adds many features specific to dynamic systems while retaining all of MATLAB’s general-purpose functionality. SIMULINK has two phases of use: model definition and model analysis. A typical session starts by either defining a model or retrieving a previously defined model, and then proceeds to analysis of that model. These two steps are often performed iteratively until the model achieves the desired behavior. To facilitate model definition, SIMULINK adds a new class of windows called block diagram windows. In these windows, models are created and edited principally by mouse driven commands. Part of mastering SIMULINK is to become familiar with the manipulation of model components within these windows. After you define a model, you can analyze it either by choosing options from the SIMULINK menus or by entering commands in MATLAB’s command window.
At the MATLAB prompt type >>simulink. This command displays a new window containing icons for the subsystem blocks that make up the standard library. These subsystems can be opened (by double-clicking) to produce the windows containing the prototype blocks to be copied into your models. Click on File and New, and then move the window to a comfortable position.
Open Sources, Sinks, Continuous, and Connections by double-clicking on the icon with the left mouse button. Move the windows to a comfortable position. Blocks can be copied from one window to another by dragging them from the original location to the new location by holding down the left mouse button. Assemble the following diagram in your working window. [e.g. Step Input -> Sources; Sum ->Math operations, Transfer Fcn -> Continuous; Scope -> Sinks ]
Control System Lab. Mohammad Ali Jinnah University, Islamabad.
Control System Lab. Mohammad Ali Jinnah University, Islamabad.
The above two figures shows Simulation 1 and Simulation 2 for the same system.
Simulation 1: The system which is usually represented by ‘G’ is shown as Integrator. Input to this system is a step function. In response to this input, the integrator’s output will be a Ramp. Another block, Gain, is attached in between the input and system. This gain will affect the output. Higher the value of this gain, more rapid will be the slope.
Simulation 2:
An advantage associated with this system is that it has faster response. As can be seen from the graph that the output is achieved in a less time due to faster response.
Control System Lab. Mohammad Ali Jinnah University, Islamabad.
An inverted pendulum is a physical device consisting in a cylindrical bar (usually of aluminum) free to oscillate around a fixed pivot. The pivot is mounted on a carriage, which in its turn can move on a horizontal direction. The carriage is driven by a motor, which can exert on it a variable force. The bar would naturally tend to fall down from the top vertical position, which is a position of equilibrium. The goal of the LAB position. This is possible by exerting a force on the carriage through the motor, which tends to contrast the 'free' pendulum dynamics. The correct force has to be calculated measuring the instant values of the horizontal position and the pendulum angle.
trivial) of a controlled system. Thus it is used in simulations and performance of different controllers (e.g. PID controllers, state space controllers, fuzzy controllers....).
On the Matlab Command Window, write “penddemo”.
An inverted pendulum is a physical device consisting in a bar (usually of aluminum) free to oscillate around a fixed pivot. The pivot is mounted on a carriage, which in its turn can move on a horizontal direction. The tor, which can exert on it a variable force. The bar would naturally tend to fall down from the top vertical position, which is a position of LAB is to stabilize the pendulum (bar) on the top vertical
s possible by exerting a force on the carriage through the motor, which tends to contrast the 'free' pendulum dynamics. The correct force has to be calculated measuring the instant values of the horizontal position and the pendulum angle.
The inverted pendulum is a traditional example (neither difficult nor trivial) of a controlled system. Thus it is used in simulations and LABs to show the performance of different controllers (e.g. PID controllers, state space controllers, fuzzy
On the Matlab Command Window, write “penddemo”.
An inverted pendulum is a physical device consisting in a bar (usually of aluminum) free to oscillate around a fixed pivot. The pivot is mounted on a carriage, which in its turn can move on a horizontal direction. The tor, which can exert on it a variable force. The bar would naturally tend to fall down from the top vertical position, which is a position of unsteady is to stabilize the pendulum (bar) on the top vertical
s possible by exerting a force on the carriage through the motor, which tends to contrast the 'free' pendulum dynamics. The correct force has to be calculated measuring the instant values of the horizontal position and the pendulum angle.
The inverted pendulum is a traditional example (neither difficult nor s to show the performance of different controllers (e.g. PID controllers, state space controllers, fuzzy
Control System Lab. Mohammad Ali Jinnah University, Islamabad.
Sum^ Controller^ System
o Is there any difference between the triangle and the pendulum?
Control System Lab. Mohammad Ali Jinnah University, Islamabad.
K Ki Steady-State Error
Control System Lab. Mohammad Ali Jinnah University, Islamabad.
Name of student: …………………………………………………………………..
Roll No: …..………………………………………………………………………..
Date of LAB: ………………………………………………………………………
Report submitted on: ….……………………………………………….…………..
Section: ….……………………………………………….………………………..
Marks obtained: …………………………
Control System Lab. Mohammad Ali Jinnah University, Islamabad.
Following is the equation of motion for an automobile.
v & +
Using this differential equation, we can find the transfer function of this cruise control.
U s
( )
( )
Now implement this transfer function using simulink and analyze its output. Use the values of m = 1580 kg , and b = 26 N.sec/m period of time. Its output will be quite similar to a car whose driver accelerates it for instance and then leaves the car to decelerate at its own speed. Also make use of the differential equation to make a second model of the same system using simulink. Compare the output of both the systems now. It should be same.
LAB # 3
Simulating a Cruise Control Model in Simulink.
Exercise: Suspension Model.
Following is the equation of motion for an automobile.
m
u v m
Using this differential equation, we can find the transfer function of this cruise control.
m
b
m s +
1
Now implement this transfer function using simulink and analyze its output. Use the b = 26 N.sec/m. Remember to give the input for a small period of time. Its output will be quite similar to a car whose driver accelerates it for instance and then leaves the car to decelerate at its own speed. Also make use of the differential equation to make a second model of the same system using simulink. Compare the output of both the systems now. It should be same.
Following is the equation of motion for an automobile.
Using this differential equation, we can find the transfer function of this cruise control.
Now implement this transfer function using simulink and analyze its output. Use the
. Remember to give the input for a small period of time. Its output will be quite similar to a car whose driver accelerates it for an
Also make use of the differential equation to make a second model of the same system using simulink. Compare the output of both the systems now. It should be same.
Control System Lab. Mohammad Ali Jinnah University, Islamabad.
Control System Lab. Mohammad Ali Jinnah University, Islamabad.
Following are the differential equations one cart.
M x x
M
& &
2 2
1
Which can be re-arranged as:
2
2 2
1
2 1
M s X X
M s X
Relating both the equations, use simulink to draw the desired mathematical model. Input to the system is ‘r’ and output should be ‘y’, to fulfill the transfer function given as:
Use the following values:
M 1 =10 kg M 2 =5 kg g=9.8 m/sec^2 μ =0.002 N.m/sec
k=
Following are the differential equations for the toy train moving in one direction with
x x M x
x x M x
&
&
1 2 2 2
1 2 1 1
μ
μ
1 2 2 2
1 2 1 1
X X M X
X X M X
Relating both the equations, use simulink to draw the desired mathematical model. system is ‘r’ and output should be ‘y’, to fulfill the transfer function given as:
for the toy train moving in one direction with
Relating both the equations, use simulink to draw the desired mathematical model. system is ‘r’ and output should be ‘y’, to fulfill the transfer function given as: