State space simulink modularize

조회 수: 1 (최근 30일)
Waqas Syed
Waqas Syed 2017년 3월 14일
답변: Kushagr Gupta 2017년 3월 16일
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?

답변 (1개)

Kushagr Gupta
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.

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by