Automatic Control Knowledge Repository

You currently have javascript disabled. Some features will be unavailable. Please consider enabling javascript.

Details for: "Multivariable servomechanism problem J-100 jet engine"

Name: Multivariable servomechanism problem J-100 jet engine (Key: COM26)
Path: ackrep_data/system_models/compleib_models/JE1 View on GitHub
Type: system_model
Short Description: JE1 Multivariable servomechanism problem J-100 jet engine E. J. Davison and W. Gesing, "The systematic design of control systems for for the multivariable servomechanism problem", Nat. Eng. Consortium Inc., Chicago, "Alternatives for Linear Multivariable Control", 1978
Created: 2022-10-10 15:53:26
Compatible Environment: default_conda_environment (Key: CDAMA)
Source Code [ / ] simulation.py
# This file was autogenerated from the template: simulation.py.template (2022-10-10 15:53:27).

import numpy as np
import system_model
from scipy.integrate import solve_ivp, odeint

from ackrep_core import ResultContainer
from ackrep_core.system_model_management import save_plot_in_dir
import matplotlib.pyplot as plt
import os
from ipydex import Container

# link to documentation with examples: https://ackrep-doc.readthedocs.io/en/latest/devdoc/contributing_data.html


def simulate():
    """
    simulate the system model with scipy.integrate.solve_ivp

    :return: result of solve_ivp, might contains input function
    """

    model = system_model.Model()

    rhs_xx_pp_symb = model.get_rhs_symbolic()
    rhs = model.get_rhs_func()

    # initial state values
    xx0 = np.ones(model.sys_dim)

    t_end = 10
    tt = np.linspace(0, t_end, 1000)

    simulation_data = solve_ivp(rhs, (0, t_end), xx0, t_eval=tt)

    # using odeint for models with large state vectors
    # res = odeint(rhs, y0=xx0, t=tt, tfirst=True)
    # simulation_data = Container()
    # simulation_data.y = res.transpose()
    # simulation_data.t = tt

    # postprocessing: calc output
    ny = 5
    C = model.get_parameter_value("C")
    D21 = model.get_parameter_value("D21")
    output = np.zeros((ny, len(tt)))
    for i in range(len(tt)):
        output[:,i] = np.matmul(C, simulation_data.y[:,i]) # + np.matmul(D21, w)
    simulation_data.output = output

    save_plot(simulation_data)

    return simulation_data


def save_plot(simulation_data):
    """
    plot your data and save the plot
    access to data via: simulation_data.t   array of time values
                        simulation_data.y   array of data components
                        simulation_data.uu  array of input values

    :param simulation_data: simulation_data of system_model
    :return: None
    """

    for i in range(simulation_data.output.shape[0]):
        plt.plot(simulation_data.t, simulation_data.output[i], label=f"$y_{i}$")

    plt.legend()
    plt.tight_layout()

    save_plot_in_dir()


def evaluate_simulation(simulation_data):
    """
    assert that the simulation results are as expected

    :param simulation_data: simulation_data of system_model
    :return:
    """
    expected_final_state = np.array([ 3.50417944e-02,  4.87112538e-02,  1.26796600e-03,  2.05084191e-04,
       -4.81577324e-05,  1.31301895e-03,  8.73277217e-04,  5.48833050e-03,
        2.26016575e-03,  7.68139877e-03,  1.87863751e-03, -2.90543492e-04,
       -3.99464498e-05, -1.72153920e-03,  9.29115393e-04, -9.38333054e-04,
        4.74309697e-44, -4.74309697e-43,  8.55715385e-16,  1.42500013e-14,
       -1.26565762e-13,  2.29108245e-11, -5.63730621e-11,  1.38708327e-10,
        3.57376470e-02,  5.03412618e-02,  1.31039117e-03, -4.97668473e-05,
        1.26521807e+00, -2.30537148e-01])

    rc = ResultContainer(score=1.0)
    simulated_final_state = simulation_data.y[:, -1]
    rc.final_state_errors = [
        simulated_final_state[i] - expected_final_state[i] for i in np.arange(0, len(simulated_final_state))
    ]
    rc.success = np.allclose(expected_final_state, simulated_final_state, rtol=0, atol=1e-2)

    return rc
system_model.py
# This file was autogenerated from the template: system_model.py.template (2022-10-10 15:53:27).

import sympy as sp
import numpy as np
import symbtools as st
import importlib
import sys, os
#from ipydex import IPS, activate_ips_on_exception  

from ackrep_core.system_model_management import GenericModel, import_parameters

# Import parameter_file
params = import_parameters()


#link to documentation with examples: https://ackrep-doc.readthedocs.io/en/latest/devdoc/contributing_data.html


class Model(GenericModel): 

    def initialize(self):
        """
        this function is called by the constructor of GenericModel

        :return: None
        """

        # Define number of inputs -- MODEL DEPENDENT
        self.u_dim = 3

        # Set "sys_dim" to constant value, if system dimension is constant 
        self.sys_dim = 30

        # check existence of params file
        self.has_params = True
        self.params = params
        

    # ----------- SET DEFAULT INPUT FUNCTION ---------- # 
    def uu_default_func(self):
        """
        define input function
    
        :return:(function with 2 args - t, xx_nv) default input function 
        """ 
        
        def uu_rhs(t, xx_nv):
            """
            sequence of numerical input values

            :param t:(scalar or vector) time
            :param xx_nv:(vector or array of vectors) numeric state vector
            :return:(list) numeric inputs 
            """ 
            u = np.zeros(self.u_dim)
            return u

        return uu_rhs


    # ----------- SYMBOLIC RHS FUNCTION ---------- # 

    def get_rhs_symbolic(self):
        """
        define symbolic rhs function

        :return: matrix of symbolic rhs-functions
        """
        if self.dxx_dt_symb is not None:
            return self.dxx_dt_symb

        x = self.xx_symb  
        A, B, B1, C1, C, D11, D12, D21 = self.pp_symb   # parameters
        w = np.zeros(30) # noise
        u = self.uu_symb   # inputs

        # define symbolic rhs functions
        self.dxx_dt_symb = np.matmul(A,x) + np.matmul(B1,w) + np.matmul(B,u)
        



        return self.dxx_dt_symb
    
parameters.py
# This file was autogenerated from the template: parameters.py.template (2022-10-10 15:53:27).

import sys
import os
import numpy as np
import sympy as sp

import tabulate as tab


#link to documentation with examples: https://ackrep-doc.readthedocs.io/en/latest/devdoc/contributing_data.html


# set model name
model_name = 'Multivariable servomechanism problem J-100 jet engine'


# ---------- create symbolic parameters
A = sp.MatrixSymbol('A', 30, 30)
B = sp.MatrixSymbol('B', 30, 3)
B1 = sp.MatrixSymbol('B1', 30, 30)
C1 = sp.MatrixSymbol('C1', 8, 30)
C = sp.MatrixSymbol('C', 5, 30)
D11 = sp.MatrixSymbol('D11', 8, 30)
D12 = sp.MatrixSymbol('D12', 8, 3)
D21 = sp.MatrixSymbol('D21', 5, 30)

pp_symb = [A, B, B1, C1, C, D11, D12, D21]


# ---------- create auxiliary symbolic parameters 

# set numerical values of auxiliary parameters
# trailing "_nv" stands for "numerical value"
A_nv = sp.Matrix(np.array([[-4.3280e+00,  1.7140e-01,  5.3760e+00,  4.0160e+02, -7.2460e+02,
        -1.9330e+00,  1.0200e+00, -9.8200e-01,  9.9900e-01,  1.5210e+00,
        -4.0620e+00,  9.5670e+00,  1.0080e+01, -6.0170e-01, -1.3120e-01,
         9.6020e-02, -4.5700e-02,  0.0000e+00, -4.5160e+02,  0.0000e+00,
         0.0000e+00, -1.0580e+02,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
       [-4.4020e-01, -5.6430e+00,  1.2750e+02, -2.3350e+02, -4.3430e+02,
         2.6590e+01,  2.0400e+00, -2.5920e+00,  1.1320e+01,  1.0900e+01,
        -4.0710e+00, -5.7390e-02, -6.0630e-01, -7.4880e-02, -5.9360e-01,
        -9.6020e-02,  1.1140e-01,  0.0000e+00, -5.4610e+02,  0.0000e+00,
         0.0000e+00, -6.5750e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
       [ 1.0380e+00,  6.0730e+00, -1.6500e+02, -4.4830e+00,  1.0490e+03,
        -8.2450e+01, -5.3140e+00,  5.0970e+00, -9.3890e-03,  1.3520e-01,
         5.6380e+00,  2.2460e-02,  1.7970e-01,  2.4070e-02,  1.1000e+00,
         2.7430e-02,  2.1530e-01,  0.0000e+00,  1.3620e+03,  0.0000e+00,
         0.0000e+00,  1.3460e+01,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
       [ 5.3040e-01, -1.0860e-01,  1.3130e+02, -5.7830e+02,  1.0200e+02,
        -9.2400e+00, -1.1460e+00, -2.4080e+00, -3.0810e+00, -4.5290e+00,
         5.7070e+00, -2.3460e-01, -2.1110e+00, -2.4600e-01, -4.6860e-01,
        -3.2230e-01,  3.2620e-01,  0.0000e+00,  2.0800e+02,  0.0000e+00,
         0.0000e+00, -2.8880e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
       [ 8.4760e-03, -1.5630e-02,  5.6020e-02,  1.5730e+00, -1.0050e+01,
         1.9520e-01, -8.8040e-03, -2.1100e-02,  2.0900e-03, -5.2560e-02,
        -4.0770e-02, -9.1820e-03, -5.1780e-02,  3.4250e-02,  4.9950e-03,
        -1.2560e-02,  9.9480e-03,  0.0000e+00, -9.8390e+01,  0.0000e+00,
         0.0000e+00,  5.0690e-01,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
       [ 8.3500e-01, -1.2490e-02, -3.5670e-02, -6.0740e-01,  3.7650e+01,
        -1.9790e+01, -1.8130e-01, -2.9520e-02, -1.9530e-02, -1.6220e-01,
        -6.4390e-03, -2.3460e-02, -2.2010e-01, -2.5140e-02, -3.7490e-03,
        -3.3510e-02,  2.7280e-02,  0.0000e+00,  7.1620e+01,  0.0000e+00,
         0.0000e+00,  9.6080e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
       [ 6.7680e-01, -1.2640e-02, -9.6830e-02, -3.5670e-01,  8.0240e+01,
        -8.2390e-02, -2.0470e+01, -3.9280e-02,  1.8780e-02, -2.1290e-01,
        -9.3370e-03, -3.1440e-02, -2.9190e-01, -3.3700e-02,  8.8730e-02,
        -4.4580e-02,  1.7160e-02,  0.0000e+00,  7.1710e+01,  0.0000e+00,
         0.0000e+00,  8.5710e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
       [-9.6960e-02,  8.6660e-01,  1.6870e+01,  1.0510e+00, -1.0230e+02,
         2.9660e+01,  5.9430e-01, -1.9970e+01,  2.2530e-02,  1.7010e-01,
         8.3710e-03,  2.6450e-02,  2.5600e-01,  2.8350e-02, -3.7490e-02,
         3.6350e-02, -7.7410e-02,  0.0000e+00, -1.4120e+02,  0.0000e+00,
         0.0000e+00, -8.2150e-01,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
       [-8.7850e-03, -1.6360e-02,  1.8470e-01,  2.1690e-01, -8.4200e+00,
         7.0030e-01,  5.6660e-02,  6.6230e+00, -4.9990e+01,  6.7600e-02,
         3.9460e+01,  4.9910e-03,  8.9830e-02,  5.3490e-03,  0.0000e+00,
         1.3720e-02,  3.8550e-02,  0.0000e+00, -7.7100e+00,  0.0000e+00,
         0.0000e+00, -4.3710e-02,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
       [-1.2980e-04, -2.4300e-04,  2.7180e-03,  3.2140e-03, -1.2460e-01,
         1.0370e-02,  8.3950e-04,  9.8120e-02, -6.6660e-01, -6.6570e-01,
         5.8470e-01,  6.6540e-05,  1.3470e-03,  7.1310e-05,  0.0000e+00,
         2.0570e-04,  5.7070e-04,  0.0000e+00, -1.1440e-01,  0.0000e+00,
         0.0000e+00, -6.3590e-04,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
       [-1.2070e+00, -6.7170e+00,  2.6260e+01,  1.2490e+01, -1.2690e+03,
         1.0300e+02,  7.4800e+00,  3.6840e+01,  2.8540e-01,  2.3320e+00,
        -4.7650e+01,  3.4060e-01,  3.0650e+00,  3.6240e-01, -4.3430e-01,
         4.6810e-01,  5.7270e+00,  0.0000e+00, -1.7450e+03,  0.0000e+00,
         0.0000e+00, -8.9400e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
       [-2.7300e-02, -4.5390e-01, -5.2720e+01,  1.9880e+02, -2.8090e+01,
         2.2430e+00,  1.7940e-01,  9.7500e+00, -9.6270e+00, -9.5570e+00,
         3.8480e+01, -5.0010e+01,  1.0110e-01,  1.2030e-02, -4.6860e-02,
         1.7150e-02,  1.3920e-01,  0.0000e+00, -2.4300e+01,  0.0000e+00,
         0.0000e+00, -2.7360e-01,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
       [-1.2060e-03, -2.0170e-02, -2.3430e+00,  8.8350e+00, -1.2480e+00,
         9.9750e-02,  8.0590e-03,  4.3330e-01, -4.2780e-01, -4.2450e-01,
         1.7100e+00, -2.0000e+00, -1.9960e+00,  5.3490e-04, -1.9990e-03,
         7.5440e-04,  6.1720e-03,  0.0000e+00, -1.0820e+00,  0.0000e+00,
         0.0000e+00, -1.1830e-02,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
       [-1.6130e-01, -2.4690e-01, -2.4050e+01,  2.3380e+01,  1.4830e+02,
         1.6380e+00,  1.3850e-01,  4.4880e+00, -4.4140e+00, -4.3540e+00,
         1.7660e+01, -3.1130e+00, -3.0180e+00, -1.9770e+01, -4.9990e-02,
         1.5090e-02,  6.7770e-02,  0.0000e+00,  1.6600e+01,  0.0000e+00,
         0.0000e+00,  3.9800e-01,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
       [-1.2440e-02,  3.0200e-02, -1.1980e-01, -4.8210e-02,  5.5750e+00,
        -4.5250e-01,  1.9810e+01,  1.2490e-01, -1.1270e-03, -6.7600e-03,
         1.8350e-02, -9.9810e-04, -1.3470e-02, -1.0700e-03, -2.0000e+01,
        -2.0570e-03,  1.8800e-03,  0.0000e+00,  9.1470e+00,  0.0000e+00,
         0.0000e+00, -8.2410e-01,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
       [-1.6530e+00,  1.8310e+00, -3.8220e+00,  1.1340e+02,  3.4140e+02,
        -2.7340e+01, -2.0400e+00, -6.1660e-01,  5.0040e-01, -1.4370e-01,
        -2.4160e+00, -1.0730e-01, -1.0780e+00,  3.0530e+01,  1.9890e+01,
        -5.0160e+01,  1.6770e-01,  0.0000e+00,  4.3580e+02,  0.0000e+00,
         0.0000e+00, -5.9940e+01,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
       [ 0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  1.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
       [ 0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00, -5.0000e+02, -6.0000e+01,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
       [ 0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  1.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
       [ 0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         1.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
       [ 0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00, -3.6000e+03, -7.0800e+02,
        -1.0672e+02,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
       [ 0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  1.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
       [ 0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  1.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
       [ 0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00, -1.2000e+04, -5.2400e+03, -1.5000e+02,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
       [ 3.3300e+01,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00, -3.3300e+01,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
       [ 0.0000e+00,  2.0000e+01,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
        -2.0000e+01,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
       [ 0.0000e+00,  0.0000e+00,  2.0000e+01,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00, -2.0000e+01,  0.0000e+00,  0.0000e+00,  0.0000e+00],
       [ 0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  2.0000e+01,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00, -2.0000e+01,  0.0000e+00,  0.0000e+00],
       [ 0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  6.4500e-01,  6.4500e-01,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  1.0000e+00],
       [ 0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00, -8.9400e-01, -8.9400e-01,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         0.0000e+00,  0.0000e+00,  0.0000e+00, -3.0600e-01, -1.8600e+00]]))
B_nv = sp.Matrix(np.array([[    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [  500.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,  3600.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0., 12000.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.]]))
B1_nv = sp.Matrix(np.array([[    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [  500.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,  3600.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0., 12000.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.],
       [    0.,     0.,     0.]]))
C1_nv = sp.Matrix(np.array([[ 3.44007449e-01, -4.76660681e-01,  3.81271976e+00,
         6.74721291e+01,  1.69917760e+01,  7.43876334e+00,
         5.79120454e-01, -3.17632366e-01,  3.67341973e-01,
         5.96585991e-01, -1.31733993e+00,  4.03687261e-02,
         3.40471915e-01,  2.42396205e+00,  1.52805775e+00,
         5.43128719e-02, -4.79206266e-02,  0.00000000e+00,
        -2.97338401e+02,  0.00000000e+00,  0.00000000e+00,
         2.33133106e+01,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00],
       [ 9.77928678e-03,  1.97212081e-06,  0.00000000e+00,
         0.00000000e+00, -7.64382430e-03, -3.92090710e-05,
         3.33895822e-05,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  9.06510893e-05,  0.00000000e+00,
         2.37092904e-01,  0.00000000e+00,  0.00000000e+00,
         4.81115454e-01,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00],
       [ 0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  7.07106781e-01,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00],
       [ 5.24531810e-05,  3.88625887e-06,  3.38704148e-06,
         1.04510382e-04, -1.06348860e-02, -4.59831540e-05,
         6.23668181e-05,  3.53482680e-06,  2.42820469e-06,
         1.92828019e-05,  7.97616449e-07,  2.82984134e-06,
         2.59720321e-05,  3.03348809e-06, -3.50583542e-06,
         3.96616194e-06,  7.28319985e-07,  0.00000000e+00,
        -8.43578390e-03,  0.00000000e+00,  0.00000000e+00,
        -4.10546197e-03,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00],
       [ 1.08753023e-05,  8.49235244e-05, -1.82362839e-03,
        -1.13773481e-04,  1.14409877e-02, -7.57311363e-04,
        -6.76064793e-05, -3.89120862e-06, -2.63892251e-06,
        -2.11849192e-05, -8.72569768e-07, -3.09712770e-06,
        -2.84539769e-05, -3.33825111e-06,  3.76463650e-06,
        -4.31547269e-06,  5.73392889e-06,  0.00000000e+00,
         1.64614459e-02,  0.00000000e+00,  0.00000000e+00,
         8.32971788e-05,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00],
       [ 0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00],
       [ 0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00],
       [ 0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         0.00000000e+00,  0.00000000e+00,  0.00000000e+00]]))
C_nv = sp.Matrix(np.array([[ 4.865e-01, -6.741e-01,  5.392e+00,  9.542e+01,  2.403e+01,
         1.052e+01,  8.190e-01, -4.492e-01,  5.195e-01,  8.437e-01,
        -1.863e+00,  5.709e-02,  4.815e-01,  3.428e+00,  2.161e+00,
         7.681e-02, -6.777e-02,  0.000e+00, -4.205e+02,  0.000e+00,
         0.000e+00,  3.297e+01,  0.000e+00,  0.000e+00,  0.000e+00,
         0.000e+00,  0.000e+00,  0.000e+00,  0.000e+00,  0.000e+00],
       [ 1.383e-02,  2.789e-06,  0.000e+00,  0.000e+00, -1.081e-02,
        -5.545e-05,  4.722e-05,  0.000e+00,  0.000e+00,  0.000e+00,
         0.000e+00,  0.000e+00,  0.000e+00,  0.000e+00,  0.000e+00,
         0.000e+00,  1.282e-04,  0.000e+00,  3.353e-01,  0.000e+00,
         0.000e+00,  6.804e-01,  0.000e+00,  0.000e+00,  0.000e+00,
         0.000e+00,  0.000e+00,  0.000e+00,  0.000e+00,  0.000e+00],
       [ 0.000e+00,  0.000e+00,  0.000e+00,  0.000e+00,  0.000e+00,
         0.000e+00,  0.000e+00,  0.000e+00,  0.000e+00,  0.000e+00,
         1.000e+00,  0.000e+00,  0.000e+00,  0.000e+00,  0.000e+00,
         0.000e+00,  0.000e+00,  0.000e+00,  0.000e+00,  0.000e+00,
         0.000e+00,  0.000e+00,  0.000e+00,  0.000e+00,  0.000e+00,
         0.000e+00,  0.000e+00,  0.000e+00,  0.000e+00,  0.000e+00],
       [ 7.418e-05,  5.496e-06,  4.790e-06,  1.478e-04, -1.504e-02,
        -6.503e-05,  8.820e-05,  4.999e-06,  3.434e-06,  2.727e-05,
         1.128e-06,  4.002e-06,  3.673e-05,  4.290e-06, -4.958e-06,
         5.609e-06,  1.030e-06,  0.000e+00, -1.193e-02,  0.000e+00,
         0.000e+00, -5.806e-03,  0.000e+00,  0.000e+00,  0.000e+00,
         0.000e+00,  0.000e+00,  0.000e+00,  0.000e+00,  0.000e+00],
       [ 1.538e-05,  1.201e-04, -2.579e-03, -1.609e-04,  1.618e-02,
        -1.071e-03, -9.561e-05, -5.503e-06, -3.732e-06, -2.996e-05,
        -1.234e-06, -4.380e-06, -4.024e-05, -4.721e-06,  5.324e-06,
        -6.103e-06,  8.109e-06,  0.000e+00,  2.328e-02,  0.000e+00,
         0.000e+00,  1.178e-04,  0.000e+00,  0.000e+00,  0.000e+00,
         0.000e+00,  0.000e+00,  0.000e+00,  0.000e+00,  0.000e+00]]))
D11_nv = sp.Matrix(np.array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
        0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
       [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
        0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
       [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
        0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
       [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
        0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
       [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
        0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
       [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
        0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
       [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
        0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
       [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
        0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]))
D12_nv = sp.Matrix(np.array([[0.        , 0.        , 0.        ],
       [0.        , 0.        , 0.        ],
       [0.        , 0.        , 0.        ],
       [0.        , 0.        , 0.        ],
       [0.        , 0.        , 0.        ],
       [0.70710678, 0.        , 0.        ],
       [0.        , 0.70710678, 0.        ],
       [0.        , 0.        , 0.70710678]]))
D21_nv = sp.Matrix(np.array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
        0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
       [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
        0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
       [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
        0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
       [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
        0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
       [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
        0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]))


# ---------- create symbolic parameter functions
# parameter values can be constant/fixed values OR set in relation to other parameters (for example: a = 2*b)  


# list of symbolic parameter functions
# tailing "_sf" stands for "symbolic parameter function"
pp_sf = [A_nv, B_nv, B1_nv, C1_nv, C_nv, D11_nv, D12_nv, D21_nv]


#  ---------- list for substitution
# -- entries are tuples like: (independent symbolic parameter, numerical value)
pp_subs_list = []


# OPTONAL: Dictionary which defines how certain variables shall be written
# in the table - key: Symbolic Variable, Value: LaTeX Representation/Code
# useful for example for complex variables: {Z: r"\underline{Z}"}
latex_names = {}


# ---------- Define LaTeX table

# Define table header 
# DON'T CHANGE FOLLOWING ENTRIES: "Symbol", "Value"
tabular_header = ["Symbol", "Value"]

# Define column text alignments
col_alignment = ["center", "left"]


# Define Entries of all columns before the Symbol-Column
# --- Entries need to be latex code
col_1 = [] 

# contains all lists of the columns before the "Symbol" Column
# --- Empty list, if there are no columns before the "Symbol" Column
start_columns_list = []


# Define Entries of the columns after the Value-Column
# --- Entries need to be latex code
col_4 = []

# contains all lists of columns after the FIX ENTRIES
# --- Empty list, if there are no columns after the "Value" column
end_columns_list = []

Related Problems:
Extensive Material:
Download pdf
Result: Success.
Last Build: Checkout CI Build
Runtime: 7.6 (estimated: 10s)