Forums › VSG Series Discussions › Creating multitone signal using Python
- This topic has 2 replies, 2 voices, and was last updated 3 years, 6 months ago by
GSingh.
- AuthorPosts
GSinghParticipantHi,
I am working on a project involving generating a multi-tone signal in VSG60A in Python and then measuring the IMDs in SA124B. This is possible using the provided software which generates clean tones, but i am not able to create such tones using python. Request if some code can be provided for generating a multi-tone signal using python.
AndrewModeratorGSingh,
You could use PyVISA to control the VSG60 software using SCPI commands. You can read about our SCPI commands and see some examples in the SDK.
If you are using the API directly to control the instrument, you will need to generate your own complex I/Q waveform to output to the device. For a multi-tone signal, you could sum your complex sines/tones into an I/Q buffer to transmit. Just ensure that you scale the final result so that the peak magnitude of any given sample doesn’t exceed 1.0, and ideally, select a final buffer size that allows all of your complex sines to phase wrap nicely.
Unfortunately we don’t have any Python sample code for doing this. There are probably RF/DSP libraries that make it easy to generate complex sine waves with a given frequency.
Let us know if you have follow up questions.
Andrew
GSinghParticipantThank you for the reply sir..
- AuthorPosts
You must be logged in to reply to this topic.