Anda di halaman 1dari 6

A LabVIEW Based Submarine Depth Control

Simulator with PID and Fuzzy Controller


Mehmet Ekici, Hakan Kahveci, Adem Sefa AKPINAR
Karadeniz Technical University, Department of Electrical and Electronics Engineering, Trabzon, Turkey
mehmet.ekici@ktu.edu.tr, hknkahveci@ktu.edu.tr, akpinar@ktu.edu.tr

Abstract— LabVIEW is one of the popular simulation program Systems which are act under the sea must be reach
in the academic and industrial applications. In this paper, online reference depth with minimum oscillation in a short time.
simulator for the depth control of a submarine has presented. In Oscillations around the reference depth exert extra pressure
order to keep the submarine at a certain level below the sea on submarine. So, the system depth must be checked
surface, a fuzzy logic controller (FLC) as a major control unit
continuously with a controller.
was designed and employed with LabVIEW Control Design and
Simulation Toolkit. Also comparison between fuzzy logic (FL) In this paper, LabVIEW based simulator for depth control
and PID controlled system was presented. Simulation results of a submarine has presented. Submarine depth was
show that system has better settling time and no overshoots with controlled with FLC or PID controller. Fuzzy logic and PID
FLC. controllers were built up with LabVIEW general blocks. PID
parameters can be adjusted via simulator interface during
Keywords-LabVIEW; Simulator; Submarine; Control; Fuzzy; PID simulation period.
The paper has organized as follows: Section two explains
I.INTRODUCTION the mathematical model of the submarine system. The
LabVIEW (short for Laboratory Virtual Instrumentation LabVIEW based simulator is explained in section three.
Engineering Workbench) is a platform and development Simulation is detailed in section four. Results and conclusions
environment for a visual programming language from are given in section five and six, respectively.
National Instruments. With the development of computer
technology, the drawbacks of traditional control system
simulation become more and more apparent. Putting virtual II. SYSTEM
instruments software into control system simulation system
will result in not only the cost reduction of the hardware, but A. The Mathematical Model of Submarine System
also the enhancement of the teaching or training effect. [1].
At the present time, LabVIEW simplifies the scientific The mathematical model is shown below as transfer
computation, process control, research, industrial application function representing the depth of submarine. Equation (2)
and measurement applications. Because LabVIEW has the represents submarine system mathematical model. The
flexibility of a programming language combined with built-in transfer function of the system is obtained by the Equation
tools designed specifically for test, measurement, and control. (3). Then the state-space model of the system is represented
Interfacing with real-world signals, analyzing data and at the end of this section.
sharing results are very easy by using the integrated
LabVIEW environment.
In literature many studies about submarine depth control,
controller designs and fuzzy logic systems have been
presented. Mality has decided to build on his growing
reputation as a flight control system designer and moved out
to the area of Submarines. Then he added a pitch feedback in
his system for taking better results [3]. Hao and others have
been presented two - step depth fuzzy controller and generic
algorithm. They have used seven membership functions for
error and its change. They have indicated that different fuzzy Fig. 1 Closed-loop submarine depth control system
controller system parameter coefficients should be employed
for each submarine depth [4]. Guo and others have been used
orbit control method and the desired orbit (depth) value with 5 1
a stable way. They have reached the target with PD controller G1 = 2
; G2 = ; (1)
[5]. Demirci have been proposed indirect adaptive control s + 9 s + 25 s
techniques for submarine depth control [6]. Ozkop have been
used five cauchy membership functions for error and its 5
change in his study [7]. G3 = G1* G 2 = (2)
s + 9 s 2 + 25s
3

978-1-4799-0661-1/13/$31.00 ©2013 IEEE


Fig. 1 shows closed-loop submarine depth control system . If ⎛ dx1 ( t ) ⎞
controller gain is equal K then closed-loop transfer function
⎜ dt ⎟
⎜ ⎟ ⎛ −9 − 6, 25 − 1, 25 ⎞ ⎛ x1 ⎞ ⎛ 0, 25 ⎞
is equal to ⎜ dx 2 ( t ) ⎟ = ⎜ 4 ⎟ ⎜ ⎟ ⎜ ⎟
0 0 ⎟ . ⎜ x2 ⎟ + ⎜ 0 ⎟ .u
⎜ dt ⎟ ⎜
⎜ ⎟ ⎝⎜ 0 1 0 ⎠⎟ ⎝⎜ x3 ⎠⎟ ⎝⎜ 0 ⎟

⎜ dx 3 ( t ) ⎟
⎜ ⎟
K ∗ G3 K ∗5 ⎝ dt ⎠
T .F = = 3 (3)
2
1 + K ∗ G3 s + 9 s + 25s + K *5 ⎛ x1 ⎞
⎜ ⎟
y = ( 0 0 5 ) . ⎜ x2 ⎟ (4)
⎜x ⎟
Equation (3) is the submarine’s transfer function. If K=1, the ⎝ 3⎠
state-space model of submarine is shown in Equation (4).

B. Submarine Depth Control with Fuzzy Logic, PID Controller Front Panel and Block Diagram

Fig. 2 Front Panel


Fig. 3 Block Diagram

Fig. 2 shows front panel of the system. There is start toggle to block diagram when simulation is running. The PID controller
run the simulation and reference slide for determine the set compares the set point (SP) to the process variable (PV) to
point of submarine. PID parameters slides are used as input obtain the error (e).
for changing P, I, D gains. User can see block diagram model
of submarine depth control system on front panel. When
simulation is running submarine sonar sound is started. Also,
user can see the controllers (PID - Fuzzy) effects on the
system during the simulation time. User can change the
reference value and can see the system response online.

Fig. 3 shows block diagram of the system. The block diagram


contains the graphical source code of a LabVIEW program.
The concept of the block diagram is to separate the graphical
source code from the user interface in a logical and simple
manner. Front panel objects appear as terminals on the block
diagram. Terminals on the block diagram reflect the changes
made to their corresponding front panel objects and vice
versa [8, 9]. PID and Fuzzy controllers subVIs are shown in
control and simulation loop. For simulation, there are used 30 Fig. 4 PID Controller Block Diagram
(s) simulation time, ODE Solver Runga-Kutta 3 and step size
0, 03 (s). e = SP − PV (5)
Then the PID controller calculates the controller action, u (t),
III. PID CONTROLLER where Kc is controller gain.

t
A. Design the block diagram with LabVIEW Kc de
u (t ) = K c e + ∫
Ti 0
edt + K cTd
dt
(6)
Fig. 4 shows that for the system a PID controller is designed
with LabVIEW. Kp, Ki and Kd gains are controlled online on
IV. SYSTEM WITH FUZZY LOGIC CONTROLLER
Triangular fuzzy membership functions are used in our
A. The Model of the FLC model.
Fuzzification stage and the first part of rule based fuzzy
A Fuzzy Logic controller consists of three sections; processing unit of the FLC are given in Figure 5. The crisp
fuzzifier, rule base and defuzzifier. Two input signals, the inputs e(k) and ∆e(k) are converted to fuzzy membership
main signal and its change for each sampling to the FL values on the fuzzy subsets NB, NS, ZZ, PS and PB. Each
controller are converted to fuzzy numbers in fuzzifier. Then fuzzy subset (FS) is represented by a triangular membership
they are used in the rule table to determine the fuzzy number function and shown by blocks in Figure 5. The letters E and
of the compensated output signal. Finally, the resultant united DE in Figure 5 are used to indicate whether the elements
fuzzy subsets representing the controller output are converted belong to error, e or its change ∆e respectively.
to the crisp values. Output points figured as mu1, mu2 ...mu25 have been
Fuzzy concluding mechanism works with; shown above mentioned, Figure 5 is Fuzzy mass coefficient
that equivalent to the each outlook point at the 25 ruled
If e is A and ∆e is B then ∆u is C. (7) Fuzzy Logic Controller defined in ∆u output space. In the
The Boolean operator “min” is used for the verbal expression takes part in central management, those
connector “and” to simulate the input space of the rules that coefficients are multiply with the absolute number that has
have the structure as in expression (7). A, B and C maximum member at the related membership function.
parameters are used instead of NB, NS, ZZ, PS and PB. In the Defuzzification part, as per central area, sum of the
A rule base is composed with 25 rules as to previous multiplying quantities at the portion need to be divided to the
expressions. (NB: Negative Big, NS: Negative Small, ZZ: represent of rule coefficient membership degree sum gained.
Zero, PS: Positive Small, PB: Positive Big) The block name as Fuzzification is a subsystem block
representing the executed process in Figure 5. By the way,
TABLE I. FUZZY RULE DECISION there is transformed to the subsystem block and represent
with the block named as fuzzy reasoning.

Fig. 5 Fuzzy controller of the system (fuzzifier, rule base and defuzzifier)
B. System with Fuzzy Logic Controller
TABLE III. FLC EFFECT (PO, Ts, Ess)
FLC which is designed in previous section has been
integrated in the system as a sub system block. Fig. 6 shows FLC
the system with FLC. P.O. 0,16
Ts 4s
Ess 0
P.O (Percent Overshoot), Ts (Settling Time), Es (Steady-state
error) are criterion of controller’s success.

Fig. 6 Block diagram of the system with Fuzzy Logic


Controller in LabVIEW

Fig. 8 Root locus graph and stability of the system

Fig. 7 Expected system output with Fuzzy Logic Controller


Ref. Depth (-800, -600,-400,-500)

It is shown below in Figure 7, the expected system output


signal for Fuzzy Logic Controlled system.

V. RESULTS
Submarine depth control system simulation was executed
by LabVIEW program. Suggested FLC systems and the Fig. 9 Submarine depth control system outputs with PID and
system with PID controller were designed by LabVIEW. Fuzzy Logic controller results.
A comparison between the suggested and designed
system was accomplished. When the settling time taken as Fig. 9 shows comparison of the PID and Fuzzy Logic
criterion, the system with PID and Fuzzy Logic Controller controllers. There are selected best parameters of PID.
gave almost the different results. For all these, it is expected
that the system simulated by the designed FLC has better VI. CONCLUSION
settling time output result than the PID. The system's root In this paper, a submarine depth control system simulation
locus is shown in Figure 8.Stability analysis was performed, has been designed. The suggested and designed systems have
and the system is stable. been simulated by LabVIEW program. LabVIEW is a
flexible and powerful program. When our simulation is
TABLE II. PID CONTROLLER EFFECT (PO, T s, Ess) running user can change input variable such as reference P, I,
D, and can be seen effects to the results of system. User can
P I D P I D P I D P I D P I D analyze root locus graph and stability of the system. With the
3-0,01- 0,2 4-0,01- 0,3 5-0,01- 0,1 6-0,01- 0,1 7-0,01- 0,1 gained results, a comparison between the suggested and
P.O. 0 0 0 %1,8 %4,48 designed system have been accomplished and it is quite
Ts 6s 5s 4,6s 4,2s 4s obvious that Fuzzy Logic Controller gives better result to us
Ess %0,55 %0,32 %0,20 %0,14 %0,10 than other controller.
REFERENCES
[1] X. Xuejun et. All ‘’Real-time Digital Simulation of
Control System with LabVIEW Simulation Interface
Toolkit’’ Proceedings of the 26th Chinese Control
Conference pp. 319-322, July 26-31, 2007

[2] P. Thepsatom et. All, “DC Motor Speed Control using


Fuzzy Logic based on LabVIEW” SICE-ICASE International
Joint Conference, pp. 3617-3620, Oct. 2006

[3]http://www.facstaff.bucknell.edu/mastascu/eCon
trolHTML/Problems/ThemeProblems/Submarines/Submarine
3Ord1.htm

[4] Yangling Hao,Donghui Shen and Zhilan Xiong, ".Design


of Submarine Near Surface Depth controller", Procedding of
the 5th World Congress on Intelligent Control and
Automaion, , Hangzhou, P.R. China, 4530-4533, June 2004

[5] Yang Gao, Meng Joo Er,"An Intelligent Adaptive Control


Scheme for Postsurgical Blood Pressure Regulation", IEEE
Transactions on Neural Networks, Vol. 16, No. 2, 475-483,
March 2005.

[6] Ufuk Demirci, Feza Kerestecioğlu, "Active


Reconfigurable Control of a Submarine with Indirect
Adaptive Control", 0-933957-30-0 IEEE, 2491-2495, 2003

[7] Emre Ozkop,Bulanık Mantık Denetleyici ile Denizaltı


Derinlik Kontrolü (2005), TOK 2005 Sempozyumu.

[8] http://www.ni.com

[9] http://www.ni.com/white-paper/7565/en

Anda mungkin juga menyukai