Professional Documents
Culture Documents
net/publication/266222999
CITATIONS READS
2 11,852
4 authors, including:
Some of the authors of this publication are also working on these related projects:
Multilevel Power Electronics Converters for Renewable Energy integration with Power Grid View project
All content following this page was uploaded by Sham Sunder on 01 April 2015.
Syed Ali Asad Rizvi, Sham Sunder, Farah Haroon, and Ashab Mirza
1 Introduction
The idea of using software practices in engineering education has been widely
explored [1]. From design simulation to implementation phases, the role of software
has been proven outstanding. Another trend that we have been experiencing is the
replacement of existing bulky electronics hardware with computer programs by
bearing the functionality of the real one. This is what virtual instrumentation is all
about. The key idea is that an engineer can use routines running on a computer
combined with data acquisition hardware to define a custom built-to-order test and
measurement system.
An important contribution of our work is the realization of graphical programming
language not only for data acquisition and measurement as in [2] but also for
designing intelligent controllers for real time control purpose. The DC drive
application in this paper extends the work in [3] where only the monitoring system of
drives for performance analysis is provided. The thermal system application also
enhances the work in [4] in which a VI based ON-OFF controller is developed
whereas; a PID controller is exercised for both control applications presented in this
paper.
B.S. Chowdhry et al. (Eds.): IMTIC 2012, CCIS 281, pp. 397–408, 2012.
© Springer-Verlag Berlin Heidelberg 2012
398 S.A.A. Rizvi et al.
2 Virtual Instrumentation
associated with the characteristics of the physical quantity being measured and are not
concerned with how the measurement obtained will be viewed and/or processed by
subsequent stages. The presence of software programs in VI contrasts it from the
conventional instrumentation. Consequently, this new paradigm has its own set of
characteristics. Table 1 summarizes the differences between the two approaches.
• Flexible software
• Modular data acquisition hardware (DAQ)
• Computing platform (e.g. PC)
The flexible software is the computer program on which the virtual instrument is
made; modular hardware is a plug-in input/output data acquisition hardware that
transforms the real world signals into digital form. The third important component is
the computing platform for e.g. a PC that provides the interface between flexible
software and data acquisition hardware along with the necessary synchronization
between the first two components.
d 2θ dθ
J 2
+b = Ki (3)
dt dt
di dθ
L + Ri = V − K (4)
dt dt
The Laplace transform of (3) and (4) can be written as:
Js 2θ ( s ) + bsθ ( s ) = KI ( s ) (5)
V − Ksθ ( s)
I (s) = (7)
R + Ls
V − Ksθ ( s)
Js 2θ ( s) + bsθ ( s) = K (8)
R + Ls
Hence, the transfer function from the input voltage ‘V’ to the angular velocity ω(s) is:
402 S.A.A. Rizvi et al.
ω ( s) K
G ( s) = = (9)
V ( s) ( R + Ls)( Js + b) + K 2
The model assumes that rotor and shaft are rigid. Also, the effect of change of
coupling factor when a load motor is driven through shaft couplers is ignored.
Digital PID Controller Design. The PID controller is the most common form of
controllers and there are several algorithms [8] for implementation of a digital PID.
Depending upon the design requirements, one algorithm may be better suited than the
other. The PID equation that serves as the basis for implementing digital PID is given
by equation (10).
Kd
m(n) = Kpe(n) + KiTs (n) + [e(n) − e(n − 1)] (10)
T
Where, Kp, Ki and Kd are the gain parameters, T is the sampling time, e(n) is the error
at nth sample and s(n) is the sum term of the integral.
The pseudo code for the control law given in equation (10) is as follows:
1: Start
2: Initialize Kp, Ki, Kd, T, s[n]
3: Initialize PID equation
4: forevery e[n] {
5: P := Kp * e[n]
6: s[n] := s[n-1] + e[n]
7: I= Ki * T * s[n]
8: D := Kd * (e[n]-e[n-1]) / T
9: m[n] := P+I+D
10: if (m[n] > mmax)
11: m[n] := mmax
12: }
13: End
A simple conditional limit of exceeding the sum term may be added to prevent
integral windup. This added flexibility of controller modification is a clear advantage
of using a software solution provided by virtual instrumentation. Finally, a LabVIEW
block diagram-m code for the PID controller is developed as shown in Fig. 4.
The PID controller output is meaningless for DAQ PWM channels until it is
converted to its equivalent PWM form. As we know that valid PWM duty-cycle
ranges lie between 0 – 100% which means that there is a need to devise a method of
PID to PWM conversion. This can be achieved using equation (11) as,
PIDout
PWM = × 100 (11)
PID max
Virtual Instrumentation for Control Applications 403
where, PIDout is the controller output and PIDmax is its maximum value. The next
question that immediately arises here is the value of PIDmax that must be kept. Using
computer simulation the output of PID controller is determined for safe gain ranges.
The PID output values remained within 5000. Thus, PIDmax can be assigned this value.
In this way PWM actuation signals are generated.
and I/O response plots for measuring transient and steady-state response of the drive.
To improve the user interaction, the status of PWM switching circuit (not actual
PWM circuit but a simplified motor switching animation) is updated by the use of
animated indicators at the front panel. The effect of PID tuning and sampling rate can
be observed in the wave-form chart that are also updated in real-time; thereby
increasing our sense of transient specifications being changed with respect to the
gains and the sampling interval.
The results displayed in the response show that the motor approaches the set-point
in 5 seconds with time constant of 2.3 seconds and an error of 1.3 %. A low-pass filter
is employed to reduce spikes arising from vibrations due to imperfect coupling
between the drive and load motors. However, the use of filter slows down the
transient response as well.
The essential parts of the overall system are shown in block diagram of Fig. 7. The
plant in this case is the wooden chamber whose temperature is being controlled using
continuous control technique of PWM actuation. The bulb is triggered with these PID
proportional PWM command signals.
The actual response of the physical system is practically determined and the data is
plotted in Fig. 8. The system can be approximated by first order differential equation
like that of simple RC network [9]. The temperature response may be given by
−t
T (t ) = (Tss − Ta )(1 − e τ ) + Ta (12)
Virtual Instrumentation for Control Applications 405
where, T(t) is the temperature at time t, Tss is the steady-state temperature, Ta is the
ambient temperature, and τ is the time constant.
Cooling Source. The fan is used to achieve rapid heat-loss by cooling at a higher rate
than achieved by natural convection. It obeys the Newton's Law of Cooling given by:
= −kωfan(T − Ta )
dT
(13)
dt
The minus sign in equation (13) shows falling temperature. The solution is given by:
− kω fant
T (t ) = Ta + (Ti − Ta )e (14)
where, k is the constant factor related to wooden box, ωfan is the fan angular speed
(assumed constant), Ti is the initial temperature before cooling, Ta is the ambient
temperature and T is the temperature at time t.
406 S.A.A. Rizvi et al.
Steady-State and DC gain. The response shown in the Fig. 8 is a general open-loop
response of the system. Instead of reaching the maximum value of 100 °C a lower set-
point of about 91 °C is provided. The system is able to achieve this temperature and
has no steady-state error. However, the transient response speed can be improved.
The first order transfer function of the system is obtained from its mathematical
model equation and is given by:
1
H ( s) = (15)
sτ + 1
When the fan is used to introduce disturbance intentionally, the error initially
increases but the bulb PWM actuation is also increased further to counteract it. The
practical gains were found to be close to the ones determined using simulation. The
final response obtained after some slight tuning is shown in the Fig 11.
5 Conclusion
The applications presented in this paper are based on a hardware software co-design
technique. This strategy minimizes the hardware involvement and consequently
reduces the overall system cost. The virtual instrumentation techniques allow rapid
application development. The portability and large storage capability offered by new
PCs enables to carry large number of virtual instruments anywhere. Since,
commercially available DAQ cards are expensive, therefore it is imperative to design
and develop such systems locally. In the light of the results of both VI based designs,
408 S.A.A. Rizvi et al.
References
1. Ugurlu, Y.: Measuring the Impact of Virtual Instrumentation for Teaching and Research.
In: IEEE Global Engineering Education Conference (EDUCON), pp. 152–158 (2011)
2. Portillo, E., Cabanes, I., Marcos, M., Orive, D., Sanchez, J.A.: Design of a Virtual-
Instrumentation System for a Machining Process. IEEE Transactions on Instrumentation
and Measurement 56(6), 2616–2622 (2007)
3. Eren, H., Fung, C.C.: A Virtual Instrumentation of Electric Drive Systems for Automation
and Testing. In: Proceedings of the 17th IEEE Instrumentation and Measurement
Technology Conference, IMTC, vol. 3, pp. 1500–1505 (2000)
4. Prema, K., Kumar, N.S., Sunitha, K.A.: Online Temperature Control Based on Virtual
Instrumentation. In: International Conference on Control, Automation, Communication
and Energy Conservation, pp. 1–4 (2009)
5. Tang, Z., Xian, F., Fen, L.: Design and Implementation of a Temperature Control System
Base on Convenient DAQ. In: 27th Chinese Control Conference, CCC, pp. 374–376
(2008)
6. Mirza, A., et al.: IPO Pakistan patent 14063: USB Data Acquisition Card. Issued (June 29,
2011)
7. Chen, J., Zeng, X., Zhang, C.: The Portable Data Acquisition System of Cutting Tool
Condition Monitoring Based on Labview & Wavelet Analysis. In: International
Conference on Computer Application and System Modeling (ICCASM), vol. 7, pp. 375–
378 (2010)
8. Seborg, D.E., Edgar, T.F., Mellichamp, D.A., Doyle, F.J.: Process Dynamics and Control,
3rd edn., pp. 145–146. John Wiley and Sons (2010)
9. Bolton, W.: Control Systems, 1st edn., Newnes, pp. 49–50 (2002)
10. Hellerstein, J., Diao, Y., Parekh, S., Tilbury, D.M.: Feedback Control of Computing
Systems, pp. 332–333. Wiley-IEEE (2004)