You are on page 1of 6

Addis Ababa University

Addis Ababa Institute of Technology


Department of Electrical and Computer Engineering
Addis Ababa, Ethiopia
Course Code: ECEG-6431 Course Title: Digital Control
Credits: 3 ECTS: 6
Tutorial on Application of MATLAB for control
15%
1. Analyzing a continuous time system
a) Using transfer function method
b) Using state space method
consider the system shown below

In modeling the system, a step input(voltage) is given to the valve and the
temperature response is recorded. The data obtained is as follows:
T 0.0114 0.0217 0.196 0.562 0.702 0.772 0.992 0.921 0.984
Time(sec) 0.279 10 20 30 39.8 49.7 60 69.9 80.3
T 0.958 1.05 0.989 1.03 0.994 1.02 1.06 0.968 1
Time(sec) 89.9 100 110 120 130 140 150 160 171
i) plot the system response
t=[0.279 10 20 30 39.8 49.7 60 69.9 80.3 89.9 100 110 120 130 140 150 160 171];
Temp=[0.0114 0.0217 0.196 0.562 0.702 0.772 0.992 0.921 0.984 0.958 1.05 0.989 ...
1.03 0.994 1.02 1.06 0.968 1];
plot(t, Temp, 'r*');
grid;
xlabel('time(sec)');
ylabel('Temperature Normalized units');
title('experimental response of system for unit step voltage input');

ii) model the system as a first order system with time lag as

e−θs
G p (s )=
1+τs
where
 is the time lag
 is the time constant
The two parameters can be determined from the experimental plot using the
formula
3
τ = (t 2 −t 1 )
2
θ=t 2 −τ
where t2 is time to reach 63.2% of final value and t1 is time to reach 28.3%
- determine the values of t2 and t1 from your plot.
- compute the value of  and 
- form the plant response and enter to MATLAB.
t2=35.8;
t1=22.1;
tau=(3/2)*(t2-t1);
theta=t2-tau;
s=tf('s');
sys=tf([1],[tau 1]);
Gp1=exp(-theta*s);
Gp=series(Gp1,sys);
hold on;
step(Gp,'b');
compare the two responses, the actual and the modeled one. A similar bump
experiment has been performed to test the effect of temperature variation on the
inflow. A final model of the system is given below.

Enter this complete system into MATLAB. Note the value of the time delay and
the time constant may differ in your case. Use your own values.

s=tf('s');
sysd=exp(-35*s)*(1/(25*s+1));
sysp=exp(-14.7*s)*(1/(21.3*s+1));
sys=[sysp, sysd];
step(sys)
The system can be controlled by adding a controller to the voltage/temperature
loop.
The PI controller is designed using standard formulas as:

1
C (s)=K c (1+ )
τc s

where

K c =0 . 859(θ/τ )−0 .977


τ c=(θ/τ )0. 68 τ /0 . 674

Enter the controller and form the closed loop system. See the system
performance after the controller.

kc=0.859*(theta/tau)^(-0.977);
tc=((theta/tau)^0.68)*tau/0.64;
sysc=kc*(1+1/(tc*s));
syspf=sysp*sysc;
syspf=[ss(syspf) sysd];
syspfcl=feedback(syspf,1,1,1);
step(syspfcl)
a) Determine the output T(z) using modified Z-transform if the sampling
time used is 0.5sec

2. Consider a missile control system shown below. The first diagram is


conceptual digital control block and the others are equivalent blocks. We
consider the third block diagram for the questions which follow.

i) Find the closed loop transfer function of the system for T=0.1 with K as
variable
ii) Find the difference equation which expresses the closed loop missile
acceleration output signal assuming the acceleration command to be
unit step, assume K=1 and T=0.1.
iii) Compute the sample output values of the closed loop missile
acceleration output for sample values from k=0 to k=20 using MATLAB
program, assume K=1 and T=0.1. Plot the calculated values. Check your
outputs using inverse method.
iv) Determine the maximum value of K that the system can tolerate before
it becomes unstable using Juriy’s stability criteria
v) Draw the root locus and bode plot using MATLAB

You might also like