sis of PD-controllers
Transfer function of ideal PD-controller is the following:
,
where is the gain of proportional part; is the gain of differential one.gain increased unrestrictedly results in the infinite gain on high frequencies. So, in order to restrict the gain on high frequencies an additional pole is appended in the differential component of PD-controller. In this case the transfer function of real PD-controller can be written as:
,
where is a very small value (). If is known so it is necessary to determine two parameters in the synthesis procedure.synthesis of PD-controller, first of all, it is necessary to calculate the phase shift of controller at frequency as
В
and to determine
.
Then is determined as
.
In MatLab:
theta =-pi + Pm/57.296-phase/57.296 = cos (theta)/mag = sin (theta)/(om * mag)
% Creation of the transfer function of real PD-controller = tf ([Kp * tau + Kd Kp], [tau 1])
code:
disp ('Task 2. Synthesis of real PD-compensator')
t1 = 0.0001; = 2.5; = 60;
1) calculate the phase shift of compensator at given frequency ;
Program code:
disp ('Phase shift of compensator at given frequency w')
[mag, phase] = bode (Wolun, w)% task 2.1 =-pi + Pm/57.296-phase/57.296;
Results of the program:
mag =
.8769 =
.6199
2) determine the gain of proportional part of compensator ;
Program code:
disp ('Coefficient of proportional unit') = cos (theta)/mag% task 2.2
Results of the program:
Coefficient of proportional unit =
.2558
3) determine the gain of differential part of compensator ;
Program code:
disp ('Coefficient of differentiated unit') = sin (theta)/(w * mag)% task 2.3
Results of the program:
Coefficient of differentiated unit =
.0133
4) plot Bode diagram of the PD-compensator.
Program code:
disp ('Tf of compensation unit') = tf ([Kp * t1 + Kd Kp], [t1 1])% tf of compensation unit
('Tf of compensator') = Wc% tf of compensator (5) (Wcomp), grid on, ('Com...