A plot of 'f' (frequency) versus 't' (time) in Matlab for non-linear frequency modulated signal
2 views (last 30 days)
Show older comments
I have the mathematical equation for time- frequency relationship as below:
t = Tp.*(f/Bp + (1/(2*pi).* sin((2*pi*f)./Bp)));
where Bp is the Bandwidth, Tp is the pulse duration.
Can anybody help me to write this equation in terms of f. I want to use the f to compute the phase and the signal as :
phase = 2*pi* cumsum(f).* dt;
where dt is the sampling interval of the pulse duration defined as Tp/Ns, (Ns= number of samples in the pulse of duration- Tp)
I tried to use 'solve' function in Matlab, but its not successful. kindly suggest if there is a method to invert the above mentioned equation in terms of f.
thank you :)
0 Comments
Answers (1)
NVSL
on 23 Jan 2025
Edited: NVSL
on 23 Jan 2025
I can see you are trying to use “solve” function to solve a non-linear complex function. The “solve” function has its limitations when it comes to solving complex equations. You can alternately try out “fsolve” that approximates "f" from an expected initial point f0 that can be defined based on the time, bandwidth and pulse duration. I have added a sample code that can provide an idea how to use the “fsolve” function. You can then use the computed "f" to find the phase.
% Given variables
Tp = 1; % Example value for Tp
Bp = 2; % Example value for Bp
t = 1; % Example value for t
% Define the function handle - target 'f'
fun = @(f) Tp * (f/Bp + (1/(2*pi)) * sin((2*pi*f)/Bp)) - t;
% Initial guess
f0 = 0.1; % Initial guess for f, adjust based on expected range
% Solve the equation
options = optimoptions('fsolve', 'Display', 'iter'); % Display iteration information
[f_solution, fval, exitflag] = fsolve(fun, f0, options);
% Display the result
if exitflag > 0
fprintf('The solution is f = %.4f\n', f_solution);
else
fprintf('fsolve did not converge\n');
end
You can find the documentation of “fsolve” here
https://www.mathworks.com/help/optim/ug/fsolve.html
0 Comments
See Also
Categories
Find more on Get Started with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!