Beruflich Dokumente
Kultur Dokumente
Introduction to Control Lab ----------------------------------------------------------------------------------------------------- 3 System --------------------------------------------------------------------------------------------------------------------------- 3 Electrical --------------------------------------------------------------------------------------------------------------------- 3 Mechanical ------------------------------------------------------------------------------------------------------------------ 3 Electromechanical --------------------------------------------------------------------------------------------------------- 3 Control Systems --------------------------------------------------------------------------------------------------------------- 3 1) Open Loop System ----------------------------------------------------------------------------------------------------- 4 2) Close Loop System ---------------------------------------------------------------------------------------------------- 4 Second order degree control system ------------------------------------------------------------------------------------- 5 Types of roots --------------------------------------------------------------------------------------------------------------- 5 Types of System Response --------------------------------------------------------------------------------------------- 5 Experiment # 1 -------------------------------------------------------------------------------------------------------------------- 7 MATLAB BASICS AND MATHEMATICAL MODELS OF SYSTEMS -------------------------------------------- 7 Objectives -------------------------------------------------------------------------------------------------------------------- 7 What is MATLAB? --------------------------------------------------------------------------------------------------------- 7 MATLAB Commands ------------------------------------------------------------------------------------------------------ 7 Questions -------------------------------------------------------------------------------------------------------------------- 8 Step response ------------------------------------------------------------------------------------------------------------- 12 Conclusions ---------------------------------------------------------------------------------------------------------------- 15 Experiment # 2 ------------------------------------------------------------------------------------------------------------------- 16 ANALOG CONTROL EQUIPMENT OVERVIEW ------------------------------------------------------------------ 16 Introduction ----------------------------------------------------------------------------------------------------------------- 16 MS15DC Module ---------------------------------------------------------------------------------------------------------- 16 Schematic Diagram ---------------------------------------------------------------------------------------------------- 16 The DC Motor System ------------------------------------------------------------------------------------------------- 16 The Plant Input ---------------------------------------------------------------------------------------------------------- 16 Velocity (or speed) output -------------------------------------------------------------------------------------------- 17 Position output ---------------------------------------------------------------------------------------------------------- 17 AS3 Command Potentiometer ----------------------------------------------------------------------------------------- 17 Virtual Instrumentation --------------------------------------------------------------------------------------------------- 17 CLIO Interface Module --------------------------------------------------------------------------------------------------- 18 Wiring of the system ------------------------------------------------------------------------------------------------------ 19 Measurements and Calculation---------------------------------------------------------------------------------------- 20
SADAT
Conclusion ------------------------------------------------------------------------------------------------------------------ 20 Experiment 3---------------------------------------------------------------------------------------------------------------------- 21 INTRODUCTION TO CONTROL SYSTEM ---------------------------------------------------------------------------- 21 Objective of Control Engineering -------------------------------------------------------------------------------------- 21
SADAT
Electrical
It has Resistances, Impedances, Inductances, Conductances, Capacitances, Reactances, Voltages, and Currents.
Mechanical
It has Torque or Rotation of shaft, gearing mechanism.
Electromechanical
It is a combination of both electrical and mechanical system.
Control Systems
Control systems are an integral part of modern society. Numerous applications are all around us e.g. Heat Ventilation Air Conditioner (HVAC), Geo Earth Satellites, and Self-guided Vehicle all of that performs the task which assigns to them. A control system consists of subsystems and processes which may be Controllers, Plant and Integrators. There are two major performance responses of the control systems 1) The Transient response 2) The Steady-state error
Figure No. 1 There are two types of Control Systems 1) Open Loop System 2) Close Loop System
SADAT
Figure No. 2
Figure No. 3
SADAT
Is Natural Frequency
Types of roots
There are four types of roots of second degree equation 1) 2) 3) 4) Real and distinct Real and imaginary Complex conjugate Real and unequal
SADAT
Figure No. 4
SADAT
Experiment # 1
MATLAB BASICS AND MATHEMATICAL MODELS OF SYSTEMS
Objectives
1. 2. 3. 4. 5. 6. 7. 8. Become familiar and competent in the use of MATLAB Learn to use the help system to study basic MATLAB commands and syntax To get familiar with the MATLAB working environment. To get familiar with how to declare and process matrices. To get familiar with simple plot commands. To learn how to define a polynomial, to find roots of a polynomial, to multiply two polynomials and to evaluate a polynomial at a value of the independent variable. To learn how to find the transfer function of a system and to compute the step response and impulse response of a system. To learn how to compute the transfer function from the block diagram of a system.
What is MATLAB?
MATLAB is both a programming language and software environment. It is a product of Math Works, Inc. It isa technical computing environment for high-performance numeric computation. It integrates numerical analysis, matrix computation and graphics in an easy to use environment - without using traditional programming. The name MATLAB stands for Matrix Laboratory.
MATLAB Commands
Symbol ^ * / + .^ Operation Exponentiation Multiplication: ab Division: a/b Addition: a+b Subtraction: a-b Array power. A.^B is the matrix with elements A(i,j) to the B(i,j) power element wise. A and B must have the same size, unless one of them is a scalar. Array multiplication. A.*B is the element-by-element product of the arrays A and B. A and B must have the same size, unless one of them is a scalar Array right division. A. / B is the matrix with elements A(i,j) / B(i,j). A and B must have the same size, unless one of them is a scalar. Array left division. A.\B is the matrix with elements B(i,j)/A(i,j) . A and B must have the same size, unless one of them is a scalar. Array transpose. A.' is the array transpose of A. For complex matrices, this does not involve conjugation. MATLAB a^b a*b a/b a+b a-b A.^B
.*
A.*B
./ .\ .'
SADAT
Questions
>>t = 0: 0.1: 1; Write all the value of t 0 0.1 0.2 0.3 returned by the MATLAB. 0.4 0.5 0.6 0.7 0.8 0.9 1
>>length (t)
What is the difference between size () and length ()? Length= 11 Length tells only the number of rows in the matrix or no. of elements in the vector while size tells the no. of rows and columns in the matrix or in the row Following statements are used to generate a sinusoidal function with 50Hz frequency. >>t = 0: 0.002: 0.04; >>y = sin (2*pi*50*t); >>plot (t, y); >>grid; >>xlabel (time (s)); >>ylabel (y); >>title (sin (2*pi*50*t)); The plot you will see is not smooth as it has only 10 values in one cycle. What you can do to have 100 values in one cycle? We increase the size of the t 0: 0.0002: 0.04
SADAT
>>t = 0: 0.0002: 0.04; >>y1 = sin (2*pi*50*t); >>y2 = sin (2*pi*50*t 2*pi/3); >>y3 = sin (2*pi*50*t + 2*pi/3); >>figure; >>hold; >>plot (t, y1, r); >>plot (t, y2, b); >>plot (t, y3, g); >>grid;
Graph No.1 y = e-at sin ( t) Write MATLAB statements to evaluate y for the following parameters. t=0 to 1s with an increment of 2 ms. Time constant () = 0.25s. Where = 1/a.
SADAT
Graph No. 2 Write three loop current equations for the following circuit.
I1
I3
SADAT
10
Write all the matrices required to calculate I1, I2 and I3 use Cramers rule. =8 I1 = 5 I2 = 10 I3 = 5
Writing the MATLAB command to calculate I1, I2 and I3 in the following space. A= [0 -1 -1; 10 2 -1; 0 -1 3] X=det (A) I1=X/ B= [3 0 -1; -1 10 -1; -1 0 3] Y=det (B) I2=Y/ C= [3 -1 0; -1 2 10; -1 -1 0] Z=det(C) I3=Z/ What are the values returned by the MATLAB? I1 = 5 I2 = 10 I3 = 5
A mass-spring-damper system. Figure No.5 Verify that the transfer function of the system shown above is G(s) = X(s)/F(s) = 1 / (Ms2 + Bs + K) = 1 / (s2 + s + 5) This transfer function can be defined as >>m = 1; k = 5; b = 1; >>num = [1]; den = [m b k];
SADAT 11
>>sys = tf (num, den); Num and den must be defined before using the transfer function tf. What is the characteristic equation of the system? S2 + S +5 Calculate the frequency of oscillations = n (1-2) from the characteristic equation. Use hand calculator or calculate using MATLAB in the calculator mode. Hint: General form of equation is s2+2ns+ n 2=0
=
f=
2.179rad/sec. 0.3469Hz.
Step response
Step response is the output of a system when step input is applied. In MATLAB, the step response can be plotted using step function as shown below. >>step (sys); Step response is shown in Figure 6. Calculate the frequency of oscillations from the step response
Step Response
From: U(1) 0.35
0.3
0.25
Amplitude
To: Y(1)
0.2
0.15
0.1
0.05
0 0 2 4 6 8 10 12
Time (sec.)
Step response of the system shown in Figure 5 Figure No. 6 . It should be n (1-2) you calculated earlier. The step response shown above terminates at 12s is generated as the MATLAB detects that the response is settled in a steady-state. The final time can be defined by the user as shown below where the step response is calculated for 20s.
SADAT
12
Graph No. 3 The impulse response can be plotted by using impulse function as >>impulse (sys)
Graph No. 4
SADAT
13
Graph No. 6
SADAT
Conclusions
After doing that experiment we recall the basic concepts of matlab vector using, the sampling and then the plotting of the waveforms. The one who use the matlab can easily find the impulse response and step response. Using matlab one can easily solve closed loop system and check their outputs properly before physically implementing the system.
SADAT
15
Experiment # 2
ANALOG CONTROL EQUIPMENT OVERVIEW
Introduction
Practical exercises are an integral part of the course and waveform displayed on the personal computer (PC) are used to illustrate parts of the course. A PC with (Virtual Control Laboratory) VCL and Control Laboratory Input/output (CLIO) interface is used to replace a number of different traditional instruments, eliminating the need for separate signal generator, oscilloscope, multi-meter or controller
MS15DC Module
Schematic Diagram
Figure No. 7
Position output
The output shaft carries a calibrated disc (degrees) and is coupled to a precision potentiometer which via appropriate signal conditioning, provides a DC voltage in the range of +5 volts according to the position of the output shaft.
Figure No.8
Virtual Instrumentation
Virtual instrumentation means a personal computer is being used in place of a number of conventions: instruments such as signal generator, oscilloscope, panel meter and a number of different types of controller. This software is use for closed loop as well as open loop system.
SADAT
17
Figure No. 9
SADAT
18
Figure No. 10
SADAT
19
Offset-Degrees at 0V 180o
Degrees at 1V 213
Table No.1
Conclusion
We have a work station attached with the CLIO which is attached with the computer, we can perform different experiments and read values and observe graphs without using digital meter or oscilloscope. We also generate signal without using signal generator. We have control externally (using potentiometer) or by using the software. This lab help us to understand the response of closed loop system.
SADAT
20
Experiment 3
INTRODUCTION TO CONTROL SYSTEM
Objective of Control Engineering
Control systems are all around us although they are not always obvious. In the domestic kitchen there are control systems in the washing machine (water-temperature, water level; drum speed, spin speed), refrigerator
SADAT
21