nm

11353 Reputation

20 Badges

13 years, 12 days

MaplePrimes Activity


These are questions asked by nm

I am really baffled by this. I was starting to think Maple control system is good, only to find I get an error when I try to obtain the controllability Gammian for a state space system which is time varying.  Maple only seem to support a non-time varying A,B,C,D for this function.  Can someone please confirm this, or may be I am doing something wrong?

I was trying to verify my hand solution for a HW using Maple.

----------------------
restart:
alias(DS=DynamicSystems):
A:=Matrix( [[2,-exp(t)],[exp(-t),1]]);
B:=Matrix([[0],[1]]);
sys:=DS:-StateSpace(A,B);  #created OK
m:=DS:-Grammians(sys);

Error, (in DynamicSystems:-Grammians) symbolic value(s) in model: t, exp(t), exp(-t)
---------------------------------------------------

If the system is time invariant, then it works. Example from help:

-------------------------------------------------
restart:
alias(DS=DynamicSystems):
aSys := DS:-StateSpace( <<-5,3>|<3,-4>>, <<2,3>>, <<1,0>|<0,1>>, <<0,0>> ):
m:=DS:-Grammians(aSys);
---------------------------------

The main advantage of using computer algebra system for control system is to be able to do things using symbolic which is much more powerful than just numerical computation as with Matlab. There is nothing in the above linked to help page that says Maple does not support time varying state space for this function (unless I missed it).

Is it possible to add support for LTV in Maple 19?

ps. note that the ControllabilityMatrix works on LTV:

m:=DS:-ControllabilityMatrix(sys); #OK

But I wanted the Grammian.

Looking at  http://www.maplesoft.com/support/help/maple/view.aspx?path=ImageTools

and

http://www.maplesoft.com/support/help/maple/view.aspx?path=ImageTools%2fFormats

it seems to only support jpeg,tiff,bmp.

This seems like something from 1980's days. Is there another package to load other image formats? Such as png for example, and to export as png?

I'd like to import png file, rescale it in Maple (make thumbnail image) and export it again.

I am using 18.1 on windows 7

restart;
ode := (-6 + 3*x - 3*x^2 + 2*x^3)*y(x) + x*(6 - 3*x + x^3)*diff(y(x),x) + x^2*(-3 + 3*x - 3*x^2 + x^3)*diff(y(x),x$2)= 0;
ic := y(0)= 0, D(y)(0)= 1:
sol:=dsolve({ode, ic},y(x));

Gives

 

What is _C2  that shows up there? Since this is second order and I give 2 initial conditions, I did not expect to see any _C in solution.  How should I handle this solution now? (say to evaluate it, etc...) with this unknown _C2 in there?

Maple 18.1 on windows.

I am not sure I know what is going on. I expected to obtain the controllable canonical form in this example, but I am not. May be I am not using it correctly. 

Given A,B, I wanted to transfer the state space to controllable canonical form

http://www.maplesoft.com/support/help/Maple/view.aspx?path=DynamicSystems%2FSSTransformation

In this form, the A matrix will have 1 on the super diagonal, and the last row will have the coefficients of the charaterestic polynomial in reverse order with a minus sign. The B matrix will have all zeros, except for the last entry.  This is what the example on the above page actually shows. 

But when I tried it on my A,B, I do not get this form for the new B matrix. Here is a MWE

restart;
with(DynamicSystems):
A:=Matrix([[0,0,1,0],[0,0,0,1],[-2,-1,0,0],[1,-1,0,0]]);
B:=Matrix([[0],[0],[1],[0]]);
C:=Matrix([[0,0,0,0]]):
D0:=Matrix([[0]]):
sys:=StateSpace(A,B,C,D0): #just to see the polynomial
CharacteristicPolynomial(sys, s);


SSTransformation(A,B,C,D0,form=ControlCanon,output=['A','B']);

The above should be

I am sure I am doing something wrong, but what?

Maple 18.01, windows 7

 

 

If the differential equation has second derivative in the RHS (i.e. in the input), then `StateSpace` gives an error.

I might not be entering it correctly? But if I first create a `TransferFunction` from the ODE, then it works.

Why?

Here is the code:

------------------
restart;
alias(DS=DynamicSystems):
ode2:=diff(y(t),t$2)+2*diff(y(t),t)+3*y(t)=diff(u(t),t)+u(t);
sys:=DS:-StateSpace(ode2,'outputvariable'=[y(t)],'inputvariable'=[u(t)]):
-------------------------
Error, (in DynamicSystems:-StateSpace) unable to convert the differential equation system:  invalid form of derivative in differential equation


But now if I do this, it works:

---------------------------------------------
restart;
alias(DS=DynamicSystems):
ode2:=diff(y(t),t$2)+2*diff(y(t),t)+3*y(t)=diff(u(t),t)+u(t);
sys:=DS:-TransferFunction(ode2,'outputvariable'=[y(t)],'inputvariable'=[u(t)]):
sys:=DS:-StateSpace(sys);
-----------------------------------------------

Maple 18.01 on windows 7.

 

 

First 184 185 186 187 188 189 190 Last Page 186 of 199