Message Boards Message Boards

Nonlinear feedback system

Posted 5 years ago
POSTED BY: OBIROY LAIRENJAM
2 Replies

Obiroy,

1: your OutputResponse syntax is wrong. I do not understand what you are trying to do. OutputResponse 2nd argument is an input that is independent of the states. For example, this would work:

    out = OutputResponse[nsys, {UnitStep[t], UnitStep[t]}, {t, 0, 300}];

to get a plot of all the outputs:

    Plot[out, {t, 0, 300}]

You have the inputs as a function of the states. MMA cannot interpret that properly and thinks that those are new variables that you have introduced. If you really intended to do that, you should add those state connections into the model using the various functions for that (i.e. SystemsModelSeriesConnect, SystemsModelFeedbackConnect, etc.)

2: I do not understand why you are using interpFN at all. The best way to make your assignment is

    {u1, u2, u3, u4, u5, u6, u7, u8} = sol;

3: you can use If in the input such as:

    out = OutputResponse[
       nsys, {If[t >= 100, Sin[t], 0], UnitStep[t]}, {t, 0, 300}];

Regards,

Neil

POSTED BY: Neil Singer
POSTED BY: OBIROY LAIRENJAM
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract