shih-hao-tseng / SLSpy

SLSpy provides a Python-based framework to design and simulate model-based control systems, especially for system level synthesis (SLS) methods.
Other
18 stars 1 forks source link

How to implement new system with specified A, B, C, D matrices? #2

Closed roya-correct-ai closed 4 years ago

roya-correct-ai commented 4 years ago

Hi there

I want to use the SLS library for a new system different from chain system that is already implemented in the code. My system has A, B, C, D matrices. Could you please let me know what should I change in the library? I see there is a method called generate_matrices_from_ABCD(), should I use this method in the examples instead of generate_doubly_stochastic_chain()? and how I should implement the A, B, C, D matrices in the code?

I would appreciate it if you help me. Thanks in advance

shih-hao-tseng commented 4 years ago

Hello, I have included a simple state space example in the folder "examples." Please update your SLSpy to version beta-20.8.3 to access the example and don't hesitate to let me know if you have any questions or suggestions.

Yes, the function generate_matrices_from_ABCD can be used to generate the corresponding matrices in the LTI_System. However, the ABCD matrices here are defined according to the original SLS paper (by treating both the control and noise as input) and could be different from the ABCD matrices of the system without external noise. It is possible to match the two ABCD expressions, and one would need to be careful about the order and the dimensions.

roya-correct-ai commented 4 years ago

That is great! Thank you so much for your help.