14-Apr-2017

By Josh Siegel

At Simplexity, part of our work is designing embedded motion systems. As embedded motion engineers, we have to know how the smart electronics get placed within the physical structure (“embedded”) and how each component moves relative to each other (“motion”). In this three-part series, I delve into how we describe and model the latter term, motion, which we often take for granted as being quite simple.

In my introduction to 3D motion analysis,
I discussed why it’s important to analyze motion, and I provided a simple 2D gear example. In that 2D example, each of the rotating components was
rotating through a single angle, rotating about a single axis, and rotating about its center of mass. It was reasonable to say that ̇ and that

In this post, I explain why those simple relations aren’t universal, and why we have to be cautious when using them to help solve engineering problems.

**Moving to 3D**

What do we do when we encounter 3D motion systems that have parts rotating in more than one direction and not about their center of mass? How do we define
what the angles are, and what is the angular velocity? Is it still something like ? Could we still use the relationship
?

The motion of a quadcopter is a suitable example of a more complicated
3D motion system. It’s possible for a quadcopter in flight to translate in x, y, and z directions and rotate about x, y, and z (where x-y-z are three
orthogonal directions fixed in the space). Ultimately, we want to finesse where the quadcopter goes and how it gets there (i.e., we want stable control
over its position and orientation in the space).

To keep the quadcopter stable, we’ll use a gyroscope to measure the angular velocity about each axis, and feed that information back into the control algorithm.
A 3-axis gyroscope will spit out three values for angular velocity, but note that these angular velocities correspond to axes that are fixed on the
quadcopter. These x-y-z axes are not the same as the x-y-z axes that relate back to the quadcopter’s position, velocity, and acceleration in space.
The conversion, so to speak, of the gyroscope’s angular velocity information into something digestible by the control algorithm is where the 3D dynamics
model comes in handy.

**Getting started with a more powerful 3D model**

A more robust model of 3D motion starts with:

- Assigning a reference frame to a point fixed in your space.
- Treating all the objects in your system as rigid bodies.
- Assigning a reference frame to a certain point on each body.

A reference frame is what I’m calling a set of three orthogonal unit vectors attached to a certain point. For our quadcopter example, the only object is
the quadcopter, so we’ll treat that as a single rigid body. (We’ll ignore the other parts on the quadcopter here.) We’ll say that a reference frame
N is fixed at a point on the earth and is made up of ,, and .
We’ll attach a reference frame D to the center of mass of the quadcopter. Reference frame D is made up of , ,
and . The diagram above shows a simplified quadcopter in CAD with D attached to its center of mass, and another reference
frame N fixed in the space ( is pointing directly out of the page).

The measurements from the gyroscopes will give us angular velocities about , , and
, and for the control algorithm, we’ll want to know how these values relate to meaningful angles in , ,
and . One way to achieve this is by defining the quadcopter’s orientation with a series of simple rotations
about axes fixed on the quadcopter body. At the beginning of this step, we can express the angular velocity of the quadcopter in ,
, and , and it will look something like: . At the
end of this work, we’ll use rotation matrices to express each of the angular velocities in terms of Euler angles. Euler angles provide us one way
of precisely describing the orientation of a body in 3D space. (Note that Euler angles don’t necessarily correspond to what we call yaw, pitch,
and roll.) We will finish with precise expressions for , , and .

Since the quadcopter can rotate about more than one axis, we no longer have a simple ̇ relationship, and we can’t
use to generally describe the velocity of a point on a quadcopter. In fact, an equation for looks like: , where , , and are the Euler angles. The equations for and are no less messy, unfortunately.
For more details on these calculations, see the extra credit section.

In the final post in this series, I will discuss some important considerations when using a model like the one described in the above example. Please subscribe
to Simplexity’s blog to get updates on future blog posts.

**Extra credit**

Here is one way to precisely define rotational information for the quadcopter:

We’ll use *intermediate reference frames* to describe the orientation
of the quadcopter. We’ll call the initial reference frame attached to the quadcopter B. Initially, , ,
and . Reference frame D is still attached to the body, and initially, . We will rotate
first about (which here is equal to ), and we will rotate by angle .
We can then write that B’s angular velocity in N is .

We will then rotate about another fixed axis on the body, , and we’ll call this new intermediate reference frame C. Initially,
, , and . We’ll rotate by angle
about . We can then write that C’s angular velocity in B is .

Last, we will rotate about the fixed axis . Initially, , ,
and .We’ll rotate by angle about . We can then write that D’s angular velocity in C is .

From here, D’s angular velocity in N can be expressed as . However, this expression isn’t very useful yet in putting together
dynamic equations. We already know that because that’s the format of the data coming from the gyroscope. We’d
like to re-express this in terms of our global reference frame N.

Thankfully, each of those rotations created a rotation matrix between each of the intermediate frames, and we can use the multiplication of those rotation matrices to express in terms of our defined angles. (I won’t go into details with this part, but it comes straight out of making those intermediate rotations.) The result is the following:

Note that we can arrive at an expression for , , and in terms of , , and and their derivatives (as shown in the main part of the text) by expressing this equation in terms of in , , and . Additionally (by doing some more rearranging), we can express each of the Euler angles in terms of , , and . For example:

Alas, our first step in giving a precise definition for the angular velocity of the quadcopter and making it usable by the control algorithm is complete.

Tech We Can’t Wait To See At CES 2019

07-Jan-2019

Ossia Cota Forever Battery: Collaborative Design

13-Dec-2018

19-Nov-2018

Demystifying What it Takes to be a CEO

18-Oct-2018

Considerations for Code Refactoring

24-Sep-2018

American Association for Clinical Chemistry Annual Meeting

30-Aug-2018

Simplexity's Answer to Growing Pains

09-Aug-2018

Consumer Electronics Show 2018 | Part Three | So, What is a Robot?

29-Jan-2018

Consumer Electronics Show 2018 | Part Two | CES 2018 and IoT

22-Jan-2018

Consumer Electronics Show 2018 | Part One

15-Jan-2018

Why on earth are heavy weights being suspended from this printer?

22-Dec-2017

10 Best Places to Buy Parts for Product Development

29-Nov-2017

08-Nov-2017

Senaptec Strobe: A Study in Simplification

19-Oct-2017

Treatment, Prevention, and Medical Engineering Solutions

04-Oct-2017

Options in Product Development Models: Internal, CDM, or Design Specialist

20-Sep-2017

Designing Thermal Control Systems

30-Aug-2017

Simplexity’s 7 Steps to Simplification^{©}

15-Aug-2017

Battle of the Buttons: UCSD vs. PSU

02-Aug-2017

Considerations For Medical and Biotech Designs

13-Jul-2017

Risk Mitigation in Product Design: Part 2

11-Jul-2017

Risk Mitigation in Product Design: Part 1

28-Jun-2017

San Diego's Biotech Consortium

09-Jun-2017

Appropriate Models for 3D Motion Analysis: Part 3

25-Apr-2017

University of Oregon’s Product Design Program Is One of a Kind

19-Apr-2017

Appropriate Models for 3D Motion Analysis: Part 2

14-Apr-2017

From Engineer to Leader: How Do You Get There?

12-Apr-2017

Appropriate Models for 3D Motion Analysis: Part 1

06-Apr-2017

Why Engineering Still Matters in Product Development

29-Mar-2017

How Mechatronics Improve Drone Technology

16-Feb-2017

Why You Need a Gyro to Measure Position

20-Jan-2017

Why I, As The CEO, Get The Same Bonus As All My Other Employees

13-Dec-2016

Mechatronics Aids In Embedded System Design

07-Dec-2016

Top 10 Tips for Designing Injection Molded Plastic Parts

22-Nov-2016

British school kids and car hackers: the widespread appeal of open source

14-Nov-2016

When should you consider designing custom gears?

07-Nov-2016

Conference Report: Open Source Hardware Summit

31-Oct-2016

What is a Motion Control System?

20-Oct-2016

The Top 10 Questions to ask a Product Development Firm

05-Oct-2016

The Potential of the Apple AirPods To Disrupt A Whole Industry

12-Sep-2016

How to Use Open Source Hardware in Product Development

01-Sep-2016

What is the mech in mechatronics?

16-Aug-2016

3 Tips for IoT Product Success

02-Aug-2016

When Should I Start Designing For High-Volume Manufacturing?

19-Jul-2016

Designing a 3D Printer for the Home

29-Jun-2016

It Turns Out That EMC Is Not Black Magic

22-Jun-2016

Selecting the correct motor type and size

06-Jun-2016

When brainstorming fails, throw an imaginary cat

18-May-2016

Five Tips for Mechatronic System Integration

09-May-2016

Three Tips for Designing High Volume Mechatronic Products

28-Apr-2016

18-Apr-2016

If I could only do 3 things to simplify a design, what should they be?

06-Apr-2016