The following transfer function has zero/pole cancelation. I am trying to create a transfer function object, but Maple automatically simplifies the transfer function before it gets to the DynamicSystem call, which result in different output than what I expected.
I do set the cancellation=false option, even though this is the default. The problem is Maple does pole/zero cancelation before the call.
I tried to add '' around it to delay evaluation, but it did not work.
tf:=DS:-TransferFunction('-(s - 1)/((-2 + s)*(s - 1))'):
You can see it did pole/zero cancelation.
In Matlab and Mathematica, this does not happen. For example
sys = TransferFunctionModel[-(s - 1)/((-2 + s) (s - 1)), s]
Same with Matlab:
>> sys_tf =-(s - 1)/((-2 + s)*(s - 1))
-s + 1
s^2 - 3 s + 2
Continuous-time transfer function.
What do I need to do in Maple to keep the transfer function without pole/zero cancelation (this affects the state space realization later on when this cancelation happens)
I am using Maple 2019 at this moment as Maple 2020 is busy.