The ball-on-plate balancing system has a camera that captures the ball position and a plate whose inclination angles are limited. This paper proposes a PID controller design method for the ball and plate system based on the generalized Kalman-Yakubovich-Popov lemma. The design method has two features: first, the structure of the controller called I-PD prevents large input signals against major changes in the reference signal; second, a low-pass filter is introduced into the feedback loop to reduce the influence of the measurement noise produced by the camera. Both simulations and experiments are used to evaluate the effectiveness of the design method.
1. Introduction
The ball and plate [1] is an unstable underactuated nonlinear system that has double integrators at the origin and that has two control inputs against four degrees of freedom (DOF). A camera located above the plate captures the position of the ball, and two motors manipulate the inclination angles of the plate to keep the ball on the plate. The ball and plate system is an extension of the ball and beam system [2] from one to two dimensions. The system has demonstrated various controller design methods for positioning and trajectory tracking of the ball: proportional integral derivative (PID) control [3], fuzzy control [4], neural network control [3, 5], and model predictive control [6]. In particular, PID control has the benefits of simple implementation and fewer hardware requirements, and it has been applied in many successful designs [7]. Because PID control enables us a limited performance, optimizing the parameters in a PID controller satisfying design specifications is an important subject for study. In the controller design of the ball and plate, it requires to consider limitation of the inclination angles with good transient and steady-state responses. Although proportional and derivative controllers are required to improve transient responses, a jump in the reference signal generates a large input signal that reaches the limitation angle that degrades the transient responses [8]. In addition, ball position data from the camera include measurement noise that also degrades the steady-state responses.
To overcome the above issues, this paper proposes a PID controller design method for the ball and plate system by open-loop shaping based on the generalized Kalman-Yakubovich-Popov (GKYP) lemma [9]. The GKYP lemma is a generalization of the standard KYP lemma [10], which establishes the equivalence between a frequency domain inequality (FDI) for a transfer function and a linear matrix inequality (LMI) associated with its state-space realization. The standard KYP lemma is available for the infinite frequency range while the generalized one can limit the frequency range to be (semi) finite. By introducing the GKYP lemma to PID controller design, design specifications by FDIs in the finite frequency ranges for the open-loop transfer function result in LMIs [9]. The GKYP lemma gives a systematic open-loop shaping design method through optimization to realize desirable transient and steady-state responses. In this visual feedback system, we introduce a low-pass filter. Since the filter gives freedom in optimization, it allows better steady-state responses and reduces the influence of the measurement noise. To prevent large input signals from P and D controllers, we adopt the I-PD (integral-proportional derivative) structure, whose design is still in the framework of the GKYP lemma, because the open-loop transfer functions of PID and I-PD structures are fundamentally the same.
The paper is organized as follows. The description of the ball and plate system, including its modeling and the measurement noise, is presented in Section 2. The GKYP lemma based I-PD controller design method with a low-pass filter is provided in Section 3. The design of the I-PD controller is described in Section 4. Simulation and experimental results are presented in Sections 5 and 6, respectively. Finally, in Section 7, we present our conclusions.
The notation used is standard. For a matrix M, the transpose and complex conjugate transpose are denoted by M⊤ and M*, respectively. For a Hermitian matrix M, M≻(≽)0 and M≺(⪯)0 denote positive (semi) definiteness and negative (semi) definiteness, respectively. The symbol Hn stands for the set of n×n Hermitian matrices. The subscript n is omitted if n=2. The real and imaginary parts of M are denoted by ℜ(M) and ℑ(M). For matrices Φ and P, Φ⊗P denotes the Kronecker product. ℒ{x(t)} represents the Laplace transform of a signal x(t).
2. Ball and Plate System
The ball and plate, a QUANSER 2D Ball Balancer, is shown in Figure 1. The system consists of a plate, a ball, an overhead camera, and two servo units. The plate is allowed to swivel in both the X- and Y-directions. The overhead CMOS digital camera, a Point Grey Research Inc. FFMV-03M2C-CS, measures the position of the ball. The two servo units located under the plate are QUANSER SRV02 devices, each of which has a peak time of approximately 200 ([ms]) and an overshoot of approximately 5%. Each of the devices is connected to a side of the plate through a two DOF gimbal. The sampling time of the control system and the frame rate provided by the camera are 1 ([ms]) and 60 ([fps]), respectively. Thus the image information is renewed approximately every 17 ([ms]). There is a constant time delay of less than 60 ([ms]) between the measurement of the ball position and the manipulation of the servo units in the visual feedback system.
2D Ball Balancer.
2.1. Modeling
The X-direction of the ball and plate system is illustrated in Figure 2. We assume that the ball is completely symmetric and homogeneous and does not slip on the plate and that all frictions are neglected. The plate rotates in the XY-Cartesian coordinates with the origin at the center of the plate. The equations of motion are
(1)(mb+Ibrb2)x¨b-mb(xbα˙2+ybα˙β˙)+mbgsinα=0,(mb+Ibrb2)y¨b-mb(ybβ˙2+xbα˙β˙)+mbgsinβ=0,
where (xb,yb) is the position of the ball on the plate, α and β are the inclination angles of the plate to the X- and Y-axis, respectively, mb is the mass of the ball, rb is the radius of the ball, g is the gravitational acceleration, and Ib is the inertia of the ball. In Figure 2, θx represents the angle of the load gear. The relationship between α and θx is as follows:
(2)sinα=2sinθxrarmLtbl,
where Ltbl is the length of the side of the plate and rarm is the length between the joint and the center of the load gear. The relationship of β and θy is the same as (2), since both gear systems have the same hardware and the plate is symmetrical. The numerical values of the constant parameters in the equations of motion and (2) are shown in Table 1. Since θx and θy are limited as
(3)-30[∘]≤{θx,θy}≤30[∘],
from (2), the working ranges of α and β are
(4)-5.3[∘]≤{α,β}≤5.3[∘].
Parameters of the ball and plate system.
Parameters
Numerical values
mb
0.0252 [kg]
rb
0.0170 [m]
g
9.81 [m/s2]
Ib
2.89×10-6 [kg·m]
Ltbl
0.275 [m]
rarm
0.0254 [m]
The ball and plate system.
If the angular velocities α˙ and β˙ are relatively low, the approximations
(5)α˙β˙=0,α˙2=0,β˙2=0
are often used. Linearizing the equations of motion at θx=0 and θy=0, we have
(6)(mb+Ibrb2)x¨b+2mbgrarmLtblθx=0,(mb+Ibrb2)y¨b+2mbgrarmLtblθy=0.
Since the axes are independent of each other, we can focus on one axis, for example, the X-axis. For the input θx and the output xb, the transfer function is given by
(7)P(s)=Xb(s)Θx(s)=Kbaps2,
where Xb(s)=ℒ{xb(t)}, Θx(s)=ℒ{θx(t)}, and
(8)Kbap=-2mbgrarmrb2Ltbl(mbrb2+Ib).
2.2. Measurement Noise
In this visual feedback system, there is inevitable noise from the camera. To examine the noise level and frequencies, we observed the error signal between a fixed ball position and a measurement signal. The results are shown in Figure 3, where the upper part represents a time history of the error signal including noise and the lower part represents the fast Fourier transform (FFT) analysis of the error signal. The noise level in the error signals is relatively high at frequencies over 20 ([rad/s]).
Time history and FFT analysis results of measument signal.
3. I-PD Control by GKYP Lemma
This section describes an I-PD controller design method based on the GKYP lemma. The feedback control system is shown in Figure 4, where a filter is introduced into the control system.
Feedback control system of the ball and plate.
3.1. Low-Pass Filter
In the previous section, we showed that the measurement noise degrades the control performance. To reduce the influence of the noise, a low-pass filter is available in the controller design. According to the noise properties that we observed, it is sufficient to introduce a first-order low-pass filter into the output of the measurement, such that
(9)F(s)=μs+μ,
where μ ([rad/s]) is the cut-off frequency.
3.2. I-PD Controller
In the standard PID control, major changes in the reference signals cause large input signals to be generated by the proportional and derivative actions in the controller that saturate the actuator. Indeed, it is difficult to tune the parameters in the PID controller (Figure 4) such that the actuator in this visual feedback system is not saturated. The control system with the I-PD controller (Figure 4) has a structure whose inner loop includes the proportional and derivative actions [7, 8]. In this structure, the integral action alone acts on the error signal and prevents large signals being input to the actuator. The control input u can be written as
(10)u=-Kpy+Kis(r-y)-Kdsτs+1y,
where τ(>0) is the parameter to approximate the differentiator by a proper transfer function. Kp, Ki, and Kd represent the proportional, integral, and derivative gains, respectively. The open-loop transfer function is
(11)L(s)=F(s)P(s)K(s),
where
(12)K(s)=Kp+Kis+Kdsτs+1=Kp(1+1Tis+Tdsτs+1).Ti and Td are the integral time and derivative time, respectively. It should be noted that the open-loop transfer function of the I-PD structure is the same as that of the standard PID structure. To tune the parameters in the I-PD controller, we employ an open-loop shaping that realizes a desirable frequency response of the closed-loop system.
3.3. Generalized KYP Lemma
It is known that design specifications for an open-loop transfer function can be reduced to LMIs through the GKYP lemma [9]. We briefly review this lemma in the case of continuous-time systems.
The design specification consists of a frequency range and a desired property in that range. The frequency range can be represented by
(13)Λ(Φ,Ψ):={s∈ℂ∣σ(s,Φ)=0,σ(s,Ψ)≥0},
where Φ,Ψ∈H,
(14)σ(s,Φ):=[s*1]Φ[s1]=0.
The equality constraint in (13) distinguishes between continuous-time and discrete-time specifications. Since we address continuous-time systems in this paper, we use Φ such that
(15)Φ:=[0110].
The inequality constraint σ(s,Ψ)≥0 in (13) sets a frequency range Ω. For example, a low frequency range is written as
(16)Ω={ω∣ω≤ϖl}={ω∣σ(jω,Ψ)≥0},
where
(17)Ψ=[0-jj2ϖl].
Table 2 presents a summary of the choice of Ψ versus a type of the frequency range Ω, where ϖℓ, ϖh, ϖ1, and ϖ2 are real positive numbers, and ϖc:=(ϖ1+ϖ2)/2. On the other hand, the desired property in a specific frequency range can be represented by
(18)[L(jω)I]Π[L*(jω)I]≺0,
where
(19)Π=[Π11Π12Π21Π22]∈Hm+p,Π11∈Hp,Π≽0,m and p are the input and output numbers of L(s), respectively. For SISO systems, consider the requirement that L(jω) in a frequency range is on the half plane under a straight line. That is, L(jω) is under the straight line, such that
(20)aℜ[L(jω)]+bℑ[L(jω)]<c,
that is equivalent to (18) with
(21)Π=[0a-jba+jb-2c]∈H2.
This requirement is designed to reduce sensitivity in a low frequency range. Another requirement is that L(jω) in a frequency range is in the interior of the circle of radius r with the center at c. That is, L(jω) is in the circle such that
(22)|L(jω)-c|2<r2,
which is equivalent to (18) with
(23)Π=[1-c*-c|c|2-r2]∈H2.
This requirement is designed to guarantee robustness in a high frequency range. Under these preparations, the generalized KYP lemma [9] is expressed as follows.
Relation between Ψ and Ω for continuous time.
Ψ
Ω
[0-jj2ϖℓ]
ω≤ϖℓ (low)
[-1jϖc-jϖcϖ1ϖ2]
ϖ1≤ω≤ϖ2 (middle)
[0j-j-2ϖh]
ϖh≤ω (high)
Lemma 1.
Let L(s) be C(sI-A)-1B+D. Λ(Φ,Ψ) in (13) and Π in (18) are given. Assume that det(sI-A)≠0 for all s∈Λ. Then the finite frequency condition
(24)[L(s)I]Π[L*(s)I]≺0,∀s∈Λ(Φ,Ψ)
holds if and only if there exist Hermitian matrices P and Q such that the matrix inequality condition
(25)[Γ[BD]Π11Π11[BD]*-Π11]≺0
is satisfied where
(26)Γ:=[AIC0](Φ⊤⊗P+Ψ⊤⊗Q)[AIC0]⊤+[0BΠ12Π12*B⊤DΠ12+Π12*D⊤+Π22].
Equation (25) is affine with respect to B, D, P, Q, and Π22. In the case where B and D have affine design parameters, (25) is an LMI.
4. Control System Design4.1. Filter Design
Considering the control performance and the noise level, we set the cut-off frequency in (9) as μ=20 ([rad/s]). We examine the effectiveness of this filter in the same experimental setup as given in Section 2.2. Figure 5 shows the spectral analysis results of the measurement and filtered signals, which are represented by the dotted and solid curves, respectively. From these results, it can be seen that the noise at frequencies over 20 ([rad/s]) has been reduced.
Time history and FFT analysis result of measurement signal with low-pass filter.
4.2. State-Space Realization of Open-Loop Transfer Function
To obtain an LMI based on the GKYP lemma, a state-space realization of L(s) is required to be affine with respect to a set of the design parameters ρ=(Kp,Ki,Kd). If we fix τ in K(s) at 1.0×10-2, the design parameters appear affinely in the numerator of K(s). Indeed, the controllable canonical form of K(s) is written as
(27)[AkBk(ρ)CkDk(ρ)]=[00Kiτ1-1τKi-Kdτ201Kp+Kdτ].
Realizations of P(s) and F(s) are also written as
(28)[ApBpCpDp]=[01000Kbap100],(29)[AfBfCfDf]=[-μ1μ0],
respectively. By combining these realizations (27)–(29), we obtain a realization of L(s) as
(30)L(s)=[AB(ρ)CD(ρ)],
where
(31)A=[Ak00CkBpAp0CkDpBfCpBfAf],B=[Bk(ρ)Dk(ρ)BpDk(ρ)DpBf],C=[CkDpBfCpBfCf],D=Dk(ρ)DpDf.
Consequently, the state-space realization of L(s) is affine with respect to ρ.
4.3. Specifications
To shape the Nyquist plot of L(s), we require the following FDI specifications:
(32)-2ℜ[L(jω)]+ℑ[L(jω)]>γℓ,ω∀≤0.8,(33)ℑ[L(jω)]<γm,2.5≤ω∀≤2.8,(34)|L(jω)|<γh,ω∀≥10.
Specification (32) with a large γℓ(>0) ensures sensitivity reduction in the low frequency range by making the gain of L(s) high. Specification (33) requires the Nyquist plot to be outside a circle with its center at the point -1+j0 so that a certain stability margin is guaranteed. Specification (34) with a small γh ensures robustness against the unmodeled dynamics that typically exists in the high frequency range.
In addition to the above basic specifications, we also require the following FDIs that improve the property of trajectory tracking
(35)4ℜ[L(jω)]+ℑ[L(jω)]<γ1,ω∀≥0.3,(36)4ℜ[L(jω)]+ℑ[L(jω)]>γ2,ω∀≥0.3.
Since the integral action alone works on the error between the output and the reference signals, the property of trajectory tracking depends directly on the integrator. Here we focus on the corner angular frequency ωI by the integral action in the I-PD controller which is given by ωI=1/Ti, where Ti=Kp/Ki. We have a strong integral action, and the error is corrected quickly when the corner angular frequency is high, while too high a corner angular frequency causes overshoot and hunting. Thus we impose restrictions for the phase of the I-PD controller. It should be noted that the phase at lower frequencies is about −90 ([deg]) while the phase at the corner angular frequency is about 0 [deg]. If we find the frequency at a specific phase from −90 ([deg]) to 0 ([deg]), the corner angular frequency is greater than that frequency. Specifications (35) and (36) restrict the phase of the I-PD controller as well as the open-loop transfer function so that the corner angular frequency is greater than the frequency at the lowest point in the frequency range 0.3 ([rad/s]).
4.4. I-PD Controller Design
We design an I-PD controller by maximizing γℓ subject to Specifications (32)–(36) where
(37)(γm,γh,γ1,γ2)=(-1,0.5,1,-100).
That is, the optimization problem is
(38)maxKi,Kp,Kd,γℓγℓsubjectto(19)–(36)and(37).
Each of the design Specifications (32)–(36) is reduced to an LMI condition through Lemma 1 with the realization (30). The Specification (32) is modified to ε≤ω∀≤0.8, where ε=1.0×10-4 because L(s) includes the origin poles that prevent us from taking ω=0. Then the LMI optimization problem is to maximize γℓ subject to all these LMI conditions where Ki, Kp, and Kd are the common decision variables, while P1,…,P5 and Q1,…,Q5 appear in the LMIs as independent decision variables. It should be noted that γℓ appears alone in Π22 in the LMI condition (25) corresponding to (36). In this sense, γℓ is also an independent decision variable. It should also be noted that P and Q in (25) appear in each of the LMI conditions as the independent decision variables.
To solve this LMI optimization problem, we use YALMIP R20120806 [11], an LMI parser, and SPDT3 version 4.0 [12], an LMI solver, on MATLAB R2011b. The resulting optimal parameters in the I-PD controller and γℓ are
(39)(Kp,Ki,Kd,γℓ)=(9.2859,10.7806,4.138,11.9464).
The Nyquist plots are shown in Figures 6 and 7 where L(jω) satisfies the design specifications given in Section 4.3. Since γℓ is maximized, sensitivity is reduced in the frequency range. The Bode plots of F(s)P(s), L(s), and K(s) are shown in Figure 8 where the corner angular frequency ωI of the I-PD controller is larger than 0.3 ([rad/s]).
Nyquist plot.
Nyquist plot (magnification).
Bode plot.
5. Simulation Results
The I-PD controller whose design is described in the previous section was evaluated by a simulation of the step response. To compare the response with that of a standard PID controller, we used the PID controller whose gain parameters are the same as those of the I-PD controller. Since both feedback systems have the same open-loop transfer function, their feedback properties must be the same, provided that each input signal does not saturate. The simulation results of the step response are shown in Figure 9 where the upper and lower parts are the output and input signals, respectively. The solid curves represent the responses given by the I-PD controller while the dashed curves represent those by the PID controller. One can see that the input signal given by the PID controller is saturated, while that by the I-PD controller is not saturated and satisfies the limitation (3). The output signal given by the I-PD controller settles down to the desired value without any overshoot.
Step response simulation results.
It should be noted that the gain parameters in the designed controller are not tuned with the I-PD structure. In our experience, it is difficult not to saturate the input limitation for the PID structure using any design method.
6. Experimental Results
This section evaluates the I-PD controller whose design is given in Section 4 through an experiment of the step response. The PID controller used in Section 4 was also evaluated for comparison. The results of trajectory tracking control by the I-PD controller were also evaluated.
6.1. Step Response Experiment
The results of the step response experiment are shown in Figure 10 where the description of the figure is the same as that of Figure 9. In this experiment, the influence of the time delay appeared and the input signals were slightly larger than those obtained in the simulations. The rise and settling time results are, however, almost the same as those obtained in the simulation.
Step response experimental results.
6.2. Trajectory Tracking Experiments
We tested two kinds of trajectories for tracking control, a square and a circular trajectory. The side of the square trajectory was 0.1 ([m]), and the radius of the circular trajectory was 0.05 ([m]). The results are shown in Figure 11 where the left part shows a trajectory of the square trajectory tracking control, and the right part shows a trajectory of the circular trajectory tracking control. The time histories of the ball and input angles are shown in Figures 12 and 13. In the square trajectory tracking control experiment, the responses were similar to those in the step response experiment except for a slight vibration. Such vibration phenomena are noticeable in the responses of circular trajectory tracking control, in particular, the case when the input signal is relatively small. The reason for these phenomena could be the friction of the ball against the plate or a backlash of the gear system.
Experimental results of tracking control.
Experimental results of square response.
Experimental results of circle response.
7. Conclusions
This paper applied the GKYP lemma to an open-loop transfer function including an I-PD controller and a noise reduction filter for the ball and plate system. The multiple FDI specifications for the finite frequency ranges were satisfied by a solution of the LMI optimization problem. The solution includes the optimal parameters in the I-PD controller. The first-order low-pass filter reduced the noise in the high frequency range and improved the steady-state response. Both simulations and experiments evaluated the effectiveness of the design method by comparing the standard PID controller.
The PI-D (proportional integral-derivative) control system, which moved the derivative controller to the inner feedback loop, also has the same open-loop transfer function as the standard PID controller. Thus the approach in this paper can also be applied to the PI-D controller.
MoarrefM.SaadatM.VossoughiG.Mechatronic design and position control of a novel ball and plate systemProceedings of the Mediterranean Conference on Control and Automation (MED' 08)June 2008107110762-s2.0-5294909952210.1109/MED.2008.4602212KokotovicP.The joy of feedback: nonlinear and adaptive1992123717ZhengF.LiX.QianX.WangS.Modeling and PID neural network research for the ball and plate systemProceedings of the International Conference on Electronics, Communications and Control (ICECC '11)September 20113313342-s2.0-8145514904610.1109/ICECC.2011.6067840FanX.ZhangN.TengS.Trajectory planning and tracking of ball and plate system using hierarchical fuzzy control scheme20041442297312MR20574852-s2.0-214275264510.1016/S0165-0114(03)00135-0BaiM.TianY.WangY.Decoupled fuzzy sliding mode control to ball and plate systemProceedings of the 2nd International Conference on Intelligent Control and Information Processing (ICICIP '11)July 20116856902-s2.0-8005319754610.1109/ICICIP.2011.6008337BorrelliF.2003290SpringerLecture Notes in Control and Information SciencesMR1998123ÅstrőmK. J.HägglundT.2005Instrumentation SystemsLiQ.KeminZ.2009Prentice HallIwasakiT.HaraS.Generalized KYP lemma: unified frequency domain inequalities with design applications20055014159MR21108082-s2.0-1294424924610.1109/TAC.2004.840475RantzerA.On the Kalman-Yakubovich-Popov lemma1996281710MR1393670ZBL0866.930522-s2.0-000267630210.1016/0167-6911(95)00063-1LőfbergJ.YALMIP: a toolbox for modeling and optimization in MATLABProceedings of the IEEE International Symposium on Computer-Aided Control System Design (CACSD '11)2004Taipei, TaiwanTohK. C.ToddM. J.TütüncüR. H.SDPT3—a MATLAB software package for semidefinite programming, version 1.319991115455812-s2.0-0033295027