Sie sind auf Seite 1von 16

Schiff-Steuerung, Simulink-Modell shipmdl.mdl und shipmdl1.

mdl

rudder rudder
reference-angle hull-yaw-
angle
δc angle ψ
rudder δ
control ship-hull
Ruder- dynamics,
Regelung rotation

engine-
maschine-telegraph force
reference γ, 0....1 K ship speed modell ship speed u
ship mass
ship engine ship damping, friction
ship-hull dynamics,
forward-translation
ship bow ship stern
motion motion

bow bow stern stern


position position position position
x y x y
Hull rotation:
K 0.11
K* = = = 0.0146
δ c ( t ) − δ( t ) max − speed 7.72
δ& ( t ) =
δ c ( t ) − δ( t ) ⋅ TRudder + a m
max − speed = 7.72 , that is 15 knots
1 K * ⋅ u(t) s
ω
& (t) = − ω( t ) + δ( t )
THull THull THull = 7.5 Sekunden
ψ& ( t ) = ω( t ) TRudder = 11.9 Sekunden
a = .1 (only to avoid dividing by zero)
Hull longitudinal (translatoric) speed N
(surge): d = 23.55 ⋅ 10 3
( m / s)
1 K Pr op ,max
K&
Pr op ( t ) = − K Pr op ( t ) + γ(t) δ c = −0.7 rad.......0.7 rad
Teng Teng
m = 1.5 ⋅ 10 6 kg
d 1
u& ( t ) = − u ( t ) + K Pr op ( t ) Teng = 0.3Sekunden
m m
K Pr op ,max = 181 ⋅ 10 3
Bow position: γ = 0.......1
x& bow ( t ) = u ( t ) ⋅ cos(ψ ( t )) L = 50m ; shiplength
y& bow ( t ) = u ( t ) ⋅ sin(ψ ( t ))

Stern position:
x stern ( t ) = x bov ( t ) − L ⋅ cos(ψ ( t ))
y stern ( t ) = y bow ( t ) − L ⋅ sin(ψ ( t ))
u
y

δ
x
wheel 1 ship hull rotation yaw -angle
reference s
-K - omega psi
reference deltac rudder -angle 1 1
Divide Integrator
rudder -angle - Product 1 Kstern s s
to -be Divide 1 ship -yaw -angle psi
.3 Subtract 1 Integrator 1 Integrator 2
Trig .Function 1
a2 7 .5
Trig .Function
|u | Product Add
Thull sin
Subtract Divide 2 sin y stern
Abs
.1 rudder -angle delta y bow
Add 4 11 .9 ship hull rotation
actual time -constant ship -rotation omega
rudder time -constant a y bow
Trud rudder angle
1 Product 6
Add 2
0 s
rudder -reference deltac a : only to avoid
Product 2 Integrator 5 50
division by zero speed -effect
maximal
Add 5
propeller force Schiff Länge
1
1 bow -position Meter
s stern position
-K -
Constant 1 Product 3 Integrator 6
1
Kpropmax s
Divide 3 1 ship -speed u Product 7
Subtract 2 Integrator 3 cos
s
Divide 5 ship forward speed x bow Add 3
Subtract 3 x bow
gamma Integrator 4 ( surge ) Trig . Function 1
Add 1 gamma 1 cos
x stern
engine telegraph
.1 -K - (no sway ) Trigonometric
reference force Schiff -Steuerungs -Modell
Divide 4
Schiff : Shioji Maru Function 2
force -to -be Constant d
0 < gamma < 1 0 .3 Divide 6
damping factor Die Parameter -Werte können auch von
Teng of the ship ; einem MATLAB -Programm übergeben
mass of the 1 .5 e 6 friction werden . Vergleiche hierzu :
ship engine ship Subtract 4 Subtract 5
m rgtlabor 1 mdl .mdl und
time -constant
rgtlabor 1 paroptSystem 1 .m in Inhalt .txt
Modell : Tutorial 08 .pdf in Schiff /Schiff 2 / difference -position 1
Schiffübertragfkt .
Tutorial 8 – Ship Autopilot
(JEE344 Applied Control Engineering)

Aim
• To design and simulate an PID- based autopilot system
• To use simulation as a diagnostic tool to improve autopilot performance and select
control gains

Learning Outcomes
• Simulate a ship’s steering dynamics with LabVIEW
• Simulate PID autopilot with Auto/Man switch mode for course keeping and changing

Ship 1: Autopilot system for Shioji Maru using Nomoto’s model

Problem Statement
Let’s consider the Nomotor’s first order manoeuvring model:
Tr& + r = Kδ (or Tψ && + ψ& = Kδ ) (1)
ψ & =r (2)
where ψ is yaw angle (rad) and δ is rudder angle (rad, −40π /180 to +40π /180 , T = 7.5
seconds and K = 0.11. Ship speed is constant, v = 15 knots (1 NM = 1,852.00 m). The
steering machine model is
δc − δ
δ& = (3)
δ c − δ TRUD + a
where TRUD is rudder constant, TRUD = 11.9 (sec), and a is constant chosen as 1 to avoid zero
dividing. The ship’s heading is control by a PID autopilot system with control gains of KP, KI
and KD. It is assumed that the rudder angle for the PID autopilot is in range of -10o (port) to
+10o (starboard), rudder rate in range of -5 deg/s to +5 deg/s, error (between the actual yaw
angle and set course) in range of -180o to +180o, and yaw angle in range of 0-360o. The
position of the ship is represented by the following model:
x& = u sin ψ + v cos ψ (4)
y& = u cos ψ − v sin ψ (5)
where u is surge velocity and v is sway velocity (assuming that v = 0). Make simulation
program/s with LabVIEW.

Solution

1. Ship’s open-loop system

U (knot)
x
δc Steering δ Ship hull ψ Ship
y
machine dynamics trajectory
-40 to +40 0 to 360

Figure 1 Block diagram of the open-loop system

1
2. Block diagram algorithm for the ship’s hull dynamics:
1 K
r& = − + δ (6)
T T
ψ& =r (7)
Sum
× r& r [rad/s] ψ [rad]
×
× ÷ ∫ ∫
δ [rad] K T Divide Integrator Integrator Display ψ

Figure 2 Block diagram algorithm for ship’s hull dynamics

3. Block diagram algorithm for ship’s trajectory on the earth-fixed reference frame:
x& = u sin ψ + v cos ψ (9)
y& = u cos ψ − v sin ψ (9)

ψ [rad]
cos ×
+
× y& y
∫ x
sin ×
– Integrator
×
u [m/s] (0,0)

×
+ XY-Chart
v [m/s] × x& x
∫ y
×
+ Integrator
×

Figure 3 Block diagram for the ship’s trajectory (x – latitude, y – longitude)

4. Block diagram algorithm for the steering machine


δc − δ
δ& = (10)
δ c − δ TRUD + a

δc
+ δc − δ
δ& δ ×
∫ – abs × +
× ÷
Integrator +
Trud a

Figure 4 Block diagram algorithm for the steering machine

2
5. Ship’s Closed-loop Control System (Autopilot with Auto/Man Switch)

U (knot)
SP ψ d -40 to +40 0 to 360
x
PID δc Steering δ Ship hull ψ Ship
Autopilot machine dynamics trajectory y
GPS

ψm Gyro-
compass

Figure 5 Block diagram of the closed-loop autopilot system

The block diagram algorithm for PID autopilot with Auto/Man mode is below:
PID Autopilot

Comparator Sum
(Compound
SP ψ d Subtract Multiply Arithmetic)
PV ψ + Auto/Man
Kp P
Multiply Select
Integral uin OP
+ Auto
I
KI (Control signal)
Multiply Commanded
uin Man
+ rudder angle
To Steering
Derivative D
KD Machine

Figure 6 Block diagram algorithm for PID autopilot with Auto/Man switch mode

Hands-on Exercise 1 (Save as ShipSimulator01.vi)


Open-loop system without the steering machine & trajectory: Refer to Figure 2 and the
following sample code:

Figure 7 Sample code for the open-loop system without SM & trajectory

3
• Save the VI.
• Do testing of its functionality.

Hands-on Exercise 2 (Save as ShipSimulator02.vi)


Open-loop system with the trajectory (without steering machine): Refer to Figure 3 and the
following sample code:

Figure 8 Sample code for the open-loop with trajectory (without the SM)

Hint: When using the XY Graph for ship’s trajectory, uncheck “Clear data on each call”:

Figure 9 Setting the Build XY Graph

• Save the VI.


• Do testing of its functionality.

Hands-on Exercise 3 (Save as ShipSimulator03.vi)


Open-loop system with steering machine and trajectory: Refer to Figure 4 and the following
sample code:

4
Figure 10 Sample code for the steering machine

• Save the VI.


• Do testing of its functionality.

Note: You can add indicator/s and/or a waveform chart to display the commanded rudder and
actual rudder.

Hands-on Exercise 4 (Save as ShipSimulator04.vi)


Program a gyrocompass and set limits for ship’s heading in range 0 to 360o.

Algorithm to set limits:


If psi >= 2 π then psi = psi – 2 π ,
Else if psi < 0 then psi = psi + 2 π
Else psi = psi

C language code (Formula Node):


If psi >= 2*pi
{ psi = psi – 2*pi;}
Else if (yaw < 0)
{ psi = psi + 2*pi;}
Else
{ psi = psi}

MATLAB language code (MathScripts Node):


if (psi >= 2*pi)
psi = psi – 2*pi;
elseif (psi < 0)
psi = psi + pi*2;
else
psi = psi;
end

Hands-on Exercise 5 (Save as ShipSimulator05.vi)


Closed-loop system (Autopilot with Auto/Man)
• Save the VI.
• Do testing of its functionality.

5
Conclusions
At this point the following LOs have been satisfied:
• Simulate a ship’s steering dynamics with LabVIEW
• Simulate PID autopilot with Auto/Man switch mode for course keeping and changing

Follow-up Exercise
Modify the above program for ship autopilot system in consideration of the trajectory with
initial latitude and longitude (the Control Lab’s latitude and longitude!):
x(0) = current latitude = 41o27.179’ S
y(0) = current longitude = 147o04.246’ E
such that the ship’s position is expressed with latitude and longitude. One nautical mile is
approximately 1852 m, and equivalent to one minute of arc.

Refer to Nautical mile: http://en.wikipedia.org/wiki/Nautical_mile

6
Schiff-Modell

Ausgangspunkt für ein Schiff-Steuerungsmodell ist das folgende Bild.


Die Anströmung des Ruders hat eine Kraft F zur Folge. In dem Bild wird nur die zur
Längsachse senkrechte Komponente gezeigt, da auch nur diese Komponente zu einer
Drehung des Schiffes beiträgt. Die Drehung des Schiffes läßt sich wie die Rotation
eines Trägheitsmomentes modellieren. Vergleiche dazu auch das Beispiel im Skript
„Lange: Regelungstechnik“ .

Θ⋅ω
& ( t ) = −d ⋅ ω( t ) + M a ( t )

Für das Antriebsmoment gilt

L
M s ( t ) = F( t ) ⋅
2

y u ,surge
Drehwinkel des
Schiffes um die
Hull
Hochachse
Bow

Trägheitsmoment des ψ
Schiffes um die
Hochachse
ω
Θ Rotationsgeschwindigkeit
Anströmung des Schiffes um die
des Ruders Hochachse

Stern L/2
Ruder
δ F

Ruderwinkel x

Die Kraft F(t) wiederum hängt vom Ruderwinkel δ(t) und von der
Schiffsgeschwindigkeit u(t) ab. Eine einfache Modellierung hierfür ist die folgende
Gleichung:
~
F( t ) = K ⋅ δ( t ) ⋅ u ( t )

Damit erhält man für die Ausgangsgleichung


~
Θ⋅ω
& ( t ) = −d ⋅ ω( t ) + K ⋅ δ( t ) ⋅ u ( t )

und nach Teilen durch die Dämpfung bzw. Reibung d bzgl. der Schiffsrotation erhält man
~
Θ K
⋅ω
& ( t ) = −ω( t ) + ⋅ δ( t ) ⋅ u ( t )
d d
oder
T⋅ω
& ( t ) = −ω( t ) + K̂ ⋅ δ( t ) ⋅ u ( t )

Meist wird das Modell für konstante Geschwindigkeit gebildet und es folgt dann
das bekannte Nomoto-Modell. Bei näherer Betrachtung stellt man fest, dass das antreibende
Moment auch noch von der Ruder-Geschwindigkeit δ& ( t ) abhängt, deshalb der Term T3 ⋅ δ& ( t ) .
Der Grund für diesen Term ist, dass auch ohne Anströmung bei Ruderbewegungen eine Kraft
erzeugt wird, z.B. wie beim Rudern eines Bootes. Dieser Term, der die Nullstelle in der
Übertragungsfunktion ergibt, wird in vielen Modellen (auch hier) weggelassen . :

& ( t ) = −ω( t ) + K ⋅ (δ( t ) + T3 ⋅ δ& ( t ))


THull ⋅ ω
ψ& ( t ) = ω( t )

Für die Modellierung der Regelung des Ruderwinkels δ in Abhängigkeit vom Soll-
Ruderwinkel δC findet man in der Literatur unterschiedliche Ansätze. Hier wird das folgende Modell
verwendet:

δ c ( t ) − δ( t )
δ& ( t ) =
δ c ( t ) − δ( t ) ⋅ TRudder + a

Der Betragsanteil im Nenner soll den großen Kraftbedarf bei starken Ruderausschlägen
nachbilden. Der Summand a soll ein Teilen durch Null verhindern.
Im Großen und Ganzen verhält sich die Regelung des Ruderwinkels wie ein Tiefpass
erster Ordnung.

Die Schiffsmaschine wird ebenfalls wie ein System erster Ordnung modelliert und führt
auf die Differentialgleichung

& 1 K
K Pr op ( t ) = − K Pr op ( t ) + Pr op , max γ ( t )
TEng TEng

γ ist dabei die Vorgabe durch den Maschinentelegraph, Teng die Zeitkonstante des Motors.
KProp ist die am Propeller abgegebene Kraft.

Die Schiffsgeschwindigkeit u erhält man über die Bewegung einer Masse unter dem
Einfluss von Reibung und einer externen Kraft, hier KProp .

d 1
u& ( t ) = − u ( t ) + K Pr op ( t )
m m
Die Geschwindigkeit u wird in die x-Komponente und die y-Komponente zerlegt.

u x ( t ) = x& bow ( t ) = u ( t ) ⋅ cos(ψ ( t ))


u y ( t ) = y& bow ( t ) = u ( t ) ⋅ sin(ψ ( t ))

und durch Integration dieser Geschwindigkeiten folgt dann die aktuelle Position.

u
y
uy

ux

Das hier vorgestellte Modell der Schiffsbewegung kann als Basis für weiter zuzu-
fügende Komponenten oder andere Abbildungen von Teilsystemen dienen.

Vereinfacht linearisiert erhält man folgende Matrixdarstellung

 1 K 
− T 0
THull
0 0   0 0 
 ω & ( t )   Hull   ω( t )   
 ψ& ( t )   1 0 0
1
0 0  
ψ ( t )   10 0 
   0 0 − 0 0     0  δ C ( t ) 
 δ& ( t )  =  TRud  ⋅  δ( t )  +  TRud ⋅ 
&   1     K Pr op ,max   γ ( t ) 
K Pr op ( t )  0 0 0 − 0  K Pr op ( t )  0 
 u& ( t )   TEng   u(t)  
 
TEng 
 1 d  0 0 
 0 0 0 − 
 m m

 ω( t ) 
 ψ( t ) 
 1  
y ( t ) 0 1 0 0 0   
=
 y ( t )  0 0 0 0 1  ⋅  δ ( t ) 
 2     
K Pr op ( t )
 u ( t ) 
Bessere Linearisierung inklusive der Ruder-Geschwindigkeit:

Im Nomoto-Modell wird zunächst der Faktor δ( t ) + T3 ⋅ δ& ( t ) ersetzt durch p(t) = δ( t ) + T3 ⋅ δ& ( t )

THull ⋅ ω
& ( t ) = −ω( t ) + K ⋅ p( t )
ψ& ( t ) = ω( t )

Die Gleichung der Ruder-Position wird vereinfacht dargestellt :

1 1
δ& ( t ) = − δ( t ) + δ c (t)
TRudder TRudder

Damit folgt dann für p(t) = δ( t ) + T3 ⋅ δ& ( t ) (In der Zustandsnormalform dürfen rechts vom
Gleichheitszeichen keine Ableitungen stehen!) :

 1 1 
p( t ) = δ( t ) + T3 ⋅  − δ( t ) + δ c ( t ) 
 TRudder TRudder 

Eingesetzt in die Nomoto-Gleichung ergibt

  T3 T3 
& ( t ) = −ω( t ) + K ⋅  δ( t ) +  −
THull ⋅ ω δ ( t ) + δ ( t )  
 c 
  TRudder TRudder 
oder
 T3  T3 
& ( t ) = −ω( t ) + K ⋅  1 −
THull ⋅ ω δ( t ) + δ c ( t ) 

  TRudder  TRudder 
und damit
1  T − T3  T3 
ω
& (t) = − ω( t ) + K ⋅   Rudder δ( t ) + δ c ( t ) 
THull   THull ⋅ TRudder  THull ⋅ TRudder 
ψ& ( t ) = ω( t )
1 1
δ& ( t ) = − δ( t ) + δ c (t )
TRudder TRudder

Eine andere Zusammenfassung bzgl. der Konstanten ergibt

1
ω
& (t) = − ω( t ) + K 1 ⋅ δ( t ) + K 2 ⋅ δ c ( t )
THull
ψ& ( t ) = ω( t )
1 1
δ& ( t ) = − δ( t ) + δ c (t)
TRudder TRudder
Die beiden weiteren Differentialgleichungen für die Schiffsgeschwindigkeit ändern sich nicht

1 K Pr op ,max
&
K Pr op ( t ) = − K Pr op ( t ) + γ(t)
TEng TEng
d 1
u& ( t ) = − u ( t ) + K Pr op ( t )
m m

In der Matrixdarstellung sind A(1,2) und B(1,1) zu ändern:

 1 
− T 0 K1 0 0   K2 0 
 ω & ( t )   Hull   ω( t )   
 ψ& ( t )   1 0 0
1
0 0  
ψ ( t )   10 0 
   0 0 − 0 0     0  δ C ( t ) 
 δ& ( t )  =  TRud  ⋅  δ( t )  +  TRud ⋅ 
&   1     K Pr op ,max   γ ( t ) 
K Pr op ( t )  0 0 0 − 0  K Pr op ( t )  0 
 u& ( t )   TEng   u(t)  
 
TEng 
 1 d  0 0 
 0 0 0 − 
 m m

 ω( t ) 
 ψ( t ) 
 y 1 ( t )  0 1 0 0 0   
=
 y ( t )  0 0 0 0 1  ⋅  δ ( t ) 
 2     
K Pr op ( t )
 u ( t ) 

Es folgt für die Übertragungsfunktionen ( berechnet mit symbolic )

G-psi(s)=Thull*(K2*s*Trud+K2+K1)/((s*Trud+1)*s*(s*Thull+1))

G-u(s)= Kpropmax/((s*m+d)*(s*Teng+1))

oder etwas leichter lesbar

V ⋅ (TA s + 1) THull K 2 ⋅ TRud


G ψ −δC (s) = ; V= ; TA =
s ⋅ (TRud ⋅ s + 1)(THull ⋅ s + 1) K1 + K 2 K1 + K 2

K Pr op ,max
G u − γ (s) = d
m
( ⋅ s + 1)(Teng ⋅ s + 1)
d

Das könnte Ihnen auch gefallen