AbdulrhmnGhanem / CA.jl

Actually, I don't where I will end up with this 🤷‍♂️
Creative Commons Zero v1.0 Universal
0 stars 0 forks source link

The inverted pendulum model prerequisites #11

Open AbdulrhmnGhanem opened 1 year ago

AbdulrhmnGhanem commented 1 year ago

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

  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

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

  15. Real - Represents real numbers for storing values.

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

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

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

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

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

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

  22. 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

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

AbdulrhmnGhanem commented 1 year ago

PlanarMechanics_ReferenceResults

AbdulrhmnGhanem commented 1 year ago

Merging https://github.com/SciML/ModelingToolkitStandardLibrary.jl/pull/220 means all the required components are upstream in the ModelingToolkitStandardLibrary.