Group-1
Experiment-12
Non linear system dynamics on Simulink for
different Lyapunov control designs
Submitted by,
Aryan Arora (2022EEB1161)
Divyanshu Sharma (2022EEB1169)
Srijan Kumar Kar (2022EEB1349)
4. Instability: The system is unstable if, for some perturbations, it
moves away from the equilibrium point 𝑥.
𝑒
Lyapunov’s Direct Method:
This method does not require solving differential equations. It uses a
Lyapunov function, typically denoted as V(x), which is a scalar function that
behaves similarly to energy.
Conditions for a Lyapunov Function:
Stability Criteria:
● If V(x) is positive definite and V’(x)≤ 0, the equilibrium is Lyapunov
stable.
● If V’(x)<0, the equilibrium is asymptotically stable.
● If V’(x) decreases exponentially, the equilibrium is exponentially
stable.
Implementing the above structure on Simulink with the
resulting differential equation given below :
Simplify the above equation and the resulting
equation we get state equation as follows :
Graph of the system state variables:
X1(position of the carriage)
Behavior: X1 represents the position or displacement of
the system. Observing a continuous rise in (X1) suggests
that the system is consistently moving in one direction.
Such behavior could be indicative of a process with a
sustained input or force that drives it in a singular
direction, such as a vehicle accelerating down a track or a
pendulum swinging outward without any significant
opposing force to alter its direction.
Interpretation: The smooth, non-oscillatory nature of the
x1 curve points to a relatively stable system. When system
variables exhibit growth without sudden fluctuations or
oscillations, it often reflects a controlled response. Such
characteristics are valuable in engineering contexts where
stability is crucial, as they imply a low likelihood of
overshooting or instability in the system's trajectory.
X2 (Speed of the carriage in meters)
Behavior: The plot exhibits a parabolic curve, where the
value rises initially, reaches a peak, and then begins to
fall. This pattern suggests a dynamic behavior in which the
system variable increases steadily at first, possibly due to
applied force, and then gradually decreases. The peak
represents the highest point, where the rate of change
shifts from positive to negative.
Interpretation: This parabolic shape could represent the
velocity or momentum of a system. Initially, as the system
accelerates, the velocity increases, but after reaching the
peak, the system begins to decelerate. This deceleration
could occur due to a change in control input, external
forces, or the natural dynamics of the system, like
oscillatory behavior. The peak could indicate the
maximum velocity achieved before forces begin to slow
the system. Such a curve is often seen in scenarios where
a system initially gains momentum or speed but later
encounters forces that reduce its forward motion, like
friction, resistance, or a decrease in driving force.
X3(Pendulum angle to the vertical, about the pivot in
rad/s):
Behavior: The variable x3 exhibits an oscillatory pattern
initially, suggesting dynamic movement around an
equilibrium. After the initial fluctuations, the system
appears to experience some form of damping or control
mechanism that gradually brings it closer to a stable
configuration, though intermittent oscillations may still
occur.
Interpretation: In pendulum initial oscillations are
common near unstable equilibrium points as the system
finds its balance. The gradual reduction in oscillations
suggests damping or control forces at work, possibly
from friction or a control feedback mechanism that
resists further deviation. These oscillations also hint at
energy exchange within the system—specifically, the
transformation between potential and kinetic energy. As
the system swings or rotates, potential energy converts
to kinetic energy and vice versa, causing fluctuations
until the system's energy is dissipated or balanced,
leading to a more stable state.
X4 (Angular speed of the pendulum about pivot in rad/s)
Behavior: The plot shows high-magnitude oscillations at first, which gradually
decrease in amplitude over time. This trend indicates that the system begins
with significant oscillatory energy but experiences damping, with smaller
oscillations persisting as it nears stability.
Interpretation: As x4 represents the pendulum's angular velocity, the initial
large oscillations reflect instability in its motion. Over time, damping forces or
control mechanisms reduce these oscillations, suggesting energy dissipation
and a gradual movement toward stability. The smaller remaining oscillations
indicate the system is close to equilibrium but not fully at rest, still balancing
energy around a stable point.
Implementing the Simulink with Lyapunov functions :
Now choosing any of the relation of the below equation and
makingdifferent types of combination as our Lyapunov of
equation
using a Lyapunov function V(x) as a combination of
potential and kinetic energies, both linear and rotary, which
are proportional to four terms.Here’s the Lyapunov function
expressed as the sum of these components:
To ensure stability, V(x) should be:
1. Positive definite: V(x)>0 for all x≠0, and V(x)=0 when x=0
2. Negative definite (or semi-definite) derivative V˙(x): This
meansV˙(x)≤0 for all x≠0
In this approach, we use various Lyapunov functions to generate an
input force for the system. Since the input force F cannot be assumed
constant, we will use the derivative of each Lyapunov energy function
with respect to x to compute the force. This implies that the input force is
directly tied to the system's energy levels, with each energy term
representing a different aspect of the system's behaviour (such as
position, velocity, angle, and angular velocity).
The force applied to the system will be a weighted combination of these
energies, where parameters A, B, C and D allow adjustment of the
influence of each energy term on the force.
A: This component of the force works to reduce the deviation of the
carriage's position from the reference position x1 – x1, ref.
B: This part of the force is related to the kinetic energy of the carriage,
depending on x2.
C: Another component of the force is based on the rotary potential
energy, which helps stabilize or control the pendulum’s angle x3.
D: The final component is associated with the rotary kinetic energy,
being proportional to the square of the angular velocity x4.
VARYING LYAPUNOV FUNCTIONS AND OBSERVING THE
OUTPUT:
A + B + C + D (Most Stable)
• A: Position of the carriage
• B: Velocity of the carriage
• C: Angle of the pendulum
• D: Angular velocity of the pendulum
Reason for Stability:
• Complete State Feedback: Controlling all four states ensures that
every dynamic aspect of the system is addressed. Both the
carriage’s position and velocity (A and B) are managed, as well as
the pendulum's angle and angular velocity (C and D).
• Interaction Between Variables: By managing both translational
(A and B) and rotational (C and D) dynamics, oscillations are
damped, and the pendulum stabilizes at θ=0. The coordination of
these variables prevents excessive movement in either the
carriage or pendulum, enhancing overall stability.
• Redundancy: Although controlling position (A) might seem
redundant in certain cases, combining it with velocity (B) and the
rotational terms (C and D) ensures all state variables are
regulated, preventing drift in the system.
K-values:
K-values for this case: (3 deg stability):
k1=1, k2=1.5, k3=2.5, k4=6.75
K-values for this case: (-3 deg stability):
k1=1, k2=1.5, k3=4.5, k4=6.75
B + C + D (Next Most Stable):
Variables Controlled:
• B: Velocity of the carriage
• C: Angle of the pendulum
• D: Angular velocity of the pendulum
Reason for Stability:
• Key Variables Controlled: This setup still covers the essential
dynamics of the system, controlling both translational (B) and
rotational (C and D) aspects.
K-values for this case:
k1=0, k2=1.6, k3=3.2, k4=1.5
• Position (A) as Redundant: The position of the carriage (A) is not
directly managed, but this does not severely impact stability. The
reason being the velocity of the carriage (B) inherently influences
the carriage's position over time. Now, if velocity is controlled well,
the position error doesn’t grow too significantly.
• High Stability: With control over both the angle (C) and angular
velocity (D) of the pendulum, the system tends to stabilize
effectively. However, it is marginally less stable than the full-state
feedback case because there is no direct position control.
B + C (Fairly Stable):
Variables Controlled:
• B: Velocity of the carriage
• C: Angle of the pendulum
Reason for Stability:
• Translational and Rotational Control: By controlling one
translational (B) and one rotational (C) variable, you achieve
indirect position control through velocity management, and the
angle (C) is regulated to keep the pendulum near vertical.
• Partial Rotational Control: The lack of angular velocity control (D)
means less damping of pendulum oscillations, causing more
frequent swings compared to configurations with B + C + D.
K-values:
• For 3° stability:
• k1=0 , k2=, k3=4 , k4=0
• Moderate Stability: The system remains relatively stable, though
less robust due to the absence of control over the angular velocity
(D). Without D, oscillations can gradually build up, reducing
stability.
C + D (Less Stable):
Variables Controlled:
• C: Angle of the pendulum
• D: Angular velocity of the pendulum
Reason for Stability:
• Full Rotational Control: While both rotational variables (C and D)
are controlled, there is no regulation over translational dynamics
(carriage position and velocity, A and B). This allows the carriage to
drift or oscillate, which destabilizes the system.
• Oscillations Over Time: Although initial stability might be
achieved by controlling the pendulum’s angle and angular velocity,
the uncontrolled carriage movement can disrupt this equilibrium,
resulting in growing oscillations.
• Long-Term Instability: Without control over translational motion,
disturbances in the carriage can lead to persistent oscillations,
making the system less stable.
K-values:
• k1=0 , k2=0 , k3=4.25, k4=3.5
5. A + D (Least Stable):
Variables Controlled:
• A: Position of the carriage
• D: Angular velocity of the pendulum
•
Reason for Instability:
• Incomplete Rotational Control: Controlling the angular velocity
(D) without managing the pendulum’s angle (C) leads to instability.
You can influence how quickly the pendulum swings but not its
actual position, resulting in poor control over its stability.
• No Velocity Control: Without controlling the carriage
velocity (B), any movement in the carriage can cause
large, unmitigated oscillations in thependulum. There’s
no feedback mechanism to correct for this, leading to
increasing instability
• Highly Unstable: Since position (A) is controlled
without velocity (B), and angle (C) is left uncontrolled,
the system becomes chaotic. Controlling onlythe
potential energy (A + D) doesn’t address the dynamic
nature of the system, making this combination the most
unstable.
• K-values for this case: k1=5, k2=0, k3=4, k4=0
EFFECTS OF CHANGING THE PARAMETERS:
To understand how changes in parameters like the mass of the
pendulum (m), mass of the carriage (M), length of the rod (L), and
horizontal damping constant (k) impact the control of an inverted
pendulum system, it’s helpful to adjust each parameter individually
while keeping the others constant. This approach allows us to
analyse the unique influence of each factor on system stability and
control.
Mass of the Pendulum (m): Increasing the mass of the pendulum
raises its inertia, making it more challenging to move and requiring
a higher control effort. Additionally, a heavier pendulum intensifies
gravitational forces acting on it, meaning the control constants may
need to be recalibrated for stability. On the other hand, a decrease
in the pendulum’s mass lowers its inertia, making it easier to
control but still requiring fine-tuning of the control constants to
maintain stable operation. Ultimately, control adjustments are
necessary to match the pendulum’s mass, ensuring the control
system can respond effectively.
Mass of the Carriage (M): When the carriage's mass is increased,
it demands more force to move, which alters the system’s
dynamics and potentially impacts stability. Conversely, a lighter
carriage requires less force to control, but it may become more
susceptible to external disturbances. To accommodate these
changes in mass, adjustments to the applied control force are
necessary, allowing the system to maintain stability despite the
differences in carriage weight.
Distance of Pendulum Centre of Gravity from the Pivot (L):
Increasing the distance from the centre of gravity to the pivot gives
the pendulum greater leverage, which increases its tendency to
become unstable and requires a stronger control response. To
counter this, control constants may need to be elevated to manage
the additional instability effectively. Conversely, reducing this
distance lowers the pendulum's leverage, making it easier to
stabilize, though it may also reduce the system’s responsiveness.
For larger distances, control constants should be tuned up to
counteract the effects of increased leverage.
Horizontal Damping Coefficient (k): Raising the damping
coefficient enhances the system’s stability by reducing oscillations,
which lowers the control effort required and improves resistance to
disturbances. Conversely, a decrease in the damping coefficient
can lead to increased oscillations and potential instability, requiring
a more aggressive control strategy. To compensate for reduced
damping, control efforts must be increased to mitigate the
instability.
Stabilizing the pendulum’s angle (x3) and angular velocity (x4)
relies on certain essential components. Component C,
representing the square of rotary potential energy, is vital for
stabilizing the pendulum’s angle (x3). Component D, representing
rotary kinetic energy, is essential for controlling the pendulum’s
angular velocity (x4).
Some components are considered redundant when focusing solely
on stabilizing x3 and x4. Component A, representing the square
of linear potential energy, influences the carriage’s position but
does not directly affect the stabilization of the pendulum’s angle or
speed. Therefore, it is redundant in this context. Similarly,
Component B, representing linear kinetic energy related to the
carriage’s velocity, does not directly contribute to stabilizing the
pendulum’s angle or angular speed, making it another redundant
factor for this specific goal.
Conclusions:
Control Combinations and Observations:
1. A, B, C, D: Position control (A) is redundant when combined with
the control of angular and velocity variables. Position is not critical
as long as the key variables (like angle and velocity) are managed
effectively.
2. B, C, D: Position (A) is not required here, as the system can still
stabilize effectively. Controlling other essential variables—such as
the pendulum angle and velocity—makes position less relevant.
3. C (Angle Control) is Essential: The pendulum angle (C) is critical
for stability and must be part of the Lyapunov control. Since the
angle is the key factor in maintaining stability, its inclusion is
necessary.
4. System Drift Over Time: Although the system can stabilize at
θ=0, it may gradually move toward other equilibrium points (e.g.,
θ=±3). Due to the non-linear nature of the system and its multiple
equilibria, the system may drift to different stable points depending
on the gain values.
5. B + C: Controlling one translational (velocity) and one rotational
(angle) variable provides reasonable stability, though it is less
robust than the full-state feedback scenarios. Better control is
achievable with full-state feedback.
6. C + D: Oscillations often emerge after the initial stabilization
period. Both C and D control rotational dynamics, resulting in high
sensitivity and potential oscillations.
7. A + C: This combination is highly unstable. Controlling only
position and angle does not sufficiently stabilize the system, as the
velocity components are left uncontrolled.
Role of Each Gain (K1, K2, K3, K4):
1. K1 (Carriage Position Control): K1 helps regulate force when the
carriage is far from the desired position, but it doesn’t play a
significant role in most combinations, like A, B, D or B, C, D.
2. K2 (Carriage Velocity Control): A high K2 value can lead to
oscillations. Excessive carriage speed influences angular motion
and may destabilize the system if not balanced correctly.
3. K3 (Pendulum Angle Control): This gain is crucial for
determining if the system stabilizes at θ=0 or shifts toward θ=±3.
K3 is essential for managing the pendulum's angular displacement
and maintaining stability.
4. K4 (Pendulum Angular Velocity Control): A high K4 value
reduces oscillations and helps the system reach equilibrium points
directly. Conversely, a low K4 value can lead to perturbations and
oscillatory behaviour.
Effects of Various Lyapunov Functions (A, B, C, and D):
1. Lyapunov Function A: Function A, associated with the carriage’s
position, is generally redundant. Although it’s not directly
controlled, stability is not significantly affected because the
carriage’s velocity (B) indirectly influences position over time.
2. Lyapunov Function B: Function B affects overall stability and
influences the rate at which the system stabilizes.
3. Lyapunov Function C: This function is integral to the system
design as it incorporates the pendulum’s angle, which is critical for
stabilization. This is why C is present in all control combinations; it
is essential for system stability.
4. Lyapunov Function D: Representing rotational kinetic energy,
Function D relates to the angular speed and can contribute to
improved stability when controlling angular speed. It is essential in
some configurations for achieving better stability.
Overall Order of Stability of Control Combinations:
The combinations can be ranked by stability as follows:
A + B + C + D (most stable) ≈ B + C + D (equally stable) > B + C
(fairly stable) > C + D (less stable) > A + D (totally unstable)