transfer function state space
DESCRIPTION
it is about inverted pendulamTRANSCRIPT
TRANSFER FUNCTIONSTATE SPACE MODELAND SIMULATION IN MATLAB INVERTED PENDULUM
Submitted To: Sir Sadaqat Ali
Submitted By :
Somia Hassan2K12 ELE 212
Irfana Wali2k12 ELE 232Waqas Umair2k11 ELE 272Rana Shahid 2k12 ELE 244
INVERTED PENDULUM SYSTEMS
Inverted Pendulum Dynamics:
•The mechanical system has Two Degrees of freedom (DOF), the linear motion of the cart in the X-axis, the rotational motion of the pendulum in the X-Y plane.
• Let x be the distance in m from the Y-axis,
•And q be the angle in rad w.r.t vertical.
M – Mass of cart in kgm – Mass of Pendulum in kgJ – Moment of Inertia of pendulum in kg-m2L – Length of Pendulum in mb – Cart friction coefficient in Ns/mg – Acceleration due to gravity in m/s2
FREE BODY DIAGRAM OF THE CART
The horizontal forces are considered in the analysis as they only give information about the dynamics since the cart has only linear motion.
Max = F + N – B eq(1)
N=md²(x+LsinӨ)=mẍ+mӪLcosӨ-m(Ө’)²LsinӨ eq(2) dt²
FREE BODY DIAGRAM OF PENDULUM
Vertical Forces:
P+mg=m d² (LcosӨ) eq(3) dt²
P=mLӪsinӨ+mL(Ө’)²cosӨ-mg
•Moment due to the reaction forces P and N are resolved into X and Y directions
•Vcmt is the velocity of centre of mass
•V is the velocity of point Oin the X direction
Summing the moments across the center we get:
-NLcosӨ - PLsinӨ =j Ӫ eq(4)
Substitution of eq(2) and eq(3) in eq(4) yields
-mLẍcosӨ -(mL² + J )Ӫ = mgLsinӨ eq(5)
After substituting eq(2) in eq (1) we get:
we assume a very small deviation Ө from the vertical.
Ө ≈0sin Ө=-Ө
cos Ө=-1 Ө’²=0
F=(M+m)ẍ+bẋ-mL(Ө’)²sinӨ+mLӪcosӨ .........eq(6)
CONTINUE.....
Putting in eq(5)
Putting in eq(6)
(M+m)ẍ+bẋ-mLӪ=u ........ eq(8)
mLẍ=(J+mL²) Ӫ-mgLӨ ........ eq(7)
LINEAR MATHEMATICAL MODEL•Defined as a set of mathematical equations
•More accurate the model more complex the equations will be.
•To obtain a linear model the Taylor series expansion can be used
•The system has two equilibrium points:
• one is the stable i.e. the pendant position
•and the other one is the unstable equilibrium point i.e. the inverted position
TRANSFER FUNCTION
To obtain the transfer,we must first take the Laplace transform of the system equations assuming zero initial conditions.
mLx(s)s² =(J+mL²)Ө(s) s²-mgLӨ(s) ......(9)
From eq(9)
(M+m) x(s)s² +bx(s)-mLӨ(s)s²=u(s).......(10)
X(s)= [J+mL² - g ] Ө(s) ......eq(11) mL s²
Then substitute the above into the eq(10)
(M+m) )[J+mL² - g ]s²Ө(s)+b[J+mL² - g ]sӨ(s)-mLs²Ө(s)=u(s) mL s² mL s²
Rearranging, the transfer function is then the following
S⁴+b(J+mL²) s³-(M+m)mgL s²–bmgL s q q q
mLs² q
Where q=[(M+m)(J+mL²)-(mL²)]
mLs² q
S³+b(J+mL²) s²-(M+m)mgLs –bmgL q q q
Ө(s) =U(s
P(pend)=Rad .....(12) N
(J+mL²) s² -gmL qP(cart)=x(s) =
u(s)S⁴+b(J+mL²) s³-(M+m)mgL s²–bmgL s q q q
M .....(13)N
The state space is of the formẋ = Ax+ Bu......... Eq(14)
The state space for the Inverted Pendulum system is obtained as
..................Eq(15)
Where σ’=MmL²+J(M+m)
The output equation is given by
..................Eq(16)
INVERTED PENDULUM SYSTEM PARAMETERS
After substitution of parameters
The transfer functions in (12) and (13) are substituted by the values in Table we obtain
X (s) = 2.59s²-3.92 U(s) s⁴+0.26s³-36.296s²-7.26s
Ө(s) = 7.407s U(s) s³+0.26s²-36.296s-7.26
q=[(M+m)(J+mL²)-(mL²)]
q=5.4×10-3