Helicopter
Last updated
Last updated
The primary objective of this experiment is to introduce the student to the measurement and response of a dynamical system. The experiments will occur on a tandem-rotor helicopter model connected to a pinned, swivel arm with a counter weight. Optical shaft encoders sense the motions of the helicopter model. During the experiment, we will calibrate the thrust control (voltage) input to the DC motors that control the rotors. Then we will measure the response of the system, specifically elevation, to various thrust inputs. Finally, the system response will be compared to a dynamical model of the helicopter.
A dynamical system is one in which the effects of an action do not achieve their impact immediately; the dynamical system evolves with time. The time evolution of the system depends both on the time-history of the external input(s) to the system and the properties of the system itself. Dynamical systems exist in many fields and applications:
When a pilot changes the throttle (thrust) setting, the vehicle’s velocity changes only gradually – but the lighter the vehicle, the faster it can reach the final velocity
When a cook puts something in the oven, its temperature does not rise to the oven temperature instantly – and larger items heat more slowly than smaller dishes
When a company lowers the price of a product, the impact on the product’s sales (and the company’s stock) can take months to evolve – and that one input is not the only thing that effects the revenues (or stock price).
This way of looking at a system is in contrast to static approaches. For example in the previous labs, you looked at the response of a system to an external input: strain response of a system to a given stress, or lift on a wing as a function of angle-of-attack and wind speed. In those instances, however, we did not consider any rate issues; we assumed there was a unique (unvarying) relationship between the inputs and outputs of the systems. This was because we ensured that the rate at which we applied the changes to the inputs (or how long we waited to acquire the data) was much slower (or longer) than how fast the system took to reach a steady-state, i.e., how long it took to stop changing.
A powerful way to understand or predict the behavior of a dynamical system is through mathematical models. The models include variables that describe the current state of the system, the state variables, and the things driving the system, i.e., the external inputs. For example, we can look at a point mass that is free to move, the state variables would be: position ( ), velocity ( ) and acceleration ( ), with three components of each if the mass can move in three dimensions. As you learned in physics for simple 1-d motion, these variables are not independent, i.e., and .
As an example of how one develops a model, we begin with a simple mass m pushed by an external force and constrained to move in one dimension. In this case, the motion of the mass is governed by Newton’s Law, i.e.,
where the notation .. represents the second derivative with respect to time. Now consider what happens if we add a spring that anchors the mass to a wall. Some of the force applied to the mass may now have to compress or expand the spring. You probably also learned in physics that the spring force can be modeled by Hooke’s Law (Eq. 1),
We can also add another device, called a damper, that produces a force that always opposes the motion of the mass – and the opposing force is proportional to the velocity, i.e.,
where b is the damping coefficient and means a first derivative with respect to time. Now including all the forces acting on our mass, we have
or equivalently:
[3]
This differential equation models the dynamics of what is known as a spring-mass-damper system, which is illustrated in Figure 1. This simple system represents a number of real systems; for example, the suspension systems used on cars combines springs and shock absorbers (dampers). Similarly, an electrical circuit composed of a capacitor, inductor and resistor in series has the same dynamics. Moreover, this simple system displays behaviors that are also seen in more complex systems, like our helicopter model. For example, if we remove the damper from the system, i.e., set the damping constant to essentially zero, the mass would continuously move back and forth as the spring is repeatedly compressed and expanded. On the other hand if the damping was very high, it would be very hard to move the mass quickly. Also note that the coefficient of the last term on the left side () has units of or a frequency squared.
Equation [4] above is an example of a linear second order system, which take a generic form as follows:
[4]
where is known as the "damping ratio", and is known as the "natural frequency". When there is an external force present, the system's response is known as a "forced response", whereas the absence of any external force results in its "natural" or "unforced response".
If we were to solve the differential equation [4] into the time domain, assuming the external force takes the form of an impulse (that is to say an imparting of energy delivered over an infinitesimally small period of time), the "impulse response", , would look as follows:
[5]
This equation describes an exponentially-decaying sinusoid with initial amplitude of and frequency of (which is known as the damped frequency). This is not a trivial finding; it tells us 2 main things:
If our system is linear, or can be considered de facto linear, we can know it's position at any point in time merely by knowing its natural frequency and damping ratio ( is a property of the impulse itself, not of the system)
Since this is a closed-form equation, we need only plug in these values and the value of time we care about to get the corresponding position (as opposed to having to solve it numerically)
The 1 degree-of-freedom (1DOF) helicopter mechanism used in this experiment is shown in Figure 2. It consists of a base upon which an arm is mounted (see Figure 3). The arm carries the helicopter body at one end and a counterweight at the other. Two DC motors with rotors mounted on the helicopter body generate a force (which we will call thrust) based on the voltages applied to each of the motors. The portion of the thrust generated by the rotors that is in the vertical direction can cause the helicopter body to lift, because the arm is held by a pin-type connector. The purpose of the counterweight is to reduce the power requirements on the motors.
The whole arm can pitch, which allows the elevation of the model to change by angle measured by an optical encoder. Natively, it can also roll and travel (yaw) in an azimuthal direction around the central swivel shaft, but this experiment locks those axes so that the system is purely 1-degree-of-freedom. All electrical signals to and from the main swivel arm are transmitted via a slip-ring with eight contacts, thus eliminating the possibility of tangled wires and reducing the amount of friction and loading about the moving axes. In this experiment, the two rotors will be driven by a control system with a Matlab/Simulink™ interface.
For this lab we will utilize a two point-mass model for the helicopter, namely that of the thrust-generating equipment, and the counterweight. Each of these masses is located at vertical and horizontal displacements as viewed in the body reference frame. In addition to the gravitational forces acting on the masses, the propellers generate a total thrust force, a spring force acts on the angular displacement, and a damping force acts on rate of change of angular displacement. The helicopter has a mass moment of inertia denoted J, that in our case will also be modeled via the two point mass model. This is summarized in Figure 5 below, with the variable definitions as follows:
Variable name | Definition |
---|---|
Mass of counterweight | |
Horizontal displacement of counterweight | |
Vertical displacement of counterweight | |
Mass of thrust-generating equipment | |
Horizontal displacement of thrust-generating equipment | |
Vertical displacement of thrust-generating equipment | |
Total propeller thrust | |
Pitch angle | |
Acceleration due to gravity | |
Damping constant | |
Spring constant |
In this lab we will measure the physical variables directly (lengths and masses), but the spring and mass constant can be notoriously difficult to predict so will address this in alternative ways. We will also directly measure the propeller thrust generation with an experiment.
The motions to be measured in this experiment are all related to the rotational motion of a shaft. Thus the Quanser system employs shaft (or rotary) encoders to measure the pitch, travel and roll of the helicopter model. Generally, a shaft encoder converts an angular position to an analog or digital output. While there are a number of electro-mechanical approaches employed in encoders, the most common employ either magnetic or optical sensors to read the shaft motion, with the latter more common, especially in high resolution encoders. These types of systems have replaced older electronic potentiometer-based systems.
Optical shaft encoders typically rely on the rotation of an internal code disc that has a pattern of opaque lines or shapes imprinted on it. The disc is rotated in a beam of light, e.g., from a small LED, and the pattern of dark and light regions on the disc act as shutters, blocking and unblocking the light in systems based on transmission, or strongly and weakly reflecting the light (see Figure 6). For high resolution, the disc is divided into many segments, typically in concentric rings. Internal photodetectors sense the alternating intensity of the light and the encoder's electronics convert the pattern into an electrical output signal.
There are two basic types of encoders: absolute and relative (also called incremental). An absolute encoder returns an exact position, or an angle in a rotary encoder, relative to a fixed zero position. An incremental encoder provides information on the instantaneous movement of the device, which can be converted to speed, distance traveled or position relative to an arbitrary initial state. Absolute encoders are necessary if a particular angular position must be known or retained, independent of when the encoder was powered on. Most other applications can employ an incremental encoder. Absolute encoders provide a output with a unique code pattern that is derived from independent tracks on the encoder disc which correspond to individual photodetectors and represents each position. Incremental encoders are simpler and provide information about the instantaneous motion of a rotating shaft by determining how many and/or how fast the alternating disc patterns go by.
Take a tour of the equipment with the TAs, they will show you:
The experimental hardware
Motors+propellers, and an explanation of how they are controlled
3-DOF to 1-DOF conversion
Optical Shaft Encoder (incremental, 4096 counts per rev)
USB DAQ (data acquisition device)
Power amplifier (USB outputs voltage but can’t deliver enough current as propeller load is so high, so the amplifier provides this)
Electronic weighing scale and stand (designed to hold the experiment at a perfect level)
The Simulink model--how it communicates with the hardware and how to control the motors+props
If necessary, move the base of the helicopter to the back table--the one closest to the window (this table is slightly above the table that is in front of it).
Move the helicopter using ONLY the base plate. Lifting the system using any other parts of the setup may damage it!
Place the electronic scale and stand underneath the thrusters. The leveling stand already takes into account the difference in table height.
The digital scale is designed to hold the main body level in a perfectly level position and be located directly below the thrust line (this means we can evaluate thrust without having to make a correction for leverage). The grooves in its top plate are deliberately narrow to provide this alignment but this can cause some interference if alignment is not correct, leading to false forces being measured by the scale. To avoid this, follow these steps:
Zero the scale if necessary
Locate the propeller tray sides in the grooves by moving the scale, do not move the helicopter base
Look down from above and fine-position the propeller tray so it's not visually touching the sides
Gently lift the propeller tray to check for interference all the way out of the groove... if it interferes at any point a readjustment is necessary
The encoders used in this experiment are incremental encoders, meaning there isn't an absolute reference of any kind. Instead, the hardware keeps track of how many steps increments of the encoder it has seen since being initialized. This initialization occurs upon connecting to the hardware, not when it is run. Therefore, follow these steps to zero the encoders:
Follow the helicopter leveling procedure above
In Simulink, click ‘Run On Hardware > Monitor and Tune > Connect’’
Download and open the MS Excel data recording template - Save a copy of this to your groups data folder (e.g. A20-X). DO NOT SAVE CHANGES TO THE TEMPLATE FILE. This excel sheet will be used to note down all your measurements during the lab
Referring to Figure 5 above, measure the force required to hold the helicopter level:
Zero the digital scale and set its units to grams
TIP: give the Zero button a short sharp press as vertically as you can
Make sure the counterweight is installed in the end hole
Place the propeller tray in the digital scale grooves, taking care to prevent interference
Note down the measured mass in grams, which denotes the net force to hold the helicopter level when measured at a lever arm of
The scale reading may bounce around and/or drift a little bit. Note down the most consistent reading from the scale as your data point.
Using the digital scale and a ruler/tape measure, obtain the following measurements:
Remove the counterweight from the helicopter if it isn't already (this enables the thrust equipment weight to prevent the heli from taking off)
Follow the helicopter leveling procedure above
Re-zero the scale
Open MATLAB and navigate to the experiment folder D:\AE2610\Helicopter\[Semester Year]
Open the Simulink file Helicopter.mdl
Once loaded, ensure the voltage is set to 0
Connect to the hardware by clicking ‘Run On Hardware > Monitor and Tune > Connect’
If you get a build error, click on ‘Run On Hardware > Monitor and Tune > Build For Monitoring’
Once connected, turn on the power amplifier
Click Start
Once running, command a voltage of 0V and note down the voltage and measured thrust (in grams) from the digital scale in Excel
As before, the scale reading may bounce around and/or drift a little bit. Note down the most consistent reading from the scale as your data point.
Command a voltage of 1V and note down the voltage and measured thrust (in grams) from the digital scale in Excel
Command a voltage of 0V and wait for the propellers to stop. Re-zero the scale
Repeat steps 11 and 12 for a series of voltages from 2-10V in 1V increments, making sure to stop the propellers and zero the scale between each incremental measurement
Once finished, set the voltage to 0 and click Stop
Observe the Excel plot to check it makes sense (the TAs will help you here)
Re-take data points if your group deems it is necessary
Re-mount the counterweight in the end hole, with the top face roughly horizontal.
Using your data from Excel and the net force measurement from earlier, estimate the voltage required to hold the helicopter level. Write down this predicted voltage in your Excel file.
Follow the helicopter leveling procedure above.
Follow the encoder zeroing procedure above.
Making sure that the propellers do not slam onto the desk (have a member of your group hold the counterweight), move the electronic weighing scale and stand away from the model so that the model is free to pitch.
Slide the helicopter straight forward so that the propellers are well clear of the desk.
Ensure your group members are a good distance away from the propellers such that you do not interfere with them.
Input your predicted voltage.
Click Start.
Help the Heli find its natural settling angle by damping the oscillations. Do this by deadening the motion of the counterweight, DO NOT PUT YOUR FINGERS NEAR THE PROPELLERS!!! Use the Simulink Pitch scope to help you.
Adjust the voltage while the code is running until the Heli is at zero (it will be bobbling around a little at this point so you can use your judgement when it’s there). Use the Simulink pitch scope to help you here.
Write down the actual voltage at which your Heli is at zero in your Excel file. If there is a discrepancy, start thinking of reasons why this may be.
Once in position, sharply but gently push the counterweight either up or down to give the Heli a short impulse so that it oscillates roughly +/- 10 degrees. If you massively over- or under-shoot, this is not a problem but we need the logged data to be clean so re-level and dampen the oscillation, then repeat the impulse until you are happy. Again use the Simulink pitch scope to help you assess the quality of the data capture (the TAs will help you here).
Once the oscillations have been settled for a few seconds, slide the helicopter back in so that the propellers are well inside of the boundary of the table.
Repeat the impulse experiment in step 13 and discuss in real-time how, if at all, it varies from the previous experiment where the propellers were hanging over the table.
With the help of the TAs and the Pitch scope, determine if the impulse and subsequent data is good. If it is, set the voltage to 0 and click Stop. Catch the helicopter (by its counterweight) before it hits the table. If not, repeat the steps above until a good data set is obtained.
Verify the logged data:
In the MATLAB Command Line, type: figure, plot(time, theta)
Inspect the plot with the help of the TA to ensure it matches what you expect
If the data is satisfactory, right click in the MATLAB workspace and hit Save. Give the file an appropriate name. If the data is not satisfactory, repeat the experiment as needed.
Follow the helicopter leveling procedure above
Follow the encoder zeroing procedure above
Remove the digital scale and gently allow the propeller tray to settle in its natural position by holding and slowly releasing the counterweight (you may help it reach this position)
Click Start once it has fully settled
Push and hold the counterweight up so that the prop tray is firmly on the desk whilst being level
Cleanly release the counterweight so that you don't impart any external forces after letting go
Observe the oscillations on the Simulink pitch scope until the helicopter comes to its natural resting position again
With the help of the TAs, determine if the release and subsequent data is good. If it is, click Stop and catch the helicopter (by its counterweight) before it hits the table. If not, repeat the steps above until a good data set is obtained.
Verify the logged data:
In the MATLAB Command Line, type: figure, plot(time, theta)
Inspect the plot with the help of the TA to ensure it matches what you expect
If the data is satisfactory, right click in the MATLAB workspace and hit Save. Give the file an appropriate name. If the data is not satisfactory, repeat the experiment as needed.
Follow the helicopter leveling procedure above
Follow the encoder zeroing procedure above
Remove the digital scale and slide the helicopter straight forward so that the propellers are well clear of the desk (exactly as you did for the linearized system response experiment)
Gently allow the propeller tray to settle in its natural position (you may help it reach this position)
Set the Voltage to 0
Click Start
For the following voltages {0, 2.5, 5, 7.5, 10}, set the input voltage in Simulink and help the helicopter settle at whatever angle it wants to. Record the settling angle to voltage mapping in your Excel file.
You may speed up this process by helping the helicopter settle at whatever angle it wants to settle at. Don't wait for the helicopter to naturally settle.
If your data looks good, set the voltage to 0 and click Stop.
Discuss with the TAs any other unmodeled phenomena that could be included in the model if we wanted
Do any other tests on the heli that you might find interesting
Get started on the data reduction while you have 1:1 time with a TA
See Excel spreadsheet (note there are multiple tabs!!!)
One .mat file containing theta v. time for the linear response (with props spinning)
One .mat file containing theta v. time for the natural non-linear response
For the linear theta v. time response data - extract the time window of interest:
The start point should be the first time after the impulse has been applied that theta is zero and increasing (aka it should look like the start of a sinusoid with no phase shift)
The end point should be some point around when the oscillations have about settled (there will inevitably be some motion so do your best)
For the nonlinear theta v. time natural response data - extract the time window of interest:
The start point should be as soon as possible after the helicopter has been released
The end point should be some point around when the oscillations have about settled (there will inevitably be some motion so do your best)
For the voltage v. thrust mapping - determine a good fitting function that will enable you to plug in any value of voltage and get out a good estimate of thrust
Modeling preliminaries
Referring to Figure 5 and the information defining the two point-mass model, use Newton's Second Law of Rotation to derive an equation of motion for . If done correctly you should have 5 terms: 1 each for , with coefficients relating to the physical parameters defined in the model.
Again using the two point-mass model, develop an equation that predicts pitch moment of inertia about the pivot as a function of the masses and their locations with respect to the pivot.
Linear modeling
Using the nonlinear equation you derived in Step 1.1 above, develop a linearized form of it:
Make a small angle approximation about .
Assume we manually set the thrust term such that the bias term is cancelled out.
If done correctly you should now have 2 terms: 1 each for
By comparing terms of your linear equation with those in Equation 4 in the lab manual, develop equations for damping ratio and natural frequency in terms of the model parameters.
Input the model parameters you obtained in lab to get out estimates of natural frequency and damping ratio. Assume the manufacturer has told you the spring and damping constants, and , are 0.2 and 0.1, respectively.
Determine the impulse response of the modeled linear system using Equation 5 from the lab manual. You will need to manually adjust to get the initial amplitude of the response correct. Use the same time window from your reduced linear data.
Again use Equation 5 to analyze a linear response, but this time use fresh values for natural frequency and damping ratio, instead manually adjusting them until you get the best possible fit you can. Again use the same time window from your reduced linear data.
Nonlinear modeling
Using the nonlinear model you developed in Step 1.1 above, convert it to an anonymous function in MATLAB.
Propagate the nonlinear model throughout the same time window, and from the same initial conditions, as your nonlinear reduced data. Do this using the anonymous function you just made and MATLAB's ode45() function. Again, assume the manufacturer has told you the spring and damping constants, and , are 0.2 and 0.1, respectively. A template MATLAB Live Script for the above 2 steps can be found below this list.
Propagate another instance of the nonlinear model as you did in the previous step, but this time you have free license to modify any parameters to get the best fit possible.
Static balance analysis
Using your nonlinear equation from Step 1.1, develop an expression for, and calculate the thrust needed to maintain a steady level hover (aka zero motion) at using the measured parameters from the lab.
Again using your nonlinear equation from Step 1.1, develop an equation that predicts the natural settling angle (aka zero motion) as a function of input thrust.
Using the data you acquired in the voltage v. angle mapping experiment, and the thrust v. voltage fitting you performed in data reduction, solve the previous equation to predict settling angle for the voltages you tested. Note that this equation will be nonlinear so not trivial to solve; you may use whatever method you deem appropriate such as Excel What If, MATLAB solver, trial and error, graphical, small angle approximation, etc.
Derivations of your following equations, showing all your steps:
Nonlinear equation of motion
Linearized equation of motion
Pitch moment of inertia equation
Damping ratio and natural frequency in terms of model parameters
Predicted natural settling angle from thrust
Tables containing:
All the dimensional/mass measurements you took in the lab
Both empirically-obtained and model parameter-predicted damping ratio and natural frequency
Predicted and measured settling angle by voltage input
Predicted steady level hover thrust and measured leveling force from the digital scale
A plot of:
Thrust versus voltage with 2 overlaid series; one of the raw data points you gathered in the lab, another showing the fit curve you made. Also provide the equation of the fit curve.
The linear impulse response with 3 overlaid series; measured, model-parameter-predicted, and manually adjusted.
The nonlinear natural response with 3 overlaid series; measured, model-parameter predicted, and manually adjusted.
Discussion of:
How well the empirically-obtained and model parameter-predicted damping ratio and natural frequency match up, including any thoughts on why any discrepancy may have arisen.
How well the predicted and measured settling angle match up, including any thoughts on why any discrepancy may have arisen.
How well the steady level hover thrust and measured leveling force match up, including any thoughts on why any discrepancy may have arisen.
What fit curve you used for the thrust-voltage mapping fit and why you picked that one, plus some thoughts on how well it fits the measurements.
How well the linear impulse response series match each other with thoughts on why any poorly-fitting series are that way
How well the nonlinear natural response series match each other with thoughts on why any poorly-fitting series are that way
Why you would use each of the modeling techniques covered in this lab, with particular consideration of: ease of implementation, current design stage, accuracy, etc.