• Nem Talált Eredményt

Methods for selecting the parameter values for PID controller Ziegler Nichols methodcontroller Ziegler Nichols method

In document Digital Servo Drives (Pldal 104-107)

DRV_CounterReset

10. Closed Loop Control Measurements – Motion control/ Exercise 5.control/ Exercise 5

10.3. Methods for selecting the parameter values for PID controller Ziegler Nichols methodcontroller Ziegler Nichols method

The aim of this method is to select the parameters for PID controller by simple tests. There are several approaches, one of the simplest method is the Ziegler Nichols. This method is applicable for system with time delay. The methods developed by Ziegler and Nichols have been very popular in spite of the drawbacks.

Practically all manufacturers of controller have used the rules with some modifications in recommendations for controller tuning. One reason for the popularity of the rules is that they are simple and easy to explain.

Tasks during tuning are as follows:

1. First, test whether the required proportional control gain is positive or negative. Turn the controller only to P mode, i.e. turn both the Integral and Derivative modes off. Set in open loop the input voltage (error signal) up (increase) a little by manual control to see whether the resulting steady-state value of the process output has also moved up (increased). If so, then the steady-state process gain is positive and the required Proportional control gain AP has to be positive as well, otherwise AP must be negative.

1. Change the controller gain AP up slowly (more positive if AP was decided to be positive in step 1, otherwise more negative if AP was found to be negative in step 1) and observe the output response. Note that this requires changing AP in step increments and waiting for a steady state in the output, before another change in AP is implemented.

1. Mark this critical value of AP as AU, the ultimate gain when a value of AP results in a sustained periodic oscillation in the output (or close to it), Also, measure the period of oscillation TU, (Fig. 34). TU is referred to as the ultimate period.

1. Using the values of the ultimate gain, AU, and the ultimate period, TU Ziegler and Nichols method prescribes the following values for AP, TI and TD, depending on the type of the desired controller:

Table: Zigler- Nichols tuning chart

AP TI TD

P control AU/2

PI control AU/2.2 TU/1.2

PID control AU/1.7 TU/2 TU/8

Figure 5.39. Determination of Tu parameter (Tu ≈33 ms)

Various controller types are studied next.

In this exercise first P, after PI and at the end PID speed controller is set-up for the DC motor.

Steps:

• Study the literature of control theory overviewed in the below chapter entitled “Theoretical background of control theories”.

• Set up controller (P, PI, PID, etc.).

Exercise tasks

After studying the basics of P, PI and PID speed control of DC motors, the user can build the controllers for the exercise.

Task 1.

Determine the values for your P, PI and PID controller. This can be done according to Ziegler-Nichols method (see below), by changing the P value until the system starts oscillating. This way the values can be calculated and the controllers can be programmed (please, use low pass filter for the velocity).

Task 2.

Compare the results of the P, and PI controllers for a reference shaft speed Ω = 4 rad/s.

Task 3.

Task 3 is an extension of Task 2, with the difference that in this case we set the reference shaft speed Ω = 4 rad/s at t = 0 s, change it to Ω = 2 rad/s at t = 2 s and again change it Ω = 6 rad/s at t = 4 s.

Task 4.

Compare the P, and PI controllers for disturbance rejection. The disturbance will be applied at t = 0.5 s, as a negative torque T_load= -0.5, which is subtracted from the output voltage calculated by the controller.

ResultData.Torque = (please write here your controller)

ResultData.Torque = ResultData.Torque + T_load; /* this is the line for virtual load*/

Task 5.

Execute the same tasks with open loop and compare the results with those of P, and PI controllers.

The result files, which can be downloaded at the end of the measurement, can be evaluated in Matlab. There is a program already written for this task, which draws the shaft speed-time, voltage-time and position-time diagrams. These diagrams can be saved in jpg formats for further documentation.

Task 6.

Fault tolerance of PI controller (anti-windup PI controller).

Simulate a fault when the motor is blocked or the power electronic unit has a failure and the torque is 0 while the PI controller is operating. The integral term is increasing. After the failure the integral term must be reduced (the integral term of positive error must be compensated by an integral term of negative error).

First tune a PI controller (set the Measurement length to 1000 ms), then add the following line to the controller:

if ( CurrentTime < 0.3*1e3) {ResultData.Torque = 0.0;}

Set different limits for the integral term of PI controller and compare the performances.

Task 7.

Design a sliding mode controller for the position of the motor.

The two main steps of the design of a sliding mode controller are

• selection of a proper sliding surface,

• selection of a proper control law.

The constant reference position is set to αref= 10 rad.

The position and speed error are defined as αe= αref – αmotor

Ωe= 0-Ωmotor .

The sliding surface is selected as σ=αe+λΩe .

The control law is selected as torque=0.1 sign σ.

Of course, you have to use C code for the algorithm above. For more detailed information and even newer control theories visit the animation site:

ErrorHandler(dwErrCde);

exit(1);

}

// Step 2: Output value to the specified channel tAOVoltageOut.chan = motorDA;

tAOVoltageOut.OutputValue = new_voltage;

dwErrCde = DRV_AOVoltageOut(lDriverHandleDA, &tAOVoltageOut);

if (dwErrCde != SUCCESS) {

ErrorStop(&lDriverHandleDA, dwErrCde);

return;

}

This code turns on the drive unit power. You should see the green LED on the drive unit lit.

To turn off the LED modify the following line: new_voltage = 0.0;

2.1. From the sample file (Dasoft.cpp) the following part should

In document Digital Servo Drives (Pldal 104-107)