Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option for sys.filt to not put into canonical form #168

Open
arvoelke opened this issue Mar 15, 2019 · 3 comments
Open

Option for sys.filt to not put into canonical form #168

arvoelke opened this issue Mar 15, 2019 · 3 comments
Labels
critical Required to improve performance and user-experience enhancement

Comments

@arvoelke
Copy link
Owner

Currently _CanonicalStep (used by sys.filt) converts the system into CCF. This conversion can be detrimental for difficult systems.

@arvoelke
Copy link
Owner Author

Work-in-progress:

def sys_filt(sys, u, saturate=10):
    # https://github.com/arvoelke/nengolib/issues/168
    assert sys.analog == False
    x = np.zeros((len(sys)))
    y = np.zeros((len(u), sys.size_out))
    for i in range(len(u)):
        y[i, :] = sys.C.dot(x) + sys.D.dot(u[i, :])
        x[:] = (sys.A.dot(x) + sys.B.dot(u[i, :])).clip(-saturate, saturate)
    return y

@arvoelke
Copy link
Owner Author

The sys *= z in NengoLinearFilterMixin can also be detrimental as this converts back and forth between TF and SS.

@arvoelke
Copy link
Owner Author

arvoelke commented Mar 16, 2019

Also related to #106 as the current implementation for multi-output systems does not have these issues. That is, sys.X.filt is okay but sys.filt is not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
critical Required to improve performance and user-experience enhancement
Projects
None yet
Development

No branches or pull requests

1 participant