Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Cascade Control of a Compute-IntensiveApplication Power Consumption
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
HALITIM Kouds
Cascade Control of a Compute-IntensiveApplication Power Consumption
Commits
ced2625b
Commit
ced2625b
authored
4 months ago
by
HALITIM Kouds
Browse files
Options
Downloads
Patches
Plain Diff
Add new file
parent
f066953e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
controller_code_files/Hinf_function
+74
-0
74 additions, 0 deletions
controller_code_files/Hinf_function
with
74 additions
and
0 deletions
controller_code_files/Hinf_function
0 → 100644
+
74
−
0
View file @
ced2625b
% Author: Olivier Sename
% Aug 2024
%
% Description
% Function that compute the state feedback Hinf controller solving the LMI problem.
% To use this function one have to create the
% generalized plant P such that:
% Xdot A Bw Bu X
% Z = Cz Dzw Dzu W
%
% Input
% listP : list of plants
% ncon : number of control signals
% nstate : number of state variables
% sp : the controller is striclty proper (1=>yes, 0=>no)
% percentage : percentage added to the gamma optimal to conditionate the
% controller
% Output
% listK : list of controller (state space)
% listCL : list of closed loop (state space)
% gopt : optimal gamma
%
% [listK,listCL,gopt] = lmiHinfPolytope(listP,nmeas,ncon,sp,percentage,solver)
function [F,X] = lmiHinfStateFeedbackRobust_expstab(listP,nstate,ncon,beta,solver)
%%% Size of the generalized plant
sizeX = size(listP{1}.a,1);
sizeU = ncon;
%%% To tackle with some strict inequalities problems not well implemented
%%% in Yalmip
epsi = 1e-6; % it was 1e-6
%%% Cut the system
for i = 1:size(listP,2)
A{i} = listP{i}.a(1:sizeX,1:sizeX);
Bu{i} = listP{i}.b(1:sizeX,1:sizeU);
end;
% %%% Create variables matrix
Y = sdpvar(sizeU,sizeX,'full')
X = sdpvar(sizeX,sizeX,'symmetric');
%%% LMIs definition of the Hinf problem
LMI=[X>=epsi];
%F = set(H0>eps,'X and Y constraint');
for i = 1:size(listP,2)
H1{i}=A{i}*X+X*A{i}'+Bu{i}*Y+(Bu{i}*Y)'+2*beta*X;
LMI = [LMI,H1{i}<=-epsi];
end;
%F
%%% Find feasible solution minimizing gamma
%solver='sedumi';
ops = sdpsettings('solver',solver);
solution = optimize(LMI,[],ops);
% % %%% Extract numerical solution
Y=double(Y);
X = double(X);
F= Y*inv(X);
%%% Some verifications
VPx = eig(X)
for i=1:size(X,1)
if (VPx(i) <= 0)
disp('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!')
disp('Error, Lyapunov function are non positive definite')
disp('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!')
end;
end;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment