Automatica 41 (2005) 2005 – 2009 www.elsevier.com/locate/automatica
Technical communique
Realization of systems with CCD-based measurements夡 Douglas P. Looze∗ Department of Electrical and Computer Engineering, University of Massachusetts, Amherst, MA 01003, USA Received 27 October 2004; received in revised form 4 April 2005; accepted 31 May 2005 Available online 1 September 2005
Abstract This paper considers systems that have a measurement that is computed from the post-processing of a short duration image. The measurement can be regarded as the integral of a linear function of the state variables of the system. The input to the system is assumed to be generated with a zero-order hold whose sampling frequency is the same as that of the measurement. The paper presents a discrete-time finite dimensional state variable model for such systems. 䉷 2005 Elsevier Ltd. All rights reserved. Keywords: Continuous- and discrete-time systems; Discrete-time models
1. Introduction Many sensing techniques produce measurements that are based on the post-processing of images obtained from CCD cameras or similar equipment. Examples include measurement of the growth of sapphire crystals using the edgedefined, film-fed growth (EFG) technique (Backman et al., 1992), radius measurements for GaAs crystal growth (Hoyt, Kelly, & Looze, 1993; Wargo & Witt, 1992), and wavefront measurements for adaptive optics systems (Roddier, 1999). This paper develops a state space control design model for a continuous-time plant that is controlled in discrete-time based on measurements from a CCD camera. The inputs to the continuous-time plant are obtained from a zero-order hold (ZOH) whose period matches that of the CCD camera. The measurements based on CCD images acquire their information about a system by integrating the system output over the acquisition time of the image (one camera frame). At the end of the integration, the image is read from the CCD, the CCD is reset (to zero), and the next frame is started. 夡 This paper was not presented at any IFAC meeting. This paper was recommended for publication in revised form by Associate Editor Jie Chen under the direction of Editor Paul Van den Hof. ∗ Tel.: +1 413 545 0973; fax: +1 413 545 4652. E-mail address:
[email protected]
0005-1098/$ - see front matter 䉷 2005 Elsevier Ltd. All rights reserved. doi:10.1016/j.automatica.2005.05.022
The image that has been read out of the CCD is processed to produce the desired measured quantity. The readout and processing often introduce a delay in the measurement. Because one measurement vector is produced per frame, the CCD-based measurement is inherently discrete. For control system design, the combined plant and CCD measurements can be modeled as a discrete-time system whose underlying system will evolve in continuous-time (see Fig. 1). Often (particularly when the measurement is based on short duration images) the input to the continuous system is obtained from a ZOH whose period is the same as the camera frame period. The procedure can be modeled as discretetime system whose input is the discrete-time input to the ZOH, and whose output is the CCD-based measurement. If the continuous-time system and the measurement process are linear, the overall system can be represented using a linear state variable model. The system with a CCD-based measurement acts similarly to a system with a delayed measurement. However, without such a delay, the CCD-based measurement still depends on the state and input at the preceding sample. Several authors ˚ (cf., Ogata, 1987; Vaccaro, 1995, Aström & Wittenmark, 1977) have shown that systems with a pure delay have a finite-dimensional discrete-time realization even if the delay is not an integral multiple of the sampling period.
2006
D.P. Looze / Automatica 41 (2005) 2005 – 2009
2.2. Realization
Fig. 1. Discrete-time model for CCD camera whose input is a mode of a continuous-time system. The input to the continuous-time system is obtained from a ZOH.
This paper provides a finite dimensional state variable model for systems with CCD-based measurements. Although finite-dimensional, the resulting state model cannot be expressed solely as a system with an equivalent delay. This paper is organized as follows. Section 2 formulates the system with the CCD-based measurement, and presents the realization of the system. Section 3 provides a method for computing the realization in terms of a matrix exponential defined by the continuous-time system. Several examples are presented in Section 4. The paper concludes with Section 5.
The discrete-time system maps the discrete-time input signal {uk }k 0 into the discrete-time output signal {zk }k 0 . The discrete-time system is linear with the state variable realization: xk+1 = Accd xk + Bccd uk , zk = Cccd xk + Dccd uk ,
(7)
where, for l = 0 ( = 0): Ad 0n×p Bd , Bccd = Accd = , Cccd1 0p×p Dccd1 Cccd = [0p×p Ip ], Dccd = 0p×m
(8)
and for l = 1: 0n×p 0n×p Ad Bd Accd = Cccd1 0p×p 0p×p , Bccd = Dccd1 , Cccd0 Ip 0p×p Dccd0 Cccd = [0p×n 0p×p Ip ], Dccd = 0p×m (9)
2. Discrete-time realization
with
2.1. Problem formulation
, Bd = eA dB, 0 A Cccd0 = C e d, Cccd1 = C Ad = e
Consider the system described by the continuous-time state equation with n states and m inputs (R denotes the space of real numbers): x(t) ˙ = Ax(t) + Bu(t)
n×n
A∈R
B∈R
n×m
(1)
and the continuous-time output equation with p outputs: y(t) = Cx(t) + Du(t)
C∈R
p×n
p×m
, D∈R
.
(2)
In general, there will be delays between the input signal and the continuous-time output that is the input to the CCD. For a uniform delay in all signals, one representation is y(t) ¯ = y(t − ) = Cx(t − ) + Du(t − ),
(3)
where is the delay. The delay can be written in terms of the sampling time as (note that is not normalized by the sample period Ts as in Ogata, 1987):
= lT s − 0 < Ts ; l 0, integer.
(4)
Measurements based on the output of CCD cameras (and several other devices) integrate the delayed output quantity (3) over a constant time period Ts (the camera frame). The camera is reset to zero at the start of each frame. Thus, the output of the CCD-based sensor is kT s y(t) ¯ dt. (5) zk = (k−1)Ts
The input will be assumed to be generated by a ZOH with a sample period that is the same as the camera frame: u(t) uk
kT s t < (k + 1)Ts .
(6)
AT s
Ts
0
Dccd0 = C
Dccd1 = C
0
Ts
Ts
eA d,
eA d dB + D,
0
eA d dB + (Ts − )D.
(10)
0
Longer delays (l > 1) result in additional blocks being added in a staircase pattern (as illustrated in (Vaccaro, 1995; ˚ Aström & Wittenmark, 1977)).
3. Computation of the realization The CCD-based measurement requires the computation of Ad , Bd , Cccd0 , Cccd1 , Dccd0 , and Dccd1 (see (10)). Through a ˚ straightforward extension of the procedure used in (Aström & Wittenmark, 1977), each of these quantities can be computed with two evaluations of a matrix exponential. Define the matrix A 0p×p C D A = 0n×p ∈ R(n+m+p)×(n+m+p) . (11) A B 0m×p 0m×n 0m×m Let the matrix exponential of A be F11 (t) F12 (t) F13 (t) At F (t) = e 0n×p F22 (t) F23 (t) , 0m×p 0m×n F33 (t)
(12)
where the partitioning of F (t) is conformal with (11) and its block upper triangular structure has been anticipated.
D.P. Looze / Automatica 41 (2005) 2005 – 2009
2007
The matrices that define the state realization for a CCDbased measurement can be computed in terms of the subblocks of F (t) given by (12): Ad = F22 (Ts ), Bd = F23 (Ts ), Cccd0 = F12 (), Cccd1 = F12 (Ts ) − F12 (), Dccd0 = F13 () + D, Dccd1 = F13 (Ts ) − F13 () + (Ts − )D.
(13)
4. Illustration for an adaptive optics system 4.1. Dynamic model An adaptive optics system generates measurements of the incoming wavefront error (the wavefront reflected off a deformable mirror, DM) by processing a CCD image. The wavefront measurements are used by the controller to generate input voltage commands for the DM. The DM changes the shape of the reflecting surface in response to a change in voltages, which in turn affects the measured wavefront error. A popular control architecture for adaptive optics systems controls a set of spatial modes of the system (Gendron & Léna, 1994; Wirth, Navetta, Looze, Hippler, & Glindeman, 1998; Dessenne, Madec, & Rousset, 1998). With this architecture, the control of each mode becomes a single-input, single output control problem to reduce the corresponding modal coefficient. The measurement for one control problem is the estimated modal coefficient generated by processing the output of a CCD camera. The input (control) to this problem is the coefficient of the linear combination of mirror voltages that produce the modal shape on the surface of the deformable mirror. The DM provides the continuous-time dynamics of the system. A reasonable model for current sampling frequencies (1000 Hz or less) is that the mirror can be represented by a rigid body with the response to mirror voltages modeled by first-order lags. If the time-constants of these lags are identical (again, a reasonable assumption for a well-built mirror), the dynamics for each modal problem is (Wirth et al., 1998): x(t) ˙ =−
1 1 x(t) + u(t), m m
(14)
where m is the mirror time constant, x(t) is the modal coefficient of the mirror shape, and u(t) is the coefficient of the linear combination of voltages applied to the mirror. The output is a measurement of the modal coefficient of the wavefront obtained by processing a CCD image (Gendron & Léna, 1994; Wirth et al., 1998; Dessenne et al., 1998): zk =
kT s (k−1)Ts
y(t) ¯ dt,
y(t) ¯ = x(t − ),
(15)
Fig. 2. Simulated and modeled CCD camera output.
where zk is the measured modal coefficient at time kT s , Ts is the camera frame rate, and is the measurement delay (which typically includes the camera read-out time, the time required to process the image and obtain the measured coefficients, and the control computation time). The input voltage coefficient u(t) is generated by a ZOH with the same period as the camera frame period Ts . The model contained in (14)–(15) can be used with the realization procedure of the Section 2 to generate discretetime state variable models for various values of the mirror time constant m and delay . The deformable mirror used by the ALFA adaptive optics system on the 3.5 m telescope at Calar Alto Observatory (Spain) has a time constant of about 0.001 s (Wirth et al., 1998). The camera frame rate is limited by the brightness of the star being observed. For a (commonly used) camera 1 frame rate of Ts = 300 s and a reasonable number of corrected modes, the aggregate measurement time delay is 0.4 frames ( = 1.333 ms). With these values, the system matrices that define the continuous-time system are 1 = −1000, m C = 1, D = 0.
A=−
B=
1 = 1000, m (16)
The continuous-time step response of the DM (14)–(16) is shown as the dash-dot line in Fig. 2. Note that the delay is comparable to the time constant of the system. The discrete-time realization (7)–(9) of the system is
0.03567 0 0 Accd = 1.411 × 10−5 0 0 , 9.502 × 10−4 1 0 0.9643 −4 , Bccd = 3.192 × 10 2.050 × 10−3 Cccd = [ 0 0 1 ] , Dccd = 0.
(17)
2008
D.P. Looze / Automatica 41 (2005) 2005 – 2009
Fig. 3. Continuous-time approximation of a feedback system using CCD-based measurements.
Fig. 4. Discrete-time model of a feedback system using CCD-based measurements. Fig. 5. Approximate and exact rejection transfer functions.
The transfer function of this realization is PN (z) 2.050 × 10−3 z2 + 1.162 × 10−3 z + 2.2222 × 10−6 . = z2 (z − 0.03567) (18) The hybrid system shown in Fig. 1 was simulated to produce the discrete-time output shown as the solid line in Fig. 2. The discrete-time model (18) (shown as the lighter dashed line in Fig. 2) reproduces exactly with the camera output. For reference, the continuous-time response of the plant is also shown as the dash–dot line. Although this model is simple enough that the integrations required in (10) can be computed explicitly, more complex or non-uniform dynamics (which are to be expected as the control bandwidth increases) can lead to the necessity of the numerical computations of (11)–(13).
(7)–(10). The rejection transfer function is Sd (j) =
1 . 1 + K(ejT )Gd (ejT )
(21)
The minimum variance controller (Looze, 2005) for the discrete-time model (17) is K(z) =
1.53z2 (z − 0.036) . (z − 1)(z + 0.96)(z + 0.026)
(22)
The difference in magnitude between the two rejection transfer functions is shown in Fig. 5 for the mirror models given by (16)–(17). The controller would be evaluated to be deficient if (20) is used, even though it is quite acceptable as shown by the solid curve in Fig. 5.
5. Conclusion 4.2. Control evaluation A common way to evaluate feedback systems with CCDbased measurements (cf. Dessenne et al., 1998) is to approximate the ZOH and CCD camera in the feedback loop by continuous-time transfer functions. For a compensator K(z), the continuous-time approximation to the feedback system is shown in Fig. 3. The approximate transfer functions for the ZOH and CCD are the same GZOH (s) = GCCD (s) =
1 − e−sT . sT
(19)
1 1 + K(ejT )G(j)(1 − e−jT /jT )2
Acknowledgements This work has been supported in part by the National Science Foundation under grant ECS-0220249 and by the Max-Plank Institut für Astronomie-Heidelberg.
The rejection transfer function (from r to e) is: S(j) =
This paper has presented finite dimensional, discrete-time realization for systems whose outputs depend on delayed state and input information. These delays specifically considered here are either due to a direct delay of the measurement, or to the post-processing of a CCD image. However, the realizations can be easily extended to any linear, finite dimensional method for acquiring the information.
.
(20)
The discrete-time feedback system that describes the exact evolution of the sample values of the error is shown in Fig. 4, where the state-space realization of the model G(z) is
References ˚ Aström, K. J., & Wittenmark, B. (1977). Computer-controlled systems. Englewood Cliffs, NJ: Prentice-Hall.
D.P. Looze / Automatica 41 (2005) 2005 – 2009 Backman, D. G. et al. (1992). Modeling of the sapphire fiber growth process. Advanced Sensing, Modeling, and Control of Materials Processing. Dessenne, C., Madec, P.-Y., & Rousset, G. (1998). Optimization of a predictive controller for closed-loop adaptive optics. Applied Optics, 37, 4623–4633. Gendron, E., & Léna, P. (1994). Astronomical adaptive optics: I. modal control optimization. Astronomy and Astrophysics, 291, 337–347. Hoyt, S. D., Kelly, P. A., Looze, D. P. (1993). Real time radius estimation from optical images of GaAs crystal growth. Proceedings of the 1993 CISS (pp. 559–604). Baltimore, MD: Johns Hopkins. Looze, D. P. (2005). Minimum variance control structure for adaptive optics systems. 2005 ACC, Portland, OR.
2009
Ogata, K. (1987). Discrete-time control systems. Englewood Cliffs, NJ: Prentice-Hall. Roddier, F. (1999). Adaptive optics in astronomy. Cambridge: Cambridge University Press. Vaccaro, R. J. (1995). Digital control: A state space approach. New York, NY: McGraw-Hill. Wargo, M. J., & Witt, A. F. (1992). Real time thermal imaging for analysis and control of crystal growth by the Czochralski technique. Journal of Crystal Growth, 116, 213–224. Wirth, A., Navetta, J., Looze, D. P., Hippler, S., & Glindeman, A. (1998). Real-time modal control implementation for adaptive optics. Journal on Applied Optics, 37, 4586–4597.