Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Invalid settings for input port dimension of demux

2,055 views
Skip to first unread message

Rajasekar

unread,
Nov 29, 2006, 2:28:28 AM11/29/06
to
Hi Friends,

I got error this error during simulation..

Invalid setting for input port dimensions of 'newpwm2/Demux'. The
dimensions are being set to [-1]. This is not valid because the input
has fewer elements than the total number of output ports

if any have the solutions,please guide me to overcome out of this
problem.

regards
rajasekar.r

Rajasekar

unread,
Nov 29, 2006, 3:54:46 AM11/29/06
to
Hi Nox,

dimensions in the sense?
i couldn't get to ur point...

the problem lies with the link between state-space block
and demux block..

i have a doubt that,this due to single link between
state-space and demux..

but the block contain 2 values (x and y)...........
i think this is the place where my problem lies..

any possible solutions to overcome?

regards
rajasekar

nox wrote:
>
>
> ok I found the model.
>
> what's the dimension of the state space output y ?

Rajasekar

unread,
Nov 29, 2006, 4:28:40 AM11/29/06
to
Hi Nox,

I understood ur point.
but when i goes to
format menu->port and signal displays->signal dimensions

it goes to simulink debugger window ,not an dimension window as
mentioned by u...
why the dimension window is not coming ?
suggest me some solutions......

regards
raja

nox wrote:
>
>
> the problem is the following :
>
> I think the configuration of your state space block isn't good.
> What
> are your parameters for this block (A B C D) ?
> the output y dimension must be at least 3 (vector with at least 3
> coordinates), because in your demux, you're trying to separate your
> signal in 3.
> Here the input of the demux is a vector with only 1 or 2
> coordinates,
> so of course you can't separate it in 3 different parts, and it
> generates an error.
>
> So take a look at your dimensions by doing the following :
>
> in your model, go in the "Format" menu
>
> then choose "Port/Signal Displays" and then put the "Signal
> Dimension" to on.
>
> You'll see the dimensions on your model, and you'll see that the
> input of the demux is inferior to 3, which is not correct.

rajasekar

unread,
Nov 29, 2006, 5:01:28 AM11/29/06
to
Hi Nox,

The Values for C variable,what i used is given below
C=[eye(9)];
but this variable are exist in matlab work space..

regards
rajasekar

nox wrote:
>
>
> you must have a window telling you the same error message as
> previously.
> But we don't care.
> The important point is that dimensions of your signal now appear on
> your model (on the links before and after each block).
>
> Could you please tell me the value of the C matrix in your state
> space block ? (double clic on the block)

rajasekar

unread,
Nov 29, 2006, 5:22:11 AM11/29/06
to
Hi Nox,

one more thing i forget to tell in the last message,

the values i got like ?(1) input side of state-space block and as
well as in the output side of the state-space
block

and only ? in the input side of demux block..

regards
rajasekar

nox wrote:
>
>
> so your output is a 9 dimension vector...
>
> we must be sure of this. Let's check...
>
> if the "Signal Dimension" setting didn't work, you can connect a
> "to
> workspace" block (in "Sinks") on the output of the state-space
> block
> (instead of the demux), and remove all blocks on the right of it
> (demux, gain, scope,to workspace).
>
> Then run your model.
>
> The output of your state-space is now in your workspace with the
> default name 'simout' I think.
>
> So try a
> size(simout) in your prompt to check the dimension of the signal.
>
> What's the result ?

Rajasekar

unread,
Nov 29, 2006, 5:39:00 AM11/29/06
to
Hi Nox,

I tried as u said, i removed all the blocks from my model
and i replace it with the simout block after the state-space block,

as u said the variable "vi" not exist in the work space in matlab.but
the values after the mux before state-space block is 3....

and the errors i got are listed below...

1.Invalid dimensions encountered while propagating dimensions from
output port 1 of 'pwmchk/Mux' to input port 1 of
'pwmchk/State-Space'. During propagation, we are attempting to unify
the dimensions of the multiplexed signal with dimensions {1,1,1} to
obtain the dimensions [-1]

2.Error in port widths or dimensions. Invalid dimension has been
specified for output port 1 of 'pwmchk/Mux'

3.Error in port widths or dimensions. Invalid dimension has been
specified for input port 1 of 'pwmchk/State-Space'

nox wrote:


>
>
> rajasekar wrote:
>>
>>
>> Hi Nox,
>>
>> one more thing i forget to tell in the last message,
>>
>> the values i got like ?(1) input side of state-space block and
as
>> well as in the output side of the state-space
>> block
>>
>> and only ? in the input side of demux block..
>>
>> regards
>> rajasekar
>>
>

> ok ! the the dimensions display worked well...
>
> So as I said, simulink think that the input of the demux is a one
> dimension vector...of course you can't separate a one-dimension
> vector in three with the demux.
>
> Now we need to find why this state-space outputs a one-dimension
> vector instead of a nine-dimension one.
>
> The input of the state-space model doesn't seem right already...
>
> You have a "To Workspace" on the input...Use it to check the value
> of
> Vi.
>
> What do you find ?
>
> PS : maybe it'll be faster if you send me the model by email

rajasekar

unread,
Nov 29, 2006, 7:12:50 AM11/29/06
to
Hi nox,

No the Variable "Vi" not exist in the workspace...

regards
rajasekar

nox wrote:
>
>
> you have a "To workspace" block outputing Vi (with a big V) if
> you're
> model is exactly the same as the model in the pdf file...
>
> So you must have a variable Vi in your workspace !
>
> if you display it, what's its value ?

Rajasekar

unread,
Nov 30, 2006, 12:43:44 AM11/30/06
to
Hi Nox,

I found that,the problem lies with the connection between
MUX block and State Space Block.

and also the problem is with the properties of state space block.

becoz when i replace the state-space block with scope, it's
working fine....

Regards
rajasekar

nox wrote:
>
>
> Did you put a "To workspace" block between the Mux and the
> state-space block, like in the pdf ?
>
> if yes did you change the name of the output value by double
> clicking
> on the "To Workspace" block and set "Vi" in "Variable Name" ?

Rajasekar

unread,
Nov 30, 2006, 4:32:45 AM11/30/06
to
Hi Nox,

After the first block
(1,1,1) at each line from first block ,

after the mux block the value is "3"

and ?(1) before and after the state space block...
there lies a problem...

regards
rajasekar.r

nox wrote:
>
>
> can you do just this :
>
> again : Format, then Port/Signal Displays, put the Signal dimension
> to on (if it is already, put it to off and then to on again...)
> and tell me the numbers you see :
>
> 1) after the first block (the 3 outputs of the generator)
> 2) after the MUX
> 3) before and after the state-space block
>
> I think after the MUX you should have a (?)1, and that's already an
> error.
> And that's why your model doesn't work.

rajasekar

unread,
Nov 30, 2006, 4:39:41 AM11/30/06
to
Hi Nox,

I am getting errors,when i connected Mux block (with 3 vector input
to
one vector output)to a state-space block
i am getting the following errors like....



1.Invalid dimensions encountered while propagating dimensions from
output port 1 of 'pwmchk/Mux' to input port 1 of
'pwmchk/State-Space'. During propagation, we are attempting to unify
the dimensions of the multiplexed signal with dimensions {1,1,1} to

obtain the dimensions [-1].......

please suggest some possible issue's to overcome this problem.

Thanks And regards

rajasekar

unread,
Nov 30, 2006, 5:04:21 AM11/30/06
to
Hi Nox,

I cleared all the blocks and placed only scope block
after the mux block.then it's working fine.

when i connected the state-space block i am getting errors....so the
problem lies with the
stata-space block parameters and properties only...

regards
rajasekar

nox wrote:


>
>
> rajasekar wrote:
>>
>>
>> Hi Nox,
>>
>> I am getting errors,when i connected Mux block (with 3 vector
> input
>> to
>> one vector output)to a state-space block
>> i am getting the following errors like....
>>
>> 1.Invalid dimensions encountered while propagating dimensions
> from
>> output port 1 of 'pwmchk/Mux' to input port 1 of
>> 'pwmchk/State-Space'. During propagation, we are attempting to
>> unify
>> the dimensions of the multiplexed signal with dimensions
{1,1,1}
> to
>> obtain the dimensions [-1].......
>>
>> please suggest some possible issue's to overcome this problem.
>>
>> Thanks And regards
>> rajasekar.r
>

> The problem is always the same : in the configuration of the
> state-space block, you told me that your C matrix was eye(9), so
> this
> block expects a 9-dimensional vector as input I think...you only
> input a 3-dimensional one !
>
> if your MUX takes 3 3-dimensional vectors as input (instead of 3
> 1-dimensional vectors as you have now), it will outputs a
> 9-dimensional vector, and it will work

nurul

unread,
Apr 15, 2012, 9:13:09 AM4/15/12
to
Rajasekar <rajase...@gmail.com> wrote in message <ef472...@webcrossing.raydaftYaTP>...
> nurel

Aviti Mushi

unread,
Jan 25, 2017, 7:15:11 PM1/25/17
to
This is question is a little old and probably someone answered it somewhere else. For those encountering this problem at present, what you have to do is
(1). Right click your State-Space block
(2). Select Explore
(3). Set the Parameters A, B, C, D accordingly. E.g. if your system A is 2x2 matrix, then input it, B 2x1, C eye(2) [if you need two outputs], D [0; 0].
(4). Scale accordingly to system size.



Rajasekar <rajase...@gmail.com> wrote in message <ef472...@webcrossing.raydaftYaTP>...
0 new messages