State space simulink modularize
1 回表示 (過去 30 日間)
古いコメントを表示
Hi,
In the attached image, it is visible that I am trying to implement a state space representation in simulink. What I want to achieve is to do it for multiple sets of inputs. My input signal for state space is based on 2 elements. But the input in the shown diagram has 12 elements. I want to make groups of 2 and input them to the gain. Is there an efficient way of doing this without implementing multiple gain blocks?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/161670/image.png)
0 件のコメント
回答 (1 件)
Kushagr Gupta
2017 年 3 月 16 日
If I understand the question correctly, you want to modify the input (1x12 vector) into a (2x6 matrix) for the down stream elements to process at one given instant of time. Some of the ways in which this can be done are as follows:
1. Use the ' reshape ' block to reshape the vector input into a matrix. To understand further, go through the documentation provided at the link. Note: As the output of reshape would be a matrix, all the downstream components have to match the size accordingly. For example, if you want scalar multiplication for the group of 2 inputs, then the gain block would become a vector of length 6, so that it can be effectively multiplied.
2. Use a MIMO State Space model to avoid complicating the design using the previous approach, as you will just have to figure out the A,B,C and D matrices once. Documentation for using State Space Block in simulink is available in the embedded link.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Composite Interfaces についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!