0% found this document useful (0 votes)
5 views

PRE_LAB_1

Uploaded by

Deniz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

PRE_LAB_1

Uploaded by

Deniz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

EEE-342 Feedback Control Systems Pre-Lab Report

Deniz Erkan
Department of Electrical and Electronics Engineering, Bilkent University, 06800 Ankara, Turkey

1. Introduction To calculate the transfer function, we need transfer func-


tion:
In this pre-lab work the main goal is to calculate the first
order transfer function and compare the results hand
calculations with MATLAB Simulink function.

2. Laboratory Content
1) Ke
Question 1:

In the first question, it was asked to suggest a method to 2) s2 Kt


find a first order approximate transfer function between
the angular velocity, ω(t), and input voltage υ(t). To find
this relationship we should use torque, inertia, back EMF From 2 we get: s2
formulas to obtain their transfer functions. Then, we have
to assume that L = 0 to obtain a first order transfer func-
tion. Put into 1: s2

Ke
Torque Formula: Kt

Mechanical Equations: Ke s2

θ’’ θ’’

Back EMF Formula: Ke θ’


Transfer function:
where Kt and Ke is a constant, b is the friction term.

Since, using Laplace transform

Fig. 1: Back EMF Circuit

Where υ(t) is the input voltage and L = 0.

1)

2)

θ’’ Kt θ
To determine the order of a transfer function we should
find the s’s power in the denominator. In our case s
Where θ(t) is the output function and υ(t) is the input prime is equal to 2. So this transfer function is second or-
function. der. In the question, it is asked to find first order approxi-
mation. To obtain first order transfer function L = 0 τ = 0.137 s
which will make .
H(s) = =

Which is first order transfer func-

tion between the angular velocity and input voltage. |ℜ{pT F }| =

This equation also can be written as


|ℜ{pLP F }| = 1000

|ℜ{pT F }| < |ℜ{pLP F }| / 10 condition is satisfied.


to be able to find gain and time constant.
Since this condition is satisfied pole of the transfer func-
tion is dominant compared to the pole of LPF.
and

Since our input is 6V as step change we can take it as the


6u(t). Then,

and

By reverse Laplace transform w(t) = 6K (1- e-t/τ ).

From the MATLAB using round function we observe the


stady state response of angular velocity.

Yss = 98
Fig. 2: Original Velocity Plot
To find the gain we have to dive Yss value to magnitude
of the input value. In our case magnitude value of the in-
put is equal to 6.

K = 16.33

To find the time constant we should choose a point of t


such that t = 0.05.

w(t) = 6K (1- e-t/τ )

Fig. 3: Transfer Function Plot

From MATLAB ω(t) = y(t) = 29.9436 and K =16.33 so


faster response that others. It helps to decrease overshoot
with a proportional action to current error of the system.
Increase in KP, proportional gain, makes control process
more speed while reducing overshoot. If KP increases the
settling time will decrease because system will take faster
action to the error. Increase in KP will decrease peak time
by speeding up the system to reach the final value.
Higher values of KP can lead to instabilities.

Integral controller generally used for reducing steady-


state error and improve settling time with continuous ad-
justing system, if tuned properly with KI, integral gain. It
does not have a specific effect on peak time, generally
make steady-state response much more effective. Too
much integral gain can lead to oscillations.
Fig. 4: Output Plot Filtered with H(s)
An integral controller is needed in control systems since
we have to correct steady-state errors continuously which
has no limitations as proportional controller. It accumu-
lates errors in the system by continuous integrating sig-
nals.

3. Conclusion
The main goal of this pre-lab is to het familiar with
MATLAB Simulink function using given data set. In the
first part, I suggest a way to calculate transfer function
with given input r(t) = 6 u(t). Then using the same logic,
I wrote the MATLAB part to compare the results of
transfer function and filter H(s).

The given velocity data set occurs with so many oscilla-


Fig. 5: Output Plot Filtered with T(s) tions. In Fig.4 we can observe the output which filter
with H(s) and in Fig.5 we can observe the output which
used calculated transfer function.

Transfer function gives us a model where there are no os-


cillations, if we use H(s) for this process we end up with
more oscillations.

Using these plots with the knowledge in the question-2, I


Fig. 6: Simulink guess that proportional controller is similar to H(s) filter-
ing process since it does not work continuously we can
Question 2: get oscillations. On the other hand, transfer function give
us a continuous error correction result same with integral
PI controllers generally correct the errors in the system controller.
by calculating the errors. The system is controlled by the
proportional and integral parameters of the PI controller.
REFERENCES
By adjusting these parameters, the error effect can be re-
duced. Overshoot, settling time, peak time are affected 1. Tutorialspoint, “Proportional Integral PI controller”.
by the system with parameters of PI controller. PI con- [online] Youtube.com. Available at:
trollers are better than on/off controllers, their adjustment https://www.youtube.com/watch?v=lVQxEwxVqgk
over the system is much more effective. 2. Libretexts, “PI, PD, and PID Controllers”. [online] en-
g.libretexts.org. Available at:
P controller minimizes the fluctuation in the process vari- https://eng.libretexts.org/Bookshelves/Industrial_and_S
able. Not always bring the system to desired point. A ystems_Engineering/
Introduction_to_Control_Systems_(Iqbal)/
03%3A_Feedback_Control_System_Models/
3.3%3A_PI%2C_PD%2C_and_PID_Controllers

APPENDIX

MATLAB Code

Fs = 10000; % 10 kHz
Ts = 1 / Fs;

numerator = 1;
denominator = [0.001, 1];
H = tf(numerator, denominator); %h(s)

Hd = c2d(H, Ts, 'foh');

syms s
syms x
filtered_velocity = filter(Hd.num{1}, Hd.den{1}, y);
filtered_velocity_Laplace = laplace(filtered_velocity, s);

L = laplace(6 * heaviside(x));
L1 = 1 / L;

transfer_function = filtered_velocity_Laplace* L1;


out = timeseries(transfer_function, t);

figure(1)
plot(t,transfer_function);
title('Transfer Function T(s)');
xlabel('Time');
ylabel('Transfer Function');

figure(2)
plot(t, y);
title('Original Velocity Data');
xlabel('Time');
ylabel('Velocity');

figure(3)
plot(out.simout1);
title('Output via H(s) Filter');

figure(4)
plot(out.simout2);
title('Output via T(s)');

t_start = 2;
t_end = 10;
t_interval = (t >= t_start & t <= t_end);
yss = round(mean(y(t_interval)));
K = yss / 6;

time_constant = 0.05;
tau = y(501);

You might also like