Department of Electrical and Computer Engineering ECED4601 Digital Control System Lab 4 Design of Discrete Time Control System
Department of Electrical and Computer Engineering ECED4601 Digital Control System Lab 4 Design of Discrete Time Control System
of Electrical and Computer Engineering
ECED4601 Digital Control System
Lab 4 Design of Discrete‐time Control System
Objectives:
To learn some MATLAB commands that deals with the discrete time systems.
To give the students the ability to program using MATLAB.
To transform between transfer function and state space model of the system.
To design a state feedback controller given desired pole locations.
Implement a state feedback controller on the Feedback using the MATLAB Simulink
To design State Feedback and Observer‐Based Controllers
Overview
We will design better controllers if we have more measurements of the system
behavior. In the case where we can measure all of the system states, we can place
the closed‐loop poles anywhere we choose within the constraint of actuator
saturation also use any type of control system.
1) For a discretetime state space model
0.13 0.154 0.328 - 0.046 0
0.126 0.085 - 0.232 - 0.319 1.292
x(k 1 ) x(k) u(k)
0.128 0.376 0.783 0.134 0
0.318 0.081 0.117 0.044 0.331
with y (k ) [0.8440 0.497 1.488 - 0.547] x(k)-0.8468u (k )
a) Calculate the controllability Matrix and the observability matrix and demonstrate
that the system is fully controllable and fully observable.
b) Design a state feedback vector K which places the closed loop poles of the system at,
‐0.5±j0.5, ±0.1
2) Consider the discretetime state space model given
0 1 0 0 0
0.91 - 0.036 0.91
0.036 0
x(k 1 ) x(k) u(k)
0 0 0 1 0
0.91 0.036 0.091 0.036 1
y(k) x1 (k ) , D 0
With sampling inteval T=0.1 second. If one wants to place all the closed‐loop poles at
0.9
Determine
a) The state feedback vector K
b) The poles of the closed‐loop system
3) Consider the fourth order discrete time system
1 1 0 0 0
0 1 - 4.1504 - 1.1638 0
x(k 1 ) x(k) u(k)
0 0 0 1 0
0.91 0.036 0.091 0.036 1
a) Design the observer gain matrix Ke which places the closed loop poles of the system at,
‐ 0.3±j0.4 , ±0.3
4) Consider the discretetime state space equation
Determine
a) The Riccati Matrix P
b) The state feedback matrix K
c) The closed‐loop Poles
5) In this problem you will derive a state space representation and state
feedback controller.
1000
12 100 100
With a sample time of T=0.0002 seconds the corresponding discrete- time transfer function from
u(k) to y(k) is:
10 1.325 5.274 1.3111
2.9778 2.9556 0.9778
Determine
a) To represent the discrete‐time dynamics P(z) in state‐space format, how many
states are required in the state vector x?
b) The matrices G, H, C, and D to represent this discrete‐time state space system.
1
6) State Feedback and ObserverBased Controllers. The state feedback
control strategy with observers can be implemented as shown in Figure
Below
Feedback control with a state observer
Consider the following plant in state space form:
0.9048 0.2101 0.0206 0.0499 0.3872 2.0896
0 0.7788 0.0902 0.2358
2.3987 24.0652
x(k 1 ) 0 0 0.0008 0.0035 0.4946 x(k) 52.4959u(k)
0 0 0 0 0.0289 8.9223
0 0 0 0 0.0067 2.9798
y(k) 1 0 0 0 0 , D 0
If the observer gain vector is selected as: Ke = [−8.3 979.24 −19367.61 4293.85 0]T
and the state feedback gain vector is selected as :
K = [1.3563 0.0858 0.0085 0.0206 0.1623]
For Design the observer‐based controller, using the MATLAB statements:
Determine
a) Design the state space observer‐based regulator depends on the observer
gain vector Ke and the state feedback gain vector K
Guidelines for writing the Lab Report
The report has to include:
Title page ‐ Including: course number, lab title, student names, student IDs, Date the
report was submitted.
Abstract ‐ A summary of the contents of the lab report.
Procedure of methods or approach to the design or/and conduct of the experiments
Diagrams ‐ Include all SIMULINK blocks used in the lab if any.
Plots ‐ All plots of system response should be included in your report, including title,
labels with unit, legends, etc. Note that Diagrams and Plots must be computer
generated. Hand‐drawn plots will not be accepted. All diagrams and plots must be
labeled. The labels and annotations can be done by hand if appropriate but have to be
clear.
Code ‐ Include any code used in the lab. The code must be commented properly. It is
good practice to put your code in separate m‐files.
Discussion and answer to questions if any.
Conclusion or any other relevant ideas.
MATLAB command prompt:
· c2d Continuous state‐space to discrete state‐space conversion
· residue Partial fraction expansion conversion
· ss2tf State‐space to transfer function conversion
· ss2zp State‐space to zero‐pole‐gain conversion
· tf2ss Transfer function to state‐space conversion
· tf2zp Transfer function to zero‐pole‐gain conversion
· zp2ss Zero‐pole‐gain to state‐space conversion
· zp2tf Zero‐pole‐gain to transfer function conversion
Given a continuous‐time state‐space model
sys = ss(A,B,C,D)
With seven outputs and four inputs, suppose you have designed:
A state‐feedback controller gain K using inputs 1, 2, and 4 of the plant as control inputs
A state estimator with gain L using outputs 4, 7, and 1 of the plant as sensors, and input 3
of the plant as an additional known input
You can then connect the controller and estimator and form the complete regulation
system by
controls = [1,2,4];
sensors = [4,7,1];
known = [3];
regulator = reg(sys,K,L,sensors,known,controls)
Pole placement design for single‐input systems
k = acker(A,B,p)
use acker for estimator gain
L = acker(A',C',p)
Feedback connection of two LTI models
sys = feedback(sys1,sys2)
rsys = reg(sys,K,L)
rsys = reg(sys,K,L,sensors,known,controls)
reg
Form regulator given state‐feedback and observer gains