0 ratings0% found this document useful (0 votes) 52 views20 pages1.tutorial Inverted Pendulum in Simulink Modeling
tutorial inverted pendulum in simulink modeling
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
arror2019
‘tm [Link] edu TMStindex php?examel
Control Tutorials for MATLAB and Simulink Inverted Pendulum: Simuliok Modeling
Tips | || Effects (| [ Search Control Tutorials
Wi
Sie a
intropucrion | cr
mor Inverted Pendulum: Simulink
¥ Modeling
» Related
Tutorial
Links
+ Simulink
FREQUENCY
Basics
+ Modeling
DIGITAL wi Simulink
+ Pendulum
acti
simuuINk << uy
° Related
External
CONTROL Links
+ Simulink
Intro Video
+ Simscape
Pendulum
Example
+ Modeling
Challenges
Video
Contents
1 Physical sotup and system equations
lnvertedPendulum§ion=SimulnkModeling
‘v20arror2019 Control Tutorials for MATLAB and Simulink Inverted Pendulum: Simuliok Modeling
‘tm [Link] edu TMStindex php?examel
+ Building the nonlinear model with Simulink
+ Building the nonlinear model with Simscape
1 Generating the open-loop response
+ Extracting a linear model from the simulation
In this page we outline how to build a model of our inverted pendulum system
for the purposes of simulation using Simulink and its add-ons. A great
advantage of simulation, as wil be demonstrated in this example, is that it can
generate numerical solutions to nonlinear equations for which closed-form
solutions cannot be generated. The nontinear simulation can then be employed
to test tho validity of alinoarized version ofthe model. The simulation model can
also be used to evaluate the performance ofthe control scheme designed based
fn the linearized model.
Physical setup and system equations
In this example we will consider 2 two-dimensional version of the inverted
Pendulum system with cart where the pendulum is constrained to move in the
vertical plane shown in the figure below. For this system, the control input is the
force J" that moves the cart horizontally and the outputs are the angular position
of the pendulum 9 and the horizontal position ofthe cart 2
For this example, le’s assume the following quantities:
m nass of the cart, 0.5 ke
InvetedPendulumésection=SimuinkModaing
2020arror2019 Control Tutorials for MATLAB and Simulink Inverted Pendulum: Simuliok Modeling
‘tm [Link] edu TMStindex php?examel
() nass of the pendulum 0.2 ke
(b) coefficient of friction for cart 0.1 N/m/sec
a Length to pendulun center of mass eam
o ass moment of inertia of the pendulum 0.006 kg.n"2
w force applied to the cart
w cart position coordinate
(theta) pendulum angle from vertical (down)
Below are the two free-body diagrams of the system.
This system is challenging to model in Simulink because of the physical
constraint (te pin joint) between the cart and pendulum which reduces the
degrees of freedom in the system. Both the cart and the pendulum have one
dogroe of froodom (i and 9, respectively). We will genorate tho differential
equations for these degrees of freedom from frst principles employing Newton's
second law (F = ma) as shown below.
a)
(2)
InvetedPendulumésection=SimuinkModaing
20arrora01g
‘tm [Link] edu TMStindex php?examel
Control Tutorials for MATLAB and Simutnk- Invetes Pendulum: Simulink Modeting
Itis necessary, however, to include the interaction forces JV and P between the
cart and the pendulum in order to fully model the system's dynamics. The
inclusion of these forces requires modeling the = and Y/-components of the
translation of the pendulum’'s center of mass in addition to its rotational
dynamics. In the Inverted Pendulum: System Modeling tutorial, the Interaction
forces NV and P were solved for algebraically.
In general, we would like to exploit the modeling power of Simulink to take care
of the algebra for us. Therefore, we will model the additional #- and Y-
‘component equations for the pendulum as shown below.
nip= > i= @)
(«)
)
> P=mlip tg ©
However, the position coordinates y and Up are exact functions of 9. Therefore,
‘we can represent their derivatives in terms of the derivatives of 0. First
addressing the -component equations we arive atthe following
+ Usiné ”
i+ 10cos6 ®
¥, = # — 16" sin6 + Wcos6 °
Then addressing the J/-component equations gives us the following
Up = —lo0s 6 (10)
ip = Using ay
tip = 1 cos 0 + 1 sin 6 (12)
These expressions can then be substituted into the expressions for N’ and P-
‘rom above as follows.
m(i 16? sin + licos0) (13)
P=mi(l
056 + liisin 9 + 9) 4)
InvetedPendulumésection=SimuinkModaing
4120arror2019 Control Tutorials for MATLAB and Simulink Inverted Pendulum: Simuliok Modeling
‘tm [Link] edu TMStindex php?examel
We can now represent these equations within Simulink. Simulink can work
directly with nonlinear equations, so it is unnecessary to linearize these
equations as was done in the Inverted Pendulum: System Modeling page.
ing the nonlinear model with Simulink
We can build the inverted pendulum model in Simulink employing the equations
derived above by following the steps given below.
+ Bogin by typing simulink into the MATLAB command window to open the
‘Simulink environment. Then open a new model window in Simulink by
‘choosing New > Simulink > Blank Model of tne open Simulink Start Page
window or by pressing Ctr-N.
+ Insert four Fen Blocks from the Simulink/User-Defined Functions library. We
will ld the equations for, j, P, and NV employing these blocks.
' Change the label of each Fen block to match its associated function.
+ Insert four Integrator blocks from the Simulink/Continuous library. The
‘output of each Integrator block is going to be a state variable of the system:
, #0, and 9.
+ Double-click on each Integrator block to add the State Name: of the
associated state variable. See the following figure for an example. Also
change the Initial condition: for @ (pendulum angle) to "
that the pendulum begins pointing straig
Bal tock Parameters: integrator’
Integrator
Continuous-time integration of the Input signal.
External reset: none -
Initial condition source: Internal .
Initial conaiton:
Limit output
weap stare
‘show saturation port
Eo show state port
Absolute tolerance:
5 ignore timit and reset when tinearizing
Enable zero-crossing detection
State Name: (e.g, ‘position’)
[theta
° Goneei [Help| Apoiy
InvetedPendulumésection=SimuinkModaing
5120arrora01g
‘tm [Link] edu TMStindex php?examel
Control Tutorials for MATLAB and Simulink Inverted Pendulum: Simuliok Modeling
+ Insert four Multiplexer (Mux) blocks from the Simulink/Signal Routing library,
‘one for each Fen block.
Inert two Out blocks and one Int black from the Simulink/Sinks and
‘Simulink’Sources libraries, respectively. Then double-click on the labels for
the blocks to change their names. The two outputs are forthe "Posttion® of
the cart and the "Angle" of the pendulum, while the one input is for the
“Force” applied tothe cart
+ Connect each output of the Mux blocks to the input of the corresponding
Fen block.
+ Connect the output of the ay and @ Fon blocks to two consecutive
integrators to generate the cart's position and the pendulum's angle. Your
‘current model should now appear as follows.
a8 H@-B- 4D © Fb) mee
Now we will enter each of the four equations (1), (2), (13), and (14) into a Fen
block. Let's start with equation (1) which is repeated below.
1 1
eel yn-ty_n_-e (15)
BLEW yes
1 This equation requires three inputs: u(1) = F, u(2) = N, and u(3) =
Double-click on the corresponding Mux block and change the Number of
inputs: to "3"
+ Connect these three inputs to this Mux block in the order prescribed in the
previous step.
InvetedPendulumésection=SimuinkModaing
620arror2019
Control Tutorials for MATLAB and Simulink Inverted Pendulum: Simuliok Modeling
+ Double-click on the first Fen block and enter the equation for xddot as
shown below.
Bal Block Parameters: xddot mI
Fen
General expression block, Use *u" asthe input variable name,
Example: sin(u(1)*exp(2.3*(-u(2))))
Parameters: |
Expression:
(Umut) - ue) - brut)
°
0K Cancel | Help | Apply
Nowy let's enter equation (2) which is repeated below.
F{Nleose — Plsind) (18)
+ This equation also requires three inputs: 1u(1) =
u(3) = 6.
u(2) = P, and
+ Enter the above equation into the Fen block, change the number of inputs of
the Mux black, and connect the correct signals to the Mux block in the
correct order.
+ Repeat this process for equations (13) and (14) repeated below.
N
m(i — 16? sin + lbcos8) 7)
P = (16? cos + isin + g) (18)
‘When all of these steps are completed, the resulting model should appear as
follows
‘tm [Link] php?example=InveredPendulum§ion=SimulinkModeling
7120arror2019 Control Tutorials for MATLAB and Simulink Inverted Pendulum: Simullok Modeling
‘tm [Link] edu TMStindex php?examel
a-o-8 EO -4O > © De ba) ree
[eae
In order to save al ofthese components as a single subsystem block, fst select
allof the blocks, than select Greate Subsystem from Selection from the menu
ator right-clicking on the selected portion. Your model should appear as follows.
‘You can also download the file for this system by right-clicking here and then
selecting Save link as
2-2-8 HE @-B-5 4D be) mee oa,
1
a
2 2
=
ing the nonlinear model with Simscape
In this section, we altematively show how to build the inverted pendulum mode!
Using the physical modeling blocks of the Simscape extension to Simulink. The
lnvertedPendulum§ion=SimulnkModeling
120arror2019 Control Tutorials for MATLAB and Simulink Inverted Pendulum: Simuliok Modeling
‘tm [Link] edu TMStindex php?examel
blocks in the Simscape library represent actual physical components; therefore,
complex mult-body dynamic models can be built without the need to build
‘mathematical equations from physical principles as was done above by applying
Newton's laws.
(pen a new Simulink mode! and follow the steps below to create the inverted
Pendulum model in Simscape. In order to orient oneself, we will assume a
coordinate system where the cart moves in the direction (positive to the right)
and the positive Y-irection is diracted up. Following standard convention, the
positive *-direction is then pointed out of the plane of motion.
+ Inset @ Body block from the _Simscape/Multibody/First
‘Goneration(16)Bodies library to represent tho cart. Folowing the systom
parameters given atthe top ofthis page, double-click on the block and set
the Mass: to "0.5" with units of kg. The Body block by dafault includes two
ports. Since we need ports to define where the pendulum is connected to
the cart and where the extemal force and the frictional force are appliag, a
third port must be added. This can be accomplished trom the button on the
right-side of the Position tab. Sinco the cart will only move in one
dimension, the two forces must be co-located along that dimension (the &
iection) Since we are in essence modeling the cart as a point mass that
‘can only translate, you do not have to change any of the other default
parameters. However, we plan to use Simscape to animate the motion of
the system and hence will create addtional ports to define the four comers
‘of tho cart (2-dimensional only) with respect to its center of gravity (C6). The
following figure shows a possible definition of the cart body.
InvetedPendulumésection=SimuinkModaing
120arror2019 Control Tutorials for MATLAB and Simulink Inverted Pendulum: Simullok Modeling
oy
ements werd gba Baty fy a nia ten al dee gh ae
‘Site gy Co). ter tape ery Carta tee Th sas ry pan
retin ss i pcan anise oad sett, Ts oy as oes ote gS
facto boy geomet eo ca
ss poetes
wt (95 8
neta: (5) nea
Stow FOE ggg Ont Pactton yay Fansiatedtrom Components in
Sot Sie ctor fy) agi at ae
1 ce gon hee Wor
2 ut ccs fom = 0s Fos A 5
2 ur scr ony mn ve0 :
2 gt css (ose ere ve
me sce peso) m6 7e i
mt cs c1ese, ne oe
Te oe p050) ne “ee
1 mt = cs7 (050) mes
(a [ores] nee aa
+ Insert a second Body block to represent the pendulum. Double-click on the
block and set the Mass: to "0.2" with units of kg. Since the pendulum can
conly rotate about the
axis, the inertia associated with that principle
direction is the only one that needs to be defined. For simplicity, define the
Inertia: equal to "0.006eye(3)" with units of kg*m2. Since we are
modeling the pendulum as a rigid body that has size as well as mass, the
body can rotate and itis important to define the location of the pendulum's.
attachment to the cart and its CG correctly. Specifcaly, define the point of
altachment ¢51 to have a postion "[0 0 OJ" and an origin that is Adjoining
and define the C6 to be 0.3 meters away from the attachment ¢S1 (as
defined above). Also define the four comers of the pendulum. Make sure to
show the port defining the attachment point. Under the Visualization tab,
you can also change the pendulum's color to make it stand out from the
cart
‘ctms [Link] php?example=InveredPandulum§ion=SimulinkModeling 1020arror2019 Control Tutorials for MATLAB and Simulink lnvertes Pendulum: Simullok Modeling
‘tm [Link] edu TMStindex php?examel
ements gi ty By feb rey reste re coord ad mf
‘Sto gam (a) a he crazed soy ora ce Te ag et ey npn and
nti, Si nt ted ba ech septs Ts da eo poss cra hs
fact nd roma os co
ss pees
nena: 0m RI) awe
Shor ot age OMMFONIOD gy Tamboadtom —corperensin
ror Soe Yor ‘uginat "mor
O Fe pose ee a 7
Bee (eo) mn Alig Sine
fa: | Seen mses ss =|
age ess oro) mst vet ox
awe s+ arose mc +c SI ex
1 pt =c35 foneael mest ot
(a [rer ase | aw
+ Next add a Revolute block from the Simscape/Mulibody/First
Generation(16VJjoints library to define the joint connecting the pendulum to
the cart. By default, the joint wil be defined to rotate about the z-axis which
matches the situation we are modeling. Connect the Body block
corresponding to the cart to the base port (8) of the joint and the Body block
Corresponding to the pendulum to the follower port (F) of the joint. Double-
lick on the Revolute block and set the Number of sensor / actuator
ports: to
+ Then add a Joint Initial Concition block and a Joint Sensor block from the
‘Simscape/Mulibody/First Generation(1G)'Sensors & Actuators library and
‘connect these blocks to the Revolute block. Double-click an the Joint Initial
Condition block and check the Enable box. We can use the default values
{or intial position and velocity of the joint. Employing an intial postion of 0
degrees corresponds to the pendulum being pointed vertically upward
based on the definition of the pendulum body above. This isn't consistent
with the original definition of @, but it will make the response results
consistent with those generated from the linearized model in the other
pages of this example. Next double-click on the Joint Sensor block and
‘change the units on the Angle measurement to rad. Angular position is the
‘only measurement that is needed for this joint, the other boxes may remain
unchecked
+ Add two Prismatic blocks from the Simscape/Multibody/First
Generation(16)Joints library to define the translational degree of freedom
InvetedPendulumésection=SimuinkModaing
120arrora01g
cts [Link] eduiCTM'Stindex php?example=invertedPerdulum&sactior
onto! Tuoi for MATLAS and Simulink Invetes Peneuum: Simulnk Modeling
‘of the cart and the application of the forces to the cart. Since the cart is
technicaly @ point mass we need only one Prismatic block, but by
‘employing two we can apply the forces at diferent locations. Double-click
‘on each Prismatic block and change the Axis of Action to "[1 0 Of" to
reflect the fact that the two forces actin the ®direction. Then connect the
follower port (F) of each block to the ports for the applied force (CS4) and
{retional force (C52) on the Body block representing the cart.
+ Next add two Ground blocks from the Simscape/Mulbody/First
Generation(1@)Bodies library to define the base for the mation of the car.
‘Specifically, connect the output of each ground block to the base por (6) of
‘each Prismatio block.
+ For one of the Ground blocks you just created, double-click on the block
‘and check the Show Machine Environment port box. Then add a Machine
Environment block from ~—the-—_‘Simscape/Multbody/First
‘Goneration(1@)Bodies Ibrary and connect i to the Ground block for which
you just added the port. The Machine Environment block allows us to define
the gravitational force in the simulation. In this case the dafault drction
{negative Y-diection) and magnitude ("9.81") for units of w/s*2 are correct
This block also allows us to define the parameters for visualization and the
numerical solver. The default parameters are fine fr this example.
+ Next add two Joint Actuator blocks and one Joint Sensor block from
‘SimscapelMulibody/First Generation(1GySensors & Actuators library. The
Joint Actuator blocks will be employed for generating the external applied
force and the frictional force, while the Joint Sensor block wil sense the
motion of the cart Note, there is also a Translational Friction block that is
available, but we will calculate the frictional force ourselves since we are
‘employing only a simple viscous model. Double-click on one of the
Prismatic blocks and set the Number of sensor / actuator ports: to "1" (for
the force actuator). For the other Prismatic block, set the Number of
sensor / actuator ports: fo "2" (one for the force actuator and one forthe
cart sensor). Then connect the Joint Actuator and Joint Sensor blocks as
scribed. The default values for the Joint Actuator blocks are sufficient for
this case, but we must change the Joint Sensor block to output postion and
velocity since the velocity is needed for calculating the frictional force.
Double-click on the Joint Sansor block and check the box for Velocity while
leaving the box for Position checked. The default metric units do not need
to be changed. Also uncheck the box for Output selected parameters as
‘one signal.
imulikModeling
1220anon0%9 conto Tutorials for MATLAB and Simulink Inverted Pendulum: Simulnk Modeting
+ Add a Gain block from the SimulinklMath Operations library to represent the
viscous tition coefficient . Set the Gain to "0.1" as defined at the top of
this page and connect the input to the velocity output of the Joint Sensor
block forthe cart and connect the output ofthe gain tothe Joint Actuator for
the fitional force.
+ Next, add two Outt blocks and one Int block from the Simulink/Ports &
Subsystems library. Connect the Outt blocks to the remaining Joint Sensor
block outputs and the nt block to the remaining Joint Actuator input
+ Finally, connect and label the components as shown inthe following figuro.
You can rotate a block in a similar manner to the way you flipped blocks,
that i, by righteticking on the block then selecting Rotate Block from the
Rotate & Flip menu.
‘2-9-8 HO-B-S VOD © Ar wr mt oe"
« a)
2 EL Ls
You can also save this model as a single subsystem block as described in the
previous section. You can change the color ofthe subsystem by rght-ccking on
the block and choosing Background Color from the resuting menu. You can
download the complete model file by right-clicking here, but note that you wil
reed the Simscape addition to Simulink in order to run the file. We use this
‘mode! in the Inverted Pendulum: Simulink Controller Design page.
Generating the open-loop response
We will now simulate the response of the Inverted pendulum system to an
impulsive force applied to the cart. This simulation requires an impulse input.
‘ctms [Link] php?example=InveredPandulum§ion=SimulinkModeling 1320arror2019 Control Tutorials for MATLAB and Simulink Inverted Pendulum: Simuliok Modeling
‘tm [Link] edu TMStindex php?examel
Since there 1s no such block in the Simulink library, we will use the Pulse
Generator block to approximate a unit imputse input, We could use either of the
models we generated above, however, we will use the Simscape model in his
cease because it will alow us to visualize the motion of the inverted pendulum
system. Follow the steps given below.
+ Open the inverted pendulum simscape model generated above.
+ Add a Pulse Generator block from the Simulink/Sourees library. Double-click
‘on the block and change the parameters as shown below. In particular,
change the Period: to "10". Since we wil run our simulation for 10 seconds,
this wil ensure that only a single “pulse” is generated. Also change the
‘Amplitude to "1000" and the Pulse Width (% of period): to "0.01"
Togother, these sotings genorate a pulse that approximates a unit impulse
in thatthe magnitude of the input is very large for avery short period of time
and the area of the pulse equals 1
Ti biock Porarnctors Pulse Generator =
W(t >= PhaseDelay) 48 Pulee te on
Noo = Ampieaae
Yeo =o
rime (0: (Use simulation ume E
Period (secs)
Pulce Width (9% of period:
fooal
hase delay (sors)
2 [[3e) sence Heip apply
+ Add a Scope block from the Simulink/Sinks library.
1 In order display two inputs on the scope, right-click on the Scope block,
‘choose the Signals & Ports and change the Number of Input Ports to "2"
Connect the blocks and label the signals connected to the Scope block as
shown
InvetedPendulumésection=SimuinkModaing
14120arror2019
‘tm [Link] edu TMStindex php?examel
Control Tutorials for MATLAB and Simulink Inverted Pendulum: Simullok Modeling
2-3-8 BOe-S-e4on fom
a
to =a
Save this system as Pend_Openloop.six, or download by right-clicking here and
selecting Save link as
Bofore wo slat the simulation, we would Ike to enable the visualization of the
inverted pendulum system. From the menus at the top of the model window
choose Simulation > Model Configuration Parameters. Then ftom the
directory on the left-side ofthe window choose Simscape Multibody 16. Then
check the box for Show animation during simulation as shown in the figure
below.
8 cages econ Oa
eencn
ee ans
Shaper
eM Pt cee (28) ong es
[Doty nin str ety om
vino (808)
Now, start the simulation (select Run from the Simulation menu or enter Ctrl-
T). As the simulation runs, an animation of the inverted pendulum like the one
lnvertedPendulum§ion=SimulnkModeling
1520anono1e
‘tm [Link] edu TMStindex php?examel
Control Tutorials for MATLAB and Simulink Inverted Pendulum: Simuliok Modeling
shown below will visualize the system's resulting motion,
F Pend Opeloos
Boneseaek oe PRS
oAB
eS
Then open the Scope. You will see the following output for the pendulum angle
and the cart position.
3
InvetedPendulumésection=SimuinkModaing
1620arrora01g
‘tm [Link] edu TMStindex php?examel
Control Tutorials for MATLAB and Simutnk- Invetes Pendulum: Simulink Modeting
Notice that the pendulum repeatedly swings through fll revolutions where the
angle rols over at tx radians. Furthermore, the car's position grows
unbounded, but oscillates under the influence ofthe swinging pendulum. These
results dfer quite abit rom the results ofthe open-loop simulation shown in the
Inverted Pendulum: System Analysis page. This is due of course to the fact that
this simulation employed a fully nonlinear model, while the previous analysis
had relied on a linear approximation ofthe inverted pendulum model. In order to
compare the results of the simulation model more directly tothe prior resuls, we
will extract a linear model from our simulation model
Extracting a linear model from the simulation
Aside from comparing our simulation model to our prior results, it may also be
desirable to extract a linear model for the purposes of analys's and design
Much of the analytical techniques that are commonly applied to the analysis of
dynamic systoms and the design oftheir associated control can only be applied
to linear models. Therefore, it may be desirable to extract an approximate linear
‘model from the norlinear simulation model. We will accomplish tis from within
Simulink
+ To begin, open either of the Simuink models generated above,
Pend_Madel sk or Pend_Model_Simscape.six
+ Ifyou generated your simulation model using variables, it is necessary to
define the physical constants in the MATLAB workspace before performing
the linearization. This can be accomplished by entering the following
‘commands in the MATLAB command window.
We 0.55
m= 0.25
bot
1 = 8.006;
B= 9.8;
1s 0.35
+ Next choose from the menus at the top of the model window Analysis >
Control Design > Linear Analysis. This will cause tho Linear Analysis,
Too! window to open.
+ In order to perform our linearization, we need to first ident the inputs and
‘outputs for the model and the operating point that we wish to perform the
InvetedPendulumésection=SimuinkModaing
720arrora01g
cts [Link] eduiCTM'Stindex php?example=invertedPerdulum&sactior
Control Tutorials for MATLAB and Simulink Inverted Pendulum: Simuliok Modeling
linearization about. Fist right-click on the signal representing the Force
input in the Simulink’Simscape model. Then choose Linear Analysis
Points > Open-loop Input from the resulting menu. Similaly, right-click on
‘each of the two output signals of the model (pendulum angle and cart
postion) and select Linear Analysis Points > Open-toop Output from the
resuting menu in each case, The resulting inputs and outputs should now
be identified on your madel by arrow symbols as shown in the figure below.
ao o-B-S4o0 eo @-|ia-
a
+ Noxt we need to ideniy the operating point tobe linearized about. From the
‘Operating Point: menu choose Trim Mode! as shown in the figure below.
‘This will open the Trim the model window. Within this window, select the
‘Start trimming button indicated by the green triangle. This will create the
‘operating point op_teina
+ Since we wish to examine the impulse response of this system, retur tothe
LINEAR ANALYSIS tab and choose Impulse as shown in the figure below.
imulikModeling
1820arror2019
‘tm [Link] edu TMStindex php?examel
Control Tutorials for MATLAB and Simulink Inverted Pendulum: Simulink Modeling
| Amarin Red bon =o x
a
+ Finally, choose op_trima from the Operating Point: drop-down menu and
lick the Impulse button indicated by the small green triangle. This
‘automaticaly generates an impulse response plot and the linearized model
Uinsyst
+ In order to compare the results to those plots generated in the Inverted
Pendulum: System Analysis page, it is necessary to change the ®axis
‘scaling. This can be achieved from by choosing Properties from the rght-
lick menu. The resulting window should then appear as follows, where the
top plot is response of the pendulum angle and the bottom plot is the
response ofthe car position.
[Anata aed Dearie neta
&
2.
3 ;
‘inert
sheen named een
lnvertedPendulum§ion=SimulnkModeling
1920arror2019 Control Tutorials for MATLAB and Simulink Inverted Pendulum: Simuliok Modeling
These plots are very similar, though not exactly the same, as those generated in
the Inverted Pendulum: System Analysis page.
We can also expor the resuiting linearized model into the MATLAB workspace
{or further analysis and design. This can be accomplished by simply right-
Clicking on the 1insyst object in the Linear Analysis Workspace to copy the
object. Then rightclick within the MATLAB Workspace to paste the object.
Putlshed with MATLAB® 0.2
65
‘ctms [Link] php?example=InveredPandulum§ion=SimulinkModeling 20120