Sunteți pe pagina 1din 89

SREE NARAYANA GURUKULAM COLLEGE OF ENGINEERING

CONTROL SYSTEM LAB MANUAL

SEVENTH SEMESTER ELECTRICAL AND ELECTRONICS ENGINEERING

CONTROL SYSTEM LAB

List of experiments 1) 2) 3) 4) 5) 6) 7) 8) Transfer function of separately excited DC generator. Transfer function of armature controlled DC motor. Transfer function of field controlled DC motor. AC servo motor speed torque characteristics. DC position servo control system. Synchro transmitter and receiver characteristics. AC synchro differential generator. Use of MATLAB for simulating transfer functions, closed loop systems etc.

EXPERIMENT NO: 1 TRANSFER FUNCTION OF SEPARATELY EXCITED DC GENERATOR Aim: To obtain transfer function of separately excited generator using the formula
E (s) o E (s) f KgZo ( s ) [ Rg + sLg + Zo ( s )][ Rf + sLf ]

Apparatus required: Sl.no: 1 2 3 Theory: Transfer Function of separately excited DC generator is given by
KgZo ( s ) [ Rg + sLg + Zo ( s )][ Rf + sLf ]

Apparatus Voltmeter Ammeter Rheostat

specification 0-300V, MC 0-60V,MC 0-250V, MI 0-2A, MC 0-5A, MC 0-10A, MI 0-1000mA, MI 200, 1.5A

Quantity 1 1 1 2 1 1 1 2

E (s) o E (s) f

Where

Kg is generator constant Rg is generator resistance

Lg is the generator inductance Rf is field resistance Lf is field inductance

Procedure: Connections are made as shown in the motor-generator set circuit diagram. The motor is started using starter. The resistance of DC motor is kept in minimum position and generator field resistance in maximum position. The generator field is excited from a separated DC source ie from same supply as DC motor field. The rheostat of generator side is varied till the motor attains rated speed. Armature terminal is kept open. Field rheostat of generator is varied so that open circuit voltage varies. Now OCC is plotted for open circuit voltage Vs field current. Slope of OCC gives Kg. The armature resistance, field resistance, armature reactance, field reactance are measured. Substitute Kg, Rg, Lg, Rf, Lf in the given formula of transfer function.

Circuit Diagram

Observations Voltage (volts) If (A)

To find Rf

Voltmeter Reading (V)

Ammeter Reading (A)

Field Resistance Rf ()

To find Lf

Voltmeter Reading (V)

Ammeter Reading (A)

Field Inductance Zf ()

Xf = (Zf2-Rf2 ) To determine Ra

Voltmeter Reading (V)

Ammeter Reading (A)

Armature Resistance Ra ()

To determine La

Voltmeter Reading (V)

Ammeter Reading (A)

Armature Impedance Za ()

Xa = (Za2-Ra2 )

Result: Determined the transfer function of separately excited DC generator.

EXPERIMENT NO: 2

TRANSFER FUNCTION OF ARMATURE CONTROLLED DC MOTOR Aim: To determine transfer function of armature controlled DC motor by finding the following constants. (i) (ii) (iii) Back emf constant Kb Torque constant Kt Mechanical time constant Tm

Apparatus required:

Sl.no: 1 2

Apparatus Voltmeter

Ammeter 3 4 Rheostat DPDT switch

specification 0-300V, MC 0-30V,MC 0-125V, MI 0-2A, MC 0-5A, MC 0-10A, MC 0-10A, MI 50 , 5A 200, 1.5A ------

Quantity 1 1 1 2 1 1 1 2 1 1

Theory: Transfer Function of

Armature controlled DC motor is given by

W (s) o E (s) o

Kt / RaB s[(1 + sTa )(1 + sTb ) + KtKb / RaB ]

Where Kt is torque constant Ta is electrical time constant Tb is back emf time constant Kb is back emf constant Ra is armature resistance B is friction constant. Ta = La/Ra and Tm = Tb = J/B where La is armature inductance and J is moment of inertia. Also Kt=Kb. Procedure: Connections are done as shown in the first circuit diagram. The motor is switched on keeping DPDT switch in 1-1 position. The field rheostat (200, 1.5A) is kept in minimum position and the armature rheostat (50 , 5A) in maximum position. Also the rheostat connected to 2-2 position of the DPDT switch is kept in maximum position. (i) To find torque constant Kb: The armature rheostat is varied till rated speed (approximately 1400 rpm) is attained. Noted the value of If, which is to be kept constant. The corresponding Ia, V, N are also noted. The armature rheostat is varied and the corresponding Ia, V, N are also noted. Similarly 3 or 4 sets of readings are noted. Kb is calculated from the given formula. (ii) To find friction constant B: The armature rheostat is varied till motor speed attains a constant value, (1400 rpm). The field rheostat is varied and corresponding If, Ia, V are noted. Similarly 4 or 5 sets of readings are taken. Every time the armature rheostat is varied till it reaches 1400 rpm. B is calculated from

the graph given below. (iii) To find moment of inertia J: The armature rheostat is varied till motor speed attains a constant value, (1400 rpm). Noted the corresponding If1, Ia1, V1. The DPDT switch is switched on to 2-2 position. The time taken for the motor to reach 900 rpm (about 70% of rated speed) is noted. If2, Ia2, V2 are also noted at the very same second. The above procedure is repeated while the switch is brought from 1-1 position to open position. J is calculated from the calculation given below. Substituted all the values in the given formula of transfer function.

Circuit Diagram To find Kb, B, J

Observations To find Torque constant, Kb If = a constant value Sl:no: Voltage V (volts) Speed N (rpm) Ia (A) IaRa (Volts) Eb = VKb = Eb/ IaRa (2N/60) (volts) (volt/(rad/sec))

To find Friction constant, B N = a constant value Sl:no: Voltage V (volts) If (A) Ia (A) VIa (W) Ia2Ra (W) Ws = VIaIa2Ra (W)

To find Moment of imertia, J Excitation Mode Speed N (rpm) If (A) If1 = If2 = If1 = If2 = Ia (A) Ia1 = Ia2 = Ia1 = Ia2 = Voltage (V) V1 = V2 = V1 = V2 = Time (sec) t2 =

Switch 1-1 to N1 = 1400 switch 2-2 N2 = 900 Switch 1-1 to N1 = 1400 switch open N2 = 900

t1 =

To determine Ra

Voltmeter Reading (V)

Ammeter Reading (A)

Armature Resistance Ra ()

To determine La

Voltmeter Reading (V)

Ammeter Reading (A)

Armature Impedance Za ()

Xa = (Za2-Ra2 )

Calculations To find B

B = Y intercept/(2N/60)

To find J: Average of voltmeter reading during time t2= Vav= (V1+V2)/2 Average of ammeter reading during time t2= Iav= (Ia1+Ia2)/2 W = Vav Iav Power used to overcome the inertia of motor = W= Wt2/(t1-t2) W = (2/60)2JN (dN/dT) W = (2/60)2JN (N1-N2/t1-t2) In the above equation the only unknown is J which can be calculated.

Result: Determined the transfer function of armature controlled DC motor..

EXPERIMENT NO: 3 TRANSFER FUNCTION OF FIELD CONTROLLED DC MOTOR Aim: To determine transfer function of field controlled DC motor by finding the following constants. (i) (ii) (iii) Torque constant, Ktf Mechanical time constant, Tm Field time constant, Tf

Apparatus required: Sl.no: 1 Apparatus Voltmeter specification 0-250 V, MC 0-30 V, MC 2 3 Rheostat 4 DPDT switch 50, 5 A 200 , 1.5 A -----2 1 1 Ammeter 0-5 A, MC 0-1000mA, MI Quantity 1 1 3 1

Theory: Transfer Function of Field controlled DC motor is given by


O( s) V (s) f
K m s[(1 +sTf )(1 +sTm )]

Where Km is motor gain constant Ktf is torque constant Tf is field time constant Tm is mechanical time constant Kb is back emf constant Rf is field resistance B is friction constant Tf = Lf/Rf and Tm = Tb = J/B where Lf is field inductance and J is moment of inertia. Also Kt=Kb. Procedure: (i) To find torque constant, Ktf:

Connections are made as shown in figure. Keep switch in 1-1 position. Run machine at rated speed (1400 rpm) by varying armature rheostat. Initially field rheostat should be kept in minimum position and armature rheostat in maximum position. When it runs at rated speed note Ia. This is maintained constant. Take all meter readings at no load. Now load the motor slightly. Vary armature rheostat to obtain earlier value of Ia. Note various readings. Unload the motor and turn off supply. (ii) To find friction constant B:

Run the machine at rated speed by varying armature rheostat. The speed should be maintained constant. The DPDT switch should be in 1-1 position. Note all meter readings. Now vary the motor field rheostat slightly

so that If is a notable value. Adjust speed to 1400 rpm by varying armature rheostat. Take all the meter readings. Repeat for different values of If. Calculate power and plot graph with Ws along Y axis and If along X axis. Calculate B = Y intercept/(2N/60). (iii) To find moment of inertia J: The armature rheostat is varied till motor speed attains a constant value, (1400 rpm). Noted the corresponding If1, Ia1, V1. The DPDT switch is switched on to 2-2 position. The time taken for the motor to reach 900 rpm (about 70% of rated speed) is noted. If2, Ia2, V2 are also noted at the very same second. The above procedure is repeated while the switch is brought from 1-1 position to open position. J is calculated from the calculation given below. Substituted all the values in the given formula of transfer function.

Circuit Diagram To find Ktf Ia = a constant value

Observations To find Torque constant, Ktf Sl:no: Speed N (rpm) Voltage (volts) If (A) S1 (kg) S2 (kg) T = (S1S2)*R*9.8 (Nm) Ktf = T/If

No load Load

To find Friction constant, B N = a constant value

Sl:no:

Voltage V (volts)

If (A)

Ia (A)

VIa (W)

Ia2Ra (W)

Ws = VIaIa2Ra (W)

To find Moment of imertia, J Excitation Mode Speed N (rpm) If (A) If1 = If2 = If1 = If2 = Ia (A) Ia1 = Ia2 = Ia1 = Ia2 = Voltage (V) V1 = V2 = V1 = V2 = Time (sec) t2 =

Switch 1-1 to N1 = 1400 switch 2-2 N2 = 900 Switch 1-1 to N1 = 1400 switch open N2 = 900

t1 =

To determine Ra

Voltmeter Reading (V)

Ammeter Reading (A)

Armature Resistance Ra ()

To find Rf

Voltmeter Reading (V)

Ammeter Reading (A)

Field Resistance Rf ()

To find Lf

Voltmeter Reading (V)

Ammeter Reading (A)

Field Inductance Zf ()

Xf = (Zf2-Rf2 )

Calculations To find B

B = Y intercept/(2N/60)

To find J: Average of voltmeter reading during time t2= Vav= (V1+V2)/2 Average of ammeter reading during time t2= Iav= (Ia1+Ia2)/2 W = Vav Iav Power used to overcome the inertia of motor = W= Wt2/(t1-t2) W = (2/60)2JN (dN/dT) W = (2/60)2JN (N1-N2/t1-t2) In the above equation the only unknown is J which can be calculated. Result: Determined the transfer function of field controlled DC motor.

EXPERIMENT NO: 4 AC SERVO MOTOR SPEED TORQUE CHARACTERISTICS

Aim:

To study the speed- torque characteristics of AC servo motor.

Apparatus required:

Sl:no: 1

Apparatus Voltmeter

Specification 0-3V, MC

Quantity 1

Connecting chords

------

Theory: An AC servo motor is basically a two- phase induction motor except for special design features. Rotor of the servo motor is built with high resistance so that its X/R ratio is small which results in linear speed- torque characteristics. Moreover in AC servo motor, excitation voltage applied to stator windings should have a phase difference of 90.

Working: Stator windings are excited by voltages of equal rms magnitude and 90 phase difference. This results in currents I1 and I2 that are phase displaced by 90. These currents are having equal rms values. These currents give rise to a rotating magnetic field of constant magnitude. The rotating magnetic field sweeps over the rotor conductors. Voltages are induced in the rotor conductors. This circulates current in the short circuited rotor conductors and currents create rotor flux. Due to the interaction of the rotor and stator flux, a mechanical force is developed on the rotor and so rotor starts moving in same direction as rotating magnetic field. Speed- Torque curves: These have negative slope. When the control- phase voltage is zero, motor develops a decelerating torque and so motor stops. These curves show a large torque at zero speed. This is the requirement for a servo motor to provide rapid acceleration. The torque- speed curves are non-linear except in low speed region. Procedure: (i) (ii) (iii) (iv) Switch off the switches S1 and S2. Keep potentiometer P1 and P2 in fully anti clock wise direction. Connect the supply and switch on the unit. Switch on the AC servo motor by putting on switch S1. Let S2 be in the off position. Slowly increase P1 (speed control pot) so that the AC servo motor starts rotating. We may have to give higher voltages to start the AC servo motor then we may decrease the voltage for lower speed. (v) Connect Dc voltmeter across TP3 and record this back emf in the table 1 corresponding to the speed as indicated by the rpm meter. (The voltmeter reading will be negative because it is the back emf. It

is nothing but the output of a motor coupled to the AC servo motor. The AC servo motor rotates and hence the DC motor also rotates due to which back emf is generated.) (vi) Vary the speed of the AC servo motor as indicated by the potentiometer P1 in steps and record the corresponding back emf in table 1. (vii) Now switch on S2. Let S1 be also in the on position. Keep P2 (load control pot) in anti clock wise position and increase P1 to get maximum speed. Observe and record the current meter reading on the panel with respect to the corresponding speed. (viii) Slowly increase potentiometer P2 in steps and record speed and current meter reading in table 2. (ix) (x) Complete the table 2 and plot the speed Vs torque characteristics. Rewrite the back emf readings in table 2 from table 1. Choose 2 or 3 consecutive Eb readings from table 2 and their corresponding ammeter reading and rewritten in table 3. Calculate the torque for these for speeds 1100, 1200, 1300., 2000 rpm. Plot its speed- torque characteristics.

Observations: Table 1: Sl: No: 1 2 3 4 5 6 7 Speed N(rpm) Back emf (V)

Table 2:

Sl: No: 1 2 3 4 5 6 7

Ia (mA)

N (rpm)

Eb (from table 1) (V)

P = IaEb (W)

T= P*60/2N (Nm)

Table 3:

Sl: No:

Eb (from table 2) (V)

Ia (from table 2) (mA)

N (rpm) 1100 1200. . . . . 2000 1100 1200. . . . . 2000

T= P*60/2N (Nm)

Expected Graphs

Result: Studied and plotted speed- torque characteristics of an AC servomotor.

EXPERIMENT NO: 5 DC POSITION SERVO CONTROL SYSTEM Aim: To study DC position servo control system and to plot: (i) (ii) (iii) (iv) Deflection in master dial potentiometer in degrees Vs deflection of slave pointer in degrees. Input voltage Vs deflection in slave pointer in degrees. Gain versus settling time. Measure the dead zone of the given DC position servo control system.

Apparatus required:

Sl:no: 1 2

Apparatus Digital voltmeter Connecting chords

Quantity 1 1

Theory: The input is fed to error amplifier. Difference between the input voltage Vi and error voltage Vf is amplified. The output of this stage is positive (say). This voltage is power amplified. The output of power amplifier drives DC servo motor. The DC motor is mechanically coupled with variable of rebalance (feedback) pot. The motor drives feedback pots in such a way that feedback voltage equals input voltage. When feedback voltage equals input voltage difference between two voltages becomes

zero. This is the null point of system. Hence output change remains at high or low state and output of power amplifier would be 0 V which will make the motor stop. DC servo motor rotates in both directions depending upon voltage polarity applied to it. Also its speed is very high (5000 rpm) DC servo system has the following characteristics like fast response, high accuracy, high sensitivity, good repeatability, no drift, noise free, dead zone, hunting, linearity and resolution. Dead zone is defined as the zone in which when maximum input is applied, output does not respond. Servo system is a closed loop negative feedback control system. The master dial input (Vref) varies from 0 to 2.7 V corresponding to 0 to 270 respectively. This input is given to the non- inverting terminal of comparator (A1). The input to inverting terminal is the sum of zero adjust, span adjust, gain adjust and rebalance pot. The output of amplifier A1 will be either a high level or low level depending on the position of master dial with respect to position of motor. If the position of master dial is greater than motor position, output of A1 will be approximately 12 V, which in turn rotates motor in the clock wise direction by turning on corresponding transistor. The motor will rotate in counter clock wise direction if position of master dial is less than position of motor. If output of amplifier A1, by any change remains at high or low state, it may overheat the respective transistor, which in turn may damage motor. To avoid such damage to the motor, a power limiting circuit or killing circuit is incorporated, which under such circumstances limits the input to the base of transistors by limiting the input to about 50% of original value. Thus motor is saved from damaging. Procedure: (i) Connect shorting link at the input and also a digital voltmeter of 20 V range (DC) at the input terminals. Keep the gain pot (P4) in the midway position. (ii) Switch on the trainer kit.

(iii)

Adjust the master potentiometer to 0 and then switch on the motor. Adjust with zero adjust pot (P2) such that the slave pointer is also at 0.

(iv) (v) (vi)

Now adjust the master potentiometer to 270 and adjust the slave potentiometer also to 270 with the help of span adjust pot (P3). Now take down the reading for different positions of the pointer as in the observation table. Also note the corresponding input voltage from digital voltmeter.

(vii) Now increase span to maximum and repeat the experiment. (viii) Plot deflection in master potentiometer Vs deflection in slave potentiometer dial and also input voltage Vs deflection in slave pointer dial. To measure dead zone: Keep P4 at approximately 30% position. Also keep the master dial at 90 and looking at the slave dial move the master dial till, the slave dial starts moving. The distance in degrees for which the slave does not respond is dead zone. To plot gain Vs settling time graph: Keep P4 at 30% position ant the master and slave dial at 0. Rotate master dial from 0 to 270. Note the time taken for slave dial to reach 270 with the help of stop-watch. Repeat the above for different positions of P4 (40%, 50% .100%). The settling time decreases as gain increases.

Observations: Table 1:

Sl: No: 1 2 3 4 5

Deflection in master pot. Dial (degrees) 270 180 135 90 0

Deflection in slave pot. Dial (degrees)

Input voltage (V)

Table 2:

Sl: No: 1 2 3 4 5 6 7 8

Gain adjust (%) 30 40 50 60 70 80 90 100

Time (sec)

Expected Graphs

Result: Studied the DC position servo control system and plotted the graphs.

EXPERIMENT NO: 6 SYNCHRO TRANSMITTER AND RECEIVER CHARACTERISTICS Aim: To study sychro characteristics by plotting angular position Vs stator voltages and input angular position Vs output angular position. Apparatus required:

Sl:no: 1

Apparatus Voltmeter

Specification 0-125 V, MI

Quantity 1

Connecting chords

------

Theory: A synchro is an electromagnetic transducer commonly used to convert an angular position of shaft into an electrical signal. When the rotor of sychro transmitter is excited by AC voltage, rotor current flows and a magnetic field is produced. This induces an emf in stator coil. Effective induced voltage depends upon angular position of coil axis with respect to rotor axis. The generated emf of sychro transmitter is applied as input to stator coils of the control transformer. The rotor shaft is connected to load whose position has to be maintained at desired value. Depending on current position of rotor and the applied emf on stator, an emf is induced on rotor winding.

Procedure: EXP: 1 In this part of experiment because of transformer action the angular position of rotor of sychro transmitter is transferred into a unique set of stator voltages . (i) Connect power supply output to R1-R2 terminals of the transmitter with the help of cables provided. Do not inter connect S1, S2, S3 of transmitter to S1, S2, S3 of receiver. (ii) (iii) Switch on main supply for unit and transmitter rotor supply. Starting from zero position note down the voltage between stator winding terminal i.e.; Vs3s1, Vs1s2, Vs2s3 in sequential manner. Enter readings as in table 1 and plot a graph of angular position Vs stator voltages for all 3 phases.

EXP: 2 (i) (ii) (iii) (iv) (v) (vi) Connect power supply output to R1-R2 terminals of the transmitter and receiver. Short S1-S1, S2-S2 and S3-S3 windings of transmitter and receiver with the help of connecting chords. Switch on the supply unit. As the power is switched on transmitter and receiver shaft will come to the same position on the dial. Vary the shaft position of the transmitter and observe the corresponding change in the shaft position of the receiver. Repeat the above steps for different angles of the shaft of the transmitter and tabulate as in table 2.

Connection Diagram

Observations: Table 1: Sl:No: 1 2 3 4 5 6 7 8 9 10 11 12 Table 2: Sl:No: 1 2 3 4 5 6 7 8 9 10 11 12 Transmitter Receiver angular angular position in position in degrees degrees 0 30 60 . . . . . . . . 330 Rotor position in degrees 0 30 60 . . . . . . . . 330 Vs3s1 Vs1s2 Vs2s3

Result: Studied the synchro transmitter and receiver characteristics and plotted the angular position Vs stator voltage curve and also input angular position Vs output angular position.

EXPERIMENT NO: 7 AC SYNCHRO DIFFERENTIAL GENERATOR Aim: To plot an error graph when the differential synchro is connected for addition and subtraction. Apparatus required: Synchro transmitter and receiver unit, synchro differential generator and connecting chords. Theory: A synchro is an electromagnetic transducer commonly used to convert an angular position of shaft into an electrical signal. A differential sychro produces a shaft displacement which is equal to sum or difference between angular position of two other shafts. Differential synchros are designed to operate as either transmitter or receiver. Procedure: The synchro differential generator is to be used with the synchro transmitter and receiver unit. (i) The connection is to be done as shown in figure 1, i.e.; S1, S2, S3 of synchro transmitter to R1, R2, R3 of synchro differential generator and S1, S2, S3 of synchro differential generator to S1, S2, S3 of synchro receiver. Also connect power supply output to R1- R2 terminals of receiver and transmitter. Hold the shaft of transmitter at a constant position i.e.; 70. Keep the shaft of receiver at 0 position and note the corresponding position in differential generator. Vary the shaft of receiver to 20, 40340 and also note the corresponding position in differential generator. Plot the error graph between the two.

Then hold the shaft of differential generator at a constant position i.e.; 295. Vary the shaft of transmitter from 0, 20, 40340 and also note the corresponding shaft position of receiver (it will be approximately equal in magnitude but opposite in direction). Then plot the error graph. (ii) The connection is to be done as shown in figure 2 with only two changes from the above connection i.e.; S1 of differential generator is connected to S3 of receiver and S3 of differential generator to S1 of receiver.

Hold the transmitter shaft at 70 position. Vary shaft of receiver from 0, 20340 and note the corresponding shaft position of differential generator (it will be approximately equal in magnitude but opposite in direction). Then plot the error graph. Hold the differential generator at 295 position. Vary the shaft of transmitter from 0, 20..340 and note the corresponding position in the receiver. Plot the error graph.

Connection Diagram Differential Synchro connected for subtraction

Differential Synchro connected for addition

Observations: Differential synchro connected for subtraction: Transmitter position = 70 Differential generator angular position (degrees)

Receiver angular position (degrees) 0 20 40 . . . . . 340

Differential generator angular position = 295

Transmitter angular position (degrees) 0 20 40 . . . . . 340

Receiver angular position (degrees)

Differential synchro connected for addition: Transmitter position = 70 Differential generator angular position (degrees)

Receiver angular position (degrees) 0 20 40 . . . . . 340

Differential generator angular position = 295

Transmitter angular position (degrees) 0 20 40 . . . . . 340

Receiver angular position (degrees)

Expected Graphs Differential Synchro connected for subtraction

Differential Synchro connected for addition

Result: Plotted the error graphs when synchro differential generator is connected for addition and subtraction.

MATLAB MATLAB is a software package for high performance numerical computation and visualization. It provides an interactive environment with hundreds of built-in functions for technical computation, graphics and animation. It also provides easy extensibility with its own high level programming language. The name MATLAB stands for MATRIX LABORATORY. MAT Labs built-in functions provide excellent tools for linear algebra computations, data analysis, signal processing, optimization, numerical solutions of ODEs, quadrature and many other types of scientific computations. Most of these functions use state -of- the art algorithms. There are numerous functions for 2-D and 3-D graphics as well as for animation. Also for those who cannot do without their FORTRAN or C- codes, MATLAB even promises an external interface to run those programs from within MATLAB. There are also several optional Tool Boxes available from developers of MATLAB. These toll boxes are collections of functions written for special applications such as that of symbolic computation, image processing, statistics, control system design and neural network. The basic building block of MATLAB is the matrix. The fundamental data type is the array. Vectors, scalars, real matrices and complex matrices all are automatically handled as special cases of basic data type. BASICS OF MATLAB MATLAB WINDOWS: On all PCs, MATLAB works through three basic windows. (i) Command window: This is the main window. It is characterized by MATLAB command prompt >>. When you launch the application program, MATLAB puts you in this window. All commands, including those for running user written programs are typed in this window at the MATLAB prompt. Graphics window: The output of all graphics commands typed in the command window are flashed to the graphics or figure window, a separate gray window with (default) white back ground color. The user can create as many figure windows as the system memory will allow. Edit window: This is where you write, edit, create and save your own programs in files called M-files. You can use any text editor to carry out these tasks. On most systems, such as PCs and Macs MATLAB provides its own built-in editor.

(ii)

(iii)

ON-LINE HELP (i) (ii) On-line documentation: MATLAB provides on-line documentation for all its built-in functions and programming language constructs. Demo: MATLAB has a demonstration program that shows many of its features. The program includes a tutorial introduction that is worth trying. Type demo at the MATLAB prompt to invoke the demonstration program and follow the instructions on the screen. Input- output: MATLAB supports interactive computation, taking the input from the screen and flushing the output to the screen. In addition it can read input files and write output files. The following features hold good for all forms of input- output. (i) Data types: The fundamental data type in MATLAB is the array. It encompasses several distinct data objects, integers, doublers (real numbers) matrices, character strings, structures and cells. Dimensioning: It is automatic in MATLAB. No dimension statements are required for vectors or arrays. You can find the dimensions of an existing matrix or a vector with the size and length (for vectors only) commands. Output display: The output of every command is displayed on screen unless MATLAB is directed otherwise. A semicolon at the end of a command suppresses the screen output except for graphics and on- line help commands. Case sensitivity: MATLAB is case- sensitive i.e. it differentiates between lower case and upper case letters. Most MATLAB commands and built-in function calls are typed in lower case letters. You can turn case sensitivity on and off with case sensitive commands. Command history: MATLAB saves previously typed commands in a buffer. These commands can be recalled with up arrow key. This helps in editing previous commands. You can also recall a previous command by typing first few characters and then pressing up arrow key.

(iii)

(ii)

(iii)

(iv)

(v)

FILE TYPES MATLAB has three types of files for storing information. (i) M-files: These are standard ASCII files with an extension to file name. There are two types of these files: SCRIPT files and FUNCTION files. All built-in functions in MATLAB are M-files most of which reside on your computer in precompiled format. Some built-in functions are provided with source code in readable M-files so that they can be copied and modified. (ii) Mat files: These are binary files with a mat extension to file name. Mat files are created by MATLAB when you save the data with save command. The data is written in a special format that only MATLAB can read. Mat-files can be loaded into MATLAB with load command. (iii) Mex- files: These are MATLAB- callable FORTRAN and C- programs with a mex extension to file name.

EXPERIMENT NO: 8

ROOT LOCUS AND BODE PLOT Aim: To plot the root locus and bode plot of the system G(s) = K/ s(s+2)(s+3). Assume K= 20.

Functions used: (i) tf (): This function creates or converts transfer function. sys = tf(num, den) creates a continuous time transfer function sys with numerator num(s) and denominator den(s). The output is a transfer function of object. (ii) rlocus(G): Root locus of given transfer function G is obtained. (iii) bode(G): Bode plot of given transfer function G is obtained.

(iv) margin(G): Phase margin and gain margin of given transfer function G is obtained.

num=[0 0 0 20]; den=[1 10 16 0]; G=tf(num,den); bode(G); margin(G);

num=[0 0 0 20]; den=[1 10 16 0]; G=tf(num,den); rlocus(G)


Bode Diagram Gm = 18.1 dB (at 4 rad/sec) , Pm = 53.7 deg (at 1.09 rad/sec) 50

0 Magnitude (dB) Phase (deg)

-50

-100

-150 -90 -135 -180 -225 -270 10


-1

10

10

10

10

Frequency (rad/sec)

Root Locus 20

15

10

5 Imaginary Axis

-5

-10

-15

-20 -25

-20

-15

-10 Real Axis

-5

10

Result: The root locus and bode plot for the given system is plotted using MATLAB program.

EXPERIMENT NO: 9 STEP RESPONSE OF A SECOND ORDER SYSTEM Aim: To write a program to find step response of second order system Functions used: (i) plot(x,y): plots vector y versus vector x. If x or y is a matrix and vector is plotted verses rows or columns of matrix whichever line up. If x is a scalar and y is a vector length. gtext (string): Displays graphics window; puts up a cross hair and waits for a mouse button or keypad keys to be pressed. The cross hair can be positional with the mouse (or with an arrow key on some computers). Pressing a mouse button or any key writes the text on to graph at selected location. xlabel (text): Adds desired text besides x-axis on the current axis. ylabel (text): Adds the text to y axis. Zeta: Symbolic Riemann zeta function. Zeta(z) = sum((1/k)z,k,1,inf) Zeta(nz) = nth derivative of zeta(z)

(ii)

(iii) (iv) (v)

zeta=0.1; t=0:1:50; num=[0 0 1]; den=[1 2*zeta 1]; [y,x,t]=step(num,den,t); plot(t,y); gtext('zeta=0.1'); title('STEP RESPONSE OF SECOND ORDER SYSTEM WITH OMEGA n=1 and zeta=0.1'); xlabel ('time(s)'); ylabel ('response');
STEP RESPONSE OF SECOND ORDER SYSTEM WITH OMEGA n=1 and zeta=0.1 1.8 1.6 1.4 1.2 response 1 0.8 0.6 0.4 0.2 0 zeta=0.1

10

15

20

25 time(s)

30

35

40

45

50

Result: Step response of second order system is obtained.

EXPERIMENT NO: 10 PARTIAL FRACTION EXPANSION OF SYSTEM WITH MATLAB Aim: To find the partial fraction expansion of given system of transfer function Y(s)/U(s) = (2s3+5s2+3s+6)/(s3+6s2+11s+6) with MATLAB. Functions used: (i) residue (x,y): To find the residues of values contained in the matrix variables x/y. [r, p, k] = residue(num1, den1) finds the residue, poles and direct term of a partial fraction expansion of the ratio of two polynomials. tf2zp (x,y): To convert the transfer function form to zero pole form to find zeros and poles from x/y polynomial. printsys(): This function prints system in pretty format. printsys(num1, den1, s) prints transfer function as a ratio of two polynomials in transform variable s.

(ii)

(iii)

%PARTIAL FRACTION EXPANSION WITH MATLAB %y(s)/u(s)=(2s^3+5s^2+3s+6)/(s^3+6s^2+11s+6) num1=[2 5 3 6]; den1=[1 6 11 6]; %RESIDUES FROM NUMERATOR AND DENOMINATOR POLYNOMIALS [r,p,k]=residue(num1,den1) %NUM AND DEN POLYNOMIALS FROM RESIDUES [num1,den1]=residue(r,p,k) %TRANSFER FUNCTION FROM NUM AND DEN POLYNOMIALS printsys(num1,den1,'s') %FINDING POLES AND ZEROS FROM NUM AND DEN POLYNOMIALS [z,p,k]=tf2zp(num1,den1)

r= -6.0000 -4.0000 3.0000 p= -3.0000 -2.0000 -1.0000 k= 2 num1 = 2.0000 den1 = 1.0000 num/den = 2 s^3 + 5 s^2 + 3 s + 6 ----------------------s^3 + 6 s^2 + 11 s + 6 z= -2.3965 -0.0518 + 1.1177i -0.0518 - 1.1177i p= -3.0000 -2.0000 -1.0000 k= 2 Result: Partial fraction expansion is obtained by MATLAB programming.

5.0000

3.0000

6.0000 6.0000

6.0000 11.0000

EXPERIMENT NO: 11 TRANSFORMATION OF MATHEMATICAL MODEL Aim: To find the transformation of mathematical model. Given that the transfer function of system is: Y(s)/U(s) = s/(s+10)(s2+4s+16). Functions used: MATLAB has its own built in functions to convert one form to another. Here the conversion from transfer function to state space and vice versa are done by using following functions: (i) [ A B C D] = tf2ss(num, den): The numerator and denominator matrices that are in transfer function form is converted into state space and values are assigned in matrices A, B, C, D. [num, den]= ss2tf[A, B, C, D, 1]: Here reverse action takes place.ie. state space matrices A, B, C, D are converted to transfer function form. conv(): This function provides convolution and polynomial multiplication.

(ii)

(iii)

Calculation of transfer function: H(s) = num(s)/den = sC(sI-A)B+D of the systems: X = AX+BU Y = CX+DU Vector denominator contains coefficients of denominator in decreasing power of s. The numerator coefficients are returned in matrix num with as many rows as there in output Y.

%TRANSFORMATION OF MATHEMATICAL MODEL %y(s)/u(s)=s(s+10)/(s^2+4s+16); num=[1 0]; %PRODUCT OF TWO POLYNOMIALS den=conv([1 10],[1 4 16]); %CONVERSION FROM TRANSFER FUNCTION TO STATE SPACE [A,B,C,D]=tf2ss(num,den) %CONVERSION FROM STATE SPACE TO TRANSFER FUNCTION [num,den]=ss2tf(A,B,C,D,1)

A= -14 -56 -160 1 0 0 0 1 0 B= 1 0 0 C= 0 D= 0 num = 0 den = 0.0000 1.0000 -0.0000 1 0

1.0000 14.0000 56.0000 160.0000

Result: Transformation of mathematical model to state model and back to transfer function is performed.

EXPERIMENT NO: 12 LAG COMPENSATOR USING BODE PLOT Aim: To plot the bode plot for the unity feedback system whose open loop transfer function is given by K/s(1+2s) and design a lag compensator so that the phase margin is 40 and steady state error to ramp input is <= 0.2. Assume K=5. Functions used: (i) tf (): This function creates or converts transfer function. sys = tf(num, den) creates a continuous time transfer function sys with numerator num(s) and denominator den(s). The output is a transfer function of object. (ii) margin (): This function computes gain and phase margin and cross over frequencies. margin (sys) plots open loop bode plot with gain and phase margin marked with a vertical line. G(s) = K/s(1+2s) Given steady state error = 0.2 ess = 1/Kv Kv = lim sG(s)H(s) = K s0 K= 1/0.2 = 5.0 (i) Draw the bode plot for uncompensated system and determine the phase margin . If the phase margin is less than desired value, lag compensator is designed. Take = 5 and determine the new gain cross over frequency. gcn = 0.5. Determine parameter of the compensator. = 10 Agcn/20 = 10.

(ii) (iii)

(iv)

Transfer function = (s+1/T)/(s+1/ T), T = 10/ gcn = 20. T.F = 10(1+20s)/(1+200s).

(iv)

Determine open loop transfer function of compensated system. Open loop transfer function = 5(1+20s)/s(1+2s)(1+200s).

(vi) Draw the bode plot for compensated system and obtain the phase margin.

num=[0 0 5]; den=[2 1 0]; sys1=tf(num,den); bode(sys1); margin(sys1); figure(1); num=[200 10]; den=[200 1]; sys2=tf(num,den); bode(sys2); margin(sys2); figure(2); num=[0 0 100 5]; den=[400 202 1 0]; sys3=tf(num,den); bode(sys3); margin(sys3); figure(3);

Bode Diagram Gm = Inf dB (at Inf rad/sec) , Pm = 18 deg (at 1.54 rad/sec) 60 40 Magnitude (dB) Phase (deg) 20 0 -20 -40 -90

-135

-180 10
-2

10

-1

10 Frequency (rad/sec)

10

Bode Diagram Gm = Inf , Pm = -180 deg (at Inf rad/sec) 20

15 Magnitude (dB) Phase (deg)

10

0 0

-30

-60 10
-4

10

-3

10

-2

10

-1

10

Frequency (rad/sec)

Bode Diagram Gm = Inf dB (at Inf rad/sec) , Pm = 45.2 deg (at 0.395 rad/sec) 100

50 Magnitude (dB) Phase (deg)

-50

-100 -90

-135

-180 10
-4

10

-3

10

-2

10

-1

10

10

Frequency (rad/sec)

Result: The lag compensator for the given system is designed and bode plot is obtained using MATLAB program.

EXPERIMENT NO: 13 LEAD COMPENSATOR USING BODE PLOT Aim: To plot the bode plot for the unity feedback system whose open loop transfer function is given by K/s(s+1) and design a lead compensator so that phase margin of the system is 45 and steady state error for a unit ramp input is 1/15 and gain cross over frequency of the system must be less than 7.5 rad/sec. Functions used:
(i)

tf(): This function creates or converts the transfer function. sys = tf(num, den) creates a continuous time transfer function with numerator num(s) and denominator den(s). The output sys is transfer function of object. margin(): This function computes gain and phase margin and cross over frequencies. margin(sys) plots the open loop bode plot with gain and phase margin marked with a vertical line. G(s) = K/s(s+1) Given steady state error, ess 1/15 ess = 1/Kv = 1/15 Kv = 15 Kv = lim s G(s) H s0 Here G(s) = K/s(s+1) and H(s) = 1 Kv = lim s (K/s(s+1)) = K s0

(ii)

(i)

Draw the bode plot for uncompensated system and determine the phase margin. If the phase margin is less than the desired value, lead compensator is designed. Take = 5 and determine the new gain cross over frequency, m = 37. = (1-sin m)/ (1+sin m) = 0.248 m = -20log(1/ ) = -6 db. m = 5.6 radians/sec T = 1/(m ) = 0.358

(ii)

(iii)

(iv) Transfer function = (s+1/T)/ (s+1/T) = (s+2.8)/(s+11.2). (v) Determine the open loop transfer function of compensated system Open loop transfer function = 15(1+0.36s)/(1+0.09s)s(s+1) (vi) Draw the bode plot of compensated system and obtain the phase margin and gain margin.

num=[0 0 15]; den=[1 1 0]; sys1=tf(num,den); bode(sys1); margin(sys1); figure(1); num=[.09 .25]; den=[.09 1]; sys2=tf(num,den); bode(sys2); margin(sys2); figure(2); num=[0 0 5.4 15]; den=[.09 1.09 1 0]; sys3=tf(num,den); bode(sys3); margin(sys3); figure(3);

Bode Diagram Gm = Inf dB (at Inf rad/sec) , Pm = 14.7 deg (at 3.81 rad/sec) 100

Magnitude (dB) Phase (deg)

50

-50 -90

-135

-180 10
-2

10

-1

10

10

10

Frequency (rad/sec)

Bode Diagram Gm = Inf , Pm = -180 deg (at Inf rad/sec) 0

Magnitude (dB) Phase (deg)

-5

-10

-15 40 30 20 10 0 10
-1

10

10

10

10

Frequency (rad/sec)

Bode Diagram Gm = Inf dB (at Inf rad/sec) , Pm = 47.4 deg (at 5.38 rad/sec) 100

50 Magnitude (dB) Phase (deg)

-50

-100 -90

-135

-180 10
-2

10

-1

10

10

10

10

Frequency (rad/sec)

Result: The lead compensator for the given system is designed and bode plot is obtained using MATLAB program.

EXPERIMENT NO: 14 LAG-LEAD COMPENSATOR USING BODE PLOT Aim: To plot the bode plot for the unity feedback system whose open loop transfer function is given by G(s) = K/s(s+3)(s+6) and design a lag- lead compensator so that the phase margin of the given system is 35 and velocity error constant, Kv = 80.

Functions used: (i) tf(): This function creates or converts the transfer function. sys = tf(num, den) creates a continuous time transfer function with numerator num(s) and denominator den(s). The output sys is transfer . function of object. (ii) margin(): This function computes gain and phase margin and cross over frequencies. margin(sys) plots the open loop bode plot with gain and phase margin marked with a vertical line. G(s) = K/s(s+3)(s+6) For unity feedback system, velocity error constant, Kv = lim s G(s) s0 Given that Kv = 80 lim s K/(s(s+3)(s+6)) = 80 s0 K = 1440 G(s) = 1440/s(s+3)(s+6) = 80/s(1+0.33s)(1+0.167s)

(i)

Draw the bode plot for uncompensated system and determine the phase margin. If the phase margin is less than the desired value, laglead compensator is designed. Take = 5 and choose a new gain cross over frequency. The new gain cross over frequency, gcn = 1.8. Choose , gcl = 4 radian/sec. Determine the parameter , = 10 Agcl/20 = 16. Transfer function = (s+1/T)/ (s+1/T) = 16(1+2.5s)/(1+40s). Transfer function of lead compensator = (s+1/T)/ (s+1/T). = 1/ = 0.0625 T = 1/(m )

(ii)

(iii) (iv)

(v) (vi)

(vii) Transfer function of lead compensator = 0.0625(1+0.2s)/(1+40s)(1+0.014s) (viii) Transfer function of lag- lead compensator = (1+2.5s)(1+0.2s)/(1+40s)(1+0.014s) (ix) Open loop transfer function = 80(1+2.5s)(1+0.2s)/s(1+40s)(1+0.014s) (1+0.33s)(1+0.167s). (x) Draw the bode plot of compensated system and obtained the phase margin.

num=[0 0 0 80];

den=[.055 .497 1 0]; sys1=tf(num,den); bode(sys1); margin(sys1); figure(1); num=[.55 2.7 1]; den=[.539 35.0154 1]; sys2=tf(num,den); bode(sys2); margin(sys2); figure(2); num=[.029 2.19 17.99 35.5 1 0]; den=[0 0 0 44 216 80]; sys3=tf(num,den); bode(sys3); margin(sys3); figure(3);
Bode Diagram Gm = -18.9 dB (at 4.26 rad/sec) , Pm = -44.8 deg (at 10.7 rad/sec) 60 40 Magnitude (dB) Phase (deg) 20 0 -20 -40 -60 -90 -135 -180 -225 -270 10
-1

10

10 Frequency (rad/sec)

10

Bode Diagram Gm = Inf , Pm = -169 deg (at 319 rad/sec) 5 0 Magnitude (dB) Phase (deg) -5 -10 -15 -20 -25 90 45 0 -45 -90 10
-3

10

-2

10

-1

10

10

10

10

10

Frequency (rad/sec)

Bode Diagram Gm = -22.1 dB (at 16.4 rad/sec) , Pm = -37 deg (at 3.88 rad/sec) 200 150 Magnitude (dB) Phase (deg) 100 50 0 -50 -100 270 225 180 135 90 10
-3

10

-2

10

-1

10

10

10

10

10

Frequency (rad/sec)

Result: The lag-lead compensator for the given system is designed and bode plot is obtained using MATLAB program.

EXPERIMENT NO: 15 LEAD COMPENSATOR USING ROOT LOCUS Aim: To design a lead compensator using root locus for the unity feedback system whose open loop transfer function is given by G(s) = K/s(s+8) to meet the following specifications (i) Percentage peak overshoot = 9.5%. (ii) Natural frequency of oscillation, n = 12 radian/sec. (iii) Velocity error constant, Kv 10. Functions used:
(i)

tf (): This function creates or converts the transfer function. sys = tf(num, den) creates a continuous time transfer function with numerator num (s) and denominator den (s). The output sys is transfer function of object. rlocus (G): Root locus of transfer function G is obtained. sgrid (): Generates an s- plane grid of constant damping factors and natural frequency. Syntax: sgrid sgrid(z, n) [kk poles cl]: To locate the closed loop poles. Kv = dcgain(): To find the DC gain.

(ii) (iii)

(iv) (v)

Determine the dominant pole, Sd Sd = -n +/- jn (1- 2) n = 12 radian/sec, % Mp = 9.5%. % Mp = e ( /(1- 2) * 100 = 0.6 Sd = -7.2 +/- j 9.6

clear all; close all; g=tf(1,[1,8,0]); figure(1); rlocus(g); sgrid(.6,12); beta=input('enter trial value of beta '); d=tf([1 7.3],[1 beta]); figure(2); rlocus(d*g); sgrid(.6,12); [kk polesCL]=rlocfind(d*g); gv=tf([1 0],1)*kk*d*g; kv=dcgain(gv)

Root Locus 2.5 0.6 2 1.5 1 0.5 0 -0.5 -1 -1.5 -2 0.6 -2.5 -8 -7 -6 -5 -4 Real Axis -3 -2 -1 0

Imaginary Axis

enter trial value of beta 9 Select a point in the graphics window selected_point = -7.1765 + 9.5963i kv = 11.9101

Root Locus 10 0.6 8 6 4 2 0 -2 -4 -6 -8 0.6 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0

Imaginary Axis

Real Axis

Result: Designed the lead compensator using root locus for the given system.

S-ar putea să vă placă și