SYSC3600-L3
pdf
keyboard_arrow_up
School
Carleton University *
*We aren’t endorsed by this school
Course
3600
Subject
Mechanical Engineering
Date
Apr 3, 2024
Type
Pages
12
Uploaded by nikisundefined
SYSC3600B - Lab 3
Control of an Inverted Pendulum
Nicholas Nemec
101211060
12/1/2023
1: Introduction
The purpose of this laboratory is to observe the behavior of an inverted pendulum, an
unstable, nonlinear system. We were tasked with simulating the integration of a
proportional-plus-derivative(PD) controller design modeled using Simulink and MATLAB
to study its ability to stabilize the inverted pendulum system based on various factors.
2: Controller Design
Figure 1: Inverted pendulum system[Lab Manual]
Figure 2: Simulink model to simulate the zero-input response of the inverted pendulum and the cart[Lab Manual]
Figure 3: Simulink model that implements the PD controller to simulate the non-linear dynamics of the cart/pendulum[Lab Manual]
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Figure 4: Simulink subsystem that implements the non-linear dynamics of the angle of the pendulum Θ
o
(t) and the position of the cart x(t)[Lab Manual]
3: Pre-Lab
Transfer function of the system:
𝐻(?) = Θ
?
(?)
Θ
?
(?)
=
𝐵
?
2
+
?
?
??
?+[
?
?
−(?+?)?
??
]
General transfer function:
𝐻(?) = ?ω
?
?
2
+2ζω
?
2
+ω
?
2
Using the given values, M=1000 kg, m=200 kg, l=10 m, ω
n
=0.5 rad/sec, ζ=0.7 and
g=9.81 m/s
2
, the values of k
p
and k
d
were calculated to be:
4: Lab
4.1: Inverted pendulum demo in Simulink
In your report, discuss why an overall underdamped response in balancing the
inverted pendulum is preferred over a critically damped or an overdamped response.
It was found that an overall underdamped response is more favored over
critically/overdamped response because the behavior of an underdamped system
contains an oscillating pattern with a small amount of overshoot. It’s this behavior that
allows the system to achieve a balanced state whereas in an overdamped or
critically-damped system, the cart would never be able to balance the inverted
pendulum due to the lack of overshooting. The result is the cart attempting to balance
the inverted pendulum forever and the cart will never stop moving.
4.2: Testing the pendulum
Figure 5: variation of
x
(t) when Θ = 20
॰
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Figure 6: variation of Θ
o
(t) when Θ = 20
॰
Describe the zero-input response of the pendulum as well as what happens to the
position of the cart. How is this affected by the starting angle of the inverted
pendulum?
When the system was tested with zero-input and a starting Θ of 20, the observed
response was the sinusoid shown in Figure 2. The position of the cart tends to simply
move back and forth. When the starting Θ was decreased, the maximum Θ value
increased and the cart seems to move slower. However, when the starting Θ increases
the maximum Θ value reached is reduced, as well as the carts motion becomes faster.
4.3: Simulation of PD controlled non-linear inverted pendulum
4.3.1: Problem of derivative with the PD controller
In your report you should include the transfer function for your lowpass filter with
cutoff frequency of ω
cf
= 100 rads/s, along with the Bode plots for the filter. Make any
observations you can about the lowpass filter from the bode plots.
Low-pass filter transfer function:
, where ω
cf
= 100 rads/s
𝐻
?𝑃
(?) =
1
?
ω
??
+1
𝐻
?𝑃
(?) =
1
0.01?+1
Figure 7: Bode plot and phase diagram of the lowpass filter when ω
cf
= 100 rads/s
As can be observed in Figure 3, the slope of the bode plot is -20 dB/decade. The
magnitude of the plot approaches -60 dB with a phase angle of -90
o
. The -3 dB cutoff
frequency has a phase angle of roughly -45
o
.
4.3.3: Simulating the PD controlled inverted pendulum
Figure 8: variation of Θ
o
(t) when Θ = 5
॰
Figure 9: variation of Θ
o
(t) when Θ = -30
॰
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Figure 10: variation of Θ
o
(t) when Θ = 65
॰
Figure 11: variation of Θ
o
(t) when Θ = 75
॰
In your report you should include plots of the angle Θ
o
(t) of the inverted pendulum. For each
plot, describe what is happening in the physical system to the inverted pendulum.
Does the PD controller fail to keep the pendulum inverted in any of the cases? If so, discuss
why this might happen.
In the cases where the starting angles were 65
॰
and 75
॰
the PD controller failed to keep the
pendulum inverted and they showed overdamped behavior as can be observed in Figure 10 and
Figure 11. The system fails to stabilize, and this is caused by the large starting angle. As for the
two cases where the starting angle is 5
॰
and -30
॰
, we can observe the underdamped behavior
with the small overshooting present in the response curves as observed in Figure 8 and Figure
9. Both of these cases are able to stabilize within 25 seconds.
4.4: Additional questions
1.
What if the reference angle
Θ
r
is set to something other than zero? Will the
closed-loop system keep the pendulum at that angle? Try it for a few small angles Θ
r
before coming to a conclusion.
The closed-loop system can only keep the pendulum at the reference angle if it's close
enough to 0. This is because when the system reaches the reference angle it stops trying to
balance the pendulum, since the reference angle is not vertical for non-zero values the mass
of the pendulum would then push it down. This process would repeat indefinitely as the
system attempts to stabilize the pendulum's position. Thus we can conclude in order to have a
balanced system the reference angle would either have to be 0 or very close to 0.
2.
How many initial conditions should exist for Eq. 13 and what is the purpose for each
initial condition? Are there any initial conditions missing in the realization shown in Fig.
10? Are any of the initial conditions assumed to be zero in Fig. 10?
There should be two initial conditions for Eq. 13 in the lab manual. The first is the starting
angle of the pendulum, Θ
o
. The other initial condition which is missing in the realization of Fig.
10 is the initial angular velocity,Θ
o
’. In the implementation of Fig. 10 the initial angular velocity
is assumed to be 0 as it is not being accounted for.
5: Conclusion
In conclusion, we modeled an inverted pendulum system in MATLAB and Simulink. The
inverted pendulum was tested before(open-loop) and after(closed-loop) the addition of a
lowpass filter to introduce closed-loop control into the system to observe the effect it has
on the ability of the system to stabilize based on varying starting angles. As was
observed in Figure 10 and Figure 11, if the starting angle was too large the closed-loop
system would fail to stabilize.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Documents
Related Questions
dont do the simscape piece
arrow_forward
Part a and b
arrow_forward
Please solve the following WITHOUT the use of AI. Do not run the prompt through chatgpt. Using MATLAB for the required question, solve the problems. Thank you!
arrow_forward
Question 4
a) A control engineer has modelled the suspension system of a new model car using a 2nd order differential
equation. Using Laplace Transform, the engineer has managed to work out the transfer function, which is given
below:
0.001
s2 + 12s+81
What is the natural frequency, the damping ratio and the constant K of the system? Please show all calculations.
b) The same engineer has studied the suspension system of a SUV vehicle and modelled it using again a 2nd order
differential equation, which has resulted into the following 2nd order transfer function:
Y(s)
32
U(s) 4s² +8s + 16
For this system first calculate the damping ratio and its natural frequency and state whether the system is
underdamped, overdamped or critically damped. Then calculate the peak time, peak value, settling time and
damped natural frequency of the system.
arrow_forward
a) Suspension system of a car. Finding the transfer function F₁(s) = Y(s)/R(t) and F₂ (s) = Q(s)/R(t),
consider the initial conditions equal to zero.
car chassis
www
K₂
M₂
1
Tire M₁
K₁
B₁
y(t)= output
q(t)
r(t)= input
Where [r, q, y] are positions, [k1, k2] are spring constants. [B₁] coefficient of viscous friction, [M₁, M₂]
masses.
b) Find the answer in time q(t) of the previous system. With the following Ns values: M₁ = 1 kg, M₂ = 0 kg,
k₁ = 4 N/m, k₂ = 0 N/m, B₁. = 1 Ns/m, considered m a unit step input, that is, U(s) = 1/s
arrow_forward
Rotational Mechanical System: Find the transfer function for each rotational mechanicalnetwork shown below
arrow_forward
use LMTD for part a and b
arrow_forward
Example 1.1 Figure 1.5 shows the block diagram of a closed-loop flow control system. Identify the following elements: (a) the sensor, (b) the transducer, (c) the actuator, (d) the transmitter, (e) the controller, (f) the manipulated variable, and (g) the measured variable.
In the figure above, the (a) sensor is labeled as the pressure cell. The (b) transducer is labeled as the converter. However, there are two converters: one for converting pressure to current, and another converting current to pressure for operating the actuator. The (c) actuator is labeled as the pneumatic valve. The (d) transmitter is labeled as the line driver. The (e) controller is labeled as the PLC. The (f) manipulated variable is labeled as the pressure developed by the fluid flowing through the orifice plate. The (g) measured variable is the flow rate of the liquid.
arrow_forward
Solve the following problems using MATLAB. Ensure answers are accurate and well explained so that I may learn how to solve the problems. Dont use AI please. Thank You!
arrow_forward
Hints: Find the closed loop transfer function and then plot the step response for diFerentvalues of K in MATLAB. Show step response plot for different values of K.
Auto Controls
Show solutions and provide matlab code
NO COPIED ANSWERS OR WILL REPORT!!!!
arrow_forward
Please code in Python
arrow_forward
Please solve the following by hand and without the use of AI. Thank you!
arrow_forward
In this problem, you will have to first create a Python function called twobody_dynamics_first_order_EoMS. Given a time t and a
state vector X, this function will return the derivatives of the state vector. Mathematically, this means you are computing X using
some dynamics equation X = f(t, X).
Once you have this function in Python, you can solve the differential equations it contains by using solve_ivp. The command will be
similar to, but not necessarily exactly, what is shown below:
solve_ivp(simple_pendulum_first_order_EoMS, t_span, initial_conditions, args=constants, rtol
1e-8,
atol 1e-8)
which integrates the differential equations of motion to give us solutions to the states (i.e., position and velocity of a satellite). In the
above, t_span contains the initial time to and final time tƒ and it will compute the solution at every instant of time (you will define this
later in Problem 1.3 below).
The integration is done with initial state vector Xo which defines the initial position…
arrow_forward
Using a "for loop" in MATLAB program to obtain the unit-step response of thissystem for the following four cases in a single plot
What can you observe from the plot?
Auto Controls
Provide matlab code
arrow_forward
Please solve this exercise found in NISE, control engineering book.
Please solve this using the translational mechanical system transfer fucntion method and kindly explain as well since this is an exercise to master the topic. Thank you very much!
arrow_forward
The
Gilles & Retzbach model of a distillation column, the system model includes the dynamics of a boiler, is driven by the inputs of steam flow and
the flow rate of the vapour side stream, and the measurements are the temperature changes at two different locations along the column. The state
space model is given by:
x =
0 00
-30.3
0.00012 -6.02 0 0
0 -3.77 00
0
-2.80 0 0
Is the system?:
a. unstable
b.
C.
not unstable
x+
6.15
0
0
0
0
3.04
0 0.052
not asymptotically stable
d. asymptotically stable
-1
u y =
0
0
0
0
-7.3
0
0
-25.0
X
arrow_forward
Needs Complete typed solution with 100 % accuracy. Otherwise skip if you can't give complete solution don't use chat gpt or ai i definitely upvote you.
arrow_forward
The arm angle, e (t), is controlled by a closed-loop system. The input (reference) to the system
is the desired angle, and the output is the actual angle. A controller uses the difference
between the desired angle and the actual angle to drive the motor, resulting in a motor torque
applied to the system.
motor
torque(t)
houlder joint
damping(B)
The customer wants to make a system to have
1) O steady-state error
2) Less than 10% overshoot
3) Less than 1-
For a step inp
**ling time
Arm length (/)
Mass(m)
g
design a controller to meet the design spec above.
1) Design a controller to meet the design spec.
2) Evaluate your controller using step response (time response)
3) Evaluate your closed-loop system using frequency response (e.g., Bandwidth,
Gain margin. Phase margin).
arrow_forward
Q2
The position of an elevator h(s) is controlled by means of lifting cables. A feedback
control system is used to control the force applied by the cables to the elevator. The
transfer function of the plant is,
1
Gp(s) =
Controller
Elevator
hr(s)
h(s)
E(s)
G.(s)
GP(s)
A unit step input is provided. If only proportional control is used, show that the
position of the elevator oscillates about the reference value of 1. Find the period
(a)
of this oscillation.
(b)
Show that the addition of derivative action to the system can ensure a non-
oscillatory response. Find a relation between the derivative and proportional
gains that ensures the response is non-oscillatory.
(c)
When the proportional and derivative gains are set to Kp = 9 and Kd = 6,
respectively, find the damping ratio and natural frequency of the system. Derive
the time-domain response of the elevator for a unit step input and confirm that
it is not oscillatory.
arrow_forward
Hints: Find the closed loop transfer function and then plot the step response for diFerentvalues of K in MATLAB. Show step response plot for different values of K.
Auto Controls
Show solutions and provide matlab code
NO COPIED ANSWERS OR WILL REPORT!!!!
Use own solution
arrow_forward
Rotational Mechanical System: Find the transfer function for each rotational mechanicalnetwork shown below.
arrow_forward
Hi, I could use some help with the following problems for controls. I am trying to get this to work, but I keep getting stuck. I'm trying to review some problems for an upcoming test by using some online resources.
arrow_forward
1) a) Derive the mathematical model for the system shown below.
b) Find a state variable model (matrix form) for the system.
b) Determine state matrix, input matrix, and output matrix, when f (t) is defined as
the input and X2 is defined as output for the system.
(Here, both of the X1 and x2 , are time-dependent functions)
» f(t)
X1
X2
3,000 N
1,000 N
4,000
30 kg
20 kg
200 유
N.s
arrow_forward
You are given a linear resonant actuator used for haptic vibration cues in phones - a device that might produce the
vibration that happens when you get a notification. A basic model is shown on the left. For this problem, you'll
need to derive the EOMS for the system (it will be a second order system) and then put it into a number of different
system representation forms.
Your tasks:
karm
Carm
• I1 = Act
• X2 = *1
• I3 = IP
Actuator electromagnetic force
Fact
• I4 = 3
• U = FAct
mp
Fact
kact
Cact
Xp
mact
Xact
CHALOS
CURRENT
CONDUCTING
PRECISION MICRODRIVES
PRECISION HAPTIC™
NOVING MASS
No 8
NEOUTMUN FLOCCUT
BAGNET
0:0
AND VOICECORIS
Z-AXIS LINEAR RESONANT ACTUATOR
Credit Precision Microdrives. Ltd.
FLYING LEADS
FLEX CIRCENT
NEOUT
MALAET
SELFDESVE
CASA
VERATING BASS
ASSEMBLY
A. Using Newton's Laws of Motion, derive equations of motion for the system using the variable names given
in the figure on the left…
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you

Elements Of Electromagnetics
Mechanical Engineering
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Oxford University Press

Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:9780134319650
Author:Russell C. Hibbeler
Publisher:PEARSON

Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:9781259822674
Author:Yunus A. Cengel Dr., Michael A. Boles
Publisher:McGraw-Hill Education

Control Systems Engineering
Mechanical Engineering
ISBN:9781118170519
Author:Norman S. Nise
Publisher:WILEY

Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:9781337093347
Author:Barry J. Goodno, James M. Gere
Publisher:Cengage Learning

Engineering Mechanics: Statics
Mechanical Engineering
ISBN:9781118807330
Author:James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:WILEY
Related Questions
- Question 4 a) A control engineer has modelled the suspension system of a new model car using a 2nd order differential equation. Using Laplace Transform, the engineer has managed to work out the transfer function, which is given below: 0.001 s2 + 12s+81 What is the natural frequency, the damping ratio and the constant K of the system? Please show all calculations. b) The same engineer has studied the suspension system of a SUV vehicle and modelled it using again a 2nd order differential equation, which has resulted into the following 2nd order transfer function: Y(s) 32 U(s) 4s² +8s + 16 For this system first calculate the damping ratio and its natural frequency and state whether the system is underdamped, overdamped or critically damped. Then calculate the peak time, peak value, settling time and damped natural frequency of the system.arrow_forwarda) Suspension system of a car. Finding the transfer function F₁(s) = Y(s)/R(t) and F₂ (s) = Q(s)/R(t), consider the initial conditions equal to zero. car chassis www K₂ M₂ 1 Tire M₁ K₁ B₁ y(t)= output q(t) r(t)= input Where [r, q, y] are positions, [k1, k2] are spring constants. [B₁] coefficient of viscous friction, [M₁, M₂] masses. b) Find the answer in time q(t) of the previous system. With the following Ns values: M₁ = 1 kg, M₂ = 0 kg, k₁ = 4 N/m, k₂ = 0 N/m, B₁. = 1 Ns/m, considered m a unit step input, that is, U(s) = 1/sarrow_forwardRotational Mechanical System: Find the transfer function for each rotational mechanicalnetwork shown belowarrow_forward
- use LMTD for part a and barrow_forwardExample 1.1 Figure 1.5 shows the block diagram of a closed-loop flow control system. Identify the following elements: (a) the sensor, (b) the transducer, (c) the actuator, (d) the transmitter, (e) the controller, (f) the manipulated variable, and (g) the measured variable. In the figure above, the (a) sensor is labeled as the pressure cell. The (b) transducer is labeled as the converter. However, there are two converters: one for converting pressure to current, and another converting current to pressure for operating the actuator. The (c) actuator is labeled as the pneumatic valve. The (d) transmitter is labeled as the line driver. The (e) controller is labeled as the PLC. The (f) manipulated variable is labeled as the pressure developed by the fluid flowing through the orifice plate. The (g) measured variable is the flow rate of the liquid.arrow_forwardSolve the following problems using MATLAB. Ensure answers are accurate and well explained so that I may learn how to solve the problems. Dont use AI please. Thank You!arrow_forward
- Hints: Find the closed loop transfer function and then plot the step response for diFerentvalues of K in MATLAB. Show step response plot for different values of K. Auto Controls Show solutions and provide matlab code NO COPIED ANSWERS OR WILL REPORT!!!!arrow_forwardPlease code in Pythonarrow_forwardPlease solve the following by hand and without the use of AI. Thank you!arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Elements Of ElectromagneticsMechanical EngineeringISBN:9780190698614Author:Sadiku, Matthew N. O.Publisher:Oxford University PressMechanics of Materials (10th Edition)Mechanical EngineeringISBN:9780134319650Author:Russell C. HibbelerPublisher:PEARSONThermodynamics: An Engineering ApproachMechanical EngineeringISBN:9781259822674Author:Yunus A. Cengel Dr., Michael A. BolesPublisher:McGraw-Hill Education
- Control Systems EngineeringMechanical EngineeringISBN:9781118170519Author:Norman S. NisePublisher:WILEYMechanics of Materials (MindTap Course List)Mechanical EngineeringISBN:9781337093347Author:Barry J. Goodno, James M. GerePublisher:Cengage LearningEngineering Mechanics: StaticsMechanical EngineeringISBN:9781118807330Author:James L. Meriam, L. G. Kraige, J. N. BoltonPublisher:WILEY

Elements Of Electromagnetics
Mechanical Engineering
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Oxford University Press

Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:9780134319650
Author:Russell C. Hibbeler
Publisher:PEARSON

Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:9781259822674
Author:Yunus A. Cengel Dr., Michael A. Boles
Publisher:McGraw-Hill Education

Control Systems Engineering
Mechanical Engineering
ISBN:9781118170519
Author:Norman S. Nise
Publisher:WILEY

Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:9781337093347
Author:Barry J. Goodno, James M. Gere
Publisher:Cengage Learning

Engineering Mechanics: Statics
Mechanical Engineering
ISBN:9781118807330
Author:James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:WILEY