State space simulink modularize
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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?
0 commentaires
Réponses (1)
Kushagr Gupta
le 16 Mar 2017
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 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!