Robust control system calculations

Click For Summary

Discussion Overview

The discussion revolves around robust control system calculations, specifically focusing on the design and analysis of H-infinity controllers using MATLAB. Participants are sharing their code implementations and seeking feedback on their approaches to solving related problems.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Homework-related

Main Points Raised

  • One participant shares MATLAB code for H-infinity controller design, detailing the weight selection and analysis of the closed-loop system.
  • Another participant requests to see the original poster's attempt at solving the problem before providing tutorial help.
  • The original poster presents a second problem involving multiplicative uncertainty and demonstrates the use of MATLAB functions to analyze and fit uncertainty weights.
  • Participants discuss the implementation of various transfer functions and their effects on system behavior, including the use of frequency response data.

Areas of Agreement / Disagreement

There is no consensus on the correctness of the approaches presented, as participants are sharing different methods and implementations without resolving potential discrepancies in their calculations.

Contextual Notes

Limitations include potential missing assumptions in the control design process, dependence on specific definitions of uncertainty, and unresolved mathematical steps in the participants' code implementations.

Who May Find This Useful

Readers interested in robust control systems, MATLAB programming for control design, and those seeking to understand the complexities of H-infinity control methodologies may find this discussion beneficial.

Naibos77
Messages
3
Reaction score
0
4.JPG
can i solve this problem i didnt go university due to Covid-19
3.JPG
 
Physics news on Phys.org
Welcome to PF.

Before we can give you tutorial help, we need to see your attempt at solving this problem. Show us your work.
 
okey for problem 1 i wrote this MATLAB code :

1.JPG
2.JPG


clear all;
clc;
% Defining TF
s=tf('s');
G=4/((s-1)*(0.02*s+1)^2);
Gd=100/(10*s+1);

% Weight Selection
M=1.8; wb=20; A=1e-4;
Wp=tf([1/M wb], [1 wb*A]);
Wu=1;

% Hinf Controller Design
[K,CL,gamma]=mixsyn(G,Wp,Wu,[]);

[K_num, K_den] = ss2tf(K.a,K.b,K.c,K.d);

Ks = tf(K_num, K_den);

% Analysis
Gcl = minreal(feedback(G*Ks,1));

figure(1)
step(Gcl)
grid on

L = G*Ks;
S = minreal(1 / (1 + L));
KS = Ks*S;

figure(2)
bodemag(S,'b',KS,'g',gamma/Wp,'b--',ss(gamma/Wu),'g--')
legend('S','KS','gamma/Wp','gamma/Wu','Location','SE')
grid on

%figure(2)
%sigma(S,'b',KS,'g',gamma/Ws,'b--',ss(gamma/Wu),'g--')
%legend('S','KS','gamma/Ws','gamma/Wu','Location','SE')
%grid on

% Second Controller Weights
M2=1.5; wb2=10; A2=1e-4; n = 2;
Wp2 = (s/M2^(1/n) + wb2)^n / (s + wb2*A2^(1/n))^n;
Wu2=1;

% Second Hinf Controller Design
[K2,CL2,gamma2]=mixsyn(G,Wp2,Wu,[]);

[K2_num, K2_den] = ss2tf(K2.a,K2.b,K2.c,K2.d);

K2s = tf(K2_num, K2_den);

% Analysis
G2cl = minreal(feedback(G*K2s,1));

figure(3)
step(Gcl, G2cl)
legend('Design 1', 'Design 2')
grid on

L2 = G*K2s;
S2 = minreal(1 / (1 + L2));
KS2 = K2s*S2;

figure(4)
bodemag(S2,'b',KS2,'g',gamma2/Wp2,'b--',ss(gamma2/Wu2),'g--')
legend('S2','KS2','gamma2/Wp2','gamma2/Wu2','Location','SE')
grid on

figure(5)
bodemag(S,'b',S2,'m',gamma/Wp,'b--',gamma2/Wp2,'m--')
legend('S','S2','gamma/Wp','gamma2/Wp2','Location','SE')
grid on

figure(6)
step(S*Gd, S2*Gd, 2)
legend('Design 1', 'Design 2')
grid on
 
for question 2 :
clear all
clcDelta_I = ultidyn('Delta_I', [1 1]);
Delta_I = ultidyn('Delta_I', [1 1]);

G = tf(1,[0.1 1])

G1 = G*tf(1,[.05 1])

G2 = G*tf([-.01 1],[.01 1])

G3 = G*tf(4,[1 2 4])

G4 = G*tf(100,[1 2 100])
array = stack(1,G1,G2,G3,G4);
Garray = frd(array,logspace(-1,3,60));

rel_err = (Garray - G) / G;
figure(1)
bodemag(rel_err)
grid on

% Fitting multiplicative uncertainty weight
[Gp,Info] = ucover(Garray,G,1);

figure(2)
bodemag(rel_err,'b--',Info.W1,'r',{0.1,1000})
grid on

% Multiplicative Uncertainty Weight in tf form
[num_wI den_wI] = ss2tf(Info.W1.a,Info.W1.b,Info.W1.c,Info.W1.d);
wIs = tf(num_wI, den_wI);

% Other representation of Gp
Gp2 = G * (1 + wIs * Delta_I)

relative.JPG
 

Similar threads

  • · Replies 0 ·
Replies
0
Views
2K
Replies
24
Views
5K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K