MATLAB Simulation Code: Frequency & Phase Response of Quantum Well Laser

  • Thread starter Thread starter zeyaf
  • Start date Start date
  • Tags Tags
    Matlab
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 3K views
zeyaf
Messages
1
Reaction score
0
hi all, this is fayez. is there anyone who can send me a MATLAB simulation code? the code displays the frequency and phase response of quantum well laser. or pls instruct me about how to do it. pls help me out.
 
Last edited:
Physics news on Phys.org
Plotting the Frequency Response Using MATLAB

The frequency response of a system is the major way of characterizing how a system behaves in the frequency domain. It is important to understand the frequency characteristics of a given system rather than time domain characteristics alone for many practical applications like filter design.

The frequency response of a system, is just the transfer function, evaluated at . Frequency response is usually a complex valued function, so it can be written as , where is the magnitude response and is the phase response. You can use MATLAB to plot the magnitude and phase responses as follows:

Example: , to plot magnitude and phase responses use the following command lines. Define two vectors b and a where b is the coefficients of the polynomial in the numerator, and a is the coefficients of the polynomial in the numerator.
Note that they have to be the same length and start with the coefficient of the highest order term. Then define w as the vector of frequencies over which you want to plot the magnitude and phase responses.

>> b=[0 1 -1];
>> a=[1 8 8];
>> w=[0:.1:2*pi];
>> freqs(b,a,w)


ege4ig.jpg