Turnstile skrypt do Matlaba
#1
Popełniłem taki skrypt do Matlaba, może być dowolnie modyfikowany. Sztuczką osiągnąłem  reflektor krzyżowy. To nie jest zbyt dobra antena. Nie róbcie jeśli nie musicie.  

   

[Obrazek: attachment.php?aid=3820]

   

[Obrazek: attachment.php?aid=3818]
a tu inne wersje tej anteny: 

   

[Obrazek: attachment.php?aid=3819]


% programowane prompto-pisaniem

freq = 434e6;
lambda = 3e8/freq;
offset = lambda/50;
spacing = lambda/2;
length = lambda/2.1;
width = lambda/50;
anglevar = 0:10:180;
freqrange = 420e6:2e6:450e6;
gndspacing = lambda/4;

d  = dipole(Length=length, Width=width);

% Tworzymy obiekt dipoleCrossed
% Ustawiamy przesunięcie fazowe między dwoma dipolami za pomocą FeedPhase
%crossedDipoleExciter = dipoleCrossed(Element=d, Tilt=90, TiltAxis=[0 1 0], ...
  %                                  FeedPhase=[0, 90]); % Użyto FeedPhase

%dodanie drugiej osi obritu dla reflektora


%crossedDipoleExciter = dipoleCrossed(Element=d, Tilt=90, TiltAxis=[0 1 0]); % Użyto FeedPhase
crossedDipoleExciter = dipoleCrossed('Element', d, ...
    'Tilt', [90 45], ...
    'TiltAxis', [0 1 0; 0 0 1], 'FeedPhase', [0, 90]);


% Tworzymy antenę reflectorCircular, używając skonfigurowanego dipoleCrossed jako wzbudnika
%ant = reflectorCircular(Exciter=crossedDipoleExciter, GroundPlaneRadius=0.172, ...
        % Spacing=0.258);

%ant3 = reflectorGrid
ant = reflectorGrid(Exciter=crossedDipoleExciter, GroundPlaneLength=0.345, GroundPlaneWidth=0.345, Spacing=0.13,Tilt=0, TiltAxis=[0 1 0],GridSpacing=0.3);


figure
show(ant)

figure
returnLoss(ant, freqrange, 75);
figure
pattern(ant, freq);

figure; pattern(ant,freq,'Polarization','RHCP');
figure; pattern(ant,freq,'Polarization','LHCP');

% 1. Calculate S-parameters for the antenna over the frequency range
% The default reference impedance is 50 ohms, but you can change it (e.g., to 75)
s = sparameters(ant, freqrange, 75);

% 2. Create a new figure and plot S11
figure;
rfplot(s, 1, 1);
title('S11 - Reflection Coefficient of Port 1');
grid on;

% Optional: Plot S21 to see the coupling between the crossed dipoles
figure;
rfplot(s, 2, 1);
title('S21 - Coupling between feeds');
grid on;

% --- S-Parameter Plots ---
s = sparameters(ant, freqrange, 50);

figure;
rfplot(s, 1, 1);
title('S11 - Reflection Coefficient of Port 1');
grid on;

figure;
rfplot(s, 2, 1);
title('S21 - Coupling between feeds');
grid on;

% --- VSWR Plot ---
figure;
vswr(ant, freqrange, 75); % Plots VSWR for both ports of the crossed dipole
title('VSWR vs Frequency (75 Ohm Reference)');
grid on;
Odpowiedz
#2
VeeCrossDipole w pol kołowej, skrypt bazowy, finalnie wymaga dużej optymalizacji

   

[Obrazek: attachment.php?aid=3821]

   

[Obrazek: attachment.php?aid=3822]

   

[Obrazek: attachment.php?aid=3823]

kod (promptowanie było bardzo trudne)

clc; clear all;

% Parametry podstawowe
freq  = 433e6;
lambda = 3e8/freq;

% Specyfikacja wymiarów
armL = lambda/4.2;
dipWidth = lambda/250;
gndspacing = lambda/4;

% ArmElevation [A1 A2]
elevationAngles = [-45 -45];

% 1. Tworzenie pierwszego dipola Vee
d1 = dipoleVee('ArmLength', [armL armL], 'Width', dipWidth, 'ArmElevation', elevationAngles);

% 2. Tworzenie drugiego dipola Vee (obrócony o 90 stopni w osi Z)
d2 = copy(d1);
d2.Tilt = 90;
d2.TiltAxis = 'Z';

% 3. Składanie w linearArray
crossedVee = linearArray('Element', [d1, d2], ...
                        'ElementSpacing', 5e-3, ...
                        'PhaseShift', [0 90]);

% 4. ZMIANA: Reflektor CavityCircular
% W Twojej wersji używamy właściwości 'Radius' zamiast 'GroundPlaneLength'
r = cavityCircular('Exciter', crossedVee, 'Spacing', gndspacing, 'Radius', lambda/2);

% Opcjonalnie: Height definiuje wysokość bocznej ścianki "kubła"
r.Height = 0.05;

% Wizualizacja
figure;
show®;
title('Crossed Vee Dipole on Cavity Circular');

% Charakterystyka promieniowania
figure;
pattern(r, freq, 'Polarization', 'RHCP');
title('Radiation Pattern - RHCP');

figure;
axialRatio(r, freq, 0, 0:5:360);
Odpowiedz