Skip to content

The inverted pendulum model prerequisites #11

Open
@AbdulrhmnGhanem

Description

@AbdulrhmnGhanem

A note to my future self
What I am doing here is quite against my policy of doing the least necessary amount of quality work, but I am doing it as a partial fulfillment of my Master's degree secondary goal: to be proficient in model, simulation, and control using Julia. Otherwise, I would just use the ABCD matrix of the model and would call it a day.

To follow a TDD approach, I need a verified model of an inverted pendulum to compare the newly created model against it. To do so I need to:

The WSM model is a Modelica model, which means I need to

OMJulia relies on Open Modelica, so I have to figure out a way to

Here is a quick summary of the components used in the model

  1. Modelica.Icons.Library - This is a built-in icon library.
  2. PlanarMechanics.Parts.Body - Represents the mass of the pendulum and the cart in planar mechanics.
  3. PlanarMechanics.Parts.Fixed - Represents a fixed point in planar mechanics.
  4. PlanarMechanics.Parts.FixedTranslation - Represents the length of the pendulum in planar mechanics.
  5. PlanarMechanics.PlanarWorld - Represents the planar world in planar mechanics.
  6. PlanarMechanics.Joints.Revolute - Represents a revolute joint in planar mechanics.
  7. PlanarMechanics.Joints.Prismatic - Represents a prismatic joint in planar mechanics.
  8. Modelica.Mechanics.Rotational.Sensors.AngleSensor - Represents an angle sensor in rotational mechanics.
  9. Modelica.Blocks.Math.MatrixGain - Represents a matrix gain block for control.
  10. Modelica.Mechanics.Translational.Sensors.PositionSensor - Represents a position sensor in translational mechanics.
  11. Modelica.Mechanics.Rotational.Sensors.SpeedSensor - Represents a speed sensor in rotational mechanics.
  12. Modelica.Mechanics.Translational.Sensors.SpeedSensor - Represents a speed sensor in translational mechanics.
  13. PlanarMechanics.Sources.WorldForce - Represents a world force source in planar mechanics.
Other auxiliary components

  1. Modelica.Blocks.Interfaces.RealOutput - Represents real output signals for various components.

  2. Real - Represents real numbers for storing values.

  3. Modelica.SIunits.Mass - Represents mass values in SI units.

  4. Modelica.SIunits.Inertia - Represents inertia values in SI units.

  5. Modelica.SIunits.Angle - Represents angle values in SI units.

  6. Modelica.SIunits.Length - Represents length values in SI units.

  7. Modelica.SIunits.Position - Represents position values in SI units.

  8. Modelica.SIunits.Acceleration - Represents acceleration values in SI units.

  9. Modelica.SIunits.AngularAcceleration - Represents angular acceleration values in SI units.

The PlanarMechanics.* components are provided via https://github.com/dzimmer/PlanarMechanics which is missing for ModelingToolkitStandardLibarary. So I have to add the following to MTKStdLib

Here is a PR that added the Mechnaical.Transitional module for inspiration and pitfalls SciML/ModelingToolkitStandardLibrary.jl#85

only then I can start building the model using ModelingToolkit. oouf 😫

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions