Deep Measure: Graphing Phase Shift with CAN

Ask any questions about using PicoScope 6 Automotive software here.
Post Reply
Steve Smith
Pico Staff Member
Pico Staff Member
Posts: 1581
Joined: Sun Aug 25, 2013 7:22 am

Deep Measure: Graphing Phase Shift with CAN

Post by Steve Smith »

A recent discussion here at Pico support focused on Phase Shift and Inter-Channel timing measurements. This discussion happened to coincide with the CAN Webinar that took place a few weeks ago. https://www.youtube.com/watch?v=sjvB_901hzA

With this in mind it got me thinking about CAN signal Phase Shift at various points on the CAN BUS. Can we be absolutely sure that CAN messages appear at the same time, with the same structure at any point along the twisted pair of network wires?

Depending on the length of the CAN bus there will inevitably be a propagation delay as messages/signals travel along the network. In reality there should be minimal delay as these signal travel close to the speed of light taking into account the Velocity of Propagation (Velocity Factor - VF)

Think about the journey a CAN message embarks upon once transmitted onto the BUS from a Gear Shift Lever to other controllers on the same network. Depending on the location of these controllers, the message may have to travel a considerable physical distance whilst passing through junction boxes, connectors, header joints & no doubt, twists and turns of the wires themselves.

All the above have an influence on the impedance of the CAN network and given CAN messages travel with minimal current flow (low energy) messages are vulnerable to acute changes in network impedance even though CAN is incredibly fault tolerant. (Impedance is everything)

topic21743.html#p98463

The propagation delay of CAN messages is accounted for within the CAN Standards and well documented with a little searching, and so in 99% of cases we should not experience any issues!

With that said, wouldn’t it be good to compare and qualify the phase shift between CAN messages at different locations upon the CAN Network?

Using PicoScope, Deep Measure and Excel this is possible…………….

Below we have CAN messages captured at the Gear Shift Lever using channel A & B and the Front Electronic Module (FEM) of a 2013 BMW F31 320d using channel C & D.

To minimise noise and to reveal any tiny anomalies between CAN messages captured at different points on the network the TA 375 High Impendence Probes (x10) were used: topic21591.html?&p=97872#p97872 in conjunction with math channels A-B (purple) and C-D (cyan) to reveal the differential voltage (Physical Layer) as utilised by each CAN controller (We want to see what the computers can see)
https://www.picoauto.com/library/traini ... onus-class
1 CAN BUS at different locations
1 CAN BUS at different locations
If we zoom into a single CAN message with all waveforms at zero volts in the center of the screen, we can look for any abnormalities in the phase between the signals.
Zoom 1
Zoom 1
At first glance everything looks fine, until we zoom into a single CAN bit
Zoom 2
Zoom 2
and zoom again on the rising edge of a single CAN bit where we capture a propagation delay of approx. 70 ns
Zoom 3
Zoom 3
With all this in mind, there is no fault with the CAN bus of this vehicle and the delay above is perfectly normal.

Above we have measured just a single rising edge from one CAN bit within a single message! Using Deep Measure, we can capture the start and end times of every voltage “Cycle” for every message at our chosen measurement points on the BUS. More information on Deep Measure can be found here: topic17711.html
Deep Measure set up
Deep Measure set up
Above we have applied Deep Measure to the differential voltage (A-B) captured at the Gear Shift Lever for buffer 18 only. A Cycle Threshold of 1 V with 40 mV of Cycle Hysteresis are used, whereby these setting are also applied for math channel C-D.

More information on Hysteresis settings can be found here https://www.picoauto.com/download/docum ... ide-en.pdf on page 157

A point to note here about Deep Measure and cycle time measurements.

1. A trigger must have been used in your initial capture as timings between channels (Inc. maths) will be referenced to the trigger position. In our original capture we have used a Simple Edge, Rising Trigger on Channel A at 3 V to capture the CAN Hi signal at the Gear Shift Lever. All timings (start and end times) will be relative to this trigger setting.

2. Deep Measure will capture the start and end time of each voltage cycle and not each bit/bits. The image below includes both dominant and recessive bits/bit in one cycle. Looking at the highlighted “Cycle 1” in the Deep Measure table, the voltage cycle is measured from the rising edge of the dominant bit at the cycle threshold of 1 V (Cycle start time 3.1 ns) to the cycle threshold at the start of the rising edge of the next dominant bit/bits ( Cycle end time 10.0022 us) Note that between these points there are Recessive bits/bit
Cycle Time
Cycle Time
3. Don’t assume the same amount of cycles will appear in each Deep Measure Table (Shift Lever & FEM) All things being equal (and they rarely are) we should have the same amount of cycles measured at the Shift Lever and at the FEM, assuming we have no faults The Deep Measure table below indicates 195 Cycles at the Shift Lever and 197 at the FEM! The question therefore is why and is this a fault?
Deep Measure Cycle Count
Deep Measure Cycle Count
Using the zoom function of PicoScope we can scroll along the math channels and view each cycle count to determine where both cycle counts have fallen out of synchronization. Below we can see that cycles 140, 141, 142 & 143 are aligned but a misalignment of cycles occurs commencing at cycle 144!
Phase Shift
Phase Shift
Zoom into cycle 144 and we can see why
Cycle Error
Cycle Error
The math channel C-D reveals an element of undershoot (and overshoot in other areas) within the differential CAN signal measured at the FEM compared to the Shift Lever (A-B). Once again, this is normal and not a fault, however it does indicate how such signals differ at various locations on the CAN network. The above technique could therefore be used for capturing differential voltage anomalies that result in the occasional erroneous CAN messages.

This also highlights the need to amend the cycle threshold setting for C-D in order to avoid the undershoot being misinterpreted by Deep Measure as the end of cycle 144. The Capture below has increased the cycle threshold to 1.3 V whilst applying minimal Low Pass filtering of 6 MHz to channel D. (Note: math channel C-D is comprised of data captured on channels C & D and so any filtering to these channels will be replicated in the math channel) Using a combination of these software features will enable each cycle count to synchronize, but be aware of altering these settings simply to align cycles without a thought to the consequences. You may actually filter out the detail you wish to capture! (Remember this vehicle has no faults!)
Cycle Threshold amendment
Cycle Threshold amendment
Once we have confirmed each Deep Measure Table contains an equal number of cycles (with minimal low pass filtering) press the “Export” button to export the data into Excel (for both Deep Measure Tables) where we can graph the difference between the start or end time of each cycle between math channels.
Confirm Count and Export
Confirm Count and Export
The following video describes the Deep Measure settings, the Export of data into Excel and the transformation of each cycle “start time” into graph form.

https://drive.google.com/file/d/1p-zRHu ... sp=sharing

Below we have graphed the “Cycle Start Times” using the Deep Measure and filter settings that ensures we have an equal number of cycle times. (Both lines are perfectly aligned)
Equal number of cycles
Equal number of cycles
Next we have amended the Deep Measure and filter settings where the cycle number of cycles differ due to the voltage over and undershoot present on math channel C-D at the FEM
Cycle count error detected
Cycle count error detected
Amending the Y axis setting of our Excel graph we can now reveal the level of separation and the approximate cycle number (Cycle 148) where separation began.
Cycle count error confirmed
Cycle count error confirmed
Based on the above there are a number of tips to ensure that the voltage anomalies we capture are “relevant” and not induced by our measurement technique. I say this because all things being equal, there should be no need to filter or adjust cycle thresholds in order to obtain an equal number of cycles as we did above!

1. Utilise the TA375 High Impedance Probes set to x10 attenuation
2. Ensure the TA375 probes are grounded to identical ground points
3. Keep test leads as short as possible (i.e. do not extend the TA375 signal or ground leads)
4. Try to measure direct onto the ECU pins rather than extension leads or break outs
5. Minimise EMI or ESD from devices such as boost chargers etc. (Battery support is fine)

The value of graphing Deep Measure data enables students and customers to interpret the realms of data displayed in the Deep Measure Table and ensure the results obtained are “easy on the eye”. This feature is therefore perfect for training material along with warranty & technical reports.

It could of course be used in the field during diagnosis but using the zoom feature of PicoScope to scroll along the data to locate the point where cycles misaligned is far quicker.

Here is an example from Bens Mazda Case Study with numerous communication faults: https://www.picoauto.com/library/case-s ... ions-fault

The capture below highlights a catastrophic delay in CAN messages measured at different locations on the same BUS wires!
Mazda communication error
Mazda communication error
Using the Deep Measure export technique described above, the results below speak for themselves given these lines should rest on top of each other
Graphing erroneous CAN Cycle Count
Graphing erroneous CAN Cycle Count
I hope this helps, take care……..Steve

Post Reply