Skip to content

Error due to data size, but satisfies horizon constraints #5

Description

@dtyulman

This works fine:

Y = np.random.randn(2,60,9)
U = np.random.randn(2,60,3) 
sid = IPSID(Y=list(Y), U=list(U), n1=0, nx=3, i=5)

This breaks:

Y = np.random.randn(2,50,9)
U = np.random.randn(2,50,3) 
sid = IPSID(Y=list(Y), U=list(U), n1=0, nx=3, i=5)

Stack trace:

Traceback (most recent call last):

  File ~/miniforge3/envs/pyenv/lib/python3.12/site-packages/spyder_kernels/py3compat.py:356 in compat_exec
    exec(code, globals, locals)

  File ~/Drive/dfine_ctrl/torchDFINE/untitled0.py:7
    sid = IPSID(Y=list(Y), U=list(U), n1=0, nx=3, i=5)

  File ~/Drive/dfine_ctrl/PyPSID/source/PSID/IPSID.py:830 in IPSID
    B, Dy = computeBD(A, Cy, Yii, Xk_Plus1, Xk, iY, nu, Uf)

  File ~/Drive/dfine_ctrl/PyPSID/source/PSID/IPSID.py:121 in computeBD
    PP = np.concatenate((Xk_Plus1 - A @ Xk, Yii - C @ Xk))

ValueError: operands could not be broadcast together with shapes (3,82) (3,84) 

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