Automatic Control Knowledge Repository

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

Details for: "PVTOL problem"

Name: PVTOL problem (Key: BCPXM)
Path: ackrep_data/problem_specifications/PVTOL_2_Forces View on GitHub
Type: problem_specification
Short Description: create model for PVTOL
Created: 2022-04-06
Source Code [ / ] problem.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
system description: model description of a PVTOL aircraft
"""
import numpy as np
import sympy as sp
from sympy import cos, sin
from math import pi
from ackrep_core import ResultContainer
import symbtools as st

from system_models.pvtol_system.system_model import Model


class ProblemSpecification(object):

    xx0 = np.zeros(6)  # initial condition
    tt = np.linspace(0, 20, 10000)  # vector of times for simulation

    model = Model()


def evaluate_solution(solution_data):
    """

    :param solution_data: solution data of problem of solution
    :return:
    """
    P = ProblemSpecification
    target_states = [
        -44.568209857694654,
        -3.7059291004860504,
        44.85003487125722,
        -43.39618759509638,
        -0.01029834435828108,
        -0.06974559900905179,
    ]
    success = all(abs(solution_data.res.y[i][-1] - target_states[i]) < 1e-2 for i in np.arange(0, 6))
    return ResultContainer(success=success, score=1.0)

Available solutions:
PVTOL model
Related System Models:
PVTOL with 2 forces