annamccowan

Importing a MATLAB Waveform into Genesys

Blog Post created by annamccowan Employee on Aug 25, 2017

You have a waveform that was generated in MATLAB. How do you use that waveform as the source for a circuit in Genesys?

 

Keysight’s RF/Microwave Synthesis and Simulation Software, Genesys understands MATLAB. The full-featured MATLAB script debugger in Genesys enables you to develop error-free, fully compatible equations for data processing, simulation, and analysis. Genesys equation pages use MATLAB, so it is very easy to generate MATLAB waveforms in Genesys. You can paste MATLAB code directly onto a Genesys equation page to create any waveform.

 

Figure 1. You can easily import a MATLAB waveform into Genesys, and use that waveform as a source for a circuit.

 

Genesys Understands MATLAB

Running the MATLAB code in the equations page allows you to see and verify the waveform. Here, the waveform is stored and plotted in a variable called “PulseTrain”. The user will run the Equations first, and then the variable will be used by the source in the Genesys design.

 

Figure 2. The waveform is stored and plotted in a variable called “PulseTrain.” (Click image to zoom.)

 

How to apply the waveform to a circuit

In order to apply the waveform to a circuit, use a Custom Voltage source which allows us to specify a variable, PulseTrain, for the V parameter.

 

Figure 3. The variable PulseTrain is available for the source to use in the Genesys design.

 

From here, all that’s needed is to set up the Transient simulation for the desired time step and stop time. Run the simulation, and see the results below.

 

 

 

Summary

To use a waveform developed in MATLAB:

  1. Paste the MATLAB code that creates the waveform into an Equation page in Genesys.
  2. Assign the variable containing the waveform to a Custom Voltage source on the schematic.
  3. Run a Transient simulation.
  4. View the results.

 

Check out the related application note here.

 

 

 

 

Click here for a free trial of Genesys.

Outcomes