Энергетический расчет канала дальней тропосферной радиосвязи (Программа для ЭВМ) - Владимир Иванович Шлома


Владимир Шлома

Энергетический расчет канала дальней тропосферной радиосвязи (Программа для ЭВМ)

Реферат

Программа предназначена для проведения на ЭВМ энергетического расчета канала связи дальней тропосферной радиосвязи по двум методикам. Расчет радиосвязи производится при различных видах модуляций, для любого времени года и для любого места, выбранного на карте. Программа работает в среде Matlab.

Программа обеспечивает выполнение следующих функций:

 

расчет затухания в свободном пространстве при реальных антеннах;

 

расчет быстрых замираний;

 

расчет медленных замираний;

 

расчет медианных затуханий;

 

расчет полного затухания;

 

расчет медианной мощности сигнала на выходе приемника;

 

расчет мощности сигнала на входе приемника;

 

расчет энергетического запаса трассы;

 

расчет предельной дальности связи;

 

расчет отношения сигнал/шум на входе приемника;

 

расчет вероятности ошибки при заданном виде модуляции.


Тип ЭВМ: IBM PC-совместимые ПК.

Язык: Matlab.

IDE: MatlabR2014b.

ОС: Windows XP/Vista/7/8/10.

Объем исполнимого файла: 1,4 Мб.

Исходный код программы


main.m

function varargout = main(varargin)

gui_Singleton = 1;

gui_State = struct('gui_Name', mfilename,

'gui_Singleton', gui_Singleton,

'gui_OpeningFcn', @main_OpeningFcn,

'gui_OutputFcn', @main_OutputFcn,

'gui_LayoutFcn', [] ,

'gui_Callback', []);

if nargin && ischar(varargin{1})

gui_State.gui_Callback = str2func(varargin{1});

end

if nargout

[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});

else

gui_mainfcn(gui_State, varargin{:});

end

function main_OpeningFcn(hObject, eventdata, handles, varargin)

handles.output = hObject;

global Nk

global tipcan

global n

global Tm

global kan

global Sez

global Tp

global Lk

Lk=1;

Tp=1;

Sez=1;

kan=2;

Tm=1;

n=1;

tipcan=1;

Nk=1;

set(handles.uipanel13,'visible','on');

set(handles.uipanel12,'visible','off');

guidata(hObject, handles);

function varargout = main_OutputFcn(hObject, eventdata, handles)

varargout{1} = handles.output;

function pushbutton2_Callback(hObject, eventdata, handles)

global Sez

if Sez ==1;

picture();

end

if Sez ==2;

picture_2();

end

if Sez ==3;

picture_3();

end

function edit14_Callback(hObject, eventdata, handles)

function edit14_CreateFcn(hObject, eventdata, handles)

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

function popupmenu2_Callback(hObject, eventdata, handles)

global Nk

contents = get(hObject,'Value');

switch contents

case 1

Nk=1;

case 2

Nk = 2;

case 3

Nk = 3;

case 4

Nk = 4;

case 5

Nk = 5;

case 6

Nk = 6;

case 7

Nk = 7;

otherwise

end

function popupmenu2_CreateFcn(hObject, ~, handles)

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

function pushbutton3_Callback(hObject, eventdata, handles)

picture_3();

function listbox1_Callback(hObject, eventdata, handles)

contents = get(hObject,'Value');

global TIPp

switch contents

case 1

TIPp=1;

case 2

TIPp = 2;

end

function listbox1_CreateFcn(hObject, eventdata, handles)

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

function edit8_Callback(hObject, eventdata, handles)

function edit8_CreateFcn(hObject, eventdata, handles)

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

function edit9_Callback(hObject, eventdata, handles)

function edit9_CreateFcn(hObject, eventdata, handles)

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

function edit10_Callback(hObject, eventdata, handles)

function edit10_CreateFcn(hObject, eventdata, handles)

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

function edit11_Callback(hObject, eventdata, handles)

function edit11_CreateFcn(hObject, eventdata, handles)

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

function edit12_Callback(hObject, eventdata, handles)

function edit12_CreateFcn(hObject, eventdata, handles)

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

function edit13_Callback(hObject, eventdata, handles)

function edit13_CreateFcn(hObject, eventdata, handles)

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

function edit1_Callback(hObject, eventdata, handles)

function edit1_CreateFcn(hObject, eventdata, handles)

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

function edit2_Callback(hObject, eventdata, handles)

function edit2_CreateFcn(hObject, eventdata, handles)

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

function edit3_Callback(hObject, eventdata, handles)

function edit3_CreateFcn(hObject, eventdata, handles)

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

function edit4_Callback(hObject, eventdata, handles)

function edit4_CreateFcn(hObject, eventdata, handles)

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

function edit5_Callback(hObject, eventdata, handles)

function edit5_CreateFcn(hObject, eventdata, handles)

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

function edit6_Callback(hObject, eventdata, handles)

function edit6_CreateFcn(hObject, eventdata, handles)

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

function edit7_Callback(hObject, eventdata, handles)

function edit7_CreateFcn(hObject, eventdata, handles)

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

function edit21_Callback(hObject, eventdata, handles)

function edit21_CreateFcn(hObject, eventdata, handles)

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

function edit22_Callback(hObject, eventdata, handles)

function edit22_CreateFcn(hObject, eventdata, handles)

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

function popupmenu1_Callback(hObject, eventdata, handles)

contents = get(hObject,'Value');

global n

switch contents

case 1

n=1;

case 2

n = 2;

case 3

n = 4;

end

function popupmenu1_CreateFcn(hObject, eventdata, handles)

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

function radiobutton5_Callback(hObject, eventdata, handles)

global tipcan

if get (handles.radiobutton5,'value') == 1

set(handles.radiobutton6,'value',0);

set(handles.uipanel13,'visible','off');

set(handles.uipanel12,'visible','on');

tipcan=2;

end

function radiobutton6_Callback(hObject, eventdata, handles)

global tipcan

if get (handles.radiobutton6,'value') == 1

set(handles.radiobutton5,'value',0);

set(handles.uipanel13,'visible','on');

set(handles.uipanel12,'visible','off');

tipcan=1;

end

function listbox6_Callback(hObject, eventdata, handles)

global Tm

contents = get(hObject,'Value');

switch contents

case 1

Tm=1;

case 2

Tm = 2;

case 3

Tm = 3;

case 4

Tm = 4;

case 5

Tm = 5;

otherwise

end

function listbox6_CreateFcn(hObject, eventdata, handles)

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

function listbox7_Callback(hObject, eventdata, handles)

global kan

contents = get(hObject,'Value');

switch contents

case 1

kan=2;

case 2

kan = 1;

otherwise

end

function listbox7_CreateFcn(hObject, eventdata, handles)

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

function listbox10_Callback(hObject, eventdata, handles)

global Sez

contents = get(hObject,'Value');

switch contents

case 1

Sez=1;

case 2

Sez = 2;

case 3

Sez = 3;

otherwise

end

function listbox10_CreateFcn(hObject, eventdata, handles)

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

function listbox11_Callback(hObject, eventdata, handles)

global Tp

contents = get(hObject,'Value');

switch contents

case 1

Tp=1;

case 2

Tp = 2;

case 3

Tp = 3;

case 4

Tp = 4;

otherwise

end

function listbox11_CreateFcn(hObject, eventdata, handles)

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

function pushbutton1_Callback(hObject, eventdata, handles)

global Pvh1vt

global Lm1z

global Pvh1med

global L2z

global L2

global Pvh2

global h02

global Zap2

global h0t1

global Lz

global h01

global L1

global Zap1

global Rpred

global Lbz

global L0

global Lmz

global Pvh2medvt

global tipcan

global n

global TIPp

global Tm

global kan

global Sez

global Tp

global L0r

global L2med

global Pvh2vt

global m

global h0t2

global Pcht1

global Nk

global Pch2

global Lk

f = str2num(char(get(handles.edit1,'String')))

P=str2num(char(get(handles.edit2,'String'))); Pfr=str2double(char(get(handles.edit3,'String')));

Gr=str2num(char(get(handles.edit4,'String')));

a=str2double(char(get(handles.edit5,'String')));

h=str2num(char(get(handles.edit6,'String')));

Ugr=str2num(char(get(handles.edit7,'String')));

Fe=str2double(char(get(handles.edit8,'String')));

Pfp=str2double(char(get(handles.edit9,'String')));

Gp=str2num(char(get(handles.edit10,'String')));

Ugp=str2num(char(get(handles.edit13,'String')));

dfk=str2num(char(get(handles.edit22,'String')));

nk=str2num(char(get(handles.edit21,'String')));

m=str2num(char(get(handles.edit23,'String')));

V=str2num(char(get(handles.edit24,'String')));

R=150;

dF=40;

Fk=nk*3100-1250;

Po=1e-4;

Tpr=99.0;

if Sez==1

disp('Введите климатические потери для района работы радиолинии в соответствии с картой')

Lk=str2num(char(get(handles.edit14,'String'))) ;

elseif Sez==2

Lk=str2num(char(get(handles.edit14,'String')));

end

l=30000/f; L0=22+20*log10(R*1e5/l);

L0r=22+20*log10(R*1e5/l)-Gr-Gp-Pfr-Pfp; disp(['L0r=', num2str(L0r),' дБ (потери в свободном пространстве при реальных антеннах)']);

Lmed=62.92*exp(-((l+18.19)/174)^2)+(0.07608*l^(-0.4984)+0.06596)*R; sig=5.116*exp(-((R-205.7)/577.5)^2);

if Sez==2

Lmed=Lmed-12;

sig=4.676*exp(-((R-124.9)/332.4)^2)+3.165*exp(-((R-382)/508.3)^2);

elseif Sez==3

Lmed=Lmed-6;

sig=6.118*exp(-((R-158.6)/547.8)^2); end

if tipcan==2

[Lbz]=Lbzam(Tpr,n);

sig1=0.177*exp(0.2585*sig)-23.48*exp(-0.2856*sig); F=0;

for x=0:0.5:30;

F=1/2+1/2*erf(log(10^(x/20))/(10^(sig1/20)));

if F>=Tpr/100

break;

end

end

Lmz=x;

Lz=Lbz+Lmz;

if Tm==1

B=10*log10(-4/n*log(2^n*Po

elseif Tm==2

B=10*log10(-2/n*log(2^n*Po));

elseif Tm==3 || Tm==4 || Tm==5

B=10*log10(-1/n*log(2^n*Po));

end

disp(['Lbz=', num2str(Lbz),' дБ (потери от быстрых замираний)']);

disp(['Lmz=', num2str(Lmz),' дБ (потери от медленных замираний)']);

elseif tipcan==1

B=35;

if sig<3

sig=3;

elseif sig>7

sig=7;

end

sigma=fix(sig);

[ Lz1 ] = Lzam(Tpr, n, sigma);

Дальше