Beginning with PLTS 2012, a runtime version of MATLAB is installed with PLTS. This allows PLTS to use MATLAB capabilities 'behind the scenes'. In addition, you can also write your own MATLAB functions and use them in PLTS from the following dialog.
Note: Beginning with PLTS 2018, the full version of MATLAB is NOT required to use PLTS capability. See the MATLAB website at:http://www.mathworks.com/products/matlab/index.html
In this topic:
Click Tools, then Math, then Collaborate with MATLAB
See Example of how to use this feature. In this dialog, you specify the parameters to send to the MATLAB function, and the variable name in which the resulting data will be stored. Matlab File - Navigate to a *.m file which contains the variables to be mapped to data. Note: There can be NO spaces in the entire path name of the MATLAB *.m file. Domain - Choose the domain data to map. Select from Frequency Domain (single-ended and balanced) and Time Domain (single-ended and differential). Data - Click a parameter, then click a variable, then click >> to associate the data with the variable. Equation Name - Enter a name to save the equation and recall it for future use. Output Unit - Set the output units to No unit, Ohms, or dB. Wildcard - Replaces file number with '?' when the file number is not the same as when the equation was first written. Browse - Specifies the path to the *.m MATLAB file. Extended Domain X-Y - Mark the checkbox to enable the X-Y units selection from the drop-down menu. Choices include: dB - mVrms and dB - dB. When the checkbox is not marked, then the X and Y units depend on the input data and output unit settings in the GUI. In this case, the X unit could be ns, cm or GHz, and the Y unit could be dB, Ohms, U etc. The gear icon opens a marker-styles dialog, but only applies when the equation output is just a single point in the plot.
Save (Equation) Saves the valid math equation into PLTS memory. NOTE: This does NOT save the equation to disk. Pin to Equations Pane - Attaches the MATLAB equation to the Equations pane for easy selection. Save Advanced Launches the Save Equations dialog, which allows you to save the equation to a *.DUT file or a *.fml (equation) file. Import Launches the Open dialog. Navigate and select a *.fml (equation) file to load. After opening the file, select the file using Equation Name. Close Closes the dialog. |
This dialog is started when Save Advanced is clicked on the MATLAB Create Equations dialog.
Existing Equations - The equations that are in PLTS memory are listed. Select (check) the equations to be saved to disk. Check All - Select (check) all of the listed equations. Clear All - Unchecks all equations.
|
In MATLAB, create a new .m file, name it “plts_demo.m”.
In that file, define the following function:
function fittedData = plts_demo(freq, data)
amp = abs(data); ampCoeff = polyfit(freq, amp, 6); fittedAmp = polyval(ampCoeff, freq);
fittedData = fittedAmp;
end |
Save the *.m file to a location with NO SPACES. For example: C:\plts_demo.m.
In PLTS, click File, then Import , then Single File.
Click Browse, then navigate to C:\Program Files\Keysight\PLTS2012\Data\PLTS_DEMO\plts_demo_data_E8362B_BTL_10M20GHz.s4p
On the Select Analysis View dialog, select Frequency Domain (Single-Ended).
Click Tools, then Math, then Collaborate with MATLAB
In the above dialog, click Browse, then navigate to the file that was saved in step 3 (“plts_demo.m”).
Associate each variable with a data set.
In the Data column, select a data set (1:Frequencies in the above image).
In the upper 'Input' variables field, select a variable (data in the above image).
Click >> to associate the data with the variable.
In the lower 'results' field, select “fittedData” as return value, then click >>.
In Equation Name, type fittedS21.
Click Save
Click Close
Select (double-click) the S21 plot.
Click Tools, then Math, then Apply.
In the following Apply dialog, select fittedS21; then click Apply.
The fittedS21 trace is added to the S21 plot as in the following image:
Beginning with PLTS2019, start and stop equation limits in the frequency domain are supported in Matlab equations.
Matlab output variables need to output both frequency and S-parameter:
Beginning with PLTS2022, three new equations have been added.
These new equations are specifically for the Mini SAS application according to the Serial Attached SCSI (SAS) standard.
A new MiniSAS (32p) template also been added to the Data Browser
Note : The ICN have the capability to output the equation plot for a single point instead of time or frequency domain. Notice the X axis unit of ICN is in dB and Y axis unit is mV rms.
Accessing Equations
Click Tools,
then Math, then Apply
to access the Choose Equation Traces
to Display:
or
In the Parameter
Format Selection, select Equation
to access the Equations Pane:
Last Modified:
16 Jan 2024 |
Added Output Unit drop-down menu, supporting dB, and support for dB-dB output plot |
22-July 2022 |
Added Mini SAS Equation |
7-Dec-2018 |
Added Equation Based Limits for PLTS2019 |
21-Oct-2011 |
New topic |