Marine systems simulation
Kalman Pendulum

Pendulum with Kalman filter extension.

+ Collaboration diagram for Kalman Pendulum:

KalmanPendulum is the Kalman extension of Pendulum. It is a very simple pendulum described by angle and angular velocity dynamics. Only influenced by gravity.

Author
Joakim Haugen

Example configuration excerpt

<Lib
LibName = "fhsim_base"
SimObject = "Kalman/Example/Pendulum"
Name = "Pen"
Position = "0,0,0"
Length = "3"
AngleNoise = "1e-1"
AngularVelocityNoise = "1e-3"
MeasurementNoise = "1e0"
InitialP = "1e0,1e0"
/>
<Connection
Pen.Angle = "0"
/>
<InitialCondition
Pen.Angle = "0.5"
Pen.AngularVelocity = "0"
/>

Input Ports

Name Width Description
Angle 1 Measured angle [rad].

Output Ports

Name Width Description
Angle 1 The angle in radians of the pendulum with respect to the z-axis.
AngularVelocity 1 The angular velocity of the above angle.

Configuration parameters

Name Width Description
Length 1 Length of the pendulum arm [meter].
Position 3 North, east, and down position of the suspension point [m^3].
AngleNoise 1 Variance of the angle noise [rad^2].
AngleVelocityNoise 1 Variance of the angular velocity noise [(rad/s)^2].
InitialP 2 Initial uncertainty (variance) diagonal of the state vector [angle anglularvelocity].

Initial conditions

Name Width Description
Angle 1 -.
AngularVelocity 1 -.

Full example file

<Contents>
<OBJECTS>
<Lib
LibName = "fhsim_base"
SimObject = "Kalman/Example/Pendulum"
Name = "Pen"
Length = "3"
AngleNoise = "1e-1"
AngularVelocityNoise = "1e-3"
MeasurementNoise = "1e-0"
InitialP = "1e-0,1e-0"
/>
</OBJECTS>
<INTERCONNECTIONS>
<Connection
Pen.Angle = "0"
/>
</INTERCONNECTIONS>
<INITIALIZATION>
<InitialCondition
Pen.Angle = "0.5"
Pen.AngularVelocity = "0"
/>
</INITIALIZATION>
<INTEGRATION>
<Engine
IntegratorMethod="2"
NumCores="1"
TOutput="0, 0:1e-1:Inf, 100"
stepsize ="1e-6"
HMin="0.5"
FileOutput="objects:ports"
/>
</INTEGRATION>
</Contents>

This SimObject is referred to as Kalman/Example/Pendulum