MATLAB Answers

Why do I get different outputs with bilinear and c2d(sysc,Ts,'Tustin') MATLAB functions?

15 views (last 30 days)
petarm
petarm on 11 Aug 2020
Answered: Paul on 12 Aug 2020
I have continuous state space model.
Ac = [ 1.3905 -20.8518 -0.7666
5.1879 -78.8942 6.0869
-2.8936 130.2226 -857.3009]
Bc = [ 90.20 94.7
16.00 14.0
-1307.8 953.0]
Cc = [1 0 0
0 1 0
0 0 1]
Dc = [0 0
0 0
0 0]
dt = 0.05
When I discretize it with Tustin method (bilinear transformation) using c2d function
sysc = ss(Ac,Bc,Cc,Dc);
sysd = c2d(sysc,dt,'Tustin');
[Ad,Bd,Cd,Dd,K] = ssdata(sysd);
output is
Ad = [ 1.0240 -0.3595 -0.0042
0.0886 -0.3378 0.0044
0.0063 0.0973 -0.9102]
Bd = [ 4.5570 4.5668
0.3202 0.5461
-2.8832 2.1887]
Cd = [1.0120 -0.1798 -0.0021
0.0443 0.3311 0.0022
0.0032 0.0486 0.0449]
Dd = [ 2.2785 2.2834
0.1601 0.2730
-1.4416 1.0943]
But when I use bilinear function
[Ad,Bd,Cd,Dd] = bilinear(Ac,Bc,Cc,Dc,1/dt);
output is
Ad = [ 1.0240 -0.3595 -0.0042
0.0886 -0.3378 0.0044
0.0063 0.0973 -0.9102]
Bd = [ 20.3796 20.4236
1.4319 2.4421
-12.8940 9.7880]
Cd = [0.2263 -0.0402 -0.0005
0.0099 0.0740 0.0005
0.0007 0.0109 0.0100]
Dd = [ 2.2785 2.2834
0.1601 0.2730
-1.4416 1.0943]
Can someone explain me why I get different Bd and Cd matrices in these two cases, since these functions should do the same thing, bilinear transformation?
Or these two functions, bilinear and c2d with Tustin method option, are not implemented in the same way?

  0 Comments

Sign in to comment.

Answers (1)

Paul
Paul on 12 Aug 2020
The state space realization of a linear system is not unique. However, you can compare the results from both methods and show that they have the same input/output relationship. Among other wasy, you can see this with
bode(c2d(sysc,dt,'Tustin'),ss(Ad1,Bd1,Cd1,Dd1,dt)); % Ad1, etc, from bilinear
So apparently c2d and blinear just use different methods to compute the realization of the transformed system. Check the algorithms sections of the doc pages for those functions to see how they work.

  0 Comments

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!