Vous êtes sur la page 1sur 44

M.

KUMARASAMY COLLEGE OF ENGINEERING THALAVAPALAYAM ,KARUR- 639 113

SIMULATION AND CONTROL LABORATORY

PREPA RED BY
Ms NATHIYA G Mrs. UMA J

M.KUMARASAMY COLLEGE OF ENGINEERING THALAVAPALAYAM, KARUR-639 113 SIMULATION AND CONTROL LABORATORY LIST OF EXPREMENTS
1.

SIMULATION OF SECOND ORDER SYSTEM WITH DEAD TIME.

2. a) DESIGN OF PI AND PID CONTROLLER FOR A FIRST ORDER SYSTEM WITH DEAD TIME USING MATLAB. b) DESIGN OF PI AND PID CONTROLLER FOR A FIRST ORDER SYSTEM WITH DEAD TIME USING MATLAB. 3. a) DESIGN OF PI AND PID CONTROLLER FOR A SECOND ORDER SYSTEM WITH DEAD TIME USING MATLAB. b) DESIGN OF PI AND PID CONTROLLER FOR A SECOND ORDER SYSTEM WITHOUT DEAD TIME USING MATLAB. 4. CLOSED LOOP SPEED CONTROL SYSTEM. 5. TRANSFER FUNCTION OF ARMATURE CONTROL DC MOTOR. 6. TRANSFER FUNCTION OF FIELD CONTROL DC MOTOR. 7. CLOSED LOOP POSITION CONTROL. 8. DESIGN OF LEAD COMPENSATOR. 9. DESIGN OF LAG COMPENSATOR.

1. SIMULATION OF SECOND ORDER SYSTEM WITH DEAD TIME


AIM: To simulate the second order system with dead time using MATLAB APPARATUS REQUIRED: PC with MATLAB package THEORY:
MATLAB is a software packages for high performance numerical computation and visualization. It provides an interesting environment with hundred of built in fun for technical computation, graphics and animation. The name MATLAB stands for matrix laboratory. The user can write their own function in the MATLAB language.

Mat lab is a matrix based system for mathematical and engineering calculator. Each variable is treated as a matrix which the only data type handled by the graphical output can be obtained by running different set routines. Mat lab can be for application development because of graphical user interface tools. The typical in the field of mathematics and computation development of algorithm modeling simulation and its prototyping data analysis, scientific and engineering problems, application development tools. Several tools boxes are available from the different manufacture. Tool box is a group of MATLAB function which are predefined that can obtain solution in different applications, control system, neutral hardware, fuzzy logic and digital signal processing. PROCEDURE: 1. Switch on the main supply. 2. Open the MATLAB coment window. 3. Create a new file. 4. Type the program and check the error. 5. After saving the program, debug and run the program to see the output. 6. Verify the output waveform time through MATLAB. 7. Shutdown the computer. BLOCK DIAGRAM:
3

SECOND ORDER SYSTEM WITH DEAD TIME

STEP INPUT

TRANSFER FUNCTION

TRANSPORT DELAY

SCOPE

TRANSFER FUNCTION =

RESULT: Thus the second order system with dead time was simulated using MATLAB

2. A) DESIGN OF PI AND PID CONTROLLER FOR SECOND ORDER SYSTEM WITH DEAD TIME USING MATLAB
AIM: To design PI and PID controller for a second order system with dead time using MATLAB. APPARATUS REQUIRED: PC with MATLAB package FORMULA: ZEIGLER NICHOLS METHOD: Ultimate gain Ku=1/m Where, M= amplitude ratio Ultimate period Pu=2/co min/cycle THEORY: ZEIGLER NICHOLS METHOD Zeigler Nichols tuning technique is a closed loop procedure. In this method using proportional controller only and with the feedback loop closed introduces a step input point changes and vary the proportional gain until the system oscillates continuously. The frequency of continuous oscillation to the uses over frequency let in be the amplitude ratio of the system response at cross over frequency. The ultimate gain Kv=1/m and ultimate period of sustained cycling Pv=2/Wco is calculated using the value of Pv and Kv gain is because of pressure of integral produce a additional those at the frequencies The presence of derivative controller in the PID mode introduces a phase load with strong stability offset in closed loop response.

PROCEDURE: 1. Derive the given transfer function and calculate the various ultimate gain (Ku) and ultimate time period. 2. The various controller settings for PI&PID modes are calculated using the respective formula. 3. Design the various elements in MATLAB as per the requirement. 4. Enter the values of controller parameter in the PI controller. 5. Enter the given transfer function, view the output and note the response of controller of various modes. TABULATION: Kc P PI PID Ku/2= Ku/2.2= Ku/1.7 = Pu/1.2 = Pu/2 = Pu /8 = t(min) D(min)

BLOCK DIAGRAM:

SECOND ORDER SYSTEM WITH DEAD TIME

STEP INPUT

CONTROL LER

TRANSFER FUNCTION

TRANSPORT DELAY

SCOPE

TRANSFER FUNCTION =

RESULT: Thus PI and PID controller for second order system with dead time was designed and simulated using MATLAB.

2. B) DESIGN OF PI AND PID CONTROLLER FOR SECOND ORDER SYSTEM WITHOUT DEAD TIME USING MATLAB
AIM: To design PI and PID controller for a second order system without dead time using MATLAB. APPARATUS REQUIRED: PC with MATLAB package FORMULA: ZEIGLER NICHOLS METHOD: Ultimate gain Ku=1/m Where, M= amplitude ratio Ultimate period Pu=2/co min/cycle THEORY: ZEIGLER NICHOLS METHOD Zeigler Nichols tuning technique is a closed loop procedure. In this method using proportional controller only and with the feedback loop closed introduces a step input point changes and vary the proportional gain until the system oscillates continuously. The frequency of continuous oscillation to the uses over frequency let in be the amplitude ratio of the system response at cross over frequency. The ultimate gain Kv=1/m and ultimate period of sustained cycling Pv=2/Wco is calculated using the value of Pv and Kv gain is because of pressure of integral produce a additional those at the frequencies The presence of derivative controller in the PID mode introduces a phase load with strong stability offset in closed loop response.

PROCEDURE:
1. Derive the given transfer function and calculate the various 2.

3. 4. 5.

ultimate gain (Ku) and ultimate time period. The various controller settings for PI&PID modes are calculated using the respective formula. Design the various elements in MATLAB as per the requirement. Enter the values of controller parameter in the PI controller. Enter the given transfer function, view the output and note the response of controller of various modes.

TABULATION: Kc P PI PID Ku/2= Ku/2.2= Ku/1.7 = Pu/1.2 = Pu/2 = Pu /8 = t(min) D(min)

BLOCK DIAGRAM:

SECOND ORDER SYSTEM WITHOUT DEAD TIME

STEP INPUT

CONTROL LER

TRANSFER FUNCTION

SCOPE

TRANSFER FUNCTION =

RESULT: Thus PI and PID controller for second order system without dead time was designed and simulated using MATLAB.

10

3. A) DESIGN OF PI AND PID CONTROLLER FOR FIRST ORDER SYSTEM WITH DEAD TIME USING MATLAB
AIM: To design PI and PID controller for a first order system with dead time using MATLAB. APPARATUS REQUIRED: PC with MATLAB package FORMULA: ZEIGLER NICHOLS METHOD: Ultimate gain Ku=1/m Where, M= amplitude ratio Ultimate period Pu=2/co min/cycle THEORY: ZEIGLER NICHOLS METHOD Zeigler Nichols tuning technique is a closed loop procedure. In this method using proportional controller only and with the feedback loop closed introduces a step input point changes and vary the proportional gain until the system oscillates continuously. The frequency of continuous oscillation to the uses over frequency let in be the amplitude ratio of the system response at cross over frequency. The ultimate gain Kv=1/m and ultimate period of sustained cycling Pv=2/Wco is calculated using the value of Pv and Kv gain is because of pressure of integral produce a additional those at the frequencies The presence of derivative controller in the PID mode introduces a phase load with strong stability offset in closed loop response.

11

PROCEDURE:
6. Derive the given transfer function and calculate the various

ultimate gain (Ku) and ultimate time period. 7. The various controller settings for PI&PID modes are calculated using the respective formula. 8. Design the various elements in MATLAB as per the requirement. 9. Enter the values of controller parameter in the PI controller. 10. Enter the given transfer function, view the output and note the response of controller of various modes.

TABULATION: Kc P PI PID Ku/2= Ku/2.2= Ku/1.7 = Pu/1.2 = Pu/2 = Pu /8 = t(min) D(min)

12

BLOCK DIAGRAM:

FIRST ORDER SYSTEM WITH DEAD TIME

STEP INPUT

CONTROL LER

TRANSFER FUNCTION

TRANSPORT DELAY

SCOPE

TRANSFER FUNCTION =

RESULT: Thus PI and PID controller for first order system with dead time was designed and simulated using MATLAB.

13

3. B) DESIGN OF PI AND PID CONTROLLER FOR FIRST ORDER SYSTEM WITHOUT DEAD TIME USING MATLAB
AIM: To design PI and PID controller for a first order system without dead time using MATLAB. APPARATUS REQUIRED: PC with MATLAB package FORMULA: ZEIGLER NICHOLS METHOD: Ultimate gain Ku=1/m Where, M= amplitude ratio Ultimate period Pu=2/co min/cycle THEORY: ZEIGLER NICHOLS METHOD Zeigler Nichols tuning technique is a closed loop procedure. In this method using proportional controller only and with the feedback loop closed introduces a step input point changes and vary the proportional gain until the system oscillates continuously. The frequency of continuous oscillation to the uses over frequency let in be the amplitude ratio of the system response at cross over frequency. The ultimate gain Kv=1/m and ultimate period of sustained cycling Pv=2/Wco is calculated using the value of Pv and Kv gain is because of pressure of integral produce a additional those at the frequencies The presence of derivative controller in the PID mode introduces a phase load with strong stability offset in closed loop response.

14

PROCEDURE:
11. Derive the given transfer function and calculate the various

ultimate gain (Ku) and ultimate time period. 12. The various controller settings for PI&PID modes are calculated using the respective formula. 13.Design the various elements in MATLAB as per the requirement. 14.Enter the values of controller parameter in the PI controller. 15.Enter the given transfer function, view the output and note the response of controller of various modes.

TABULATION: Kc P PI PID Ku/2= Ku/2.2= Ku/1.7 = Pu/1.2 = Pu/2 = Pu /8 = t(min) D(min)

15

BLOCK DIAGRAM:

FIRST ORDER SYSTEM WITHOUT DEAD TIME

STEP INPUT

CONTROL LER

TRANSFER FUNCTION

SCOPE

TRANSFER FUNCTION =

RESULT: Thus PI and PID controller for first order system without dead time was designed and simulated using MATLAB.

16

4. CLOSED LOOP SPEED CONTROL SYSTEM


AIM: To find the transfer function of closed loop speed control system. APPARATUS REQUIRED: PC MATLAB software THEORY: A common actuator in control system is the DC motor. It directly provides rotary motion and coupled with wheels or drums and cables can provide translational motion. The electric circuit of the armature and the free body diagram of the rotor are shown in the figure. For this example, we will assume the following values for the physical parameters. These values are derived by experiment from an actual motor in Carnegie melons underground control lab. Moment of inertia of the rotor J=0.01kgm2/s2 Damping ratio of the mechanical system B=0.1nms Electromotive force constant (k=ke=kt)=0.01nm/amp Electric resistance(R) =1ohm Electric inductance (L)=0.5H Input (v): source voltage Output (theta): position of shaft The rotor and shaft are assumed to be rigid. The motor torque is related to the armature current,I by a constant factor kt . The back emf, e is related to the rotational velocity by the following equations: T=kti e=ke0 In SI units (which we will use), kt (armature constant) is equal to ke(motor constant). From the figure above we can write the following equations based on Newtons law combined with kirchoffs law: J0+b0=ki Js20(s)+bs0(s)=ki(s) Ls i(s) +ri(s) = v-ks0(s).k0(s) Ldi/dt + ri =v-k0(s)
17

TRANSFER FUNCTION: Using laplace transform, the above modeling equations can be expressed in terms of s. S (js+b) 0(s)=ki(s) (Ls+R) i(s) =v-ks 0(s) By eliminating i(s) we can get the following open loop transfer function where the rotation speed is the output and the voltage is the input. 0/s=k/s ((js+b)(ls+r)+k2) PROCEDURE: 1. Switch on the main supply 2. Open the MATLAB comment window. 3. Create a new M file.(the file containing MATLAB language codes are called Mfile) 4. Type the program and check the error. 5. After saving the program,debug and run the program to see the output. 6. Verify the output waveform time through MATLAB. 7. Shutdown the computer. 8. Switch off the supply.

18

CLOSED LOOP SPEED CONTROL SYSTEM

BLOCK DIAGRAM:

STEP INPUT

CONTROL LER

TRANSFER FUNCTION

SCOPE

TRANSFER FUNCTION =

RESULT: Thus the transfer function of closed loop speed control system is obtained.

19

5. TRANSFER FUNCTION OF ARMATURE CONTROLLED DC MOTOR


AIM: To determine the transfer function of armature controlled DC motor APPARATUS REQUIRED: PC with MATLAB package THEORY: MATLAB is a software pacakage for high performance numerical computation and visualization.It provides an interacting environment with hundred of built in fun for technical computation,graphics and animation .The name MATLAB stand for matrix laboratory.The user can write their own function in the MATLAB language. Matlab is a matrix based system for mathematical and engineering calculator. Each variable is treated as a matrix which the only data type handled by the graphical output can be obtained by running different set of routines. Matlab can be used as an application development because of graphical user interface tools.The typical are in the field of mathematics and computation development of algorithm modeling simulation and its prototyping data analysis,scientificand engineering problems,application development tools.several tool boxes are also available from the different manufacture. Tool box is a group of MATLAB function which are predefined that can be for obtaining solution in different applications,control system,neutral hardware,fuzzylogic and digital signal processing.

20

PROGRAM: % This program will simulate the Armature controlled DC Motor Transfer % funcations along with the step out waveform disp('In order to use the program all motor parameters must be converted to SI units') disp('If the maxium operating speed is not given please enter zero') wmax=input('What is the maximum operating speed, Wmax(rad/s)>'); Imax=input('What is the maximum armature current, Imax(A)>'); Ke=input('What is the Voltage constant, Ke(V*s/rad)>'); Kt=input('What is the Torque constant, Kt(N*m/A)>'); Tf=input('What is the Friction torque, Tf(N*m)>'); R=input('What is the Armature resistance, R(ohms)>'); L=input('What is the Armature inductnace, L(H)>'); Jm=input('What is the Armature moment of inertia, Jm(N*m*s^2/rad)>'); Bm=input('What is the Armature viscous friction, Bm(N*M*s/rad)>'); disp('Does the motor have speed reducers and load specifications?'); ans=input('Enter 1 for YES; Enter 0 for No>') if ans==1; N1=input('How many teeth are on the first(N1) speed reducer>'); N2=input('How many teeth are on the second(N2) speed reucer>'); JL=input('What is the Load inertia (JL)>'); BL=input('What is the Load friction (BL)>'); disp('The Mechanical time constant is (sec)') Tm=Jm/Bm pause disp('The Electrical time constant is (sec)') Te=L/R pause disp('The Voltage-driven Transfer Funcation of the Motor (OhmM(s)/Ea(s)')
21

X0=(R*Bm)+(Ke*Kt); X1=(R*Bm*(Tm+Te)); X2=(R*Bm*Tm*Te); X10=(X0/X2); X11=(X1/X2); X12=(X2/X2); X13=(Kt/X2); num=[Kt]; den=[X2 X1 X0]; t1=tf(num, den) step(t1) pause disp('The simplified of Above Transfer funcation') num=[X13]; den=[X12 X11 X10]; t0=tf(num, den) step(t0) pause disp('Therefore the natural damped frequency of the motor is>') w=sqrt(X10) pause disp('Therefore the damping factor is>') df=(X11/(2*(w))) pause disp('The Simplified gain is (rad/v*s)') Ks=((Kt)/((R*Bm)+(Ke*Kt))) pause disp('The simplified time constantis (s)') Ts=((R*Jm)/((R*Bm)+(Ke*Kt))) pause disp('The simplified velocity Motor transfer function is(ohmM(s)/Ea(s)')
22

num=[Ks]; den=[Ts 1]; t2=tf(num, den) step(t2) pause disp('The simplified Motor position transfer funcation is (thetaM(s)/Ea(s)>') num=[Ks]; den=[Ts 1 0]; t3=tf(num, den) step(t3) pause disp('The current-driven Motor velocity transfer funcation is (ohmsM(s)/Ia(s)>') Kc=Kt/Bm; num=[Kc]; den=[Tm 1]; t4=tf(num,den) step(t4) pause disp('The current-driven Motor poistion tranfer function is thetaM(s)/Ia(s)>') num=[Kc]; den=[Tm 1 0]; t5=tf(num,den) step(t5) pause disp('The inertia of motor and load is, (N*m*s^2/rad)') Jt=(Jm+(((N1/N2)^2)*JL)) pause disp('The friction of motor and load is, N*m*s/rad') Bt=(Bm+(((N1/N2)^2)*BL)) pause disp('The torque time constant is, (s)') Tt=Jt/Bt pause
23

disp('The velocity transfer function (of Voltage-Driven Motor,speed Reducer and Load) is ohmsL(s)/Ea(s)>') X3=((R*Bt)+(Ke*Kt)); X4=((R*Bt)*(Tt+Te)); X5=((R*Bt*Tt*Te)); N=(Kt*(N1/N2)); X15=N/X5; X16=X3/X5; X17=X4/X5; X18=X5/X5; num=[N]; den=[X5 X4 X3]; t6=tf(num,den) step(t6) pause disp('The simplified of Above Transfer funcation') num=[X15]; den=[X18 X17 X16]; t00=tf(num,den) step(t00) pause disp('The poistion transfer funcation is thetaL(s)/Ea(s)>') num=[N]; den=[X5 X4 X3 0]; t7=tf(num,den) step(t6) pause disp('The simplified of Above Transfer funcation') num=[X15]; den=[X18 X17 X16 0]; t000=tf(num,den) step(t000) pause

24

disp('Thank for using my program') disp('Program created by Taptej Khachh (Humber College Student)') else ans==0; disp('The Mechanical time constant is (sec)') Tm=Jm/Bm pause disp('The Electrical time constant is (sec)') Te=L/R pause disp('The Voltage-driven Transfer Funcation of the Motor (OhmM(s)/Ea(s)') X0=(R*Bm)+(Ke*Kt); X1=(R*Bm*(Tm+Te)); X2=(R*Bm*Tm*Te); X10=(X0/X2); X11=(X1/X2); X12=(X2/X2); X13=(Kt/X2); num=[Kt]; den=[X2 X1 X0]; t1=tf(num, den) step(t1) pause disp('The simplifed of Above Transfer Funcation>') num=[X13]; den=[X12 X11 X10]; t0=tf(num, den) step(t0) pause disp('Therefore the natural damped frequency of the motor is>') w=sqrt(X10) pause disp('Therefore the damping factor is>') df=(X11/(2*(w)))
25

pause disp('The Simplified gain is (rad/v*s)') Ks=((Kt)/((R*Bm)+(Ke*Kt))) pause disp('The simplified time constantis (s)') Ts=((R*Jm)/((R*Bm)+(Ke*Kt))) pause disp('The simplified Motor velocity transfer function is (ohmM(s)/Ea(s)') num=[Ks]; den=[Ts 1]; t2=tf(num, den) step(t2) pause disp('The simplified Motor position transfer funcation is (thetaM(s)/Ea(s)>') num=[Ks]; den=[Ts 1 0]; t3=tf(num, den) step(t3) pause disp('The current-driven Motor velocity transfer funcation is (ohmsM(s)/Ia(s)>') Kc=Kt/Bm; num=[Kc]; den=[Tm 1]; t4=tf(num,den) step(t4) pause disp('The current-driven Motor poistion tranfer function is thetaM(s)/Ia(s)>') num=[Kc]; den=[Tm 1 0]; t5=tf(num,den) step(t5) pause
end

RESULT: Thus the transfer function of armature controlled DC motor was derived.

26

6. TRANSFER FUNCTION OF FIELD CONTROLLED DC MOTOR

AIM: To derive transfer function of field controlled dc motor. APPARATUS REQUIRED: PC with MATLAB package THEORY: MATLAB is a software pacakage for high performance numerical computation and visualization.It provides an interacting environment with hundred of built in fun for technical computation,graphics and animation .The name MATLAB stand for matrix laboratory.The user can write their own function in the MATLAB language. Matlab is a matrix based system for mathematical and engineering calculator. Each variable is treated as a matrix which the only data type handled by the graphical output can be obtained by running different set of routines. Matlab can be used as an application development because of graphical user interface tools.The typical are in the field of mathematics and computation development of algorithm modeling simulation and its prototyping data analysis,scientificand engineering problems,application development tools.several tool boxes are also available from the different manufacture. Tool box is a group of MATLAB function which are predefined that can be for obtaining solution in different applications,control system,neutral hardware,fuzzylogic and digital signal processing.

27

PROGRAM: % This program will simulate the field controlled DC Motor Transfer % funcations along with the step out waveform disp('In order to use the program all motor parameters must be converted to SI units') disp('If the maxium operating speed is not given please enter zero') wmax=input('What is the maximum operating speed, Wmax(rad/s)>'); Imax=input('What is the maximum armature current, Imax(A)>'); Ke=input('What is the Voltage constant, Ke(V*s/rad)>'); Kt=input('What is the Torque constant, Kt(N*m/A)>'); Tf=input('What is the Friction torque, Tf(N*m)>'); R=input('What is the field resistance, R(ohms)>'); L=input('What is the field inductnace, L(H)>'); Jm=input('What is the field moment of inertia, Jm(N*m*s^2/rad)>'); Bm=input('What is the field viscous friction, Bm(N*M*s/rad)>'); disp('Does the motor have speed reducers and load specifications?'); ans=input('Enter 1 for YES; Enter 0 for No>') if ans==1; N1=input('How many teeth are on the first(N1) speed reducer>'); N2=input('How many teeth are on the second(N2) speed reucer>'); JL=input('What is the Load inertia (JL)>'); BL=input('What is the Load friction (BL)>'); disp('The Mechanical time constant is (sec)') Tm=Jm/Bm pause disp('The Electrical time constant is (sec)') Te=L/R pause disp('The Voltage-driven Transfer Funcation of the Motor (OhmM(s)/Ea(s)')
28

X0=(R*Bm)+(Ke*Kt); X1=(R*Bm*(Tm+Te)); X2=(R*Bm*Tm*Te); X10=(X0/X2); X11=(X1/X2); X12=(X2/X2); X13=(Kt/X2); num=[Kt]; den=[X2 X1 X0]; t1=tf(num, den) step(t1) pause disp('The simplified of Above Transfer funcation') num=[X13]; den=[X12 X11 X10]; t0=tf(num, den) step(t0) pause disp('Therefore the natural damped frequency of the motor is>') w=sqrt(X10) pause disp('Therefore the damping factor is>') df=(X11/(2*(w))) pause disp('The Simplified gain is (rad/v*s)') Ks=((Kt)/((R*Bm)+(Ke*Kt))) pause disp('The simplified time constantis (s)') Ts=((R*Jm)/((R*Bm)+(Ke*Kt))) pause disp('The simplified velocity Motor transfer function is(ohmM(s)/Ea(s)') num=[Ks];
29

den=[Ts 1]; t2=tf(num, den) step(t2) pause disp('The simplified Motor position transfer funcation is (thetaM(s)/Ea(s)>') num=[Ks]; den=[Ts 1 0]; t3=tf(num, den) step(t3) pause disp('The current-driven Motor velocity transfer funcation is (ohmsM(s)/Ia(s)>') Kc=Kt/Bm; num=[Kc]; den=[Tm 1]; t4=tf(num,den) step(t4) pause disp('The current-driven Motor poistion tranfer function is thetaM(s)/Ia(s)>') num=[Kc]; den=[Tm 1 0]; t5=tf(num,den) step(t5) pause disp('The inertia of motor and load is, (N*m*s^2/rad)') Jt=(Jm+(((N1/N2)^2)*JL)) pause disp('The friction of motor and load is, N*m*s/rad') Bt=(Bm+(((N1/N2)^2)*BL)) pause disp('The torque time constant is, (s)') Tt=Jt/Bt pause

30

disp('The velocity transfer function (of Voltage-Driven Motor,speed Reducer and Load) is ohmsL(s)/Ea(s)>') X3=((R*Bt)+(Ke*Kt)); X4=((R*Bt)*(Tt+Te)); X5=((R*Bt*Tt*Te)); N=(Kt*(N1/N2)); X15=N/X5; X16=X3/X5; X17=X4/X5; X18=X5/X5; num=[N]; den=[X5 X4 X3]; t6=tf(num,den) step(t6) pause disp('The simplified of Above Transfer funcation') num=[X15]; den=[X18 X17 X16]; t00=tf(num,den) step(t00) pause disp('The poistion transfer funcation is thetaL(s)/Ea(s)>') num=[N]; den=[X5 X4 X3 0]; t7=tf(num,den) step(t6) pause disp('The simplified of Above Transfer funcation') num=[X15]; den=[X18 X17 X16 0]; t000=tf(num,den) step(t000) pause disp('Thank for using my program')
31

disp('Program created by Taptej Khachh (Humber College Student)') else ans==0; disp('The Mechanical time constant is (sec)') Tm=Jm/Bm pause disp('The Electrical time constant is (sec)') Te=L/R pause disp('The Voltage-driven Transfer Funcation of the Motor (OhmM(s)/Ea(s)') X0=(R*Bm)+(Ke*Kt); X1=(R*Bm*(Tm+Te)); X2=(R*Bm*Tm*Te); X10=(X0/X2); X11=(X1/X2); X12=(X2/X2); X13=(Kt/X2); num=[Kt]; den=[X2 X1 X0]; t1=tf(num, den) step(t1) pause disp('The simplifed of Above Transfer Funcation>') num=[X13]; den=[X12 X11 X10]; t0=tf(num, den) step(t0) pause disp('Therefore the natural damped frequency of the motor is>') w=sqrt(X10) pause disp('Therefore the damping factor is>')
32

df=(X11/(2*(w))) pause disp('The Simplified gain is (rad/v*s)') Ks=((Kt)/((R*Bm)+(Ke*Kt))) pause disp('The simplified time constantis (s)') Ts=((R*Jm)/((R*Bm)+(Ke*Kt))) pause disp('The simplified Motor velocity transfer function is (ohmM(s)/Ea(s)') num=[Ks]; den=[Ts 1]; t2=tf(num, den) step(t2) pause disp('The simplified Motor position transfer funcation is (thetaM(s)/Ea(s)>') num=[Ks]; den=[Ts 1 0]; t3=tf(num, den) step(t3) pause disp('The current-driven Motor velocity transfer funcation is (ohmsM(s)/Ia(s)>') Kc=Kt/Bm; num=[Kc]; den=[Tm 1]; t4=tf(num,den) step(t4) pause disp('The current-driven Motor poistion tranfer function is thetaM(s)/Ia(s)>') num=[Kc]; den=[Tm 1 0];
33

t5=tf(num,den) step(t5) pause end

RESULT: Thus the transfer function of field controlled DC motor was derived.

34

7. CLOSED LOOP POSITION CONTROL SYSTEM


AIM: To control the position of DC motor by using MATLAB. APPARATUS REQUIRED: Pc MATLAB software THEORY: The angular position of the output shaft is intended to follow the reference voltage but it should be clear if the motor drives a toothed belt linear outputs can also be obtained.The potentiometer mounted on the outputshaft provides a feedback voltage proportional to the actual position of the output shaft. The voltage from this potentiometer must be linear function of voltage from this potentiometer must be linear function of angle, and must not vary with temperature otherwise the accuracy of the system will be in doubt. The feedback is subtracted from the reference voltage and the resulting position error signal is amplified and used to drive the motor so as to rotate the output shaft in the desired direction.When the output shaft reaches the target position, the position error becomes zero, no voltage is applied to the motor and output shaft remains at motor PROCEDURE: 1.switch on the main supply 2.open the MATLAB comment window. 3.create a new M file.(the file containing MATLAB language codes are called Mfile) 4.type the program and check the error. 5.After saving the program,debug and run the program to see the output. 6.verify the output waveform time through MATLAB. 7.shutdown the computer. 8.switch off the supply.

35

PROGRAM J=3.2284E-6; b=3.5077E-6; K=0.0274; R=4; L=2.75E-6; num=K; den=[(J*L) ((J*R)+(L*b)) ((b*R)+K^2) 0]; Kp=1.7; Ki=20; numcf=[Kp Ki]; dencf=[1 0]; numf=conv(numcf,num); denf=conv(dencf,den); [numc,denc]=cloop(numf,denf,-1); t=0:0.001:0.4; step(numc,denc,t) You should get the following step response:

RESULT: Thus the position of DC Motor is studied and output waveform is verified.

36

8. STUDY OF LEAD COMPENSATOR


AIM: To study the frequency response and transfer function of lead compansator. THEORY: The control system are designed to perform specific tasks. The specification is generally releted to accuracy, relative stability and speed of response.In time domain the transient state performance specification are given in terms of rise time, maximum overshoot, settling time and damping ratio. In frequency domain the transient state performance specifications are given in terms of phase margin, gain margin, resonant peak and bandwidth. The first step in design is the adjustment of gain to meet the desired specification in practical system, adjustments of given alone will not be sufficient to meet the given specification. In many case increasing the gain may result in poor stability. In such cases, it is necessary to introduce additional device or components in the system to alter the behavior and to meet the desired specifications such a redesign of a suitable device is called compensation. A device inserted into the system for the purpose of satisfaction is called compensator. A compensator having the characteristics of the lead compensator. It is used to improve the transient state response and reduce the maximum peak overshoot. The main drawbacks of lag compensator is poor steady state. MODEL GRAPH:

37

TRANSFER FUNCTION: The RC network shown in figure can realize the lead compensator. Let E0(S) = Output Voltage Ei(S) = Input Voltage By voltage division rule E0(S) = Ei(S) R2 ( R1*1/sC) R2 + ( R1 + 1/sC) R2 E0(S) = Ei(S) R2 + R1 (R1Cs + 1) = Ei(S) R2(R1Cs + 1) R1 (R1Cs + 1) R2

The transfer function of the electrical network is the ratio of output voltage to input voltage Transfer function of Electrical network E0(s) = Ei(s) R2(R1Cs + 1) [ R1R2Cs + R2 + R1] = R1CR2[s + 1/R1C] R1CR2[ s + (R1 + R2)] R1CR2

[ s+ = [s+

1 ] R1C

1 R2/ (R1+R2)

1 R1C

The general form of lead compensator transfer function is,

38

Gc(s) = E0(s) = s + 1/ T Ei(s) s + 1/ T R2 Where, T = R1C and = R1 +R2

T= Time constant =Attenuation factor.

RESULT: Thus the the frequency response and transfer function of lead compansator was studied.
39

9. STUDY OF LAG COMPENSATOR


AIM: To study the frequency response and transfer function of lag compensator. THEORY: The control system are designed to perform specific tasks. The specification is generally releted to accuracy, relative stability and speed of response.In time domain the transient state performance specification are given in terms of rise time, maximum overshoot, settling time and damping ratio. In frequency domain the transient state performance specifications are given in terms of phase margin, gain margin, resonant peak and bandwidth. The first step in design is the adjustment of gain to meet the desired specification in practical system, adjustments of given alone will not be sufficient to meet the given specification. In many case increasing the gain may result in poor stability. In such cases, it is necessary to introduce additional device or components in the system to alter the behavior and to meet the desired specifications such a redesign of a suitable device is called compensation. A device inserted into the system for the purpose of satisfaction is called compensator. A compensator having the characteristics of the lag network is called lag compensator. It is used to improve the study state response and reduce the bandwidth. The main drawback of lag compensator is poor transient state. MODEL GRAPH:

40

TRANSFER FUNCTION: The RC network shown in figure can realize the lead compensator. Let E0(S) = Output Voltage Ei(S) = Input Voltage By voltage division rule
E0(S) = Ei(S) (R2+ 1/SC) ( R1 + R2 + 1/SC)

(SCR2+ 1)/ SC E0(S) = Ei(S) (SC(R1+ R2) + 1)/SC = Ei(S)

(SCR2 + 1) / SC SC(R1 + R2) + 1 SC

The transfer function of the electrical network is the ratio of output voltage to input voltage Transfer function of E0(s) = SCR2 + 1 Electrical network Ei(s) (SC(R1+ R2) + 1) = S + 1/CR2 (R1 + R2)/R2[S + (R1+R2)/R2]R2C

The general form of lag compensator transfer function is,

Gc(s) = E0(s) = Ei(s)

(s + 1)T (S + 1/T)

41

R1 + R2 Where, T = R2C and = R2

T= Time constant Attenuation factor.

RESULT: Thus the the frequency response and transfer function of lag compensator was studied.
42

43

44

Vous aimerez peut-être aussi