Professional Documents
Culture Documents
m
%Ella Maule
%11/11/2016
%PartC.m Allows the user to manually optimise horizontal forces on pylons
%by changing pylon position and sag. It allows the user to calcaulte,
%maximum tensions, resultant forces on pylons and cable lengths for any
%number of pylons at any position on a terrain with as many gradient
%changes as required. The model can be tested at any temperature t in teh
%range -10degC to 30degC. (reasonable range for the Scottish Highlands)
% Variable Dictionary
% C Matrix of values for each cable curve
% c_mass Mass per unit length of cable (kg/m)
% Cp Matrix of top of pylons (cable-pylon nodes)
% g Acceleration due to gravity (m/(s^2))
% H Horizontal forces for each span (N)
% He Estimate for span horizontal force (taking sag at
% centre of span and using trigonometry) (N)
%i,k,m,n Loop run definitions
% L Matrix of cable lengths (m)
% p Number of pylons required for model (input)
% pylon_coords Cell of pylon coordinate matrices (m)
% qc Weight per unit length (N/m)
% r Cell of ground range coordinates for each gradient (m)
% R Matrix of resultant forces on each pylon (N)
% S Matrix of sags for each span (m)
% T Tensions at each node per span
% (node A Tensio , node B Tension) (N)
% v Number of terrain coordinates (input)
% X Span x values to caluculate curve coordinates (m)
% X_all Matrix of span x coordinates for all curves (m)
% Xa x-coordinate of left hand pylon (cloeset to origin) (m)
% Xb x-coordinate of right hand pylon (m)
% Xd1 x-coordinate of sag point (where dy/dx=0) (m)
% Xe Estimate of xd as midpoint of span (for use in He) (m)
% xg x-coordinates of ground terrain (m)
% xp x-coordinates of pylon (bottom) position
% (x distace from origin) (m)
% xynodes all possible pylon-cable nodes (m)
% Ya y-coordinate of left hand pylon (cloeset to origin) (m)
% Yb y-coordinate of right hand pylon (m)
% Yd y-coordinate of sag point (where dy/dx=0) (m)
% yg Matrix of y-coordinates of the ground (m)
% yn y-coordinates of pylon-cable nodes (m)
% ys BS for miniumum height above ground of cable (m)
% Yt y-coordinates of ground terrain (m)
% t Temperature (-5degC 30degC) to ckeck model
% C_mass_t Mass per unit length at temperature t (kg/m)
% qc_t Weight per unit length at temperature t (N/m)
% L_t_true The true length of the cable at temperature t (m)
% He_t Matrix of estimates for span horizontal force for
% range of sag point y coordinates (taking sag at
% centre of span and using trigonometry)to give an
% appropriate start vale for fzero solver at
% temperature t(N)
% H_t Matrix of horizontal force in each cable for
% range of sag point y coordinates at temperature t (N)
% Xd_t Matric of X coordinate of lowest point of sag for
% range of sag point y coordinates at temperature t (N)
%L_t Matrix of length for length of cable for
% range of sag point y coordinates at temperature t (N)
%Yd_t Matrix of possible sag point y coordinates at
% temperature t (N)
% f,m,n.w Loop run definitions
% Idx Matrix of index numbers for correct loop cyle for each
% span at temperature t
% poss Matrix of lengths for range of Yd
% true True length of cable at temperature t
% He_t_true Matrix of estimates for span horizontal force for
% closest y coordinates (taking sag at
% centre of span and using trigonometry)to give an
% appropriate start vale for fzero solver at
% temperature t(N)
% H_t_true Matrix of horizontal force in each cable for
% closest sag point y coordinates at temperature t (N)
% Xd_t_ true Matric of X coordinate of lowest point of sag for
% closest sag point y coordinates at temperature t (N)
% T_t Max tension in each cable at temperate t
% 'Tension at node A, Tension at node B' (N)
% C_t Sag curves at temperature t
% R_t Matrix of resultant horizontal force on each pylon
% at temperature t (N)
% Sources
% [1] http://www.maths.lth.se/na/courses/Documents/papini.pdf
% - eqn 2.14 (pg 10)
% - eqns 2.17 and 2.18 (pg11)
% [2] http://www.spenergynetworks.co.uk/userfiles/file/ohl-03-099_issue1_forinternet.pdf
% - coefficient of linear expansion (pg 89) = 0.000023 (/degC)
% - mass per unit length (pg89) = 0.6812
%%
clear all
clc
%% User to define scale of model (number of terrain gradient changes and
% number of pylons)
disp('the slope between terrain coordinates is assumed straight')
v=input('number of terrain coordinates desired:');
p=input('number of pylons required:');
Xt=zeros(v,1); % pre-assigns matrix dimensions to speed up processing
Yt=zeros(v,1); % pre-assigns matrix dimensions to speed up processing
%% Plots a graph of the ground and the pylons, allows user to check inputs are correct
hold on
for k=1:p
plot(pylon_coords{1,k}(:,1),pylon_coords{1,k}(:,2), 'blue'); axis([-10 (Xt(v,1)+50) 0
45]);
end
plot ( xg,yg,'green'); xlabel('Horizontal distance from origin (m)');...
ylabel('Vertical distnace from origin (m)'); title('Terrain And Pylon Position Of
Model');
hold off
%%
% %f1 and f2 are eqn. 2.14 from [1] rearranged %f3=f1-f2
%f1=Xd1=Xa+((H./qc).*(acosh(((qc.*(Ya-Yd))./H)+1))); % acosh function is added
% because inversing a hyperbolic cos function loses any information about
% the sign (+/-) of the value
%f2=Xd2=Xb-((H./qc).*(acosh(((qc.*(Yb-Yd))./H)+1)));
%f3= Xb-Xa+((H./qc).*(acosh(((qc.*(Ya-Yd))./H)+1)-acosh(((qc.*(Yb-Yd))./H)+1)));
%% Constants and matrix size assignment
c_mass=0.6812; %Industry Standard gives this value at 20 degreeesC [2]
g=9.81;
qc=3*c_mass*g; %3 phase tranmission in delta formation
H=zeros(i:1); % pre-assigns matrix dimensions to speed up processing
He=zeros(i:1);
Xd1=zeros(i:1);
S=zeros(i:1);
L=zeros(i:1);
T=zeros(i:2);
C=zeros(i,100);
X_all=zeros(n,100);
R=zeros(p,1);
%% calculating the x-coordinate of the sag point for all possible Yd @ new
tempeature
Xd_t(w,f)=Xa+((H_t(w,f)./qc_t).*(acosh(((qc_t.*(Ya-
Yd_t(w,f)))./H_t(w,f))+1))); %%[1]%%rearranged
end
end
%% Finding the matrix index number for the closest possible length (at all Yd@t)
%closest to the true length @ new tempeature.
Idx=zeros(i,1);
for m=1:i
poss=L_t(m,:);
true=L_t_true(m,:);
tmp=abs(poss-true);
[~, idx] =min(tmp);
Idx(m,:)=idx;
end
%% Solves f3 using the function fzero for the closest y coordinate of sag point @ new
temperature
He_t_true=zeros(i,1); % pre-assigns matrix dimensions to speed up processing
H_t_true=zeros(i,1);
Xd_t_true=zeros(i,1);
T_t=zeros(i,2);
C_t=zeros(i,100);
R_t=zeros(p,1);
for m=1:i
Xa=Cp(m,1); Ya=Cp(m,2); %% coordinates for pylones A and B and sag point D
Xb=Cp(m+1,1); Yb=Cp(m+1,2);
Yd_t_true=Yd_t(m,Idx(m,:));
Xe=(((Xb-Xa)./2)+Xa);
He_t_true=He_t(m,Idx(m,:));
%% calculating the horizontal tension in span
H_t_true(m,:)=fzero(@(H_t_true) ((Xa+((H_t_true./qc_t).*(acosh(((qc_t.*(Ya-
Yd_t_true))./H_t_true)+1))))-(Xb-((H_t_true./qc_t).*...
(acosh(((qc_t.*(Yb-Yd_t_true))./H_t_true)+1))))), He_t_true); %%[1]%%rearranged
%% calculating the x-coordinate of the sag point
Xd_t_true(m,:)=Xa+((H_t_true(m,:)./qc_t).*(acosh(((qc_t.*(Ya-
Yd_t_true))./H_t_true(m,:))+1))); %%[1]%%
%% total cable tension %maximum tension occurs at the cable-pylon nodes
T_t(m,1)=H_t_true(m,:)+(qc_t.*(Ya-Yd_t_true)); %%[1]%%
T_t(m,2)=H_t_true(m,:)+(qc_t.*(Yb-Yd_t_true)); %%[1]%%
%% equation for curve
X=linspace(Xa, Xb,100);
C_t(m,:)=((H_t_true(m,:)./qc_t).*(cosh((qc_t./H_t_true(m,:)).*(X-Xd_t_true(m,:)))))-
(H_t_true(m,:)./qc_t)+Yd_t_true; %%[1]%%
end
for n=2:i
R_t(n,:)= H_t_true(n,1)-H_t_true(n-1);
end
R_t(1,:)=H_t_true(1,1)-0;
R_t(p,:)=0-H_t_true(i,1);