![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1474311/image.png)
Orbital Angular Momentum Vertex Beam design based on 4 phase level
조회 수: 29 (최근 30일)
이전 댓글 표시
Hello Everyone,
I designed Orbital Angular Momentum (OAM) using the following MATLAB code
NUM = 100;
x = linspace(-12,12,NUM);
y = x;
[X,Y] = meshgrid(x,y);
charge =1;
theta= charge*atan2(X,Y);
Amp = ones(NUM);
OAM = Amp.*exp(1i*theta);
This code will generate OAM consisting of multi phase values. Whereas, I need an OAM which consist of only 4 phase values. Here, for the understanding I am attaching a picture of the OAM phase plate. A simple distribution like the following picture or generating such OAM distribution by formula both can help for my requirement.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1276680/image.jpeg)
댓글 수: 1
Siti Hasunah
2023년 9월 6일
Hi, I tried to generate an OAM wave-front phase using MATLAB and want to see the results with different OAM mode. I managed to get wave-front for OAM mode = 0 and 1, but then the result doesn't differ for higher OAM mode more than 1. How can I get the different wave-front just like below attached picture of mode l = 2?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1474311/image.png)
These are the codes I used to generate the wave front:
% Define parameters
desired_distance = 2.0; % Desired transmission distance (2 meters)
wavelength = 1.551e-6; % Wavelength (in meters)
num_points_x = 200; % Number of points in the x-direction
num_points_y = 200; % Number of points in the y-direction
x = linspace(-desired_distance/2, desired_distance/2, num_points_x);
y = x;
[X, Y] = meshgrid(x, y);
% OAM mode parameters
l = 1; % OAM mode order (change to the desired order)
k = 2 * pi / wavelength; % Wavenumber
% Calculate azimuthal angle theta
theta = atan2(Y,X);
% Calculate the OAM wave-front phase
phase = l * theta;
% Display the phase pattern
figure;
imagesc(x, y, phase);
axis equal;
title(['OAM Mode (l = ', num2str(l), ') Wave-Front Phase Pattern']);
xlabel('X (meters)');
ylabel('Y (meters)');
colorbar;
채택된 답변
추가 답변 (1개)
Image Analyst
2023년 1월 28일
How about this:
NUM = 100;
x = linspace(-12,12,NUM);
y = x;
[X,Y] = meshgrid(x,y);
charge =1;
theta= charge*atan2d(X,Y);
subplot(2, 1, 1);
imshow(theta, []);
impixelinfo
Amp = zeros(NUM);
% Top triangle.
mask = theta <= -135 | theta > 135;
Amp(mask) = pi/2;
% Right triangle.
mask = theta >= 45 & theta < 135;
Amp(mask) = 0
% Bottom triangle.
mask = theta >= -45 & theta < 45;
Amp(mask) = 3 * pi / 2
% Left triangle.
mask = theta <= -45 & theta > -135;
Amp(mask) = pi
subplot(2, 1, 2);
imshow(Amp, []);
impixelinfo
colorbar
댓글 수: 2
Image Analyst
2023년 2월 7일
편집: Image Analyst
2023년 2월 8일
I don't know what that is. Do you have an example?
If you need 8 or more sectors, you can simply put my triangle code into a loop over all sector angles. Is that what you want to do? I think you're skilled enough to do that -- just make a for loop.
참고 항목
카테고리
Help Center 및 File Exchange에서 Guidance, Navigation, and Control (GNC)에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!