Académique Documents
Professionnel Documents
Culture Documents
design
Z3369433 (Nguyen Duc Dung)
1/ Requirement Analysis
The aim of this lab is to apply concepts learned from third year control and
electronic system course to design and implement a system will achieve a
desired temperature profile. For this task, the heating element/ load (a resistor)
powered by a dc generator that is driven by driven by dc motor will be used to
represent a generator plant. The user will drive the DC motor that will drive the
generator by constant input power supply. The output voltage from generator is
passed through a constant resistor where temperature is created by power loss.
Temperature sensor then is connected to load to measures loads temperature
and controls the speed of dc motor to reach desired temperature through
controller.
Hard requirements:
+ The system should be designed with minimise the rise and settling time
without the overshoot, also there is no steady state error of zero.
Soft requirements:
From the figure about, it can be seen that the computer is connected to DAQ
which is connected to the controller set. From the computer, the user can select
their desired output temperature (example like 45 degree) of load by changing
the input supply. Since, the central core of this design is the controller which PI
controller is selected as it can able to meet the desired requirements (This is
analysis in more detail in the low level design below). The output temperature of
load is observed by thermistor to display in MATLAB and the generators output
voltage which passed the load is feedback to compare with supply voltage. The
set of operation amplifier differentiation as a comparator is choice to set up
system to reach the desired temperature (This is explained in more detail in the
next section). The output of the comparator is fed into the PI controller which
adjusts the output voltage of the generator which further to meet the user
requirements. Then the MATLAB function is used to display on the computer the
values of loads temperature changing with times.
Form the left to right of the figure 1 above, the first schematic is the
representation of motor equivalent circuit, which is connected to the equivalent
circuit of generator (generator is showed in the right) via comment gear
connection. To determine the transfer function the plant, the characteristic
equations of motor, generation, Newton and Kirchoffs laws are applied at each
state of the plant. However, the element heat (load) is connected series with
generator. Therefore, the equivalent of motor below is considered first in order to
calculate the plants function.
The figure above is the equivalent circuit of DC motor which the permanent
magnet DC motor. Since, it is reasonable to assume that the field of motor is
fixed, or the current from power supply supplied only flow into the armature
circuit.
From the motors equivalent above, a constant voltage from power supply (V_in)
is used to passing Rm and Lm which are the resistance and inductance of DC
motor respectively, where the resistance of the system can be calculated by
holding and putting in a constant voltage supply, discussed below.
To find the transfer function of motor, the KVL theory is applied to armature
circuit to calculate the input voltage V_in(t)
di(t)
Lm + Rm i ( t ) + Em =V ( t ) (E.1)
dt
Where
Em =K e w m is the back EMF of the armature which
Ke is the electric
dw
T =J T + wm D+T L =K T i(t) (E.2)
dt
Which
KT is the torque constant, D is the damping constant,
JT is the
w m (t) . Let assume that our motor is built with the perfect structure and it is
able to ignore the torque loss by damping and the loss as the friction is assumed
to be negligible. Since, the developed torque can rewrite in the form.
dw
T =J T =K T i(t) (E.3)
dt
Since, by substitutes the current input from (E.3) into input voltage function (E.1)
and Laplace transform is applied. Since, the transfer function of motors speed
over voltage input is in the form,
(s) K
=
V (s) J Lm s 2+ R m Js+ K 2 (E.4)
K T =K E
With K = as the friction is ignored.
However, by substitutes the current input from (E.3) into the input voltage, then
time both sides of (E.1) to input current i (t) , the right hand side of new
function became the power input of motor. After that, the Laplace transform is
applied into both side of new equation and the transfer function between the
speed of motor square over power input is became (E.5).
w2 (s) K2
= (E.5)
P (s) sJ (J L m s2 + Rm Js+ K 2 )
di ( t )
Lg + R g i ( t ) + E g=V out ( t ) (E.6)
dt
Which
Lg and
Rg are the generators inductor and generators resistor
respectively.
Again, the developed torque T is balanced by the load torques is considered for
generator. By apply the same process in motors transfer function. The transfer
function of generators output voltage over the generator speed and also the
transfer function between outputs power and speed square are determined in
(E.7) and (E.8) respectively below.
The connection between motor and generator are similarly displayed in above
via comment inertial momentum J. Also, DC motor and generator are connected
by very plastic tube which the friction force is ignored in transfer bar. In the other
way to say that the motor rotational position is equal to the rotational position of
generator or the speed of motor will equal to generators speed (This is
d(t)
explained by w= .
dt
Since, when equation (E.4) times side by side to (E.7) and (E.5) times side by
side to (E.8), the results of these two mutilations showed the transfer function
between output voltage over input voltage and power input power over output
power of motor and generator respectively in equations (E.9) and (E.10) bellows;
2 2
V out (s) ( K J L m s L m Js)
= 2 2 (E.9)
V (s) J Lm s +R m Js+ K
The plants system consists the combination of DC motor and generator with the
load, which is connected in serious with the output port of generator. These
combinations are displayed in figure below;
the load. P is the power generated in load and m is the mass of resistor which is
heated up by T with time t. By the changing temperature with time t, it is
reasonable to rewrite as
dT
Q= P dt=mc (E.11)
dt
T (s) (K 2J Lm s2Lm Js )
= (E.13)
P (s ) mc s2 (J Lm s 2+ R m Js + K 2)
DC Motor +
Generator
Since to displace the step response of plant function, the variable
measurements of both motor and generator are measured follow section.
Resistor(R):
Let assume the rotor and shaft to be rigid, by apply Kirchhoffs Law, the input voltage is
displayed in equation (E.1). To calculate the resistor of motor, let assume the friction force of motor is
large enough which motor cannot rotate with constant supply voltage, since there is no angular
movement and the voltage only induces in resistor or current is constant.
To deal with this assumption, the inertial of motor is hold standstill with some constant supply
voltages and the currents for different voltages are measured by multimeter. Then, the resistor of
motor is measured by using Ohms law. Since, the resistor of motor is 0.556 Ohm. Similar with this
process, the generators resistor is 0.630 Ohm.
Inductor (L):
To calculate the inductance, the time constant of step response is need to derive the value of
the inductor. To do with this, the small impedance in series with the armature resistor (Like
10 KOhm) as the load of motor is introduced. Again, the motor is blocked with a small
constant supplied voltage (3 voltages), since the voltage only induces in resistor. Then the
supply voltage is removed as fast as possible to obtain the display of motor step response
which is loaded. The time constant can be obtained in the motors step response figure, also
according to the formula , the impedance of motor resistor can be calculated.
Lm=165 H
Then, the inductance of motor is . Similar with generator, the inductance is
Lg =186 H
.
Inertial movement (J):
To measure the inertial movement (J) of both generator and motor, the
angular speed measurement mechanism is attacked to the axle
connection of motor and generator. This mechanism consists a disk with a
single hole in it and the combination of lamp and phototransistor aligned
on opposite side of the disk. Each time, the light passed the
phototransistor when motor rotates, the latter observed the light and
turns on producing a narrow pulse in a suitably designed circuit. A
diagram of the speed sensing circuit is show in figure below which the
light is supplied with 9 voltages.
dw
T =J T =K T i(t)
dt
Since at constant 9 voltage supply, the torque of motor is the product of current
dw 598 262rad /s 2
Since, the slope of speed over time at:
= =1401.5 rad / s
dt 0.320.08 s
T /dw
Therefore, J =
= 3.13* 106
dt
Since our transfer function has 2 zeros and 4 poles which 2 poles are
located in original.
This transfer function has 2 poles at -3.3814* (e +3) and -0.0065 * (e +3)
and zeros at -3.4058* (e +3) and 0.0058* (e +3) . The step responses of
this transfer function as:
Since to design control system for this plant function, our system will be in
the form:
Figure: block diagram.
Plant K*G(s) is the transfer function of v_out/vin which v_out is the output voltage
passed thermistor, feedback is the unity feedback.
4/ Implementation:
To implement in the real circuit system, our system is in the form. Which
V_supply is the constant supply voltage and vo is the output voltage of
generator.
Error amplifier
Error amplifier in this circuit is used to compare the supply voltage to the output
voltage. The main idea of this function is to set the setting point voltage of
system. We have the temperature of thermistor will reach to 45 degree when the
generator output voltage or feedback voltage at 6.9 voltages. Also, the supply
voltage is constantly at 6.9 voltage by voltage dropped into 4.6 Kohm resistor.
Since, when the feedback voltage is less than 6.9 voltage (constant supply), the
current from generator keeps supply to circuit to heat the resistor up. When it
reached around 6.9 voltages, the output voltage of this system is 0, or motor is
stop and no more current supplied to load. The circuit of error amplifier is showed
as,
In figure above, E3 op- amp is the node to combine and produce the difference
voltage between V_supply and feedback voltage. E5 has the DC gain at 2.6, since
it will pick up the output voltage of E3. While both of E1, E2, E4 and E 6 op-amp
are the bucks, also the bucks input voltage will similar to output with better
stability.
Controller:
The output voltage from error amplifier is connected to the input of controller.
Since, to control the minimise rise time, no overshoot and steady state error
zero, PI controller is the best choice as we do not need D in this design, as our
system always stable. Proportional-integral-derivative controller is the method to
correct the error between the processing point and the desired point in the
system. The system of PI controller is showed as
.
Proportional Gain Kp: Larger values of Kp means faster response as larger the
error, the larger the proportional term compensation. A very large value of
proportional gain can lead to instability and oscillation.
Integral Gain Ki: Larger values of Ki means steady state errors are removed
faster. The trade-off is larger overshoot: any negative error during transient
response must be integrated away by positive error before we reach steady
state.
Since by the applied of MATLAB to test for each value of Kp and Ki respectively.
We can able to tell that when Kp= 0.01 and Ki =80, our plant transfer functions
step response will observe the minimise rise time.
Thermistor:
Fs=10;
NFFT = 1024;
% Getting initial Data
session = daq.createSession('ni'); % create the NI session for DAQ
ai = analoginput('nidaq','Dev1'); % defining the analog input and DAQ
device
ao = analogoutput('nidaq','Dev1'); % set the analog output and DAQ device
output
addchannel(ao,0);
addchannel(ao,1);
addchannel(ai,0);
%Set Duration
sample_time = 8;
set(ai,'SampleRate',Fs);
sample_size = sample_time * Fs;
set(ai,'SamplesPerTrigger', sample_size);
[Data,Time] = getdata(ai); % get data from the input channel and store in
two vectors for data and time
%acqData(1)
temperature(Time, Data)
end
current = (Data(i))/9820;
for z = 1:length(current);
resistor = (9 (Data(i)-DataOffset)/current;
temp3 = (log(resistor/10000));
temp4 = (temp3/belta) + 1/(temp2); % invert temperature in K
temp(a) = (1/temp4);
a = a + 1;
end % end second for loop
% a = a + 1;
end
figure(1);
plot(Time,temp);
title('Temperature per time');
figure(2);
plot(Time,resist_f);
5/ Test Plant:
Since, to test this circuit, 9 voltages is supplied to power both op am supply
voltage and controller supply voltage. With some things went wrong with our
core about, we cannot able to get the figure of both temperature and resistance
of thermistor. Oscilloscope also is used to check out our circuit. The constant 6.4
voltages is supplied into set point voltage, but our feedback voltage is only get
maximum up to 5.8 voltages. But when thermistor is heated up in long time
period, we tried to cool thermistor down while motor is running. The speed of
motor is speeded up, this showed that our controller circuit is working. Since, to
improve our circuit, the other op amp is used to increase feedback voltage up to
7 vols.
6/ conclusion
This experiment greatly increased out knowledge of control systems and
electronics. We also able to find out our weak in this area, so more practice and
research in control and electronics are needed to improve our knowledge.