Skip to content

Unexpected and unwanted behaviour of control.ctrb #1097

@bwolleswinkel

Description

@bwolleswinkel

I have found some unexplainable and unwanted behavior of the control.ctrb functions, which returns a 'controllability matrix' with incorrect dimensions rather than returning an error/warning that the $B$ matrix is not dimensioned properly.

MWE:

import numpy as np
import control as ct

A = np.array([[1, 1], [0, 1]])
b = np.array([1, 1])
C = ct.ctrb(A, b)  # Rather then 1) returning an error that b is not properly dimensioned, or 2) assuming that b is a columns vector, it instead returns a matrix with shape 2 x 4, which makes no sense for a controllability matrix

C_T = ct.ctrb(A, np.atleast_2d(b).T)  # Explicitly specifying that b is a column vector fixes this and C_T is now a 2 x 2 matrix

I believe the behavior is incorrect, and it took me quite some time to understand what was going wrong; any (dis)agreement would be appreciated, thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy