Implementing a improper discrete-time transfer function into Simulink.

5 visualizaciones (últimos 30 días)
Daniel Gelman
Daniel Gelman el 28 de Sept. de 2016
Comentada: Zack Peters el 30 de Sept. de 2016
Hello,
I am trying to model a discrete-time control system in Simulink. The control system uses the inverse of a second-order transfer function inside an inner loop. The plant takes the form of:
P(s) = (3.332*s + 4.679)/(s^2+30.97*s+45.5)
s = tf('s');
P = (3.332*s + 4.679)/(s^2+30.97*s+45.5);
First, I calculated P(s)^-1.
P_inv = inv(P);
Trying to implement this improper function into Simulink is not possible so I then performed these steps suggested by MathWorks support team to work around this.
[r,p,k]=residue(P_inv.num{1},P_inv.den{1});
sys1 = tf(r(1),[1,-p(1)]);
sysk1 = k(1)*s;
sysk2 = k(2);
After breaking down the improper function, I discretized it accordingly:
Ts = 0.005;
d_sys1 = c2d(sys1,Ts)
d_sysk1 = c2d(sysk1,Ts,'matched') % <--- problem
The problem is that the resulting d_sysk1 is yet another improper function taking the form of:
d_sysk1 =
59.99 z - 59.99
Sample time: 0.005 seconds
Discrete-time transfer function.
Is there something I am doing incorrectly? I need to implement an inverse and discrete transformation of P(s).
Thanks in advanced, Daniel

Respuestas (1)

Zack Peters
Zack Peters el 29 de Sept. de 2016
The improperness of your system translates to using derivatives in your math. This works out fine in theory because the inverse of the system can perfect cancel out the poles/zeros of the plant. However in the practice side of things, derivatives on machines are very noisy and extremely unstable. One idea to move your system from improper to proper is to multiply the inverse with a low-pass filter of the same order, making it proper.
It will move the poles of your system for sure, but if a the right filter is applied, it can be minimized. Here is someone else who asked in a similar question (and the same lpf response): https://www.mathworks.com/matlabcentral/newsreader/view_thread/317605
By the way, do you have the control block diagram of your system? I might be able to help more if you show it.
~Zack
  2 comentarios
Daniel Gelman
Daniel Gelman el 29 de Sept. de 2016
Hello Zack,
Thank you for your response. Here is a block diagram of the control system I am trying to re-create - note the P(s)'.
I want to stress that my system works as intended in continuous-time. I used the method discussed in the link in my original post. The problem comes in when trying to discretize each component in P(z)' that results in another improper function. I am discretizing each transfer function to eventually implement them onto a micro controller.
I did see this discussion before but how would I design the filter in a way that it would not affect performance?
Regards, Daniel
Zack Peters
Zack Peters el 30 de Sept. de 2016
Hi Daniel,
It's possible that the state-space block may not have the same error constraints that the transfer-function block has. I just tried converting the inverse of P to a state-space an put it into a model and simulated without any problems.
It sounds like you want it discretized so maybe convert to a discrete state-space instead? I think this should work.
~Zack

Iniciar sesión para comentar.

Categorías

Más información sobre Additional Math and Discrete en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by