## Modelica_LinearSystems2.WorkInProgress.Tests.Examples

### Package Content

Name | Description
--- | ---
Pendular_Testbench_MBD |
ExtendedKalman | Extended Kalman filter with tustin aprox for a priori state estimation and transition matrix calculation
CraneMultibody |
CraneWithEquations |
Pendular_Testbench_WEQ |
ExtendedKalman2 | Extended Kalman
ExtendedKalman3 | Extended Kalman
Pendular_Testbench_MBD_UKF |
Pendular_Testbench_MBD_SR_UKF |
Pendular_Testbench_MBD_EKF |
Example_EKF |
Example_UKF |
SR_EKF | Extended square root Kalman
fSigma | Pendular state function
fSigma_2 | Pendular state function 2
hSigma | Pendular output function
hSigma_2 | Pendular output function 2
ekfSystem_pendular | Pendular state function
Pendular_Testbench_MBD_EKF2 |
Pendular_Testbench_MBD_EKF1 |
fSigmaDummy | Dummy function for the discretetized state function
hSigmaDummy | Dummy function for the discretetized output function
disturbedSine |
ekf_LinearSystem | Linear state space function
hSigmaLinear | Output function of a linear system
fSigmaLinear | State function of a linear system

## Modelica_LinearSystems2.WorkInProgress.Tests.Examples.Pendular_Testbench_MBD

## Modelica_LinearSystems2.WorkInProgress.Tests.Examples.ExtendedKalman

Extended Kalman filter with tustin aprox for a priori state estimation and transition matrix calculation

### Parameters

Name | Description
--- | ---
no_u | Number of system inputs
no_x | Number of system states
no_y | Number of observed measurements
Q_vec | Overall states confidence
R_vec[no_y] | Measurement confidence
Ts | Sample time of algorithm

### Connectors

Name | Description
--- | ---
u[no_u] | system inputs
x[no_x] | corrected system states
y[no_y, 1] | system measurements
y_out[no_y] | corrected system outputs

## Modelica_LinearSystems2.WorkInProgress.Tests.Examples.CraneMultibody

### Parameters

Name | Description
--- | ---
m_crab | mass of crab [kg]
m_load | mass of load [kg]
l | length of rope [m]
g | Gravity acceleration [m/s2]
d | damping
J |

### Connectors

Name | Description
--- | ---
force |
x1 | Angle of pendulum
x2 | Angular velocity of pendulum
x3 | Horziontal position of crab
x4 | Horziontal velocity of crab
y1 | horizontal position of load

## Modelica_LinearSystems2.WorkInProgress.Tests.Examples.CraneWithEquations

### Parameters

Name | Description
--- | ---
m_crab | mass of crab [kg]
m_load | mass of load [kg]
l | length of rope [m]
g | Gravity acceleration [m/s2]

### Connectors

Name | Description
--- | ---
force |
y1 | Horziontal position of crab
y2 | horizontal position of load

## Modelica_LinearSystems2.WorkInProgress.Tests.Examples.Pendular_Testbench_WEQ

## Modelica_LinearSystems2.WorkInProgress.Tests.Examples.ExtendedKalman2

Extended Kalman

### Parameters

Name | Description
--- | ---
xm_start[:] | Start value of estimated state
Q_vec[:] | Overall states confidence
R_vec[:] | Measurement confidence
P_start[:, :] |
Ts | Sample time of algorithm
nu | Number of system inputs

### Connectors

Name | Description
--- | ---
u[nu] | system inputs
x[nx] | corrected system states
y[ny] | system measurements
y_out[:] | corrected system outputs

## Modelica_LinearSystems2.WorkInProgress.Tests.Examples.ExtendedKalman3

Extended Kalman

### Parameters

Name | Description
--- | ---
xm_start[:] | Start value of estimated state
Q_vec[:] | Overall states confidence
R_vec[:] | Measurement confidence
P_start[:, :] |
Ts | Sample time of algorithm
nu | Number of system inputs

### Connectors

Name | Description
--- | ---
u[nu] | system inputs
x[nx] | corrected system states
y[ny] | system measurements
y_out[:] | corrected system outputs

## Modelica_LinearSystems2.WorkInProgress.Tests.Examples.Pendular_Testbench_MBD_UKF

## Modelica_LinearSystems2.WorkInProgress.Tests.Examples.Pendular_Testbench_MBD_SR_UKF

## Modelica_LinearSystems2.WorkInProgress.Tests.Examples.Pendular_Testbench_MBD_EKF

## Modelica_LinearSystems2.WorkInProgress.Tests.Examples.Example_EKF

## Modelica_LinearSystems2.WorkInProgress.Tests.Examples.Example_UKF

## Modelica_LinearSystems2.WorkInProgress.Tests.Examples.SR_EKF

Extended square root Kalman

### Parameters

Name | Description
--- | ---
xm_start[:] | Start value of estimated state
P_start[:, :] |
Ts | Sample time of algorithm
nu | Number of system inputs
Q[nx, nx] | Confidence of states
R[:, :] | Confidence of measurements - large values low confidence | acts like coefficient of PT1-Filter

### Connectors

Name | Description
--- | ---
u[nu] | system inputs
x[nx] | corrected system states
y[ny] | system measurements
y_out[:] | corrected system outputs

## Modelica_LinearSystems2.WorkInProgress.Tests.Examples.fSigma

Pendular state function

### Information

Extends from Modelica.Icons.Function (Icon for functions), Modelica_LinearSystems2.DiscreteStateSpace.Internal.fBase (Base class of the state function).

### Inputs

Name | Description
--- | ---
x[:] | State at instant k
u[:] | Input at instant k
Ts | Sample time [s]

### Outputs

Name | Description
--- | ---
x_new[size(x, 1)] | Predicted state at instant k+1

## Modelica_LinearSystems2.WorkInProgress.Tests.Examples.fSigma_2

Pendular state function 2

### Information

Extends from Modelica.Icons.Function (Icon for functions), Modelica_LinearSystems2.DiscreteStateSpace.Internal.fBase (Base class of the state function).

### Inputs

Name | Description
--- | ---
x[:] | State at instant k
u[:] | Input at instant k
Ts | Sample time [s]

### Outputs

Name | Description
--- | ---
x_new[size(x, 1)] | Predicted state at instant k+1

## Modelica_LinearSystems2.WorkInProgress.Tests.Examples.hSigma

Pendular output function

### Information

Extends from Modelica_LinearSystems2.DiscreteStateSpace.Internal.hBase (Base class of output function).

### Inputs

Name | Description
--- | ---
x[:] | State at instant k
u[:] | Input at instant k
Ts | Sample time [s]
ny | number of outputs

### Outputs

Name | Description
--- | ---
y[ny] | Output at instant k

## Modelica_LinearSystems2.WorkInProgress.Tests.Examples.hSigma_2

Pendular output function 2

### Information

Extends from Modelica_LinearSystems2.DiscreteStateSpace.Internal.hBase (Base class of output function).

### Inputs

Name | Description
--- | ---
x[:] | State at instant k
u[:] | Input at instant k
Ts | Sample time [s]
ny | number of outputs

### Outputs

Name | Description
--- | ---
y[ny] | Output at instant k

## Modelica_LinearSystems2.WorkInProgress.Tests.Examples.ekfSystem_pendular

Pendular state function

### Information

Extends from Modelica_LinearSystems2.DiscreteStateSpace.Internal.ekfSystemBase (Base class of ekf-system functions).

### Inputs

Name | Description
--- | ---
x[:] | Estimated vector at instant k
u[:] | Input at instant k
Ts | Sample time [s]
ny | Number of outputs

### Outputs

Name | Description
--- | ---
x_new[size(x, 1)] | Modeled mean
y[ny] | Modeled output
Ak[size(x, 1), size(x, 1)] | System matrix of the discrete linearized system at instant k
Ck[ny, size(x, 1)] | Output matrix of the discrete linearized system at instant k

## Modelica_LinearSystems2.WorkInProgress.Tests.Examples.Pendular_Testbench_MBD_EKF2

## Modelica_LinearSystems2.WorkInProgress.Tests.Examples.Pendular_Testbench_MBD_EKF1

## Modelica_LinearSystems2.WorkInProgress.Tests.Examples.fSigmaDummy

Dummy function for the discretetized state function

### Information

Extends from Modelica.Icons.Function (Icon for functions), Internal.fBase (Base class of the state function).

### Inputs

Name | Description
--- | ---
x[:] | State at instant k
u[:] | Input at instant k
Ts | Sample time [s]

### Outputs

Name | Description
--- | ---
x_new[size(x, 1)] | Predicted state at instant k+1

## Modelica_LinearSystems2.WorkInProgress.Tests.Examples.hSigmaDummy

Dummy function for the discretetized output function

### Information

Extends from Modelica_LinearSystems2.DiscreteStateSpace.Internal.hBase (Base class of output function).

### Inputs

Name | Description
--- | ---
x[:] | State at instant k
u[:] | Input at instant k
Ts | Sample time [s]
ny | number of outputs

### Outputs

Name | Description
--- | ---
y[ny] | Output at instant k

## Modelica_LinearSystems2.WorkInProgress.Tests.Examples.disturbedSine

### Parameters

Name | Description
--- | ---
a |

### Connectors

Name | Description
--- | ---
y |

## Modelica_LinearSystems2.WorkInProgress.Tests.Examples.ekf_LinearSystem

Linear state space function

### Information

Extends from Modelica_LinearSystems2.DiscreteStateSpace.Internal.ekfSystemBase (Base class of ekf-system functions).

### Inputs

Name | Description
--- | ---
x[:] | Estimated vector at instant k
u[:] | Input at instant k
Ts | Sample time [s]
ny | Number of outputs
method | Discretization method

### Outputs

Name | Description
--- | ---
x_new[size(x, 1)] | Modeled mean
y[ny] | Modeled output
Ak[size(x, 1), size(x, 1)] | System matrix of the discrete linearized system at instant k
Ck[ny, size(x, 1)] | Output matrix of the discrete linearized system at instant k

## Modelica_LinearSystems2.WorkInProgress.Tests.Examples.hSigmaLinear

Output function of a linear system

### Information

Extends from Modelica_LinearSystems2.DiscreteStateSpace.Internal.hBase (Base class of output function).

### Inputs

Name | Description
--- | ---
x[:] | State at instant k
u[:] | Input at instant k
Ts | Sample time [s]
ny | number of outputs
method | Discretization method

### Outputs

Name | Description
--- | ---
y[ny] | Output at instant k

## Modelica_LinearSystems2.WorkInProgress.Tests.Examples.fSigmaLinear

State function of a linear system

### Information

Extends from Modelica.Icons.Function (Icon for functions), Modelica_LinearSystems2.DiscreteStateSpace.Internal.fBase (Base class of the state function).

### Inputs

Name | Description
--- | ---
x[:] | State at instant k
u[:] | Input at instant k
Ts | Sample time [s]
method | Discretization method

### Outputs

Name | Description
--- | ---
x_new[size(x, 1)] | Predicted state at instant k+1