Sie sind auf Seite 1von 21

Table of Contents

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

Introduction to Control Lab


System
System is a combination of various devices. Following are some systems

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

1) Open Loop System


An open-loop controller, also called a non-feedback controller, is a type of controller that computes its input into a system using only the current state and its model of the system. A characteristic of the open-loop controller is that it does not use feedback to determine if its output has achieved the desired goal of the input. This means that the system does not observe the output of the processes that it is controlling. Consequently, a true open-loop system can not engage in machine learning and also cannot correct any errors that it could make. It also may not compensate for disturbances in the system. It is simpler in construction and easy to maintain, e.g. Water tank pump, Fan, Toaster etc.

Figure No. 2

2) Close Loop System


A type of control system that automatically changes the output based on the difference between the feedbacks signals to the input signal. The closed loop systems compensates for disturbances by measuring the error between input and the output using feedback control, and correcting the output. These systems have greater accuracy, less sensitive to noise, disturbances, and changes in the environment. Transient response and steady-state errors can be controlled conveniently. But they has complex circuitry and expensive, e.g. HVAC, Cruise control, Speed Motor Control, Guided missiles, Satellite tracking antenna etc.

Figure No. 3

SADAT

Second order degree control system


A second-order system exhibits a wide range of responses that must be analyzed and described. Whereas varying a first-order system's parameter simply changes the speed of the response, changes in the parameters of a second-order system can change the form of the response. For example, a secondorder system can display characteristics much like a first-order system or depending on component values, display damped or pure oscillations for its transient response. The second degree equation is

Where (Zeta) is damping ratio

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

Types of System Response


There are four types of system responses 1) 2) 3) 4) Over Damped Under Damped Undamped Critically Damped

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

./ .\ .'

A./B A.\B A.'

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

>>size (t) What is displayed by the MATLAB? Size= 1 11

>>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

The following statements are used to plot three-phase voltage at 50Hz.

>>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

f = 10Hz. Where = 2f.

t= 0: 0002: 1 y= exp (4*t).*(sin (2*pi*10*t))

Graph No. 2 Write three loop current equations for the following circuit.

I1

Loop-1: Loop-2: Loop-3:

I2 3I1 I3 I2=0 2I2-I1-I3=10 3I3-I2-I1=0

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

>>step (sys, 20);

Graph No. 3 The impulse response can be plotted by using impulse function as >>impulse (sys)

Graph No. 4

SADAT

13

Case-1: Eliminate spring

(k=0) while m=1 and b=1.

Graph No. 5 System is under-damped (b=0) while m=1 and k=5.

Case-2: Eliminate damping

Graph No. 6
SADAT

System has Oscillatory response


14

Case-3: Eliminate mass

(m=0) while b=1 and k=5.

Graph No. 7 System is Over-damped

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

The DC Motor System


A constant voltage applied to the dc motor produces a constant torque which with a constant load on the motor produces a constant motor speed. Tacho-generator is used to measure motor speed correctly. It is just another motor connected in a different way and produces a voltage proportional to the motor speed. The motor drives and o/p shaft via a 9:1 speed reduction two stage belt drive. This means that the o/p shaft rotates at 1/9th the speed of the motor shaft. The position of the o/p shaft can be seen on the calibrated dial on the front of the unit. A voltage proportional to o/p shaft position is produced by a potentiometer mounted on the rear of the o/p shaft. The voltage from this potentiometer is used in position control experiments.

The Plant Input


The 12V motor requires significantly more current than can be supplied by the drive signal therefore the MS15 module contains a power amplifier which allows the low power drive signal to modulate the high power supply to the motor. An input of +5v will produce maximum speed in the anticlockwise direction. The 4 mm socket for this input is the MOTOR DRIVE INPUT section of the module and is marked Vin .The analog drive input is only available when the not enable (E) line is grounded and the MOTOR DRIVE switch (upper switch at center bottom of the circuit board is in the VIN position.
SADAT 16

Velocity (or speed) output


The Tacho generator is connected to the output shaft and produced (after signal conditioning) a dc voltage in the range +5 volts proportional to the rotational velocity of the motor .this output provides the primary feedback of information for closed loop speed control applications and performs a secondary role in many positional applications. A positive voltage is produced with the output shaft rotating in anticlockwise direction.

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.

AS3 Command Potentiometer


The AS3 Command potentiometer is used to provide a manually generated input signal. It is calibrated in degree to correspond with the calibrated disc on the output shaft of the MS15 DC Motor Module. The unit gives a nominal output of +5.

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

CLIO Interface Module


The control laboratory input/output (CLIO) module is the interface between the analog voltages of the motor system and the digital numbers of the computer system.

Figure No. 9

SADAT

18

Wiring of the system

Figure No. 10

SADAT

19

Measurements and Calculation


File CA06PE01 Signal Generator Signal Level Offset Rate Reference DC Motor Brake Controller Open-loop DC-Level 50% 0% 10msec External 0 Plant MS 15 Analog Graph 1 Input 2 Position 4 Velocity Output potentiometer Command Potentiometer Display Graph ON ON ON Engage 180o

Offset-Degrees at 0V 180o

Degrees at 1V 213

Gain Kd degree / volt 213-180=33

Table No.1

Degrees = Kd * Vpos + Degree Offset = 33 * Vout + 180

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

Das könnte Ihnen auch gefallen