c_n_h

25 Reputation

3 Badges

0 years, 4 days

MaplePrimes Activity


These are questions asked by c_n_h

Dear Maple experts,

is there a possibility/command to get a vizualization of the output of the command FeedbackConnect?

I was thinking of something like this:


as it is given on the maple-help page for that command (but not generated via a maple command as far as I understood)

Thanks in advance !

Dear Maple experts,

I try to avoid the generation of new variable names (for states, inputs, outputs) introduced automatically by maple (StateSpace(), FeedbackConnect()) in the two (connected) cases:

1)

I generated a discrete StateSpace system using a difference equation:

sys2 := StateSpace([u(n)=K_virt*(q_a(n)-q_d)+D_virt*(q_a(n)-q_a(n-1))/T],inputvariable=[q_a(n)],outputvariable=[u(n)],discrete=true,sampletime=T);

The statevariable "x1(n)" is automatically generated by maple

I tried to avoid this by using the following commands that don't work:

sys2 := StateSpace([u(n)=K_virt*(q_a(n)-q_d)+D_virt*(q_a(n)-q_a(n-1))/T],inputvariable=[q_a(n)],outputvariable=[u(n)],statevariable=[q_a(n-1)],discrete=true,sampletime=T);

-> error message:

Error, (in ProcessOptions) argument 'statevariable = [q_a(n-1)]' invalid: rhs should be of type list({name, anyfunc(name)})

sys2 := StateSpace([u(n)=K_virt*(q_a(n)-q_d)+D_virt*(q_a(n)-q_a(n-1))/T],inputvariable=[q_a(n)],outputvariable=[u(n)],statevariable=[q_a_delayed],discrete=true,sampletime=T);

-> error message:

Error, (in DynamicSystems:-StateSpace) missing state(s): {q_a_delayed(n)}

sys2 := StateSpace([u(n)=K_virt*(q_a(n)-q_d)+D_virt*(q_a(n)-q_a(n-1))/T],inputvariable=[q_a(n)],outputvariable=[u(n)],statevariable=[q_a_delayed(n)],discrete=true,sampletime=T);

-> error message:

Error, (in DynamicSystems:-StateSpace) missing state(s): {q_a_delayed(n)}

Can you help me here?

2)

I have two discrete StateSpace models (sys1, sys2):

* sys2 is the one from above (1 input, 1 output, 1 state)

* sys1 (2 inputs, 4 outputs, 4 states) doesn't contain any automatically generated variables (I obtained this one by transforming a continuous statespace model to a discrete one)

* variables that represent the same signal have the same name in both systems.

   -> "q_a(n)" appears as an output in sys1 and as an input in in sys2

   -> "u(n)"     appears as an input in sys1 and as an output in in sys2

Now I combined these two models via:

FeedbackConnect([sys1, sys2],[[2,2,1,-1]])

Instead of using the variable names I introduced maple generates new variable names for inputs, outputs and states.

How can I avoid this?

(the option "merge=evaluate") seems not to work (even if I work with numeric values for the system parameters instead of symbols)

Thank you in advance!

Page 1 of 1