Reducing order of a system

10 views (last 30 days)
Salvatore De Luca
Salvatore De Luca on 2 Feb 2024
Commented: Jon on 2 Feb 2024
I wanted to know if using balred or reducespec on a system is there a way to obtain the relation between the old state variables and the new ones. The fact is that i have to use the reduce model to make a state feedback control, so i have to make my system follow a reference but i don't know how since the balred command make me lose the interpetation that i give to the old variables

Accepted Answer

Jon
Jon on 2 Feb 2024
The interpretation of the system input and output variables should remain the same. It is only the internal states that change. If you are directly using one of the states in the original model as if it were a system output, you should instead assign an output to this state, and then do your balanced reduction. The new system C and D matrices will compute the correct combination of the new systems original states, to produce an output that is equivalent to the state you were interested in in the original system.
So for example if you had a system with 6 states and were interested in the preserving the interpretation "meaning" of the third state in your system, you would add a row to your C and D matrices, as
Caug = [C;[0 0 1 0 0 0]]
Daug = [D;[0 0 0 0 0 0]]
And then use Caug, and Daug in your system which has its order reduced
  3 Comments
Jon
Jon on 2 Feb 2024
So for example
% Example system
A = [-1 0.2 0.1;0 -3 -0.15;0.1 0.4 -8]
A = 3×3
-1.0000 0.2000 0.1000 0 -3.0000 -0.1500 0.1000 0.4000 -8.0000
B = [1; 0.4; -2]
B = 3×1
1.0000 0.4000 -2.0000
C = [0.5 0.2 1.8]
C = 1×3
0.5000 0.2000 1.8000
D = [0.6]
D = 0.6000
tFinal = 6;
% Make original state space system
sys = ss(A,B,C,D)
sys = A = x1 x2 x3 x1 -1 0.2 0.1 x2 0 -3 -0.15 x3 0.1 0.4 -8 B = u1 x1 1 x2 0.4 x3 -2 C = x1 x2 x3 y1 0.5 0.2 1.8 D = u1 y1 0.6 Continuous-time state-space model.
% Provide augmented second output to produce state x2
Caug = [C;[0 1 0]];
Daug = 0;
sysAug = ss(A,B,Caug,Daug);
% Reduce the order of the system
sysRed = balred(sysAug,2);
% Look at step responses
[y,t,x] = step(sys,tFinal);
[yAug,tAug] = step(sysAug,tFinal);
[yRed,tRed] = step(sysRed,tFinal);
figure
plot(t,x(:,2),tAug,yAug(:,2))
xlabel('time [s]')
ylabel('state and output values')
legend('x_2','yAug_2','Location','southeast')
title('Showing that x_2 and yAug_2 are the same')
figure
plot(t,x(:,2),tRed,yRed(:,2))
xlabel('time [s]')
ylabel('state and output values')
legend('original x_2','yRed_2','Location','southeast')
title('Output yRed_2 approximates behavior of x_2 in original system')

Sign in to comment.

More Answers (0)

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!