Telonic TEST

Category: Knowledge Base SDG2000X Series

  • Measuring Power Supply Control Loop Response with Bode Plot II

    Measuring Power Supply Control Loop Response with Bode Plot II

    Stability is one of the most important characteristics in power supply design. Traditionally, stability measurements require expensive frequency response analyzers (FRA) which are not always available in a laboratory. Now, using a Siglent oscilloscope, like the SDS1204X-E with the newly released Bode Plot Ⅱ software, together with a Siglent arbitrary waveform generator (SDG or SAG) and a Picotest injection transformer, the measurement can be made.

    In this application note, we will show you the basic principles for making this stability measurement and how to use these instruments to make the measurement.

    Figure 1: Bode II setup

     

    1. Basic Principle of Stability Measurement

     

    1.1 Stability of The Feedback System

    A regulated power supply is actually a feedback amplifier with a large amount of current sourcing capability. Any theory that applies to a basic feedback amplifier also applies to a regulated power supply.

    In feedback theory, the stability of a feedback system can be determined by evaluating the loop transfer function. A more practical way is to measure the bode plot of the loop gain. Figure 2 shows a typical feedback system.

    The closed loop transfer A is the mathematical relationship between input x and output y. The loop gain T, by its name, is defined as the gain of a signal traveling around the loop.

    Figure 2: Typical Feedback Loop

    Since α and β are complex variables, they have not only magnitude but also phase angle, as also does the loop gain T. If the phase angle of T reaches -180° while the magnitude is 1, the closed-loop transfer function A becomes infinity. In this situation, the system will maintain an output signal while there is no input. Thus, the system acts as an oscillator rather than as an amplifier, which means that the system is not stable.

    If we plot the loop gain in a bode plot, we can evaluate the stability by finding the phase margin and gain margin. A phase margin is defined as how many degrees the phase can be decreased before reaching -180°while the magnitude is 1 (or 0 dB). The gain margin is defined as how many dB in magnitude can be added before reaching 1 (or 0 dB) while the phase is -180°.

    Figure 3: Bode Plot, phase, and gain margin

     

    1.2 Break the Loop

    To get the desired loop gain, we simply break the loop. Figure 4 shows how to break the loop in a typical feedback system. Technically you can break the loop any place you like. We commonly choose to break the loop at the point between the amplifier output and the feedback network. Then we insert a test signal i to travel around the loop. The loop gain is the mathematical relationship between the output y and the test signal i.

    Figure 4: Breaking the loop in a typical feedback system

    1.3 Loop Injection

    In reality, we can never really break the loop because the feedback loop serves to maintain the DC quiescent operation point of the circuits. Without the feedback loop, the device under test will become saturated because of the small input offset voltage, and then no useful result can be measured.

    To overcome this, we should measure the open loop response inside a closed loop. Therefore, we just inject a signal to the loop rather than breaking the loop. Figure 5 shows a typical method of loop injection. The injection point is chosen so that the impedance looking in the direction of the loop is much higher than that looking backward. One possible point is between the output and the resistor divider feedback network. Other points that meet this requirement may be chosen.

    Figure 5: Loop injection

    To maintain the closed loop, a small injection resistor Ri is inserted at the injection point. The resistor should be small enough so that it will have little effect on the circuit and also the lower the resistor value the lower the frequency the transformer will operate. Picotest recommends a resistor value of 4.99 Ω for the J2100A, and larger value may be chosen depending on the circuits. The injection signal is then applied across the injection resistor.

    The signal injected should have no effect on the DC operating point of the circuit. A method to solve the common ground connection problem is to use an injection transformer as shown in Figure 6.

    Figure 6: Injection Transformer

    The injection signal starts at one end of the injection resistor, travels through the resistor divider feedback network, the error amplifier and the pass element transistor and finally to the output, which is the other end of the injection resistor. The relationship between the injection signal i  and the output signal y is the loop gain that we wish to measure.

    Be aware that we are measuring an open loop parameter inside a closed loop, the phase starts at 180°and decreases to 0°, rather than starting at 0°and decreasing to -180°. So the phase margin should be measured relative to 0°.

     

    2. Measurement Setup and Result

     

    2.1 Equipment

    Oscilloscope: Siglent SDS1204X-E with firmware version higher than 6.1.27R1 (Bode Plot Ⅱ release)

    Signal Source: Siglent SDG2042X

    Power Supply: Siglent SPD3303X

    Probe: Siglent PP215 passive probe switched to 1X

    Injection Transformer: Picotest J2100A

    Device-Under-Test: Picotest VRTS v1.51

     

    2.2 Circuit Connection

    The Picotest VRTS v1.51 is a demonstration board for voltage regulator testing. Technically it is a linear regulator built from the famous TL431 and a discrete transistor. The schematic is shown in Figure 7. Different output capacitors can be selected to see the impact on the control loop stability.

    Figure 7: VRTS v1.51 schematic

    For the propose of our power supply control loop response measurement, the injection point is TP3 and TP4. The circuit connection is shown in Figure 8.

    The generator is connected to the oscilloscope through USB (connection through Ethernet is also supported).

    The injection transformer is connected in parallel with the injection resistor so that the signal is injected to the loop while preventing the circuit DC operation point from being affected by the generator.

    The TP3 and TP4 points are also connected to the oscilloscope, and the TP4 is defined as the DUT Input while the TP3 is the DUT Output in the Bode Plot Ⅱ.

    Figure 8: Circuit connection

     

    Figure 9: Probe and Transformer connections to the DUT

     

    2.3 Instrument Configuration

    In this section, we will show how the key configuration should be made in order to make the measurement correctly. For complete instructions to the Bode Plot Ⅱ, please refer to the user manual and the quick start guide.

    Before entering the Bode Plot Ⅱ, it is recommended that you enable the oscilloscope’s 20 MHz bandwidth limit setting.

    At this time, we want to measure the bode plot from 10 Hz all the way to 100 kHz. This frequency range should be enough for a circuit with an expected crossover frequency at about 10 kHz.

    Enter the Config menu and set the Sweep Type to Simple, then enter Set Sweep to set the sweeping frequency. Set the Mode to Decade and Start to 10 Hz, Stop to 100 kHz. Set Points/dec to 20, enough for a typical sweep. Enter the Set Stimulus menu to set Amplitude to 50 mV. Enter the Set Channel menu to set DUT Input to CH1 and DUT Output to CH2.

    Figure 10: Bode II scope configuration

    2.4 Results and Data analysis

    After the configuration is done, return to the main menu and press Run to start the sweep.

    Wait to see the results as shown in Figure 11.

    The result is somewhat confusing and suspect because of the trace at low frequency, especially the phase trace, alternating up and down. We will introduce a method called Vari-level to resolve this problem in the next section.

    Figure 11: Measurement results

    After the sweep has completed, press Run again to stop the sweep. Enter the Display menu and then enter the Cursors menu to turn on the cursors. Use the Adjust knob to move the cursors and set the phase margin as shown in Figure 12.

    Figure 12: Cursor measurement on the Bode plot

    You can also turn on the List feature in the Data menu to examine the measured data, or you can export the data to an external USB FLASH driver for further analysis on a computer.

    Figure 13: Exporting data

    2.5 Vari-level

    In the previous section, we can see that the results are not ideal, for the bouncing trace at low frequency. This is because at low frequency the amplitude difference between the input and output channel is relatively large, and since we are using a relatively small stimulus signal (this time 50 mVpp), the signal presented at the DUT Input channel is extremely small so that a commercial general propose oscilloscope cannot measure it accurately.

    But we cannot simply increase the stimulus’ signal amplitude. The result will be similar to what is shown in Figure 14. The large signal near the crossover frequency region causes serious distortion to the loop. The distorted signal in the time domain is shown in Figure 15.

    Remember that a bode plot only makes sense in a linear system, and has no meaning in a heavily non-linear system. The result is useless.

    Figure 14: Increased stimulus signal amplitude and distortion

    Figure 15: Distortion in the time domain

    One possible solution to the problem is Vari-level (other manufactures may call it “Shaped Level” or “Level Profile”). The Vari-level concept is simple: The stimulus signal amplitude is variable over the frequency. If we use a large signal at low frequencies, and decrease the amplitude to a fairly small level near the crossover region so that it causes little distortion to the loop, in theory, we can get an ideal result.

    Under the Configure menu, set Sweep Type from Simple to Vari-level, and push Set Vari-level to enter the Vari-level profile editor.

    Figure 16: Set Sweep Type to Vari-level

    Figure 17 shows the Vari-level profile editor. The Profile option allows the user to select and save up to 4 profiles. The Nodes sets the number of nodes in the profile trace, the minimum allowed number of nodes is 2 because at least 2 points can determine a line, and always the first and the last node set the start and stop of the trace. Press Edit Table will enter the profile editor mode. The parameter under editing is highlighted by cursors, and next push Edit Table again to cycle the cursors between “Freq”, “Ampl” and the entire row, which allows the user to navigate through the entire table. Users can use the Adjust knob to set the highlighted parameter, and pushing the knob will call out a visual keypad which allows direct input to the parameter. The Set Sweep and Set Stimulus option is somewhat similar to that in the Simple type of sweep, but they are not correlated. This time we set the sweep Mode to Decade and a 40-point-per-decade is sufficient. The profile shown in Figure 17 is used in this measurement. It is not the optimum profile for this circuit but should be a good place to start.

    Figure 17: Vari-level profile editor

    In practice, one should always experiment with those parameters to find an optimum solution for a particular circuit.

    One practical way to do this is to monitor the signal in the time domain, decrease the amplitude of the stimulus signal until no visible distortion can be observed, then decrease the amplitude by another 6 dB. Next, record the amplitude and frequency, jump to another frequency and repeat the process.

    There is a better way to find the optimum profile if you already have a known good profile. Reduce the signal amplitude by 6 dB and run a sweep to see if the plot changes. If it does change, reduce the amplitude by another 6 dB and sweep again. Until the result doesn’t change, then you can increase the amplitude by 6 dB and that’s an optimum profile. This is time-consuming but necessary to get a meaningful result.

    Once profile editing is completed, return to the main menu and push Run to start the sweep. Figure 18 shows the final result of the measurement with Vari-level. Changing the capacitor selection switch S1 on the VRTS v1.51 demo board will alter the loop response due to the impact of different capacitors.

    Figure 18: Results with Vari-level

    3. Summary

    The Siglent oscilloscope with newly released Bode Plot Ⅱ together with a Siglent signal generator and a Picotest injection transformer offer a very flexible and easy-to-use power supply control loop measurement system.

  • Quick remote computer control using LXI Tools

    Quick remote computer control using LXI Tools

    Introduction:

    There are many options for people considering remote communication and control of test and measurement instrumentation. In most cases, a computer is used to communicate to test instrumentation using USB or LAN connections. The computer can configure the instruments, collect and organize data, and present it in a useful and flexible way.

    Remote control provides:

    • Increased repeatability: The instrumentation is set up the same way, every time.
    • Efficient data collection: Data can be automatically filtered and stored.
    • Easily configure the test system parameters: Each command is executed in the same order and in the same timeframe.
    • Quickly visualize system performance: Graphical or tabular data formatting is easy.

    There are numerous platforms (Windows, Linux, etc..) and software programs (LabVIEW, .NET, Python) available to build automated test systems. The right choice for your application is highly dependent on your needs and the available skills you have.

    In this note, we are going to discuss how to use LXI Tools to communicate with SIGLENT instrumentation. LXI Tools is an open source software application that uses the local area network (LAN) connection to quickly control remote instrumentation. It is easy to install, has a small operating footprint, and is really powerful while being quite easy to use. Let’s start by looking at the basics.

    You can also see the video version of this note here: https://siglentna.com/video/lxi-tools/

    Why Open Source?

    Open source coding is a community-based development style in which a group of contributors work together to build and maintain programs using shared code and components. In this way, a platform can be built and tested quickly and may cost significantly less than commercial programming environments. LXI Tools is free open source software and the project welcomes new contributors that would like to help improve the tools.

    Here is a link to the LXI Tools website: https://lxi-tools.github.io

     

    Why LXI Tools?

    LXI-Tools is a collection of open source software tools that provide direct control of LXI compatible instruments such as modern oscilloscopes, power supplies, spectrum analyzers, and more.Simply install LXI Tools, connect your instrument, and start communicating.

    It really is that easy.

     

    LXI-Tools Provides:

    • Quickly discover the available instruments on the LAN
    • Retrieve copies of the displayed images (quickly see signals, data, and instrumentation setups) and convert image file types
    • Benchmark LAN performance
    • Send individual commands to an instrument to perform simple test actions. For example, you could return the measured data from a DMM.

    To learn more about LXI-Tools, please see https://github.com/lxi-tools/lxi-tools

     

    Instructions:

    1. Install the appropriate version of LXI-Tools for your operating system

     

    2. Open a terminal. In this example, I am using Ubuntu (17.10) running on a virtual machine hosted by a Win 10/64 bit OS.

    To learn more about the virtual machine used in this example:https://www.virtualbox.org/

    The OS is Ubuntu: https://www.ubuntu.com/

     

    3. Once loaded, startup Linux:

    With Ubuntu, you can use Snap to install:

    $ snap install lxi-tools

     

    LXI Discover:

    Quickly searches the LAN for instruments and lists their identification string and IP address.

    Plug in and power on your instrumentation and make sure that they are connected to a working LAN connection. You can manually check the instrument IP address and save this info to compare to later steps.

    Open up a terminal window.  At the “$” prompt, simply type lxi discover… LXI tools will search the LAN for connected instruments.

     

    Here, we have three devices connected: an SDM3065X, SSA3032X, and an SDS1102X-E (which has been superseded by the SDS1202X-E series here in North America). It also includes the instrument serial number, firmware revision, and IP address.

    NOTE: This has been tested with a large number of instruments, but may not be supported by some. There is a list of compatible instruments at the end of this note or you can check LXI-Tools support for the latest list of supported products.

     

    Screenshot:

    This function retrieves a copy of the instrument display and saves it to the local drive. This is ideal for adding information to reports and sharing events with colleagues.

    Type “lxi screenshot – – address <device address>”

    NOTE: There should be two “-” with no spaces before “address” for every command.

     

     

    Image Edits using ImageMagicks

    Use ImageMagick® to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, TIFF, DPXEXR, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.

    For more information, visit… https://www.imagemagick.org/script/index.php

    $ lxi screenshot –address <ip> – | convert – screenshot.jpg
    $ lxi screenshot –address <ip> – | convert – screenshot.tiff
    $ lxi screenshot –address <ip> – | convert – screenshot.bmp

     

    Benchmark:

    The benchmark command sends 100 requests via LAN and measures the average response time of the instrument. It can be used as a gauge for the health of the connection. Higher response rates = faster links.

    $ lxi benchmark –address <ip>

     

    Manual vs. Auto-load:

    The commands can also be manually or auto-loaded:

    Auto-load/detect:

    $ lxi screenshot –address 10.0.0.42

    Vs. manually specifying which screenshot plugin to use:

    $ lxi screenshot –address 10.0.0.42 –plugin siglent-ssa3000x

    The only advantage of manually specifying which plugin to use it that it is a bit faster because it does not go through the instrument auto detection steps (retrieve ID, parse regex rules to match correct plugin etc.).

     

    Sending instrument specific commands:

    You can also use the SCPI command to send any command to the instrument.

    Note that if you have an SCPI command with spaces you must remember to send the specific command in quotes like so:

    $ lxi scpi –address 192.168.55.113 “MEAS:VOLT? CH1”

    This way the tool knows how to parse the full SCPI string.

    In this example, we send the “READ?” command to an SDM and return a reading:

     

     

    GUI

    Another really great feature is the GUI for LXI Tools. This allows you easy access to discovery of instruments on the network as well as some powerful tools for data capture and instrument control.

    $ lxi-tools.lxi-gui

    This adds a very simple yet powerful graphical interface for the LXI tools program:

     

    NOTE: Ignore the “Qt” error shown.

    This opens a clean control window:

     

    • Search: Discover the instruments connected to the LAN. Here, we have three instruments connected:

     

    • SCPI command line: Send instrument specific commands. Click on the instrument you wish to communicate with and then enter the command. For queries (commands that require an instrument response, or read function), the returned string will be shown in the text box:

    NOTE: The specific commands that can be used are available in the instrument programming guide. Check out the specific instrument documentation for more details.

    This tool can be helpful when trying out specific sequences of commands. You can send them one-at-a-time and then observe the instrument functionality.

     

    • Screenshot:  Capture and save an image from the instrument. This also features a “live” button that will continuously poll the instrument.

     

    After saving, you can recall the image:

     

    • Benchmark:  Checks the performance of the LAN  connection by sending a series of commands and measuring the response time. Larger “requests/second” = greater possible bus performance.

     

    • Data Recorder:  Sends the user-defined command a number of times/second and attempts to graph the data. Be aware that data can be returned in different formats and at different rates depending on device configuration. Going faster can make the system unstable and could cause a crash or hang-up.

     

    And the data: 

     

    • Settings: Configure the timeouts and other controls.

     

    • About:  Version info.

     

     

     


    *Here is a list of the latest compatible instruments tested with Lxi-Tools (03/13/2018)

    SSA3000X Series:

    SSA3000X (Latest 1.2.8.5a)

     

    SDS1000X-E Series:

    SDS1202X-E (Older 5.1.3.8R2)

    SDS1202X-E (Latest 5.1.3.13)

    SDS1204X-E (Latest/first production release 7.6.1.12)

     

    SDS1000X/X+ Series:

    SDS1202X+ (Latest 1.1.2.15E3)*

    *LIMITED COMMAND SET AVAILABILITY

     

    SDS2000X Series:

    SDS2304X (Older 1.2.2.2)*

    SDS2304X (Latest 1.2.2.2R10)*

    *LIMITED COMMAND SET AVAILABILITY

     

    SDS2000 Series (replaced by the SDS2000X):

    SDS2204 (Latest 1.2.2.2)*

    *LIMITED COMMAND SET AVAILABILITY

     

    SDM3000 Series:

    SDM3045X (Older rev 5.01.01.01)

    SDM3045X (Latest rev 5.01.01.03)

    SDM3055 (Latest rev 1.01.01.01.19)

    SDM3065X (Older rev 3.01.01.02)

    SDM3065X (Latest rev 3.01.01.03)

     

    SDG1/2/6X Series:

    SDG1032X (Latest 1.01.01.22R5)

    SDG20122X (2.01.01.23R7)

    SDG6052X (Latest 6.01.01.28R1): 405.3

  • Programming Example: Using Python to configure a basic waveform with an SDG X series generator via o

    Programming Example: Using Python to configure a basic waveform with an SDG X series generator via o

    #!/usr/bin/env python 2.7.13
    #-*- coding:utf-8 –*-
    #—————————————————————————–
    # The short script is a example that open a socket, sends basic commands
    # to set the waveform type, amplitude, and frequency and closes the socket.
    #
    #No warranties expressed or implied
    #
    #SIGLENT/JAC 11.2018
    #
    #—————————————————————————–
    import socket # for sockets
    import sys # for exit
    import time # for sleep
    #—————————————————————————–

    remote_ip = “192.168.55.110” # should match the instrument’s IP address
    port = 5024 # the port number of the instrument service

    #Port 5024 is valid for the following:
    #SIGLENT SDS1202X-E, SDG2X Series, SDG6X Series
    #SDM3055, SDM3045X, and SDM3065X
    #
    #Port 5025 is valid for the following:
    #SIGLENT SVA1000X series, SSA3000X Series, and SPD3303X/XE

    count = 0

    def SocketConnect():
    try:
    #create an AF_INET, STREAM socket (TCP)
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    except socket.error:
    print (‘Failed to create socket.’)
    sys.exit();
    try:
    #Connect to remote server
    s.connect((remote_ip , port))
    except socket.error:
    print (‘failed to connect to ip ‘ + remote_ip)
    return s

    def SocketSend(Sock, cmd):
    try :
    #Send cmd string
    Sock.sendall(cmd)
    Sock.sendall(b’\n’)
    time.sleep(1)
    except socket.error:
    #Send failed
    print (‘Send failed’)
    sys.exit()
    #reply = Sock.recv(4096)
    #return reply

    def SocketClose(Sock):
    #close the socket
    Sock.close()
    time.sleep(1)

    def main():
    global remote_ip
    global port
    global count

    # Body: send the SCPI commands and print the return message
    s = SocketConnect()
    qStr = SocketSend(s, b’*RST’) #Reset to factory defaults
    time.sleep(1)

    qStr = SocketSend(s, b’C1:BSWV WVTP,SQUARE’) #Set CH1 Wavetype to Square
    qStr = SocketSend(s, b’C1:BSWV FRQ,1000′) #Set CH1 Frequency
    qStr = SocketSend(s, b’C1:BSWV AMP,1′) #Set CH1 amplitude

    SocketClose(s) #Close socket
    print(‘Query complete. Exiting program’)
    sys.exit

    if __name__ == ‘__main__’:
    proc = main()

  • Python Example: Building an Arb with 16-bit steps (SDG2000X/SDG6000X)

    Python Example: Building an Arb with 16-bit steps (SDG2000X/SDG6000X)

    The SIGLENT SDG2000X and SDG6000X feature 16-bit voltage step resolution. This provides 65,535 discrete voltage steps that can cover the entire output range (20 Vpp into a High Z load) which can effectively be used to test A/D converters and other measurement systems by sourcing waveforms with very small changes.

    In this example, we use Python 2.7 and PyVISA 1.8 to create a ramp waveform that is comprised of steps of the Least Significant Bit (LSB) from point 0 to 65535 on Channel 1.

    We also implement the TrueArb function that allows you to specify the sample rate and also ensures that each sample is sourced.

    NOTE: You will need to change the instrument ID to match your specific instrument. We also recommend setting the amplitude and other instrument parameters prior to enabling the output of the instrument.

    Here is pic of the instrument after loading the waveform:

     

    Here is a scope shot of the output:

    Here is a link to a Zipped version of the .PY file: SiglentSDG16BBitSteps

    Here is the text of the program:

    ##

    #!/usr/bin/env python2.7
    # -*- coding: utf-8 -*-
    import visa #Uses PyVISA 1.8 and NI-VISA runtime Engine 15.5
    import time
    import binascii

    #USB resource of Device
    rm = visa.ResourceManager()
    device = rm.open_resource(‘USB0::0xF4EC::0x1101::SDG6XBAQ1R0071::INSTR’)  #CHANGE TO MATCH YOUR INSTRUMENT ID

    #Little endian, 16-bit 2’s complement
    # create a waveform

    wave_points = []
    for pt in range(0x8000, 0xffff, 1):
    wave_points.append(pt)
    wave_points.append(0xffff)
    for pt in range(0x0000, 0x7fff, 1):
    wave_points.append(pt)

    def create_wave_file():
    #create a file
    f = open(“wave1.bin”, “wb”)
    for a in wave_points:
    b = hex(a)
    #print ‘wave_points: ‘,a,b
    b = b[2:]
    len_b = len(b)
    if (0 == len_b):
    b = ‘0000’
    elif (1 == len_b):
    b = ‘000’ + b
    elif (2 == len_b):
    b = ’00’ + b
    elif (3 == len_b):
    b = ‘0’ + b
    b = b[2:4] + b[:2] #change big-endian to little-endian
    c = binascii.a2b_hex(b) #Hexadecimal integer to ASCii encoded string
    f.write(c)
    f.close()

    def send_wave_data(dev):
    #send wave1.bin to the device
    f = open(“wave1.bin”, “rb”) #wave1.bin is the waveform to be sent
    data = f.read()
    print (“write bytes:”,len(data))
    dev.write_raw(“C1:WVDT WVNM,wave1,FREQ,2000.0,TYPE,8,AMPL,4.0,OFST,0.0,PHASE,0.0,WAVEDATA,%s” % (data))
    #”X” series (SDG1000X/SDG2000X/SDG6000X/X-E)
    dev.write(“C1:ARWV NAME,wave1”)
    f.close()

    if __name__ == ‘__main__’:

    create_wave_file()
    send_wave_data(device)
    device.write(“C1:SRATE MODE,TARB,VALUE,333333,INTER,LINE”) #Use TrueArb and fixed sample rate to play every point

    ###

  • Resolver Simulation using an Arbitrary Waveform Generator

    Resolver Simulation using an Arbitrary Waveform Generator

    A resolver is an electromagnetic sensor that is used to determine the mechanical angle and velocity of a shaft or axle. They are often used in automotive applications (cam/crankshaft position), aeronautics (flap position), as well as servos and industrial applications.

    When designing, testing, or troubleshooting systems that use resolvers, it can be worthwhile to build a system that can easy simulate the output of a resolver. This is especially helpful when testing the operational limits of the resolver measurement circuitry and any code that may accompany these measurements. Simulation allows you to control and test the limits of operation of a system by adding known errors to the signal or by changing the frequency/amplitude/waveform shapes to see where the system begins to fail.

    In this application note, we are going to describe a method of simulating a simple resolver using a SIGLENT SDG2000X Series arbitrary waveform generator.

    RESOLVER BASICS

    Many resolvers share a similar design as shown in Figure 1: A primary winding or coil that is attached to a shaft or rotor, and two stationary windings, or stators that are positioned at 90 degrees to one another.


    Figure 1: Basic resolver design.

    The primary winding is energized with an AC Voltage, Vr. This primary excitation signal is typically a sinewave that is then coupled into both secondary coils. In many resolvers, the secondary coils are built such that coils are physically mounted 90 degrees from one another. Since each coil is physically located in a different location with respect to the primary coil, they will each have different coupling efficiency and, because they are mounted 90 degrees apart, their outputs will be orthogonal (90 degrees out-of-phase of each other). As the shaft angle changes, the output signal for the secondary coils will change as shown in Figure 2.


    Figure 2: Coil voltage vs Rotor Angle for a sine primary voltage.

    Therefore, there are discrete voltage values for each shaft angle. By measuring the instantaneous voltages of the secondary coils, you can determine the rotor angle.

    EQUIPMENT

    In this simulation, we are going to use a waveform generator to source the primary coil signal. This signal will be used to simultaneously modulate the outputs of a dual channel generator. These outputs will represent the secondary sine and cosine coil output signals, as discussed previously.

    • SDG805: Modulation source for secondary coil outputs.This instrument should be able to match the primary coil minimum and maximum frequency specifications of the resolver you are simulating. Many resolvers have primary coil signals that vary from 5 k to 20 kHz and a few hundred mV to 100’s of volts. These higher voltages are used to excite the secondary coils.
    • SDG1032X: Secondary coil simulation.This model has a single external modulation input, independent phase control, and Dual Side Band AM (DSB-AM) modulation which we will need to successfully simulate the sine and cosine signals of a resolver.
    • Dual Channel Oscilloscope: Signal verification.It is important to select a scope with the proper bandwidth (at least 2 to 3x the max frequency of primary frequency, even higher if the primary has higher harmonics/square wave). In this example, we are going to use a SIGLENT SDS2102X. This platform has deep memory (140M points), zoom, and a large display that will make verification easier.

    SETUP

    Use a BNC terminated cable to connect CH1 output of the primary generator to the Aux/Mod In of the secondary coil generator, as shown below in Figure 3.


    Figure 3: Physical connections between the two generators.

    1. Connect the secondary coil outputs of the second generator (CH1 and CH2) to the inputs of the oscilloscope.

    2. Configure the primary coil generator to output a sine wave at the lowest frequency of Vr for your system. Typically, the Vr frequency ranges from 5 k to 20 kHz.

    The primary coil generator is going to be used to modulate the output signals of the secondary coil generator. The voltage for the primary signal should be low to start (5Vpp). We will optimize it later.

    3. Set the secondary coil generator CH1 to output a sine wave with a frequency of 1Hz, voltage of 10Vpp (or equivalent to the maximum voltage of your resolver circuit).

    4. Set the secondary coil generator CH1 to perform a Dual-Side-Band AM (DSB AM) modulation by pressing Mod and select the DSB-AM type.

    5. Configure CH2 on the secondary coil generator to output the same modulated sine signal as channel 1, only set the phase offset to 90 degrees. This will provide the orthogonal output phase for the secondary cosine channel.

    The secondary coil frequency represents the rotational frequency of the rotating primary coil in a physical resolver. Be sure to set both CH1 and CH2 to the same frequency.

    NOTE: The SIGLENT SDG1000X and SDS2000X series feature a Channel Copy
    And a channel coupling function which makes the process easier.

    To couple the frequency selection between two channels, press Utility > CH Copy Coupling > FreqCoupl = ON. Now, any changes in frequency on either channel will be applied to the other channel. This allows you to simultaneously change both frequencies.

    To copy settings from one channel to another, press Utility > CH Copy Coupling > CH Copy > CH1 => CH2

    6. Enable the primary coil generator CH1 and both outputs of the secondary coil generator.

    7. Verify the performance, adjust the secondary coil frequency (rate of change of the rotor), verify, and so on until you have fully tested the limits of the resolver system.

    The figures below show images of secondary coil simulations at various primary coil frequencies and secondary coil frequencies:


    Figure 4: Primary coil 5 kHz, secondary coils at 100 Hz.


    Figure 5: Primary coil 5 kHz, secondary coils at 200 Hz.


    Figure 6: Primary coil 10 kHz, secondary coils at 100 Hz.


    Figure 7: Primary coil 10 kHz, secondary coils at 200 Hz.

    TIPS

    Do not overdrive the modulation input of the secondary coil generator with too much voltage. Around 10Vpp is enough to get full modulation without overdriving. Figure 8 below shows when too much voltage is applied to the modulation input (12Vpp). Figure 9 shows correct modulation depth (10Vpp).


    Figure 8: Primary modulation voltage is too high. Note square edges of the waveforms.


    Figure 9: Primary modulation voltage is correct. Note the smooth edges of the waveforms.

    Compare the modulation frequency of the primary coil and the modulation specifications of the secondary coil generator. If the modulation input of the secondary generator is low frequency, you may get “steps” in the output, as shown below:


    Figure 10: Secondary coil signals with a primary coil frequency set too high.


    Figure 11: Zoom of high frequency primary voltage. Note “steps” due to quantization.

    If this is the case, you can smooth the “steps” by placing low pass output filters on each of the secondary coil generator outputs.
    This is very similar to filtering the images from a digital-to-analog (DAC) converter.

    The SDG1000X and SDG2000X have modulation sample clocks that are operating at 600 kHz. By adding a low pass filter with a pass band below the Nyquist limit for 600 kHz,

    Design the filter such that the passband is below the 1st image frequency.

    CONCLUSION

    Simulating resolver outputs using arbitrary waveform generators provides an easy way to verify and troubleshoot the operation of resolver circuitry and software. The SIGLENT SDG1000X and 2000X series provide flexible and fast test instruments for this application.

    REFERENCES

    Infineon; (2016, December). DSD: Delta Sigma Demodulator [Web Article]. Retrieved from https://infineon.com
    Szymczak, J.; et. Al (2014, March). Precision Resolver-to-Digital Converter Measures Angular Position and Velocity [Web Article]. Retrieved from https://analog.com
    For more information, check Arbitrary Waveform Generators, or contact your local Siglent office.

  • The basic output waveform and related parameters of the arbitrary waveform generator

    The basic output waveform and related parameters of the arbitrary waveform generator

    Traditional function generators can output standard waveforms such as sine waves, square waves, and triangle waves. However, in actual test scenarios, in order to simulate the complex conditions of the product in actual use, it is often necessary to artificially create some “irregular” waveforms or add some specific distortion to a waveform. Traditional function generators can no longer meet the requirements and an arbitrary waveform generator may be a good option.

    Arbitrary waveform generators can easily replace the function generators. They can source sine waves, square waves, and triangle waves like a standard function generator. In addition, they can also output pulse, noise, DC signal types, modulated signals, sweeps and bursts. Many arbitrary waveform generators currently on the market are equipped with arbitrary waveform drawing software. Through this software, theoretically, the arbitrary waveform generator can be remotely controlled to output all the signals required in the test process.

    So, what types of waveforms can an arbitrary waveform generator output?
    What parameters are available for an arbitrary waveform?
    How to measure the quality of the output waveform?

    1. Sine Wave / Cosine Wave

     

    Figure 1 Sine wave / Cosine wave

    Sinusoidal (sine) and cosine waves are the two most familiar waveforms in electronics.
    Sine/cosine waves are defined as follows.

      (Formula 1)

    OR

      (Formula 2)

    Where A represents the amplitude of the sine wave,  represents the angular frequency, and  represents the initial phase, which can be omitted in the general calculation. The sine and the cosine waves are essentially the same, but the initial phase differs by 90 °.

    Figure 2 Sine wave setting interface in SDG1000X
  • Two-tone testing: Building an arbitrary waveform using the Equation Draw function

    Two-tone testing: Building an arbitrary waveform using the Equation Draw function

    In this note, we are going to use Equation Draw within EasyWave to create a waveform that is built using the addition of sine waves with two different frequencies (700 and 1900 Hz). We will then show how to use this signal to modulate a carrier up-to 500 MHz using the other SDG output channel.

    EasyWave is free software designed to help create and edit arbitrary waveforms and download them to applicable SIGLENT SDG series of arbitrary waveform generators, including the SDG800, 1000, and X series. You can download it here: EasyWave

    EasyWave has an interesting feature called Equation Draw that enables you to create complex waveforms using some common basic math and trigonometric functions, like +, -, *, /, sine, cosine, and more.

    NOTE: Two-tone testing is commonly used to test the performance of audio data that is embedded in modulated signals like AM or FM radio broadcasts. You can use two-tone signals to check the performance of RF receivers. The ARRL and other radio-centric organizations have lots of data on testing receivers, for those so inclined.

    Many of the SDG products have a wave combine feature that mathematically adds the waveforms for both channel 1 and channel 2. This is technically easier than the process we highlight in this note, but it requires the use of both channels of the SDG. The using a single output arbitrary waveform allows us to use the other free channel for other tasks, including sourcing a carrier modulated by our two-tone signal (see the end of this note for more info).

    To learn about Wave Combine, click here: Wave Combine

    Setup

    • SIGLENT SDG arbitrary waveform generator (We are using an SDG6052X capable of 500 MHz for this note)
    • EasyWave software
    • USB or LAN connection

    Before beginning, please install EasyWave (The instructions are available with the download available here: SDG Software Downloads) and connect the instrument to the computer.

     

    1. Open EasyWave by double-clicking on the EasyWave Icon:

     

    2. Open a new waveform:

     

    3. Name the waveform (optional) and set the frequency of the main repeated waveform. In this case, we will set the Frequency to 100 Hz. Press OK:

    NOTE: The arbitrary waveform “frequency” is the repetition frequency of the entire waveform loaded into memory. If that waveform has a single period, then the set frequency here will be the frequency of the output waveform. If the waveform has 2 periods, then this frequency will be half of the actual waveform frequency (because there are 2 periods per memory “frame”). In this process, the frequency set in this step is equal to the “X” variable used in future steps.

     

    4. This opens the wave1 waveform window. Now, click on the Equation Draw icon to open the equation editor. This includes a listing of available math elements as well as a saved equations area.

    For this example, we want two tones… one at 700 Hz and the other at 1900 Hz. Since we set the output frequency to 100 Hz (remember we named that “X” above), we can simply enter our equation in the New Equation field using standard trigonometric functions as shown:

    y(x) = sin(7*x) += sin(19*x)

    Press OK to enter.

    NOTE: This will create a waveform that is the addition of two sine waves. One with a frequency 7 times X (7*100 Hz = 700 Hz) and the other with a frequency 19 times X (19*100 Hz = 1900 Hz).

    Now, the wave window shows a green waveform that represents the waveform we entered via the Equation Draw method. Confirm that it matches your expectations for your application.

     

    5. Press Communication to open the dialog to begin downloading the waveform to the instrument:

     

     

     

    6. Select the connection type (USB = USBTMC) and press OK

    7. Select the correct USB device, Waveform Name, and Channel.. press OK:

    8. Now, you can observe the waveform and parameters on the display of the generator. Here, you can change the base frequency, amplitude, and other waveform characteristics.

     

    Here is a screen capture of an oscilloscope using the FFT function to capture the spectral content of the output using the waveform created:

    Note that the frequency markers show peaks at 700 and 1900 Hz, as expected.

     

    Next Step: Source a two-tone modulated carrier

    Now that we have verified the two-tone output, we can use this waveform as a modulation source for a higher frequency carrier. This modulated signal can be used to test the performance of a receiver.

    Here are two options for creating a modulated carrier:

    SDG External Modulation for carriers < 500 MHz

    Many SDG generators include an external modulation input which can be used to modulate the output of a specified channel. In this example, we can simply route the two-tone channel to the external modulation input. Then, configure the other channel to output a modulated carrier.

    Here, we will use the SDG6052X, which can output sine waves up to 500MHz. As mentioned previously, this technique works with any dual channel SDG. When selecting a generator, remember that the maximum carrier output frequency includes the modulation bandwidth. If your generator has a maximum frequency of 100 MHz and the modulation bandwidth is 10 kHz, then the maximum carrier frequency when modulation is active will be 100 MHz – 10 kHz/2.

    • Route a cable from the two-tone channel to the Aux In located on the rear panel. In this case, channel 1 is the two-tone source:

    Front Panel:

    Rear Panel:

    • Configure the other channel as the modulated carrier (channel 2, in this example) for external modulation by pressing Mod and configuring the channel as shown.

    Here, we set the channel to use the external input to modulate an AM carrier with a frequency of 144 MHz, in the amateur radio broadcast 2m band :

     

    Now, we can confirm the output using a spectrum analyser.

    Here, we connect the modulated carrier output (channel 2) into a SIGLENT SVA spectrum analyser:

     

     

    Here, you can see the carrier at 144 MHz, and the two tones at +700, +1900, -700, and +1900 Hz from the carrier.. as expected.

    NOTE: Make sure that the output power of your SDG is low enough to prevent damage to the spectrum analyser or add enough external attenuation to make sure you don’t damage the input.

  • Testing Open Socket Communications Using PuTTY

    Testing Open Socket Communications Using PuTTY

    Many instruments include the ability to be controlled via a remote connection to a computer using an Ethernet connection. In many cases, these instruments require a special software library that can help establish and maintain the communications link between the instrument and controlling computer. This can be annoying for a few reasons… the software library is likely to occupy a large amount of space on the controlling computer and is also required on any computer that is being used to control the instrument. In a remote networking application where multiple user’s may want access to a test instrument, this can cause support and installation headaches.

    Luckily, there are a few solutions that can help. In this application note, we are going to discuss using open socket communication techniques using an open source communication tool called PuTTY with a SIGLENT SSA3032X spectrum analyser.

    What are open sockets and why use them?

    Within the context of Ethernet/LAN connections, sockets are like mailboxes. If you want to deliver information to a specific place, you need to be sure that your information is delivered to the correct address.

    In the context of test instrumentation, an open socket is a fixed address (or port number) on the Ethernet/LAN bus that is dedicated to process remote commands.

    Open sockets allow remote computers to simply use existing raw Ethernet connections for communications without having to add additional libraries (VISA or similar) that require additional storage space and processing overhead.

    Programs that utilize sockets for LAN communication tend to take up less memory and operate more quickly.

    PuTTY

    PuTTY is an open source software tool that provides a number of simple communication links (RAW, Telnet, SSSH, Serial, and others). It is available for free and there are a number of versions available for popular operating systems.

    You can download as well as learn more here: https://www.putty.org/

    In this example, we are using PuTTY to verify the raw LAN connection is working properly. It is quite a simple program that does not allow for very complex operation (sequences, converting data sets/strings, etc..). If you require more complex functionality, software platforms like Python, .NET, C#, LabVIEW, etc.. can be used to control the instrument using a similar open socket connection.

    Configuration

    In this test, we are using the most current revision of the SIGLENT SSA3032X Spectrum Analyzer firmware (Revision 01.02.08.02) which enables open socket communication.

    This example also uses PuTTY version 0.67:

    Steps

    1. Install PuTTY for the OS you intend to use

    2. Make sure your instrument and firmware revision can use open sockets

    The SSA3032X revision 01.02.08.02 enables open socket communication.

    To find the revision, press the System button > Sys Info.

    Figure 1 below shows a sample system information screen from a SIGLENT SSA3000X analyzer:


    Figure 1: Sample system information page from an SSA3000X.

    Check the product page and firmware release notes for more information.

    3. Connect the instrument to the local area using an Ethernet cable

    4. Find the IP address for the instrument. This is typically located in the System Information menu. On the SIGLENT SSA3032X, press the System button on the front panel > Interface > LAN.

    Figure 2 below shows a sample LAN setup page from a SIGLENT SSA3000X:


    Figure 2: Sample LAN information page from an SSA3000X.

    5. Open PuTTY

    6. Select Raw as connection type

    7. Enter the IP address in the Host Name field

    8. Enter the port number. This should be provided in the users or programming guide for the instrument.

    The SIGLENT SSA3000X uses port 5025.

    Figure 3 below shows the PuTTY configuration for this example:


    Figure 3: Example PuTTY configuration.

    9. Press Open. This will open a terminal window as shown in below:

    10. Using the computer keypad, enter *IDN? and press the Enter key on the keyboard to send the command.

    This is the standard command string that is used to request the identification string from the instrument. As shown below, the instrument responds with the manufacture, product ID, Serial Number, and firmware revision.

    Conclusion

    PuTTY is an easy way to verify an operational LAN connection to instrumentation that can use open sockets.

  • Verification of a LAN connection using Telnet

    Verification of a LAN connection using Telnet

    Automating a test can dramatically increase the productivity, throughput, and accuracy of a process. Automating a setup involves connecting a computer to the test instrumentation using a standard communications bus like USB or LAN and then utilizing code entered via a software layer (like LabVIEW, .NET, Python, etc..) to sequence the specific instrument commands and process data.

    This process normally goes quite smoothly, but if there are problems, there are some basic troubleshooting steps that can help get your test up-and-running quickly.

    In this note, we are going to show how to use Telnet to test the communications connection between an instrument and a remote computer using a LAN connection to ensure that it is working properly. Once the connection is verified, you can begin to work on the control software.

    Telnet provides a means of communicating over a LAN connection. The Telnet client, run on a LAN connected computer, will create a login session on the instrument.

    NOTE: The Telnet connection requires open sockets on the instrumentation. At this time, not all SIGLENT products feature open sockets. Check the product page FAQs or with your local SIGLENT support office for more information.

    A connection, established between the computer and instrument, generates a user interface display screen with SCPI> prompts on the command line.

    Using the Telnet protocol to send commands to the instrument is similar to communicating with USB. You establish a connection with the instrument and then send or receive information using SCPI commands. Communication is interactive: one command at a time.

    The Windows operating systems use a command prompt style interface for the Telnet client.

    STEPS

    1. Power on and connect the instrument to the network via LAN

    2. Verify that the Gateway, Subnet Mask, and IP address of the instrument are valid for the network you wish to use. This information is typically located in the System Information or IO menu. See the specific instrument user’s guide for more information on LAN settings.

    3. On the computer, click Start > All Programs > Accessories > Command Prompt.

    4. At the command prompt, type in telnet.

    5. Press the Enter key. The Telnet display screen will be displayed.

    6. At the Telnet command line, type: open XXX.XXX.XXX.XXX 5024 where XXX.XXX.XXX.XXX is the instrument’s IP address and 5024 is the port. You should see a response similar to the following:

    7. Now, you can enter any valid command for the specific instrument that you are controlling. See the specific programming guide for the instrument for more information.

    This is especially helpful when you are planning a specific test sequence, the effect of delays/timing, or troubleshooting a command. You can send each command one-at-a-time and check the performance of the instrument.

    *IDN? is a common identification string query (question or information request) that returns the information from the connected instrument

  • Programming Example: Open Socket LAN connection using Python

    Programming Example: Open Socket LAN connection using Python

    Automating a test can dramatically increase the productivity, throughput, and accuracy of a process. Automating a setup involves connecting a computer to the test instrumentation using a standard communications bus like USB or LAN and then utilising code entered via a software layer (like LabVIEW, .NET, Python, etc..) to sequence the specific instrument commands and process data.

    In this note, we are going to show how to use Python to create a communications link between an instrument and a remote computer using a LAN connection. Once the connection is verified, you can begin to work on the control software.

    NOTE: This example requires open sockets on the instrumentation. At this time, not all SIGLENT products feature open sockets. Check the product page FAQs or with your local SIGLENT support office for more information.

    Python is an interpreted programming language that lets you work quickly and is very portable. Python has a low-level networking module that provides access to the socket interface. Python scripts can be written for sockets to do a variety of test and measurements tasks.

    Here is a Python 2.7 script that opens a socket, sends a query and closes the socket. It performs this operation in a loop 10 times:

    PythonSocket_052018

    You can follow the instructions below to build your own example:


    1. Power on and connect the instrument to the network via LAN

    2. Verify that the Gateway, Subnet Mask, and IP address of the instrument are valid for the network you wish to use. This information is typically located in the System Information or IO menu. See the specific instrument user’s guide for more information on LAN settings.

    3. Download python and your favourite python editor (I use IDLE):

    https://www.python.org/

    https://docs.python.org/2/library/idle.html

    Start your python editor:

    5. Open a new file by pressing File > New File.. and name the file

    6. Copy and paste the code at the end of this note into the file editing window:

    7. Change the IP address and port number so that they match the IP address and port for the instrument you wish to connect to:

    Save the file:

    8. To Run, select Run and Run Module:

  • Programming Example: List connected VISA compatible resources using PyVISA

    Programming Example: List connected VISA compatible resources using PyVISA

    PyVISA is a software library that enables Python applications to communicate with resources (typically instruments) connected to a controlling computer using different buses, including: GPIB, RS-232, LAN, and USB.

    This example scans and lists the available resources.

    It requires PyVISA to be installed (see the PyVISA documentation for more information)

    ***

    #Example that scans a computer for connected instruments that
    #are compatible with the VISA communication protocol.
    #
    #The instrument VISA resource ID for each compatible instrument
    #is then listed.
    #
    #
    #Dependencies:
    #Python 3.4 32 bit
    #PyVisa 1.7
    #
    #Rev 1: 08302018 JC

    import visa

    def main():

    rm = visa.ResourceManager()
    print (rm.list_resources())

    if __name__==’__main__’:

    main()

    *****

    Here is the code:

    And here is the result of a scan:

     

    Each connected instrument returns a specific formatted string of characters called the VISA Resource ID.

    The resource ID format is as follows:

    ‘Communication/Board Type (USB, GPIB, etc.)::Resource Information (Vendor ID, Product ID, Serial Number, IP address, etc..)::Resource Type’

    In the response, each resource is separated by a comma. So, we have three resources listed in this example:

    ‘USB0::0x0483::0x7540::SPD3XGB4150080::INSTR’ – This is a power supply (SPD3X) connected via USB (USB0)

    ‘USB0::0xF4EC::0x1301::SVA1XEAX2R0073::INSTR’ – This is a vector network analyzer (SVA1X) connected via USB (USB0)

    ‘TCPIP0::192.168.55.122::inst0::INSTR’ – This is an instrument connected via LAN using a TCPIP connection at IP address 192.168.55.122