Units in Matlab Model

4 views (last 30 days)
Daniel Moulin
Daniel Moulin on 4 Feb 2015
Answered: Steve Miller on 24 Jun 2021
Hi,
I've got following problem - while i was modelling inverted pendulum in Simscape, there were only a few units that I could use for my system to decribe different variables. For example, for angular velocity of the pendulum in Simscape I have units like rad/s or deg/s. In the real system, where I implement my model I've got completely diffrent units (angular velocity - rotations/min, velocity of the cart - mm/min etc.) that don't comply with the ones in the model.
In both systems, I control upright position using PID controller. I tried to convert units in my model to units in the real system but something seems not to work. The gains don't fit, what's working in the simulation doesn't work in real system.
I don't know what I'm doing wrong.Can anybody help me with that.

Answers (1)

Steve Miller
Steve Miller on 24 Jun 2021
Hi Daniel,
The dropdown menus in Simscape permit you to specify units of the parameters. You can create your own unit combinations by entering the units as a text string composed of units that Simscape recognizes, and if you are using units that are not already in Simscape, you can add your own units. You have the flexibility you need to enter your parameters in any unit system you wish.
--Steve

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!