FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
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].
AngularVelocityNoise 1 Variance of the angular velocity noise [(rad/s)^2].
MeasurementNoise 1 Variance of the angle measurement noise [rad^2].
InitialP 2 Initial uncertainty (variance) diagonal of the state std::vector [angle anglularvelocity].
Material 1 The visualization material (Default: Simple/White). Visualization builds only.

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>
<SIMULATION>
<Timing TStart="0" TEnd="100"/>
<Integrator Method="RK45_i" NumCores="1">
<StepControl Step="1e-6" StepMin="0.5"/>
</Integrator>
</SIMULATION>
</Contents>

This SimObject is referred to as Kalman/Example/Pendulum