a problem with pade approximation

조회 수: 4 (최근 30일)
arash rad
arash rad 2021년 6월 3일
편집: arash rad 2021년 6월 3일
Hi
I have te code below
And i want to approxiamte delay with pade of first order :
clc
clear all
close all
s = tf('s');
G = [(-21.6*exp(-1*s))/(8.5*s+1) (1.26*exp(-0.3*s))/(7.05*s+1);...
(-2.75*exp(-1.8*s))/(8.2*s+1) (-4.28*exp(-0.35*s))/(9.0*s+1)]
G_new = pade (G,1)
but the answers is like this :
My tf was first order and with first order pade it should be second order
why some of it is third order ?
Thanks

채택된 답변

Paul
Paul 2021년 6월 3일
tf objects have three delay properties: InputDelay, OutputDelay, and IODelay. Look at all three of these properties for each element of G:
s = tf('s');
G = [(-21.6*exp(-1*s))/(8.5*s+1) (1.26*exp(-0.3*s))/(7.05*s+1);...
(-2.75*exp(-1.8*s))/(8.2*s+1) (-4.28*exp(-0.35*s))/(9.0*s+1)]
G = From input 1 to output... -21.6 1: exp(-1*s) * --------- 8.5 s + 1 -2.75 2: exp(-1.8*s) * --------- 8.2 s + 1 From input 2 to output... 1.26 1: exp(-0.3*s) * ---------- 7.05 s + 1 -4.28 2: exp(-0.35*s) * ------- 9 s + 1 Continuous-time transfer function.
[G(1,1).InputDelay G(1,1).OutputDelay G(1,1).IODelay G(1,2).InputDelay G(1,2).OutputDelay G(1,2).IODelay; G(2,1).InputDelay G(2,1).OutputDelay G(2,1).IODelay G(2,2).InputDelay G(2,2).OutputDelay G(2,2).IODelay]
ans = 2×6
0 0.3000 0.7000 0 0.3000 0 0 0.3500 1.4500 0 0.3500 0
As shown, the exp(-Ts) terms in G11 and G21 were divided into two different types of delays. It looks like the software is trying capture a common delay at the two outputs, and then makes up for the additional delay as needed with the IODelay. Then pade() comes along and substitutes a first order approximant for both of those delays in G11 and G21, resulting in third order models for Gnew11 and Gnew21
Gnew = pade(G,1)
Gnew = From input 1 to output... -21.6 s^2 + 205.7 s - 411.4 1: ------------------------------------- 8.5 s^3 + 81.95 s^2 + 171.4 s + 19.05 -2.75 s^2 + 19.51 s - 21.67 2: ------------------------------------- 8.2 s^3 + 59.17 s^2 + 71.72 s + 7.882 From input 2 to output... -1.26 s + 8.4 1: ----------------------- 7.05 s^2 + 48 s + 6.667 4.28 s - 24.46 2: ----------------------- 9 s^2 + 52.43 s + 5.714 Continuous-time transfer function.
Verify that Gnew11 is based on two first order approximants:
[num1,den1]=pade(.7,1);[num2,den2]=pade(.3,1);
Gnew(1,1), tf(-21.6,[8.5 1])*tf(num1,den1)*tf(num2,den2)
ans = -21.6 s^2 + 205.7 s - 411.4 ------------------------------------- 8.5 s^3 + 81.95 s^2 + 171.4 s + 19.05 Continuous-time transfer function. ans = -21.6 s^2 + 205.7 s - 411.4 ------------------------------------- 8.5 s^3 + 81.95 s^2 + 171.4 s + 19.05 Continuous-time transfer function.
Explicitly using IODelay on the individual elements looks like it yields what you might have expected.
G2 = [-21.6/(8.5*s+1) (1.26)/(7.05*s+1);...
(-2.75)/(8.2*s+1) (-4.28)/(9.0*s+1)];
G2(1,1).IODelay = 1; G2(1,2).IODelay = 0.3; G2(2,1).IODelay = 1.8; G2(2,2).IODelay = 0.35;
G2
G2 = From input 1 to output... -21.6 1: exp(-1*s) * --------- 8.5 s + 1 -2.75 2: exp(-1.8*s) * --------- 8.2 s + 1 From input 2 to output... 1.26 1: exp(-0.3*s) * ---------- 7.05 s + 1 -4.28 2: exp(-0.35*s) * ------- 9 s + 1 Continuous-time transfer function.
pade(G2,1)
ans = From input 1 to output... 21.6 s - 43.2 1: ------------------ 8.5 s^2 + 18 s + 2 2.75 s - 3.056 2: ------------------------- 8.2 s^2 + 10.11 s + 1.111 From input 2 to output... -1.26 s + 8.4 1: ----------------------- 7.05 s^2 + 48 s + 6.667 4.28 s - 24.46 2: ----------------------- 9 s^2 + 52.43 s + 5.714 Continuous-time transfer function.
Make sure that G and G2 have the same IO characteristics:
bode(G,G2)
  댓글 수: 1
arash rad
arash rad 2021년 6월 3일
편집: arash rad 2021년 6월 3일
Thank you very much
your explanation is complete

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Just for fun에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by