3DOF Helicopter
This manual documents the modelling of a 3DOF helicopter mechanism, for which PID orientation controllers (pitch, roll and yaw) are developed. Finally, the controllers are implemented on the hardware.
Last updated
Was this helpful?
This manual documents the modelling of a 3DOF helicopter mechanism, for which PID orientation controllers (pitch, roll and yaw) are developed. Finally, the controllers are implemented on the hardware.
Last updated
Was this helpful?
The purpose of this experiment is to design an attitude controller for the 3-DOF helicopter mechanism and to test the controller using the real-time experimental setup.
The 3-DOF helicopter mechanism used in this experiment is shown in Fig. 5.2. The 3-DOF helicopter consists of a base upon which an arm is mounted as shown in Fig. 5.4. The arm carries the helicopter body at one end and a counterweight at the other. It can pitch about a longitudinal axis as well as yaw about a vertical axis. Encoders mounted on these axes allow for measuring the pitch and the yaw of the arm. The helicopter body is mounted at the end of the arm as shown in Fig. 5.4. The helicopter body is free to roll about the arm. The roll angle is measured via a third encoder. Two motors with propellers mounted on the helicopter body can generate a force proportional to the voltage applied to the motors.
The force generated by the propellers can cause the helicopter body to lift off the ground. The purpose of the counterweight is to reduce the power requirements on the motors. All electrical signals to and from the arm are transmitted via a slip-ring with 8 contacts thus eliminating the possibility of tangled wires and reducing the amount of friction and loading about the moving axes.
where
Consider the diagram in Fig. 5.7. The rolling moment is controlled by the difference in the forces generated by the propellers. If the force generated by the right motor is higher than the force generated by the left motor, the helicopter body will roll to left (positive).
where
where
Equations (5.2), (5.3) and (5.4) mean that the pitching acceleration is a function of the sum of the voltages applied to the motors, the rolling acceleration is a function of the difference in the voltages applied to the motors, and the yaw acceleration is a function of the roll angle.
The purpose is to design a controller to control the pitch angle of the helicopter by supplying the appropriate sum of voltage to the motors. We will assume the mass differential torque has been balanced by a constant thrust from the propellers. Assuming the roll angle to be small, we obtain the following linear system
The standard form for the transfer function of a second-order system is
The controller is now
The purpose is to design a controller to control the roll angle of the helicopter by supplying an appropriate difference of voltage to the motors. The open-loop axis equation of motion for roll is
where
We implement a PD controller of the form
Similar to the pitch controller, the roll controller gains are determined by comparing the closed-loop system transfer function Eq. (5.14) with the standard form of the transfer function of a second-order system of Eq. (5.8) to obtain
The standard form for the transfer function of a first-order system is given by
Comparing Eq. (5.19) with Eq. (5.20), and for a desired value of closed-loop yaw rate response time constant, we obtain
The following are the estimated parameter values for the 3-DOF Helicopter Mechanism.
In pitch: 3 sec < peak time < 3.5 sec, 5% settling time < 5 sec
In roll: 1.2 sec < peak time < 1.8 sec, 5% settling time < 2 sec
Note: For a second-order system:
Use the following steps to design the pitch and roll controller:
Note: The roll controller is a PD controller, and does not have an integral gain.
In yaw rate response: 4 sec < rise time < 5 sec
t_r=\tau \ln{9} \tag{5.22}
Pay attention to the assumption above. The yaw controller works through commanding a roll angle, but for this initial design, we assume that the roll angle matches this command instantaneously.
Using Eqs. (5.5) and (5.6), build a SIMULINK model of the closed-loop system for the pitch PID controller and enter the gains you found. The design that you performed gave you values that should work well, but they are only an initial guess. You must implement them and test the response to ensure it meets the requirements, and modify the gains if necessary. Run a closed-loop response to a pitch attitude step command of 20 deg. Plot the response and verify that the response meets the given specifications. (Note: You can test the requirements with this command as well. You don’t have to use a unit step for testing, because this is a linear system.)
Repeat the above process for roll (i.e., build a PD controller model in SIMULINK using Eqs. (5.12) and (5.13) and enter the gains you found. Test the roll controller using a roll attitude step command of 10 deg. Plot the response and verify that the response meets the given specifications.
You need to use a unit step input for yaw rate and verify that your yaw controller meets the rise time requirement (adjust yaw gains if required). Then, design a pulse input of 10 deg/sec to simulate a yaw rate command given by the pilot. Integrate yaw rate to obtain yaw attitude. Determine the duration of the pulse input that is needed to achieve a 180 deg turn. This can be done through trial and error if you like. Plot the yaw rate and yaw attitude responses.
Repeat step 7 while simultaneously commanding 20 degrees of pitch attitude and a 10 deg/sec yaw rate pulse of required duration to achieve a 180 deg turn. The input command should be implemented after the equilibrium has reached (in between 50-100 seconds).
You need to complete the controller design prior to your lab. Also, you need to complete all simulations at home for inclusion in the group report. Make sure you have: all your gains listed, there should be 7 of them, the pitch angle response, the roll angle response, the yaw rate and angle response, and that all of the requirements are met for all of them, and what pulse duration was needed for the 180-degrees turn for the two cases of with zero pitch attitude and 20 deg pitch attitude.
Each of you must complete the controller design at home and have the gain values from your design with you when you go to the experiment lab in order to receive lab participation credit. Also, each of you must include your controller designs as part of the lab report to get credit for your work. Each of you must complete SIMULINK responses at home and include them in the group report to get credit for your work.
Always stay clear of the helicopter while running and catch it while stopping.
Check and ensure that the counterweight in the secondary arm is fixed in the furthest hole/position away from the rotors.
Turn the power on.
Open the MATLAB and locate the file Helicopter_PitchRoll_PID.mdl under the path C:\AE4610_Controls_Lab\Helicopter and open it. This is the block diagram for this part of the experiment.
Set the PID gains in the Pitch Controller and PD gains in the Roll Controller blocks in the Simulink diagram from Part B Step 3 and 4.
Double click the Pitch Command block to open it and change the gain after the Pitch(step) input to 0.
Double click the Roll Command block to open it and change the gain after the Roll(step) input to 0.
Hold the helicopter in a level position before starting the experiment until the fans are in full power.
Double click on the scopes and open them.
Gently disturb the helicopter to see the effect of the controller.
Double click the Pitch Command block to open it and change the gain after the Pitch(step) input to 1 and run the experiment from the level position.
Save the data with a descriptive name such as pitch_command. After saving the data, clear the workspace using the clear command in MatLab window.
Double click the Pitch Command block to open it and change the gain after the Pitch(step) input to 0.
Double click the Roll Command block to open it and change the gain after the Pitch(step) input to 1 and run the experiment from the level position.
Save the data with a descriptive name such as roll_command. After saving the data, clear the workspace using the clear command in MatLab window. Close the Simulink model. DO NOT SAVE THE MODEL.
Open the MATLAB and locate the file Helicopter_PitchRollYaw_PID.mdl under the path C:\AE4610_Controls_Lab\Helicopter and open it. This is the block diagram for this part of the experiment.
Set the PID gains in the Pitch Controller, Roll Controller, and Yaw Rate Controller blocks in the Simulink diagram.
Double click the Pitch Command block to open it and change the gain after the Pitch(step) input to 0.
Double click the Yaw Rate Command block to open it and change the gain after the Yaw(step) inputs to 1.
Hold the helicopter in a level position before starting the experiment until the fans are in full power.
Save the data with a descriptive name such as nonlinear_yaw. After saving the data, clear the workspace using the clear command in MatLab window.
Turn the POWER OFF.
Compare the actual responses with the simulated responses from Part B. Comment on the differences in the responses.
Give a reason why it is better to design a yaw rate controller instead of a yaw attitude controller.
Comment on what one would expect if one were to design the yaw controller rise time to be of the same or less than that of the roll controller.
Include the controller designs, the SIMULINK block diagrams, and the responses from each member of the group clearly marked by the student’s name. Include a controller evaluation section and answer the analysis questions. Make certain that for the analysis, you compare the differences between experimental and simulation responses. There should be a lot to talk about, as this experiment has a lot of variables and non-linear influences. Discuss any discrepancies you observe and any logical reasons for why they exist.
Consider the diagram in Fig. 5.5. For a zero roll angle, the pitching torque is controlled by the forces generated by the two propellers (i.e. ). The body will not rise until the total force is greater than the mass differential force
A sketch of the configuration in 3-D motion is shown in Fig. 5.6. Once the body is in the air with a roll angle (), the equation for pitch () is given by
: moment of inertia of the body about the pitching axis
: force constant of the motor/propeller combination
: distance from the pivot point (longitudinal axis) to the propellers
: distance from the pivot point (longitudinal axis) to the counterweight
: pitch angle measured in radians (positive in the direction indicated in Fig. 5.5)
: roll angle (see Fig. 5.6)
: voltage applied to the right motor resulting in force
: voltage applied to the left motor resulting in force
: Mass differential torque
: mass moment of inertia of the body about the roll axis.
: distance from the roll axis to either motor.
: roll angle measured in radians.
The only way to apply a force in the lateral direction is to roll the helicopter body. Assume that the body rolled to left (positive) by an angle (see Fig. 5.6). The horizontal component of the sum of the rotor forces will cause a torque about the yaw axis which results in a positive yaw acceleration.
: moment of inertia of the body about the yaw axis.
: yaw rate in rad/sec.
where is the sum of the voltages applied to the motors. First, design a PD controller of the form
where is the commanded pitch angle. With this controller, the closed-loop transfer function for pitch is
Comparing Eq. (5.7) with Eq. (5.8), and for desired values of closed-loop pitching motion natural frequency () and damping ratio (), we obtain
We can also include an integral term in the controller (PID controller) to compensate for the mass differential torque . (Above we assumed that the helicopter was perfectly balanced, i.e., , but we need because it is not balanced in the actual experiment. Why don’t we balance it to make this easier? There is a very good reason for it.)
We will tune the integral gain using simulation of the nonlinear system with an initial guess of .
where is the commanded roll angle. The resulting closed-loop transfer function is given by
where and are respectively the desired natural frequency and damping ratio of the closed-loop rolling motion.
The purpose is to design a controller to control the yaw rate of the helicopter by commanding a roll angle. We will first assume that the configuration is in equilibrium, i.e., the sum of the rotor forces is nearly equal to the mass differential force . Note that we will later relax this assumption in the nonlinear simulation. With this assumption, the linearized equation for the yaw dynamics is given by
In order to achieve a desired yaw attitude rate , we design a PI controller that commands the desired roll angle based on a given yaw rate command, as follows:
We assume that roll response () follows the roll command () almost instantaneously (note that this assumption has certain implications on how we design roll and yaw control loops). Assuming , the resulting closed-loop transfer function is given by
Once the proportional gain is determined, we can add the integral term and tune the integral gain through nonlinear simulation of the system.
Design a PID controller for the control of pitch attitude and a PD controller for the control of roll attitude using the system parameters given above. The closed-loop system must meet the following specifications for a step response:
First, pick a value for the peak time and settling time that falls within the above specifications (Note: It is probably a good idea to pick a peak time less than the settling time). Next, using the above equations, calculate the values of the natural frequency and damping . Use Eqs. (5.9) and (5.10) for determining the PD controller gains for the pitch controller. Similarly, use Eqs. (5.15) and (5.16) to determine the PD controller gains for the roll controller. Initially set the integral gain of the pitch controller to a default value of . We will adjust the integral gain later using nonlinear simulation of the system. At the end of Step 1, you should have five gains.
Assuming that the roll angle tracks instantaneously, design a PI controller for control of yaw rate . The closed-loop system must meet the following specification:
Note: For a first-order system, the rise time () is related to the time constant () by the following relation:
Select a value of rise time in the specified range and use Eq. (5.22) to determine the value of time constant (). Then use eq. (5.21) to determine the proportional gain . Use a default value of for the integral gain. We will adjust the integral gain later using nonlinear simulation of the system.
Develop the SIMULINK model for the yaw rate controller. This one is a little different because it does not command motor voltages directly, as the others did. Instead, for a given yaw rate, the controller commands a roll angle. Assume and use Eqs. (5.17) and (5.18) to build a SIMULINK model. Plot yaw rate and yaw attitude (this is integral of yaw rate) responses to a 10 second pulse yaw rate command of 10 deg/sec and verify that the response meets the given specification. If required, adjust the gains.
We will now add nonlinear terms into the SIMULINK model that were not included as part of the initial system. The system was linearized because a linear system is easier to analyze and design. Now, you need to include two nonlinear terms, and , in your model to make it more realistic. Look specifically at pitch and yaw dynamics and consider how roll angle affects them. (Figure 5.6 should help you in this). Also, you need to include the mass differential torque as a constant input to the pitch dynamics. Further, you need to replace by in the yaw dynamics. The commanded roll attitude from the yaw controller becomes input to the roll controller, thus coupling the yaw and roll loops. The propeller force from the pitch controller is multiplied by and therefore becomes the input to the yaw dynamics. Likewise, the propeller force is multiplied by , and therefore becomes the input to the pitch dynamics.
Note: Since the pitch loop includes the constant mass differential torque, include several seconds (say 50-100 seconds) of simulation with zero commands initially so that the system reaches equilibrium by balancing the mass differential force using the propeller force. Adjust your pitch integral gain such that the system reaches equilibrium within the selected 50-100 seconds limit.
To build the model, click the down arrow on Monitor & Tune under the Hardware tab and then click Build for monitoring . This generates the controller code.
Press Connect button under Monitor & Tune and then press Start . Check if the controller can maintain the attitude of the helicopter.
To build the model, click the down arrow on Monitor & Tune under the Hardware tab and then click Build for monitoring . This generates the controller code.
Press Connect button under Monitor & Tune and then press Start .