0
$\begingroup$

Is it possible to create a user-defined block in Simulink (and, later, XCos) that accepts a variable number of signals (I anticipate working with mainly 12 signals but not necessarily that number of signals) and outputs the integral of all the signals? The signals will be a vector from a $Ax + Bu$ signal, where $x$ is a state vector and $u$ is usually a 1D unit step function.

This is an example with 3 signals http://airvigilante194.sdf.org/Scripts/deadbeatJeff.slx I would prefer not to split the signals, integrate each of them separately, then recombine them.

(Also, if someone knows a way to quantize all the signals without splitting, quantizing individually, then recombining, that'd be great, but that may be a post for another day.)

$\endgroup$
4
  • $\begingroup$ By varying, do you mean varying from one run of the simulation to the next or will the number of signals vary dynamically during the simulation run ? $\endgroup$
    – AJN
    Sep 15 at 11:54
  • $\begingroup$ Matlab-Simulink integrator block already has the ability to integrate multidimensional signals without splitting them. input : Port_1 — Integrand signal : real scalar or array. $\endgroup$
    – AJN
    Sep 15 at 11:54
  • $\begingroup$ @AJN Varying from one run of the simulation to the next - as I change A, B, C, and K between runs $\endgroup$ Sep 15 at 16:08
  • $\begingroup$ @AJN That's the best news I've heard all day! I'll look into that tonight and hopefully have my simulator up and running with a Jacobian matrix of a critical point of a somewhat real vector field tomorrow. $\endgroup$ Sep 15 at 16:11
0
$\begingroup$

(From @ANJ) Matlab-Simulink integrator block already has the ability to integrate multidimensional signals without splitting them. input : Port_1 — Integrand signal : real scalar or array.

(From me) Link is updated http://airvigilante194.sdf.org/Scripts/deadbeatJeff.slx and humming along perfectly.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.