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

Is there any way to collect all phi_x and phi_u with SLSpy library? and a request about SLS toolbox in MatLab #3

Closed roya-correct-ai closed 4 years ago

roya-correct-ai commented 4 years ago

Hi there

I have a question and a request about the system-level synthesis: I am wondering if it's possible to solve the feasibility problem instead of the optimization problem. I need to find the set of all phi_x and phi_u that meet the constraints and stabilize the closed-loop system. Can I do it with the SLSpy library? Is there any way to collect all phi_x and phi_u by the SLSpy library? And my request is about SLS MatLab toolbox Unfortunately, the server hosting the slswiki page is currently down, I would appreciate it if you let me know how I can download the MatLab package for SLS synthesis since I am new in python but comfortable with MatLab.

I do appreciate if you guide me with these issues. Many thanks in advance

shih-hao-tseng commented 4 years ago

Theoretically, yes, one can use SLSpy to form a feasibility problem by simply choosing an arbitrary objective function. SLS theory guarantees that if a solution exists (the SLS problem is feasible), the resulting Phi_x and Phi_u stabilize the closed-loop system.

However, I guess the question is actually two-fold (correct me if I misunderstood the question): 1. how can we collect the resulting Phi_x and Phi_u in SLSpy? 2. how can we obtain the set that describes all internally stabilizing Phi_x and Phi_u?

For the first question, the resulting Phi_x and Phi_u are attributes of the synthesized controller. Consider the SLS_controller in simple_state_space_example.py, its corresponding Phi_x and Phi_u are saved as matrix arrays at SLS_controller._Phi_x and SLS_controller._Phi_u, where SLS_controller._Phi_x[t] is the t-th spectral component of Phi_x (or Phi_x[t]) and so on (notice that Phix is in z^{-1}RH{\infty} and hence Phi_x[0] = 0).

For the second question, the SLS synthesis algorithm in SLSpy has automatically formed the optimization problem in CVXpy with the desired feasible set. One can start from there by calling get_SLS_Problem from the synthesizer to obtain the CVXpy problem instance, e.g., perform synthesizer.get_SLS_Problem() after synthesizer.synthesizeControllerModel() (so that the synthesizer has formed the CVXpy optimization problem) and modify the CVXpy problem instance accordingly. The CVXpy variables are saved in the synthesizer as the attributes _Phi_x and _Phi_u, both are matrix arrays as well. We remark that the variables are saved in the synthesizer and the resulting values are saved in the synthesized controller.

An alternative way to get the feasible set of Phi_x and Phi_u is to formulate the SLS problem from scratch, which is equivalent to the SLSpy process above. To do so, please refer to the original SLS papers.

Please find the SLS MatLab toolbox at https://github.com/sls-caltech/sls-code. Some brief introduction to the MatLab toolbox can be found at Jing Shuang (Lisa) Li and Shih-Hao Tseng, ``SLS-MATLAB Toolbox: Do-It-Yourself System Level Synthesis [Poster],'' in Proc. IEEE ACC, 2020.

roya-correct-ai commented 4 years ago

Theoretically, yes, one can use SLSpy to form a feasibility problem by simply choosing an arbitrary objective function. SLS theory guarantees that if a solution exists (the SLS problem is feasible), the resulting Phi_x and Phi_u stabilize the closed-loop system.

However, I guess the question is actually two-fold (correct me if I misunderstood the question): 1. how can we collect the resulting Phi_x and Phi_u in SLSpy? 2. how can we obtain the set that describes all internally stabilizing Phi_x and Phi_u?

For the first question, the resulting Phi_x and Phi_u are attributes of the synthesized controller. Consider the SLS_controller in simple_state_space_example.py, its corresponding Phi_x and Phi_u are saved as matrix arrays at SLS_controller._Phi_x and SLS_controller._Phi_u, where SLS_controller._Phi_x[t] is the t-th spectral component of Phi_x (or Phi_x[t]) and so on (notice that Phix is in z^{-1}RH{\infty} and hence Phi_x[0] = 0).

For the second question, the SLS synthesis algorithm in SLSpy has automatically formed the optimization problem in CVXpy with the desired feasible set. One can start from there by calling get_SLS_Problem from the synthesizer to obtain the CVXpy problem instance, e.g., perform synthesizer.get_SLS_Problem() after synthesizer.synthesizeControllerModel() (so that the synthesizer has formed the CVXpy optimization problem) and modify the CVXpy problem instance accordingly. The CVXpy variables are saved in the synthesizer as the attributes _Phi_x and _Phi_u, both are matrix arrays as well. We remark that the variables are saved in the synthesizer and the resulting values are saved in the synthesized controller.

An alternative way to get the feasible set of Phi_x and Phi_u is to formulate the SLS problem from scratch, which is equivalent to the SLSpy process above. To do so, please refer to the original SLS papers.

Please find the SLS MatLab toolbox at https://github.com/sls-caltech/sls-code. Some brief introduction to the MatLab toolbox can be found at Jing Shuang (Lisa) Li and Shih-Hao Tseng, ``SLS-MATLAB Toolbox: Do-It-Yourself System Level Synthesis [Poster],'' in Proc. IEEE ACC, 2020.

I appreciate your complete response. Thank you so much.