Vous êtes sur la page 1sur 7

s=tf('s') ==> définir 'S' or 'P' comme variable de laplace dans la fonction de transfert.

On peut créer une fonction de transfert soit :


1.
M=10*s/(s^2+25*s+100)

2. M2=tf([10 2],[1 2 3])


M=tf([num],[den])

3. Sous forme produit des facteur


Zero, pole, gain  zpk(z,p,k)

M3=zpk([3,-4],[0,-2,-10,-15],[100])

PS: si on veut de simplifier la fonction sans besoin de faire manuellement

H=tf(M3)

Ps : et en contraire
M4=Zpk(M1)


« zero » pour définir le zero de système

zero(M1) 0
zero(M2) -0.2
zero(M3) 3 et -4

et la même chose pour les pôles des fonctions de transfert


pole(M1) -20 et -5
pole(M2) -1.0000 + 1.4142i imaginaire
-1.0000 - 1.4142i

pole(M3) 0
-2
-10
-15

On peut definer les poles et les zeros graphiquement en utilisant la fonction

Exemple : pzmap(M2) (pole-zero-map)

pole(M2) -1.0000 + 1.4142i imaginaire


-1.0000 - 1.4142i
Zero -0.2

Pole-Zero Map
1.5

System: M2
Pole : -1 + 1.41i
Damping: 0.577
Overshoot (%): 10.8
1 Frequency (rad/sec): 1.73

0.5
System: M2
Zero : -0.2
Damping: 1
Overshoot (%): 0
Imaginary Axis

Frequency (rad/sec): 0.2


0

-0.5

-1 System: M2
Pole : -1 - 1.41i
Damping: 0.577
Overshoot (%): 10.8
Frequency (rad/sec): 1.73

-1.5
-1 -0.9 -0.8 -0.7 -0.6 -0.5 -0.4 -0.3 -0.2 -0.1 0
Real Axis
Tunning a PID controller :
1. Definition of the system transfer function:

G1=tf([1],[1 3 1])

Or

S=tf(“s”)

G1=tf(1/(s^2+3*s+1))

2. Create a feedback function:

H=[1];

F1=feedback(G1,H)

3. Display the step response of the open&close loop:

p=tf("p");
G1=tf([1],[1 3 1]);
H=[1];
step(G1)
hold on
F1=feedback(G1,H)
step(F1)
4. Characteristic of the system(with feedback)

 Peak response (overshoot%)”Dépassement.”


 Settling Time (s)”temp de réponse.”
 Rise Time(s)”temp de monté.”
 Steady state”Ecart statique”

Overshoot =0%.

Settling time=10.7s

Rise time=5.86s.

Steady state=1

5. We add the controller PID(Proportional-Integral-Derivative):

PS: “hold on” to hold the graphs in one figure.


Kp=0;
Ki=0;
Kd=0;

C1=pid(Kp,Ki,Kd)  transfer function of the controller using the command.

F2=feedback(C1*G1,H)
step(F2)

to tune the PID controller we need to start with the proportional parameter first then, switch to
another.

 Starting with Kp=5, 10, 15, 20, 24.


 We move to the derivative parameter Kd=2, 4, 6, 8, 10
 For Kp=10 the overshoot of the system disappear.
 We left the integrator parameter to get rid of the steady state in other word to get the final
value =1.
 So, we set the Ki to one.

6. Conclusion:
At the end we have tuned the PID controller manually using MATLAB

Vous aimerez peut-être aussi