0% found this document useful (0 votes)
7 views

Final Report

Uploaded by

Ijaj Ahmed
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Final Report

Uploaded by

Ijaj Ahmed
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

PROJECT REPORT

ON

A Simple Model of Helicopter Dynamics for the


Implementation of Onboard Various Filter and
Controllability Algorithms
Submitted by:

SWARNABHA PRAMANIK(002110801221)

Supervised by:
Sci/Engr. PRAKHAR GUPTA

DEPARTMENT OF ELECTRICAL ENGINEERING

JADAVPUR UNIVERSITY
JADAVPUR UNIVERSITY
DEPARTMENT OF ELECTRICAL ENGINEERING

CERTIFICATE

I hereby submit the project entitled “A Simple Model of Helicopter


Dynamics for the Implementation of Onboard Various Filter and
Controllability Algorithms” in the U.R. RAO SATELLITE CENTER
under the supervision of Sci/Engr. PRAKHAR GUPTA, Control System
Group, Bengaluru India.

SWARNABHA PRAMANIK(002110801221)

The project report is hereby approved for submission.


Acknowledgment
I would like to express my profound gratitude to Mr. Prakhar Gupta, my project guide from
the Control System Group at the URSC, for his invaluable guidance, constant support, and
encouragement throughout this project. His deep knowledge, constructive feedback, and
insightful suggestions were instrumental in the successful completion of this report.

I am also thankful to the entire Control System Group for providing a collaborative
environment and the necessary resources that facilitated my research. Their assistance and
cooperation have been crucial at various stages of the project.

Finally, I would like to extend my thanks to my family, friends, and colleagues for their
unwavering support and understanding during this time. Their motivation and
encouragement have been a source of strength for me throughout this journey.

Thank you all for your contributions and support.

SWARNABHA PRAMANIK
Introduction:
The exploration of Mars has advanced significantly with the advent of innovative
technologies, among which aerial robotics stands out. One notable development is the use of
the rotorcraft, exemplified by the Mars Helicopter Ingenuity, which was successfully
deployed during the Mars 2020 mission. Non-coaxial systems, featuring multiple rotors
mounted separately, provide several advantages in the thin Martian atmosphere, such as
improved maneuverability and redundancy.

Modelling the dynamics of a simple Mars helicopter is crucial for understanding its
behaviour and enhancing its performance. This model is the foundation for implementing
various onboard filters and controllability algorithms. Filters are essential for processing
sensor data, mitigating noise, and providing accurate state estimates, which are critical
for navigation and control. Controllability algorithms, on the other hand, ensure that the
helicopter can achieve desired flight trajectories and maintain stability under varying
conditions.

This study aims to develop a comprehensive dynamic model of a simple non-coaxial


Mars helicopter, focusing on its key components and interactions. Simulating the
helicopter’s dynamics allows us to analyze its response to different control inputs and
environmental disturbances. The model will incorporate factors unique to the Martian
environment, such as reduced gravity and low atmospheric density, which significantly
influence the helicopter's performance.

Furthermore, this research will explore the implementation of advanced onboard filters,
such as Kalman filters and complementary filters, to enhance the reliability of sensor
data. These filters are integral to the helicopter's navigation system, providing real-time
corrections and ensuring precise control. Additionally, the study will evaluate various
controllability algorithms, including proportional-integral-derivative (PID) controllers
and model predictive control (MPC), to determine their effectiveness in maintaining
flight stability and achieving mission objectives.

By developing and validating a dynamic model for a non-coaxial Mars helicopter, this
research aims to contribute to the design and operation of future Martian aerial missions.
The insights gained from this study will not only improve the performance of Mars
helicopters but also provide a framework for the development of similar aerial vehicles
for exploration in other planetary environments.
Overview of a Small Unmanned
Helicopter
A small unmanned helicopter is a sophisticated and efficient aviation device, ideal for a
range of applications such as surveillance, mapping, inspection, and delivery. Unlike multi-
rotor drones, this type of helicopter typically features a single main rotor and a tail rotor for
stability and control. This report provides a detailed description of the various parts of a
small unmanned helicopter.

1. Fuselage
The fuselage is the central body of the helicopter, serving as the primary structure
that houses and protects the helicopter's internal components. It is designed to be
lightweight yet robust, ensuring aerodynamic efficiency and structural integrity.

Key Components:
• Central Frame: The backbone of the helicopter, made from lightweight materials
such as carbon fiber or aluminum, providing strength and rigidity.

• Payload Bay: A dedicated space for carrying various payloads such as cameras,
sensors, or other specialized equipment. The payload bay is designed to be modular,
allowing for quick changes and adaptability to different missions.

• Battery Compartment: Secure housing for the batteries that power the
helicopter, designed to facilitate easy access for battery replacement and
maintenance.

• Protective Shell: Often streamlined and aerodynamically shaped to minimize


drag and protect internal components from environmental factors.
2. Rotor System
The rotor system is the defining feature of this type of helicopter. It consists of a
single main rotor for lift and a tail rotor for counteracting torque and providing
directional control.

Key Components:
• Main Rotor: A set of rotor blades that provide lift and thrust. These blades are
typically made from composite materials to ensure strength and lightweight.

• Rotor Mast: The central shaft that supports and drives the main rotor. The mast is
engineered to handle the mechanical stresses and torque generated by the rotor.
• Swashplate Assembly: A crucial mechanism that translates control inputs into
changes in rotor blade pitch. The swashplate assembly adjusts the pitch of the main rotor
blades to control lift and direction.
• Tail Rotor: A smaller rotor mounted on the tail boom, responsible for counteracting
the torque produced by the main rotor and providing yaw control.
• Rotor Hub: Connects the rotor blades to the rotor mast and houses the pitch control
mechanisms.

3. Power System
The power system supplies the energy necessary to turn the rotors and operate
other onboard systems. Small unmanned helicopters typically utilize electric motors
powered by high-density batteries.

Key Components:
• Electric Motors: High-efficiency brushless motors that drive the rotors. These
motors are chosen for their reliability, power-to-weight ratio, and low maintenance
requirements.

• LiPo Batteries: Lithium-polymer batteries that provide a high energy density,


essential for achieving extended flight times. They are equipped with safety features
to prevent overheating and overcharging.

• Electronic Speed Controllers (ESCs): Devices that regulate the power supplied
to the motors, allowing for precise control of rotor speeds and smooth operation.
4. Transmission System
In a small unmanned helicopter, the transmission system efficiently transfers power
from the motors to the rotors, ensuring smooth and reliable operation.

Key Components:
• Gears and Belts: High-strength gears and timing belts that transmit power from the
motors to the rotor shafts. These components are designed to minimize mechanical losses
and ensure efficient power transfer.

• Drive Shafts: Connect the motors to the rotors, transmitting rotational energy. They
are engineered to withstand high torque and rotational speeds.

5. Flight Control System


The flight control system is the brain of the helicopter, responsible for maintaining stability
and executing commands from the ground station. It integrates various sensors and control
algorithms to ensure precise and responsive flight.

Key Components:
• Flight Controller: An advanced onboard computer that processes inputs from the pilot
and sensors. It runs algorithms to maintain stability, control the rotors, and execute flight
plans.

• Gyroscopes and Accelerometers: Inertial sensors that measure the helicopter’s


orientation and acceleration, providing critical data for stability control.
• GPS Module: Provides accurate positional data for navigation, enabling autonomous
flight operations and waypoint tracking.
• Altitude Sensors: Such as barometers and LiDAR, which measure the helicopter’s
altitude above ground level for precise altitude hold and obstacle avoidance.

6. Avionics and Instrumentation


The avionics suite includes the electronic systems used for communication,
navigation, and monitoring of the helicopter’s performance.

Key Components:
• • Telemetry System: Transmits real-time data about the helicopter’s status, including
battery voltage, motor temperatures, and GPS coordinates, to the ground station for
monitoring and control.
• Camera and Sensors: High-resolution cameras and specialized sensors (such as
infrared, multispectral, or LiDAR) for capturing data relevant to the helicopter's mission.
• Communication Systems: Radios and antennas for maintaining a reliable link
between the helicopter and the ground control station. This includes both command and
control communications as well as data transmission from onboard sensors.

7. Landing Gear
The landing gear supports the helicopter on the ground and absorbs the impact of landing.
It is designed to be lightweight yet durable, providing stability during takeoff and landing.

Key Components:
• • Skid Landing Gear: Simple and robust, made from materials like aluminum or
composite plastics. Skid landing gear is common in small unmanned helicopters due to its
durability and ease of use.

• Shock Absorbers: In some designs, integrated into the skids to reduce the impact
forces during landing, protecting the helicopter’s delicate components..

8. Tail Section
The tail section plays a crucial role in providing stability and housing additional
components.

Key Components:
• Tail Boom: Supports the tail rotor and stabilizers, and may house additional sensors or
antennas. The tail boom also improves the overall aerodynamic profile of the helicopter.

• Horizontal Stabilizer: Provides stability in the pitch axis, helping to maintain level
flight.
• Vertical Stabilizer: Assists in maintaining directional stability, especially during
forward flight.

A small unmanned helicopter is a versatile and technologically advanced device


designed for efficient and stable vertical flight. Its rotor system, combining a main
rotor and a tail rotor, enhances stability and maneuverability. Understanding the
various parts of the helicopter and their functions is crucial for operators, engineers,
and enthusiasts to appreciate the complexity and capabilities of unmanned
helicopter design and operation.
In the next section, we are going to discuss the equations to study a simple
model of helicopter dynamics and certain assumptions that we have taken to
study it.

Helicopter Dynamics Equations and


Their Significance

Forces and Moments Calculation:


Total Velocity:
V = sqrt(u^2 + v^2 + w^2) + 1x10^-6
u: velocity along the x-axis.
v: velocity along the y-axis.
w: velocity of the helicopter along the vertical (z-axis) direction. This component
includes both climb velocity as well as induced velocity.
Significance: Computes the total velocity of the helicopter relative to the body
coordinate frame.
- 1x10^-6 is added to avoid the division by 0 problems during the linearization of
the model

Drag Force:
D = 0.5 * rho * V^2 * C* Cd
rho: the air density.
C: the blade chord
Cd: drag coefficient
Significance: Calculates the drag force experienced by the helicopter. This force acts
in the opposite direction of the motion relative to the body frame.

Lift Force from One Rotor:


L = Cl * C*0.5 * rho * V^2 * sin(collective)
Cl: lift coefficient
Significance: Determines the lift force one rotor generates based on the collective
pitch angle. This lift is relative to the body frame.

Force Components in Body Frame:


Force Components:
X = -D * u / V + total_lift * sin(cyclic_lat)
Y = -D * v / V + total_lift * sin(cyclic_lon)
Z = -total_lift
Significance: Calculates the force components in the body frame for the helicopter.
- X: Longitudinal force component considering drag and lateral cyclic input.
- Y: Lateral force component considering drag and longitudinal cyclic input.
- Z: Vertical force component (opposite to lift force).
Assumption: Values of cyclic_lat and cyclic_lon are very small .

Moments:
Moment Components:
Moments (corrected with gyroscopic effects)

Mx = Ixx * p*q + Ixz * r * q + cyclic_lat;

My = Iyy * q *r + cyclic_lon;

Mz = Izz * r * p + Ixz * p * q + yaw_pitch;


Significance: Computes the moments around the three axes in the body frame.
- Mx: Moment about the x-axis (roll).
- My: Moment about the y-axis (pitch).
- Mz: Moment about the z-axis (yaw).
Where the instantaneous angular velocity vector is defined in the body fixed system
as
ω = pi + qj + rk
Assumption: Values of cyclic_lat, yaw_pitch, and cyclic_lon are very small and It is
assumed that a small amount of moment is contributed by cyclic and yaw pitch
equivalent to their value in Mx, My, and Mz respectively.
Translational Accelerations:
Translational Accelerations:
u_dot = r * v - q * w - g * sin(theta) + X / mass
v_dot = p * w - r * u + g * sin(phi) * cos(theta) + Y / mass
w_dot = q * u - p * v + g * cos(phi) * cos(theta) + Z / mass
Significance: These equations describe the rate of change of translational velocities
in the body frame.
- u_dot: Longitudinal acceleration.
- v_dot: Lateral acceleration.
- w_dot: Vertical acceleration.
Where the instantaneous angular velocity vector is defined in the body fixed system
as
ω = pi + qj + rk

Rotational Accelerations:
Rotational Accelerations:
p_dot = (Iyy - Izz) / Ixx * q * r/collective- Ixz / Ixx * r^2 /collective+ Ixz / Ixx *
q^2/collective + Mx / Ixx
q_dot = (Izz - Ixx) / Iyy * p * r/collective + Ixz / Iyy * p * q/collective - Ixz / Iyy * r *
q/collective+ My / Iyy
r_dot = (Ixx - Iyy) / Izz * p * q/collective+ Ixz / Izz * p * r/collective- Ixz / Izz * q *
p/collective+ Mz / Izz
Significance: These equations describe the rate of change of rotational velocities in
the body frame.
- p_dot: Roll acceleration.
- q_dot: Pitch acceleration.
- r_dot: Yaw acceleration.

Angular Rates:
Angular Rates:
phi_dot = p + q * sin(phi) * tan(theta) + r * cos(phi) * tan(theta)
theta_dot = q * cos(phi) - r * sin(phi)
psi_dot = q * sin(phi) / cos(theta) + r * cos(phi) / cos(theta)
Significance: These equations describe the rate of change of the Euler angles
(orientation angles) in the inertial frame.
- phi_dot: Roll rate.
- theta_dot: Pitch rate.
- psi_dot: Yaw rate.
The attitude or orientation of the helicopter with respect to the earth-fixed
system(inertial frame) is given by three angles. Since finite rotations are not vector
quantities, these angles are not unique, and the rotation sequence commonly used in
flight dynamics is yaw–pitch–roll (ψ, θ, ϕ)

Position Derivatives:

Position Derivatives:
x_dot = u * cos(theta) * cos(psi) + v * (sin(phi) * sin(theta) * cos(psi) - cos(phi) * sin(psi)) +
w * (cos(phi) * sin(theta) * cos(psi) + sin(phi) * sin(psi))
y_dot = u * cos(theta) * sin(psi) + v * (sin(phi) * sin(theta) * sin(psi) + cos(phi) * cos(psi)) +
w * (cos(phi) * sin(theta) * sin(psi) - sin(phi) * cos(psi))
z_dot = -u * sin(theta) + v * sin(phi) * cos(theta) + w * cos(phi) * cos(theta)
Significance: These equations describe the rate of change of the helicopter's position in the
inertial (external static) frame.
- x_dot: Change in x-position.
- y_dot: Change in y-position.
- z_dot: Change in z-position.
The attitude or orientation of the helicopter with respect to the earth-fixed system(inertial
frame) is given by three angles. Since finite rotations are not vector quantities, these angles
are not unique, and the rotation sequence commonly used in flight dynamics is yaw–pitch–
roll (ψ, θ, ϕ)

NOTE:
- Body Frame: Used for forces, moments, translational accelerations, and rotational
accelerations (u, v, w, p, q, r).
- Inertial Frame: Used for angular position and angular rates (phi_dot, theta_dot, psi_dot)
and position and position derivatives (x_pos, y_pos, z_pos).
- collective: collective pitch angle.
- yaw_pitch: Yaw pitch angle.
- cyclic_lon: cyclic longitudinal pitch angle.
- cyclic_lat : latitudinal cyclic pitch angle.
[ These 4 types of pitch angles are discussed in the next section in detail]
-
Fig: The body axis system for
Physical Significance of Collective, Yaw,
Cyclic Longitudinal, and Cyclic Lateral
Controls in a Single Rotor Helicopter
Collective Pitch Control
Definition:
Collective pitch control adjusts the pitch angle of all main rotor blades
simultaneously.

Physical Effect:
• Lift: Increasing collective pitch increases the angle of attack of the main rotor
blades, generating more lift. This allows the helicopter to ascend vertically or
decrease lift for descent.
• Thrust: Lift generated perpendicularly by the rotor also contributes to thrust in
the direction aligned with the rotor axis.

Control Mechanism:
Pilots use a collective lever to change the pitch angles of the rotor blades
simultaneously, adjusting lift and thrust collectively.

Yaw Control
Definition:
Yaw control adjusts the pitch of the tail rotor blades to control yaw motion.

Physical Effect:
• Yaw Movement: By varying the pitch of the tail rotor blades, yaw control rotates
the helicopter around its vertical axis (yaw), controlling its heading.
• Torque Management: The tail rotor counteracts the torque produced by the main
rotor, ensuring stable yaw control and compensating for the torque induced by the
main rotor operation.

Control Mechanism:
Pilots use pedals to adjust the yaw, influencing the directional stability and heading
of the helicopter.

Cyclic Longitudinal Pitch (Cyclic Lon)


Definition:
Cyclic longitudinal pitch adjusts the pitch angle of the main rotor blades cyclically as
they rotate, emphasizing longitudinal tilt adjustments.

Physical Effect:
• Forward/Backward Tilt: By cyclically adjusting blade pitch longitudinally, the
rotor disk tilts forward or backward, generating forward or backward thrust.
• Directional Control: This control allows the helicopter to move forward or
backward, crucial for translational motion.

Control Mechanism:
Pilots use a cyclic stick to adjust longitudinal cyclic pitch, influencing the
helicopter's forward or backward movement by adjusting rotor tilt.

Cyclic Lateral Pitch (Cyclic Lat)


Definition:
Cyclic lateral pitch adjusts the pitch angle of the main rotor blades cyclically with
lateral emphasis.

Physical Effect:
. • Side Tilt: By cyclically adjusting blade pitch laterally, the rotor disk tilts to the left
or right, generating lateral thrust.
• Directional Control: This control allows the helicopter to roll left or right,
facilitating lateral movement

Control Mechanism:
Pilots use a cyclic stick to adjust lateral cyclic pitch, influencing the helicopter's
lateral movement by adjusting rotor tilt.
Summary of Controls:
• Collective Pitch: Controls vertical movement by adjusting lift and thrust
collectively.
• Yaw Pitch: Controls yaw motion by adjusting tail rotor pitch to balance main rotor
torque.
• Cyclic Longitudinal Pitch: Controls forward/backward tilt for translational motion.
• Cyclic Lateral Pitch: Controls left/right tilt for lateral movement.

These controls are fundamental for maneuvering a single-rotor helicopter in three-


dimensional space, allowing pilots to adjust lift, thrust, and directional stability
effectively during flight operations.

Code for Simulation and Result:


In this section, we are going to see the code and some results regarding the simple
dynamic model of the helicopter.

MATLAB Code:
clc;
clear;

% Define symbolic variables


syms u v w p q r phi theta psi x_pos y_pos z_pos real
syms collective cyclic_lat cyclic_lon yaw_pitch real

% Constants
mass = 500; % Mass of the helicopter in kg
Ixx = 1000; % Moment of inertia around x-axis
Iyy = 1200; % Moment of inertia around y-axis
Izz = 800; % Moment of inertia around z-axis
Ixz = 100; % Cross product of inertia
g = 9.81; % Acceleration due to gravity
rho = 1.225; % Air density in kg/m^3
S = 20; % Rotor area in m^2
Cd = 0.25; % Drag coefficient
Cl = 1.25; % Lift coefficient
omega = 300; % Rotor angular velocity in rad/s
C = 0.4;

% State vector
x = [u; v; w; p; q; r; phi; theta; psi; x_pos; y_pos;
z_pos];
% Control input vector
u_vec = [collective; cyclic_lat; cyclic_lon;
yaw_pitch];

% Forces and moments


V = sqrt(u^2 + v^2 + w^2) + 1e-6; % Total velocity
(with offset to avoid zero)

D = 0.5 *C* rho * V^2 * Cd; % Drag force


L = Cl *C* 0.5 * rho * V^2 * sin(collective); % Lift
force from one rotor

% Force components in body frame


X = -D * u / V + total_lift * sin(cyclic_lat);
Y = -D * v / V + total_lift * sin(cyclic_lon);
Z = -total_lift;

% Moments (corrected with gyroscopic effects)


Mx = Ixx * p*q + Ixz * r * q + cyclic_lat;
My = Iyy * q *r + cyclic_lon;
Mz = Izz * r * p + Ixz * p * q + yaw_pitch;
% Translational accelerations
u_dot = r * v - q * w - g * sin(theta) + X / mass;
v_dot = p * w - r * u + g * sin(phi) * cos(theta) + Y /
mass;
w_dot = q * u - p * v + g * cos(phi) * cos(theta) + Z /
mass;

% Rotational accelerations
% Rotational accelerations
p_dot = (Iyy - Izz) / Ixx * q * r/collective- Ixz /
Ixx * r^2 /collective+ Ixz / Ixx * q^2/collective + Mx
/ Ixx;
q_dot = (Izz - Ixx) / Iyy * p * r/collective + Ixz
/ Iyy * p * q/collective - Ixz / Iyy * r *
q/collective+ My / Iyy;
r_dot = (Ixx - Iyy) / Izz * p * q/collective+ Ixz /
Izz * p * r/collective- Ixz / Izz * q * p/collective+
Mz / Izz;

% Angular rates
phi_dot = p + q * sin(phi) * tan(theta) + r * cos(phi)
* tan(theta);
theta_dot = q * cos(phi) - r * sin(phi);
psi_dot = q * sin(phi) / cos(theta) + r * cos(phi) /
cos(theta);

% Position derivatives
x_dot = u * cos(theta) * cos(psi) + v * (sin(phi) *
sin(theta) * cos(psi) - cos(phi) * sin(psi)) + w *
(cos(phi) * sin(theta) * cos(psi) + sin(phi) *
sin(psi));
y_dot = u * cos(theta) * sin(psi) + v * (sin(phi) *
sin(theta) * sin(psi) + cos(phi) * cos(psi)) + w *
(cos(phi) * sin(theta) * sin(psi) - sin(phi) *
cos(psi));
z_dot = -u * sin(theta) + v * sin(phi) * cos(theta) + w
* cos(phi) * cos(theta);

% State derivatives
f = [u_dot; v_dot; w_dot; p_dot; q_dot; r_dot; phi_dot;
theta_dot; psi_dot; x_dot; y_dot; z_dot];

% Calculate Jacobians
A = jacobian(f, x);
B = jacobian(f, u_vec);

% Define the equilibrium point


u0 = 0.01; v0 = 0.01; w0 = 0.01; % Initial velocities
p0 = 0.01; q0 = 0.01; r0 = 0.01; % Initial angular
rates
phi0 = 0.01; theta0 = 0.01; psi0 = 0.01; % Initial
angles
x0 = 0.01; y0 = 0.01; z0 = 0.01; % Initial positions
collective0 = deg2rad(10); % Collective pitch angle
cyclic_lat0 = deg2rad(5); % Lateral cyclic pitch angle
cyclic_lon0 = deg2rad(2); % Longitudinal cyclic pitch
angle
yaw_pitch0 = deg2rad(1); % Yaw pitch control (Nm)

% Substitute equilibrium points into Jacobians


subs_vars = [u, v, w, p, q, r, phi, theta, psi, x_pos,
y_pos, z_pos, collective, cyclic_lat, cyclic_lon,
yaw_pitch];
subs_vals = [u0, v0, w0, p0, q0, r0, phi0, theta0,
psi0, x0, y0, z0, collective0, cyclic_lat0,
cyclic_lon0, yaw_pitch0];
A = subs(A, subs_vars, subs_vals);
B = subs(B, subs_vars, subs_vals);

% Convert symbolic matrices to numerical


A = double(A);
B = double(B);

% Display the results


disp('State matrix A:');
disp(A);
disp('Input matrix B:');
disp(B);

% Simulation
% Initial conditions
x0 = [0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0];

% Control inputs (replace with your values)


u_vec = [deg2rad(5); deg2rad(4); deg2rad(8);
deg2rad(5)];

% Time span for the simulation


tspan = [0 500]; % Simulate from 0 to 500 seconds

% Solver options
options = odeset('RelTol',1e-3,'AbsTol',1e-6);

% Solve the differential equations using a stiff solver


[t, x] = ode45(@(t, x) helicopter_dynamics(t, x,
u_vec), tspan, x0, options);

% Extract positions
x_pos = x(:, 10);
y_pos = x(:, 11);
z_pos = x(:, 12);

% Plot the trajectory


figure;
plot3(x_pos, y_pos, z_pos, 'LineWidth', 2);
grid on;
xlabel('X Position (m)');
ylabel('Y Position (m)');
zlabel('Z Position (m)');
title('Helicopter Trajectory');

% Plot the results


figure;
subplot(3, 1, 1);
plot(t, x(:, 1:3));
title('Translational Velocities');
xlabel('Time (s)');
ylabel('Velocity (m/s)');
legend('u', 'v', 'w');

subplot(3, 1, 2);
plot(t, x(:, 4:6));
title('Angular Rates');
xlabel('Time (s)');
ylabel('Angular Rate (rad/s)');
legend('p', 'q', 'r');

subplot(3, 1, 3);
plot(t, x(:, 7:9));
title('Euler Angles');
xlabel('Time (s)');
ylabel('Angle (rad)');
legend('phi', 'theta', 'psi');

% Calculate eigenvalues of A
eigenvalues = eig(A);

% Check stability
if all(real(eigenvalues) < 0)
disp('The system is stable.');
else
disp('The system is unstable.');
end

n = size(A, 1); % Number of states


m = size(B, 2); % Number of inputs
C = ctrb(A, B); % Controllability matrix

if rank(C) == n
disp('The system is controllable.');
else
disp('The system is not controllable.');
end

function dxdt = helicopter_dynamics(t, x, u_vec)


% Extract state variables
u = x(1);
v = x(2);
w = x(3);
p = x(4);
q = x(5);
r = x(6);
phi = x(7);
theta = x(8);
psi = x(9);
x_pos = x(10);
y_pos = x(11);
z_pos = x(12);

% Extract control inputs


collective = u_vec(1);
cyclic_lat = u_vec(2);
cyclic_lon = u_vec(3);
yaw_pitch = u_vec(4);

% Constants
mass = 500; % Mass of the helicopter in kg
Ixx = 1000; % Moment of inertia around x-axis
Iyy = 1200; % Moment of inertia around y-axis
Izz = 800; % Moment of inertia around z-axis
Ixz = 100; % Cross product of inertia
g = 9.81; % Acceleration due to gravity
rho = 1.225; % Air density in kg/m^3
S = 20; % Rotor area in m^2
Cd = 0.25; % Drag coefficient
Cl = 1.25; % Lift coefficient
omega = 300; % Rotor angular velocity in rad/s
C = 0.4;
% Forces and moments
V = sqrt(u^2 + v^2 + w^2) + 1e-6; % Total velocity
(with offset to avoid zero)
D = 0.5 *C* rho * V^2 * Cd; % Drag force
L = Cl *C* 0.5 * rho * V^2 * sin(collective); % Lift
force from one rotor
% Since it's a coaxial rotor, lift is generated by
both rotors
total_lift = 2 * L;

% Force components in body frame


X = -D * u / V + total_lift * sin(cyclic_lat);
Y = -D * v / V + total_lift * sin(cyclic_lon);
Z = -total_lift;

% Moments (corrected with gyroscopic effects)


Mx = Ixx * p*q + Ixz * r * q + cyclic_lat;
My = Iyy * q *r + cyclic_lon;
Mz = Izz * r * p + Ixz * p * q + yaw_pitch;
% Translational accelerations
u_dot = r * v - q * w - g * sin(theta) + X / mass;
v_dot = p * w - r * u + g * sin(phi) * cos(theta) +
Y / mass;
w_dot = q * u - p * v + g * cos(phi) * cos(theta) +
Z / mass;

% Rotational accelerations
p_dot = (Iyy - Izz) / Ixx * q * r/collective- Ixz /
Ixx * r^2 /collective+ Ixz / Ixx * q^2/collective + Mx
/ Ixx;
q_dot = (Izz - Ixx) / Iyy * p * r/collective + Ixz
/ Iyy * p * q/collective - Ixz / Iyy * r *
q/collective+ My / Iyy;
r_dot = (Ixx - Iyy) / Izz * p * q/collective+ Ixz /
Izz * p * r/collective- Ixz / Izz * q * p/collective+
Mz / Izz;

% Angular rates
phi_dot = p + q * sin(phi) * tan(theta) + r *
cos(phi) * tan(theta);
theta_dot = q * cos(phi) - r * sin(phi);
psi_dot = q * sin(phi) / cos(theta) + r * cos(phi)
/ cos(theta);

% Position derivatives
x_dot = u * cos(theta) * cos(psi) + v * (sin(phi) *
sin(theta) * cos(psi) - cos(phi) * sin(psi)) + w *
(cos(phi) * sin(theta) * cos(psi) + sin(phi) *
sin(psi));
y_dot = u * cos(theta) * sin(psi) + v * (sin(phi) *
sin(theta) * sin(psi) + cos(phi) * cos(psi)) + w *
(cos(phi) * sin(theta) * sin(psi) - sin(phi) *
cos(psi));
z_dot = -u * sin(theta) + v * sin(phi) * cos(theta)
+ w * cos(phi) * cos(theta);

% State derivatives
dxdt = [u_dot; v_dot; w_dot; p_dot; q_dot; r_dot;
phi_dot; theta_dot; psi_dot; x_dot; y_dot; z_dot];
end

This code not only simulates the dynamics of a simple helicopter for the study of
various onboard filters and controllability algorithms but also transforms the model
into the state space model from the non-linear model by finding the values of A and
B respectively.

X˙ = AX + Bu

where X is the state vector, A is the system matrix, B is the control input matrix, and
u is the control input vector.

Result:

Fig: Trajectory for hover case (t=500s and collective pitch = 5 degrees)
Fig: Trajectory for a normal case (t= 500s and collective pitch = 5˚, cyclic
longitudinal pitch = 1˚, cyclic longitudinal pitch = 2˚, yaw pitch = 1˚)

Fig: Values of A and B


Conclusion:
In this report, we have comprehensively analyzed the dynamics and control
mechanisms of a single-rotor helicopter. By delving into the physical significance of
the collective, yaw, cyclic longitudinal, and cyclic lateral controls, we have provided
a detailed understanding of how these controls influence the helicopter's flight
behavior. The MATLAB code presented offers a practical approach to simulate the
helicopter's dynamics, demonstrating the stability and controllability of the system
through eigenvalue analysis and the calculation of the controllability matrix.

The collective pitch control was shown to be crucial for vertical movements by
adjusting the lift and thrust. Yaw control, achieved through the tail rotor, plays a
vital role in managing the helicopter's heading and counteracting the main rotor's
torque. Cyclic longitudinal and lateral controls facilitate forward/backward and
left/right movements, respectively, by tilting the rotor disk in the desired direction.

Our simulation results validate the theoretical framework, highlighting the


interdependence of various controls in achieving stable and controlled flight. The
stability analysis confirmed that the helicopter model is stable under the given
conditions, and the controllability test verified that the system is fully controllable.

In conclusion, this study not only elucidates the fundamental principles governing
helicopter flight but also provides a robust simulation model for further exploration
and development in helicopter dynamics and control systems. This knowledge is
essential for both the design of advanced helicopter systems and the training of
pilots to ensure safe and efficient flight operations.
References:
• Modeling and Control of a Simulated Flight of a Mini Helicopter Using
Matlab/Simulink: Mohamed Yacine Chachou, ZhiWen Liu, ZhiGuo Zhou,
Abdelali Benchalal, Chemseddine Zerfaoui
• Fundamentals of Helicopter Dynamics: C. VENKATESAN
• Planar Trajectory Tracking Controller for a Small-sized Helicopter
Considering Servos and Delay Constraints: Hamid Teimoori, Hemanshu R.
Pota, Matt Garratt, and Mahendra K. Samal
• A STUDY OF THE FLIGHT DYNAMICS HELICOPTER CARRYING AN
EXTERNAL LOAD USING BIFURCATION THEORY AND CONTINUATION
METHOD: Krzysztof Sibilski

You might also like