0% found this document useful (0 votes)
171 views12 pages

Lab Manual 8

This document describes an experiment on modeling an inverted pendulum system in MATLAB and Simulink. The key steps are: 1. Derive the nonlinear and linearized mathematical models of the inverted pendulum system. Parameters like mass, length, friction coefficient are defined. 2. In MATLAB, define the transfer function, find poles, zeros and gain. Take impulse and step responses and observe the pendulum and cart motions. 3. In Simulink, build the nonlinear model using Mux and Function blocks. Take impulse and step responses to observe the system behavior. 4. Tables are provided to record observations and results from the theoretical calculations, MATLAB simulations and Simulink model.

Uploaded by

Hasan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
171 views12 pages

Lab Manual 8

This document describes an experiment on modeling an inverted pendulum system in MATLAB and Simulink. The key steps are: 1. Derive the nonlinear and linearized mathematical models of the inverted pendulum system. Parameters like mass, length, friction coefficient are defined. 2. In MATLAB, define the transfer function, find poles, zeros and gain. Take impulse and step responses and observe the pendulum and cart motions. 3. In Simulink, build the nonlinear model using Mux and Function blocks. Take impulse and step responses to observe the system behavior. 4. Tables are provided to record observations and results from the theoretical calculations, MATLAB simulations and Simulink model.

Uploaded by

Hasan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Gift University Gujranwala Electrical Engineering

MODELLING OF INVERTED PENDULUM.


(SIMO OPEN LOOP)

EXPERIMENT NO. 08

Name Report Marks Lab Viva Marks Total


(5) Performance (5) (20)
(10)

Feedback Control Systems


Gift University Gujranwala Electrical Engineering

FEEDBACK CONTROL SYSTEMS LAB EVALUATION RUBRIC


Lab No. 08: Modelling of Inverted Pendulum. (SIMO Open Loop) Psychomotor
skill level: P4

90%-100% - Excellent 70%-90% - 40%-70% – 0%-40% Needs


Good Satisfactory Improvement
Showing simulation Knowledge and command Partial knowledge Major errors in Unable to operate,
results and on MATLAB Tools and of MATLAB & testing and identify and test
theoretical elaborated usage of SIMULINK. identification and functions of
calculations(10) SIMULINK tool. Partially able to using tool. SIMULINK.
Finding transfer function obtain transfer Major errors in Unable to find
of inverted pendulum function. calculations. transfer function of
system.

Lab Report (5) Professional and accurate Report include all Report data is Inadequate and
representation of lab required accurate accurate but non-professional
experiment in terms of data with some presented in non- lab report with
problem statement, minor inadequacies professional manner inaccurate results.
circuit design, in presentation along with some Report did not
observations, results, errors in analysis include the
analysis and conclusion. and conclusion required analysis
and graphs along
with wrong or no
conclusion.
Viva(5) The related questions are Student partially Student partially Do not know about
answered fully. able to answer to able to answer to working of circuit.
question. Aware question. Not Aware Unable to answer
about the working about the working of the questions.
of circuit. circuit.
TOTAL <------Total points earned = Lab Performance Grade----->

*RESULTS REQUIRED Level


Display the results of lab tasks/questions given in the manual to the instructor. P4

State complete answers in report. P2

Feedback Control Systems


Page 1
Gift University Gujranwala Electrical Engineering

EXPERIMENT NO. 08
Modelling of Inverted Pendulum (SIMO open loop)

Objective:
 Understand system modeling.
 Understand system transfer function, state space, and governing equation and block
diagram.
 Understand Non-Linear model of system.
 Observe response of system (Step and Impulse).
 Observe behavior of system.

Equipment/Software:
 MATLAB R2015b or above.

Part A: System Modeling

Figure 8.1- Forces acting on inverted pendulum

Where F is force applied on cart of mass M. P and N are perpendicular and horizontal forces
respectively. ‘b’ is friction coefficient and θ is angular position of pendulum of mass m.

Note: In theory, I (Inertia) and b (Friction coefficient) were assumed zero but in lab we will
consider these parameters as well).

Feedback Control Systems


Page 2
Gift University Gujranwala Electrical Engineering

Non-Linear Forces on system

Non-Linear governing equations of system:


After substituting value of P and N in eq 8.1 and eq 8.2 and re-arranging, we get following Non-
linear model of inverted pendulum:

Linearization the Non-Linear Model of system:


Since the analysis and control design techniques we will be employing in this example apply only
to linear systems, this set of equations needs to be linearized. Specifically, we will linearize the
equations about the vertically upward equilibrium position, θ = π, and will assume that the system
stays within a small neighborhood of this equilibrium. This assumption should be reasonably valid
since under control we desire that the pendulum not deviate more than 20 degrees from the
vertically upward position. Let φ represent the deviation of the pendulum’s position from
equilibrium, that is, θ = π + φ. Again presuming a small deviation (φ) from equilibrium, we can
use the following small angle approximations of the nonlinear functions in our system equations:

Linear governing equations of system:

Feedback Control Systems


Page 3
Gift University Gujranwala Electrical Engineering

After substituting the above approximations into our nonlinear governing equations, we arrive at
the two linearized equations of motion. Note u has been substituted for the input F.

System parameters:

Table 8.1- System Parameters

Theoretical Calculations:
• Find transfer function of system H(s) shown in Figure 8.1
• Find standard form of transfer function H(s).
• Find pole, zero and gain of H(s).
• Find h (t) from H(s).
• Find block diagram of system.
• Find state space form of system and call it SS1.
• Find number of inputs, outputs and state variables in SS1.
• Take impulse and step response of system.

Impulse Response of Pendulum:

Feedback Control Systems


Page 4
Gift University Gujranwala Electrical Engineering

Table 8.2- Observations

Impulse Response of Cart:

Table 8.3- Observations

Step Response of Pendulum:

Table 8.4- Observations

Feedback Control Systems


Page 5
Gift University Gujranwala Electrical Engineering

Step Response of Cart:

Table 8.5- Observations

Simulation:
MATLAB Command Window

• Define Transfer function of system in Matlab using “tf”.

• Find zero, pole and gain from transfer function using “tf2zp”.

• Find pole zero plot of system using “pzmap”.

• Find bode plot of system using “bode”.

• Find state space using tf2ss.

• Find number of inputs, outputs and state variables of SS1 using “size”.

• Find impulse and unit step response of system using “impulse” and “stepplot” respectively.

• Fill tables below.

Feedback Control Systems


Page 6
Gift University Gujranwala Electrical Engineering

Impulse Response of Pendulum:

Table 8.6- Observations

Impulse Response of Cart:

Table 8.7- Observations

Step Response of Pendulum:

Table 8.8- Observations

Feedback Control Systems


Page 7
Gift University Gujranwala Electrical Engineering

Step Response of Cart:

Table 8.9- Observations

MATLAB Functions:

Table 8.10- MATLAB Functions

Non-Linear Model in MATLAB Simulink:


We can build the inverted pendulum model in Simulink employing the Non-Linear forces
equations of system.

• Use Mux and Function blocks to define functions and complete all four equations of non-linear
forces of system.

• Make subsystem.

• Find impulse and step response of system.

Feedback Control Systems


Page 8
Gift University Gujranwala Electrical Engineering

Observation Set:
Step Response of Pendulum:

Table 8.11- Observations

Step Response of Cart:

Table 8.12- Observations

Points to think

 Product of system transfer function H(s) and unit step (1/s) IS EQUAL to convolution of
system time domain h(t) and unit step u(t) and it IS EQUAL to solution of governing
equation.
 System have multiple state space representations but single unique transfer function.
 Number of poles is equal to number of zeros.
 Poles in left plane of pole-zero plot make system stable while poles in right plane makes
system unstable.

Feedback Control Systems


Page 9
Gift University Gujranwala Electrical Engineering

 ystem becomes marginally stable if there is at least one pole on imaginary axis in pole-
zero plot.
 Two poles on origin make system unstable.
 Transfer Function us Unique while state space representation is infinitely many.

Lab Report
 Fill all the tables completely.
 Attach all MATLAB Codes and simulation Results with your report (Published Report).
 Also attach the hand calculations of finding transfer function of system.

Observations: (2 Marks)
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________

Review Questions

1. What is the difference in step and impulse responses of pendulum? How do they
affect the system? (1.5 Marks)
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
Feedback Control Systems
Page 10
Gift University Gujranwala Electrical Engineering

________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________

2. Why did you take cart and pendulum as separate systems instead of one?
(1.5 Marks)
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________

Feedback Control Systems


Page 11

You might also like