Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Motion in space of physical objects can be represented with six degrees of freedom. Three of these represent position in three-dimensional space,and three represent orientation

Motion in space of physical objects can be represented with six degrees of freedom. Three of these represent position in three-dimensional space,and three represent orientation in space. We assume three axes, x, y, and z, where by convention x is drawn increasing to the right, y is drawn increasing upwards, and z is drawn increasing out of the page. Roll x is an angle of rotation around the x axis, where by convention an angle of 0 radians represents horizontally flat along the z axis (i.e., the angle is given relative to the z axis). Yaw y is the rotation around the y axis, where by convention 0 radians represents pointing directly to the right (i.e., the angle is given relative to the x axis). Pitch z is rotation around the z axis, where by convention 0 radians represents pointing horizontally (i.e., the angle is given relative to the x axis). The position of an object in space, therefore, is represented by six functions of the form : , where the domain represents time and the codomain represents either distance along an axis or angle relative to an axis. Changes in position or orientation are governed by Newtons second law, relating force with acceleration. Acceleration is the second derivative of position. Our first equation handles the position information, () = ( ) where F is the force vector in three directions, M is the mass of the object, and is the second derivative of x with respect to time (i.e., the acceleration). The versions of these equations of motion that affect orientation use torque, the rotational version of force. It is again a three-element vector as a function of time, representing the net rotational force on an object. () = ( ) where T is the torque vector in three axes and I is the moment of inertia of the object. Using these equations, if you know the initial orientation and initial rotational velocity of an object and the torques on the object in all three axes as a function of time, you can determine the rotational acceleration, velocity, and orientation of the object at any time. Often, we can simplify these equations by reducing the number of dimensions that are considered. In general, such a simplification is called a model-order reduction. Consider a simple control problem that admits such reduction of dimensionality. A helicopter has two rotors, one above, which provides lift, and one on the tail. Without the rotor on the tail, the body of the helicopter would spin. The rotor on the tail counteracts that spin. Specifically, the force produced by the tail rotor must counter the torque produced by the main rotor. Here we consider this role of the tail rotor independently from all other motion of the helicopter. A simplified model of the helicopter is shown above. Here, we assume that the helicopter position is fixed at the origin, so there is no need to consider equations describing position. Moreover, we assume that the helicopter remains vertical, so pitch and roll are fixed at zero. These assumptions are not as unrealistic as they may seem since we can define the coordinate system to be fixed to the helicopter. With these assumptions, the moment of inertia reduces to a scalar that represents a torque that resists changes in yaw. The changes in yaw will be due to Newtons third law, the action-reaction law, which states that every action has an equal and opposite reaction. This will tend to cause the helicopter to rotate in the opposite direction from the rotor rotation. The tail rotor has the job of countering that torque to keep the body of the helicopter from spinning. We model the simplified helicopter by a system that takes as input a continuous time signal Ty, the torque around the y axis (which causes changes in yaw). This torque is the sum of the torque caused by the main rotor and that caused by the tail rotor. When these are perfectly balanced, that sum is zero. The output of our system will be the angular velocity and yaw around the y axis. The dimensionally reduced version can be written as: ! = !()/ Please write a simulation in C++ using the above formula to calculate the yaw of a helicopter for 10 seconds with the following input, parameter and initial state specification. = 3800 2, the moment of intertie of the helicopter in y axis (0) = 0 /, the initial yaw rate of the helicopter (0) = 0 rad, the initial yaw of the helicopter !() = 0.3 "/" , the torque applied to helicopter. Your simulation shall have a 10ms step size. Your simulation shall implement Euler integration. Your simulation shall log every second (in simulation time) time and yaw to console. Please provide your source files, a make file with a build and run target, and a Markdown document.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

6. Identify characteristics of whiteness.

Answered: 1 week ago