Dimensions of matrices being concatenated are not consistent

1 回表示 (過去 30 日間)
Matthew Tarn
Matthew Tarn 2019 年 3 月 9 日
コメント済み: Geoff Hayes 2019 年 3 月 9 日
Hello,
I am trying to add in a State-Space Block into simulink with the following matrices:
State-Space Block.jpg
However I recieve the following error whenever i try to apply this:
Error.jpg
Where am i going wrong.
  2 件のコメント
Geoff Hayes
Geoff Hayes 2019 年 3 月 9 日
Matthew - which matrices are being multiplied together? A is 3x3 and B is 3x1; C is 4x3 and D is 4x1. Do your initial input need to be a 3x1 array? (I'm just guessing here...is this the x in the equations?)
Matthew Tarn
Matthew Tarn 2019 年 3 月 9 日
編集済み: Matthew Tarn 2019 年 3 月 9 日
Thankyou in advanced for your reply.
I have calculated the matrices by hand to meet parameters for a State-Variable feedback controller on paper and would like to test my calculations in matlab/simulink.
The following is a picture of the circuit i am trying to design and input my matricies/gains into, I also have 3 pole positions determined:
I have expanded C from a 1x3 matrix to a 4x3 matrix and D from a 1x1 matrix to a 4x1 matrix; to give myself 3 more outputs instead of just 1 output from the original C and D so that when the data is output i can see part 1 on the scope and parts 2,3 and 4 can be multiplied by a gain matrix I have.
I have got the size of the matricies that i need from this information on:https://uk.mathworks.com/help/simulink/slref/statespace.html
snip.JPG
Matt

サインインしてコメントする。

回答 (1 件)

Geoff Hayes
Geoff Hayes 2019 年 3 月 9 日
Matt - from your above description, C is an rxn matrix and D is an rxm matrix where r is the number of outputs. Doesn't this mean that your Initial Outputs must be a 4x1 array?
  2 件のコメント
Matthew Tarn
Matthew Tarn 2019 年 3 月 9 日
Yes thats correct Geoff, is it as simple as putting 4*1 into the “initial outputs“ box and 1*1 into the initial inputs box?
Again, Thank you for your responses so far.
Matt
Geoff Hayes
Geoff Hayes 2019 年 3 月 9 日
Hopefully that should be enough. Have you tried it out?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by