summaryrefslogtreecommitdiff
path: root/rollcontrol.mdwn
blob: db8c62f6d2fba87d0c96eb12b6253bdea4010c56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
## Roll Control

**Purpose:** Our last launch was a huge success ([[May 2009 launch of LV2.3|news/2009-05-31]]), but our on board video could have been better if the rocket didn't spin about the longitudinal axis.

There are two ways to correct this:

- Find a better way to align the fins.
- Implement an active roll axis control system to stop the rotation and actively orient the rocket in the desired orientation.


Aligning the fins should be done to minimize drag on the rocket, but an active roll control system can ensure minimal roll, and even point the on board camera in an interesting direction through the launch and recovery.

Further, an experiment with roll control provides a good chance to validate a control system designed based on a dynamic model.

**Requirements:**

- Small 'canard' style fins, so that they fail safe.
- On error, fins go to neutral.
- Fins have short mechanical travel to minimize control gain.
- Fins are mechanically linked to ensure they must operate together, only in the roll (rocket) axis.
- Fins placed near CG to minimize steering if alignment is off.
- One powerful/fast servo, instead of many.
- If we are really worried about uC failures, we could do a hardware watchdog CPLD that centers the servo if it doesn't get serviced. That requires 1 chip and a few caps.

**Current Design**

This is a screenshot pf our current design that we are going to try to fly.  Almost ready to begin construction!

[[!img assembeled_Final1.jpg alt="CAD drawing of a possible design" size="330x300"]]

**Next items needed:**

- Fin equations relating fin length, width, airspeed, air-density, and angle-of-attack to lift and drag.
- Post mass moment of inertia calculations
- Equations of motion describing the plant
- State-Space representation of plant
- Pole placement and control design


## Analysis

At some point, our project will require the full inertia tensor. For now however, we can achieve excellent roll control using a single degree of freedom (1 DOF) model of the rocket dynamics about the longitudinal (roll) axis.


### **Mass Moment of Inertia**

To begin, we measure the mass moment of inertia _I<sub>zz</sub>_ (see [[CoordinateSystem]]) using a basic technique from any ME vibrations or physics class. Skipping the derivation, it is known that a poorly damped mass will oscillate when suspended by a spring at a frequency given by:

[[!teximg  code="f [Hz] = \frac{ \sqrt{ k / m}} { 2 \pi}" ]]

where _k_ is the spring stiffness and _m_ is the mass of the suspended object.

An analogue to this equation in the rotational case:

[[!teximg code="f [Hz] = \frac{ \sqrt{ k_t / I_{zz}}} { 2 \pi}" ]]

Here, _I<sub>zz</sub>_ is the rotational inertia of the rocket about its long (*z*) axis, and _k<sub>t</sub>_ is the torsional stiffness of a rod from which our rocket is suspended. The rod is firmly clamped to the rocket at one end, and to a support structure at the other end. It is not possible to rotate the rocket about the long axis without twisting the rod. 

Solving the last equation for the inertia:

[[!teximg code="I_{zz} = \frac{ k_t} { (2 \pi f)^2}" ]]

If the rocket is rotated about the long axis (away from its resting position) and released, the inertia and the torsional spring constant will cause it to oscillate. By measuring the time it takes for the rocket to oscillate through ten cycles, the above formula can be used to calculate the rockets mass moment of inertia about the axis of oscillation.


### **Time Measurements**

Vertical measurements:

- 18.23 seconds, 10 cycles
- 18.09 seconds, 10 cycles
- 18.16 seconds, 10 cycles
- 18.23 seconds, 10 cycles


This is an average oscillation frequency of 0.5501 cycles/second.

And for fun, we took some horizontal measurements:

- 19.90 seconds, 1 cycle
- 20.53 seconds, 1 cycle
- 58.81 seconds, 3 cycle


### **Torsion Rod**

Obviously, it's necessary to select a torsion rod stiff enough to overcome drag during oscillations, yet weak enough to give oscillations that are not too fast to count. A rod that gives around 0.5 oscillations per second is about right for counting by eye and using a stopwatch. In the data above, the horizontal measurements are not useful because the wind on the rocket was easily able to overcome the torsion rod stiffness.

Our torsion rod was a 35 inch length of 1/8th inch hardened steel wire. To offset friction in the torque measuring devise, torque measurements below 3.0 inch-lbs were not used, and the angular measurement was adjusted to 0 degrees at 3.0 inch-lbs. This works well because our torque constant for the torsion rod is given by the slope of a linear regression fit applied to the torque/angle data. When twisted using a torque measuring device, the following torque/angle data was collected:

[[!table class="data" data="""
Angle [&deg;] | Torque [inch &middot; lbs]
0|3.0
10|4.8
20|6.0
25|7.0
30|7.5
45|9.0
50|10.5
60|11.75
"""]]


This is an average _k<sub>t</sub>_ of 0.1412 [in * lbs / degree], or 0.9141 [N * m / radian].


### **Measured Inertia**

Substituting the measured values of _f_ and _k<sub>t</sub>_ to the _I<sub>zz</sub>_ equation, we get:

[[!teximg code="I_{zz} = \frac{ k_t} { (2 \pi f)^2} = 0.9141 [N \cdot m] / (2 * 3.1415 * 0.550 [Hz])^2 = 0.07654 [m^2 \cdot kg]" ]]

This is for the rocket *without* the motor. Later we'll add the engine casing to get the minimum inertia case, and then add the fuel on the pad to get the maximum inertia case.

**More to come:** Add the inertia of the motor casing, both with and without the fuel grains.

## Canard Forces

(see the [CanardAerodynamics](/CanardAerodynamics/) page)

Computing canard forces relative to the canard angle-of-attack (AOA) can be a challenging problem. We have located studies, cfd analysis, and wind tunnel tests on a few interesting control fin designs. One possibly interesting step in this design might be to find a way to test the canard forces at various angles of attack near trans-sonic speeds, thereby validating our calculations and research. Short of constructing a wind tunnel, the easiest way to get 1) the speeds we want, 2) fine control of the fin AOA, and 3) accurate measurement of the fin forces produced is to attach the fin to an arm at the end of a rotating fixture, and spin the fixture at a high rotational rate. This could be accomplished by modifying a radio controlled helicopter. In place of the main rotor blades, we attach carbon fiber rods with the fins attached to the ends. Initial calculations show that we can reach fin speeds in excess of 450 MPH using a 1 meter rod spun at 3000 RPM. This is easily attainable using RC helicopter gear.

**Photos Coming...**

## Equations of Motion

### **First Principles**

Equations approximating the motion of the rocket are derived from free-body and kinetic diagrams, as taught in a mid level mechanical engineering dynamics course. Developing equations in this manner is known as developing from *first principles* because basic Newtonian principles (f=m*a) are used to derive them. These diagrams are shown in the following figure:

Put diagram here...

### **State-Space**
One of the (control) industry standard representations for equations of motion is the state space format. State space representations easily lend themselves to pole placement exercises and simulations. Rather than re-invent the last 100 years of control theory development, we opt to use a state-space representation:

[[!teximg code="\left [ \begin{matrix}
\overset{\centerdot \centerdot}{\theta} \\
\overset{\centerdot}{\theta}
\end{matrix} \right ] =
\left [ \begin{matrix}
-k_{d}/I_{zz} & 0 \\
1 & 0
\end{matrix} \right ]
\left [ \begin{matrix}
\overset{\centerdot}{\theta} \\
\theta
\end{matrix} \right ] +
\left \lbrace \begin{matrix}
l_{f}/I_{zz} \\
0
\end{matrix} \right \rbrace \cdot u" ]]

It is assumed that all fins are acting together at the same angle of attack and in opposing directions such that they only cause rotations about the z axis. In the above equation, the sum force of the fins acting to rotate the rocket is given as [[!teximg code="u" ]], and that sum force acts at a distance [[!teximg code="l_{f}" ]] from the z axis.

**To be continued...**


## References