#### 您當前位置：首頁 >> CS作業CS作業

###### 日期：2019-06-08 09:11

School of Electrical, Computer and Telecommunication Engineering
University of Wollongong
Computer Controlled Systems - ELEC442/842 Project
Plant Description
A linearised DC motor system for Control Laboratory is shown in Figure 1, where the motor is in field control. The feedback
from tacho output to the pre-amplifier linearises the motor dynamics and the Servo-amplifier supplies power to the motor. The
input terminal of the linearised motor system is U and the output terminal is V and P. The input u(t) (at point U and in volts) to
the DC motor system comes from a D/A converter installed in a PC; the velocity output v(t) (at point V and in volts) is from the
tacho generator and proportional to velocity of the rotor; the position output p(t) (at point P and in volts) is from a potentiometer
proportional to the position of the rotor.
Figure 1 A DC motor system
The linearised motor system with velocity (tacho voltage) as output can be described using a first order transfer function,
The transfer function with position (potentiometer voltage) as output is

The two transfer functions have different gains and the same time constant. A negative sign is ignored in both transfer functions
for simplicity. Given the speed transfer function
(3)
and the position transfer function
Your task is to design the predictors and controllers for both position and velocity of the DC motor.
Practical 1 - System Modelling and Simulation
1.1 Two discrete time models are to be established for the DC motor using Matlab function c2d. The first has velocity
voltage as its output and the second has position voltage as its output. The sampling period is T=0.07 sec and the
method is zero-order-holder. (You can enter help c2d in Matlab command window for an explanation of Matlab
function c2d. You may also need to define a system using Matlab command sysc=tf(numc,denc))
1.2 Apply a square wave to both discrete time models and simulate the output using Matlab function lsim. Up to 255
samples should be obtained containing 4 to 7 complete periods of the input square wave. (The square wave can be
generated and displayed using the following Matlab command: P=ones(1,25);N=zeros(1,26);PN=[P N];u=[PN PN
PN PN PN]’;plot(u)).
1.3 Apply the same square wave to the continuous time models and compare the outputs with the corresponding outputs
obtained in Question 1.2 by draw them in the same figure. (You can use Matlab Command held on and held off).
Practical 2 - Predictor Design and Simulation
2.1 Design one-step-ahead predictors for both discrete time models
2.2 Predict the plant output using the predictors designed in Question 2.1 and the data obtained in Part 1.2. Compare the
predicted output with the actual output and make comments.
Note: The following is a sample program for simulation of a d-step-ahead predictor
% d=1, G=8 and FBu(k)=9*u(k)+8*u(k-1);
% y and u are output and input from simulation
% yHatP is the prediction of position
yHatP=1:110;d=1;
for k = 2:100,
yHatP(k+d)=8*y(k)+9*u(k)+8*u(k-1); %prediction
end
plot(yHatP(2+d:100+d))
2.3 Generate a normal noise of zero mean and deviation 0.1 using Matlab command randn. Add the noise to the output that
is obtained in question 1.2 in order to study the cases where the output measurement is corrupted by an instrumental
noise. Predict the outputs using the predictors obtained in question 2.1 and the output that is corrupted by the noise.
Compare the results with the noise free case and make comment.
2.4 Change the deviation and predict the outputs. Comment on the effect of noise deviation.
Practical 3 – D-Step-Ahead Controller
3.1 Design d-step-ahead controllers for both discrete time models and discuss stability of the closed-loop sytem.
3.2 Using the d-step-ahead controller to drive the discrete time model outputs to follow a square wave with period of 40T
and amplitude of 10. Plot both plant input and output using Matlab and make comment.
Note: The following is a sample program for simulation of a d-step-ahead controller.
%the plant is y(k)-8y(k-1)=9u(k-1)+8u(k-2)
%the desired output y*(k)=2*sin(0.5*k);
y=1:101;y=y-y;u=y;
for k = 2:100,
u(k)=(-8*u(k-1)+2*sin(0.5*(k+1))-8*y(k))/9; %controller
y(k+1)=8*y(k)+9*u(k)+8*u(k-1); %simulation
end
plot(y);pause;plot(u(1:100))
3.3 Simulate the same controllers using the continuous time plant models. Compare the continuous outputs with the discrete
outputs and make comments. Practical 4 – Weighted D-Step-Ahead Controller
4.1 Design weighted d-step-ahead controllers for both discrete time models using at least 3 different weightings. Discuss
stability of the closed-loop system and make comment on the effect of the weightings on the stability.
4.2 Redo Question 3.2 and 3.3 using the weighted d-step-ahead controllers and comment on the effect of the weightings on the
stability, overshoot, rise time and tracking accuracy of the closed-loop systems.
Practical 5 – Generalized D-Step-Ahead Controller
5.1 Design a generalised weighted d-step-ahead controller for the discrete time model obtained from plant (3) using
T(q-1)=t0, S(q-1)=s0 and P(q-1)=1+hq-1 where t0=1.3, s0=1.3328 and h=0.1.
5.2 Redo question 3.2 using the controller obtained in the above question.
5.3 comment on the effect of the P, S and T on the performance of the closed loop control system in terms of closed loop poles,
overshoot, rise time and tracking accuracy using at least 2 different values for each of h, t0 and s0.
5.4 Can closed loop poles be placed to any location using a generalized weighted d-step-ahead controller?
Practical 6 – Generalised Predictive Controller
6.1 Design a generalised predictive controller for the discrete time model obtained from plant (3) using
N=1, w1=w0=1 and s1=s0=s
and at least 3 different s values. Discuss stability of the closed-loop system and make comment on the effect of the
weighting, s, on stability.
6.2 Redo question 3.2 using the controller obtained in the above question.
6.3 Compare the controllers you have learnt so far in this part of the subject and make comments on their advantages and
disadvantages.