Commit 45383b8f authored by Pierre-antoine Comby's avatar Pierre-antoine Comby

ajout TP1 424

parent aa510583
This diff is collapsed.
clc, clear, warning('off')
%% Valeurs des variables
Ks = 1.61; %N/m
Jp = 0.0021; %kg/(m.m)
Jb = 0.0059; %kg/(m.m)
m = 0.403; %kg
h = 0.06; %m
g = 9.8; %N/m
N = 70; %Sans dim
Phi = 0.00767;%N.s/rad
R = 2.6; %Ohm
%% Manip. 1 : Modle NL
A_nl = [0 0 1 0 ;...
0 0 0 1 ;...
0 Ks/Jp -Phi^2*N^2/(R*Jp) 0 ;...
0 -Ks*(Jp+Jb)/(Jp*Jb) Phi^2*N^2/(R*Jp) 0];
B = [0; 0; Phi*N/(R*Jp); -Phi*N/(R*Jp)];
B_b = [0; 0; 0; m*g*h/Jb];
B_nl = [B B_b];
C = [1, 1, 0, 0];
%% Manip. 2 : Bouclage linarisant
L = [0, -Ks^2*(Jp+Jb)/(Jp*Jb^2) , Ks*Phi^2*N^2/(R*Jp*Jb), 0];
l1 = m*g*h/Jb;
l2 = -(m*g*h)^2/(Jb*Jb);
l3 = Ks*m*g*h/(Jb^2);
l4 = Ks*m*g*h/(Jb*Jb);
Somme = [1 1 1 1 1];
beta = R*Jp*Jb/(Ks*N*Phi);
%% Manip. 6 : Poursuite asymptotique
% m =0.8;
% w0 = 20;
% w1 = 35;
% w2 = 20;
% i = sqrt(-1);
m = 2;
w0 = 2000;
w1 = 3500;
w2 = 3000;
i = sqrt(-1);
p = tf('p');
Po = (p+w0*m-i*w0*sqrt(1-m^2))*(p+w0*m+i*w0*sqrt(1-m^2))*...
(p+w1)*(p+w2);
P = Po.num{1}; a3=P(2); a2=P(3); a1=P(4); a0=P(5);
T = 1/10;
yinf = pi/4;
% Modle de la consigne :
Pc = (p+(w0/100)*0.7-i*(w0/100)*sqrt(1-0.7^2))*(p+(w0/100)*0.7+i*(w0/100)*sqrt(1-0.7^2))*...
(p+w1/100)*(p+w2/100)*(p+w2/100);
Pc = Pc.num{1}; b4=Pc(2); b3=Pc(3); b2=Pc(4); b1=Pc(5); b0=Pc(6);
Ac = [0 1 0 0 0; 0 0 1 0 0; 0 0 0 1 0; 0 0 0 0 1; ...
-b0 -b1 -b2 -b3 -b4];
Bc = [0; 0; 0; 0; b0];
%
% %% Manip. 10 : Backstepping
% La1 = -10;
% La2 = 10*La1;
% La3 = 10*La2;
% La4 = 10*La3;
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="UTF-8"?>
<MF0 version="1.1" packageUris="http://schema.mathworks.com/mf0/SlCache/19700101">
<slcache.FileAttributes type="slcache.FileAttributes" uuid="93926ddb-9c1d-47e5-a608-873b883c774a">
<checksum>l3LfFzBpiVXWzRQvliFnPg==</checksum>
</slcache.FileAttributes>
</MF0>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<MF0 version="1.1" packageUris="http://schema.mathworks.com/mf0/SlCache/19700101">
<slcache.FileAttributes type="slcache.FileAttributes" uuid="fb487716-2ce1-4e74-8727-c6aa4280fdc9">
<checksum>FZQ0eNU6Re+g2KzJOMQ2eQ==</checksum>
</slcache.FileAttributes>
</MF0>
\ No newline at end of file
Simulink Coder project marker file. Please don't change it.
slprjVersion: 9.2_069
\ No newline at end of file
clear all;
close all;
load param.mat
A = [0 0 1 0;
0 0 0 1 ;
0 Ks/Jp (-(N*phi)^2)/(R*Jp) 0 ;
0 -Ks*(Jb+Jp)/(Jp*Jb) (N*phi)^2/(R*Jp) 0 ]
B = [0 0;
0 0;
N*phi/(R*Jp) 0;
-N*phi/(R*Jp) 1]
%% Manip2
L = [0, -Ks^2*(Jp+Jb)/(Jp*Jb^2) , Ks*phi^2*N^2/(R*Jp*Jb), 0];
l1 = m*g*h/Jb;
l2 = -(m*g*h)^2/(Jb*Jb);
l3 = Ks*m*g*h/(Jb^2);
l4 = Ks*m*g*h/(Jb*Jb);
Somme = [1 1 1 1 1];
beta = R*Jp*Jb/(Ks*N*phi);
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<MF0 version="1.1" packageUris="http://schema.mathworks.com/mf0/SlCache/19700101">
<slcache.FileAttributes type="slcache.FileAttributes" uuid="6fa09bbd-563e-4e45-98e1-56bdf7214650">
<checksum>bz1EU0isCkRefjyeRD1dkw==</checksum>
</slcache.FileAttributes>
</MF0>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment