Mathematics
ME130 Fall Exam 3 Name: ____________________________________
Question 1: In the following problem we analyze control of a ball and beam system. The parameters of the system include the inertia of the beam J, the mass and radius of the ball m and r, gravity g. The variables of the system include the angle of the beam 𝜃, and the linear position of the ball 𝑝, while the applied effort to the system is 𝜏. Then the nonlinear equations of motion are:
$ 𝐽 𝑟! +𝑚) �̈� + 𝑚𝑔 sin 𝜃 −𝑚𝑝�̇�! = 0
(𝑚𝑝! + 𝐽)�̈� + 2𝑚𝑝�̇��̇� + 𝑚𝑔𝑝 cos 𝜃 = 𝜏
Let 𝑀"be defined as the total inertial effect of the beam and ball in Equation 1, while 𝑀! is the total inertial effect in Equation 2. From the equations above, the first two nonlinear state derivative equations (�̇�" and �̇�!) are shown below. Solve for �̇�# and �̇�$.
𝑥" = 𝑝 𝑥! = �̇� 𝑥# = 𝜃 𝑥$ = �̇�
�̇�" = 𝑥!
�̇�! = �̈� = 1 𝑀"
<𝑚𝑝�̇�! −𝑚𝑔 sin 𝜃=
�̇�# =? �̇�$ =?
The operating point 𝜃 = 𝜃% = 0 and 𝑝 = 𝑝% corresponds to the beam being at rest horizontally, while the ball is at rest at some distance away from the center. At this operating point, one of the linearized equations (for �̇�!) is already given to you on below. Find the linearized approximation for �̇�$. Hint: a good choice for f2 is the nonlinear part of �̇�$.
𝑓" ≈ 𝑓"(𝜃%, 𝑝%) + 𝜕𝑓" 𝜕𝜃 D &!,(!
(𝜃 − 𝜃%)
𝑓"(𝜃%, 𝑝%) = 1 𝑀"
E𝑚𝑝%�̇�% ! −𝑚𝑔 sin 𝜃%F
𝜕𝑓" 𝜕𝜃 D &!,(!
= 1 𝑀"
(−𝑚𝑔 cos 𝜃% )
𝛿𝜃 ≡ 𝜃 − 𝜃% 𝑓" ≈ �̇�! = −
𝑚 𝑀"
𝑔 ∙ 𝛿𝜃
𝑓! ≈? 𝑓!(𝜃%, 𝑝%) =? 𝜕𝑓! 𝜕𝜃 D &!,(!
=?
𝛿𝜃 ≡? �̇�$ ≈?
ME130 Fall Exam 3 Name: ____________________________________ Question 2: Assume 𝑚 = 1, 𝑀! = 1,𝑀! = 2, 𝑔 = 10, 𝑝0 = 0.5 for the linearized ball and beam system. Determine the state space representation for this system in terms of matrices A, B, C, and D in normal measurement space with ball position p, velocity p-dot, small angular deviation 𝛿𝜃, and angular velocity theta-dot as the states x1, x2, x3, and x4. Assume that the input u is 𝜏" = 𝜏 − 𝑚𝑔𝑝# and that there is one measurement output of ball position p. �̇�" = 𝑥! �̇�! = −
𝑚 𝑀"
𝑔 ∙ 𝛿𝜃
�̇�# = 𝑥$
�̇�$ ≈ 1 𝑀!
( 𝜏 − 𝑚𝑔𝑝%)
ME130 Fall Exam 3 Name: ____________________________________ Question 3: Given the state space system in represented below in measurement space, Use Matlab and matrix manipulations to solve for the state space representation in phase variable form. Compare the characteristic equations of the new and original representations.
J
�̇�" �̇�! �̇�# �̇�$
K = L 0 1 0 0
0 0 −10 0
0 0 0 0
0 1 0 0
M L
𝑥" 𝑥! 𝑥# 𝑥$
M + L 0 0 0 0.5
M 𝑢
𝑦 = [1 0 0 0] L
𝑥" 𝑥! 𝑥# 𝑥$
M+0*u
ME130 Fall Exam 3 Name: ____________________________________ Question 4: A state space representation in phase variable form is given below. Show that all the states are controllable using the controllability matrix. Design feedback gains Kx=[K1 K2 K3 K4] so that the closed loop characteristic equation is 𝜙(𝑠) = 𝑠$ + 14𝑠% + 71𝑠" + 154𝑠 + 120. Show all work.
𝐴) = L 0 1 0 0
0 0 1 0
0 0 0 0
0 1 0 0
M 𝐵) = L 0 0 0 1
M 𝐶) = [0 0 1 0]
ME130 Fall Exam 3 Name: ____________________________________ Question 5: Assume you have a set of gains Kx=[121 155 72 15] designed in phase variable space. Convert these gains into measurement variables Kz. Compare the characteristic equations of the closed loop systems for Ax-Bx*Kx and Az-Bz*Kz. Measurement space
𝐴* = L 0 1 0 0
0 0 −10 0
0 0 0 0
0 1 0 0
M 𝐵* = L 0 0 0 0.5
M 𝐶* = [1 0 0 0]
Phase variable space
𝐴) = L 0 1 0 0
0 0 1 0
0 0 0 0
0 1 0 0
M 𝐵) = L 0 0 0 1
M 𝐶) = [1 0 0 0]
ME130 Fall Exam 3 Name: ____________________________________ Question 6: The differential equation below represents the transfer function for the linearized ball and beam with 𝛿𝜃 as output and 𝑝 as input. Assume a controller C(s) and a closed loop transfer function T(s)=C(s)*G(s)/(1+C(s)*G(s)). Determine the steady state response p(𝑡 = ∞) to a unit impulse as a reference input r(s). Hint: Pick your own controller and then use the final value theorem to find the value of the state as time goes to infinity. �̈� = −10 ∙ 𝛿𝜃
𝐺(𝑠) = 𝑝(𝑠) 𝛿𝜃(𝑠) =
10 𝑠2
ME130 Fall Exam 3 Name: ____________________________________ Question 7: After the ball and beam system state space control has been implemented, a closed loop system is formed G2(s) shown below. It is proposed to place the resulting system within in another unity feedback loop so that the open loop plant is K*G2(s). The root locus and Nyquist plots for the new open loop system are shown. Write down the Nyquist stability criterion, and note the number of unstable open loop poles, and desired number of counter-clockwise encirclements. Using the information from the plots shown below, make a quick estimate of the upper and lower limits of gain K for stability.
𝐾𝐶(𝑠)𝐺"(𝑠) = 𝐾
𝑠4 + 14𝑠3 + 71𝑠2 + 154𝑠 + 120
ME130 Fall Exam 3 Name: ____________________________________ Question 8: The Bode plots of the complete system and individual factors of T(s) are shown. A) Compute expressions for the magnitude of each individual Bode factor, and determine the total DC gain. B) On the magnitude and phase plot below, label each item that was determine in (A).
𝑇(𝑠) = 1 (𝑠 + 2)(𝑠 + 3)(𝑠 + 4)(𝑠 + 5)
-150
-100
-50
0
Ma gni
tud e (d
B)
10-1 100 101 102 -360
-270
-180
-90
0
Ph ase
(de g)
Bode Diagram
Frequency (rad/s)
ME130 Fall Exam 3 Name: ____________________________________ Question 9: The continuous state space observer equations of the ball and beam system are given below. Two cases are shown for measurement output: A) ball position, and B) beam angle. Pick one of the cases and determine the discrete observer matrices Ad, Bd, Cd, and Ld, using the explicit approximation of the derivative operator “s”. Assume the sample time is T. Do not solve for the observer gains. Just express your answers in terms of the matrix L or L1, L2, L3, and L4. Explicit: 𝑠 ≈ !
& (𝑧 − 1)
𝐴 = L 0 1 0 0
0 0 −10 0
0 0 0 0
0 1 0 0
M 𝐵 = L 0 0 0 0.5
M 𝐷 = 0
𝐿 = J
𝐿" 𝐿! 𝐿# 𝐿$
K
Case A) 𝐶* = [1 0 0 0] Case B) 𝐶* = [0 0 1 0]
ME130 Fall Exam 3 Name: ____________________________________ Question 10: For this problem, we consider the ball and beam system, using the ball position 𝑝(𝑠) is as output and (clockwise) beam angle 𝜃(𝑠) is considered input. The continuous system transfer function 𝐺%(𝑠) and proposed controller C(s) are given below. The equivalent sampled transfer function 𝐺%(𝑧) from the z-transform table (see back page), as well as the discretized approximation of the controller 𝐶(𝑧) using the explicit approximation of the Laplace operator “s” are also provided. Evaluate stability for K=10 and a sampling time of T=2.0 seconds. Hint: Use Matlab to find the roots of the closed loop characteristic equation.
𝐺%(𝑠) = 𝑝(𝑠) 𝜃(𝑠) =
10 𝑠2
𝐶(𝑠) = 𝐾(𝑠 + 1) Explicit: 𝑠 ≈ !
& (𝑧 − 1)
𝐺(𝑧) = 𝑇𝑧
(𝑧 − 1)"
𝐶(𝑧) = 𝐾 @ 1 𝑇 (𝑧 − 1) + 1A
ME130 Fall Exam 3 Name: ____________________________________
ME130 Fall Exam 3 Name: ____________________________________
ME130 Fall Exam 3 Name: ____________________________________
ME130 Fall Exam 3 Name: ____________________________________
ME130 Fall Exam 3 Name: ____________________________________
Tables from NISE:
1st order factor Second order factor
ME130 Fall Exam 3 Name: ____________________________________
Matrix addition
Matrix multiplication
! 𝑎 𝑏 𝑐 𝑑 𝑒 𝑓 𝑔 ℎ 𝑖
! = 𝑎𝑒𝑖 − 𝑎𝑓ℎ − 𝑏𝑑𝑖 + 𝑏𝑓𝑔 + 𝑐𝑑ℎ − 𝑐𝑒𝑔
/𝑎 𝑏 𝑐 𝑑/ = 𝑎𝑑 − 𝑏𝑐
Determinants
ú û
ù ê ë
é ++ ++
=ú û
ù ê ë
é +ú û
ù ê ë
é hdgc fbea
hg fe
dc ba
ú û
ù ê ë
é ++ ++
=ú û
ù ê ë
é ú û
ù ê ë
é dhcfdgce bhafbgae
hg fe
dc ba
ME130 Fall Exam 3 Name: ____________________________________
ME130 Fall Exam 3 Name: ____________________________________