Vous êtes sur la page 1sur 16

Lab1: Control/ Electronics system

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:

+ Design an analogue control system to control the temperature of heat resistor


(load) with the input supply not exceeds 9 voltages. At starting at room
temperature (assumed 25 degree), the heating element should reach a
temperature of 45 degree.

+ When the resistor is heat up to 45 degree, the thermistor resistance at 4372


Ohm, and the power dropped is 1 W. Since, the voltage dropped 2.09 voltages
when 9 voltages supplied to thermistor. Since, to heat the resistor up to 45
degree, the voltage output of generator around 6.9 voltages.

+ Maintain constant temperature

+ 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:

+Displaying the various output parameters such as temperature, resistance of


thermistor with time.

2/ High level design:


The system is using a traditional feedback system which the output of the plant
will be controlled by controller. This whole high level design system includes the
input desired reference voltage created by DIQ, the designed controller, the plant
(Motor, generator and load set) and the display method of temperature by using
MATLAB.

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.

However, the setting of reference voltage should be flexible. Since, it is able to


use DAQ analogue output pin to set the reference voltage in MATLAB to collect
various plant systems variables. Therefore, the transfer function of the plant is
needed first before design any controller system. The next section will describe
the process to calculate the plant transfer function and controller system.

3/ Low level design:

a/ Modelling the (motor/ generator and load) plant:

Before the controller system is implemented, the transfer function of plant


system which is included generator, motor and heat resistor needs to be
estimated first. The circuit of plant function without heat resistor (load) is showed
in picture below.

Figure 1: Schematic representation of the considered DC motor and DC generation.

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.

Transfer function of the motor:

Figure 2: The equivalent circuit of DC motor.

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

filed constant and


w m is the motors speed with constant inputs voltage.

Also the developed torque T is balanced by the load torques as given by

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

inertial of motor and


TL is the torque loss in the motor with the speed at

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 )

Transfer function of generator:


To calculate the transfer function of the generator, the equivalent circuit of DC
generator that is supplied by permanent magnet field is considered. Since, the
generator has the same structure of the DC motor above (Figure 1), which the

output voltage is created by constant back EMF field


E g=K e w g . With wg is
the speed of generator that is created by the comment connection with motor
drive. The KVL theory is again applied to armature circuit to calculate the output
voltage V_out(t) of generator, that is in the form.

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.

V out (s) ( K 2J Lm s 2Lm Js )


= (E.7)
w ( s) K

P out (s) sJ ( K 2 J Lm s2R m Js)


= (E.8)
w2 (s ) K2

Motor and generator transfer function:

Figure: motor and generator connection

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

P out (s) (K 2J Lm s2L m Js)


= (E.10)
P ( s) (J Lm s 2+ R m Js+ K 2)

Plant transfer function

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;

Constant load resistor is connected to generator, since the heat of load is

determined in the form Q= P dt=mc T , when constant current is through to

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

By apply the Laplace transform to (E.11), the output power of load is in


the form;

Pout ( s)=mc T s 2( s) (E.12)

Follow by conservation of energy, since the output power of generator will


equal to power is created in load. Therefore, by substitutes Pout ( s) into
(E.12), the transfer function between the temperature and input power
became,

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.

b/ Measure DC motor and generator parameters:

Resistor(R):

Again, the approximate model of motor can be described in the figure


below;

Fig.3 Schematic representation of the considered DC motor.

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.

Fig.3 Speed measurement circuit


Since, the analogue output of DAQ is used to obtain the voltage that
crossed the photo diode. The DAQ output displayed the peak voltage with
given sample time. Since, to find the speed of motor, the speed at each
indices location are report and it is used to converts into rpm. Since, we
can able to get the speed of motor over time.

Account to the developed torque in both motor and generator in (E.2)


which both damping and fraction are ignored, the developed torque is
proportional to the changing speed over time.

dw
T =J T =K T i(t)
dt

Since at constant 9 voltage supply, the torque of motor is the product of current

and constant torque


K T . Also, the changing of speed over time is the slope of

speed over time graph. Account to the speed graph;


{tt=0.32
=0.08 seconds , speed=2500rpm
second , speed=9714 rpm

dw 598 262rad /s 2
Since, the slope of speed over time at:
= =1401.5 rad / s
dt 0.320.08 s

Also, T K T i ( t )=4.39 nNm

T /dw
Therefore, J =
= 3.13* 106
dt

3/ Step response characteristics


In order to describe the performance of a control system, it is often useful
to consider the step response of the system. Since by apply the
measurement parameters into the plant transfer function, the plant
transfer function of temperature over power in is in the form.

T ( s ) 5.809 e10 s21.975 e06 s+ 1.142e05


=
P ( s ) 1.166 e09 s4 + 3.949 e06 s 3+ 2.569 e05 s 2

Since our transfer function has 2 zeros and 4 poles which 2 poles are
located in original.

The step response of plant transfer function is showed in figure below:


From the picture above, both rise time, setting time, overshoot and steady state
error are infinity, since we cannot able to control from the transfer function. Also,
it is not the stable function. Therefore the four order system cannot be used in
this design. To make easier, the second order function of voltage output over
input voltage is used. It is in the form of:

V out (s) 5.809 e10 s2 1.975 e06 s +1.142 e05


=
V ( s) 5.181 e10 s 2+1.755 e06 s+ 1.142e05

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:

Figure: Step response of v_out/ v_in

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.

The system of controller is built by circuit:

Which C1 is representation to the proportional controller gain as 0.01 and C2 is


the integral controller which gains around 80. C3 is the summer of both
proportional controller and integral controller. While, C4 is the buck op amp
which is used to increase the stability of output voltage. However, by using PI
controller the input voltage passed into controller will equal the output voltage.

Thermistor:

The thermistor is supplied by a constant voltage and connected serious to 10


Kohm resistor. When 45 degree temperature of resistor is reached, the R_therm
will be around 4372 Ohm. Also, the resistance of temperature will decrease when
the temperature is heating up. Since, to observe the changing temperature of
load and resistance of thermistor, DAQ analogue output is used to observer the
voltage across thermistor. The code below wills implementation of how DAQ get
input

function [Time, Data] = motorcont

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);

start(ai); % start the analogue input channel to


make it ready to receive data

[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

Where function temperature is used to calculate the temperature of resistor and


the changing resistance of thermistor over time.

function temperature(Time, Data)


DaqOffset = 1.30;

% Find the temperature version time

belta = 3977; %constant value


tempa = 25; % Environment temperator

% Find the first temperature


current1 = (Data(1)-DaqOffset)/9820; %9800 is the value of resistor
resistor1 =(9 - (Data-DaqOffset))/current1;

temp1 = (log(resistor1/10000))/(belta) + 1/(tempa+ 273); % invert


temperature in K
temp2 = (1/temp1); % change to C
a= 0;
for i = 1:length(Data);

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

%plot the temperature with Time;

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.

Vous aimerez peut-être aussi