www.gusucode.com > rf 案例源码程序 matlab代码 > rf/SpurfreezonesofamultibandreceiverExample.m

    %% Spur-free zones of a multiband receiver  
% Set up an |OpenIF| object as a multiband receiver, add three mixers to
% it, and obtain information about its spur-free zones.   

%% 
% Define an |OpenIF| object. The first input is the bandwidth of the IF
% signal (50 MHz). The |'IFLocation','MixerOutput'| name-value pair specifies
% a downconverting configuration. 
hif = OpenIF(50e6,'IFLocation','MixerOutput');  

%% 
% Define the first mixer with an intermodulation table and add it to the
% |OpenIF| object. Mixer 1 has an LO at 2.4 GHz, has a bandwidth of 100
% MHz, and uses low-side injection. 
IMT1 = [99 00 21 17 26; ...
        11 00 29 29 63; ...
        60 48 70 65 41; ...
        90 89 74 68 87; ...
        99 99 95 99 99];
addMixer(hif,IMT1,2.4e9,100e6,'low');  

%% 
% Mixer 2 has an LO at 3.7 GHz, has a bandwidth of 150 MHz, and uses low-side
% injection. 
IMT2 = [99 00 09 12 15; ...
        20 00 26 31 48; ...
        55 70 51 70 53; ...
        85 90 60 70 94; ...
        96 95 94 93 92];
addMixer(hif,IMT2,3.7e9,150e6,'low');  

%% 
% Mixer 3 has an LO at 5 GHz, has a bandwidth of 200 MHz, and uses low-side
% injection. 
IMT3 = [99 00 15 23 36; ...
        10 00 34 27 59; ...
        67 61 56 59 68; ...
        97 82 81 60 77; ...
        99 99 99 99 96];
addMixer(hif,IMT3,5e9,200e6,'low');  

%% 
% The multiband receiver is fully defined and ready for spur-free-zone analysis.
% Use the |report| method to analyze and display spur and spur-free zone
% information at the command line. The method also returns information about
% the mixers in the receiver. 
hif.report  

%% 
% Use the |show| method to analyze the receiver and produce an interactive
% spur graph. Generating a spur graph is a convenient way to summarize the
% results of the analysis graphically. 
figure;
hif.show