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

Simulink n x m-matrix as input for Transfer Fcn-block

88 views
Skip to first unread message

sakari

unread,
Oct 31, 2005, 9:32:25 AM10/31/05
to
Hi,

I have a file as an input for a tansfer function block. The file
contains a n x m matrix. n varies from simulation to simulation. How
can I make the transfer function block to calculate the output for
each input row?

If n was fixed I could always have n transfer fcn blocks parallel
each taking its input from a bus. But when n varies this is not an
option. So how to make one transfer block read all the rows?

thanks in advance,
sakari

checker

unread,
Oct 31, 2005, 3:04:50 PM10/31/05
to

Sakari,

It's not clear to me what you're attempting to do.

Is the nxm matrix to be used as the coefficients of a transfer
function block or is it the actual input vector (U) for the the
transfer function block. When you say that n varies from simulation
to simulation, is that to say that you load a different file for each
sim, yielding a new nxm matrix?

-Chris

sakari

unread,
Nov 1, 2005, 3:08:15 AM11/1/05
to

The nxm matrix is the input signal of the system defined. The
transfer function is fixed. The file is the same but before running
simulink the file is re-created by a script. The amount of rows (n)
in the matrix depends on how many values is given for a certain
variable (n values -> n input vectors).

hopefully this clears the situation,

BR,
sakari

checker

unread,
Nov 1, 2005, 10:32:37 AM11/1/05
to

Sakari,

Maybe I understand.

The equivalent system I'm thinking of is this: You have a matrix of
data on the workspace. The number of rows equates to the timesteps.
The number of columns represent a set of inputs to the system. If
you create this matrix such that the first column is time, and the
remaining columns are the inputs to your system, then you can use the
from workspace block to get the data into simulink. When you try to
hook this input matrix into your transfer function, the simulation
won't run because the transfer function doesn't perform scalar
expansion...that is, the transfer function isn't a mux'd function (it
will not accept a mux'd input). If this is conceptually equivalent
to your system, then the solution is to realize your transfer
function using integrators, summers, gains and feedbacks. All of
these elements allow mux'd operations.

If this is not conceptually equivalent to your system, then I still
don't understand your problem.

HTH,

-Chris

0 new messages