Monday, April 30, 2012

ECU Fuel Injection Loop Calibration

In this post we will look at how a precision DC source or an SMU can be used to calibrate the fuel injection loop in a automobile or other engine powered equipment. The fuel injection flow to an engine is controlled by a solenoid that is adjusted either more open or more closed by a driver output from the engine control unit (ECU). Fuel injection control has always been an important part or a vehicle design, but recently the precision it is tested to has become even more critical because it is closely tied to a vehicle's fuel efficiency. Tight control over fuel injection means at any given moment the engine is getting the right mixture of fuel and air to ensure maximum efficiency.

Below is a basic circuit diagram of a fuel injection control circuit. The inductor at the top represents the fuel injector solenoid. The amount of current flowing through the solenoid determines how open or closed it is, which in turn controls the flow of fuel to the engine. The amount of current flowing through the solenoid is controlled by the MOSFET, which is pulse width modulated by a control circuit from the ECU. The rate of the PWM is determined using the control signal from the accelerator and the output of the current sense circuit. The test we will look at is used to calibrate the control loop to the output of the current sense circuit at various current levels.


There are two ways the calibration factors could be determined. The first is by isolating the circuit from  Vbatt and the solenoid and just forcing a known amount of current through the circuit using a current source. Below is a an example of how the test was done by an engineer at an automotive company using the Agilent N6762A Precision DC Source.

The DC source is used in constant current mode so it acts like a current source. Precision DC sources have high accuracy current sourcing capabilities which is ideal for this application. To perform the test iterate the output current value of the DC source through the full range of the solenoid, open to closed. Then use the measured values to build a look up table or create a curve fitted equation. Instead of a precision DC source a source measure unit (SMU) could also be used. An SMU will typically deliver slightly better current accuracy, but at a higher price. 

The second way to calibrate the fuel injection control is by operating the whole circuit in normal operation with Vbat and the solenoid or at least something that simulates Vbatt and the solenoid. You then use an SMU as a zero ohm shunt in series with the current path. To use an SMU as a zero ohm shunt you simply insert it into the circuit set it for 0V so its output is regulated at 0V. That way there is no voltage dropped across it so it doesn't effect the circuit. The circuit current from Vbatt will then flow through the SMU (it is sinking the current). The SMU would then accurately measure the current flowing through it. Using an SMU as a zero ohm shunt is much better then using a real current shunt, because a real shunt will add a non-zero amount of resistance to the current path. For this type of setup you want to make sure the SMU has a fast transient response spec to ensure proper regulation at 0 volts in the face of dynamic current changes.

In this post we looked at two ways to calibrate the fuel injection control loop in an automobile using either a precision DC source or an SMU. If you have any questions on this post please email me and if you have any insights to add just use the "Comments" section below.





Monday, April 23, 2012

Controlling Instruments with Excel without Writing Code

The below video demonstrates how to use Excel to connect to, control, and read data back from an instrument. What makes this possible is a free software package from Agilent called Command Expert.  For an overview of Command Expert that was covered in an earlier post click here. When you download the Command Expert software package it creates a plug-in for Excel. You can then use the Excel plug-in to create a spreadsheet that can connect, control, and grab measurements from one or more instruments. This is all without writing a single line of code. From there you can use the various data handling features in Excel, such as plotting, to analyze data and create test reports. The following video demonstrates the capability.


Command Expert is super easy to use and it contains easy to follow examples to get you started. 




Monday, April 16, 2012

Understanding Switch Types for Automated Test

Switches serve as the central nervous system in automated test. They interface between the DUT and the test instruments routing signals to and from the DUT. In this post we will look at different low frequency switch types and discuss some of their pros and cons to help you choose the right type of switch for your measurement needs.

The types of switch we will be looking at in this post include: armature relays, reed relays, solid-state switches, and mercury-wetted relays. The following is a quick overview of each.

Armature relays — Because of their ruggedness, cost, and ability to handle higher currents and voltages, armatures are the most commonly used relays. Armature relays usually have low resistance. They generally have slower switch times, and they are somewhat more susceptible to arcing and switch bounce than the other types. Some armature relays are sealed; others are not.

Typical Lifetime: 10M
Typical speed: 250/s

Reed relays — When you need to switch at high speeds, reed relays typically are a good choice. In general, reed relays switch much faster than armature relays, have very low contact resistance and offer the added benefit of being hermetically sealed. They do not have the capacity to carry as high voltages and currents as armature relays.

Typical Lifetime: 10M
Typical speed: 2000/s

Reed Relay
Solid-state switches — Solid-state switches can cover low to high power switching applications, for instance they can be used for switching ac line voltages. The two main advantages of solid-state switches is their speed and no moving parts. Solid-state switches have the fastest switch times of all the switches. Since they have no moving parts there is no arcing or switch-bounce problems. They basically have an infinite lifetime as long as they are used within their power ranges. However, they generally have the highest "on" resistance of the switches and their isolation and crosstalk specs are typically the worst of the group.

Typical Lifetime: Inifinite
Typical speed: 4000/s


Mercury-wetted relays — Of all the switches mercury-wetted relays are the least common. These switches use liquid mercury inside to avoid switch bounce. They also have a long life compared to the other mechanical switches and have very low contact resistance. However, they are position-sensitive due to the liquid mercury, and must be mounted in the correct orientation to operate properly. They can also be expensive. These switches are used in applications were switch bounce cannot be tolerated and a low "on" resistance is needed. Today there are not many test and measurement companies who provide mercury-wetted relay cards or products so you typically have to integrate them into your test system on some type of custom platform.

Typical Lifetime: 10M
Typical speed: 50/s

Mercury-Wetted Relay
The best way to ensure your relays have a long life is by ensuring that they are used within their power ratings. But with mechanical relays, namely armature and reed, the lifetime can also be dependent on the type of load they are used with. This is due to their susceptibility to arcing which occurs from the electric field at the relay when it is opened or closed. Relay manufacturers specify how long their relays will last, but the expected lifetime will vary depending on the loads they are subjected to. For resistive loads, manufacturers’ specifications are typically fairly accurate. On the other hand, if you are using capacitive or inductive load, your relay life span will be shorter than the manufacturers specification. How much shorter depends on the type of loads you are switching. One technique you can use to better manage the lifetime of your switch relays is derating. Derating gives you a realistic picture of how long your relay will last. Loads can be classified into four general groups:

Resistive loads — Relay manufacturers assume you will be using resistive loads when they rate their relays. The load is a simple resistive element, and it is assumed that the current flow through the contacts will be fairly constant, although some increase may occur due to arcing during “make” or “break.” Ideally, a relay with a purely resistive load can be operated at its stated voltage and current ratings and attain its full lifetime. Industry practice, however, is to derate to 75 percent of the relay’s stated capacity.

Inductive loads — Switching inductive loads is difficult, primarily because current tends to continue to flow in inductors, even as contacts are being broken. The stored energy in inductors induces arcing; arc-suppression schemes are frequently used. When you are switching inductive loads, you typically will want to derate relay contacts to 40 percent of the resistive load rating.

Capacitive loads — Capacitors resemble short circuits when they are charging, so the in-rush current from a capacitive load can be very high. Series resistors are often used to limit in-rush current; without a limiting resistor, contact welding may occur. Its common today for switch card makers to integrate current protection resistors into their products. These protection resistors can be switched in or out of the current path as needed. When you are switching capacitive loads, you typically will want to derate your relay to 75 percent of the resistive rating.

Motor loads — When an electric motor starts up, it has very low impedance and requires a large in-rush current to begin building a magnetic field and begin rotating. Once it is running, it generates a back electromagnetic force (emf), which can cause a large inductive spike when the switch is opened. The result is a large in-rush current at “turn-on” and arcing at “turn-off.” When you are switching a motor load, typical industry practice is to derate to 20 percent of the resistive rating.


In this post we looked at an overview of different switch relay types for low frequency automated test purposes. From there we discussed switch lifetime, focusing on armature and reed relay types. If you have any questions on this post send me an email and if you have anything to add use the comments section below.

Click here to check out Agilent's switching solutions

Monday, April 9, 2012

Simulating Power Line Communication Signals

Power line communication or power line carrier (PLC) is getting a lot more attention these days since it is used in many of the new green energy electronics such as smart grid devices, solar inverters, and home automation. PLC is communication technique that uses the power wiring in buildings or grid power transmission lines as its communication channel. In this post we will look how you can easily generate complex PLC signals for test purposes with a low cost function / arbitrary waveform generator (FG/AWG). For a more general overview on PLC click here.

Generating communication signals for testing typically requires costly test equipment like a signal generator for the carrier and a FG/AWG for the baseband. For PLC signals we can skip the costly signal generator and just use a modern FG/AWG. There are two main reasons we can skip the signal generator for simulating PLC signals. The first one is the carrier signal for PLC is typically less than 1 MHz so it falls well within the bandwidth capabilities of a FG/AWG. The second is modern FG/AWGs have advanced features for creating complex signals. These features include:

  • Large waveform memory for storing not only arbitrary waveforms, but also arbitrary signals.
  • Arbitrary waveform sequencing, which is analogues to a playlist on an MP3 player. It allows you to seamlessly combine multiple waveforms from memory to create a complex signal. Click here for more on waveform sequencing.
  • Optional second independent channel for creating an I and Q signal.
  • Advanced modulation capabilities such as waveform summing, modulating an arb with an arb, and for two channel FG/AWGs the ability to modulate the signal from one channel with the other channel.
Let's look at a couple of examples using Agilent's 33522A FG/AWG. Here is a simple example just using built-in waveforms. In the below screen shot from the 33522A, a BPSK signal with a 135 KHz carrier was created. For the baseband a built-in waveform known as a pseudo random bit stream (PRBS) was used. The PRBS waveform just delivers a close to random stream of 1s and 0s at a chosen bit rate, for this example 5.5 kbps was used. Of course an arbitrary waveform made up of real data could have been used for the basedband as well.


For the second example lets look at something a little more complicated. In this example a QPSK signal with a frequency hopped spread spectrum carrier was created using Matlab. The bit rate of the digital data was 10 Kbits/s. The signal lasts for 15 ms and consists of >500,000 data points. The waveform was transferred to the 33522A via a USB stick and a CSV file. Below is a screen shot of a portion of the signal.


In this example we used the FG/AWG's large waveform memory to output a large arb file (greater than 500K points) to create a 15 ms signal segment with the baseband modulation and the frequency hopping already in signal. This frees up the FG/AWG's modulation capabilities for other purposes such as simulating communication channel noise. Below is an example of using the modulation function to add some channel noise. The noise signal was a sharp pulse signal representing a large load transient on the power line. This was done on the 33522A by using the "sum" modulation feature. The source of the pulse noise signal was channel two on the 33522A.


In this post we talked about using a low cost function / arbitrary waveform generator for creating PLC signals. There are two main reasons why a FG/AWG makes a great solution for simulating PLC signals compared to a signal generator. The first is the carrier frequency of PLC signals is well within the capabilities of a FG/AWG. Second modern FG/AWGs have features like a large waveform memory, waveform sequencing, and advanced modulation capabilities. If you have any questions related to this post please email me and if you have anything to add use the comments section below.


Monday, April 2, 2012

Mask Testing Feature in Oscilloscopes

In this post we will look at the Mask testing feature found in today's oscilloscopes. Mask testing is a valuable feature that adds pass/fail testing to a scope’s traditional functions. Mask testing lets you capture a ”golden” waveform and define tolerance limits to create a test envelope. Incoming signals are compared to the allowable tolerance range and flagged as pass or fail. You can then select the action the oscilloscope performs if it detects a violation of the mask. Examples of some of these actions include stopping the test after one failure, saving screen images of waveform failures, and making measurements on failure waveforms.

As an example, on an Agilent 3000-X series scope I captured my golden waveform, navigated to the Mask test menu, and selected Automask. The Mask shown below in the figure was setup around my golden waveform. 


In the above figure the failure area for the Mask test is the gray around the waveform. The black area represent the pass area. By adjusting the Y and X parameters (bottom of figure) you can easily tune the size of the pass and fail area of the mask. You can also directly edit the Mask test file for more detailed editing of the Mask pass and failure areas. The below figure shows the example Mask test after being run a number of times.


Notice in the above figure the Mask test statistics. You can see the Mask test was run over 1.7 million times and in that time span 14 failures occurred. You can see in red where the failures occurred. 

The easiest way to perform a Mask test is to capture your golden waveform and use the Automask feature and then adjust the mask as needed. You can also create a custom mask file if you would like. This is done using X and Y parameters and regions. Regions are the separated failure areas in the Mask test. For instance, the above example there are two regions, the top one above the waveform and the bottom one below the waveform. There is typically a limit to the number of Mask regions you can create. For example on Agilent's 3000-X series up to 8 regions can be created for a Mask test. The below figure shows an 8 region Mask test setup.


In this post we looked at the Mask testing feature found on modern scopes. We looked at some Mask test examples using an Agilent 3000-X Series scope. As always if you have any questions feel free to email me and if you have any comments please leave them in the comments section below.