elmundoporrecorrer.com · web vieweuler differentiation tustins’s or trapezoidal approximation...
TRANSCRIPT
Fragenkatalog DCS
DCSQuestions:
1.) What are the principle differences in the operation of an analog and a digital control system?
Explain the difference between a continuous a discrete time control system?
2.) Which types of digital integrators can we use in a digital PID controller?
How do they work? What are the advantage and disadvantages?
3.) Explain the operation of a state feedback control.
4.) Why do we use state feedback?
5.) When do we call linear time invariant system observable?
When do we call a system observable?
How can we check if a linear time invariant system is observable?
6.) How can we design a state observer with the method of pole placement? For which dynamic
system are we choosing the poles?
7.) How can we extend a basic feedback loop of a state feedback and a state observer with a
reference input?
1.
Seite 1 von 25
Fragenkatalog DCS
Answers:
1- What are the principle differences in the operation of an analog and a
digital control system? Explain the difference between a continuous a
discrete time control system?
Analog control continuous
Continuous measurement of systems output and acting on the system via input variable Immediate
response on changes of systems output (or disturbance) within the range of the controllers dynamic
Digital control Discrete (unknown value between the sample)
Sampling process
The times when the measured physical variables are converted into digital form are called the
sampling instants. The time between two sampling instants is the sampling period T s .
Periodic constant sampling is normally used. i.e. the output is measured and the control signal is
applied each diescrete sample. The sampling frequency is ωs=2 π /T s .
The mixture of continuous time and discrete time signals makes the sampled data systems time
dependent.
Time invariance implies that a shift of the input signal to the system should result in a similar shift in
the response of the system. Since the ADC conversion is governed by a clock the system will react
differently when the disturbance is shifted in time. The system will, however, remain time
Seite 2 von 25
Fragenkatalog DCS
independent provided that all changes in the system, inputs and disturbances, are synchronized with
the sampling instants.
The problem of having a mixture of continuous time and discrete time signals can be avoided by
observing the sampled data system only at the sampling points. This implies that the process is
looked upon from the view of the computer.
Summary
Information can be lost through sampling if the signal contains frequencies higher than the Nyquist
frequency. Choose a proper sampling frequency. Too fast – increase the costs and power
consumption. Too slow – difficult to control the system. bad control.
Sampling creates new frequencies (aliases). Necessary to filter the signals before they are
sampled.
The dynamics of the antialiasing filters must be considered when designing the sampled data
controller. But the dynamics can be neglected if the sampling period is sufficiently short.
A standard DAC can be described as a zero order hold. There are special converters that give first
order hold. They give a smoother control signal.
•A signal or system is considered digital if it is both amplitude and time are quantized.
Analog Systems. To modify an analog circle is much harder than a digital one. By analog the circle, a
PCB with discrete components, usually the physical components must be changed which is much
more effort and not practical nowadays. Analog Signal Processing can be done in real time and
consumes less bandwidth.
Digital Systems have mathematical models that allow the easy test, implementation, scalability,
configurability and simulation. Therefore the changes on the system can be computed by an
algorithm without the need of adding some physical component. So digital is more flexible. Digital
Seite 3 von 25
Fragenkatalog DCS
systems are reprogrammable and updateable.
In Digital Signal Processing there is no guarantee that it can be done in real time (to process the
sample before the next sample comes) and consumes more bandwidth to carry out the same
information.
2- Which types of digital integrators can we use in a digital PID
controller?
How do they work? What are the advantage and disadvantages?
Backward and Forward Euler differentiation
Tustins’s or trapezoidal approximation
Backward and forward Euler:
They assume a constant slope between the sample interval. Both methods are very similar, but by
the Forward the drawback is that the system is delayed one sample.
Seite 4 von 25
Fragenkatalog DCS
Tustins’s or trapezoidal approximation
It assumes a constant slope in the sample interval as mean value of the slope at the left and right
sample.
Backward difference: Forward difference: Tustin’s Approximation
ik−ik−1T s
=k i ek
ik=k iek T s+ ik−1
ik+1−ikT s
=k i ek
ik+1=k i ekT s+ik
ik+1−ikT s
=k iek+ek−1
2
Shows a trapezoid integration
ik=k iT s
ek+ek−12
+ik−1
Seite 5 von 25
Fragenkatalog DCS
Seite 6 von 25
Fragenkatalog DCS
Which types of digital derivation can we use in a digital PID controller?
Summarizing the first order digital differentiators:
Derivation the same but with other naming
If we look from the actual sampling instant forward to xk+1 this gives the forward difference.
yk=xk+1−xk
T s
The disadvantage is: we have to wait until the sampling instant k+1 to calculate the difference
quotient for the sampling instant k, so the calculation is always one sample interval late.
Tustin’s approximation derivation
Tustin’s or trapezoidal method considers the constant slope in the sample interval as mean value of
the slope at the left and tight sample instance of the actual sample interval.
xk−xk−1T s
=yk+ yk−12
This gives for the first derivation at the sample instant k
yk=2xk+xk−1
T s+ yk−1
Advantage and disadvantages
Different ways of translating a continuous time controller to a digital controller have been presented.
These methods make it possible to use continuous time design and simply translate the results to a
pulse transfer function that can be implemented in a computer. This approach is particularly useful
when continuous time designs are available.
Forward, backward differences and Tustins’s method are the simplest. Other complexer methods
bilinear with prewarping or higher order of integration/derivation.
Tustin’s method distort the frequency scale of the filter.
Seite 7 von 25
Fragenkatalog DCS
The smaller the sampling period is, the better the approximations are.
Antialiasing filters are important in all cases.
3- Explain the operation of a state feedback control.
it is possible to assign the system eigenvalues to arbitrary values by feedback, allowing us to
“design” the dynamics of the system. This is the goal of Control Systems. The state of a dynamical
system is a collection of variables that permits prediction of the future development of a system.
In a standard control loop we compare the actual values in the output with the reference value, so
we can determine the control error:
rk= yk−r k
Equation 3.1
And use it for calculating the actuating variable uk using a control law, as a PI controller. The output
variable is the only information about the system to determine uk
uk=−k1 x1 , k−k 2x2 ,k−…−kn xn , k=−k T xk+duk
Equation 3.2
The control input is a linear combination of the actual state.
If we look to an LTI system with the state space model:
x=Φx+γu
y=cT x+du
Equation 3.3
The initial state is called controllable, if there is a finite control series {uk }={uo ,u1,…,un } driving
the system into a state of rest xn=0.
Seite 8 von 25
Fragenkatalog DCS
The system of Equation 3.3 is controllable if any initial state can be driven to state of rest.
First input u0 brings system into state
x1=Φx0+γ u0
Second time step
x2=Φ x1+γ u1=x1=Φ2 x0+Φγ u0+γ u1
Final state after N sample period
xN=ΦN x0+ΦN−1 γ u0+Φ
N−2 γ u1+…+Φγ uN−2+γ uN−1=ΦN x0+∑i=0
N−1
Φi γ uN−1−i
Equation 3.4
With matrix notation
xN=ΦN x0+[γ Φγ Φ2 γ … ΦN−1γ ] [uN−1
uN−2
⋮u1u0
]Equation 3.5
As xN=0 we have to solve the linear system. A unique solution exists if the matrix on the left side is
square and can be inverted. We call:
Qc=[ γ Φγ Φ2 γ … ΦN−1 γ ]
Qc is the controllability matrix. The system of the Equation 3.3 is controllable if
rank (Qc )=n
The initial state x0=0 is called reachable if there is a finite control series {uk }={uo ,u1,…,un }
driving the system into the state of rest xN∈Rn.
The system of the Equation 3.3 is called completely reachable if we can bring the system into any
final state.
Controllability and reachability are equivalent if Φ is regular. Otherwise, the system is controllable
but not reachable.
Seite 9 von 25
Fragenkatalog DCS
With Equation 3.1 we get a free system.
xk+1=(Φ−bγ ) xk
Characteristic polynomial of dynamic matrix.
det ( zI−Φ+bγ )=α0+α1 z+…+α n−1 zn−1+αn z
n=α n(α 0+α 1 z+…+αn−1 zn−1+zn)
Equation 3.6
From Equation 3.5 we get
xN=Φn x0+Qc[uN−1
⋮u0 ]
We can calculate the control sequence if Qc can be inverted
[uN−1
⋮u0 ]=Qc
−1(xk+n−Φn xk )
Last row of the above matrix equation
uk=t1T ( xk+n−Φn xk)
With
t 1TQs=en
T
Equation 3.7
Last row of inverted controllability matrix.
Using state feedback, we get
xk+n=(Φ−γ kT ) xk+n−1=(Φ−γ kT )2 xk+n−2=(Φ−γ k T )n xk
And
uk=t1T [ (A−bkT )n−An xk ]
Equation 3.8
Seite 10 von 25
Fragenkatalog DCS
The theorem of Cayley-Hamilton: Every matrix satisfies its own characteristic equation. If we use in
Equation 3.6
α 0E+α 1 (Φ−γ kT )+α2 (Φ−γ kT )2+…+α n−1 (Φ−γ kT )n−1+ (Φ−γ kT )n=0
and
(Φ−γ kT )n=−α0 E−α1Φ−γ k T−α2 (Φ−γ kT )2−…−αn−1 (Φ−γ kT )n−1
And using in Equation 3.8
uk=−t1T [α 0E+α1(Φ−γ kT)+α2 (Φ−γ k T )2+…+αn−1 (Φ−γ kT )n−1
+Φn ] xkEquation 3.9
And first row of Equation 3.7
t 1T γ=0
Subsequent we see
t 1T (Φ−γ kT )=t1
TΦ
t 1T (Φ−γ kT )2=t1
TΦ (Φ−γ k T )=t1TΦ2
So
t 1T (Φ−γ kT )n−1
=t1TΦn−1
Therefore, Equation 3.9 is:
uk=−t1T [α 0E+α1Φ+α 2Φ
2+…+α n−1Φn−1+Φn ] xk=−kT xk
Which is the solution. The vector t1 can be calculated from the controllability matrix and the
coefficients αi from the desired location of the poles.
Finally, the state feedback vector is:
kT=t 1T [α 0E+α 1Φ+α2Φ
2+…+αn−1Φn−1+Φn ] xk
It is important to specify the information available for generating the control signal. A simple
situation is when all state variables are measured without error. The state feedback is when the
general linear controller is a linear feedback from all states.
Seite 11 von 25
Fragenkatalog DCS
It is important conceptually but is rarely used in practice because of the cost or difficulty of
measuring all the states. A more common situation is that the control signal is a function of
measured output signals, past control signals, and past and present reference signals.
Seite 12 von 25
Fragenkatalog DCS
4- Why do we use state feedback?
First, what is a feedback? It can be explained here.
In a (negative) feedback control system, the feedback is out-of-phase with the original input
(normally delayed by one sample). The effect of negative (or degenerative) feedback is to reduce the
gain.
Because negative feedback produces stable circuit responses, improves stability and increases the
operating bandwidth of a given system, most of all control and feedback systems are degenerative
reducing the effects of the gain.
Figure 1. Closed loop
The state of a dynamical system is a collection of variables that permits prediction of the future
development of a system. These variables must be the smallest subset of variables that can
represent the entire system at a given time.
The state feedback uses these subsets of variables to generate the actuating variable, from a linear
combination of them.
In comparison with an output feedback control, allows a more sophisticated control, but also
complex if including an observer; having several advantages:
Gives full control on the positioning of the closed loops poles in the left half plane (all the z-
plane in our case) by using pole placement methods (Ackermann). On the other hand, this
feature has the cost of high gains.
It gives you access to control tolls as the Linear Quadratic Regulator (LQR) Optimal Control
Theory, that allow the extension of the method to a multivariable control in dynamic
systems. The LQR, find the optimal State feedback, that is able to operate the system at
minimum cost.
There may be unstable modes that are uncontrollable from the output, but can be controlled
by other states.
Seite 13 von 25
Fragenkatalog DCS
Figure 2. System with State feedback matrix K and system matrix A.
Assuming all the time a controllable system.
uk=kT xk
The variable uk is the actuating variable, which is a lineal combination of all the state variables.
The State Feedback provides the vector K, in the case of the DLQR the optimal K, to control the
eigenvalues of A (system matrix) and adjust them to accomplish the requirements and dynamics of
the system to our will.
LQR
The linear quadratic regulator (LQR) is a well-known design technique that provides practical
feedback gains.The LQR generates a static gain matrix K, which is not a dynamical system. Hence, the
order of the closed-loop system is the same as that of the plant.
Seite 14 von 25
Fragenkatalog DCS
5- When do we call linear time invariant system observable?
When do we call a system observable?
How can we check if a linear time invariant system is observable?
The state space model:
x=Φx+γu
y=cT x+duEquation 3.10
is called controllable, if we can calculate the initial state x0 from a finite input sequence
{uk }={uo ,u1 ,…,uN−1 } and finite output sequence { yk }={ yo , y1 ,…, y N−1 }. The state-space model is detectable, if we can calculate the final state xN from a finite input
sequence {uk } and a finite output sequence { yk } .An observable discrete time system is also detectable, a detectable discrete time system is only
observable, if the dynamic matrix Φ also (A) is invertable. The system is detectable if the
observabitlity matrix :
Qo=cT [ Φ0
Φ1
Φ2
…Φn−1
] has a maximum rank of n
Observability is a measure of how well internal states of a system can be inferred from knowledge of
its external outputs.
A Time-Invariant System (TIV) has a time-dependent system function that is not a direct function of
time. The time-dependent system function is a function of the time-dependent input function. If this
function depends only indirectly on the time-domain (via the input function, for example), then that
is a system that would be considered time-invariant.
A system is observable at time t0 if, it is possible to determine this state from the observation of the
output over a finite interval of time, with the system in state X(t0).
Observability depends upon the system matrix A and the output matrix C.
Seite 15 von 25
Fragenkatalog DCS
The observability matrix for this second-order system is given by
Since the rows of the matrix are linearly independent, then , i.e. the system under
consideration is observable.
Observability Matrix
The observability of the system is dependent only on the system states and the system output, so we
can simplify our state equations to remove the input terms:
x'(t)=Ax(t)
y(t)=Cx(t)
Therefore, the observability of the system is dependent only on the coefficient matrices A and C.
We can show precisely how to determine whether a system is observable, using only these two
matrices. If we have the observability matrix Q:
Seite 16 von 25
Fragenkatalog DCS
we can show that the system is observable if and only if the Q matrix has a rank of p.
MATLAB allows one to easily create the observability matrix with the obsv command. To create the
observability matrix Q simply type
Q=obsv(A,C)
When do we call a system observable?
observability is a measure of how well internal states of a system can be inferred from knowledge of
its external outputs.
A system is observable if, for any possible sequence of state and control vectors, the current state
can be determined in finite time using only the outputs. This means that one can determine the
behavior of the entire system from the system's outputs.
If a system is not observable, this means that the current values of some of its states cannot be
determined through output sensors. This implies that their value is unknown to the controller.
Seite 17 von 25
Fragenkatalog DCS
How can we check if a linear time invariant system is observable?
For time-invariant linear systems in the state space representation, there is a convenient test to
check whether a system is observable. Consider a SISO (Single-input single-output system) system
with n states. If the row rank of the following observability matrix
is equal to n (where the notation is defined above), then the system is observable. The rationale for
this test is that if n rows are linearly independent, then each of the n states is viewable through
linear combinations of the output variables y(k).
6- How can we design a state observer with the method of pole
placement? For which dynamic system are we choosing the poles?
In order to design the State Observer with the poles placement method, we will explain the poles
placement method and the state observer:
Pole-placement: is a special case of a linear control synthesis technique known as eigen
structure assignment where the poles are placed. The Poles describe the behavior of linear
dynamical systems.
In eigen structure assignment, the goal of the control engineer is to simultaneously assign the
eigenvalues and eigenvectors of a linear system by adjusting the feedback gain.
The eigenvalues of the system determine the stability (and to some extent bandwidth) of the closed
loop system while the eigenvectors determine the degree to which each eigenvalue influences the
response of each state variable. The main reason why one would utilize eigen structure assignment
is to have total control over the modal response of the system.
Let the following be the model of your system in state space:
x '=A x+Bu x'=A x+Bu
The eigenvalues of A are the poles. Through use of (for example) full state feedback, you set
Seite 18 von 25
Fragenkatalog DCS
u=Kxu=K x
with which the closed loop system dynamics matrix becomes
AclosedLoop=A+BK Ac=A+BK
Now the eigenvalues of Aclosed Loopdescribe how your closed loop system will behave. A and B are
(usually constant) matrices that do not depend on K (they express a linear model of the physical
system you want to control). Thus, Ac is a function of the controller gain K only, through modification
of which you can place the eigenvalues of Ac.
State observer: To implement a state feedback control, the measurement of all the state
variables is necessary. If this is not available, we will use the state estimation called State Observer to
measure the not physically measurably variables.
The state observer should simulate as closely as possible to the system whose states we are trying to
estimate but also, a faster feed correction should be a goal.
The state observer should determine the state using the system's input and output and the state
space model of the system. The approach is to model the observer state equations as a model of the
actual system plus a correction term based on the measured output and the estimate of what that
output is expected to be. The system should be observable and detectable.
The closed loop eigenvalues correspond to the poles of the closed loop transfer function and hence
these methods are often referred to as design by pole placement. The closed loop poles can be
assigned to arbitrary locations if the system is observable and reachable. However, if we want to
have a robust closed loop system, the poles and zeros of the process impose severe restrictions on
the location of the closed loop poles. These restrictions could be defined as:
- Slow stable process zeros should be matched by slow closed loop poles.- Fast stable process poles should be matched by fast closed loop poles.- Slow unstable process zeros and fast unstable process poles impose severe limitations. For
this reason, the dynamic system should be a linear, observable and controllable system.
The state-space model is called observable, if we can calculate the initial state 0 x from a finite input
sequence and a finite output sequence.
The state-space model is detectable, if we can calculate the final state from a finite input sequence
and a finite output sequence. An observable discrete time system is also detectable, a detectable
discrete time system is only observable, if the dynamic matrix is invertable.
Seite 19 von 25
Fragenkatalog DCS
The system is detectable, if the observability matrix has a maximum rank of n .
ek+1=(Φ−gcT )ekThe estimation error becomes zero if the dynamic system is stable, i.e. the eigenvalues of the
dynamic matrix Φ−gcT are located inside the unit disk.
Design using pole placement: Calculate g using Ackermann's formula using the state feedback poles.
feedback poles for
Φ−γ kT
for observer poles forΦ−gcT
There for transpose ΦT−c gTState feedback and state observer Control law
uk=−k xk
xk+1=(Φ−g cT ) xk+g yk+( γ−g d )uk
In general way
The vector ti can be calculated form the controllability matrix and the coefficients αi from the desired location of the poles.
Ackerman equation to calculate g( gain observer) and k(gain state feedback) depending for what
kT=t 1T [α 0E+α 1Φ+α2Φ
2+…+αn−1Φn−1+Φn ]
To design a state observer for the given state feedback we have to check one time for a state
observer to be faster and one timer which is slower.
Conversion to digital
With the following equation, we can calculate the needed observer poles for this task. The equation
shows the equivalence between the S domain and the Z domain.
z fb=es fb ∙T s→ ln ( z fb )=s fb ∙T s→sfb=ln ( zfb )T s
→
→sob=α ∙ sfb=α ∙ln ( z fb)T s
→zob=es ob∙ Ts→
zob=eα ∙ln ( z fb )
Seite 20 von 25
Fragenkatalog DCS
How the equation shows that with α the state observer can set faster or slower.
With the following equation, we can calculate the needed observer poles for this task. The equation
shows the equivalence between the S domain and the Z domain.
z feedback¿ zfb=esfb∙ T s→ ln ( zfb )=s fb ∙ T s→s fb=ln ( z fb )T s
→
→sob=α ∙ sfb=α ∙ln ( z fb)T s
→zob=es ob∙ Ts→
zob=eα ∙ln ( z fb )
How the equation shows that with α the state observer can set faster or slower.
7- How can we extend a basic feedback loop of a state feedback and a
state observer with a reference input?
The control laws have in most part been derived to drive the output or the state to 0 (asymptotically
and hopefully) despite disturbances etc. Very often in applications, however, we desire the output
to track a reference input, i.e. if r(t) is the reference input, we would like the output y(t) → r(t) as t →
∞. (n following a nonzero reference command signal)
The goal of the feedback controller is to regulate the output of the system, y, such that it tracks the
reference input in the presence of disturbances and also uncertainty in the process dynamics.
Assuming a open-loop system completely reachable and observable, now we make the output y(k)
tracks a generic constant set-point r(k) ≡ r
The reference input is also know as a “set point” (Sollwert)
The State of feedback basic loop has no input value The state observer
Seite 21 von 25
Fragenkatalog DCS
Seite 22 von 25
Fragenkatalog DCS
Adding a reference input
With integral action
Seite 23 von 25
Fragenkatalog DCS
Concepts:
Reachability, is what set of points in the state space can be reached through the choice of a control
input.
The state of a dynamical system is a collection of variables that permits prediction of the future
development of a system.
stability: in the absence of any disturbances, we would like the equilibrium point of the system to be
asymptotically stable.
Note that the nomenclature:
ϕ≡ A Dynamic ¿
b input vector
x state vector
cT output vector
Seite 24 von 25
Fragenkatalog DCS
PID schematics
Windup
We assume that the system are linear, but some nonlinear phenomena that must be taken into
account. These are typically limitations in the actuators: a motor has limited speed, a valve cannot
be more than fully opened or fully closed, etc. It may happen that the control variable reaches the
actuator limits. When this happens the feedback loop is broken and the system runs in open loop
because the actuator will remain at its limit independently of the process output as long as the
actuator remains saturated. The integral term will also build up since the error typicallys zero. The
integral term and the controller output may then become very large. The control signal will then
remain saturated even when the error changes and it may take a long time before the integrator and
the controller output comes inside the saturation range.
This phenomenon that occurs in practically all control systems will be discussed in depth for PID
controllers.
Anti-windup PID
Seite 25 von 25