indicating regions of flutter (F), and divergence (D)
3 commentaires
Hi Nikko,
Please see my solutions to your comments “Now, however, I'm getting a 'Index in position 2 exceeds array bounds' error for the 1/Ω divergence boundries and I'm not sure if I've defined its analysis correctly according to its definition [ The 1/Ω divergence was observed at the region in which ωΘ or ωΨ was close to 1/Ω as the eigenvalue can be expected close to 1/Ω. Additionally, it was observed at the region with low values of ωΘ and ωΨ, which was present inside the classical flutter region] , and also my flutter analysis doesn't look like the reference plot.”
Index in position 2 exceeds array bounds error
The index in position 2 exceeds the array bounds means that the code is trying to access an element in an array using an index that is larger than the size of the array. Upon reviewing the code, I have identified the line where the error is occurring. The error was happening in the following line:scatter(Rdivergence_map(:,2), Rdivergence_map(:,3), 'filled', 'g'); To fix this error, make sure that the indices used to access the elements in the Rdivergence_map array are within the array bounds. Looking at the code, it seems that the Rdivergence_map array is not being populated correctly. This is because the condition for adding elements to the Rdivergence_map array is incorrect. The condition abs(r(k) - freq_1_over_Omega) < 1e-5 should have been modified to abs(real(r(k)) - freq_1_over_Omega) < 1e-5 to compare the real part of r(k) with freq_1_over_Omega. The error was also attributed towards the plot section of your code and few warnings displayed while executing your code, so I had to make modifications in the plotting section of the code as well. Here is the updated code. The modified code below should run now with no errors.
% Define parameters N = 2; % Number of blades
I_thetaoverI_b = 2; % Moment of inertia pitch axis over I_b I_psioverI_b = 2; % Moment of inertia yaw axis over I_b
C_thetaoverI_b = 0.00; % Damping coefficient over I_b C_psioverI_b = 0.00; % Damping coefficient over I_b
h = 0.3; % rotor mast height, wing tip spar to rotor hub hoverR = 0.34; R = h / hoverR;
gamma = 4; % lock number
V = 325; % the rotor forward velocity [knots] Omega = V/R; % the rotor rotational speed [RPM]
freq_1_over_Omega = 1 / Omega;
%the flap moment aerodynamic coefficients for large V M_b = -(1/10)*V; M_u = 1/6;
%the propeller aerodynamic coefficients H_u = V/2;
% Frequency ranges f_pitch= 0.01:5:140; f_yaw= 0.01:5:140;
% Time periods for pitch and yaw T_pitch = 1 ./ (2 * pi * f_pitch); T_yaw = 1 ./ (2 * pi * f_yaw);
divergence_map = []; Rdivergence_map = []; unstable = [];
% Modify the loop to iterate over time points for i = 1:length(T_pitch) for j = 1:length(T_yaw)
T = max(T_pitch(i), T_yaw(j)); % Use the maximum period to cover all dynamics t_steps = linspace(0, T, 100); % Time steps within one period
for t = t_steps % Angular frequencies for the current time point w_omega_pitch = 2 * pi / T_pitch(i); w_omega_yaw = 2 * pi / T_yaw(j);
K_psi = (w_omega_pitch^2) * I_psioverI_b; K_theta = (w_omega_yaw^2) * I_thetaoverI_b;
% Calculate matrices at time t using harmonic motion expressions phi = 2 * pi * t / T; % Phase variation over the period
% Define inertia matrix [M] M_matrix = [I_thetaoverI_b + 1 + cos(2*phi), -sin(2*phi); -sin(2*phi), I_psioverI_b + 1 - cos(2*phi)];
% Define damping matrix [D] D11 = h^2*gamma*H_u*(1 - cos(2*phi)) - gamma*M_b*(1 + cos(2*phi)) - (2 + 2*h*gamma*M_u)*sin(2*phi); D12 = h^2*gamma*H_u*sin(2*phi) + gamma*M_b*sin(2*phi) - 2*(1 + cos(2*phi)) - 2*h*gamma*M_u*cos(2*phi); D21 = h^2*gamma*H_u*sin(2*phi) + gamma*M_b*sin(2*phi) + 2*(1 - cos(2*phi)) - 2*h*gamma*M_u*cos(2*phi); D22 = h^2*gamma*H_u*(1 + cos(2*phi)) - gamma*M_b*(1 - cos(2*phi)) + (2 + 2*h*gamma*M_u)*sin(2*phi);
D_matrix = [D11, D12; D21, D22];
% Define stiffness matrix [K] K11 = K_theta - h*gamma*V*H_u*(1 - cos(2*phi)) + gamma*V*M_u*sin(2*phi); K12 = -h*V*gamma*H_u*sin(2*phi) + gamma*V*M_u*(1 + cos(2*phi)); K21 = -h*gamma*V*H_u*sin(2*phi) - gamma*V*M_u*(1 - cos(2*phi)); K22 = K_psi - h*gamma*V*H_u*(1 + cos(2*phi)) - gamma*V*M_u*sin(2*phi);
K_matrix = [K11, K12; K21, K22];
% Compute the system matrices M11 = M_matrix(1, 1); M12 = M_matrix(1, 2); M21 = M_matrix(2, 1); M22 = M_matrix(2, 2); D11 = D_matrix(1, 1); D12 = D_matrix(1, 2); D21 = D_matrix(2, 1); D22 = D_matrix(2, 2); K11 = K_matrix(1, 1); K12 = K_matrix(1, 2); K21 = K_matrix(2, 1); K22 = K_matrix(2, 2);
P0 = M11*M22-M12*M21; P1 = (- D11*M22*1j - D22*M11*1j + M12*D21*j + D12*M21*j); P2 = (D11*D22*(1j)^2 - K22*M11 - K11*M22 - D12*D21*(1j)^2 + M12*K21 + M21*K12); P3 = (D11*K22*1j - D12*K21*1j - D21*K12*1j + D22*K11*1j); P4 = K11*K22 - K12*K21;
P = roots([P0, P1, P2, P3, P4]);
r = 1 * P;
% Flutter for k = 1:length(r) if (real(r(k)) > 0) if (imag(r(k)) <= 0) unstable = [unstable; t, K_psi, K_theta];
% Proximity check for 1/Ω divergence
if abs(real(r(k)) - freq_1_over_Omega) < 1e-5 Rdivergence_map = [Rdivergence_map; t, K_psi, K_theta]; end end end end
% Divergence if (real(det(K_matrix)) < 0) divergence_map = [divergence_map; t, K_psi, K_theta]; end end end end
% Plotting section figure; hold on; scatter(unstable(:,2), unstable(:,3), 'filled'); scatter(divergence_map(:,2), divergence_map(:,3), 'filled', 'r');
% Check if Rdivergence_map is not empty before plotting if ~isempty(Rdivergence_map) scatter(Rdivergence_map(:,2), Rdivergence_map(:,3), 'filled', 'g'); end
xlabel('K_psi'); ylabel('K_theta'); title('Whirl Flutter Diagram');
legend_entries = {'Flutter area', 'Divergence area'}; if ~isempty(Rdivergence_map) legend_entries = [legend_entries, '1/Ω Divergence area']; end legend(legend_entries);
hold off;
Definition of Analysis
You have correctly outlined the conditions under which the 1/Ω divergence is observed, highlighting regions where ωΘ or ωΨ approaches 1/Ω. Additionally, divergence is noted in areas with low values of ωΘ and ωΨ, typically within the classical flutter region.
Reference Plot Discrepancy
Your concern about the flutter analysis not aligning with the reference plot may stem from variations in parameter values, system dynamics, or numerical computations. It's essential to compare your computed results with the expected outcomes to identify discrepancies and potential errors.
Hopefully, following these steps should help resolve your issues.
Réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!